| | |
| | | * version: 2.1.13 |
| | | * https://github.com/mengshukeji/Luckysheet |
| | | */ |
| | | var luckysheet=(()=>{var pp=Object.create,ai=Object.defineProperty,gp=Object.defineProperties,yp=Object.getOwnPropertyDescriptor,vp=Object.getOwnPropertyDescriptors,bp=Object.getOwnPropertyNames,lu=Object.getOwnPropertySymbols,kp=Object.getPrototypeOf,ru=Object.prototype.hasOwnProperty,wp=Object.prototype.propertyIsEnumerable;var nu=(e,n,t)=>n in e?ai(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Ue=(e,n)=>{for(var t in n||(n={}))ru.call(n,t)&&nu(e,t,n[t]);if(lu)for(var t of lu(n))wp.call(n,t)&&nu(e,t,n[t]);return e},au=(e,n)=>gp(e,vp(n)),xp=e=>ai(e,"__esModule",{value:!0});var Ie=(e,n)=>()=>(e&&(n=e(e=0)),n),vl=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),_p=(e,n)=>{for(var t in n)ai(e,t,{get:n[t],enumerable:!0})},Cp=(e,n,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let l of bp(n))!ru.call(e,l)&&l!=="default"&&ai(e,l,{get:()=>n[l],enumerable:!(t=yp(n,l))||t.enumerable});return e},Fl=e=>Cp(xp(ai(e!=null?pp(kp(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var Tp,fe,xl=Ie(()=>{Tp={autoFormatw:!1,accuracy:void 0,total:0,allowCopy:!0,showtoolbar:!0,showinfobar:!0,showsheetbar:!0,showstatisticBar:!0,pointEdit:!1,pointEditUpdate:null,pointEditZoom:1,userInfo:!1,userMenuItem:[],myFolderUrl:null,functionButton:null,showConfigWindowResize:!0,enableAddRow:!0,addRowCount:100,enableAddBackTop:!0,enablePage:!0,pageInfo:null,editMode:!1,beforeCreateDom:null,workbookCreateBefore:null,workbookCreateAfter:null,remoteFunction:null,fireMousedown:null,plugins:[],forceCalculation:!1,defaultColWidth:73,defaultRowHeight:19,defaultTextColor:"#000",defaultCellColor:"#fff"},fe=Tp});var Sp,h,Xe=Ie(()=>{Sp={container:null,loadingObj:{},luckysheetfile:null,defaultcolumnNum:60,defaultrowNum:84,fullscreenmode:!0,devicePixelRatio:1,currentSheetIndex:0,calculateSheetIndex:0,flowdata:[],config:{},visibledatarow:[],visibledatacolumn:[],ch_width:0,rh_height:0,cellmainWidth:0,cellmainHeight:0,toolbarHeight:0,infobarHeight:0,calculatebarHeight:0,rowHeaderWidth:46,columnHeaderHeight:20,cellMainSrollBarSize:12,sheetBarHeight:31,statisticBarHeight:23,luckysheetTableContentHW:[0,0],defaultcollen:73,defaultrowlen:19,jfcountfuncTimeout:null,jfautoscrollTimeout:null,luckysheet_select_status:!1,luckysheet_select_save:[{row:[0,0],column:[0,0]}],luckysheet_selection_range:[],luckysheet_copy_save:{},luckysheet_paste_iscut:!1,filterchage:!0,luckysheet_filter_save:{row:[],column:[]},luckysheet_sheet_move_status:!1,luckysheet_sheet_move_data:[],luckysheet_scroll_status:!1,luckysheetisrefreshdetail:!0,luckysheetisrefreshtheme:!0,luckysheetcurrentisPivotTable:!1,luckysheet_rows_selected_status:!1,luckysheet_cols_selected_status:!1,luckysheet_rows_change_size:!1,luckysheet_rows_change_size_start:[],luckysheet_cols_change_size:!1,luckysheet_cols_change_size_start:[],luckysheet_cols_dbclick_timeout:null,luckysheet_cols_dbclick_times:0,luckysheetCellUpdate:[],luckysheet_shiftpositon:null,iscopyself:!0,orderbyindex:0,luckysheet_model_move_state:!1,luckysheet_model_xy:[0,0],luckysheet_model_move_obj:null,luckysheet_cell_selected_move:!1,luckysheet_cell_selected_move_index:[],luckysheet_cell_selected_extend:!1,luckysheet_cell_selected_extend_index:[],luckysheet_cell_selected_extend_time:null,clearjfundo:!0,jfundo:[],jfredo:[],lang:"en",createChart:"",highlightChart:"",zIndex:15,chartparam:{luckysheetCurrentChart:null,luckysheetCurrentChartActive:!1,luckysheetCurrentChartMove:null,luckysheetCurrentChartMoveTimeout:null,luckysheetCurrentChartMoveObj:null,luckysheetCurrentChartMoveXy:null,luckysheetCurrentChartMoveWinH:null,luckysheetCurrentChartMoveWinW:null,luckysheetCurrentChartResize:null,luckysheetCurrentChartResizeObj:null,luckysheetCurrentChartResizeXy:null,luckysheetCurrentChartResizeWinH:null,luckysheetCurrentChartResizeWinW:null,luckysheetInsertChartTosheetChange:!0,luckysheetCurrentChartZIndexRank:100,luckysheet_chart_redo_click:!1,luckysheetCurrentChartMaxState:!1,jfrefreshchartall:"",changeChartCellData:"",renderChart:"",getChartJson:""},functionList:null,luckysheet_function:null,chart_selection:{},currentChart:"",scrollRefreshSwitch:!0,measureTextCache:{},measureTextCellInfoCache:{},measureTextCacheTimeOut:null,cellOverflowMapCache:{},zoomRatio:1,visibledatacolumn_unique:null,visibledatarow_unique:null,showGridLines:!0,toobarObject:{},inlineStringEditCache:null,inlineStringEditRange:null,fontList:[],defaultFontSize:10,currentSheetView:"viewNormal",cooperativeEdit:{usernameTimeout:{},changeCollaborationSize:[],allDataColumnlen:[],merge_range:{},checkoutData:[]},asyncLoad:["core"],defaultCell:{bg:null,bl:0,ct:{fa:"General",t:"n"},fc:"rgb(51, 51, 51)",ff:0,fs:11,ht:1,it:0,vt:1,m:"",v:""}},h=Sp});function me(e){return e==null||e.toString().replace(/\s/g,"")==""}function B(e){return!(e==null||e.toString().replace(/\s/g,"")===""||typeof e=="boolean"||isNaN(e))}function H(e){let n=!1;for(let t in Me)if(e==Me[t]){n=!0;break}return n}function In(e){return!!/[\u4E00-\u9FA5]|[\uFE30-\uFFA0]/gi.exec(e)}function de(){return!!fe.editMode}function El(){return!!h.allowEdit}function Mt(e,n,t,l,a){let o=!1;for(let s in h.config.merge){let u=e.merge[s];if(n<u.r){if(t>=u.r&&t<u.r+u.rs-1){if(l>=u.c&&l<=u.c+u.cs-1){o=!0;break}else if(a>=u.c&&a<=u.c+u.cs-1){o=!0;break}else if(l<u.c&&a>u.c+u.cs-1){o=!0;break}}else if(t>=u.r&&t==u.r+u.rs-1){if(l>u.c&&l<u.c+u.cs-1){o=!0;break}else if(a>u.c&&a<u.c+u.cs-1){o=!0;break}else if(l==u.c&&a<u.c+u.cs-1){o=!0;break}else if(l>u.c&&a==u.c+u.cs-1){o=!0;break}}else if(t>u.r+u.rs-1){if(l>u.c&&l<=u.c+u.cs-1){o=!0;break}else if(a>=u.c&&a<u.c+u.cs-1){o=!0;break}else if(l==u.c&&a<u.c+u.cs-1){o=!0;break}else if(l>u.c&&a==u.c+u.cs-1){o=!0;break}}}else if(n==u.r){if(t<u.r+u.rs-1){if(l>=u.c&&l<=u.c+u.cs-1){o=!0;break}else if(a>=u.c&&a<=u.c+u.cs-1){o=!0;break}else if(l<u.c&&a>u.c+u.cs-1){o=!0;break}}else if(t>=u.r+u.rs-1){if(l>u.c&&l<=u.c+u.cs-1){o=!0;break}else if(a>=u.c&&a<u.c+u.cs-1){o=!0;break}else if(l==u.c&&a<u.c+u.cs-1){o=!0;break}else if(l>u.c&&a==u.c+u.cs-1){o=!0;break}}}else if(n<=u.r+u.rs-1){if(l>=u.c&&l<=u.c+u.cs-1){o=!0;break}else if(a>=u.c&&a<=u.c+u.cs-1){o=!0;break}else if(l<u.c&&a>u.c+u.cs-1){o=!0;break}}}return o}function es(e){return Math.ceil(e.charCodeAt().toString(2).length/8)}var Me,Ft=Ie(()=>{xl();Xe();Me={v:"#VALUE!",n:"#NAME?",na:"#N/A",r:"#REF!",d:"#DIV/0!",nm:"#NUM!",nl:"#NULL!",sp:"#SPILL!"}});function $p(e){return Math.floor(e)===e}function iu(e){var n={times:1,num:0};if($p(e))return n.num=e,n;var t=e+"",l=t.indexOf("."),a=t.substr(l+1).length,o=Math.pow(10,a),s=parseInt(e*o+.5,10);return n.times=o,n.num=s,n}function ii(e,n,t){var l=iu(e),a=iu(n),o=l.num,s=a.num,u=l.times,d=a.times,f=u>d?u:d,m=null;switch(t){case"add":return u===d?m=o+s:u>d?m=o+s*(u/d):m=o*(d/u)+s,m/f;case"subtract":return u===d?m=o-s:u>d?m=o-s*(u/d):m=o*(d/u)-s,m/f;case"multiply":return m=o*s/(u*d),m;case"divide":return m=function(){var g=o/s,y=d/u;return ii(g,y,"multiply")}()}}function Ip(e,n){if(n||(n=2),!B(e))return e;let t=e.toFixed(n),l=t.indexOf("."),a=t.substring(0,l),o=t.substring(l+1,t.length);if(o)for(let s=o.length-1;s!=0&&!(o.charAt(s)!="0"&&s==o.length-1);s--)o=o.substring(0,s);return Number(a+"."+o)}var ou=Ie(()=>{Ft();Number.prototype.add=function(e){let n=parseFloat(e);if(typeof n!="number"||Number.isNaN(n))throw new Error("\u8BF7\u8F93\u5165\u6570\u5B57\u6216\u8005\u6570\u5B57\u5B57\u7B26\u4E32\uFF5E");return ii(this,n,"add")};Number.prototype.subtract=function(e){let n=parseFloat(e);if(typeof n!="number"||Number.isNaN(n))throw new Error("\u8BF7\u8F93\u5165\u6570\u5B57\u6216\u8005\u6570\u5B57\u5B57\u7B26\u4E32\uFF5E");return ii(this,n,"subtract")};Number.prototype.multiply=function(e){let n=parseFloat(e);if(typeof n!="number"||Number.isNaN(n))throw new Error("\u8BF7\u8F93\u5165\u6570\u5B57\u6216\u8005\u6570\u5B57\u5B57\u7B26\u4E32\uFF5E");return ii(this,n,"multiply")};Number.prototype.divide=function(e){let n=parseFloat(e);if(typeof n!="number"||Number.isNaN(n))throw new Error("\u8BF7\u8F93\u5165\u6570\u5B57\u6216\u8005\u6570\u5B57\u5B57\u7B26\u4E32\uFF5E");return ii(this,n,"divide")};Number.prototype.tofixed=function(e){let n=parseFloat(e);if(typeof n!="number"||Number.isNaN(n))throw new Error("\u8BF7\u8F93\u5165\u6570\u5B57\u6216\u8005\u6570\u5B57\u5B57\u7B26\u4E32\uFF5E");return Ip(this,n)}});var su,cu=Ie(()=>{su={container:"luckysheet",loading:{},column:60,row:84,allowCopy:!0,showtoolbar:!0,showinfobar:!0,showsheetbar:!0,showstatisticBar:!0,pointEdit:!1,pointEditUpdate:null,pointEditZoom:1,data:[{name:"Sheet1",color:"",status:"1",order:"0",data:[],config:{},index:0},{name:"Sheet2",color:"",status:"0",order:"1",data:[],config:{},index:1},{name:"Sheet3",color:"",status:"0",order:"2",data:[],config:{},index:2}],title:"Luckysheet Demo",userInfo:!1,userMenuItem:[{url:"www.baidu.com",icon:'<i class="fa fa-folder" aria-hidden="true"></i>',name:"\u6211\u7684\u8868\u683C"},{url:"www.baidu.com",icon:'<i class="fa fa-sign-out" aria-hidden="true"></i>',name:"\u9000\u51FA\u767B\u9646"}],myFolderUrl:"www.baidu.com",config:{},fullscreenmode:!0,devicePixelRatio:window.devicePixelRatio,allowEdit:!0,loadUrl:"",loadSheetUrl:"",gridKey:"",updateUrl:"",updateImageUrl:"",allowUpdate:!1,functionButton:"",showConfigWindowResize:!0,enableAddRow:!0,enableAddBackTop:!0,autoFormatw:!1,accuracy:void 0,pageInfo:{queryExps:"",reportId:"",fields:"",mobile:"",frezon:"",currentPage:"",totalPage:10,pageUrl:""},editMode:!1,beforeCreateDom:null,fireMousedown:null,lang:"en",plugins:[],forceCalculation:!1,rowHeaderWidth:46,columnHeaderHeight:20,defaultColWidth:73,defaultRowHeight:19,defaultFontSize:10,limitSheetNameLength:!0,defaultSheetNameMaxLength:31,sheetFormulaBar:!0,showtoolbarConfig:{},showsheetbarConfig:{},showstatisticBarConfig:{},cellRightClickConfig:{},sheetRightClickConfig:{},imageUpdateMethodConfig:{}}});var uu,hu=Ie(()=>{uu={functionlist:{SUMIF:{d:"Returns a conditional sum across a range.",a:"A conditional sum across a range.",p:[{name:"range",detail:"The range which is tested against `criterion`."},{name:"criterion",detail:"The pattern or test to apply to `range`."},{name:"sum_range",detail:"The range to be summed, if different from `range`."}]},TAN:{d:"Returns the tangent of an angle provided in radians.",a:"Tangent of an angle provided in radians.",p:[{name:"angle",detail:"The angle to find the tangent of, in radians."}]},TANH:{d:"Returns the hyperbolic tangent of any real number.",a:"Hyperbolic tangent of any real number.",p:[{name:"value",detail:"Any real value to calculate the hyperbolic tangent of."}]},CEILING:{d:"Rounds a number up to the nearest integer multiple of specified significance `factor`.",a:"Rounds number up to nearest multiple of a factor.",p:[{name:"value",detail:"The value to round up to the nearest integer multiple of `factor`."},{name:"factor",detail:"The number to whose multiples `value` will be rounded."}]},ATAN:{d:"Returns the inverse tangent of a value, in radians.",a:"Inverse tangent of a value, in radians.",p:[{name:"value",detail:"The value for which to calculate the inverse tangent."}]},ASINH:{d:"Returns the inverse hyperbolic sine of a number.",a:"Inverse hyperbolic sine of a number.",p:[{name:"value",detail:"The value for which to calculate the inverse hyperbolic sine."}]},ABS:{d:"Returns the absolute value of a number.",a:"Absolute value of a number.",p:[{name:"value",detail:"The number of which to return the absolute value."}]},ACOS:{d:"Returns the inverse cosine of a value, in radians.",a:"Inverse cosine of a value, in radians.",p:[{name:"value",detail:"The value for which to calculate the inverse cosine. Must be between `-1` and `1`, inclusive."}]},ACOSH:{d:"Returns the inverse hyperbolic cosine of a number.",a:"Inverse hyperbolic cosine of a number.",p:[{name:"value",detail:"The value for which to calculate the inverse hyperbolic cosine. Must be greater than or equal to `1`."}]},MULTINOMIAL:{d:"Returns the factorial of the sum of values divided by the product of the values' factorials.",a:"Multinomial distribution function.",p:[{name:"value1",detail:"The first value or range to consider."},{name:"value2",detail:"Additional values or ranges to consider."}]},ATANH:{d:"Returns the inverse hyperbolic tangent of a number.",a:"Inverse hyperbolic tangent of a number.",p:[{name:"value",detail:"The value for which to calculate the inverse hyperbolic tangent. Must be between -1 and 1, exclusive."}]},ATAN2:{d:"Returns the angle between the x-axis and a line segment from the origin (0,0) to specified coordinate pair (`x`,`y`), in radians.",a:"Arctangent of a value.",p:[{name:"x",detail:"The x coordinate of the endpoint of the line segment for which to calculate the angle from the x-axis."},{name:"y",detail:"The y coordinate of the endpoint of the line segment for which to calculate the angle from the x-axis."}]},COUNTBLANK:{d:"Returns the number of empty values in a list of values and ranges.",a:"Number of empty values.",p:[{name:"value1",detail:"The first value or range in which to count the number of blanks."}]},COSH:{d:"Returns the hyperbolic cosine of any real number.",a:"Hyperbolic cosine of any real number.",p:[{name:"value",detail:"Any real value to calculate the hyperbolic cosine of."}]},INT:{d:"Rounds a number down to the nearest integer that is less than or equal to it.",a:"Rounds number down to nearest integer.",p:[{name:"value",detail:"The value to round down to the nearest integer."}]},ISEVEN:{d:"Checks whether the provided value is even.",a:"Whether the provided value is even.",p:[{name:"value",detail:"The value to be verified as even."}]},ISODD:{d:"Checks whether the provided value is odd.",a:"Whether the provided value is odd.",p:[{name:"value",detail:"The value to be verified as odd."}]},LCM:{d:"Returns the least common multiple of one or more integers.",a:"Least common multiple of one or more integers.",p:[{name:"value1",detail:"The first value or range whose factors to consider in a calculation to find the least common multiple."},{name:"value2",detail:"Additional values or ranges whose factors to consider to find the least common multiple."}]},LN:{d:"Returns the logarithm of a number, base e (Euler's number).",a:"The logarithm of a number, base e (euler's number).",p:[{name:"value",detail:"The value for which to calculate the logarithm, base e."}]},LOG:{d:"Returns the logarithm of a number with respect to a base.",a:"The logarithm of a number with respect to a base.",p:[{name:"value",detail:"The value for which to calculate the logarithm."},{name:"base",detail:"The base to use for calculation of the logarithm."}]},LOG10:{d:"Returns the logarithm of a number, base 10.",a:"The logarithm of a number, base 10.",p:[{name:"value",detail:"The value for which to calculate the logarithm, base 10."}]},MOD:{d:"Returns the result of the modulo operator, the remainder after a division operation.",a:"Modulo (remainder) operator.",p:[{name:"dividend",detail:"The number to be divided to find the remainder."},{name:"divisor",detail:"The number to divide by."}]},MROUND:{d:"Rounds one number to the nearest integer multiple of another.",a:"Rounds a number to the nearest integer multiple.",p:[{name:"value",detail:"The number to round to the nearest integer multiple of another."},{name:"factor",detail:"The number to whose multiples `value` will be rounded."}]},ODD:{d:"Rounds a number up to the nearest odd integer.",a:"Rounds a number up to the nearest odd integer.",p:[{name:"value",detail:"The value to round to the next greatest odd number."}]},SUMSQ:{d:"Returns the sum of the squares of a series of numbers and/or cells.",a:"Sum of squares.",p:[{name:"value1",detail:"The first number or range whose squares to add together."},{name:"value2",detail:"Additional numbers or ranges whose squares to add to the square(s) of `value1`."}]},COMBIN:{d:"Returns the number of ways to choose some number of objects from a pool of a given size of objects.",a:"Number of combinations from a set of objects.",p:[{name:"n",detail:"The size of the pool of objects to choose from."},{name:"k",detail:"The number of objects to choose."}]},SUM:{d:"Returns the sum of a series of numbers and/or cells.",a:"Sum of a series of numbers and/or cells.",p:[{name:"value1",detail:"The first number or range to add together."},{name:"value2",detail:"Additional numbers or ranges to add to `value1`."}]},SUBTOTAL:{d:"Returns a subtotal for a vertical range of cells using a specified aggregation function.",a:"Subtotal for a range using a specific function.",p:[{name:"function_code",detail:"The function to use in subtotal aggregation."},{name:"range1",detail:"The first range over which to calculate a subtotal."},{name:"range2",detail:"Additional ranges over which to calculate subtotals."}]},ASIN:{d:"Returns the inverse sine of a value, in radians.",a:"Inverse sine of a value, in radians.",p:[{name:"value",detail:"The value for which to calculate the inverse sine. Must be between `-1` and `1`, inclusive."}]},COUNTIF:{d:"Returns a conditional count across a range.",a:"A conditional count across a range.",p:[{name:"range",detail:"The range that is tested against `criterion`."},{name:"criterion",detail:"The pattern or test to apply to `range`."}]},RADIANS:{d:"Converts an angle value in degrees to radians.",a:"Converts an angle value in degrees to radians.",p:[{name:"angle",detail:"The angle to convert from degrees to radians."}]},RAND:{d:"Returns a random number between 0 inclusive and 1 exclusive.",a:"A random number between 0 inclusive and 1 exclusive.",p:[]},COUNTUNIQUE:{d:"Counts the number of unique values in a list of specified values and ranges.",a:"Counts number of unique values in a range.",p:[{name:"value1",detail:"The first value or range to consider for uniqueness."},{name:"value2",detail:"Additional values or ranges to consider for uniqueness."}]},DEGREES:{d:"Converts an angle value in radians to degrees.",a:"Converts an angle value in radians to degrees.",p:[{name:"angle",detail:"The angle to convert from radians to degrees."}]},ERFC:{d:"Returns the complementary Gauss error function of a value.",a:"Complementary gauss error function of a value.",p:[{name:"z",detail:"The number for which to calculate the complementary Gauss error function."}]},EVEN:{d:"Rounds a number up to the nearest even integer.",a:"Rounds a number up to the nearest even integer.",p:[{name:"value",detail:"The value to round to the next greatest even number."}]},EXP:{d:"Returns Euler's number, e (~2.718) raised to a power.",a:"Euler's number, e (~2.718) raised to a power.",p:[{name:"exponent",detail:"The exponent to raise e to."}]},FACT:{d:"Returns the factorial of a number.",a:"Factorial of a number.",p:[{name:"value",detail:"The number or reference to a number whose factorial will be calculated and returned."}]},FACTDOUBLE:{d:'Returns the "double factorial" of a number.',a:'"double factorial" of a number.',p:[{name:"value",detail:"The number or reference to a number whose double factorial will be calculated and returned."}]},PI:{d:"Returns the value of Pi to 14 decimal places.",a:"The number pi.",p:[]},FLOOR:{d:"Rounds a number down to the nearest integer multiple of specified significance `factor`.",a:"Rounds number down to nearest multiple of a factor.",p:[{name:"value",detail:"The value to round down to the nearest integer multiple of `factor`."},{name:"factor",detail:"The number to whose multiples `value` will be rounded."}]},GCD:{d:"Returns the greatest common divisor of one or more integers.",a:"Greatest common divisor of one or more integers.",p:[{name:"value1",detail:"The first value or range whose factors to consider in a calculation to find the greatest common divisor."},{name:"value2",detail:"Additional values or ranges whose factors to consider to find the greatest common divisor."}]},RANDBETWEEN:{d:"Returns a uniformly random integer between two values, inclusive.",a:"Random integer between two values, inclusive.",p:[{name:"low",detail:"The low end of the random range."},{name:"high",detail:"The high end of the random range."}]},ROUND:{d:"Rounds a number to a certain number of decimal places according to standard rules.",a:"Rounds a number according to standard rules.",p:[{name:"value",detail:"The value to round to `places` number of places."},{name:"places",detail:"The number of decimal places to which to round."}]},ROUNDDOWN:{d:"Rounds a number to a certain number of decimal places, always rounding down to the next valid increment.",a:"Rounds down a number.",p:[{name:"value",detail:"The value to round to `places` number of places, always rounding down."},{name:"places",detail:"The number of decimal places to which to round."}]},ROUNDUP:{d:"Rounds a number to a certain number of decimal places, always rounding up to the next valid increment.",a:"Rounds up a number.",p:[{name:"value",detail:"The value to round to `places` number of places, always rounding up."},{name:"places",detail:"The number of decimal places to which to round."}]},SERIESSUM:{d:"Given parameters `x`, `n`, `m`, and `a`, returns the power series sum a",a:"Sum of a power series.",p:[{name:"x",detail:"The input to the power series. Varies depending on the type of approximation, may be angle, exponent, or some other value."},{name:"n",detail:"The initial power to which to raise `x` in the power series."},{name:"m",detail:"The additive increment by which to increase `x`."},{name:"a",detail:"The array or range containing the coefficients of the power series."}]},SIGN:{d:"Given an input number, returns `-1` if it is negative, `1` if positive, and `0` if it is zero.",a:"Sign of a provided number (+/-/0).",p:[{name:"value",detail:"The value whose sign will be evaluated."}]},SIN:{d:"Returns the sine of an angle provided in radians.",a:"Sine of an angle provided in radians.",p:[{name:"angle",detail:"The angle to find the sine of, in radians."}]},SINH:{d:"Returns the hyperbolic sine of any real number.",a:"Hyperbolic sine of any real number.",p:[{name:"value",detail:"Any real value to calculate the hyperbolic sine of."}]},SQRT:{d:"Returns the positive square root of a positive number.",a:"Positive square root of a positive number.",p:[{name:"value",detail:"The number for which to calculate the positive square root."}]},SQRTPI:{d:"Returns the positive square root of the product of Pi and the given positive number.",a:"Square root of the product of pi and number.",p:[{name:"value",detail:"The number which will be multiplied by Pi and have the product's square root returned"}]},GAMMALN:{d:"Returns the logarithm of a specified Gamma function, base e (Euler's number).",a:"Logarithm of gamma function.",p:[{name:"value",detail:"The input to the Gamma function. The natural logarithm of Gamma(`value`) will be returned."}]},COS:{d:"Returns the cosine of an angle provided in radians.",a:"Cosine of an angle provided in radians.",p:[{name:"angle",detail:"The angle to find the cosine of, in radians."}]},TRUNC:{d:"Truncates a number to a certain number of significant digits by omitting less significant digits.",a:"Truncates a number.",p:[{name:"value",detail:"The value to be truncated."},{name:"places",detail:"The number of significant digits to the right of the decimal point to retain."}]},QUOTIENT:{d:"Returns one number divided by another.",a:"One number divided by another.",p:[{name:"dividend",detail:"The number to be divided."},{name:"divisor",detail:"The number to divide by."}]},POWER:{d:"Returns a number raised to a power.",a:"A number raised to a power.",p:[{name:"base",detail:"The number to raise to the `exponent` power."},{name:"exponent",detail:"The exponent to raise `base` to."}]},SUMIFS:{d:"Returns the sum of a range depending on multiple criteria.",a:"Sums a range depending on multiple criteria.",p:[{name:"sum_range",detail:"The range to sum."},{name:"criteria_range1",detail:"The range to check against criterion1."},{name:"criterion1",detail:"The pattern or test to apply to criteria_range1."},{name:"criteria_range2",detail:"Additional ranges to check."}]},COUNTIFS:{d:"Returns the count of a range depending on multiple criteria.",a:"Count values depending on multiple criteria.",p:[{name:"criteria_range1",detail:"The range to check against `criterion1`."},{name:"criterion1",detail:"The pattern or test to apply to `criteria_range1`."},{name:"criteria_range2",detail:"Additional ranges to check."}]},PRODUCT:{d:"Returns the result of multiplying a series of numbers together.",a:"Result of multiplying a series of numbers together.",p:[{name:"factor1",detail:"The first number or range to calculate for the product."},{name:"factor2",detail:"More numbers or ranges to calculate for the product."}]},HARMEAN:{d:"Calculates the harmonic mean of a dataset.",a:"The harmonic mean of a dataset.",p:[{name:"value1",detail:"The first value or range of the population."},{name:"value2",detail:"Additional values or ranges to include in the population."}]},HYPGEOMDIST:{d:"Calculates the probability of drawing a certain number of successes in a certain number of tries given a population of a certain size containing a certain number of successes, without replacement of draws.",a:"Hypergeometric distribution probability.",p:[{name:"num_successes",detail:"The desired number of successes."},{name:"num_draws",detail:"The number of permitted draws."},{name:"successes_in_pop",detail:"The total number of successes in the population."},{name:"pop_size",detail:"The total size of the population"},{name:"cumulative",detail:`Determine the logical value of the function form. |
| | | var luckysheet=(()=>{var pp=Object.create,ai=Object.defineProperty,gp=Object.defineProperties,yp=Object.getOwnPropertyDescriptor,vp=Object.getOwnPropertyDescriptors,bp=Object.getOwnPropertyNames,lu=Object.getOwnPropertySymbols,kp=Object.getPrototypeOf,ru=Object.prototype.hasOwnProperty,wp=Object.prototype.propertyIsEnumerable;var nu=(e,n,t)=>n in e?ai(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Ue=(e,n)=>{for(var t in n||(n={}))ru.call(n,t)&&nu(e,t,n[t]);if(lu)for(var t of lu(n))wp.call(n,t)&&nu(e,t,n[t]);return e},au=(e,n)=>gp(e,vp(n)),xp=e=>ai(e,"__esModule",{value:!0});var Ie=(e,n)=>()=>(e&&(n=e(e=0)),n),vl=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),_p=(e,n)=>{for(var t in n)ai(e,t,{get:n[t],enumerable:!0})},Cp=(e,n,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let l of bp(n))!ru.call(e,l)&&l!=="default"&&ai(e,l,{get:()=>n[l],enumerable:!(t=yp(n,l))||t.enumerable});return e},Fl=e=>Cp(xp(ai(e!=null?pp(kp(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var Tp,de,xl=Ie(()=>{Tp={autoFormatw:!1,accuracy:void 0,total:0,allowCopy:!0,showtoolbar:!0,showinfobar:!0,showsheetbar:!0,showstatisticBar:!0,pointEdit:!1,pointEditUpdate:null,pointEditZoom:1,userInfo:!1,userMenuItem:[],myFolderUrl:null,functionButton:null,showConfigWindowResize:!0,enableAddRow:!0,addRowCount:100,enableAddBackTop:!0,enablePage:!0,pageInfo:null,editMode:!1,beforeCreateDom:null,workbookCreateBefore:null,workbookCreateAfter:null,remoteFunction:null,fireMousedown:null,plugins:[],forceCalculation:!1,defaultColWidth:73,defaultRowHeight:19,defaultTextColor:"#000",defaultCellColor:"#fff"},de=Tp});var Sp,h,Xe=Ie(()=>{Sp={container:null,loadingObj:{},luckysheetfile:null,defaultcolumnNum:60,defaultrowNum:84,fullscreenmode:!0,devicePixelRatio:1,currentSheetIndex:0,calculateSheetIndex:0,flowdata:[],config:{},visibledatarow:[],visibledatacolumn:[],ch_width:0,rh_height:0,cellmainWidth:0,cellmainHeight:0,toolbarHeight:0,infobarHeight:0,calculatebarHeight:0,rowHeaderWidth:46,columnHeaderHeight:20,cellMainSrollBarSize:12,sheetBarHeight:31,statisticBarHeight:23,luckysheetTableContentHW:[0,0],defaultcollen:73,defaultrowlen:19,jfcountfuncTimeout:null,jfautoscrollTimeout:null,luckysheet_select_status:!1,luckysheet_select_save:[{row:[0,0],column:[0,0]}],luckysheet_selection_range:[],luckysheet_copy_save:{},luckysheet_paste_iscut:!1,filterchage:!0,luckysheet_filter_save:{row:[],column:[]},luckysheet_sheet_move_status:!1,luckysheet_sheet_move_data:[],luckysheet_scroll_status:!1,luckysheetisrefreshdetail:!0,luckysheetisrefreshtheme:!0,luckysheetcurrentisPivotTable:!1,luckysheet_rows_selected_status:!1,luckysheet_cols_selected_status:!1,luckysheet_rows_change_size:!1,luckysheet_rows_change_size_start:[],luckysheet_cols_change_size:!1,luckysheet_cols_change_size_start:[],luckysheet_cols_dbclick_timeout:null,luckysheet_cols_dbclick_times:0,luckysheetCellUpdate:[],luckysheet_shiftpositon:null,iscopyself:!0,orderbyindex:0,luckysheet_model_move_state:!1,luckysheet_model_xy:[0,0],luckysheet_model_move_obj:null,luckysheet_cell_selected_move:!1,luckysheet_cell_selected_move_index:[],luckysheet_cell_selected_extend:!1,luckysheet_cell_selected_extend_index:[],luckysheet_cell_selected_extend_time:null,clearjfundo:!0,jfundo:[],jfredo:[],lang:"en",createChart:"",highlightChart:"",zIndex:15,chartparam:{luckysheetCurrentChart:null,luckysheetCurrentChartActive:!1,luckysheetCurrentChartMove:null,luckysheetCurrentChartMoveTimeout:null,luckysheetCurrentChartMoveObj:null,luckysheetCurrentChartMoveXy:null,luckysheetCurrentChartMoveWinH:null,luckysheetCurrentChartMoveWinW:null,luckysheetCurrentChartResize:null,luckysheetCurrentChartResizeObj:null,luckysheetCurrentChartResizeXy:null,luckysheetCurrentChartResizeWinH:null,luckysheetCurrentChartResizeWinW:null,luckysheetInsertChartTosheetChange:!0,luckysheetCurrentChartZIndexRank:100,luckysheet_chart_redo_click:!1,luckysheetCurrentChartMaxState:!1,jfrefreshchartall:"",changeChartCellData:"",renderChart:"",getChartJson:""},functionList:null,luckysheet_function:null,chart_selection:{},currentChart:"",scrollRefreshSwitch:!0,measureTextCache:{},measureTextCellInfoCache:{},measureTextCacheTimeOut:null,cellOverflowMapCache:{},zoomRatio:1,visibledatacolumn_unique:null,visibledatarow_unique:null,showGridLines:!0,toobarObject:{},inlineStringEditCache:null,inlineStringEditRange:null,fontList:[],defaultFontSize:10,currentSheetView:"viewNormal",cooperativeEdit:{usernameTimeout:{},changeCollaborationSize:[],allDataColumnlen:[],merge_range:{},checkoutData:[]},asyncLoad:["core"],defaultCell:{bg:null,bl:0,ct:{fa:"General",t:"n"},fc:"rgb(51, 51, 51)",ff:0,fs:11,ht:1,it:0,vt:1,m:"",v:""}},h=Sp});function me(e){return e==null||e.toString().replace(/\s/g,"")==""}function B(e){return!(e==null||e.toString().replace(/\s/g,"")===""||typeof e=="boolean"||isNaN(e))}function H(e){let n=!1;for(let t in Me)if(e==Me[t]){n=!0;break}return n}function In(e){return!!/[\u4E00-\u9FA5]|[\uFE30-\uFFA0]/gi.exec(e)}function fe(){return!!de.editMode}function El(){return!!h.allowEdit}function Mt(e,n,t,l,a){let o=!1;for(let s in h.config.merge){let u=e.merge[s];if(n<u.r){if(t>=u.r&&t<u.r+u.rs-1){if(l>=u.c&&l<=u.c+u.cs-1){o=!0;break}else if(a>=u.c&&a<=u.c+u.cs-1){o=!0;break}else if(l<u.c&&a>u.c+u.cs-1){o=!0;break}}else if(t>=u.r&&t==u.r+u.rs-1){if(l>u.c&&l<u.c+u.cs-1){o=!0;break}else if(a>u.c&&a<u.c+u.cs-1){o=!0;break}else if(l==u.c&&a<u.c+u.cs-1){o=!0;break}else if(l>u.c&&a==u.c+u.cs-1){o=!0;break}}else if(t>u.r+u.rs-1){if(l>u.c&&l<=u.c+u.cs-1){o=!0;break}else if(a>=u.c&&a<u.c+u.cs-1){o=!0;break}else if(l==u.c&&a<u.c+u.cs-1){o=!0;break}else if(l>u.c&&a==u.c+u.cs-1){o=!0;break}}}else if(n==u.r){if(t<u.r+u.rs-1){if(l>=u.c&&l<=u.c+u.cs-1){o=!0;break}else if(a>=u.c&&a<=u.c+u.cs-1){o=!0;break}else if(l<u.c&&a>u.c+u.cs-1){o=!0;break}}else if(t>=u.r+u.rs-1){if(l>u.c&&l<=u.c+u.cs-1){o=!0;break}else if(a>=u.c&&a<u.c+u.cs-1){o=!0;break}else if(l==u.c&&a<u.c+u.cs-1){o=!0;break}else if(l>u.c&&a==u.c+u.cs-1){o=!0;break}}}else if(n<=u.r+u.rs-1){if(l>=u.c&&l<=u.c+u.cs-1){o=!0;break}else if(a>=u.c&&a<=u.c+u.cs-1){o=!0;break}else if(l<u.c&&a>u.c+u.cs-1){o=!0;break}}}return o}function es(e){return Math.ceil(e.charCodeAt().toString(2).length/8)}var Me,Ft=Ie(()=>{xl();Xe();Me={v:"#VALUE!",n:"#NAME?",na:"#N/A",r:"#REF!",d:"#DIV/0!",nm:"#NUM!",nl:"#NULL!",sp:"#SPILL!"}});function $p(e){return Math.floor(e)===e}function iu(e){var n={times:1,num:0};if($p(e))return n.num=e,n;var t=e+"",l=t.indexOf("."),a=t.substr(l+1).length,o=Math.pow(10,a),s=parseInt(e*o+.5,10);return n.times=o,n.num=s,n}function ii(e,n,t){var l=iu(e),a=iu(n),o=l.num,s=a.num,u=l.times,f=a.times,d=u>f?u:f,m=null;switch(t){case"add":return u===f?m=o+s:u>f?m=o+s*(u/f):m=o*(f/u)+s,m/d;case"subtract":return u===f?m=o-s:u>f?m=o-s*(u/f):m=o*(f/u)-s,m/d;case"multiply":return m=o*s/(u*f),m;case"divide":return m=function(){var g=o/s,y=f/u;return ii(g,y,"multiply")}()}}function Ip(e,n){if(n||(n=2),!B(e))return e;let t=e.toFixed(n),l=t.indexOf("."),a=t.substring(0,l),o=t.substring(l+1,t.length);if(o)for(let s=o.length-1;s!=0&&!(o.charAt(s)!="0"&&s==o.length-1);s--)o=o.substring(0,s);return Number(a+"."+o)}var ou=Ie(()=>{Ft();Number.prototype.add=function(e){let n=parseFloat(e);if(typeof n!="number"||Number.isNaN(n))throw new Error("\u8BF7\u8F93\u5165\u6570\u5B57\u6216\u8005\u6570\u5B57\u5B57\u7B26\u4E32\uFF5E");return ii(this,n,"add")};Number.prototype.subtract=function(e){let n=parseFloat(e);if(typeof n!="number"||Number.isNaN(n))throw new Error("\u8BF7\u8F93\u5165\u6570\u5B57\u6216\u8005\u6570\u5B57\u5B57\u7B26\u4E32\uFF5E");return ii(this,n,"subtract")};Number.prototype.multiply=function(e){let n=parseFloat(e);if(typeof n!="number"||Number.isNaN(n))throw new Error("\u8BF7\u8F93\u5165\u6570\u5B57\u6216\u8005\u6570\u5B57\u5B57\u7B26\u4E32\uFF5E");return ii(this,n,"multiply")};Number.prototype.divide=function(e){let n=parseFloat(e);if(typeof n!="number"||Number.isNaN(n))throw new Error("\u8BF7\u8F93\u5165\u6570\u5B57\u6216\u8005\u6570\u5B57\u5B57\u7B26\u4E32\uFF5E");return ii(this,n,"divide")};Number.prototype.tofixed=function(e){let n=parseFloat(e);if(typeof n!="number"||Number.isNaN(n))throw new Error("\u8BF7\u8F93\u5165\u6570\u5B57\u6216\u8005\u6570\u5B57\u5B57\u7B26\u4E32\uFF5E");return Ip(this,n)}});var su,cu=Ie(()=>{su={container:"luckysheet",loading:{},column:60,row:84,allowCopy:!0,showtoolbar:!0,showinfobar:!0,showsheetbar:!0,showstatisticBar:!0,pointEdit:!1,pointEditUpdate:null,pointEditZoom:1,data:[{name:"Sheet1",color:"",status:"1",order:"0",data:[],config:{},index:0},{name:"Sheet2",color:"",status:"0",order:"1",data:[],config:{},index:1},{name:"Sheet3",color:"",status:"0",order:"2",data:[],config:{},index:2}],title:"Luckysheet Demo",userInfo:!1,userMenuItem:[{url:"www.baidu.com",icon:'<i class="fa fa-folder" aria-hidden="true"></i>',name:"\u6211\u7684\u8868\u683C"},{url:"www.baidu.com",icon:'<i class="fa fa-sign-out" aria-hidden="true"></i>',name:"\u9000\u51FA\u767B\u9646"}],myFolderUrl:"www.baidu.com",config:{},fullscreenmode:!0,devicePixelRatio:window.devicePixelRatio,allowEdit:!0,loadUrl:"",loadSheetUrl:"",gridKey:"",updateUrl:"",updateImageUrl:"",allowUpdate:!1,functionButton:"",showConfigWindowResize:!0,enableAddRow:!0,enableAddBackTop:!0,autoFormatw:!1,accuracy:void 0,pageInfo:{queryExps:"",reportId:"",fields:"",mobile:"",frezon:"",currentPage:"",totalPage:10,pageUrl:""},editMode:!1,beforeCreateDom:null,fireMousedown:null,lang:"en",plugins:[],forceCalculation:!1,rowHeaderWidth:46,columnHeaderHeight:20,defaultColWidth:73,defaultRowHeight:19,defaultFontSize:10,limitSheetNameLength:!0,defaultSheetNameMaxLength:31,sheetFormulaBar:!0,showtoolbarConfig:{},showsheetbarConfig:{},showstatisticBarConfig:{},cellRightClickConfig:{},sheetRightClickConfig:{},imageUpdateMethodConfig:{}}});var uu,hu=Ie(()=>{uu={functionlist:{SUMIF:{d:"Returns a conditional sum across a range.",a:"A conditional sum across a range.",p:[{name:"range",detail:"The range which is tested against `criterion`."},{name:"criterion",detail:"The pattern or test to apply to `range`."},{name:"sum_range",detail:"The range to be summed, if different from `range`."}]},TAN:{d:"Returns the tangent of an angle provided in radians.",a:"Tangent of an angle provided in radians.",p:[{name:"angle",detail:"The angle to find the tangent of, in radians."}]},TANH:{d:"Returns the hyperbolic tangent of any real number.",a:"Hyperbolic tangent of any real number.",p:[{name:"value",detail:"Any real value to calculate the hyperbolic tangent of."}]},CEILING:{d:"Rounds a number up to the nearest integer multiple of specified significance `factor`.",a:"Rounds number up to nearest multiple of a factor.",p:[{name:"value",detail:"The value to round up to the nearest integer multiple of `factor`."},{name:"factor",detail:"The number to whose multiples `value` will be rounded."}]},ATAN:{d:"Returns the inverse tangent of a value, in radians.",a:"Inverse tangent of a value, in radians.",p:[{name:"value",detail:"The value for which to calculate the inverse tangent."}]},ASINH:{d:"Returns the inverse hyperbolic sine of a number.",a:"Inverse hyperbolic sine of a number.",p:[{name:"value",detail:"The value for which to calculate the inverse hyperbolic sine."}]},ABS:{d:"Returns the absolute value of a number.",a:"Absolute value of a number.",p:[{name:"value",detail:"The number of which to return the absolute value."}]},ACOS:{d:"Returns the inverse cosine of a value, in radians.",a:"Inverse cosine of a value, in radians.",p:[{name:"value",detail:"The value for which to calculate the inverse cosine. Must be between `-1` and `1`, inclusive."}]},ACOSH:{d:"Returns the inverse hyperbolic cosine of a number.",a:"Inverse hyperbolic cosine of a number.",p:[{name:"value",detail:"The value for which to calculate the inverse hyperbolic cosine. Must be greater than or equal to `1`."}]},MULTINOMIAL:{d:"Returns the factorial of the sum of values divided by the product of the values' factorials.",a:"Multinomial distribution function.",p:[{name:"value1",detail:"The first value or range to consider."},{name:"value2",detail:"Additional values or ranges to consider."}]},ATANH:{d:"Returns the inverse hyperbolic tangent of a number.",a:"Inverse hyperbolic tangent of a number.",p:[{name:"value",detail:"The value for which to calculate the inverse hyperbolic tangent. Must be between -1 and 1, exclusive."}]},ATAN2:{d:"Returns the angle between the x-axis and a line segment from the origin (0,0) to specified coordinate pair (`x`,`y`), in radians.",a:"Arctangent of a value.",p:[{name:"x",detail:"The x coordinate of the endpoint of the line segment for which to calculate the angle from the x-axis."},{name:"y",detail:"The y coordinate of the endpoint of the line segment for which to calculate the angle from the x-axis."}]},COUNTBLANK:{d:"Returns the number of empty values in a list of values and ranges.",a:"Number of empty values.",p:[{name:"value1",detail:"The first value or range in which to count the number of blanks."}]},COSH:{d:"Returns the hyperbolic cosine of any real number.",a:"Hyperbolic cosine of any real number.",p:[{name:"value",detail:"Any real value to calculate the hyperbolic cosine of."}]},INT:{d:"Rounds a number down to the nearest integer that is less than or equal to it.",a:"Rounds number down to nearest integer.",p:[{name:"value",detail:"The value to round down to the nearest integer."}]},ISEVEN:{d:"Checks whether the provided value is even.",a:"Whether the provided value is even.",p:[{name:"value",detail:"The value to be verified as even."}]},ISODD:{d:"Checks whether the provided value is odd.",a:"Whether the provided value is odd.",p:[{name:"value",detail:"The value to be verified as odd."}]},LCM:{d:"Returns the least common multiple of one or more integers.",a:"Least common multiple of one or more integers.",p:[{name:"value1",detail:"The first value or range whose factors to consider in a calculation to find the least common multiple."},{name:"value2",detail:"Additional values or ranges whose factors to consider to find the least common multiple."}]},LN:{d:"Returns the logarithm of a number, base e (Euler's number).",a:"The logarithm of a number, base e (euler's number).",p:[{name:"value",detail:"The value for which to calculate the logarithm, base e."}]},LOG:{d:"Returns the logarithm of a number with respect to a base.",a:"The logarithm of a number with respect to a base.",p:[{name:"value",detail:"The value for which to calculate the logarithm."},{name:"base",detail:"The base to use for calculation of the logarithm."}]},LOG10:{d:"Returns the logarithm of a number, base 10.",a:"The logarithm of a number, base 10.",p:[{name:"value",detail:"The value for which to calculate the logarithm, base 10."}]},MOD:{d:"Returns the result of the modulo operator, the remainder after a division operation.",a:"Modulo (remainder) operator.",p:[{name:"dividend",detail:"The number to be divided to find the remainder."},{name:"divisor",detail:"The number to divide by."}]},MROUND:{d:"Rounds one number to the nearest integer multiple of another.",a:"Rounds a number to the nearest integer multiple.",p:[{name:"value",detail:"The number to round to the nearest integer multiple of another."},{name:"factor",detail:"The number to whose multiples `value` will be rounded."}]},ODD:{d:"Rounds a number up to the nearest odd integer.",a:"Rounds a number up to the nearest odd integer.",p:[{name:"value",detail:"The value to round to the next greatest odd number."}]},SUMSQ:{d:"Returns the sum of the squares of a series of numbers and/or cells.",a:"Sum of squares.",p:[{name:"value1",detail:"The first number or range whose squares to add together."},{name:"value2",detail:"Additional numbers or ranges whose squares to add to the square(s) of `value1`."}]},COMBIN:{d:"Returns the number of ways to choose some number of objects from a pool of a given size of objects.",a:"Number of combinations from a set of objects.",p:[{name:"n",detail:"The size of the pool of objects to choose from."},{name:"k",detail:"The number of objects to choose."}]},SUM:{d:"Returns the sum of a series of numbers and/or cells.",a:"Sum of a series of numbers and/or cells.",p:[{name:"value1",detail:"The first number or range to add together."},{name:"value2",detail:"Additional numbers or ranges to add to `value1`."}]},SUBTOTAL:{d:"Returns a subtotal for a vertical range of cells using a specified aggregation function.",a:"Subtotal for a range using a specific function.",p:[{name:"function_code",detail:"The function to use in subtotal aggregation."},{name:"range1",detail:"The first range over which to calculate a subtotal."},{name:"range2",detail:"Additional ranges over which to calculate subtotals."}]},ASIN:{d:"Returns the inverse sine of a value, in radians.",a:"Inverse sine of a value, in radians.",p:[{name:"value",detail:"The value for which to calculate the inverse sine. Must be between `-1` and `1`, inclusive."}]},COUNTIF:{d:"Returns a conditional count across a range.",a:"A conditional count across a range.",p:[{name:"range",detail:"The range that is tested against `criterion`."},{name:"criterion",detail:"The pattern or test to apply to `range`."}]},RADIANS:{d:"Converts an angle value in degrees to radians.",a:"Converts an angle value in degrees to radians.",p:[{name:"angle",detail:"The angle to convert from degrees to radians."}]},RAND:{d:"Returns a random number between 0 inclusive and 1 exclusive.",a:"A random number between 0 inclusive and 1 exclusive.",p:[]},COUNTUNIQUE:{d:"Counts the number of unique values in a list of specified values and ranges.",a:"Counts number of unique values in a range.",p:[{name:"value1",detail:"The first value or range to consider for uniqueness."},{name:"value2",detail:"Additional values or ranges to consider for uniqueness."}]},DEGREES:{d:"Converts an angle value in radians to degrees.",a:"Converts an angle value in radians to degrees.",p:[{name:"angle",detail:"The angle to convert from radians to degrees."}]},ERFC:{d:"Returns the complementary Gauss error function of a value.",a:"Complementary gauss error function of a value.",p:[{name:"z",detail:"The number for which to calculate the complementary Gauss error function."}]},EVEN:{d:"Rounds a number up to the nearest even integer.",a:"Rounds a number up to the nearest even integer.",p:[{name:"value",detail:"The value to round to the next greatest even number."}]},EXP:{d:"Returns Euler's number, e (~2.718) raised to a power.",a:"Euler's number, e (~2.718) raised to a power.",p:[{name:"exponent",detail:"The exponent to raise e to."}]},FACT:{d:"Returns the factorial of a number.",a:"Factorial of a number.",p:[{name:"value",detail:"The number or reference to a number whose factorial will be calculated and returned."}]},FACTDOUBLE:{d:'Returns the "double factorial" of a number.',a:'"double factorial" of a number.',p:[{name:"value",detail:"The number or reference to a number whose double factorial will be calculated and returned."}]},PI:{d:"Returns the value of Pi to 14 decimal places.",a:"The number pi.",p:[]},FLOOR:{d:"Rounds a number down to the nearest integer multiple of specified significance `factor`.",a:"Rounds number down to nearest multiple of a factor.",p:[{name:"value",detail:"The value to round down to the nearest integer multiple of `factor`."},{name:"factor",detail:"The number to whose multiples `value` will be rounded."}]},GCD:{d:"Returns the greatest common divisor of one or more integers.",a:"Greatest common divisor of one or more integers.",p:[{name:"value1",detail:"The first value or range whose factors to consider in a calculation to find the greatest common divisor."},{name:"value2",detail:"Additional values or ranges whose factors to consider to find the greatest common divisor."}]},RANDBETWEEN:{d:"Returns a uniformly random integer between two values, inclusive.",a:"Random integer between two values, inclusive.",p:[{name:"low",detail:"The low end of the random range."},{name:"high",detail:"The high end of the random range."}]},ROUND:{d:"Rounds a number to a certain number of decimal places according to standard rules.",a:"Rounds a number according to standard rules.",p:[{name:"value",detail:"The value to round to `places` number of places."},{name:"places",detail:"The number of decimal places to which to round."}]},ROUNDDOWN:{d:"Rounds a number to a certain number of decimal places, always rounding down to the next valid increment.",a:"Rounds down a number.",p:[{name:"value",detail:"The value to round to `places` number of places, always rounding down."},{name:"places",detail:"The number of decimal places to which to round."}]},ROUNDUP:{d:"Rounds a number to a certain number of decimal places, always rounding up to the next valid increment.",a:"Rounds up a number.",p:[{name:"value",detail:"The value to round to `places` number of places, always rounding up."},{name:"places",detail:"The number of decimal places to which to round."}]},SERIESSUM:{d:"Given parameters `x`, `n`, `m`, and `a`, returns the power series sum a",a:"Sum of a power series.",p:[{name:"x",detail:"The input to the power series. Varies depending on the type of approximation, may be angle, exponent, or some other value."},{name:"n",detail:"The initial power to which to raise `x` in the power series."},{name:"m",detail:"The additive increment by which to increase `x`."},{name:"a",detail:"The array or range containing the coefficients of the power series."}]},SIGN:{d:"Given an input number, returns `-1` if it is negative, `1` if positive, and `0` if it is zero.",a:"Sign of a provided number (+/-/0).",p:[{name:"value",detail:"The value whose sign will be evaluated."}]},SIN:{d:"Returns the sine of an angle provided in radians.",a:"Sine of an angle provided in radians.",p:[{name:"angle",detail:"The angle to find the sine of, in radians."}]},SINH:{d:"Returns the hyperbolic sine of any real number.",a:"Hyperbolic sine of any real number.",p:[{name:"value",detail:"Any real value to calculate the hyperbolic sine of."}]},SQRT:{d:"Returns the positive square root of a positive number.",a:"Positive square root of a positive number.",p:[{name:"value",detail:"The number for which to calculate the positive square root."}]},SQRTPI:{d:"Returns the positive square root of the product of Pi and the given positive number.",a:"Square root of the product of pi and number.",p:[{name:"value",detail:"The number which will be multiplied by Pi and have the product's square root returned"}]},GAMMALN:{d:"Returns the logarithm of a specified Gamma function, base e (Euler's number).",a:"Logarithm of gamma function.",p:[{name:"value",detail:"The input to the Gamma function. The natural logarithm of Gamma(`value`) will be returned."}]},COS:{d:"Returns the cosine of an angle provided in radians.",a:"Cosine of an angle provided in radians.",p:[{name:"angle",detail:"The angle to find the cosine of, in radians."}]},TRUNC:{d:"Truncates a number to a certain number of significant digits by omitting less significant digits.",a:"Truncates a number.",p:[{name:"value",detail:"The value to be truncated."},{name:"places",detail:"The number of significant digits to the right of the decimal point to retain."}]},QUOTIENT:{d:"Returns one number divided by another.",a:"One number divided by another.",p:[{name:"dividend",detail:"The number to be divided."},{name:"divisor",detail:"The number to divide by."}]},POWER:{d:"Returns a number raised to a power.",a:"A number raised to a power.",p:[{name:"base",detail:"The number to raise to the `exponent` power."},{name:"exponent",detail:"The exponent to raise `base` to."}]},SUMIFS:{d:"Returns the sum of a range depending on multiple criteria.",a:"Sums a range depending on multiple criteria.",p:[{name:"sum_range",detail:"The range to sum."},{name:"criteria_range1",detail:"The range to check against criterion1."},{name:"criterion1",detail:"The pattern or test to apply to criteria_range1."},{name:"criteria_range2",detail:"Additional ranges to check."}]},COUNTIFS:{d:"Returns the count of a range depending on multiple criteria.",a:"Count values depending on multiple criteria.",p:[{name:"criteria_range1",detail:"The range to check against `criterion1`."},{name:"criterion1",detail:"The pattern or test to apply to `criteria_range1`."},{name:"criteria_range2",detail:"Additional ranges to check."}]},PRODUCT:{d:"Returns the result of multiplying a series of numbers together.",a:"Result of multiplying a series of numbers together.",p:[{name:"factor1",detail:"The first number or range to calculate for the product."},{name:"factor2",detail:"More numbers or ranges to calculate for the product."}]},HARMEAN:{d:"Calculates the harmonic mean of a dataset.",a:"The harmonic mean of a dataset.",p:[{name:"value1",detail:"The first value or range of the population."},{name:"value2",detail:"Additional values or ranges to include in the population."}]},HYPGEOMDIST:{d:"Calculates the probability of drawing a certain number of successes in a certain number of tries given a population of a certain size containing a certain number of successes, without replacement of draws.",a:"Hypergeometric distribution probability.",p:[{name:"num_successes",detail:"The desired number of successes."},{name:"num_draws",detail:"The number of permitted draws."},{name:"successes_in_pop",detail:"The total number of successes in the population."},{name:"pop_size",detail:"The total size of the population"},{name:"cumulative",detail:`Determine the logical value of the function form. |
| | | |
| | | If cumulative is TRUE(), HYPGEOM.DIST returns the cumulative distribution function; |
| | | |
| | |
| | | |
| | | If the value is TRUE, the total accrued interest from the issue date to the settlement date is returned. |
| | | |
| | | If the value is FALSE, return the accrued interest from the first interest accrual date to the settlement date.`}]},ACCRINTM:{d:"Calculates the accrued interest of a security that pays interest at maturity.",a:"Accrued interest of security paying at maturity.",p:[{name:"issue",detail:"The date the security was initially issued."},{name:"maturity",detail:"The maturity date of the security."},{name:"rate",detail:"The annualized rate of interest."},{name:"redemption",detail:"The redemption amount per 100 face value, or par."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},COUPDAYBS:{d:"Calculates the number of days from the first coupon, or interest payment, until settlement.",a:"Number of days from first coupon to settlement.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},COUPDAYS:{d:"Calculates the number of days in the coupon, or interest payment, period that contains the specified settlement date.",a:"Days in coupon period containing settlement date.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},COUPDAYSNC:{d:"Calculates the number of days from the settlement date until the next coupon, or interest payment.",a:"Days from settlement until next coupon.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},COUPNCD:{d:"Calculates next coupon, or interest payment, date after the settlement date.",a:"Next coupon date after the settlement date.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},COUPPCD:{d:"Calculates last coupon, or interest payment, date before the settlement date.",a:"Last coupon date before settlement date.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},FV:{d:"Calculates the future value of an annuity investment based on constant-amount periodic payments and a constant interest rate.",a:"Future value of an annuity investment.",p:[{name:"rate",detail:"The interest rate."},{name:"number_of_periods",detail:"The number of payments to be made."},{name:"payment_amount",detail:"The amount per period to be paid."},{name:"present_value",detail:"The current value of the annuity."},{name:"end_or_beginning",detail:"Whether payments are due at the end (`0`) or beginning (`1`) of each period."}]},FVSCHEDULE:{d:"Calculates the future value of some principal based on a specified series of potentially varying interest rates.",a:"Future value of principal from series of rates.",p:[{name:"principal",detail:"The amount of initial capital or value to compound against."},{name:"rate_schedule",detail:"A series of interest rates to compound against the `principal`."}]},YIELD:{d:"Calculates the annual yield of a security paying periodic interest, such as a US Treasury Bond, based on price.",a:"Annual yield of a security paying periodic interest.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"rate",detail:"The annualized rate of interest."},{name:"price",detail:"The price at which the security is bought per 100 face value."},{name:"redemption",detail:"The redemption amount per 100 face value, or par."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},YIELDDISC:{d:"Calculates the annual yield of a discount (non-interest-bearing) security, based on price.",a:"Annual yield of a discount security.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"price",detail:"The price at which the security is bought per 100 face value."},{name:"redemption",detail:"The redemption amount per 100 face value, or par."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},NOMINAL:{d:"Calculates the annual nominal interest rate given the effective rate and number of compounding periods per year.",a:"Annual nominal interest rate.",p:[{name:"effective_rate",detail:"The effective interest rate per year."},{name:"periods_per_year",detail:"The number of compounding periods per year."}]},XIRR:{d:"Calculates the internal rate of return of an investment based on a specified series of potentially irregularly spaced cash flows.",a:"Internal rate of return given non-periodic cashflows.",p:[{name:"cashflow_amounts",detail:"An array or range containing the income or payments associated with the investment."},{name:"cashflow_dates",detail:"An array or range with dates corresponding to the cash flows in `cashflow_amounts`."},{name:"rate_guess",detail:"An estimate for what the internal rate of return will be."}]},MIRR:{d:"Calculates the modified internal rate of return on an investment based on a series of periodic cash flows and the difference between the interest rate paid on financing versus the return received on reinvested income.",a:"Modified internal rate of return.",p:[{name:"cashflow_amounts",detail:"An array or range containing the income or payments associated with the investment."},{name:"financing_rate",detail:"The interest rate paid on funds invested."},{name:"reinvestment_return_rate",detail:"The return (as a percentage) earned on reinvestment of income received from the investment."}]},IRR:{d:"Calculates the internal rate of return on an investment based on a series of periodic cash flows.",a:"Internal rate of return given periodic cashflows.",p:[{name:"cashflow_amounts",detail:"An array or range containing the income or payments associated with the investment."},{name:"rate_guess",detail:"An estimate for what the internal rate of return will be."}]},NPV:{d:"Calculates the net present value of an investment based on a series of periodic cash flows and a discount rate.",a:"The net present value of an investment based on a series of periodic cash flows and a discount rate.",p:[{name:"discount",detail:"The discount rate of the investment over one period."},{name:"cashflow1",detail:"The first future cash flow."},{name:"cashflow2",detail:"Additional future cash flows."}]},XNPV:{d:"Calculates the net present value of an investment based on a specified series of potentially irregularly spaced cash flows and a discount rate.",a:"Net present value given non-periodic cashflows.",p:[{name:"discount",detail:"The discount rate of the investment over one period."},{name:"cashflow_amounts",detail:"A range of cells containing the income or payments associated with the investment."},{name:"cashflow_dates",detail:"A range of cells with dates corresponding to the cash flows in `cashflow_amounts`."}]},CUMIPMT:{d:"Calculates the cumulative interest over a range of payment periods for an investment based on constant-amount periodic payments and a constant interest rate.",a:"Cumulative interest paid over a set of periods.",p:[{name:"rate",detail:"The interest rate."},{name:"number_of_periods",detail:"The number of payments to be made."},{name:"present_value",detail:"The current value of the annuity."},{name:"first_period",detail:"The number of the payment period to begin the cumulative calculation."},{name:"last_period",detail:"The number of the payment period to end the cumulative calculation."},{name:"end_or_beginning",detail:"Whether payments are due at the end (`0`) or beginning (`1`) of each period."}]},PMT:{d:"Calculates the periodic payment for an annuity investment based on constant-amount periodic payments and a constant interest rate.",a:"Periodic payment for an annuity investment.",p:[{name:"rate",detail:"The interest rate."},{name:"number_of_periods",detail:"The number of payments to be made."},{name:"present_value",detail:"The current value of the annuity."},{name:"future_value",detail:"The future value remaining after the final payment has been made."},{name:"end_or_beginning",detail:"Whether payments are due at the end (`0`) or beginning (`1`) of each period."}]},IPMT:{d:"Calculates the payment on interest for an investment based on constant-amount periodic payments and a constant interest rate.",a:"Payment on interest for an investment.",p:[{name:"rate",detail:"The interest rate."},{name:"period",detail:"The amortization period, in terms of number of periods."},{name:"number_of_periods",detail:"The number of payments to be made."},{name:"present_value",detail:"The current value of the annuity."},{name:"future_value",detail:"The future value remaining after the final payment has been made."},{name:"end_or_beginning",detail:"Whether payments are due at the end (`0`) or beginning (`1`) of each period."}]},PPMT:{d:"Calculates the payment on the principal of an investment based on constant-amount periodic payments and a constant interest rate.",a:"Payment on the principal of an investment.",p:[{name:"rate",detail:"The interest rate."},{name:"period",detail:"The amortization period, in terms of number of periods."},{name:"number_of_periods",detail:"The number of payments to be made."},{name:"present_value",detail:"The current value of the annuity."},{name:"future_value",detail:"The future value remaining after the final payment has been made."},{name:"end_or_beginning",detail:"Whether payments are due at the end (`0`) or beginning (`1`) of each period."}]},INTRATE:{d:"Calculates the effective interest rate generated when an investment is purchased at one price and sold at another with no interest or dividends generated by the investment itself.",a:"Calculates effective interest rate.",p:[{name:"buy_date",detail:"The date of purchase of the investment."},{name:"sell_date",detail:"The date of sale of the investment."},{name:"buy_price",detail:"The price at which the investment was purchased."},{name:"sell_price",detail:"The price at which the investment was sold."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},PRICE:{d:"Calculates the price of a security paying periodic interest, such as a US Treasury Bond, based on expected yield.",a:"Price of a security paying periodic interest.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"rate",detail:"The annualized rate of interest."},{name:"yield",detail:"The expected annual yield of the security."},{name:"redemption",detail:"The redemption amount per 100 face value, or par."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},PRICEDISC:{d:"Calculates the price of a discount (non-interest-bearing) security, based on expected yield.",a:"Price of a discount security.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"discount",detail:"The discount rate of the security at time of purchase."},{name:"redemption",detail:"The redemption amount per 100 face value, or par."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},PRICEMAT:{d:"Calculates the price of a security paying interest at maturity, based on expected yield.",a:"Price of security paying interest at maturity.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"issue",detail:"The date the security was initially issued."},{name:"rate",detail:"The annualized rate of interest."},{name:"yield",detail:"The expected annual yield of the security."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},RECEIVED:{d:"Calculates the amount received at maturity for an investment in fixed-income securities purchased on a given date.",a:"Amount received at maturity for a security.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"investment",detail:"The amount invested (irrespective of face value of each security)."},{name:"discount",detail:"The discount rate of the security invested in."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},DISC:{d:"Calculates the discount rate of a security based on price.",a:"The discount rate of a security based on price.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"price",detail:"The price at which the security is bought per 100 face value."},{name:"redemption",detail:"The redemption amount per 100 face value, or par."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},NPER:{d:"Calculates the number of payment periods for an investment based on constant-amount periodic payments and a constant interest rate.",a:"Number of payment periods for an investment.",p:[{name:"rate",detail:"The interest rate."},{name:"payment_amount",detail:"The amount of each payment made."},{name:"present_value",detail:"The current value of the annuity."},{name:"future_value",detail:"The future value remaining after the final payment has been made."},{name:"end_or_beginning",detail:"Whether payments are due at the end (`0`) or beginning (`1`) of each period."}]},SLN:{d:"Calculates the depreciation of an asset for one period using the straight-line method.",a:"Depreciation of asset using the straight-line method.",p:[{name:"cost",detail:"The initial cost of the asset."},{name:"salvage",detail:"The value of the asset at the end of depreciation."},{name:"life",detail:"The number of periods over which the asset is depreciated."}]},DURATION:{d:"Calculates the number of compounding periods required for an investment of a specified present value appreciating at a given rate to reach a target value.",a:"Number of periods for an investment to reach a value.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"rate",detail:"The annualized rate of interest."},{name:"yield",detail:"The expected annual yield of the security."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},MDURATION:{d:"Calculates the modified Macaulay duration of a security paying periodic interest, such as a US Treasury Bond, based on expected yield.",a:"Modified Macaulay duration.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"rate",detail:"The annualized rate of interest."},{name:"yield",detail:"The expected annual yield of the security."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},BIN2DEC:{d:"Converts a signed binary number to decimal format.",a:"Converts a signed binary number to decimal format.",p:[{name:"signed_binary_number",detail:"The signed 10-bit binary value to be converted to decimal, provided as a string."}]},BIN2HEX:{d:"Converts a signed binary number to signed hexadecimal format.",a:"Converts a binary number to hexadecimal.",p:[{name:"signed_binary_number",detail:"The signed 10-bit binary value to be converted to signed hexademical, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},BIN2OCT:{d:"Converts a signed binary number to signed octal format.",a:"Converts a binary number to octal.",p:[{name:"signed_binary_number",detail:"The signed 10-bit binary value to be converted to signed octal, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},DEC2BIN:{d:"Converts a decimal number to signed binary format.",a:"Converts a decimal number to signed binary format.",p:[{name:"decimal_number",detail:"The decimal value to be converted to signed binary, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},DEC2HEX:{d:"Converts a decimal number to signed hexadecimal format.",a:"Converts a decimal number to hexadecimal.",p:[{name:"decimal_number",detail:"The decimal value to be converted to signed hexadecimal, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},DEC2OCT:{d:"Converts a decimal number to signed octal format.",a:"Converts a decimal number to signed octal format.",p:[{name:"decimal_number",detail:"The decimal value to be converted to signed octal, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},HEX2BIN:{d:"Converts a signed hexadecimal number to signed binary format.",a:"Converts a hexadecimal number to binary.",p:[{name:"signed_hexadecimal_number",detail:"The signed 40-bit hexadecimal value to be converted to signed binary, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},HEX2DEC:{d:"Converts a signed hexadecimal number to decimal format.",a:"Converts a hexadecimal number to decimal.",p:[{name:"signed_hexadecimal_number",detail:"The signed 40-bit hexadecimal value to be converted to decimal, provided as a string."}]},HEX2OCT:{d:"Converts a signed hexadecimal number to signed octal format.",a:"Converts a hexadecimal number to octal.",p:[{name:"signed_hexadecimal_number",detail:"The signed 40-bit hexadecimal value to be converted to signed octal, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},OCT2BIN:{d:"Converts a signed octal number to signed binary format.",a:"Converts an octal number to binary.",p:[{name:"signed_octal_number",detail:"The signed 30-bit octal value to be converted to signed binary, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},OCT2DEC:{d:"Converts a signed octal number to decimal format.",a:"Converts a signed octal number to decimal format.",p:[{name:"signed_octal_number",detail:"The signed 30-bit octal value to be converted to decimal, provided as a string."}]},OCT2HEX:{d:"Converts a signed octal number to signed hexadecimal format.",a:"Converts an octal number to hexadecimal.",p:[{name:"signed_octal_number",detail:"The signed 30-bit octal value to be converted to signed hexadecimal, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},COMPLEX:{d:"Creates a complex number given real and imaginary coefficients.",a:"Creates a complex number.",p:[{name:"real_part",detail:"The real coefficient."},{name:"imaginary_part",detail:"The imaginary coefficient."},{name:"suffix",detail:"The suffix for the imaginary coefficient, can only be 'i' or 'j'. If omitted, 'i' will be used."}]},IMREAL:{d:"Returns the real coefficient of a complex number.",a:"The real coefficient of a complex number.",p:[{name:"complex_number",detail:"The complex number, in the a+bi or a+bj format."}]},IMAGINARY:{d:"Returns the imaginary coefficient of a complex number.",a:"The imaginary coefficient of a complex number.",p:[{name:"complex_number",detail:"The complex number, in the a+bi or a+bj format."}]},IMCONJUGATE:{d:"Returns the complex conjugate of a number.",a:"The complex conjugate of a number.",p:[{name:"number",detail:"The complex number to calculate the conjugate for."}]},IMABS:{d:"Returns absolute value (or modulus) of a complex number.",a:"The absolute value of a complex number.",p:[{name:"number",detail:"The complex number to calculate the absolute value of."}]},DELTA:{d:"Compare two numeric values, returning 1 if they're equal.",a:"Compare two numeric values.",p:[{name:"number1",detail:"The first number to compare."},{name:"number2",detail:"The second number to compare."}]},IMSUM:{d:"Returns the sum of a series of complex numbers.",a:"Sum of a series of complex numbers.",p:[{name:"value1",detail:"The first complex number or range to add together."},{name:"value2",detail:"Additional complex numbers or ranges to add to `value1`."}]},IMSUB:{d:"Returns the difference between two complex numbers.",a:"The difference between two complex numbers.",p:[{name:"first_number",detail:"The complex number to subtract second_number from."},{name:"second_number",detail:"The complex number to subtract from first_number."}]},IMPRODUCT:{d:"Returns the result of multiplying a series of complex numbers together.",a:"Result of multiplying a series of complex numbers together.",p:[{name:"factor1",detail:"The first number or range to calculate for the product."},{name:"factor2",detail:"Additional complex numbers or ranges to calculate for the product."}]},IMDIV:{d:"Returns one complex number divided by another.",a:"One complex number divided by another.",p:[{name:"dividend",detail:"The complex number to be divided."},{name:"divisor",detail:"The complex number to divide by."}]},NOT:{d:"Returns the opposite of a logical value - `NOT(TRUE)` returns `FALSE`; `NOT(FALSE)` returns `TRUE`.",a:"Returns opposite of provided logical value.",p:[{name:"logical_expression",detail:"An expression or reference to a cell holding an expression that represents some logical value."}]},TRUE:{d:"Returns the logical value `TRUE`.",a:"Logical value `true`.",p:[]},FALSE:{d:"Returns the logical value `FALSE`.",a:"Logical value `false`.",p:[]},AND:{d:"Returns true if all of the provided arguments are logically true, and false if any of the provided arguments are logically false.",a:"Logical `and` operator.",p:[{name:"logical_expression1",detail:"An expression or reference to a cell containing an expression that represents some logical value, i.e. `TRUE` or `FALSE`, or an expression that can be coerced to a logical value."},{name:"logical_expression2",detail:"More expressions that represent logical values."}]},IFERROR:{d:"Returns the first argument if it is not an error value, otherwise returns the second argument if present, or a blank if the second argument is absent.",a:"Value if it is not an error, otherwise 2nd argument.",p:[{name:"value",detail:"The value to return if `value` itself is not an error."},{name:"value_if_error",detail:"The value the function returns if `value` is an error."}]},IF:{d:"Returns one value if a logical expression is `TRUE` and another if it is `FALSE`.",a:"Returns value depending on logical expression.",p:[{name:"logical_expression",detail:"An expression or reference to a cell containing an expression that represents some logical value, i.e. `TRUE` or `FALSE`."},{name:"value_if_true",detail:"The value the function returns if `logical_expression` is `TRUE`."},{name:"value_if_false",detail:"The value the function returns if `logical_expression` is `FALSE`."}]},OR:{d:"Returns true if any of the provided arguments are logically true, and false if all of the provided arguments are logically false.",a:"Logical `or` operator.",p:[{name:"logical_expression1",detail:"An expression or reference to a cell containing an expression that represents some logical value, i.e. `TRUE` or `FALSE`, or an expression that can be coerced to a logical value."},{name:"logical_expression2",detail:"More expressions that evaluate to logical values."}]},NE:{d:"Returns `TRUE` if two specified values are not equal and `FALSE` otherwise. Equivalent to the `!=` operator.",a:"Not equal.",p:[{name:"value1",detail:"The first value."},{name:"value2",detail:"The value to test against `value1` for inequality."}]},EQ:{d:"Returns `TRUE` if two specified values are equal and `FALSE` otherwise. Equivalent to the `==` operator.",a:"Equal.",p:[{name:"value1",detail:"The first value."},{name:"value2",detail:"The value to test against `value1` for equality."}]},GT:{d:"Returns `TRUE` if the first argument is strictly greater than the second, and `FALSE` otherwise. Equivalent to the `>` operator.",a:"Strictly greater than.",p:[{name:"value1",detail:"The value to test as being greater than `value2`."},{name:"value2",detail:"The second value."}]},GTE:{d:"Returns `TRUE` if the first argument is greater than or equal to the second, and `FALSE` otherwise. Equivalent to the `>=` operator.",a:"Greater than or equal to.",p:[{name:"value1",detail:"The value to test as being greater than or equal to `value2`."},{name:"value2",detail:"The second value."}]},LT:{d:"Returns `TRUE` if the first argument is strictly less than the second, and `FALSE` otherwise. Equivalent to the `<` operator.",a:"Less than.",p:[{name:"value1",detail:"The value to test as being less than `value2`."},{name:"value2",detail:"The second value."}]},LTE:{d:"Returns `TRUE` if the first argument is less than or equal to the second, and `FALSE` otherwise. Equivalent to the `<=` operator.",a:"Less than or equal to.",p:[{name:"value1",detail:"The value to test as being less than or equal to `value2`."},{name:"value2",detail:"The second value."}]},ADD:{d:"Returns the sum of two numbers. Equivalent to the `+` operator.",a:"Sum of two numbers",p:[{name:"value1",detail:"The first addend."},{name:"value2",detail:"The second addend."}]},MINUS:{d:"Returns the difference of two numbers. Equivalent to the `-` operator.",a:"Difference of two numbers",p:[{name:"value1",detail:"The minuend, or number to be subtracted from."},{name:"value2",detail:"The subtrahend, or number to subtract from `value1`."}]},MULTIPLY:{d:"Returns the product of two numbers. Equivalent to the `*` operator.",a:"Product of two numbers",p:[{name:"factor1",detail:"The first multiplicand."},{name:"factor2",detail:"The second multiplicand."}]},DIVIDE:{d:"Returns one number divided by another. Equivalent to the `/` operator.",a:"One number divided by another",p:[{name:"dividend",detail:"The number to be divided."},{name:"divisor",detail:"The number to divide by."}]},CONCAT:{d:"Returns the concatenation of two values. Equivalent to the `&` operator.",a:"Concatenation of two values",p:[{name:"value1",detail:"The value to which `value2` will be appended."},{name:"value2",detail:"The value to append to `value1`."}]},UNARY_PERCENT:{d:"Returns a value interpreted as a percentage; that is, `UNARY_PERCENT(100)` equals `1`.",a:"Value interpreted as a percentage.",p:[{name:"percentage",detail:"The value to interpret as a percentage."}]},CONCATENATE:{d:"Appends strings to one another.",a:"Appends strings to one another.",p:[{name:"string1",detail:"The initial string."},{name:"string2",detail:"More strings to append in sequence."}]},CODE:{d:"Returns the numeric Unicode map value of the first character in the string provided.",a:"Numeric unicode map value of character.",p:[{name:"string",detail:"The string whose first character's Unicode map value will be returned."}]},CHAR:{d:"Convert a number into a character according to the current Unicode table.",a:"Gets character associated with number.",p:[{name:"table_number",detail:"The number of the character to look up from the current Unicode table in decimal format."}]},ARABIC:{d:"Computes the value of a Roman numeral.",a:"Computes the value of a roman numeral.",p:[{name:"roman_numeral",detail:"The Roman numeral to format, whose value must be between 1 and 3999, inclusive."}]},ROMAN:{d:"Formats a number in Roman numerals.",a:"Formats a number in Roman numerals.",p:[{name:"number",detail:"The number to format, between 1 and 3999, inclusive."}]},REGEXEXTRACT:{d:"Extracts matching substrings according to a regular expression.",a:"Extracts matching substrings with regular expression.",p:[{name:"text",detail:"The input text."},{name:"regular_expression",detail:"The first part of `text` that matches this expression will be returned."}]},REGEXMATCH:{d:"Whether a piece of text matches a regular expression.",a:"Whether a piece of text matches regular expression.",p:[{name:"text",detail:"The text to be tested against the regular expression."},{name:"regular_expression",detail:"The regular expression to test the text against."}]},REGEXREPLACE:{d:"Replaces part of a text string with a different text string using regular expressions.",a:"Replaces text with regular expressions.",p:[{name:"text",detail:"The text, a part of which will be replaced."},{name:"regular_expression",detail:"The regular expression. All matching instances in `text` will be replaced."},{name:"replacement",detail:"The text which will be inserted into the original text."}]},T:{d:"Returns string arguments as text, or the empty string if the value is not text.",a:"String arguments as text.",p:[{name:"value",detail:"The argument to be converted to text."}]},FIXED:{d:"Formats a number with a fixed number of decimal places.",a:"Formats number with fixed number of decimal places.",p:[{name:"number",detail:"The number to format."},{name:"number_of_places",detail:"The number of decimal places to display in the result."},{name:"suppress_separator",detail:"Whether or not to suppress the thousands separator used in some locales (e.g. `1,000` becomes `1000`). Separators will be present if this value is 0 or omitted, and absent otherwise."}]},FIND:{d:"Returns the position at which a string is first found within text where the capitalization of letters matters. Returns `#VALUE!` if the string is not found.",a:"First position of string found in text, case-sensitive.",p:[{name:"search_for",detail:"The string to look for within `text_to_search`."},{name:"text_to_search",detail:"The text to search for the first occurrence of `search_for`."},{name:"starting_at",detail:"The character within `text_to_search` at which to start the search."}]},FINDB:{d:"Returns the position at which a string is first found within text counting each double-character as 2.",a:"Position at which a string is first found within text (binary).",p:[{name:"search_for",detail:"The string to look for within `text_to_search`."},{name:"text_to_search",detail:"The text to search for the first occurrence of `search_for`."},{name:"starting_at",detail:"The character within `text_to_search` at which to start the search."}]},JOIN:{d:"Concatenates the elements of one or more one-dimensional arrays using a specified delimiter.",a:"Concatenates elements of arrays with delimiter.",p:[{name:"delimiter",detail:"The character or string to place between each concatenated value."},{name:"value_or_array1",detail:"The value or values to be appended using `delimiter`."},{name:"value_or_array2",detail:"More values to be appended using `delimiter`."}]},LEFT:{d:"Returns a substring from the beginning of a specified string.",a:"Substring from beginning of specified string.",p:[{name:"string",detail:"The string from which the left portion will be returned."},{name:"number_of_characters",detail:"The number of characters to return from the left side of `string`."}]},RIGHT:{d:"Returns a substring from the end of a specified string.",a:"A substring from the end of a specified string.",p:[{name:"string",detail:"The string from which the right portion will be returned."},{name:"number_of_characters",detail:"The number of characters to return from the right side of `string`."}]},MID:{d:"Returns a segment of a string.",a:"A segment of a string.",p:[{name:"string",detail:"The string to extract a segment from."},{name:"starting_at",detail:"The index from the left of `string` from which to begin extracting. The first character in `string` has the index 1."},{name:"extract_length",detail:"The length of the segment to extract."}]},LEN:{d:"Returns the length of a string.",a:"Length of a string.",p:[{name:"text",detail:"The string whose length will be returned."}]},LENB:{d:"Returns the length of a string in bytes.",a:"Length of a string in bytes.",p:[{name:"text",detail:"The string whose length will be returned."}]},LOWER:{d:"Converts a specified string to lowercase.",a:"Converts a specified string to lowercase.",p:[{name:"text",detail:"The string to convert to lowercase."}]},UPPER:{d:"Converts a specified string to uppercase.",a:"Converts a specified string to uppercase.",p:[{name:"text",detail:"The string to convert to uppercase."}]},EXACT:{d:"Tests whether two strings are identical.",a:"Tests whether two strings are identical.",p:[{name:"string1",detail:"The first string to compare"},{name:"string2",detail:"The second string to compare"}]},REPLACE:{d:"Replaces part of a text string with a different text string.",a:"Replaces part of a text string with different text.",p:[{name:"text",detail:"The text, a part of which will be replaced."},{name:"position",detail:"The position where the replacement will begin (starting from 1)."},{name:"length",detail:"The number of characters in the text to be replaced."},{name:"new_text",detail:"The text which will be inserted into the original text."}]},REPT:{d:"Returns specified text repeated a number of times.",a:"Specified text repeated a number of times.",p:[{name:"text_to_repeat",detail:"The character or string to repeat."},{name:"number_of_repetitions",detail:"The number of times `text_to_repeat` should appear in the value returned."}]},SEARCH:{d:"Returns the position at which a string is first found within text and ignores capitalization of letters. Returns `#VALUE!` if the string is not found.",a:"First position of string found in text, ignoring case.",p:[{name:"search_for",detail:"The string to look for within `text_to_search`."},{name:"text_to_search",detail:"The text to search for the first occurrence of `search_for`."},{name:"starting_at",detail:"The character within `text_to_search` at which to start the search."}]},SUBSTITUTE:{d:"Replaces existing text with new text in a string.",a:"Replaces existing text with new text in a string.",p:[{name:"text_to_search",detail:"The text within which to search and replace."},{name:"search_for",detail:"The string to search for within `text_to_search`."},{name:"replace_with",detail:"The string that will replace `search_for`."},{name:"occurrence_number",detail:"The instance of `search_for` within `text_to_search` to replace with `replace_with`. By default, all occurrences of `search_for` are replaced; however, if `occurrence_number` is specified, only the indicated instance of `search_for` is replaced."}]},CLEAN:{d:"Returns the text with the non-printable ASCII characters removed.",a:"Removes non-printable characters from a piece of text.",p:[{name:"text",detail:"The text whose non-printable characters are to be removed."}]},TEXT:{d:"Converts a number into text according to a specified format.",a:"Formats a number into text.",p:[{name:"number",detail:"The number, date, or time to format."},{name:"format",detail:"The pattern by which to format the number, enclosed in quotation marks."}]},TRIM:{d:"Removes leading, trailing, and repeated spaces in text.",a:"Removes space characters.",p:[{name:"text",detail:"The text or reference to a cell containing text to be trimmed."}]},VALUE:{d:"Converts a string in any of the date, time or number formats that Google Sheets understands into a number.",a:"Converts a date/time/number string into a number.",p:[{name:"text",detail:"The string containing the value to be converted."}]},PROPER:{d:"Capitalizes each word in a specified string.",a:"Capitalizes each word in a specified string.",p:[{name:"text_to_capitalize",detail:"The text which will be returned with the first letter of each word in uppercase and all other letters in lowercase."}]},CONVERT:{d:"Converts a numeric value to a different unit of measure.",a:"Unit conversion for numbers.",p:[{name:"value",detail:"The numeric value in `start_unit` to convert to `end_unit`."},{name:"start_unit",detail:"The starting unit, the unit currently assigned to `value`."},{name:"end_unit",detail:"The unit of measure into which to convert the argument, `value`."}]},SUMX2MY2:{d:"Calculates the sum of the differences of the squares of values in two arrays.",a:"Sum of the differences of squares.",p:[{name:"array_x",detail:"The array or range of values whose squares will be reduced by the squares of corresponding entries in `array_y` and added together."},{name:"array_y",detail:"The array or range of values whose squares will be subtracted from the squares of corresponding entries in `array_x` and added together."}]},SUMX2PY2:{d:"Calculates the sum of the sums of the squares of values in two arrays.",a:"Sum of the sums of squares.",p:[{name:"array_x",detail:"The array or range of values whose squares will be added to the squares of corresponding entries in `array_y` and added together."},{name:"array_y",detail:"The array or range of values whose squares will be added to the squares of corresponding entries in `array_x` and added together."}]},SUMXMY2:{d:"Calculates the sum of the squares of differences of values in two arrays.",a:"Sum of the squares of differences.",p:[{name:"array_x",detail:"The array or range of values that will be reduced by corresponding entries in `array_y`, squared, and added together."},{name:"array_y",detail:"The array or range of values that will be subtracted from corresponding entries in `array_x`, the result squared, and all such results added together."}]},TRANSPOSE:{d:"Transposes the rows and columns of an array or range of cells.",a:"Transposes the rows and columns of an array.",p:[{name:"array_or_range",detail:"The array or range whose rows and columns will be swapped."}]},TREND:{d:"Given partial data about a linear trend, fits an ideal linear trend using the least squares method and/or predicts further values.",a:"Fits points to linear trend derived via least-squares.",p:[{name:"known_data_y",detail:"The array or range containing dependent (y) values that are already known, used to curve fit an ideal linear trend."},{name:"known_data_x",detail:"The values of the independent variable(s) corresponding with `known_data_y`."},{name:"new_data_x",detail:"The data points to return the `y` values for on the ideal curve fit."},{name:"b",detail:"Given a general linear form of `y = m*x+b` for a curve fit, calculates `b` if `TRUE` or forces `b` to be `0` and only calculates the `m` values if `FALSE`, i.e. forces the curve fit to pass through the origin."}]},FREQUENCY:{d:"Calculates the frequency distribution of a one-column array into specified classes.",a:"The frequency distribution of array.",p:[{name:"data",detail:"The array or range containing the values to be counted."},{name:"classes",detail:"The array or range containing the set of classes."}]},GROWTH:{d:"Given partial data about an exponential growth trend, fits an ideal exponential growth trend and/or predicts further values.",a:"Fits points to exponential growth trend.",p:[{name:"known_data_y",detail:"The array or range containing dependent (y) values that are already known, used to curve fit an ideal exponential growth curve."},{name:"known_data_x",detail:"The values of the independent variable(s) corresponding with `known_data_y`."},{name:"new_data_x",detail:"The data points to return the `y` values for on the ideal curve fit."},{name:"b",detail:"Given a general exponential form of `y = b*m^x` for a curve fit, calculates `b` if `TRUE` or forces `b` to be `1` and only calculates the `m` values if `FALSE`."}]},LINEST:{d:"Given partial data about a linear trend, calculates various parameters about the ideal linear trend using the least-squares method.",a:"Best-fit linear trend via least-squares.",p:[{name:"known_data_y",detail:"The array or range containing dependent (y) values that are already known, used to curve fit an ideal linear trend."},{name:"known_data_x",detail:"The values of the independent variable(s) corresponding with `known_data_y`."},{name:"calculate_b",detail:"Given a linear form of `y = m*x+b`, calculates the y-intercept (`b`) if `TRUE`. Otherwise, forces `b` to be `0` and only calculates the `m` values if `FALSE`, i.e. forces the curve fit to pass through the origin."},{name:"verbose",detail:"A flag specifying whether to return additional regression statistics or only the linear coefficients and the y-intercept (default)."}]},LOGEST:{d:"Given partial data about an exponential growth curve, calculates various parameters about the best fit ideal exponential growth curve.",a:"Best-fit exponential growth curve.",p:[{name:"known_data_y",detail:"The array or range containing dependent (y) values that are already known, used to curve fit an ideal exponential growth curve."},{name:"known_data_x",detail:"The values of the independent variable(s) corresponding with `known_data_y`."},{name:"b",detail:"Given a general exponential form of `y = b*m^x` for a curve fit, calculates `b` if `TRUE` or forces `b` to be `1` and only calculates the `m` values if `FALSE`."},{name:"verbose",detail:"A flag specifying whether to return additional regression statistics or only the calculated coefficient and exponents."}]},MDETERM:{d:"Returns the matrix determinant of a square matrix specified as an array or range.",a:"Matrix determinant of a square matrix.",p:[{name:"square_matrix",detail:"An array or range with an equal number of rows and columns representing a matrix whose determinant will be calculated."}]},MINVERSE:{d:"Returns the multiplicative inverse of a square matrix specified as an array or range.",a:"Multiplicative inverse of square matrix.",p:[{name:"square_matrix",detail:"An array or range with an equal number of rows and columns representing a matrix whose multiplicative inverse will be calculated."}]},MMULT:{d:"Calculates the matrix product of two matrices specified as arrays or ranges.",a:"The matrix product of two matrices.",p:[{name:"matrix1",detail:"The first matrix in the matrix multiplication operation, represented as an array or range."},{name:"matrix2",detail:"The second matrix in the matrix multiplication operation, represented as an array or range."}]},SUMPRODUCT:{d:"Calculates the sum of the products of corresponding entries in two equal-sized arrays or ranges.",a:"Sum of products of elements in two arrays.",p:[{name:"array1",detail:"The first array or range whose entries will be multiplied with corresponding entries in the second such array or range."},{name:"array2",detail:"The second array or range whose entries will be multiplied with corresponding entries in the first such array or range."}]},ISFORMULA:{d:"Checks whether a value is a formula.",a:"Whether a value is a formula.",p:[{name:"cell",detail:"The cell to be verified as containing a formula."}]},CELL:{d:"Returns the requested information about the specified cell.",a:"Gets information about a cell.",p:[{name:"info_type",detail:"The type of information requested (see article for available types)"},{name:"reference",detail:"The reference to the cell."}]},NA:{d:'Returns the "value not available" error, `#N/A`.',a:"The `#N/A` error.",p:[]},ERROR_TYPE:{d:"Returns a number corresponding to the error value in a different cell.",a:"Error value of cell (as number).",p:[{name:"reference",detail:"The cell to find the error number for although you can also provide the error value directly."}]},ISBLANK:{d:"Checks whether the referenced cell is empty.",a:"Whether the referenced cell is empty.",p:[{name:"value",detail:"Reference to the cell that will be checked for emptiness."}]},ISERR:{d:"Checks whether a value is an error other than `#N/A`.",a:"Whether a value is an error other than `#n/a`.",p:[{name:"value",detail:"The value to be verified as an error type other than `#N/A`."}]},ISERROR:{d:"Checks whether a value is an error.",a:"Whether a value is an error.",p:[{name:"value",detail:"The value to be verified as an error type."}]},ISLOGICAL:{d:"Checks whether a value is `TRUE` or `FALSE`.",a:"Whether a value is `true` or `false`.",p:[{name:"value",detail:"The value to be verified as a logical `TRUE` or `FALSE`."}]},ISNA:{d:"Checks whether a value is the error `#N/A`.",a:"Whether a value is the error `#n/a`.",p:[{name:"value",detail:"The value to be compared with the error value `#N/A`."}]},ISNONTEXT:{d:"Checks whether a value is non-textual.",a:"Whether a value is non-textual.",p:[{name:"value",detail:"The value to be checked."}]},ISNUMBER:{d:"Checks whether a value is a number.",a:"Whether a value is a number.",p:[{name:"value",detail:"The value to be verified as a number."}]},ISREF:{d:"Checks whether a value is a valid cell reference.",a:"Whether a value is a valid cell reference.",p:[{name:"value",detail:"The value to be verified as a cell reference."}]},ISTEXT:{d:"Checks whether a value is text.",a:"Whether a value is text.",p:[{name:"value",detail:"The value to be verified as text."}]},TYPE:{d:"Returns a number associated with the type of data passed into the function.",a:"Get the type of a value.",p:[{name:"value",detail:"The value whose type is to be determined."}]},N:{d:"Returns the argument provided as a number. Text is converted to 0 and errors are returned as-is.",a:"Argument provided as a number.",p:[{name:"value",detail:"The argument to be converted to a number."}]},TO_DATE:{d:"Converts a provided number to a date.",a:"Converts a provided number to a date.",p:[{name:"value",detail:"The argument or reference to a cell to be converted to a date."}]},TO_PURE_NUMBER:{d:"Converts a provided date/time, percentage, currency or other formatted numeric value to a pure number without formatting.",a:"Converts any numeric value to a pure number.",p:[{name:"value",detail:"The argument or reference to a cell to be converted to a pure number."}]},TO_TEXT:{d:"Converts a provided numeric value to a text value.",a:"Converts a provided numeric value to a text value.",p:[{name:"value",detail:"The argument or reference to a cell to be converted to text."}]},TO_DOLLARS:{d:"Converts a provided number to a dollar value.",a:"Converts a provided number to a dollar value.",p:[{name:"value",detail:"The argument or reference to a cell to be converted to a dollar value."}]},TO_PERCENT:{d:"Converts a provided number to a percentage.",a:"Converts a provided number to a percentage.",p:[{name:"value",detail:"The argument or reference to a cell to be converted to a percentage."}]},DGET:{d:"Returns a single value from a database table-like array or range using a SQL-like query.",a:"Single value from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DMAX:{d:"Returns the maximum value selected from a database table-like array or range using a SQL-like query.",a:"Maximum of values from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DMIN:{d:"Returns the minimum value selected from a database table-like array or range using a SQL-like query.",a:"Minimum of values from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DAVERAGE:{d:"Returns the average of a set of values selected from a database table-like array or range using a SQL-like query.",a:"Average of a set of values from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DCOUNT:{d:"Counts numeric values selected from a database table-like array or range using a SQL-like query.",a:"Counts values from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DCOUNTA:{d:"Counts values, including text, selected from a database table-like array or range using a SQL-like query.",a:"Counts values and text from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DPRODUCT:{d:"Returns the product of values selected from a database table-like array or range using a SQL-like query.",a:"Product of values from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DSTDEV:{d:"Returns the standard deviation of a population sample selected from a database table-like array or range using a SQL-like query.",a:"Standard deviation of population sample from table.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DSTDEVP:{d:"Returns the standard deviation of an entire population selected from a database table-like array or range using a SQL-like query.",a:"Standard deviation of entire population from table.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DSUM:{d:"Returns the sum of values selected from a database table-like array or range using a SQL-like query.",a:"Sum of values from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DVAR:{d:"Returns the variance of a population sample selected from a database table-like array or range using a SQL-like query.",a:"Variance of population sample from table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DVARP:{d:"Returns the variance of an entire population selected from a database table-like array or range using a SQL-like query.",a:"Variance of a population from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},AGE_BY_IDCARD:{d:"Calculate the age based on the Chinese ID number. Support 15 or 18",a:"Get age based on ID number.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."},{name:"Deadline",detail:"The deadline or range of age calculation. The default is the current day."}]},SEX_BY_IDCARD:{d:"Calculate gender based on Chinese ID number. Support 15 or 18",a:"Get gender based on ID number.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."}]},BIRTHDAY_BY_IDCARD:{d:"Calculate the birthday based on the Chinese ID number. Support 15 or 18",a:"Get the birthday based on the ID number.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."},{name:"Birthday format",detail:"Date type, default:0:[1900/01/01], 1:[1900-01-01], 2:[1900\u5E741\u67081\u65E5]"}]},PROVINCE_BY_IDCARD:{d:"Calculate the province of birthplace based on the Chinese ID number. Support 15 or 18",a:"Get the province of birthplace based on the ID number.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."}]},CITY_BY_IDCARD:{d:"Calculate the city of birthplace based on the Chinese ID number. Support 15 or 18",a:"Get the city of birthplace based on the ID number.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."}]},STAR_BY_IDCARD:{d:"Calculate the constellation based on the Chinese ID number. Support 15 or 18",a:"Get the constellation based on the ID number.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."}]},ANIMAL_BY_IDCARD:{d:"Calculate the zodiac (rat, ox, tiger, rabbit...) based on the Chinese ID number. Support 15 or 18",a:"Get the zodiac according to the ID number.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."}]},ISIDCARD:{d:"Verify that the format of the ID card is correct. Support 15 or 18",a:"Verify the correctness of the ID card format.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."}]},DM_TEXT_CUTWORD:{d:"Text segmentation. Split a series of words into a series of individual words",a:"Chinese text segmentation.",p:[{name:"Text",detail:"Any text that needs word segmentation."},{name:"Word segmentation mode",detail:"The default is 0[precision mode], 1[full mode], 2[search engine mode]."}]},DM_TEXT_TFIDF:{d:"Use tf-idf algorithm for keyword extraction. Identify keywords from a series of text",a:"tf-idf keyword recognition.",p:[{name:"Text",detail:"Any text that needs word segmentation."},{name:"Number of keywords",detail:"The number of keywords returned by the algorithm, the default is 20"},{name:"Corpus",detail:"Select a corpus in a specific field, the default is 0[General], 1[Finance], 2[Medical]"}]},DM_TEXT_TEXTRANK:{d:"Use TextRank algorithm to extract keywords. Identify keywords from a series of text",a:"TextRank keyword recognition.",p:[{name:"Text",detail:"Any text that needs word segmentation."},{name:"Number of keywords",detail:"The number of keywords returned by the algorithm, the default is 20"},{name:"Corpus",detail:"Select a corpus in a specific field, the default is 0[General], 1[Finance], 2[Medical]"}]},DATA_CN_STOCK_CLOSE:{d:"According to the stock code and date, return the corresponding stock closing price of A shares.",a:"Returns the closing price of stock.",p:[{name:"Stock code",detail:"6-digit stock code, required."},{name:"Date",detail:"The trading day of the stock, the default is the latest trading day"},{name:"Reversion and exclusion",detail:"Select the ex right restoration type of the stock, default to 0 [former reversion], 1 [original price], 2 [post reversion]"}]},DATA_CN_STOCK_OPEN:{d:"According to the stock code and date, return the opening price of stock.",a:"Return the opening price of a shares.",p:[{name:"Stock code",detail:"6-digit stock code, required."},{name:"Date",detail:"The trading day of the stock, the default is the latest trading day"},{name:"Reversion and exclusion",detail:"Select the ex right restoration type of the stock, default to 0 [former reversion], 1 [original price], 2 [post reversion]"}]},DATA_CN_STOCK_MAX:{d:"According to the stock code and date, return the highest price of stock.",a:"Return the highest price of stock.",p:[{name:"Stock code",detail:"6-digit stock code, required."},{name:"Date",detail:"The trading day of the stock, the default is the latest trading day"},{name:"Reversion and exclusion",detail:"Select the ex right restoration type of the stock, default to 0 [former reversion], 1 [original price], 2 [post reversion]"}]},DATA_CN_STOCK_MIN:{d:"According to the stock code and date, return the lowest price of stock.",a:"Returns the lowest price of stock.",p:[{name:"Stock code",detail:"6-digit stock code, required."},{name:"Date",detail:"The trading day of the stock, the default is the latest trading day"},{name:"Reversion and exclusion",detail:"Select the ex right restoration type of the stock, default to 0 [former reversion], 1 [original price], 2 [post reversion]"}]},DATA_CN_STOCK_VOLUMN:{d:"According to the stock code and date, return the corresponding stock trading volume of A shares.",a:"Returns the corresponding stock trading volume of A shares.",p:[{name:"Stock code",detail:"6-digit stock code, required."},{name:"Date",detail:"The trading day of the stock, the default is the latest trading day"},{name:"Reversion and exclusion",detail:"Select the ex right restoration type of the stock, default to 0 [former reversion], 1 [original price], 2 [post reversion]"}]},DATA_CN_STOCK_AMOUNT:{d:"According to the stock code and date, return the corresponding stock turnover of A shares.",a:"Returns the corresponding stock turnover of A shares.",p:[{name:"Stock code",detail:"6-digit stock code, required."},{name:"Date",detail:"The trading day of the stock, the default is the latest trading day"},{name:"Reversion and exclusion",detail:"Select the ex right restoration type of the stock, default to 0 [former reversion], 1 [original price], 2 [post reversion]"}]},ISDATE:{d:"Returns whether a value is a date.",a:"Whether a value is a date.",p:[{name:"value",detail:"The value to be verified as a date."}]},LINESPLINES:{d:"Generate sparklines embedded in the cell to describe the continuous trend of data",a:"Generate sparklines line chart",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Line color",detail:"The line color of the line graph can be range A1, color table index value or specific color value. Set it to 0 or false to not display it. It supports regx, rgb, rgba, etc. Default #2ec7c9"},{name:"Line thickness",detail:"Line thickness of the line graph, the default is 1px"},{name:"Auxiliary line",detail:"A horizontal line, which can be min, max, avg, median, range or custom value, default 0 none"},{name:"Auxiliary line color",detail:"Color setting of auxiliary line, same as line color configuration, default #000"},{name:"Maximum mark",detail:"Identifies the maximum value of the line graph, the same line color configuration, default 0 does not display"},{name:"Minimum mark",detail:"Identify the minimum value of the line graph, the same line color configuration, default 0 does not display"},{name:"Mark size",detail:"The maximum and minimum mark size settings, the default is 1.5"}]},AREASPLINES:{d:"Generate sparklines embedded in the cell area chart, generally used to describe the continuous cumulative value trend of the data",a:"Generate sparklines area chart",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Line color",detail:"The line color of the line graph can be range A1, color table index value or specific color value. Set it to 0 or false to not display it. It supports regx, rgb, rgba, etc. Default #2ec7c9"},{name:"Fill color",detail:"Form an area chart, the same line color configuration, default 0 does not display"},{name:"Line thickness",detail:"Line thickness of the line graph, the default is 1px"},{name:"Auxiliary line",detail:"A horizontal line, which can be min, max, avg, median, range or custom value, default 0 none"},{name:"Auxiliary line color",detail:"Color setting of auxiliary line, same as line color configuration, default #000"}]},COLUMNSPLINES:{d:"Generate sparklines embedded in the vertical histogram of cells, generally used to describe the size of discrete data",a:"Generate sparklines vertical histogram",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Bar interval",detail:"The distance between bars, the default is 1"},{name:"Bar color",detail:"The line color of the line graph can be range A1, color table index value or specific color value. Set it to 0 or false to not display it. It supports regx, rgb, rgba, etc. Default #fc5c5c"},{name:"Negative bar color",detail:"Negative bar color setting, representing the color of negative value, same as the bar color configuration, default #97b552"},{name:"Max",detail:"The maximum value of the bar chart, used to standardize the length of the bar chart, the default is to automatically calculate false, auto, null"},{name:"Color palette",detail:"The color palette can set the color of each bar individually, multiple settings can be set, and two formats are supported: 1 color such as #000, which means that the color of the first bar is black; 2 value range: color, such as -2:# 000 indicates that the bar with a value of -2 is black, 0:5:#000 indicates that the bar with a value of 0-5 is black, and the default is empty"}]},STACKCOLUMNSPLINES:{d:"Generate sparklines, a cumulative vertical histogram embedded in a cell, generally used to describe the numerical size of multiple dimensions of discrete data",a:"Generate sparklines cumulative vertical histogram",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Stack by column",detail:"If you need to stack by row, set this item to false or 0, the default is 1"},{name:"Bar interval",detail:"The distance between bars, the default is 1"},{name:"Max",detail:"The maximum value of the cumulative bar, used to regulate the length of the bar, the default is to automatically calculate false, auto, null"},{name:"Color palette",detail:"The color palette can individually set the bar color of each dimension, which can be set to the range of A1:A10, etc. The default is #2ec7c9, #fc5c5c, #5ab1ef, #ffb980..."}]},BARSPLINES:{d:"Generate sparklines embedded in the cell, generally used to describe the size of discrete data",a:"Generate sparklines horizontal bar graph",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Bar interval",detail:"The distance between bars, the default is 1"},{name:"Bar color",detail:"The line color of the line graph can be range A1, color table index value or specific color value. Set it to 0 or false to not display it. It supports regx, rgb, rgba, etc. Default #fc5c5c"},{name:"Negative bar color",detail:"Negative bar color setting, representing the color of negative value, same as the bar color configuration, default #97b552"},{name:"Max",detail:"The maximum value of the bar chart, used to standardize the length of the bar chart, the default is to automatically calculate false, auto, null"},{name:"Color palette",detail:"The color palette can set the color of each bar individually, multiple settings can be set, and two formats are supported: 1 color such as #000, which means that the color of the first bar is black; 2 value range: color, such as -2:# 000 indicates that the bar with a value of -2 is black, 0:5:#000 indicates that the bar with a value of 0-5 is black, and the default is empty"}]},STACKBARSPLINES:{d:"Generate sparklines, a cumulative horizontal bar graph embedded in a cell, which is generally used to describe the numerical size of multiple dimensions of discrete data",a:"Generate sparklines cumulative horizontal bar graph",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Stack by column",detail:"If you need to stack by row, set this item to false or 0, the default is 1"},{name:"Bar interval",detail:"The distance between bars, the default is 1"},{name:"Max",detail:"The maximum value of the cumulative bar, used to regulate the length of the bar, the default is to automatically calculate false, auto, null"},{name:"Color palette",detail:"The color palette can individually set the bar color of each dimension, which can be set to the range of A1:A10, etc. The default is #2ec7c9, #fc5c5c, #5ab1ef, #ffb980..."}]},DISCRETESPLINES:{d:"Generate sparklines embedded in the cell, generally used to describe the trend of discrete data",a:"Generate sparklines discrete graph",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Segmentation threshold",detail:"Discrete graph column color distinction, for example: if the value is 0, blue is greater than 0, red is less than 0, and the default is 0"},{name:"Above threshold color",detail:"The line color of the line graph can be range A1, color table index value or specific color value. Set it to 0 or false to not display it. It supports regx, rgb, rgba, etc. Default #2ec7c9"},{name:"Below threshold color",detail:"The color setting of the bar below the threshold, the same as the color above the threshold, default #fc5c5c"}]},TRISTATESPLINES:{d:"Generate sparklines, a three-state graph embedded in the cell, which is generally used to describe the trend of three situations, such as winning, losing, or drawing.",a:"Generate sparklines three-state graph",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Bar interval",detail:"The distance between bars, the default is 1"},{name:"Bar color",detail:"The line color of the line graph can be range A1, color table index value or specific color value. Set it to 0 or false to not display it. It supports regx, rgb, rgba, etc. Default #fc5c5c"},{name:"Negative bar color",detail:"Negative bar color setting, representing the color of negative value, same as the bar color configuration, default #97b552"},{name:"Zero value bar color",detail:"Zero value bar color setting, representing 0 value color, the same color configuration of the bar, default #999"},{name:"Color palette",detail:"The color palette can set the color of each bar individually, multiple settings can be set, and two formats are supported: 1 color such as #000, which means that the color of the first bar is black; 2 value range: color, such as -2:# 000 indicates that the bar with a value of -2 is black, 0:5:#000 indicates that the bar with a value of 0-5 is black, and the default is empty"}]},PIESPLINES:{d:"Generate sparklines pie chart embedded in the cell, generally used to describe the proportion of data",a:"Generate sparklines pie chart",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Rotation angle",detail:"The rotation angle of the pie chart, the default is 0"},{name:"border",detail:"Pie chart border size, default is none 0"},{name:"Border color",detail:"The border color of the pie chart, the default is #000"},{name:"Color palette",detail:"The color of the slice can be set in the palette, which can be set to the range of A1:A10, etc. The default is #2ec7c9, #fc5c5c, #5ab1ef, #ffb980..."}]},BOXSPLINES:{d:"Generate sparklines embedded in the cell box plot, generally used to describe the statistical distribution of the data set",a:"Generate sparklines box plot",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Outlier ratio",detail:"The threshold range of outliers, if it is 0 or false, it will not be displayed, the default is 1.5 times"},{name:"Target value",detail:"The target value setting on the box plot, the default is false and does not display"},{name:"Point size",detail:"The radius of the target point and outlier is set, the default is 1.5"}]},BULLETSPLINES:{d:"Generate sparklines embedded in the cell, generally used to describe the task achievement rate",a:"Generating sparklines bullets",p:[{name:"Target",detail:"The numerical value can be calculated effectively for the achieved target value, such as A1, 100, etc."},{name:"achieved",detail:"Only when the value is completed can the value be calculated effectively, such as A1, 100, etc."},{name:"Contrast",detail:"Comparative values, such as excess, minimum, and bottom line for awards, can be effectively calculated, such as A1, 100, etc. You can set up to 9 comparison values"}]},COMPOSESPLINES:{d:"Support multiple types of pictures in the same cell, each parameter represents a sparklines diagram",a:"Combine sparklines graphs into one cell",p:[{name:"config",detail:"Sparklines chart settings, such as A1:A20, a completed pie chart, line chart settings, etc."}]},SORT:{d:"Sorts the rows of a given array or range by the values in one or more columns.",a:"Sorts rows of range by specified column.",p:[{name:"range",detail:"The data to be sorted."},{name:"sort_column",detail:"The index of the column in `range` or a range outside of `range` containing the values by which to sort."},{name:"is_ascending",detail:"`TRUE` or `FALSE` indicating whether to sort `sort_column` in ascending order. `FALSE` sorts in descending order."},{name:"sort_column2",detail:"Additional columns."}]},FILTER:{d:"Returns a filtered version of the source range, returning only rows or columns which meet the specified conditions.",a:"Filters a range based off provided conditions.",p:[{name:"range",detail:"The data to be filtered."},{name:"condition1",detail:"A column or row containing true or false values corresponding to the first column or row of `range`, or an array formula evaluating to true or false."},{name:"condition2",detail:"Additional rows or columns containing boolean values `TRUE` or `FALSE` indicating whether the corresponding row or column in `range` should pass through `FILTER`. Can also contain array formula expressions which evaluate to such rows or columns. All conditions must be of the same type (row or column). Mixing row conditions and column conditions is not permitted."}]},UNIQUE:{d:"Returns unique rows in the provided source range, discarding duplicates. Rows are returned in the order in which they first appear in the source range.",a:"Unique rows in the provided source range.",p:[{name:"range",detail:"The data to filter by unique entries."},{name:"by_col",detail:"[Option] - Logical value, indicating how to compare; by row = FALSE() or omitted; by column = TRUE()."},{name:"occurs_once",detail:"[Option] - Logical value, only one occurrence in the unique value is returned = TRUE(); including all unique values = FALSE() or omitted."}]},RANDARRAY:{d:"Returns a grid of random numbers between 0 inclusive and 1 exclusive. The grid size will match the provided rows and columns arguments. If neither rows nor columns are provided, then the grid will be size 1 x 1.",a:"Returns a grid of random numbers.",p:[{name:"rows",detail:"The number of rows to populate with a random number."},{name:"columns",detail:"The number of columns to populate with a random number."}]},SEQUENCE:{d:"Returns a grid of sequential numbers starting at a specified start value and increasing by a specified step size. By default, the sequence starts at and increases by 1.",a:"Returns a grid of sequential numbers.",p:[{name:"rows",detail:"The number of rows in the function's resulting grid."},{name:"columns",detail:"The number of columns in the function's resulting grid. If omitted, the result grid will have 1 column."},{name:"start",detail:"The number, at which to start the sequence. If omitted, the sequence will start at 1."},{name:"step",detail:"The amount each value in the sequence will differ by. If omitted, each value will differ by 1."}]},EVALUATE:{d:"Evaluate a formula or expression expressed in words and return the result",a:"Evaluate according to literal formula or expression.",p:[{name:"expression",detail:"Formula or expression"}]},REMOTE:{d:"Calls a function on a remote server",a:"Calls a function on a remote back end server/API.",p:[{name:"remote_expression",detail:"Formula"}]}},toolbar:{undo:"Undo",redo:"Redo",paintFormat:"Paint format",currencyFormat:"Format as currency",percentageFormat:"Format as percent",numberDecrease:"Decrease decimal places",numberIncrease:"Increase decimal places",moreFormats:"More formats",font:"Font",fontSize:"Font size",bold:"Bold (Ctrl+B)",italic:"Italic (Ctrl+I)",strikethrough:"Strikethrough (Alt+Shift+5)",underline:"Underline",textColor:"Text color",chooseColor:"choose color",resetColor:"Reset",customColor:"CUSTOM",alternatingColors:"Alternating colors",confirmColor:"OK",cancelColor:"Cancel",collapse:"Collapse",fillColor:"Fill color",border:"Border",borderStyle:"Border style",mergeCell:"Merge cells",chooseMergeType:"Choose merge type",horizontalAlign:"Horizontal align",verticalAlign:"Vertical align",alignment:"Alignment",textWrap:"Text wrap",textWrapMode:"Text wrap mode",textRotate:"Text rotate",textRotateMode:"Text rotate mode",freezeTopRow:"Freeze first row",sortAndFilter:"Sort and filter",findAndReplace:"Find and replace",sum:"SUM",autoSum:"Auto SUM",moreFunction:"More functions",conditionalFormat:"Conditional format",postil:"Comment",pivotTable:"Pivot Table",chart:"Chart",screenshot:"Screenshot",splitColumn:"Split text",insertImage:"Insert image",insertLink:"Insert link",dataVerification:"Data verification",protection:"Protect the sheet",clearText:"Clear color",noColorSelectedText:"No color is selected",toolMore:"More",toolLess:"Less",toolClose:"Close",toolMoreTip:"More features",moreOptions:"More options",cellFormat:"Cell format config",print:"Print"},alternatingColors:{applyRange:"Apply to range",selectRange:"Select a data range",header:"Header",footer:"Footer",errorInfo:"Cannot perform this operation on multiple selection areas, please select a single area and try again",textTitle:"Format style",custom:"CUSTOM",close:"close",selectionTextColor:"Click to select text color",selectionCellColor:"Click to select cell color",removeColor:"Remove alternating colors",colorShow:"color",currentColor:"Current",tipSelectRange:"Please select the range of alternating colors",errorNoRange:"No range is selected",errorExistColors:"Alternating colors already exist and cannot be edited"},button:{confirm:"OK",cancel:"Cancel",close:"Close",update:"Update",delete:"Delete",insert:"Insert",prevPage:"Previous",nextPage:"Next",total:"total:"},paint:{start:"Paint format start",end:"ESC",tipSelectRange:"Please select the range to be copied",tipNotMulti:"Cannot perform this operation on multiple selection ranges"},format:{moreCurrency:"More currency formats",moreDateTime:"More date and time formats",moreNumber:"More number formats",titleCurrency:"Currency formats",decimalPlaces:"Decimal places",titleDateTime:"Date and time formats",titleNumber:"Number formats"},info:{detailUpdate:"New opened",detailSave:"Local cache restored",row:"",column:"",loading:"Loading...",copy:"Copy",return:"Exit",rename:"Rename",tips:"WorkBook rename",noName:"Untitled spreadsheet",wait:"waiting for update",add:"Add",addLast:"more rows at bottom",backTop:"Back to the top",pageInfo:"Total ${total}\uFF0C${totalPage} page\uFF0Ccurrent ${currentPage}",nextPage:"Next",tipInputNumber:"Please enter the number",tipInputNumberLimit:"The increase range is limited to 1-100",tipRowHeightLimit:"Row height must be between 0 ~ 545",tipColumnWidthLimit:"The column width must be between 0 ~ 2038",pageInfoFull:"Total ${total}\uFF0C${totalPage} page\uFF0CAll data displayed"},currencyDetail:{RMB:"RMB",USdollar:"US dollar",EUR:"EUR",GBP:"GBP",HK:"HK",JPY:"JPY",AlbanianLek:"Albanian Lek",AlgerianDinar:"Algerian Dinar",Afghani:"Afghani",ArgentinePeso:"Argentine Peso",UnitedArabEmiratesDirham:"United Arab Emirates Dirham",ArubanFlorin:"Aruban Florin",OmaniRial:"Omani Rial",Azerbaijanimanat:"Azerbaijani manat",EgyptianPound:"Egyptian Pound",EthiopianBirr:"Ethiopian Birr",AngolaKwanza:"Angola Kwanza",AustralianDollar:"Australian Dollar",Patacas:"Patacas",BarbadosDollar:"Barbados Dollar",PapuaNewGuineaKina:"Papua New Guinea Kina",BahamianDollar:"Bahamian Dollar",PakistanRupee:"Pakistan Rupee",ParaguayanGuarani:"Paraguayan Guarani",BahrainiDinar:"Bahraini Dinar",PanamanianBalboa:"Panamanian Balboa",Brazilianreal:"Brazilian real",Belarusianruble:"Belarusian ruble",BermudianDollar:"Bermudian Dollar",BulgarianLev:"Bulgarian Lev",IcelandKrona:"Iceland Krona",BosniaHerzegovinaConvertibleMark:"Bosnia-Herzegovina Convertible Mark",PolishZloty:"Polish Zloty",Boliviano:"Boliviano",BelizeDollar:"Belize Dollar",BotswanaPula:"Botswana Pula",NotDannuzhamu:"Not Dannuzhamu",BurundiFranc:"Burundi Franc",NorthKoreanWon:"North Korean Won",DanishKrone:"Danish Krone",EastCaribbeanDollar:"East Caribbean Dollar",DominicaPeso:"Dominica Peso",RussianRuble:"Russian Ruble",EritreanNakfa:"Eritrean Nakfa",CFAfranc:"CFA franc",PhilippinePeso:"Philippine Peso",FijiDollar:"Fiji Dollar",CapeVerdeEscudo:"Cape Verde Escudo",FalklandIslandsPound:"Falkland Islands Pound",GambianDalasi:"Gambian Dalasi",Congolesefranc:"Congolese franc",ColombianPeso:"Colombian Peso",CostaRicanColon:"Costa Rican Colon",CubanPeso:"Cuban Peso",Cubanconvertiblepeso:"Cuban convertible peso",GuyanaDollar:"Guyana Dollar",KazakhstanTenge:"Kazakhstan Tenge",Haitiangourde:"Haitian gourde",won:"won",NetherlandsAntillesGuilder:"Netherlands Antilles Guilder",Honduraslempiras:"Honduras lempiras",DjiboutiFranc:"Djibouti Franc",KyrgyzstanSom:"Kyrgyzstan Som",GuineaFranc:"Guinea Franc",CanadianDollar:"Canadian Dollar",GhanaianCedi:"Ghanaian Cedi",Cambodianriel:"Cambodian riel",CzechKoruna:"Czech Koruna",ZimbabweDollar:"Zimbabwe Dollar",QatariRiyal:"Qatari Riyal",CaymanIslandsDollar:"Cayman Islands Dollar",Comorianfranc:"Comorian franc",KuwaitiDinar:"Kuwaiti Dinar",CroatianKuna:"Croatian Kuna",KenyanShilling:"Kenyan Shilling",LesothoLoti:"Lesotho Loti",LaoKip:"Lao Kip",LebanesePound:"Lebanese Pound",Lithuanianlitas:"Lithuanian litas",LibyanDinar:"Libyan Dinar",LiberianDollar:"Liberian Dollar",RwandaFranc:"Rwanda Franc",RomanianLeu:"Romanian Leu",MalagasyAriary:"Malagasy Ariary",MaldivianRufiyaa:"Maldivian Rufiyaa",MalawiKwacha:"Malawi Kwacha",MalaysianRinggit:"Malaysian Ringgit",MacedoniawearingDinar:"Macedonia wearing Dinar",MauritiusRupee:"Mauritius Rupee",MauritanianOuguiya:"Mauritanian Ouguiya",MongolianTugrik:"Mongolian Tugrik",BangladeshiTaka:"Bangladeshi Taka",PeruvianNuevoSol:"Peruvian Nuevo Sol",MyanmarKyat:"Myanmar Kyat",MoldovanLeu:"Moldovan Leu",MoroccanDirham:"Moroccan Dirham",MozambiqueMetical:"Mozambique Metical",MexicanPeso:"Mexican Peso",NamibianDollar:"Namibian Dollar",SouthAfricanRand:"South African Rand",SouthSudanesePound:"South Sudanese Pound",NicaraguaCordoba:"Nicaragua Cordoba",NepaleseRupee:"Nepalese Rupee",NigerianNaira:"Nigerian Naira",NorwegianKrone:"Norwegian Krone",GeorgianLari:"Georgian Lari",RMBOffshore:"RMB (Offshore)",SwedishKrona:"Swedish Krona",SwissFranc:"Swiss Franc",SerbianDinar:"Serbian Dinar",SierraLeone:"Sierra Leone",SeychellesRupee:"Seychelles Rupee",SaudiRiyal:"Saudi Riyal",SaoTomeDobra:"Sao Tome Dobra",SaintHelenapound:"Saint Helena pound",SriLankaRupee:"Sri Lanka Rupee",SwazilandLilangeni:"Swaziland Lilangeni",SudanesePound:"Sudanese Pound",Surinamesedollar:"Surinamese dollar",SolomonIslandsDollar:"Solomon Islands Dollar",SomaliShilling:"Somali Shilling",TajikistanSomoni:"Tajikistan Somoni",PacificFranc:"Pacific Franc",ThaiBaht:"Thai Baht",TanzanianShilling:"Tanzanian Shilling",TonganPaanga:"Tongan Pa'anga",TrinidadandTobagoDollar:"Trinidad and Tobago Dollar",TunisianDinar:"Tunisian Dinar",TurkishLira:"Turkish Lira",VanuatuVatu:"Vanuatu Vatu",GuatemalanQuetzal:"Guatemalan Quetzal",CommissionBolivar:"Commission Bolivar",BruneiDollar:"Brunei Dollar",UgandanShilling:"Ugandan Shilling",UkrainianHryvnia:"Ukrainian Hryvnia",UruguayanPeso:"Uruguayan Peso",Uzbekistansom:"Uzbekistan som",WesternSamoaTala:"Western Samoa Tala",SingaporeDollar:"Singapore Dollar",NT:"NT",NewZealandDollar:"New Zealand Dollar",HungarianForint:"Hungarian Forint",SyrianPound:"Syrian Pound",JamaicanDollar:"Jamaican Dollar",ArmenianDram:"Armenian Dram",YemeniRial:"Yemeni Rial",IraqiDinar:"Iraqi Dinar",IranianRial:"Iranian Rial",NewIsraeliShekel:"New Israeli Shekel",IndianRupee:"Indian Rupee",IndonesianRupiah:"Indonesian Rupiah",JordanianDinar:"Jordanian Dinar",VND:"VND",ZambianKwacha:"Zambian Kwacha",GibraltarPound:"Gibraltar Pound",ChileanPeso:"Chilean Peso",CFAFrancBEAC:"CFA Franc BEAC"},defaultFmt:[{text:"Automatic",value:"General",example:""},{text:"Plain text",value:"@",example:""},{text:"",value:"split",example:""},{text:"Number",value:"##0.00",example:"1000.12"},{text:"Percent",value:"#0.00%",example:"12.21%"},{text:"Scientific",value:"0.00E+00",example:"1.01E+5"},{text:"",value:"split",example:""},{text:"Accounting",value:"\xA5(0.00)",example:"\xA5(1200.09)"},{text:"Currency",value:"\xA50.00",example:"\xA51200.09"},{text:"",value:"split",example:""},{text:"Date",value:"yyyy-MM-dd",example:"2017-11-29"},{text:"Time",value:"hh:mm AM/PM",example:"3:00 PM"},{text:"Time 24H",value:"hh:mm",example:"15:00"},{text:"Date time",value:"yyyy-MM-dd hh:mm AM/PM",example:"2017-11-29 3:00 PM"},{text:"Date time 24 H",value:"yyyy-MM-dd hh:mm",example:"2017-11-29 15:00"},{text:"",value:"split",example:""},{text:"Custom formats",value:"fmtOtherSelf",example:"more"}],dateFmtList:[{name:"1930-08-05",value:"yyyy-MM-dd"},{name:"1930/8/5",value:"yyyy/MM/dd"},{name:"08-05",value:"MM-dd"},{name:"8-5",value:"M-d"},{name:"13:30:30",value:"h:mm:ss"},{name:"13:30",value:"h:mm"},{name:"PM 01:30",value:"AM/PM hh:mm"},{name:"PM 1:30",value:"AM/PM h:mm"},{name:"PM 1:30:30",value:"AM/PM h:mm:ss"},{name:"08-05 PM 01:30",value:"MM-dd AM/PM hh:mm"}],fontFamily:{MicrosoftYaHei:"YaHei"},fontarray:["Times New Roman","Arial","Tahoma","Verdana"],fontjson:{"times new roman":0,arial:1,tahoma:2,verdana:3},border:{borderTop:"borderTop",borderBottom:"borderBottom",borderLeft:"borderLeft",borderRight:"borderRight",borderNone:"borderNone",borderAll:"borderAll",borderOutside:"borderOutside",borderInside:"borderInside",borderHorizontal:"borderHorizontal",borderVertical:"borderVertical",borderColor:"borderColor",borderSize:"borderSize"},merge:{mergeAll:"Merge all",mergeV:"Vertically",mergeH:"Horizontally",mergeCancel:"Unmerge",overlappingError:"Cannot merge overlapping areas",partiallyError:"Cannot perform this operation on partially merged cells"},align:{left:"left",center:"center",right:"right",top:"Top",middle:"Middle",bottom:"Bottom"},textWrap:{overflow:"Overflow",wrap:"Wrap",clip:"Clip"},rotation:{none:"None",angleup:"Tilt Up",angledown:"Tilt Down",vertical:"Stack Vertically",rotationUp:"Rotate Up",rotationDown:"Rotate Down"},freezen:{default:"Freeze",freezenRow:"First Row",freezenColumn:"First Column",freezenRC:"Both",freezenRowRange:"Freezen row range",freezenColumnRange:"Freezen column range",freezenRCRange:"Freezen both range",freezenCancel:"Cancel",noSeletionError:"No Range to be selected",rangeRCOverErrorTitle:"Freeze reminder",rangeRCOverError:"The frozen pane is beyond the visible range, which will lead to abnormal operation. Please reset the frozen area."},sort:{asc:"Ascending ",desc:"Descending ",custom:"Custom sort",hasTitle:"Data has a header row",sortBy:"Sort by",addOthers:"Add another sort column",close:"close",confirm:"sort",columnOperation:"Column",secondaryTitle:"then by",sortTitle:"Sort range",sortRangeTitle:"Sort range from",sortRangeTitleTo:"to",noRangeError:"Cannot perform this operation on multiple selection areas, please select a single range and try again",mergeError:"There are merged cells in the selection, this operation cannot be performed!",columnSortMergeError:"Column sorting will extend to the entire table selection. There are merged cells, this operation cannot be performed. Please use the sort feature in the toolbar."},filter:{filter:"create filter",sortByAsc:"Sort A-Z",sortByDesc:"Sort Z-A",filterByColor:"Filter by color",filterByCondition:"Filter by condition",filterByValues:"Filter by values",filiterInputNone:"None",filiterInputTip:"Enter filter value",filiterRangeStart:"",filiterRangeStartTip:"Value for formula",filiterRangeEnd:"and",filiterRangeEndTip:"Value for formula",filterValueByAllBtn:"Check all",filterValueByClearBtn:"Clear",filterValueByInverseBtn:"Inverse",filterValueByTip:"filter By Values",filterConform:"Confirm",filterCancel:"Cancel",clearFilter:"Clear filter",conditionNone:"None",conditionCellIsNull:"Is empty",conditionCellNotNull:"Is not empty",conditionCellTextContain:"Text contains",conditionCellTextNotContain:"Text does not contain",conditionCellTextStart:"Text starts with",conditionCellTextEnd:"Text ends with",conditionCellTextEqual:"Text is exactly",conditionCellDateEqual:"Date is",conditionCellDateBefore:"Date is before",conditionCellDateAfter:"Date is after",conditionCellGreater:"Greater than",conditionCellGreaterEqual:"Greater than or equal to",conditionCellLess:"Less than",conditionCellLessEqual:"Less than or equal to",conditionCellEqual:"Is equal to",conditionCellNotEqual:"Is not equal to",conditionCellBetween:"Is between",conditionCellNotBetween:"Is not between",filiterMoreDataTip:"Big amount of data! please wait",filiterMonthText:"Month",filiterYearText:"Year",filiterByColorTip:"Filter by cell color",filiterByTextColorTip:"Filter by font color",filterContainerOneColorTip:"This column contains only one color",filterDateFormatTip:"Date format",valueBlank:"(Null)",mergeError:"There are merged cells in the filter selection, this operation cannot be performed!"},rightclick:{copy:"Copy",copyAs:"Copy as",paste:"Paste",insert:"Insert",delete:"Delete",deleteCell:"Delete cell",deleteSelected:"Delete selected ",hide:"Hide",hideSelected:"Hide selected ",showHide:"Show hidden ",to:"Towards",left:"Left",right:"Right",top:"Top",bottom:"Bottom",moveLeft:"Move left",moveUp:"Move up",add:"Add",row:"Row",column:"Column",width:"Width",height:"Height",number:"Number",confirm:"Confirm",orderAZ:"A-Z order",orderZA:"Z-A order",clearContent:"Clear content",matrix:"Matrix operation",sortSelection:"Sort",filterSelection:"Filter",chartGeneration:"Create chart",firstLineTitle:"first line title",untitled:"untitled",array1:"One-dimensional array",array2:"Two-dimensional array",array3:"Multidimensional Arrays",diagonal:"Diagonal",antiDiagonal:"Anti-diagonal",diagonalOffset:"Diagonal offset",offset:"Offset",boolean:"Boolean",flip:"Flip",upAndDown:"Up and down",leftAndRight:"Left and right",clockwise:"Clockwise",counterclockwise:"Counterclockwise",transpose:"Transpose",matrixCalculation:"Matrix calculation",plus:"Plus",minus:"Minus",multiply:"Multiply",divided:"Divided",power:"Power",root:"Root",log:"Log",delete0:"Delete 0 values at both ends",removeDuplicate:"Remove duplicate values",byRow:"By row",byCol:"By column",generateNewMatrix:"Generate new matrix"},comment:{insert:"Insert",edit:"Edit",delete:"Delete",showOne:"Show/Hide",showAll:"Show/Hide All"},screenshot:{screenshotTipNoSelection:"Please select the scope of the screenshot",screenshotTipTitle:"Warning\uFF01",screenshotTipHasMerge:"This operation cannot be performed on merged cells",screenshotTipHasMulti:"This operation cannot be performed on multiple selection regions",screenshotTipSuccess:"Successful",screenshotImageName:"Screenshot",downLoadClose:"Close",downLoadCopy:"Copy to clipboard",downLoadBtn:"Download",browserNotTip:"not supported by IE browser!",rightclickTip:'Please right-click "copy" on the picture',successTip:'Successfully (if pasting fails, please right-click on the image to "copy image")'},splitText:{splitDelimiters:"Delimiters",splitOther:"Other",splitContinueSymbol:"Consecutive separators are treated as a single",splitDataPreview:"Preview",splitTextTitle:"Split text",splitConfirmToExe:"There is already data here, do you want to replace it?",tipNoMulti:"Cannot perform this operation on multiple selection areas, please select a single area and try again",tipNoMultiColumn:"Only one column of data can be converted at a time. The selected area can have multiple rows but not multiple columns. Please try again after selecting a single column range"},imageText:{imageSetting:"Image setting",close:"Close",conventional:"Conventional",moveCell1:"Move and resize cells",moveCell2:"Move and do not resize the cell",moveCell3:"Do not move and resize the cell",fixedPos:"Fixed position",border:"Border",width:"Width",radius:"Radius",style:"Style",solid:"Solid",dashed:"Dashed",dotted:"Dotted",double:"Double",color:"Color"},punctuation:{tab:"Tab",semicolon:"semicolon",comma:"comma",space:"space"},findAndReplace:{find:"Find",replace:"Replace",goto:"Go to",location:"Location",formula:"Formula",date:"Date",number:"Number",string:"String",error:"Error",condition:"Condition",rowSpan:"Row span",columnSpan:"Column span",locationExample:"Location",lessTwoRowTip:"Please select at least two rows",lessTwoColumnTip:"Please select at least two columns",findTextbox:"Find Content",replaceTextbox:"Replace Content",regexTextbox:"Regular Expression",wholeTextbox:"Whole word",distinguishTextbox:"Case sensitive",allReplaceBtn:"Replace All",replaceBtn:"Replace",allFindBtn:"Find All",findBtn:"Find next",noFindTip:"The content was not found",modeTip:"This operation is not available in this mode",searchTargetSheet:"Sheet",searchTargetCell:"Cell",searchTargetValue:"Value",searchInputTip:"Please enter the search content",noReplceTip:"There is nothing to replace",noMatchTip:"No match found",successTip:"${xlength} items found",locationConstant:"Constant",locationFormula:"Formula",locationDate:"Date",locationDigital:"Number",locationString:"String",locationBool:"Logical",locationError:"Error",locationNull:"Null",locationCondition:"Conditional format",locationRowSpan:"Row span",locationColumnSpan:"Column span",locationTiplessTwoRow:"Please select at least two rows",locationTiplessTwoColumn:"Please select at least two columns",locationTipNotFindCell:"Cell not found"},sheetconfig:{delete:"Delete",copy:"Copy",rename:"Rename",changeColor:"Change color",hide:"Hide",unhide:"Unhide",moveLeft:"Move left",moveRight:"Move right",resetColor:"Reset color",cancelText:"Cancel",chooseText:"Confirm color",tipNameRepeat:"The name of the tab page cannot be repeated! Please revise",noMoreSheet:"The workbook contains at least one visual worksheet. To delete the selected worksheet, please insert a new worksheet or show a hidden worksheet.",confirmDelete:"Are you sure to delete",redoDelete:"Can be undo by Ctrl+Z",noHide:"Can't hide, at least keep one sheet tag",chartEditNoOpt:"This operation is not allowed in chart editing mode!",sheetNameSpecCharError:`The name cannot contain:[ ] : ? * / ' "`,sheetNamecannotIsEmptyError:"Sheet name cannot be empty"},conditionformat:{conditionformat_greaterThan:"Conditionformat-GreaterThan",conditionformat_greaterThan_title:"Format cells greater than",conditionformat_lessThan:"Conditionformat-LessThan",conditionformat_lessThan_title:"Format cells smaller than",conditionformat_betweenness:"Conditionformat-Betweenness",conditionformat_betweenness_title:"Format cells with values between",conditionformat_equal:"Conditionformat-Equal",conditionformat_equal_title:"Format cells equal to",conditionformat_textContains:"Conditionformat-TextContains",conditionformat_textContains_title:"Format cells containing the following text",conditionformat_occurrenceDate:"Conditionformat-OccurrenceDate",conditionformat_occurrenceDate_title:"Format cells containing the following dates",conditionformat_duplicateValue:"Conditionformat-DuplicateValue",conditionformat_duplicateValue_title:"Format cells containing the following types of values",conditionformat_top10:"Conditionformat-Top10",conditionformat_top10_percent:"Conditionformat-Top10%",conditionformat_top10_title:"Format the cells with the highest value",conditionformat_last10:"Conditionformat-Last10",conditionformat_last10_percent:"Conditionformat-Last10%",conditionformat_last10_title:"Format the cells with the smallest value",conditionformat_AboveAverage:"Conditionformat-AboveAverage",conditionformat_AboveAverage_title:"Format cells above average",conditionformat_SubAverage:"Conditionformat-SubAverage",conditionformat_SubAverage_title:"Format cells below average",rule:"Rule",newRule:"New rule",editRule:"Edit rule",deleteRule:"Delete rule",deleteCellRule:"Delete cell rule",deleteSheetRule:"Delete sheet rule",manageRules:"Management rules",showRules:"Show its formatting rules",highlightCellRules:"Highlight cell rules",itemSelectionRules:"Item selection rules",conditionformatManageRules:"Conditional Formatting Rule Manager",format:"Format",setFormat:"Set format",setAs:"Set as",setAsByArea:"For the selected area, set to",applyRange:"Apply range",selectRange:"Select application range",selectRange_percent:"Percentage of selected range",selectRange_average:"Average value of selected range",selectRange_value:"Value in the selected range",pleaseSelectRange:"Please select application range",selectDataRange:"Select data range",selectCell:"select cell",pleaseSelectCell:"Please select cell",pleaseSelectADate:"Please select a date",pleaseEnterInteger:"Please enter an integer between 1 and 1000",onlySingleCell:"Only a single cell can be referenced",conditionValueCanOnly:"The condition value can only be a number or a single cell",ruleTypeItem1:"Format all cells based on their respective values",ruleTypeItem2:"Only format cells that contain",ruleTypeItem2_title:"Only for cells that meet the following conditions",ruleTypeItem3:"Format only the top or bottom numbers",ruleTypeItem3_title:"Is the value in the following ranking",ruleTypeItem4:"Format only values above or below the average",ruleTypeItem4_title:"Is a value that satisfies the following conditions",ruleTypeItem5:"Format only unique or repeated values",ruleTypeItem6:"Use formulas to determine which cells to format",formula:"Formula",textColor:"Text color",cellColor:"Cell color",confirm:"Confirm",confirmColor:"Confirm color",cancel:"Cancel",close:"Close",clearColorSelect:"Clear color select",sheet:"Sheet",currentSheet:"Current Sheet",dataBar:"data bar",dataBarColor:"data bar color",gradientDataBar_1:"Blue-white gradient data bar",gradientDataBar_2:"Green-white gradient data bar",gradientDataBar_3:"Red-white gradient data bar",gradientDataBar_4:"Orange-white gradient stripes",gradientDataBar_5:"Light blue-white gradient stripes",gradientDataBar_6:"Purple-white gradient data bar",solidColorDataBar_1:"Blue data bar",solidColorDataBar_2:"Green data bar",solidColorDataBar_3:"Red data bar",solidColorDataBar_4:"Orange data bar",solidColorDataBar_5:"Light blue data bar",solidColorDataBar_6:"Purple data bar",colorGradation:"color gradation",colorGradation_1:"Green-yellow-red color gradation",colorGradation_2:"Red-yellow-green color gradation",colorGradation_3:"Green-white-red color gradation",colorGradation_4:"Red-white-green color gradation",colorGradation_5:"Blue-white-red color gradation",colorGradation_6:"Red-white-blue color gradation",colorGradation_7:"White-red color gradation",colorGradation_8:"Red-white color gradation",colorGradation_9:"Green-white color gradation",colorGradation_10:"White-green color gradation",colorGradation_11:"Green-yellow color gradation",colorGradation_12:"Yellow-green color gradation",icons:"icons",pleaseSelectIcon:"Please click to select a group of icons:",cellValue:"Cell value",specificText:"Specific text",occurrence:"Date",greaterThan:"Greater than",lessThan:"Less than",between:"Between",equal:"Equal",in:"In",between2:"",contain:"Contain",textContains:"Text contains",duplicateValue:"Duplicate value",uniqueValue:"Unique value",top:"Top",top10:"Top 10",top10_percent:"Top 10%",last:"Last",last10:"Last 10",last10_percent:"Last 10%",oneself:"",above:"Above",aboveAverage:"Above average",below:"Below",belowAverage:"Below average",all:"All",yesterday:"YTD",today:"Today",tomorrow:"Tomorrow",lastWeek:"Last week",thisWeek:"This week",lastMonth:"Last month",thisMonth:"This month",lastYear:"Last year",thisYear:"This year",last7days:"Last 7 days",last30days:"Last 30 days",next7days:"Next 7 days",next30days:"Next 30 days",next60days:"Next 60 days",chooseRuleType:"Choose rule type",editRuleDescription:"Edit rule description",newFormatRule:"New format rule",editFormatRule:"Edit format rule",formatStyle:"Style",fillType:"Fill",color:"Color",twocolor:"Two-color",tricolor:"Tricolor",multicolor:"Multi color",grayColor:"Gray color",gradient:"Gradient",solid:"Solid",maxValue:"Max value",medianValue:"Median value",minValue:"Min value",direction:"Direction",threeWayArrow:"Three-way arrow",fourWayArrow:"Four-way arrow",fiveWayArrow:"Five-way arrow",threeTriangles:"Three triangles",shape:"Shape",threeColorTrafficLight:"Three-color traffic light",fourColorTrafficLight:"Four-color traffic light",threeSigns:"Three signs",greenRedBlackGradient:"Green-red-black gradient",rimless:"Rimless",bordered:"Bordered",mark:"Mark",threeSymbols:"Three symbols",tricolorFlag:"Tricolor flag",circled:"Circled",noCircle:"No circle",grade:"Grade",grade4:"4 Grade",grade5:"5 Grade",threeStars:"3 Stars",fiveQuadrantDiagram:"Five-quadrant diagram",fiveBoxes:"5 Boxes"},insertLink:{linkText:"Text",linkType:"Link type",external:"External link",internal:"Internal link",linkAddress:"Link address",linkSheet:"Worksheet",linkCell:"Cell reference",linkTooltip:"Tooltip",placeholder1:"Please enter the web link address",placeholder2:"Please enter the cell to be quoted, example A1",placeholder3:"Please enter the prompt content",tooltipInfo1:"Please enter a valid link",tooltipInfo2:"Please enter the correct cell reference"},dataVerification:{cellRange:"Cell range",selectCellRange:"Click to select a cell range",selectCellRange2:"Please select a range of cells",verificationCondition:"Verification condition",allowMultiSelect:"Allow multiple selection",dropdown:"drop-down list",checkbox:"Checkbox",number:"Number",number_integer:"Number-integer",number_decimal:"Number-decimal",text_content:"Text-content",text_length:"Text-length",date:"Date",validity:"Effectiveness",placeholder1:"Please enter the options, separated by commas, such as 1,2,3,4,5",placeholder2:"Please enter content",placeholder3:"Numeric value, such as 10",placeholder4:"Please enter the specified text",placeholder5:"Please enter the prompt displayed when the cell is selected",selected:"Selected",notSelected:"Not selected",between:"Between",notBetween:"Not between",equal:"Equal",notEqualTo:"Not equal to",moreThanThe:"More than the",lessThan:"Less than",greaterOrEqualTo:"Greater or equal to",lessThanOrEqualTo:"Less than or equal to",include:"Include",exclude:"Exclude",earlierThan:"Earlier than",noEarlierThan:"No earlier than",laterThan:"Later than",noLaterThan:"No later than",identificationNumber:"Identification number",phoneNumber:"Phone number",remote:"Automatic remote acquisition option",prohibitInput:"Prohibit input when input data is invalid",hintShow:"Show prompt when the cell is selected",deleteVerification:"Delete verification",tooltipInfo1:"The drop-down list option cannot be empty",tooltipInfo2:"Checkbox content cannot be empty",tooltipInfo3:"The value entered is not a numeric type",tooltipInfo4:"The value 2 cannot be less than the value 1",tooltipInfo5:"The text content cannot be empty",tooltipInfo6:"The value entered is not a date type",tooltipInfo7:"Date 2 cannot be less than date 1",textlengthInteger:"Text length must be an integer greater than or equal to 0"},formula:{sum:"Sum",average:"Average",count:"Count",max:"Max",min:"Min",ifGenerate:"If formula generator",find:"Learn more",tipNotBelongToIf:"This cell function does not belong to the if formula!",tipSelectCell:"Please select the cell to insert the function",ifGenCompareValueTitle:"Comparison value",ifGenSelectCellTitle:"Click to select cell",ifGenRangeTitle:"Range",ifGenRangeTo:"to",ifGenRangeEvaluate:"Range evaluate",ifGenSelectRangeTitle:"Click to select range",ifGenCutWay:"Partition way",ifGenCutSame:"Same Partition value",ifGenCutNpiece:"Partition by N",ifGenCutCustom:"Custom",ifGenCutConfirm:"Confirm",ifGenTipSelectCell:"Select cells",ifGenTipSelectCellPlace:"Please select cells",ifGenTipSelectRange:"Select range",ifGenTipSelectRangePlace:"Please select range",ifGenTipNotNullValue:"The comparison value cannot be empty!",ifGenTipLableTitile:"Label",ifGenTipRangeNotforNull:"The range cannot be empty!",ifGenTipCutValueNotforNull:"The partition value cannot be empty!",ifGenTipNotGenCondition:"No conditions are available for generation!"},formulaMore:{valueTitle:"Value",tipSelectDataRange:"Select data range",tipDataRangeTile:"Data range",findFunctionTitle:"Search function",tipInputFunctionName:"Function name or brief description of function",Array:"Array",Database:"Database",Date:"Date",Engineering:"Engineering",Filter:"Filter",Financial:"Financial",luckysheet:"Luckysheet",other:"Other",Logical:"Logical",Lookup:"Lookup",Math:"Math",Operator:"Operator",Parser:"Parser",Statistical:"Statistical",Text:"Text",dataMining:"Data Mining",selectFunctionTitle:"Select a function",calculationResult:"Result",tipSuccessText:"Success",tipParamErrorText:"Parameter type error",helpClose:"Close",helpCollapse:"Collapse",helpExample:"Example",helpAbstract:"Abstract",execfunctionError:"Error in the formula",execfunctionSelfError:"The formula cannot refer to its own cell",execfunctionSelfErrorResult:"The formula cannot refer to its own cell, which will lead to inaccurate calculation results",allowRepeatText:"Repeat",allowOptionText:"Option",selectCategory:"Or select a category"},drag:{noMerge:"Cannot perform this operation on merged cells",affectPivot:"This change cannot be made to the selected cell because it will affect the pivot table!",noMulti:"Cannot perform this operation on multiple selection areas, please select a single area",noPaste:"Unable to paste this content here, please select a cell in the paste area and try to paste again",noPartMerge:"Cannot perform this operation on partially merged cells",inputCorrect:"Please enter the correct value",notLessOne:"The number of rows and columns cannot be less than 1",offsetColumnLessZero:"The offset column cannot be negative!",pasteMustKeybordAlert:"Copy and paste in the Sheet: Ctrl + C to copy, Ctrl + V to paste, Ctrl + X to cut",pasteMustKeybordAlertHTMLTitle:"Copy and paste in the Sheet",pasteMustKeybordAlertHTML:"<span style='line-height: 1.0;font-size:36px;font-weight: bold;color:#666;'>Ctrl + C</span> to copy<br/><span style='line-height: 1.0;font-size:36px;font-weight: bold;color:#666;'>Ctrl + V</span> to paste<br/><span style='line-height: 1.0;font-size:36px;font-weight: bold;color:#666;'>Ctrl + X</span> to cut"},paste:{warning:"Warning",errorNotAllowMulti:"Cannot perform this operation on multiple selection areas, please select a single range and try again",errorNotAllowMerged:"Cannot make partial changes to merged cells"},pivotTable:{title:"Pivot Table",closePannel:"Close",editRange:"Range",tipPivotFieldSelected:"Select the fields",tipClearSelectedField:"Clear all fields",btnClearSelectedField:"Clear",btnFilter:"Filter",titleRow:"Row",titleColumn:"Column",titleValue:"Value",tipShowColumn:"Statistics fields are displayed as columns",tipShowRow:"Statistics fields are displayed as rows",titleSelectionDataRange:"Select range",titleDataRange:"Data range",valueSum:"SUM",valueStatisticsSUM:"Sum",valueStatisticsCOUNT:"Count",valueStatisticsCOUNTA:"Count A",valueStatisticsCOUNTUNIQUE:"Count Unique",valueStatisticsAVERAGE:"Average",valueStatisticsMAX:"Max",valueStatisticsMIN:"Min",valueStatisticsMEDIAN:"Median",valueStatisticsPRODUCT:"Product",valueStatisticsSTDEV:"Stdev",valueStatisticsSTDEVP:"Stdevp",valueStatisticslet:"Var",valueStatisticsVARP:"VarP",errorNotAllowEdit:"This operation is prohibited in non-editing mode!",errorNotAllowMulti:"Cannot perform this operation on multiple selection areas, please select a single range and try again",errorSelectRange:"Please select the range of the new pivot table",errorIsDamage:"The source data of this pivot table is corrupted!",errorNotAllowPivotData:"Cannot select pivot table as source data!",errorSelectionRange:"Selection failed, wrong input range!",errorIncreaseRange:"Please expand the selected range!",titleAddColumn:"Add column to pivot table",titleMoveColumn:"Move the column to the white box below",titleClearColumnFilter:"Clear the filter for this column",titleFilterColumn:"Filter",titleSort:"Sort",titleNoSort:"No sort",titleSortAsc:"ASC",titleSortDesc:"DESC",titleSortBy:"Sort by",titleShowSum:"Show total",titleStasticTrue:"Yes",titleStasticFalse:"No"},dropCell:{copyCell:"Copy",sequence:"Sequence",onlyFormat:"Only format",noFormat:"Not format",day:"Day",workDay:"Work Day",month:"Month",year:"Year",chineseNumber:"Chinese numbers"},imageCtrl:{borderTile:"Image border color",borderCur:"Color"},protection:{protectiontTitle:"Protection",enterPassword:"Enter a password (optional)",enterHintTitle:"Prompt when editing is prohibited (optional)",enterHint:"The cell or chart you are trying to change is in a protected worksheet. If you want to change it, please unprotect the worksheet. You may need to enter a password",swichProtectionTip:"Protect the sheet and contents of locked cells",authorityTitle:"Allow users of this sheet to:",selectLockedCells:"Select locked cells",selectunLockedCells:"Select unlocked cells",formatCells:"Format cells",formatColumns:"Format columns",formatRows:"Format rows",insertColumns:"Insert columns",insertRows:"Insert rows",insertHyperlinks:"Insert hyperlinks",deleteColumns:"Delete columns",deleteRows:"Delete rows",sort:"Sort",filter:"Filter",usePivotTablereports:"Use Pivot Table reports",editObjects:"Edit objects",editScenarios:"Edit scenarios",allowRangeTitle:"Allow users of range to:",allowRangeAdd:"New...",allowRangeAddTitle:"Title",allowRangeAddSqrf:"Reference",selectCellRange:"Click to select a cell range",selectCellRangeHolder:"Cell range",allowRangeAddTitlePassword:"Password",allowRangeAddTitleHint:"Prompt",allowRangeAddTitleHintTitle:"Prompt when a password is set (optional)",allowRangeAddtitleDefault:"Input range name",rangeItemDblclick:"Double click to edit",rangeItemHasPassword:"Has password",rangeItemErrorTitleNull:"Title is null",rangeItemErrorRangeNull:"Reference is null",rangeItemErrorRange:"Reference is error",validationTitle:"Password validation",validationTips:"Need to enter a password to unlock the protection of the worksheet",validationInputHint:"Enter a password",checkPasswordNullalert:"Password is required!",checkPasswordWrongalert:"Incorrect password, please try again!",checkPasswordSucceedalert:"Unlock Succeed!",defaultRangeHintText:"The cell is being password protected.",defaultSheetHintText:"The cell or chart is in a protected worksheet. To make changes, please unprotect the worksheet. You may need to enter a password"},cellFormat:{cellFormatTitle:"Format cells",protection:"Protection",locked:"Locked",hidden:"Hidden",protectionTips:"To lock cells or hide formulas, protect the worksheet. On the toolbar, Click Protect Sheet Button",tipsPart:"Partial checked",tipsAll:"All checked",selectionIsNullAlert:"Selection is required!",sheetDataIsNullAlert:"error, Data is none!"},print:{normalBtn:"Normal",layoutBtn:"Page Layout",pageBtn:"Page\u2002break\u2002preview",menuItemPrint:"Print (Ctrl+P)",menuItemAreas:"Print areas",menuItemRows:"Print title rows",menuItemColumns:"Print title columns"},edit:{typing:"typing"},websocket:{success:"WebSocket connection success",refresh:"An error occurred in the WebSocket connection, please refresh the page!",wait:"An error occurred in the WebSocket connection, please be patient!",close:"WebSocket connection closed",contact:"Server communication error occurred, please refresh the page and try again, if not, please contact the administrator!",support:"The current browser does not support WebSocket"}}});var du,fu=Ie(()=>{du={functionlist:{SUMIF:{d:"\u5BF9\u8303\u56F4\u4E2D\u7B26\u5408\u6307\u5B9A\u6761\u4EF6\u7684\u503C\u6C42\u548C\u3002",a:"\u5BF9\u8303\u56F4\u4E2D\u7B26\u5408\u6307\u5B9A\u6761\u4EF6\u7684\u503C\u6C42\u548C\u3002",p:[{name:"\u8303\u56F4",detail:"\u8981\u6839\u636E\u6761\u4EF6\u8FDB\u884C\u68C0\u6D4B\u7684\u8303\u56F4\u3002"},{name:"\u6761\u4EF6",detail:`\u8981\u5E94\u7528\u4E8E\u8303\u56F4\u7684\u6A21\u5F0F\u6216\u6D4B\u8BD5\u6761\u4EF6\u3002 |
| | | If the value is FALSE, return the accrued interest from the first interest accrual date to the settlement date.`}]},ACCRINTM:{d:"Calculates the accrued interest of a security that pays interest at maturity.",a:"Accrued interest of security paying at maturity.",p:[{name:"issue",detail:"The date the security was initially issued."},{name:"maturity",detail:"The maturity date of the security."},{name:"rate",detail:"The annualized rate of interest."},{name:"redemption",detail:"The redemption amount per 100 face value, or par."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},COUPDAYBS:{d:"Calculates the number of days from the first coupon, or interest payment, until settlement.",a:"Number of days from first coupon to settlement.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},COUPDAYS:{d:"Calculates the number of days in the coupon, or interest payment, period that contains the specified settlement date.",a:"Days in coupon period containing settlement date.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},COUPDAYSNC:{d:"Calculates the number of days from the settlement date until the next coupon, or interest payment.",a:"Days from settlement until next coupon.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},COUPNCD:{d:"Calculates next coupon, or interest payment, date after the settlement date.",a:"Next coupon date after the settlement date.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},COUPPCD:{d:"Calculates last coupon, or interest payment, date before the settlement date.",a:"Last coupon date before settlement date.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},FV:{d:"Calculates the future value of an annuity investment based on constant-amount periodic payments and a constant interest rate.",a:"Future value of an annuity investment.",p:[{name:"rate",detail:"The interest rate."},{name:"number_of_periods",detail:"The number of payments to be made."},{name:"payment_amount",detail:"The amount per period to be paid."},{name:"present_value",detail:"The current value of the annuity."},{name:"end_or_beginning",detail:"Whether payments are due at the end (`0`) or beginning (`1`) of each period."}]},FVSCHEDULE:{d:"Calculates the future value of some principal based on a specified series of potentially varying interest rates.",a:"Future value of principal from series of rates.",p:[{name:"principal",detail:"The amount of initial capital or value to compound against."},{name:"rate_schedule",detail:"A series of interest rates to compound against the `principal`."}]},YIELD:{d:"Calculates the annual yield of a security paying periodic interest, such as a US Treasury Bond, based on price.",a:"Annual yield of a security paying periodic interest.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"rate",detail:"The annualized rate of interest."},{name:"price",detail:"The price at which the security is bought per 100 face value."},{name:"redemption",detail:"The redemption amount per 100 face value, or par."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},YIELDDISC:{d:"Calculates the annual yield of a discount (non-interest-bearing) security, based on price.",a:"Annual yield of a discount security.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"price",detail:"The price at which the security is bought per 100 face value."},{name:"redemption",detail:"The redemption amount per 100 face value, or par."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},NOMINAL:{d:"Calculates the annual nominal interest rate given the effective rate and number of compounding periods per year.",a:"Annual nominal interest rate.",p:[{name:"effective_rate",detail:"The effective interest rate per year."},{name:"periods_per_year",detail:"The number of compounding periods per year."}]},XIRR:{d:"Calculates the internal rate of return of an investment based on a specified series of potentially irregularly spaced cash flows.",a:"Internal rate of return given non-periodic cashflows.",p:[{name:"cashflow_amounts",detail:"An array or range containing the income or payments associated with the investment."},{name:"cashflow_dates",detail:"An array or range with dates corresponding to the cash flows in `cashflow_amounts`."},{name:"rate_guess",detail:"An estimate for what the internal rate of return will be."}]},MIRR:{d:"Calculates the modified internal rate of return on an investment based on a series of periodic cash flows and the difference between the interest rate paid on financing versus the return received on reinvested income.",a:"Modified internal rate of return.",p:[{name:"cashflow_amounts",detail:"An array or range containing the income or payments associated with the investment."},{name:"financing_rate",detail:"The interest rate paid on funds invested."},{name:"reinvestment_return_rate",detail:"The return (as a percentage) earned on reinvestment of income received from the investment."}]},IRR:{d:"Calculates the internal rate of return on an investment based on a series of periodic cash flows.",a:"Internal rate of return given periodic cashflows.",p:[{name:"cashflow_amounts",detail:"An array or range containing the income or payments associated with the investment."},{name:"rate_guess",detail:"An estimate for what the internal rate of return will be."}]},NPV:{d:"Calculates the net present value of an investment based on a series of periodic cash flows and a discount rate.",a:"The net present value of an investment based on a series of periodic cash flows and a discount rate.",p:[{name:"discount",detail:"The discount rate of the investment over one period."},{name:"cashflow1",detail:"The first future cash flow."},{name:"cashflow2",detail:"Additional future cash flows."}]},XNPV:{d:"Calculates the net present value of an investment based on a specified series of potentially irregularly spaced cash flows and a discount rate.",a:"Net present value given non-periodic cashflows.",p:[{name:"discount",detail:"The discount rate of the investment over one period."},{name:"cashflow_amounts",detail:"A range of cells containing the income or payments associated with the investment."},{name:"cashflow_dates",detail:"A range of cells with dates corresponding to the cash flows in `cashflow_amounts`."}]},CUMIPMT:{d:"Calculates the cumulative interest over a range of payment periods for an investment based on constant-amount periodic payments and a constant interest rate.",a:"Cumulative interest paid over a set of periods.",p:[{name:"rate",detail:"The interest rate."},{name:"number_of_periods",detail:"The number of payments to be made."},{name:"present_value",detail:"The current value of the annuity."},{name:"first_period",detail:"The number of the payment period to begin the cumulative calculation."},{name:"last_period",detail:"The number of the payment period to end the cumulative calculation."},{name:"end_or_beginning",detail:"Whether payments are due at the end (`0`) or beginning (`1`) of each period."}]},PMT:{d:"Calculates the periodic payment for an annuity investment based on constant-amount periodic payments and a constant interest rate.",a:"Periodic payment for an annuity investment.",p:[{name:"rate",detail:"The interest rate."},{name:"number_of_periods",detail:"The number of payments to be made."},{name:"present_value",detail:"The current value of the annuity."},{name:"future_value",detail:"The future value remaining after the final payment has been made."},{name:"end_or_beginning",detail:"Whether payments are due at the end (`0`) or beginning (`1`) of each period."}]},IPMT:{d:"Calculates the payment on interest for an investment based on constant-amount periodic payments and a constant interest rate.",a:"Payment on interest for an investment.",p:[{name:"rate",detail:"The interest rate."},{name:"period",detail:"The amortization period, in terms of number of periods."},{name:"number_of_periods",detail:"The number of payments to be made."},{name:"present_value",detail:"The current value of the annuity."},{name:"future_value",detail:"The future value remaining after the final payment has been made."},{name:"end_or_beginning",detail:"Whether payments are due at the end (`0`) or beginning (`1`) of each period."}]},PPMT:{d:"Calculates the payment on the principal of an investment based on constant-amount periodic payments and a constant interest rate.",a:"Payment on the principal of an investment.",p:[{name:"rate",detail:"The interest rate."},{name:"period",detail:"The amortization period, in terms of number of periods."},{name:"number_of_periods",detail:"The number of payments to be made."},{name:"present_value",detail:"The current value of the annuity."},{name:"future_value",detail:"The future value remaining after the final payment has been made."},{name:"end_or_beginning",detail:"Whether payments are due at the end (`0`) or beginning (`1`) of each period."}]},INTRATE:{d:"Calculates the effective interest rate generated when an investment is purchased at one price and sold at another with no interest or dividends generated by the investment itself.",a:"Calculates effective interest rate.",p:[{name:"buy_date",detail:"The date of purchase of the investment."},{name:"sell_date",detail:"The date of sale of the investment."},{name:"buy_price",detail:"The price at which the investment was purchased."},{name:"sell_price",detail:"The price at which the investment was sold."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},PRICE:{d:"Calculates the price of a security paying periodic interest, such as a US Treasury Bond, based on expected yield.",a:"Price of a security paying periodic interest.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"rate",detail:"The annualized rate of interest."},{name:"yield",detail:"The expected annual yield of the security."},{name:"redemption",detail:"The redemption amount per 100 face value, or par."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},PRICEDISC:{d:"Calculates the price of a discount (non-interest-bearing) security, based on expected yield.",a:"Price of a discount security.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"discount",detail:"The discount rate of the security at time of purchase."},{name:"redemption",detail:"The redemption amount per 100 face value, or par."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},PRICEMAT:{d:"Calculates the price of a security paying interest at maturity, based on expected yield.",a:"Price of security paying interest at maturity.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"issue",detail:"The date the security was initially issued."},{name:"rate",detail:"The annualized rate of interest."},{name:"yield",detail:"The expected annual yield of the security."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},RECEIVED:{d:"Calculates the amount received at maturity for an investment in fixed-income securities purchased on a given date.",a:"Amount received at maturity for a security.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"investment",detail:"The amount invested (irrespective of face value of each security)."},{name:"discount",detail:"The discount rate of the security invested in."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},DISC:{d:"Calculates the discount rate of a security based on price.",a:"The discount rate of a security based on price.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"price",detail:"The price at which the security is bought per 100 face value."},{name:"redemption",detail:"The redemption amount per 100 face value, or par."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},NPER:{d:"Calculates the number of payment periods for an investment based on constant-amount periodic payments and a constant interest rate.",a:"Number of payment periods for an investment.",p:[{name:"rate",detail:"The interest rate."},{name:"payment_amount",detail:"The amount of each payment made."},{name:"present_value",detail:"The current value of the annuity."},{name:"future_value",detail:"The future value remaining after the final payment has been made."},{name:"end_or_beginning",detail:"Whether payments are due at the end (`0`) or beginning (`1`) of each period."}]},SLN:{d:"Calculates the depreciation of an asset for one period using the straight-line method.",a:"Depreciation of asset using the straight-line method.",p:[{name:"cost",detail:"The initial cost of the asset."},{name:"salvage",detail:"The value of the asset at the end of depreciation."},{name:"life",detail:"The number of periods over which the asset is depreciated."}]},DURATION:{d:"Calculates the number of compounding periods required for an investment of a specified present value appreciating at a given rate to reach a target value.",a:"Number of periods for an investment to reach a value.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"rate",detail:"The annualized rate of interest."},{name:"yield",detail:"The expected annual yield of the security."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},MDURATION:{d:"Calculates the modified Macaulay duration of a security paying periodic interest, such as a US Treasury Bond, based on expected yield.",a:"Modified Macaulay duration.",p:[{name:"settlement",detail:"The settlement date of the security, the date after issuance when the security is delivered to the buyer."},{name:"maturity",detail:"The maturity or end date of the security, when it can be redeemed at face, or par value."},{name:"rate",detail:"The annualized rate of interest."},{name:"yield",detail:"The expected annual yield of the security."},{name:"frequency",detail:"The number of interest or coupon payments per year (1, 2, or 4)."},{name:"day_count_convention",detail:"An indicator of what day count method to use."}]},BIN2DEC:{d:"Converts a signed binary number to decimal format.",a:"Converts a signed binary number to decimal format.",p:[{name:"signed_binary_number",detail:"The signed 10-bit binary value to be converted to decimal, provided as a string."}]},BIN2HEX:{d:"Converts a signed binary number to signed hexadecimal format.",a:"Converts a binary number to hexadecimal.",p:[{name:"signed_binary_number",detail:"The signed 10-bit binary value to be converted to signed hexademical, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},BIN2OCT:{d:"Converts a signed binary number to signed octal format.",a:"Converts a binary number to octal.",p:[{name:"signed_binary_number",detail:"The signed 10-bit binary value to be converted to signed octal, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},DEC2BIN:{d:"Converts a decimal number to signed binary format.",a:"Converts a decimal number to signed binary format.",p:[{name:"decimal_number",detail:"The decimal value to be converted to signed binary, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},DEC2HEX:{d:"Converts a decimal number to signed hexadecimal format.",a:"Converts a decimal number to hexadecimal.",p:[{name:"decimal_number",detail:"The decimal value to be converted to signed hexadecimal, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},DEC2OCT:{d:"Converts a decimal number to signed octal format.",a:"Converts a decimal number to signed octal format.",p:[{name:"decimal_number",detail:"The decimal value to be converted to signed octal, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},HEX2BIN:{d:"Converts a signed hexadecimal number to signed binary format.",a:"Converts a hexadecimal number to binary.",p:[{name:"signed_hexadecimal_number",detail:"The signed 40-bit hexadecimal value to be converted to signed binary, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},HEX2DEC:{d:"Converts a signed hexadecimal number to decimal format.",a:"Converts a hexadecimal number to decimal.",p:[{name:"signed_hexadecimal_number",detail:"The signed 40-bit hexadecimal value to be converted to decimal, provided as a string."}]},HEX2OCT:{d:"Converts a signed hexadecimal number to signed octal format.",a:"Converts a hexadecimal number to octal.",p:[{name:"signed_hexadecimal_number",detail:"The signed 40-bit hexadecimal value to be converted to signed octal, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},OCT2BIN:{d:"Converts a signed octal number to signed binary format.",a:"Converts an octal number to binary.",p:[{name:"signed_octal_number",detail:"The signed 30-bit octal value to be converted to signed binary, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},OCT2DEC:{d:"Converts a signed octal number to decimal format.",a:"Converts a signed octal number to decimal format.",p:[{name:"signed_octal_number",detail:"The signed 30-bit octal value to be converted to decimal, provided as a string."}]},OCT2HEX:{d:"Converts a signed octal number to signed hexadecimal format.",a:"Converts an octal number to hexadecimal.",p:[{name:"signed_octal_number",detail:"The signed 30-bit octal value to be converted to signed hexadecimal, provided as a string."},{name:"significant_digits",detail:"The number of significant digits to ensure in the result."}]},COMPLEX:{d:"Creates a complex number given real and imaginary coefficients.",a:"Creates a complex number.",p:[{name:"real_part",detail:"The real coefficient."},{name:"imaginary_part",detail:"The imaginary coefficient."},{name:"suffix",detail:"The suffix for the imaginary coefficient, can only be 'i' or 'j'. If omitted, 'i' will be used."}]},IMREAL:{d:"Returns the real coefficient of a complex number.",a:"The real coefficient of a complex number.",p:[{name:"complex_number",detail:"The complex number, in the a+bi or a+bj format."}]},IMAGINARY:{d:"Returns the imaginary coefficient of a complex number.",a:"The imaginary coefficient of a complex number.",p:[{name:"complex_number",detail:"The complex number, in the a+bi or a+bj format."}]},IMCONJUGATE:{d:"Returns the complex conjugate of a number.",a:"The complex conjugate of a number.",p:[{name:"number",detail:"The complex number to calculate the conjugate for."}]},IMABS:{d:"Returns absolute value (or modulus) of a complex number.",a:"The absolute value of a complex number.",p:[{name:"number",detail:"The complex number to calculate the absolute value of."}]},DELTA:{d:"Compare two numeric values, returning 1 if they're equal.",a:"Compare two numeric values.",p:[{name:"number1",detail:"The first number to compare."},{name:"number2",detail:"The second number to compare."}]},IMSUM:{d:"Returns the sum of a series of complex numbers.",a:"Sum of a series of complex numbers.",p:[{name:"value1",detail:"The first complex number or range to add together."},{name:"value2",detail:"Additional complex numbers or ranges to add to `value1`."}]},IMSUB:{d:"Returns the difference between two complex numbers.",a:"The difference between two complex numbers.",p:[{name:"first_number",detail:"The complex number to subtract second_number from."},{name:"second_number",detail:"The complex number to subtract from first_number."}]},IMPRODUCT:{d:"Returns the result of multiplying a series of complex numbers together.",a:"Result of multiplying a series of complex numbers together.",p:[{name:"factor1",detail:"The first number or range to calculate for the product."},{name:"factor2",detail:"Additional complex numbers or ranges to calculate for the product."}]},IMDIV:{d:"Returns one complex number divided by another.",a:"One complex number divided by another.",p:[{name:"dividend",detail:"The complex number to be divided."},{name:"divisor",detail:"The complex number to divide by."}]},NOT:{d:"Returns the opposite of a logical value - `NOT(TRUE)` returns `FALSE`; `NOT(FALSE)` returns `TRUE`.",a:"Returns opposite of provided logical value.",p:[{name:"logical_expression",detail:"An expression or reference to a cell holding an expression that represents some logical value."}]},TRUE:{d:"Returns the logical value `TRUE`.",a:"Logical value `true`.",p:[]},FALSE:{d:"Returns the logical value `FALSE`.",a:"Logical value `false`.",p:[]},AND:{d:"Returns true if all of the provided arguments are logically true, and false if any of the provided arguments are logically false.",a:"Logical `and` operator.",p:[{name:"logical_expression1",detail:"An expression or reference to a cell containing an expression that represents some logical value, i.e. `TRUE` or `FALSE`, or an expression that can be coerced to a logical value."},{name:"logical_expression2",detail:"More expressions that represent logical values."}]},IFERROR:{d:"Returns the first argument if it is not an error value, otherwise returns the second argument if present, or a blank if the second argument is absent.",a:"Value if it is not an error, otherwise 2nd argument.",p:[{name:"value",detail:"The value to return if `value` itself is not an error."},{name:"value_if_error",detail:"The value the function returns if `value` is an error."}]},IF:{d:"Returns one value if a logical expression is `TRUE` and another if it is `FALSE`.",a:"Returns value depending on logical expression.",p:[{name:"logical_expression",detail:"An expression or reference to a cell containing an expression that represents some logical value, i.e. `TRUE` or `FALSE`."},{name:"value_if_true",detail:"The value the function returns if `logical_expression` is `TRUE`."},{name:"value_if_false",detail:"The value the function returns if `logical_expression` is `FALSE`."}]},OR:{d:"Returns true if any of the provided arguments are logically true, and false if all of the provided arguments are logically false.",a:"Logical `or` operator.",p:[{name:"logical_expression1",detail:"An expression or reference to a cell containing an expression that represents some logical value, i.e. `TRUE` or `FALSE`, or an expression that can be coerced to a logical value."},{name:"logical_expression2",detail:"More expressions that evaluate to logical values."}]},NE:{d:"Returns `TRUE` if two specified values are not equal and `FALSE` otherwise. Equivalent to the `!=` operator.",a:"Not equal.",p:[{name:"value1",detail:"The first value."},{name:"value2",detail:"The value to test against `value1` for inequality."}]},EQ:{d:"Returns `TRUE` if two specified values are equal and `FALSE` otherwise. Equivalent to the `==` operator.",a:"Equal.",p:[{name:"value1",detail:"The first value."},{name:"value2",detail:"The value to test against `value1` for equality."}]},GT:{d:"Returns `TRUE` if the first argument is strictly greater than the second, and `FALSE` otherwise. Equivalent to the `>` operator.",a:"Strictly greater than.",p:[{name:"value1",detail:"The value to test as being greater than `value2`."},{name:"value2",detail:"The second value."}]},GTE:{d:"Returns `TRUE` if the first argument is greater than or equal to the second, and `FALSE` otherwise. Equivalent to the `>=` operator.",a:"Greater than or equal to.",p:[{name:"value1",detail:"The value to test as being greater than or equal to `value2`."},{name:"value2",detail:"The second value."}]},LT:{d:"Returns `TRUE` if the first argument is strictly less than the second, and `FALSE` otherwise. Equivalent to the `<` operator.",a:"Less than.",p:[{name:"value1",detail:"The value to test as being less than `value2`."},{name:"value2",detail:"The second value."}]},LTE:{d:"Returns `TRUE` if the first argument is less than or equal to the second, and `FALSE` otherwise. Equivalent to the `<=` operator.",a:"Less than or equal to.",p:[{name:"value1",detail:"The value to test as being less than or equal to `value2`."},{name:"value2",detail:"The second value."}]},ADD:{d:"Returns the sum of two numbers. Equivalent to the `+` operator.",a:"Sum of two numbers",p:[{name:"value1",detail:"The first addend."},{name:"value2",detail:"The second addend."}]},MINUS:{d:"Returns the difference of two numbers. Equivalent to the `-` operator.",a:"Difference of two numbers",p:[{name:"value1",detail:"The minuend, or number to be subtracted from."},{name:"value2",detail:"The subtrahend, or number to subtract from `value1`."}]},MULTIPLY:{d:"Returns the product of two numbers. Equivalent to the `*` operator.",a:"Product of two numbers",p:[{name:"factor1",detail:"The first multiplicand."},{name:"factor2",detail:"The second multiplicand."}]},DIVIDE:{d:"Returns one number divided by another. Equivalent to the `/` operator.",a:"One number divided by another",p:[{name:"dividend",detail:"The number to be divided."},{name:"divisor",detail:"The number to divide by."}]},CONCAT:{d:"Returns the concatenation of two values. Equivalent to the `&` operator.",a:"Concatenation of two values",p:[{name:"value1",detail:"The value to which `value2` will be appended."},{name:"value2",detail:"The value to append to `value1`."}]},UNARY_PERCENT:{d:"Returns a value interpreted as a percentage; that is, `UNARY_PERCENT(100)` equals `1`.",a:"Value interpreted as a percentage.",p:[{name:"percentage",detail:"The value to interpret as a percentage."}]},CONCATENATE:{d:"Appends strings to one another.",a:"Appends strings to one another.",p:[{name:"string1",detail:"The initial string."},{name:"string2",detail:"More strings to append in sequence."}]},CODE:{d:"Returns the numeric Unicode map value of the first character in the string provided.",a:"Numeric unicode map value of character.",p:[{name:"string",detail:"The string whose first character's Unicode map value will be returned."}]},CHAR:{d:"Convert a number into a character according to the current Unicode table.",a:"Gets character associated with number.",p:[{name:"table_number",detail:"The number of the character to look up from the current Unicode table in decimal format."}]},ARABIC:{d:"Computes the value of a Roman numeral.",a:"Computes the value of a roman numeral.",p:[{name:"roman_numeral",detail:"The Roman numeral to format, whose value must be between 1 and 3999, inclusive."}]},ROMAN:{d:"Formats a number in Roman numerals.",a:"Formats a number in Roman numerals.",p:[{name:"number",detail:"The number to format, between 1 and 3999, inclusive."}]},REGEXEXTRACT:{d:"Extracts matching substrings according to a regular expression.",a:"Extracts matching substrings with regular expression.",p:[{name:"text",detail:"The input text."},{name:"regular_expression",detail:"The first part of `text` that matches this expression will be returned."}]},REGEXMATCH:{d:"Whether a piece of text matches a regular expression.",a:"Whether a piece of text matches regular expression.",p:[{name:"text",detail:"The text to be tested against the regular expression."},{name:"regular_expression",detail:"The regular expression to test the text against."}]},REGEXREPLACE:{d:"Replaces part of a text string with a different text string using regular expressions.",a:"Replaces text with regular expressions.",p:[{name:"text",detail:"The text, a part of which will be replaced."},{name:"regular_expression",detail:"The regular expression. All matching instances in `text` will be replaced."},{name:"replacement",detail:"The text which will be inserted into the original text."}]},T:{d:"Returns string arguments as text, or the empty string if the value is not text.",a:"String arguments as text.",p:[{name:"value",detail:"The argument to be converted to text."}]},FIXED:{d:"Formats a number with a fixed number of decimal places.",a:"Formats number with fixed number of decimal places.",p:[{name:"number",detail:"The number to format."},{name:"number_of_places",detail:"The number of decimal places to display in the result."},{name:"suppress_separator",detail:"Whether or not to suppress the thousands separator used in some locales (e.g. `1,000` becomes `1000`). Separators will be present if this value is 0 or omitted, and absent otherwise."}]},FIND:{d:"Returns the position at which a string is first found within text where the capitalization of letters matters. Returns `#VALUE!` if the string is not found.",a:"First position of string found in text, case-sensitive.",p:[{name:"search_for",detail:"The string to look for within `text_to_search`."},{name:"text_to_search",detail:"The text to search for the first occurrence of `search_for`."},{name:"starting_at",detail:"The character within `text_to_search` at which to start the search."}]},FINDB:{d:"Returns the position at which a string is first found within text counting each double-character as 2.",a:"Position at which a string is first found within text (binary).",p:[{name:"search_for",detail:"The string to look for within `text_to_search`."},{name:"text_to_search",detail:"The text to search for the first occurrence of `search_for`."},{name:"starting_at",detail:"The character within `text_to_search` at which to start the search."}]},JOIN:{d:"Concatenates the elements of one or more one-dimensional arrays using a specified delimiter.",a:"Concatenates elements of arrays with delimiter.",p:[{name:"delimiter",detail:"The character or string to place between each concatenated value."},{name:"value_or_array1",detail:"The value or values to be appended using `delimiter`."},{name:"value_or_array2",detail:"More values to be appended using `delimiter`."}]},LEFT:{d:"Returns a substring from the beginning of a specified string.",a:"Substring from beginning of specified string.",p:[{name:"string",detail:"The string from which the left portion will be returned."},{name:"number_of_characters",detail:"The number of characters to return from the left side of `string`."}]},RIGHT:{d:"Returns a substring from the end of a specified string.",a:"A substring from the end of a specified string.",p:[{name:"string",detail:"The string from which the right portion will be returned."},{name:"number_of_characters",detail:"The number of characters to return from the right side of `string`."}]},MID:{d:"Returns a segment of a string.",a:"A segment of a string.",p:[{name:"string",detail:"The string to extract a segment from."},{name:"starting_at",detail:"The index from the left of `string` from which to begin extracting. The first character in `string` has the index 1."},{name:"extract_length",detail:"The length of the segment to extract."}]},LEN:{d:"Returns the length of a string.",a:"Length of a string.",p:[{name:"text",detail:"The string whose length will be returned."}]},LENB:{d:"Returns the length of a string in bytes.",a:"Length of a string in bytes.",p:[{name:"text",detail:"The string whose length will be returned."}]},LOWER:{d:"Converts a specified string to lowercase.",a:"Converts a specified string to lowercase.",p:[{name:"text",detail:"The string to convert to lowercase."}]},UPPER:{d:"Converts a specified string to uppercase.",a:"Converts a specified string to uppercase.",p:[{name:"text",detail:"The string to convert to uppercase."}]},EXACT:{d:"Tests whether two strings are identical.",a:"Tests whether two strings are identical.",p:[{name:"string1",detail:"The first string to compare"},{name:"string2",detail:"The second string to compare"}]},REPLACE:{d:"Replaces part of a text string with a different text string.",a:"Replaces part of a text string with different text.",p:[{name:"text",detail:"The text, a part of which will be replaced."},{name:"position",detail:"The position where the replacement will begin (starting from 1)."},{name:"length",detail:"The number of characters in the text to be replaced."},{name:"new_text",detail:"The text which will be inserted into the original text."}]},REPT:{d:"Returns specified text repeated a number of times.",a:"Specified text repeated a number of times.",p:[{name:"text_to_repeat",detail:"The character or string to repeat."},{name:"number_of_repetitions",detail:"The number of times `text_to_repeat` should appear in the value returned."}]},SEARCH:{d:"Returns the position at which a string is first found within text and ignores capitalization of letters. Returns `#VALUE!` if the string is not found.",a:"First position of string found in text, ignoring case.",p:[{name:"search_for",detail:"The string to look for within `text_to_search`."},{name:"text_to_search",detail:"The text to search for the first occurrence of `search_for`."},{name:"starting_at",detail:"The character within `text_to_search` at which to start the search."}]},SUBSTITUTE:{d:"Replaces existing text with new text in a string.",a:"Replaces existing text with new text in a string.",p:[{name:"text_to_search",detail:"The text within which to search and replace."},{name:"search_for",detail:"The string to search for within `text_to_search`."},{name:"replace_with",detail:"The string that will replace `search_for`."},{name:"occurrence_number",detail:"The instance of `search_for` within `text_to_search` to replace with `replace_with`. By default, all occurrences of `search_for` are replaced; however, if `occurrence_number` is specified, only the indicated instance of `search_for` is replaced."}]},CLEAN:{d:"Returns the text with the non-printable ASCII characters removed.",a:"Removes non-printable characters from a piece of text.",p:[{name:"text",detail:"The text whose non-printable characters are to be removed."}]},TEXT:{d:"Converts a number into text according to a specified format.",a:"Formats a number into text.",p:[{name:"number",detail:"The number, date, or time to format."},{name:"format",detail:"The pattern by which to format the number, enclosed in quotation marks."}]},TRIM:{d:"Removes leading, trailing, and repeated spaces in text.",a:"Removes space characters.",p:[{name:"text",detail:"The text or reference to a cell containing text to be trimmed."}]},VALUE:{d:"Converts a string in any of the date, time or number formats that Google Sheets understands into a number.",a:"Converts a date/time/number string into a number.",p:[{name:"text",detail:"The string containing the value to be converted."}]},PROPER:{d:"Capitalizes each word in a specified string.",a:"Capitalizes each word in a specified string.",p:[{name:"text_to_capitalize",detail:"The text which will be returned with the first letter of each word in uppercase and all other letters in lowercase."}]},CONVERT:{d:"Converts a numeric value to a different unit of measure.",a:"Unit conversion for numbers.",p:[{name:"value",detail:"The numeric value in `start_unit` to convert to `end_unit`."},{name:"start_unit",detail:"The starting unit, the unit currently assigned to `value`."},{name:"end_unit",detail:"The unit of measure into which to convert the argument, `value`."}]},SUMX2MY2:{d:"Calculates the sum of the differences of the squares of values in two arrays.",a:"Sum of the differences of squares.",p:[{name:"array_x",detail:"The array or range of values whose squares will be reduced by the squares of corresponding entries in `array_y` and added together."},{name:"array_y",detail:"The array or range of values whose squares will be subtracted from the squares of corresponding entries in `array_x` and added together."}]},SUMX2PY2:{d:"Calculates the sum of the sums of the squares of values in two arrays.",a:"Sum of the sums of squares.",p:[{name:"array_x",detail:"The array or range of values whose squares will be added to the squares of corresponding entries in `array_y` and added together."},{name:"array_y",detail:"The array or range of values whose squares will be added to the squares of corresponding entries in `array_x` and added together."}]},SUMXMY2:{d:"Calculates the sum of the squares of differences of values in two arrays.",a:"Sum of the squares of differences.",p:[{name:"array_x",detail:"The array or range of values that will be reduced by corresponding entries in `array_y`, squared, and added together."},{name:"array_y",detail:"The array or range of values that will be subtracted from corresponding entries in `array_x`, the result squared, and all such results added together."}]},TRANSPOSE:{d:"Transposes the rows and columns of an array or range of cells.",a:"Transposes the rows and columns of an array.",p:[{name:"array_or_range",detail:"The array or range whose rows and columns will be swapped."}]},TREND:{d:"Given partial data about a linear trend, fits an ideal linear trend using the least squares method and/or predicts further values.",a:"Fits points to linear trend derived via least-squares.",p:[{name:"known_data_y",detail:"The array or range containing dependent (y) values that are already known, used to curve fit an ideal linear trend."},{name:"known_data_x",detail:"The values of the independent variable(s) corresponding with `known_data_y`."},{name:"new_data_x",detail:"The data points to return the `y` values for on the ideal curve fit."},{name:"b",detail:"Given a general linear form of `y = m*x+b` for a curve fit, calculates `b` if `TRUE` or forces `b` to be `0` and only calculates the `m` values if `FALSE`, i.e. forces the curve fit to pass through the origin."}]},FREQUENCY:{d:"Calculates the frequency distribution of a one-column array into specified classes.",a:"The frequency distribution of array.",p:[{name:"data",detail:"The array or range containing the values to be counted."},{name:"classes",detail:"The array or range containing the set of classes."}]},GROWTH:{d:"Given partial data about an exponential growth trend, fits an ideal exponential growth trend and/or predicts further values.",a:"Fits points to exponential growth trend.",p:[{name:"known_data_y",detail:"The array or range containing dependent (y) values that are already known, used to curve fit an ideal exponential growth curve."},{name:"known_data_x",detail:"The values of the independent variable(s) corresponding with `known_data_y`."},{name:"new_data_x",detail:"The data points to return the `y` values for on the ideal curve fit."},{name:"b",detail:"Given a general exponential form of `y = b*m^x` for a curve fit, calculates `b` if `TRUE` or forces `b` to be `1` and only calculates the `m` values if `FALSE`."}]},LINEST:{d:"Given partial data about a linear trend, calculates various parameters about the ideal linear trend using the least-squares method.",a:"Best-fit linear trend via least-squares.",p:[{name:"known_data_y",detail:"The array or range containing dependent (y) values that are already known, used to curve fit an ideal linear trend."},{name:"known_data_x",detail:"The values of the independent variable(s) corresponding with `known_data_y`."},{name:"calculate_b",detail:"Given a linear form of `y = m*x+b`, calculates the y-intercept (`b`) if `TRUE`. Otherwise, forces `b` to be `0` and only calculates the `m` values if `FALSE`, i.e. forces the curve fit to pass through the origin."},{name:"verbose",detail:"A flag specifying whether to return additional regression statistics or only the linear coefficients and the y-intercept (default)."}]},LOGEST:{d:"Given partial data about an exponential growth curve, calculates various parameters about the best fit ideal exponential growth curve.",a:"Best-fit exponential growth curve.",p:[{name:"known_data_y",detail:"The array or range containing dependent (y) values that are already known, used to curve fit an ideal exponential growth curve."},{name:"known_data_x",detail:"The values of the independent variable(s) corresponding with `known_data_y`."},{name:"b",detail:"Given a general exponential form of `y = b*m^x` for a curve fit, calculates `b` if `TRUE` or forces `b` to be `1` and only calculates the `m` values if `FALSE`."},{name:"verbose",detail:"A flag specifying whether to return additional regression statistics or only the calculated coefficient and exponents."}]},MDETERM:{d:"Returns the matrix determinant of a square matrix specified as an array or range.",a:"Matrix determinant of a square matrix.",p:[{name:"square_matrix",detail:"An array or range with an equal number of rows and columns representing a matrix whose determinant will be calculated."}]},MINVERSE:{d:"Returns the multiplicative inverse of a square matrix specified as an array or range.",a:"Multiplicative inverse of square matrix.",p:[{name:"square_matrix",detail:"An array or range with an equal number of rows and columns representing a matrix whose multiplicative inverse will be calculated."}]},MMULT:{d:"Calculates the matrix product of two matrices specified as arrays or ranges.",a:"The matrix product of two matrices.",p:[{name:"matrix1",detail:"The first matrix in the matrix multiplication operation, represented as an array or range."},{name:"matrix2",detail:"The second matrix in the matrix multiplication operation, represented as an array or range."}]},SUMPRODUCT:{d:"Calculates the sum of the products of corresponding entries in two equal-sized arrays or ranges.",a:"Sum of products of elements in two arrays.",p:[{name:"array1",detail:"The first array or range whose entries will be multiplied with corresponding entries in the second such array or range."},{name:"array2",detail:"The second array or range whose entries will be multiplied with corresponding entries in the first such array or range."}]},ISFORMULA:{d:"Checks whether a value is a formula.",a:"Whether a value is a formula.",p:[{name:"cell",detail:"The cell to be verified as containing a formula."}]},CELL:{d:"Returns the requested information about the specified cell.",a:"Gets information about a cell.",p:[{name:"info_type",detail:"The type of information requested (see article for available types)"},{name:"reference",detail:"The reference to the cell."}]},NA:{d:'Returns the "value not available" error, `#N/A`.',a:"The `#N/A` error.",p:[]},ERROR_TYPE:{d:"Returns a number corresponding to the error value in a different cell.",a:"Error value of cell (as number).",p:[{name:"reference",detail:"The cell to find the error number for although you can also provide the error value directly."}]},ISBLANK:{d:"Checks whether the referenced cell is empty.",a:"Whether the referenced cell is empty.",p:[{name:"value",detail:"Reference to the cell that will be checked for emptiness."}]},ISERR:{d:"Checks whether a value is an error other than `#N/A`.",a:"Whether a value is an error other than `#n/a`.",p:[{name:"value",detail:"The value to be verified as an error type other than `#N/A`."}]},ISERROR:{d:"Checks whether a value is an error.",a:"Whether a value is an error.",p:[{name:"value",detail:"The value to be verified as an error type."}]},ISLOGICAL:{d:"Checks whether a value is `TRUE` or `FALSE`.",a:"Whether a value is `true` or `false`.",p:[{name:"value",detail:"The value to be verified as a logical `TRUE` or `FALSE`."}]},ISNA:{d:"Checks whether a value is the error `#N/A`.",a:"Whether a value is the error `#n/a`.",p:[{name:"value",detail:"The value to be compared with the error value `#N/A`."}]},ISNONTEXT:{d:"Checks whether a value is non-textual.",a:"Whether a value is non-textual.",p:[{name:"value",detail:"The value to be checked."}]},ISNUMBER:{d:"Checks whether a value is a number.",a:"Whether a value is a number.",p:[{name:"value",detail:"The value to be verified as a number."}]},ISREF:{d:"Checks whether a value is a valid cell reference.",a:"Whether a value is a valid cell reference.",p:[{name:"value",detail:"The value to be verified as a cell reference."}]},ISTEXT:{d:"Checks whether a value is text.",a:"Whether a value is text.",p:[{name:"value",detail:"The value to be verified as text."}]},TYPE:{d:"Returns a number associated with the type of data passed into the function.",a:"Get the type of a value.",p:[{name:"value",detail:"The value whose type is to be determined."}]},N:{d:"Returns the argument provided as a number. Text is converted to 0 and errors are returned as-is.",a:"Argument provided as a number.",p:[{name:"value",detail:"The argument to be converted to a number."}]},TO_DATE:{d:"Converts a provided number to a date.",a:"Converts a provided number to a date.",p:[{name:"value",detail:"The argument or reference to a cell to be converted to a date."}]},TO_PURE_NUMBER:{d:"Converts a provided date/time, percentage, currency or other formatted numeric value to a pure number without formatting.",a:"Converts any numeric value to a pure number.",p:[{name:"value",detail:"The argument or reference to a cell to be converted to a pure number."}]},TO_TEXT:{d:"Converts a provided numeric value to a text value.",a:"Converts a provided numeric value to a text value.",p:[{name:"value",detail:"The argument or reference to a cell to be converted to text."}]},TO_DOLLARS:{d:"Converts a provided number to a dollar value.",a:"Converts a provided number to a dollar value.",p:[{name:"value",detail:"The argument or reference to a cell to be converted to a dollar value."}]},TO_PERCENT:{d:"Converts a provided number to a percentage.",a:"Converts a provided number to a percentage.",p:[{name:"value",detail:"The argument or reference to a cell to be converted to a percentage."}]},DGET:{d:"Returns a single value from a database table-like array or range using a SQL-like query.",a:"Single value from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DMAX:{d:"Returns the maximum value selected from a database table-like array or range using a SQL-like query.",a:"Maximum of values from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DMIN:{d:"Returns the minimum value selected from a database table-like array or range using a SQL-like query.",a:"Minimum of values from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DAVERAGE:{d:"Returns the average of a set of values selected from a database table-like array or range using a SQL-like query.",a:"Average of a set of values from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DCOUNT:{d:"Counts numeric values selected from a database table-like array or range using a SQL-like query.",a:"Counts values from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DCOUNTA:{d:"Counts values, including text, selected from a database table-like array or range using a SQL-like query.",a:"Counts values and text from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DPRODUCT:{d:"Returns the product of values selected from a database table-like array or range using a SQL-like query.",a:"Product of values from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DSTDEV:{d:"Returns the standard deviation of a population sample selected from a database table-like array or range using a SQL-like query.",a:"Standard deviation of population sample from table.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DSTDEVP:{d:"Returns the standard deviation of an entire population selected from a database table-like array or range using a SQL-like query.",a:"Standard deviation of entire population from table.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DSUM:{d:"Returns the sum of values selected from a database table-like array or range using a SQL-like query.",a:"Sum of values from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DVAR:{d:"Returns the variance of a population sample selected from a database table-like array or range using a SQL-like query.",a:"Variance of population sample from table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},DVARP:{d:"Returns the variance of an entire population selected from a database table-like array or range using a SQL-like query.",a:"Variance of a population from a table-like range.",p:[{name:"database",detail:"The array or range containing the data to consider, structured in such a way that the first row contains the labels for each column's values."},{name:"field",detail:"Indicates which column in `database` contains the values to be extracted and operated on."},{name:"criteria",detail:"An array or range containing zero or more criteria to filter the `database` values by before operating."}]},AGE_BY_IDCARD:{d:"Calculate the age based on the Chinese ID number. Support 15 or 18",a:"Get age based on ID number.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."},{name:"Deadline",detail:"The deadline or range of age calculation. The default is the current day."}]},SEX_BY_IDCARD:{d:"Calculate gender based on Chinese ID number. Support 15 or 18",a:"Get gender based on ID number.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."}]},BIRTHDAY_BY_IDCARD:{d:"Calculate the birthday based on the Chinese ID number. Support 15 or 18",a:"Get the birthday based on the ID number.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."},{name:"Birthday format",detail:"Date type, default:0:[1900/01/01], 1:[1900-01-01], 2:[1900\u5E741\u67081\u65E5]"}]},PROVINCE_BY_IDCARD:{d:"Calculate the province of birthplace based on the Chinese ID number. Support 15 or 18",a:"Get the province of birthplace based on the ID number.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."}]},CITY_BY_IDCARD:{d:"Calculate the city of birthplace based on the Chinese ID number. Support 15 or 18",a:"Get the city of birthplace based on the ID number.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."}]},STAR_BY_IDCARD:{d:"Calculate the constellation based on the Chinese ID number. Support 15 or 18",a:"Get the constellation based on the ID number.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."}]},ANIMAL_BY_IDCARD:{d:"Calculate the zodiac (rat, ox, tiger, rabbit...) based on the Chinese ID number. Support 15 or 18",a:"Get the zodiac according to the ID number.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."}]},ISIDCARD:{d:"Verify that the format of the ID card is correct. Support 15 or 18",a:"Verify the correctness of the ID card format.",p:[{name:"ID number",detail:"15-digit or 18-digit ID number or range."}]},DM_TEXT_CUTWORD:{d:"Text segmentation. Split a series of words into a series of individual words",a:"Chinese text segmentation.",p:[{name:"Text",detail:"Any text that needs word segmentation."},{name:"Word segmentation mode",detail:"The default is 0[precision mode], 1[full mode], 2[search engine mode]."}]},DM_TEXT_TFIDF:{d:"Use tf-idf algorithm for keyword extraction. Identify keywords from a series of text",a:"tf-idf keyword recognition.",p:[{name:"Text",detail:"Any text that needs word segmentation."},{name:"Number of keywords",detail:"The number of keywords returned by the algorithm, the default is 20"},{name:"Corpus",detail:"Select a corpus in a specific field, the default is 0[General], 1[Finance], 2[Medical]"}]},DM_TEXT_TEXTRANK:{d:"Use TextRank algorithm to extract keywords. Identify keywords from a series of text",a:"TextRank keyword recognition.",p:[{name:"Text",detail:"Any text that needs word segmentation."},{name:"Number of keywords",detail:"The number of keywords returned by the algorithm, the default is 20"},{name:"Corpus",detail:"Select a corpus in a specific field, the default is 0[General], 1[Finance], 2[Medical]"}]},DATA_CN_STOCK_CLOSE:{d:"According to the stock code and date, return the corresponding stock closing price of A shares.",a:"Returns the closing price of stock.",p:[{name:"Stock code",detail:"6-digit stock code, required."},{name:"Date",detail:"The trading day of the stock, the default is the latest trading day"},{name:"Reversion and exclusion",detail:"Select the ex right restoration type of the stock, default to 0 [former reversion], 1 [original price], 2 [post reversion]"}]},DATA_CN_STOCK_OPEN:{d:"According to the stock code and date, return the opening price of stock.",a:"Return the opening price of a shares.",p:[{name:"Stock code",detail:"6-digit stock code, required."},{name:"Date",detail:"The trading day of the stock, the default is the latest trading day"},{name:"Reversion and exclusion",detail:"Select the ex right restoration type of the stock, default to 0 [former reversion], 1 [original price], 2 [post reversion]"}]},DATA_CN_STOCK_MAX:{d:"According to the stock code and date, return the highest price of stock.",a:"Return the highest price of stock.",p:[{name:"Stock code",detail:"6-digit stock code, required."},{name:"Date",detail:"The trading day of the stock, the default is the latest trading day"},{name:"Reversion and exclusion",detail:"Select the ex right restoration type of the stock, default to 0 [former reversion], 1 [original price], 2 [post reversion]"}]},DATA_CN_STOCK_MIN:{d:"According to the stock code and date, return the lowest price of stock.",a:"Returns the lowest price of stock.",p:[{name:"Stock code",detail:"6-digit stock code, required."},{name:"Date",detail:"The trading day of the stock, the default is the latest trading day"},{name:"Reversion and exclusion",detail:"Select the ex right restoration type of the stock, default to 0 [former reversion], 1 [original price], 2 [post reversion]"}]},DATA_CN_STOCK_VOLUMN:{d:"According to the stock code and date, return the corresponding stock trading volume of A shares.",a:"Returns the corresponding stock trading volume of A shares.",p:[{name:"Stock code",detail:"6-digit stock code, required."},{name:"Date",detail:"The trading day of the stock, the default is the latest trading day"},{name:"Reversion and exclusion",detail:"Select the ex right restoration type of the stock, default to 0 [former reversion], 1 [original price], 2 [post reversion]"}]},DATA_CN_STOCK_AMOUNT:{d:"According to the stock code and date, return the corresponding stock turnover of A shares.",a:"Returns the corresponding stock turnover of A shares.",p:[{name:"Stock code",detail:"6-digit stock code, required."},{name:"Date",detail:"The trading day of the stock, the default is the latest trading day"},{name:"Reversion and exclusion",detail:"Select the ex right restoration type of the stock, default to 0 [former reversion], 1 [original price], 2 [post reversion]"}]},ISDATE:{d:"Returns whether a value is a date.",a:"Whether a value is a date.",p:[{name:"value",detail:"The value to be verified as a date."}]},LINESPLINES:{d:"Generate sparklines embedded in the cell to describe the continuous trend of data",a:"Generate sparklines line chart",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Line color",detail:"The line color of the line graph can be range A1, color table index value or specific color value. Set it to 0 or false to not display it. It supports regx, rgb, rgba, etc. Default #2ec7c9"},{name:"Line thickness",detail:"Line thickness of the line graph, the default is 1px"},{name:"Auxiliary line",detail:"A horizontal line, which can be min, max, avg, median, range or custom value, default 0 none"},{name:"Auxiliary line color",detail:"Color setting of auxiliary line, same as line color configuration, default #000"},{name:"Maximum mark",detail:"Identifies the maximum value of the line graph, the same line color configuration, default 0 does not display"},{name:"Minimum mark",detail:"Identify the minimum value of the line graph, the same line color configuration, default 0 does not display"},{name:"Mark size",detail:"The maximum and minimum mark size settings, the default is 1.5"}]},AREASPLINES:{d:"Generate sparklines embedded in the cell area chart, generally used to describe the continuous cumulative value trend of the data",a:"Generate sparklines area chart",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Line color",detail:"The line color of the line graph can be range A1, color table index value or specific color value. Set it to 0 or false to not display it. It supports regx, rgb, rgba, etc. Default #2ec7c9"},{name:"Fill color",detail:"Form an area chart, the same line color configuration, default 0 does not display"},{name:"Line thickness",detail:"Line thickness of the line graph, the default is 1px"},{name:"Auxiliary line",detail:"A horizontal line, which can be min, max, avg, median, range or custom value, default 0 none"},{name:"Auxiliary line color",detail:"Color setting of auxiliary line, same as line color configuration, default #000"}]},COLUMNSPLINES:{d:"Generate sparklines embedded in the vertical histogram of cells, generally used to describe the size of discrete data",a:"Generate sparklines vertical histogram",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Bar interval",detail:"The distance between bars, the default is 1"},{name:"Bar color",detail:"The line color of the line graph can be range A1, color table index value or specific color value. Set it to 0 or false to not display it. It supports regx, rgb, rgba, etc. Default #fc5c5c"},{name:"Negative bar color",detail:"Negative bar color setting, representing the color of negative value, same as the bar color configuration, default #97b552"},{name:"Max",detail:"The maximum value of the bar chart, used to standardize the length of the bar chart, the default is to automatically calculate false, auto, null"},{name:"Color palette",detail:"The color palette can set the color of each bar individually, multiple settings can be set, and two formats are supported: 1 color such as #000, which means that the color of the first bar is black; 2 value range: color, such as -2:# 000 indicates that the bar with a value of -2 is black, 0:5:#000 indicates that the bar with a value of 0-5 is black, and the default is empty"}]},STACKCOLUMNSPLINES:{d:"Generate sparklines, a cumulative vertical histogram embedded in a cell, generally used to describe the numerical size of multiple dimensions of discrete data",a:"Generate sparklines cumulative vertical histogram",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Stack by column",detail:"If you need to stack by row, set this item to false or 0, the default is 1"},{name:"Bar interval",detail:"The distance between bars, the default is 1"},{name:"Max",detail:"The maximum value of the cumulative bar, used to regulate the length of the bar, the default is to automatically calculate false, auto, null"},{name:"Color palette",detail:"The color palette can individually set the bar color of each dimension, which can be set to the range of A1:A10, etc. The default is #2ec7c9, #fc5c5c, #5ab1ef, #ffb980..."}]},BARSPLINES:{d:"Generate sparklines embedded in the cell, generally used to describe the size of discrete data",a:"Generate sparklines horizontal bar graph",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Bar interval",detail:"The distance between bars, the default is 1"},{name:"Bar color",detail:"The line color of the line graph can be range A1, color table index value or specific color value. Set it to 0 or false to not display it. It supports regx, rgb, rgba, etc. Default #fc5c5c"},{name:"Negative bar color",detail:"Negative bar color setting, representing the color of negative value, same as the bar color configuration, default #97b552"},{name:"Max",detail:"The maximum value of the bar chart, used to standardize the length of the bar chart, the default is to automatically calculate false, auto, null"},{name:"Color palette",detail:"The color palette can set the color of each bar individually, multiple settings can be set, and two formats are supported: 1 color such as #000, which means that the color of the first bar is black; 2 value range: color, such as -2:# 000 indicates that the bar with a value of -2 is black, 0:5:#000 indicates that the bar with a value of 0-5 is black, and the default is empty"}]},STACKBARSPLINES:{d:"Generate sparklines, a cumulative horizontal bar graph embedded in a cell, which is generally used to describe the numerical size of multiple dimensions of discrete data",a:"Generate sparklines cumulative horizontal bar graph",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Stack by column",detail:"If you need to stack by row, set this item to false or 0, the default is 1"},{name:"Bar interval",detail:"The distance between bars, the default is 1"},{name:"Max",detail:"The maximum value of the cumulative bar, used to regulate the length of the bar, the default is to automatically calculate false, auto, null"},{name:"Color palette",detail:"The color palette can individually set the bar color of each dimension, which can be set to the range of A1:A10, etc. The default is #2ec7c9, #fc5c5c, #5ab1ef, #ffb980..."}]},DISCRETESPLINES:{d:"Generate sparklines embedded in the cell, generally used to describe the trend of discrete data",a:"Generate sparklines discrete graph",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Segmentation threshold",detail:"Discrete graph column color distinction, for example: if the value is 0, blue is greater than 0, red is less than 0, and the default is 0"},{name:"Above threshold color",detail:"The line color of the line graph can be range A1, color table index value or specific color value. Set it to 0 or false to not display it. It supports regx, rgb, rgba, etc. Default #2ec7c9"},{name:"Below threshold color",detail:"The color setting of the bar below the threshold, the same as the color above the threshold, default #fc5c5c"}]},TRISTATESPLINES:{d:"Generate sparklines, a three-state graph embedded in the cell, which is generally used to describe the trend of three situations, such as winning, losing, or drawing.",a:"Generate sparklines three-state graph",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Bar interval",detail:"The distance between bars, the default is 1"},{name:"Bar color",detail:"The line color of the line graph can be range A1, color table index value or specific color value. Set it to 0 or false to not display it. It supports regx, rgb, rgba, etc. Default #fc5c5c"},{name:"Negative bar color",detail:"Negative bar color setting, representing the color of negative value, same as the bar color configuration, default #97b552"},{name:"Zero value bar color",detail:"Zero value bar color setting, representing 0 value color, the same color configuration of the bar, default #999"},{name:"Color palette",detail:"The color palette can set the color of each bar individually, multiple settings can be set, and two formats are supported: 1 color such as #000, which means that the color of the first bar is black; 2 value range: color, such as -2:# 000 indicates that the bar with a value of -2 is black, 0:5:#000 indicates that the bar with a value of 0-5 is black, and the default is empty"}]},PIESPLINES:{d:"Generate sparklines pie chart embedded in the cell, generally used to describe the proportion of data",a:"Generate sparklines pie chart",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Rotation angle",detail:"The rotation angle of the pie chart, the default is 0"},{name:"border",detail:"Pie chart border size, default is none 0"},{name:"Border color",detail:"The border color of the pie chart, the default is #000"},{name:"Color palette",detail:"The color of the slice can be set in the palette, which can be set to the range of A1:A10, etc. The default is #2ec7c9, #fc5c5c, #5ab1ef, #ffb980..."}]},BOXSPLINES:{d:"Generate sparklines embedded in the cell box plot, generally used to describe the statistical distribution of the data set",a:"Generate sparklines box plot",p:[{name:"Range",detail:"Range\uFF0CValues can be calculated effectively, such as A1:A20, {1,2,3,4,5}, etc."},{name:"Outlier ratio",detail:"The threshold range of outliers, if it is 0 or false, it will not be displayed, the default is 1.5 times"},{name:"Target value",detail:"The target value setting on the box plot, the default is false and does not display"},{name:"Point size",detail:"The radius of the target point and outlier is set, the default is 1.5"}]},BULLETSPLINES:{d:"Generate sparklines embedded in the cell, generally used to describe the task achievement rate",a:"Generating sparklines bullets",p:[{name:"Target",detail:"The numerical value can be calculated effectively for the achieved target value, such as A1, 100, etc."},{name:"achieved",detail:"Only when the value is completed can the value be calculated effectively, such as A1, 100, etc."},{name:"Contrast",detail:"Comparative values, such as excess, minimum, and bottom line for awards, can be effectively calculated, such as A1, 100, etc. You can set up to 9 comparison values"}]},COMPOSESPLINES:{d:"Support multiple types of pictures in the same cell, each parameter represents a sparklines diagram",a:"Combine sparklines graphs into one cell",p:[{name:"config",detail:"Sparklines chart settings, such as A1:A20, a completed pie chart, line chart settings, etc."}]},SORT:{d:"Sorts the rows of a given array or range by the values in one or more columns.",a:"Sorts rows of range by specified column.",p:[{name:"range",detail:"The data to be sorted."},{name:"sort_column",detail:"The index of the column in `range` or a range outside of `range` containing the values by which to sort."},{name:"is_ascending",detail:"`TRUE` or `FALSE` indicating whether to sort `sort_column` in ascending order. `FALSE` sorts in descending order."},{name:"sort_column2",detail:"Additional columns."}]},FILTER:{d:"Returns a filtered version of the source range, returning only rows or columns which meet the specified conditions.",a:"Filters a range based off provided conditions.",p:[{name:"range",detail:"The data to be filtered."},{name:"condition1",detail:"A column or row containing true or false values corresponding to the first column or row of `range`, or an array formula evaluating to true or false."},{name:"condition2",detail:"Additional rows or columns containing boolean values `TRUE` or `FALSE` indicating whether the corresponding row or column in `range` should pass through `FILTER`. Can also contain array formula expressions which evaluate to such rows or columns. All conditions must be of the same type (row or column). Mixing row conditions and column conditions is not permitted."}]},UNIQUE:{d:"Returns unique rows in the provided source range, discarding duplicates. Rows are returned in the order in which they first appear in the source range.",a:"Unique rows in the provided source range.",p:[{name:"range",detail:"The data to filter by unique entries."},{name:"by_col",detail:"[Option] - Logical value, indicating how to compare; by row = FALSE() or omitted; by column = TRUE()."},{name:"occurs_once",detail:"[Option] - Logical value, only one occurrence in the unique value is returned = TRUE(); including all unique values = FALSE() or omitted."}]},RANDARRAY:{d:"Returns a grid of random numbers between 0 inclusive and 1 exclusive. The grid size will match the provided rows and columns arguments. If neither rows nor columns are provided, then the grid will be size 1 x 1.",a:"Returns a grid of random numbers.",p:[{name:"rows",detail:"The number of rows to populate with a random number."},{name:"columns",detail:"The number of columns to populate with a random number."}]},SEQUENCE:{d:"Returns a grid of sequential numbers starting at a specified start value and increasing by a specified step size. By default, the sequence starts at and increases by 1.",a:"Returns a grid of sequential numbers.",p:[{name:"rows",detail:"The number of rows in the function's resulting grid."},{name:"columns",detail:"The number of columns in the function's resulting grid. If omitted, the result grid will have 1 column."},{name:"start",detail:"The number, at which to start the sequence. If omitted, the sequence will start at 1."},{name:"step",detail:"The amount each value in the sequence will differ by. If omitted, each value will differ by 1."}]},EVALUATE:{d:"Evaluate a formula or expression expressed in words and return the result",a:"Evaluate according to literal formula or expression.",p:[{name:"expression",detail:"Formula or expression"}]},REMOTE:{d:"Calls a function on a remote server",a:"Calls a function on a remote back end server/API.",p:[{name:"remote_expression",detail:"Formula"}]}},toolbar:{undo:"Undo",redo:"Redo",paintFormat:"Paint format",currencyFormat:"Format as currency",percentageFormat:"Format as percent",numberDecrease:"Decrease decimal places",numberIncrease:"Increase decimal places",moreFormats:"More formats",font:"Font",fontSize:"Font size",bold:"Bold (Ctrl+B)",italic:"Italic (Ctrl+I)",strikethrough:"Strikethrough (Alt+Shift+5)",underline:"Underline",textColor:"Text color",chooseColor:"choose color",resetColor:"Reset",customColor:"CUSTOM",alternatingColors:"Alternating colors",confirmColor:"OK",cancelColor:"Cancel",collapse:"Collapse",fillColor:"Fill color",border:"Border",borderStyle:"Border style",mergeCell:"Merge cells",chooseMergeType:"Choose merge type",horizontalAlign:"Horizontal align",verticalAlign:"Vertical align",alignment:"Alignment",textWrap:"Text wrap",textWrapMode:"Text wrap mode",textRotate:"Text rotate",textRotateMode:"Text rotate mode",freezeTopRow:"Freeze first row",sortAndFilter:"Sort and filter",findAndReplace:"Find and replace",sum:"SUM",autoSum:"Auto SUM",moreFunction:"More functions",conditionalFormat:"Conditional format",postil:"Comment",pivotTable:"Pivot Table",chart:"Chart",screenshot:"Screenshot",splitColumn:"Split text",insertImage:"Insert image",insertLink:"Insert link",dataVerification:"Data verification",protection:"Protect the sheet",clearText:"Clear color",noColorSelectedText:"No color is selected",toolMore:"More",toolLess:"Less",toolClose:"Close",toolMoreTip:"More features",moreOptions:"More options",cellFormat:"Cell format config",print:"Print"},alternatingColors:{applyRange:"Apply to range",selectRange:"Select a data range",header:"Header",footer:"Footer",errorInfo:"Cannot perform this operation on multiple selection areas, please select a single area and try again",textTitle:"Format style",custom:"CUSTOM",close:"close",selectionTextColor:"Click to select text color",selectionCellColor:"Click to select cell color",removeColor:"Remove alternating colors",colorShow:"color",currentColor:"Current",tipSelectRange:"Please select the range of alternating colors",errorNoRange:"No range is selected",errorExistColors:"Alternating colors already exist and cannot be edited"},button:{confirm:"OK",cancel:"Cancel",close:"Close",update:"Update",delete:"Delete",insert:"Insert",prevPage:"Previous",nextPage:"Next",total:"total:"},paint:{start:"Paint format start",end:"ESC",tipSelectRange:"Please select the range to be copied",tipNotMulti:"Cannot perform this operation on multiple selection ranges"},format:{moreCurrency:"More currency formats",moreDateTime:"More date and time formats",moreNumber:"More number formats",titleCurrency:"Currency formats",decimalPlaces:"Decimal places",titleDateTime:"Date and time formats",titleNumber:"Number formats"},info:{detailUpdate:"New opened",detailSave:"Local cache restored",row:"",column:"",loading:"Loading...",copy:"Copy",return:"Exit",rename:"Rename",tips:"WorkBook rename",noName:"Untitled spreadsheet",wait:"waiting for update",add:"Add",addLast:"more rows at bottom",backTop:"Back to the top",pageInfo:"Total ${total}\uFF0C${totalPage} page\uFF0Ccurrent ${currentPage}",nextPage:"Next",tipInputNumber:"Please enter the number",tipInputNumberLimit:"The increase range is limited to 1-100",tipRowHeightLimit:"Row height must be between 0 ~ 545",tipColumnWidthLimit:"The column width must be between 0 ~ 2038",pageInfoFull:"Total ${total}\uFF0C${totalPage} page\uFF0CAll data displayed"},currencyDetail:{RMB:"RMB",USdollar:"US dollar",EUR:"EUR",GBP:"GBP",HK:"HK",JPY:"JPY",AlbanianLek:"Albanian Lek",AlgerianDinar:"Algerian Dinar",Afghani:"Afghani",ArgentinePeso:"Argentine Peso",UnitedArabEmiratesDirham:"United Arab Emirates Dirham",ArubanFlorin:"Aruban Florin",OmaniRial:"Omani Rial",Azerbaijanimanat:"Azerbaijani manat",EgyptianPound:"Egyptian Pound",EthiopianBirr:"Ethiopian Birr",AngolaKwanza:"Angola Kwanza",AustralianDollar:"Australian Dollar",Patacas:"Patacas",BarbadosDollar:"Barbados Dollar",PapuaNewGuineaKina:"Papua New Guinea Kina",BahamianDollar:"Bahamian Dollar",PakistanRupee:"Pakistan Rupee",ParaguayanGuarani:"Paraguayan Guarani",BahrainiDinar:"Bahraini Dinar",PanamanianBalboa:"Panamanian Balboa",Brazilianreal:"Brazilian real",Belarusianruble:"Belarusian ruble",BermudianDollar:"Bermudian Dollar",BulgarianLev:"Bulgarian Lev",IcelandKrona:"Iceland Krona",BosniaHerzegovinaConvertibleMark:"Bosnia-Herzegovina Convertible Mark",PolishZloty:"Polish Zloty",Boliviano:"Boliviano",BelizeDollar:"Belize Dollar",BotswanaPula:"Botswana Pula",NotDannuzhamu:"Not Dannuzhamu",BurundiFranc:"Burundi Franc",NorthKoreanWon:"North Korean Won",DanishKrone:"Danish Krone",EastCaribbeanDollar:"East Caribbean Dollar",DominicaPeso:"Dominica Peso",RussianRuble:"Russian Ruble",EritreanNakfa:"Eritrean Nakfa",CFAfranc:"CFA franc",PhilippinePeso:"Philippine Peso",FijiDollar:"Fiji Dollar",CapeVerdeEscudo:"Cape Verde Escudo",FalklandIslandsPound:"Falkland Islands Pound",GambianDalasi:"Gambian Dalasi",Congolesefranc:"Congolese franc",ColombianPeso:"Colombian Peso",CostaRicanColon:"Costa Rican Colon",CubanPeso:"Cuban Peso",Cubanconvertiblepeso:"Cuban convertible peso",GuyanaDollar:"Guyana Dollar",KazakhstanTenge:"Kazakhstan Tenge",Haitiangourde:"Haitian gourde",won:"won",NetherlandsAntillesGuilder:"Netherlands Antilles Guilder",Honduraslempiras:"Honduras lempiras",DjiboutiFranc:"Djibouti Franc",KyrgyzstanSom:"Kyrgyzstan Som",GuineaFranc:"Guinea Franc",CanadianDollar:"Canadian Dollar",GhanaianCedi:"Ghanaian Cedi",Cambodianriel:"Cambodian riel",CzechKoruna:"Czech Koruna",ZimbabweDollar:"Zimbabwe Dollar",QatariRiyal:"Qatari Riyal",CaymanIslandsDollar:"Cayman Islands Dollar",Comorianfranc:"Comorian franc",KuwaitiDinar:"Kuwaiti Dinar",CroatianKuna:"Croatian Kuna",KenyanShilling:"Kenyan Shilling",LesothoLoti:"Lesotho Loti",LaoKip:"Lao Kip",LebanesePound:"Lebanese Pound",Lithuanianlitas:"Lithuanian litas",LibyanDinar:"Libyan Dinar",LiberianDollar:"Liberian Dollar",RwandaFranc:"Rwanda Franc",RomanianLeu:"Romanian Leu",MalagasyAriary:"Malagasy Ariary",MaldivianRufiyaa:"Maldivian Rufiyaa",MalawiKwacha:"Malawi Kwacha",MalaysianRinggit:"Malaysian Ringgit",MacedoniawearingDinar:"Macedonia wearing Dinar",MauritiusRupee:"Mauritius Rupee",MauritanianOuguiya:"Mauritanian Ouguiya",MongolianTugrik:"Mongolian Tugrik",BangladeshiTaka:"Bangladeshi Taka",PeruvianNuevoSol:"Peruvian Nuevo Sol",MyanmarKyat:"Myanmar Kyat",MoldovanLeu:"Moldovan Leu",MoroccanDirham:"Moroccan Dirham",MozambiqueMetical:"Mozambique Metical",MexicanPeso:"Mexican Peso",NamibianDollar:"Namibian Dollar",SouthAfricanRand:"South African Rand",SouthSudanesePound:"South Sudanese Pound",NicaraguaCordoba:"Nicaragua Cordoba",NepaleseRupee:"Nepalese Rupee",NigerianNaira:"Nigerian Naira",NorwegianKrone:"Norwegian Krone",GeorgianLari:"Georgian Lari",RMBOffshore:"RMB (Offshore)",SwedishKrona:"Swedish Krona",SwissFranc:"Swiss Franc",SerbianDinar:"Serbian Dinar",SierraLeone:"Sierra Leone",SeychellesRupee:"Seychelles Rupee",SaudiRiyal:"Saudi Riyal",SaoTomeDobra:"Sao Tome Dobra",SaintHelenapound:"Saint Helena pound",SriLankaRupee:"Sri Lanka Rupee",SwazilandLilangeni:"Swaziland Lilangeni",SudanesePound:"Sudanese Pound",Surinamesedollar:"Surinamese dollar",SolomonIslandsDollar:"Solomon Islands Dollar",SomaliShilling:"Somali Shilling",TajikistanSomoni:"Tajikistan Somoni",PacificFranc:"Pacific Franc",ThaiBaht:"Thai Baht",TanzanianShilling:"Tanzanian Shilling",TonganPaanga:"Tongan Pa'anga",TrinidadandTobagoDollar:"Trinidad and Tobago Dollar",TunisianDinar:"Tunisian Dinar",TurkishLira:"Turkish Lira",VanuatuVatu:"Vanuatu Vatu",GuatemalanQuetzal:"Guatemalan Quetzal",CommissionBolivar:"Commission Bolivar",BruneiDollar:"Brunei Dollar",UgandanShilling:"Ugandan Shilling",UkrainianHryvnia:"Ukrainian Hryvnia",UruguayanPeso:"Uruguayan Peso",Uzbekistansom:"Uzbekistan som",WesternSamoaTala:"Western Samoa Tala",SingaporeDollar:"Singapore Dollar",NT:"NT",NewZealandDollar:"New Zealand Dollar",HungarianForint:"Hungarian Forint",SyrianPound:"Syrian Pound",JamaicanDollar:"Jamaican Dollar",ArmenianDram:"Armenian Dram",YemeniRial:"Yemeni Rial",IraqiDinar:"Iraqi Dinar",IranianRial:"Iranian Rial",NewIsraeliShekel:"New Israeli Shekel",IndianRupee:"Indian Rupee",IndonesianRupiah:"Indonesian Rupiah",JordanianDinar:"Jordanian Dinar",VND:"VND",ZambianKwacha:"Zambian Kwacha",GibraltarPound:"Gibraltar Pound",ChileanPeso:"Chilean Peso",CFAFrancBEAC:"CFA Franc BEAC"},defaultFmt:[{text:"Automatic",value:"General",example:""},{text:"Plain text",value:"@",example:""},{text:"",value:"split",example:""},{text:"Number",value:"##0.00",example:"1000.12"},{text:"Percent",value:"#0.00%",example:"12.21%"},{text:"Scientific",value:"0.00E+00",example:"1.01E+5"},{text:"",value:"split",example:""},{text:"Accounting",value:"\xA5(0.00)",example:"\xA5(1200.09)"},{text:"Currency",value:"\xA50.00",example:"\xA51200.09"},{text:"",value:"split",example:""},{text:"Date",value:"yyyy-MM-dd",example:"2017-11-29"},{text:"Time",value:"hh:mm AM/PM",example:"3:00 PM"},{text:"Time 24H",value:"hh:mm",example:"15:00"},{text:"Date time",value:"yyyy-MM-dd hh:mm AM/PM",example:"2017-11-29 3:00 PM"},{text:"Date time 24 H",value:"yyyy-MM-dd hh:mm",example:"2017-11-29 15:00"},{text:"",value:"split",example:""},{text:"Custom formats",value:"fmtOtherSelf",example:"more"}],dateFmtList:[{name:"1930-08-05",value:"yyyy-MM-dd"},{name:"1930/8/5",value:"yyyy/MM/dd"},{name:"08-05",value:"MM-dd"},{name:"8-5",value:"M-d"},{name:"13:30:30",value:"h:mm:ss"},{name:"13:30",value:"h:mm"},{name:"PM 01:30",value:"AM/PM hh:mm"},{name:"PM 1:30",value:"AM/PM h:mm"},{name:"PM 1:30:30",value:"AM/PM h:mm:ss"},{name:"08-05 PM 01:30",value:"MM-dd AM/PM hh:mm"}],fontFamily:{MicrosoftYaHei:"YaHei"},fontarray:["Times New Roman","Arial","Tahoma","Verdana"],fontjson:{"times new roman":0,arial:1,tahoma:2,verdana:3},border:{borderTop:"borderTop",borderBottom:"borderBottom",borderLeft:"borderLeft",borderRight:"borderRight",borderNone:"borderNone",borderAll:"borderAll",borderOutside:"borderOutside",borderInside:"borderInside",borderHorizontal:"borderHorizontal",borderVertical:"borderVertical",borderColor:"borderColor",borderSize:"borderSize"},merge:{mergeAll:"Merge all",mergeV:"Vertically",mergeH:"Horizontally",mergeCancel:"Unmerge",overlappingError:"Cannot merge overlapping areas",partiallyError:"Cannot perform this operation on partially merged cells"},align:{left:"left",center:"center",right:"right",top:"Top",middle:"Middle",bottom:"Bottom"},textWrap:{overflow:"Overflow",wrap:"Wrap",clip:"Clip"},rotation:{none:"None",angleup:"Tilt Up",angledown:"Tilt Down",vertical:"Stack Vertically",rotationUp:"Rotate Up",rotationDown:"Rotate Down"},freezen:{default:"Freeze",freezenRow:"First Row",freezenColumn:"First Column",freezenRC:"Both",freezenRowRange:"Freezen row range",freezenColumnRange:"Freezen column range",freezenRCRange:"Freezen both range",freezenCancel:"Cancel",noSeletionError:"No Range to be selected",rangeRCOverErrorTitle:"Freeze reminder",rangeRCOverError:"The frozen pane is beyond the visible range, which will lead to abnormal operation. Please reset the frozen area."},sort:{asc:"Ascending ",desc:"Descending ",custom:"Custom sort",hasTitle:"Data has a header row",sortBy:"Sort by",addOthers:"Add another sort column",close:"close",confirm:"sort",columnOperation:"Column",secondaryTitle:"then by",sortTitle:"Sort range",sortRangeTitle:"Sort range from",sortRangeTitleTo:"to",noRangeError:"Cannot perform this operation on multiple selection areas, please select a single range and try again",mergeError:"There are merged cells in the selection, this operation cannot be performed!",columnSortMergeError:"Column sorting will extend to the entire table selection. There are merged cells, this operation cannot be performed. Please use the sort feature in the toolbar."},filter:{filter:"create filter",sortByAsc:"Sort A-Z",sortByDesc:"Sort Z-A",filterByColor:"Filter by color",filterByCondition:"Filter by condition",filterByValues:"Filter by values",filiterInputNone:"None",filiterInputTip:"Enter filter value",filiterRangeStart:"",filiterRangeStartTip:"Value for formula",filiterRangeEnd:"and",filiterRangeEndTip:"Value for formula",filterValueByAllBtn:"Check all",filterValueByClearBtn:"Clear",filterValueByInverseBtn:"Inverse",filterValueByTip:"filter By Values",filterConform:"Confirm",filterCancel:"Cancel",clearFilter:"Clear filter",conditionNone:"None",conditionCellIsNull:"Is empty",conditionCellNotNull:"Is not empty",conditionCellTextContain:"Text contains",conditionCellTextNotContain:"Text does not contain",conditionCellTextStart:"Text starts with",conditionCellTextEnd:"Text ends with",conditionCellTextEqual:"Text is exactly",conditionCellDateEqual:"Date is",conditionCellDateBefore:"Date is before",conditionCellDateAfter:"Date is after",conditionCellGreater:"Greater than",conditionCellGreaterEqual:"Greater than or equal to",conditionCellLess:"Less than",conditionCellLessEqual:"Less than or equal to",conditionCellEqual:"Is equal to",conditionCellNotEqual:"Is not equal to",conditionCellBetween:"Is between",conditionCellNotBetween:"Is not between",filiterMoreDataTip:"Big amount of data! please wait",filiterMonthText:"Month",filiterYearText:"Year",filiterByColorTip:"Filter by cell color",filiterByTextColorTip:"Filter by font color",filterContainerOneColorTip:"This column contains only one color",filterDateFormatTip:"Date format",valueBlank:"(Null)",mergeError:"There are merged cells in the filter selection, this operation cannot be performed!"},rightclick:{copy:"Copy",copyAs:"Copy as",paste:"Paste",insert:"Insert",delete:"Delete",deleteCell:"Delete cell",deleteSelected:"Delete selected ",hide:"Hide",hideSelected:"Hide selected ",showHide:"Show hidden ",to:"Towards",left:"Left",right:"Right",top:"Top",bottom:"Bottom",moveLeft:"Move left",moveUp:"Move up",add:"Add",row:"Row",column:"Column",width:"Width",height:"Height",number:"Number",confirm:"Confirm",orderAZ:"A-Z order",orderZA:"Z-A order",clearContent:"Clear content",matrix:"Matrix operation",sortSelection:"Sort",filterSelection:"Filter",chartGeneration:"Create chart",firstLineTitle:"first line title",untitled:"untitled",array1:"One-dimensional array",array2:"Two-dimensional array",array3:"Multidimensional Arrays",diagonal:"Diagonal",antiDiagonal:"Anti-diagonal",diagonalOffset:"Diagonal offset",offset:"Offset",boolean:"Boolean",flip:"Flip",upAndDown:"Up and down",leftAndRight:"Left and right",clockwise:"Clockwise",counterclockwise:"Counterclockwise",transpose:"Transpose",matrixCalculation:"Matrix calculation",plus:"Plus",minus:"Minus",multiply:"Multiply",divided:"Divided",power:"Power",root:"Root",log:"Log",delete0:"Delete 0 values at both ends",removeDuplicate:"Remove duplicate values",byRow:"By row",byCol:"By column",generateNewMatrix:"Generate new matrix"},comment:{insert:"Insert",edit:"Edit",delete:"Delete",showOne:"Show/Hide",showAll:"Show/Hide All"},screenshot:{screenshotTipNoSelection:"Please select the scope of the screenshot",screenshotTipTitle:"Warning\uFF01",screenshotTipHasMerge:"This operation cannot be performed on merged cells",screenshotTipHasMulti:"This operation cannot be performed on multiple selection regions",screenshotTipSuccess:"Successful",screenshotImageName:"Screenshot",downLoadClose:"Close",downLoadCopy:"Copy to clipboard",downLoadBtn:"Download",browserNotTip:"not supported by IE browser!",rightclickTip:'Please right-click "copy" on the picture',successTip:'Successfully (if pasting fails, please right-click on the image to "copy image")'},splitText:{splitDelimiters:"Delimiters",splitOther:"Other",splitContinueSymbol:"Consecutive separators are treated as a single",splitDataPreview:"Preview",splitTextTitle:"Split text",splitConfirmToExe:"There is already data here, do you want to replace it?",tipNoMulti:"Cannot perform this operation on multiple selection areas, please select a single area and try again",tipNoMultiColumn:"Only one column of data can be converted at a time. The selected area can have multiple rows but not multiple columns. Please try again after selecting a single column range"},imageText:{imageSetting:"Image setting",close:"Close",conventional:"Conventional",moveCell1:"Move and resize cells",moveCell2:"Move and do not resize the cell",moveCell3:"Do not move and resize the cell",fixedPos:"Fixed position",border:"Border",width:"Width",radius:"Radius",style:"Style",solid:"Solid",dashed:"Dashed",dotted:"Dotted",double:"Double",color:"Color"},punctuation:{tab:"Tab",semicolon:"semicolon",comma:"comma",space:"space"},findAndReplace:{find:"Find",replace:"Replace",goto:"Go to",location:"Location",formula:"Formula",date:"Date",number:"Number",string:"String",error:"Error",condition:"Condition",rowSpan:"Row span",columnSpan:"Column span",locationExample:"Location",lessTwoRowTip:"Please select at least two rows",lessTwoColumnTip:"Please select at least two columns",findTextbox:"Find Content",replaceTextbox:"Replace Content",regexTextbox:"Regular Expression",wholeTextbox:"Whole word",distinguishTextbox:"Case sensitive",allReplaceBtn:"Replace All",replaceBtn:"Replace",allFindBtn:"Find All",findBtn:"Find next",noFindTip:"The content was not found",modeTip:"This operation is not available in this mode",searchTargetSheet:"Sheet",searchTargetCell:"Cell",searchTargetValue:"Value",searchInputTip:"Please enter the search content",noReplceTip:"There is nothing to replace",noMatchTip:"No match found",successTip:"${xlength} items found",locationConstant:"Constant",locationFormula:"Formula",locationDate:"Date",locationDigital:"Number",locationString:"String",locationBool:"Logical",locationError:"Error",locationNull:"Null",locationCondition:"Conditional format",locationRowSpan:"Row span",locationColumnSpan:"Column span",locationTiplessTwoRow:"Please select at least two rows",locationTiplessTwoColumn:"Please select at least two columns",locationTipNotFindCell:"Cell not found"},sheetconfig:{delete:"Delete",copy:"Copy",rename:"Rename",changeColor:"Change color",hide:"Hide",unhide:"Unhide",moveLeft:"Move left",moveRight:"Move right",resetColor:"Reset color",cancelText:"Cancel",chooseText:"Confirm color",tipNameRepeat:"The name of the tab page cannot be repeated! Please revise",noMoreSheet:"The workbook contains at least one visual worksheet. To delete the selected worksheet, please insert a new worksheet or show a hidden worksheet.",confirmDelete:"Are you sure to delete",redoDelete:"Can be undo by Ctrl+Z",noHide:"Can't hide, at least keep one sheet tag",chartEditNoOpt:"This operation is not allowed in chart editing mode!",sheetNameSpecCharError:`The name cannot contain:[ ] : ? * / ' "`,sheetNamecannotIsEmptyError:"Sheet name cannot be empty"},conditionformat:{conditionformat_greaterThan:"Conditionformat-GreaterThan",conditionformat_greaterThan_title:"Format cells greater than",conditionformat_lessThan:"Conditionformat-LessThan",conditionformat_lessThan_title:"Format cells smaller than",conditionformat_betweenness:"Conditionformat-Betweenness",conditionformat_betweenness_title:"Format cells with values between",conditionformat_equal:"Conditionformat-Equal",conditionformat_equal_title:"Format cells equal to",conditionformat_textContains:"Conditionformat-TextContains",conditionformat_textContains_title:"Format cells containing the following text",conditionformat_occurrenceDate:"Conditionformat-OccurrenceDate",conditionformat_occurrenceDate_title:"Format cells containing the following dates",conditionformat_duplicateValue:"Conditionformat-DuplicateValue",conditionformat_duplicateValue_title:"Format cells containing the following types of values",conditionformat_top10:"Conditionformat-Top10",conditionformat_top10_percent:"Conditionformat-Top10%",conditionformat_top10_title:"Format the cells with the highest value",conditionformat_last10:"Conditionformat-Last10",conditionformat_last10_percent:"Conditionformat-Last10%",conditionformat_last10_title:"Format the cells with the smallest value",conditionformat_AboveAverage:"Conditionformat-AboveAverage",conditionformat_AboveAverage_title:"Format cells above average",conditionformat_SubAverage:"Conditionformat-SubAverage",conditionformat_SubAverage_title:"Format cells below average",rule:"Rule",newRule:"New rule",editRule:"Edit rule",deleteRule:"Delete rule",deleteCellRule:"Delete cell rule",deleteSheetRule:"Delete sheet rule",manageRules:"Management rules",showRules:"Show its formatting rules",highlightCellRules:"Highlight cell rules",itemSelectionRules:"Item selection rules",conditionformatManageRules:"Conditional Formatting Rule Manager",format:"Format",setFormat:"Set format",setAs:"Set as",setAsByArea:"For the selected area, set to",applyRange:"Apply range",selectRange:"Select application range",selectRange_percent:"Percentage of selected range",selectRange_average:"Average value of selected range",selectRange_value:"Value in the selected range",pleaseSelectRange:"Please select application range",selectDataRange:"Select data range",selectCell:"select cell",pleaseSelectCell:"Please select cell",pleaseSelectADate:"Please select a date",pleaseEnterInteger:"Please enter an integer between 1 and 1000",onlySingleCell:"Only a single cell can be referenced",conditionValueCanOnly:"The condition value can only be a number or a single cell",ruleTypeItem1:"Format all cells based on their respective values",ruleTypeItem2:"Only format cells that contain",ruleTypeItem2_title:"Only for cells that meet the following conditions",ruleTypeItem3:"Format only the top or bottom numbers",ruleTypeItem3_title:"Is the value in the following ranking",ruleTypeItem4:"Format only values above or below the average",ruleTypeItem4_title:"Is a value that satisfies the following conditions",ruleTypeItem5:"Format only unique or repeated values",ruleTypeItem6:"Use formulas to determine which cells to format",formula:"Formula",textColor:"Text color",cellColor:"Cell color",confirm:"Confirm",confirmColor:"Confirm color",cancel:"Cancel",close:"Close",clearColorSelect:"Clear color select",sheet:"Sheet",currentSheet:"Current Sheet",dataBar:"data bar",dataBarColor:"data bar color",gradientDataBar_1:"Blue-white gradient data bar",gradientDataBar_2:"Green-white gradient data bar",gradientDataBar_3:"Red-white gradient data bar",gradientDataBar_4:"Orange-white gradient stripes",gradientDataBar_5:"Light blue-white gradient stripes",gradientDataBar_6:"Purple-white gradient data bar",solidColorDataBar_1:"Blue data bar",solidColorDataBar_2:"Green data bar",solidColorDataBar_3:"Red data bar",solidColorDataBar_4:"Orange data bar",solidColorDataBar_5:"Light blue data bar",solidColorDataBar_6:"Purple data bar",colorGradation:"color gradation",colorGradation_1:"Green-yellow-red color gradation",colorGradation_2:"Red-yellow-green color gradation",colorGradation_3:"Green-white-red color gradation",colorGradation_4:"Red-white-green color gradation",colorGradation_5:"Blue-white-red color gradation",colorGradation_6:"Red-white-blue color gradation",colorGradation_7:"White-red color gradation",colorGradation_8:"Red-white color gradation",colorGradation_9:"Green-white color gradation",colorGradation_10:"White-green color gradation",colorGradation_11:"Green-yellow color gradation",colorGradation_12:"Yellow-green color gradation",icons:"icons",pleaseSelectIcon:"Please click to select a group of icons:",cellValue:"Cell value",specificText:"Specific text",occurrence:"Date",greaterThan:"Greater than",lessThan:"Less than",between:"Between",equal:"Equal",in:"In",between2:"",contain:"Contain",textContains:"Text contains",duplicateValue:"Duplicate value",uniqueValue:"Unique value",top:"Top",top10:"Top 10",top10_percent:"Top 10%",last:"Last",last10:"Last 10",last10_percent:"Last 10%",oneself:"",above:"Above",aboveAverage:"Above average",below:"Below",belowAverage:"Below average",all:"All",yesterday:"YTD",today:"Today",tomorrow:"Tomorrow",lastWeek:"Last week",thisWeek:"This week",lastMonth:"Last month",thisMonth:"This month",lastYear:"Last year",thisYear:"This year",last7days:"Last 7 days",last30days:"Last 30 days",next7days:"Next 7 days",next30days:"Next 30 days",next60days:"Next 60 days",chooseRuleType:"Choose rule type",editRuleDescription:"Edit rule description",newFormatRule:"New format rule",editFormatRule:"Edit format rule",formatStyle:"Style",fillType:"Fill",color:"Color",twocolor:"Two-color",tricolor:"Tricolor",multicolor:"Multi color",grayColor:"Gray color",gradient:"Gradient",solid:"Solid",maxValue:"Max value",medianValue:"Median value",minValue:"Min value",direction:"Direction",threeWayArrow:"Three-way arrow",fourWayArrow:"Four-way arrow",fiveWayArrow:"Five-way arrow",threeTriangles:"Three triangles",shape:"Shape",threeColorTrafficLight:"Three-color traffic light",fourColorTrafficLight:"Four-color traffic light",threeSigns:"Three signs",greenRedBlackGradient:"Green-red-black gradient",rimless:"Rimless",bordered:"Bordered",mark:"Mark",threeSymbols:"Three symbols",tricolorFlag:"Tricolor flag",circled:"Circled",noCircle:"No circle",grade:"Grade",grade4:"4 Grade",grade5:"5 Grade",threeStars:"3 Stars",fiveQuadrantDiagram:"Five-quadrant diagram",fiveBoxes:"5 Boxes"},insertLink:{linkText:"Text",linkType:"Link type",external:"External link",internal:"Internal link",linkAddress:"Link address",linkSheet:"Worksheet",linkCell:"Cell reference",linkTooltip:"Tooltip",placeholder1:"Please enter the web link address",placeholder2:"Please enter the cell to be quoted, example A1",placeholder3:"Please enter the prompt content",tooltipInfo1:"Please enter a valid link",tooltipInfo2:"Please enter the correct cell reference"},dataVerification:{cellRange:"Cell range",selectCellRange:"Click to select a cell range",selectCellRange2:"Please select a range of cells",verificationCondition:"Verification condition",allowMultiSelect:"Allow multiple selection",dropdown:"drop-down list",checkbox:"Checkbox",number:"Number",number_integer:"Number-integer",number_decimal:"Number-decimal",text_content:"Text-content",text_length:"Text-length",date:"Date",validity:"Effectiveness",placeholder1:"Please enter the options, separated by commas, such as 1,2,3,4,5",placeholder2:"Please enter content",placeholder3:"Numeric value, such as 10",placeholder4:"Please enter the specified text",placeholder5:"Please enter the prompt displayed when the cell is selected",selected:"Selected",notSelected:"Not selected",between:"Between",notBetween:"Not between",equal:"Equal",notEqualTo:"Not equal to",moreThanThe:"More than the",lessThan:"Less than",greaterOrEqualTo:"Greater or equal to",lessThanOrEqualTo:"Less than or equal to",include:"Include",exclude:"Exclude",earlierThan:"Earlier than",noEarlierThan:"No earlier than",laterThan:"Later than",noLaterThan:"No later than",identificationNumber:"Identification number",phoneNumber:"Phone number",remote:"Automatic remote acquisition option",prohibitInput:"Prohibit input when input data is invalid",hintShow:"Show prompt when the cell is selected",deleteVerification:"Delete verification",tooltipInfo1:"The drop-down list option cannot be empty",tooltipInfo2:"Checkbox content cannot be empty",tooltipInfo3:"The value entered is not a numeric type",tooltipInfo4:"The value 2 cannot be less than the value 1",tooltipInfo5:"The text content cannot be empty",tooltipInfo6:"The value entered is not a date type",tooltipInfo7:"Date 2 cannot be less than date 1",textlengthInteger:"Text length must be an integer greater than or equal to 0"},formula:{sum:"Sum",average:"Average",count:"Count",max:"Max",min:"Min",ifGenerate:"If formula generator",find:"Learn more",tipNotBelongToIf:"This cell function does not belong to the if formula!",tipSelectCell:"Please select the cell to insert the function",ifGenCompareValueTitle:"Comparison value",ifGenSelectCellTitle:"Click to select cell",ifGenRangeTitle:"Range",ifGenRangeTo:"to",ifGenRangeEvaluate:"Range evaluate",ifGenSelectRangeTitle:"Click to select range",ifGenCutWay:"Partition way",ifGenCutSame:"Same Partition value",ifGenCutNpiece:"Partition by N",ifGenCutCustom:"Custom",ifGenCutConfirm:"Confirm",ifGenTipSelectCell:"Select cells",ifGenTipSelectCellPlace:"Please select cells",ifGenTipSelectRange:"Select range",ifGenTipSelectRangePlace:"Please select range",ifGenTipNotNullValue:"The comparison value cannot be empty!",ifGenTipLableTitile:"Label",ifGenTipRangeNotforNull:"The range cannot be empty!",ifGenTipCutValueNotforNull:"The partition value cannot be empty!",ifGenTipNotGenCondition:"No conditions are available for generation!"},formulaMore:{valueTitle:"Value",tipSelectDataRange:"Select data range",tipDataRangeTile:"Data range",findFunctionTitle:"Search function",tipInputFunctionName:"Function name or brief description of function",Array:"Array",Database:"Database",Date:"Date",Engineering:"Engineering",Filter:"Filter",Financial:"Financial",luckysheet:"Luckysheet",other:"Other",Logical:"Logical",Lookup:"Lookup",Math:"Math",Operator:"Operator",Parser:"Parser",Statistical:"Statistical",Text:"Text",dataMining:"Data Mining",selectFunctionTitle:"Select a function",calculationResult:"Result",tipSuccessText:"Success",tipParamErrorText:"Parameter type error",helpClose:"Close",helpCollapse:"Collapse",helpExample:"Example",helpAbstract:"Abstract",execfunctionError:"Error in the formula",execfunctionSelfError:"The formula cannot refer to its own cell",execfunctionSelfErrorResult:"The formula cannot refer to its own cell, which will lead to inaccurate calculation results",allowRepeatText:"Repeat",allowOptionText:"Option",selectCategory:"Or select a category"},drag:{noMerge:"Cannot perform this operation on merged cells",affectPivot:"This change cannot be made to the selected cell because it will affect the pivot table!",noMulti:"Cannot perform this operation on multiple selection areas, please select a single area",noPaste:"Unable to paste this content here, please select a cell in the paste area and try to paste again",noPartMerge:"Cannot perform this operation on partially merged cells",inputCorrect:"Please enter the correct value",notLessOne:"The number of rows and columns cannot be less than 1",offsetColumnLessZero:"The offset column cannot be negative!",pasteMustKeybordAlert:"Copy and paste in the Sheet: Ctrl + C to copy, Ctrl + V to paste, Ctrl + X to cut",pasteMustKeybordAlertHTMLTitle:"Copy and paste in the Sheet",pasteMustKeybordAlertHTML:"<span style='line-height: 1.0;font-size:36px;font-weight: bold;color:#666;'>Ctrl + C</span> to copy<br/><span style='line-height: 1.0;font-size:36px;font-weight: bold;color:#666;'>Ctrl + V</span> to paste<br/><span style='line-height: 1.0;font-size:36px;font-weight: bold;color:#666;'>Ctrl + X</span> to cut"},paste:{warning:"Warning",errorNotAllowMulti:"Cannot perform this operation on multiple selection areas, please select a single range and try again",errorNotAllowMerged:"Cannot make partial changes to merged cells"},pivotTable:{title:"Pivot Table",closePannel:"Close",editRange:"Range",tipPivotFieldSelected:"Select the fields",tipClearSelectedField:"Clear all fields",btnClearSelectedField:"Clear",btnFilter:"Filter",titleRow:"Row",titleColumn:"Column",titleValue:"Value",tipShowColumn:"Statistics fields are displayed as columns",tipShowRow:"Statistics fields are displayed as rows",titleSelectionDataRange:"Select range",titleDataRange:"Data range",valueSum:"SUM",valueStatisticsSUM:"Sum",valueStatisticsCOUNT:"Count",valueStatisticsCOUNTA:"Count A",valueStatisticsCOUNTUNIQUE:"Count Unique",valueStatisticsAVERAGE:"Average",valueStatisticsMAX:"Max",valueStatisticsMIN:"Min",valueStatisticsMEDIAN:"Median",valueStatisticsPRODUCT:"Product",valueStatisticsSTDEV:"Stdev",valueStatisticsSTDEVP:"Stdevp",valueStatisticslet:"Var",valueStatisticsVARP:"VarP",errorNotAllowEdit:"This operation is prohibited in non-editing mode!",errorNotAllowMulti:"Cannot perform this operation on multiple selection areas, please select a single range and try again",errorSelectRange:"Please select the range of the new pivot table",errorIsDamage:"The source data of this pivot table is corrupted!",errorNotAllowPivotData:"Cannot select pivot table as source data!",errorSelectionRange:"Selection failed, wrong input range!",errorIncreaseRange:"Please expand the selected range!",titleAddColumn:"Add column to pivot table",titleMoveColumn:"Move the column to the white box below",titleClearColumnFilter:"Clear the filter for this column",titleFilterColumn:"Filter",titleSort:"Sort",titleNoSort:"No sort",titleSortAsc:"ASC",titleSortDesc:"DESC",titleSortBy:"Sort by",titleShowSum:"Show total",titleStasticTrue:"Yes",titleStasticFalse:"No"},dropCell:{copyCell:"Copy",sequence:"Sequence",onlyFormat:"Only format",noFormat:"Not format",day:"Day",workDay:"Work Day",month:"Month",year:"Year",chineseNumber:"Chinese numbers"},imageCtrl:{borderTile:"Image border color",borderCur:"Color"},protection:{protectiontTitle:"Protection",enterPassword:"Enter a password (optional)",enterHintTitle:"Prompt when editing is prohibited (optional)",enterHint:"The cell or chart you are trying to change is in a protected worksheet. If you want to change it, please unprotect the worksheet. You may need to enter a password",swichProtectionTip:"Protect the sheet and contents of locked cells",authorityTitle:"Allow users of this sheet to:",selectLockedCells:"Select locked cells",selectunLockedCells:"Select unlocked cells",formatCells:"Format cells",formatColumns:"Format columns",formatRows:"Format rows",insertColumns:"Insert columns",insertRows:"Insert rows",insertHyperlinks:"Insert hyperlinks",deleteColumns:"Delete columns",deleteRows:"Delete rows",sort:"Sort",filter:"Filter",usePivotTablereports:"Use Pivot Table reports",editObjects:"Edit objects",editScenarios:"Edit scenarios",allowRangeTitle:"Allow users of range to:",allowRangeAdd:"New...",allowRangeAddTitle:"Title",allowRangeAddSqrf:"Reference",selectCellRange:"Click to select a cell range",selectCellRangeHolder:"Cell range",allowRangeAddTitlePassword:"Password",allowRangeAddTitleHint:"Prompt",allowRangeAddTitleHintTitle:"Prompt when a password is set (optional)",allowRangeAddtitleDefault:"Input range name",rangeItemDblclick:"Double click to edit",rangeItemHasPassword:"Has password",rangeItemErrorTitleNull:"Title is null",rangeItemErrorRangeNull:"Reference is null",rangeItemErrorRange:"Reference is error",validationTitle:"Password validation",validationTips:"Need to enter a password to unlock the protection of the worksheet",validationInputHint:"Enter a password",checkPasswordNullalert:"Password is required!",checkPasswordWrongalert:"Incorrect password, please try again!",checkPasswordSucceedalert:"Unlock Succeed!",defaultRangeHintText:"The cell is being password protected.",defaultSheetHintText:"The cell or chart is in a protected worksheet. To make changes, please unprotect the worksheet. You may need to enter a password"},cellFormat:{cellFormatTitle:"Format cells",protection:"Protection",locked:"Locked",hidden:"Hidden",protectionTips:"To lock cells or hide formulas, protect the worksheet. On the toolbar, Click Protect Sheet Button",tipsPart:"Partial checked",tipsAll:"All checked",selectionIsNullAlert:"Selection is required!",sheetDataIsNullAlert:"error, Data is none!"},print:{normalBtn:"Normal",layoutBtn:"Page Layout",pageBtn:"Page\u2002break\u2002preview",menuItemPrint:"Print (Ctrl+P)",menuItemAreas:"Print areas",menuItemRows:"Print title rows",menuItemColumns:"Print title columns"},edit:{typing:"typing"},websocket:{success:"WebSocket connection success",refresh:"An error occurred in the WebSocket connection, please refresh the page!",wait:"An error occurred in the WebSocket connection, please be patient!",close:"WebSocket connection closed",contact:"Server communication error occurred, please refresh the page and try again, if not, please contact the administrator!",support:"The current browser does not support WebSocket"}}});var fu,du=Ie(()=>{fu={functionlist:{SUMIF:{d:"\u5BF9\u8303\u56F4\u4E2D\u7B26\u5408\u6307\u5B9A\u6761\u4EF6\u7684\u503C\u6C42\u548C\u3002",a:"\u5BF9\u8303\u56F4\u4E2D\u7B26\u5408\u6307\u5B9A\u6761\u4EF6\u7684\u503C\u6C42\u548C\u3002",p:[{name:"\u8303\u56F4",detail:"\u8981\u6839\u636E\u6761\u4EF6\u8FDB\u884C\u68C0\u6D4B\u7684\u8303\u56F4\u3002"},{name:"\u6761\u4EF6",detail:`\u8981\u5E94\u7528\u4E8E\u8303\u56F4\u7684\u6A21\u5F0F\u6216\u6D4B\u8BD5\u6761\u4EF6\u3002 |
| | | |
| | | \u5982\u679C\u8303\u56F4\u5305\u542B\u7684\u662F\u8981\u68C0\u6D4B\u7684\u6587\u672C\uFF0C\u5219\u6761\u4EF6\u5FC5\u987B\u4E3A\u5B57\u7B26\u4E32\u3002\u6761\u4EF6\u53EF\u4EE5\u5305\u542B\u901A\u914D\u7B26\uFF0C\u5305\u62EC\u7528\u4E8E\u5339\u914D\u5355\u4E2A\u5B57\u7B26\u7684?\u6216\u7528\u4E8E\u5339\u914D\u96F6\u4E2A\u6216\u8FDE\u7EED\u591A\u4E2A\u5B57\u7B26\u7684*\u3002\u8981\u5339\u914D\u95EE\u53F7\u661F\u53F7\u672C\u8EAB\uFF0C\u8BF7\u5728\u8BE5\u5B57\u7B26\u524D\u9762\u52A0\u4E0A\u6CE2\u6D6A\u53F7(~)\u524D\u7F00\uFF08\u5373~?\u548C~*\uFF09\u3002\u5B57\u7B26\u4E32\u6761\u4EF6\u5FC5\u987B\u7528\u5F15\u53F7\u62EC\u8D77\u6765\u3002\u51FD\u6570\u4F1A\u68C0\u67E5\u8303\u56F4\u4E2D\u7684\u6BCF\u4E2A\u5355\u5143\u683C\u4E0E\u6761\u4EF6\u662F\u5426\u76F8\u7B49\u6216\u5339\u914D\uFF08\u5982\u679C\u4F7F\u7528\u4E86\u901A\u914D\u7B26\uFF09\u3002 |
| | | |
| | |
| | | |
| | | field\u53EF\u4EE5\u662F\u8207database\u7B2C\u4E00\u884C\u4E2D\u67D0\u500B\u5217\u6A19\u984C\u5C0D\u61C9\u7684\u6587\u5B57\u6A19\u7C64,\u4E5F\u53EF\u4EE5\u662F\u6307\u5B9A\u76F8\u95DC\u5217\u7684\u6578\u4F4D\u7D22\u5F15,\u7B2C\u4E00\u5217\u7684\u7D22\u5F15\u503C\u70BA1\u3002`},{name:"criteria",detail:"\u5305\u542B\u6240\u6307\u5B9A\u689D\u4EF6\u7684\u5132\u5B58\u683C\u5340\u57DF\u3002\u8A08\u7B97\u4E4B\u524D\u5C07\u4F7F\u7528\u9019\u4E9B\u689D\u4EF6\u4F86\u904E\u6FFEdatabase\u4E2D\u7684\u503C\u3002"}]},DVARP:{d:"\u4F7F\u7528SQL\u5F0F\u67FB\u8A62,\u901A\u904E\u4F7F\u7528\u6E05\u55AE\u6216\u8CC7\u6599\u5EAB\u4E2D\u6EFF\u8DB3\u6307\u5B9A\u689D\u4EF6\u7684\u8A18\u9304\u6B04\u4F4D\uFF08\u5217\uFF09\u4E2D\u7684\u6578\u4F4D\u8A08\u7B97\u6A23\u672C\u7E3D\u9AD4\u7684\u6A23\u672C\u7E3D\u9AD4\u65B9\u5DEE\u3002",a:"\u4F7F\u7528SQL\u5F0F\u67FB\u8A62,\u901A\u904E\u4F7F\u7528\u6E05\u55AE\u6216\u8CC7\u6599\u5EAB\u4E2D\u6EFF\u8DB3\u6307\u5B9A\u689D\u4EF6\u7684\u8A18\u9304\u6B04\u4F4D\uFF08\u5217\uFF09\u4E2D\u7684\u6578\u4F4D\u8A08\u7B97\u6A23\u672C\u7E3D\u9AD4\u7684\u6A23\u672C\u7E3D\u9AD4\u65B9\u5DEE\u3002",p:[{name:"database",detail:"\u69CB\u6210\u6E05\u55AE\u6216\u8CC7\u6599\u5EAB\u7684\u5132\u5B58\u683C\u5340\u57DF,\u6E05\u55AE\u7684\u7B2C\u4E00\u884C\u5305\u542B\u6BCF\u4E00\u5217\u7684\u6A19\u7C64\u3002"},{name:"field",detail:`\u6307\u5B9Adatabase\u4E2D\u7684\u54EA\u4E00\u5217\u5305\u542B\u8981\u9078\u53D6\u548C\u7528\u65BC\u8A08\u7B97\u7684\u503C\u3002 |
| | | |
| | | field\u53EF\u4EE5\u662F\u8207database\u7B2C\u4E00\u884C\u4E2D\u67D0\u500B\u5217\u6A19\u984C\u5C0D\u61C9\u7684\u6587\u5B57\u6A19\u7C64,\u4E5F\u53EF\u4EE5\u662F\u6307\u5B9A\u76F8\u95DC\u5217\u7684\u6578\u4F4D\u7D22\u5F15,\u7B2C\u4E00\u5217\u7684\u7D22\u5F15\u503C\u70BA1\u3002`},{name:"criteria",detail:"\u5305\u542B\u6240\u6307\u5B9A\u689D\u4EF6\u7684\u5132\u5B58\u683C\u5340\u57DF\u3002\u8A08\u7B97\u4E4B\u524D\u5C07\u4F7F\u7528\u9019\u4E9B\u689D\u4EF6\u4F86\u904E\u6FFEdatabase\u4E2D\u7684\u503C\u3002"}]},AGE_BY_IDCARD:{d:"\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u5E74\u9F61\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u5E74\u9F61",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"},{name:"\u622A\u6B62\u65E5\u671F",detail:"\u5E74\u9F61\u8A08\u7B97\u7684\u622A\u6B62\u65E5\u671F\u6216\u7BC4\u570D,\u9ED8\u8A8D\u70BA\u7576\u65E5\u3002"}]},SEX_BY_IDCARD:{d:"\u6839\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u6027\u5225\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u6839\u64DA\u8EAB\u4EFD\u8B49\u865F\u5F97\u5230\u6027\u5225\u3002",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"}]},BIRTHDAY_BY_IDCARD:{d:"\u6839\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u751F\u65E5\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u6839\u64DA\u8EAB\u4EFD\u8B49\u865F\u5F97\u5230\u751F\u65E5\u3002",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"},{name:"\u751F\u65E5\u683C\u5F0F",detail:"\u65E5\u671F\u985E\u578B,\u9ED8\u8A8D0:[1900/01/01],1:[1900-01-01],2:[1900\u5E741\u67081\u65E5]"}]},PROVINCE_BY_IDCARD:{d:"\u6839\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u7C4D\u8CAB\u7684\u7701\u4EFD\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u6839\u64DA\u8EAB\u4EFD\u8B49\u865F\u5F97\u5230\u7C4D\u8CAB\u7684\u7701\u4EFD\u3002",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"}]},CITY_BY_IDCARD:{d:"\u6839\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u7C4D\u8CAB\u7684\u90FD\u5E02\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u6839\u64DA\u8EAB\u4EFD\u8B49\u865F\u5F97\u5230\u7C4D\u8CAB\u7684\u90FD\u5E02\u3002",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"}]},STAR_BY_IDCARD:{d:"\u6839\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u661F\u5EA7\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u6839\u64DA\u8EAB\u4EFD\u8B49\u865F\u5F97\u5230\u661F\u5EA7\u3002",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"}]},ANIMAL_BY_IDCARD:{d:"\u6839\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u751F\u8096\uFF08\u9F20\u3001\u725B\u3001\u864E\u3001\u5154\u2026\uFF09\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u6839\u64DA\u8EAB\u4EFD\u8B49\u865F\u5F97\u5230\u751F\u8096\u3002",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"}]},ISIDCARD:{d:"\u9A57\u8B49\u8EAB\u4EFD\u8B49\u7684\u683C\u5F0F\u662F\u5426\u6B63\u78BA\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u9A57\u8B49\u8EAB\u4EFD\u8B49\u683C\u5F0F\u6B63\u78BA\u6027\u3002",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"}]},DM_TEXT_CUTWORD:{d:"\u6587\u5B57\u5206\u8A5E\u3002\u628A\u4E00\u9023\u4E32\u6587\u5B57\u6298\u958B\u70BA\u4E00\u7CFB\u5217\u55AE\u7368\u8A5E\u8A9E",a:"\u4E2D\u6587\u6587\u5B57\u5206\u8A5E\u3002",p:[{name:"\u6587\u5B57",detail:"\u4EFB\u610F\u9700\u8981\u5206\u8A5E\u7684\u6587\u5B57\u3002"},{name:"\u5206\u8A5E\u6A21\u5F0F",detail:"\u9ED8\u8A8D\u70BA0[\u7CBE\u78BA\u6A21\u5F0F]\uFF0C1[\u5168\u6A21\u5F0F]\uFF0C2[\u641C\u5C0B\u5F15\u64CE\u6A21\u5F0F]\u3002"}]},DM_TEXT_TFIDF:{d:"\u63A1\u7528tf-idf\u7B97\u704B\u9032\u884C\u95DC\u9375\u5B57\u9078\u53D6\u3002\u5F9E\u4E00\u9023\u4E32\u6587\u5B57\u4E2D\u8B58\u5225\u95DC\u9375\u5B57",a:"tf-idf\u95DC\u9375\u5B57\u8B58\u5225\u3002",p:[{name:"\u6587\u5B57",detail:"\u4EFB\u610F\u9700\u8981\u5206\u8A5E\u7684\u6587\u5B57\u3002"},{name:"\u95DC\u9375\u5B57\u500B\u6578",detail:"\u7B97\u704B\u8FD4\u56DE\u7684\u95DC\u9375\u5B57\u500B\u6578\uFF0C\u9ED8\u8A8D20"},{name:"\u8A9E\u6599\u5EAB",detail:"\u9078\u64C7\u7279\u5B9A\u9818\u57DF\u7684\u8A9E\u6599\u5EAB\uFF0C\u9ED8\u8A8D0[\u901A\u7528]\uFF0C1[\u91D1\u878D]\uFF0C2[\u91AB\u7642]"}]},DM_TEXT_TEXTRANK:{d:"\u63A1\u7528TextRank\u7B97\u704B\u9032\u884C\u95DC\u9375\u5B57\u9078\u53D6\u3002\u5F9E\u4E00\u9023\u4E32\u6587\u5B57\u4E2D\u8B58\u5225\u95DC\u9375\u5B57",a:"TextRank\u95DC\u9375\u5B57\u8B58\u5225\u3002",p:[{name:"\u6587\u5B57",detail:"\u4EFB\u610F\u9700\u8981\u5206\u8A5E\u7684\u6587\u5B57\u3002"},{name:"\u95DC\u9375\u5B57\u500B\u6578",detail:"\u7B97\u704B\u8FD4\u56DE\u7684\u95DC\u9375\u5B57\u500B\u6578\uFF0C\u9ED8\u8A8D20"},{name:"\u8A9E\u6599\u5EAB",detail:"\u9078\u64C7\u7279\u5B9A\u9818\u57DF\u7684\u8A9E\u6599\u5EAB\uFF0C\u9ED8\u8A8D0[\u901A\u7528]\uFF0C1[\u91D1\u878D]\uFF0C2[\u91AB\u7642]"}]},DATA_CN_STOCK_CLOSE:{d:"\u6839\u64DA\u80A1\u7968\u4EE3\u78BC\u548C\u65E5\u671F\uFF0C\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6536\u76E4\u50F9\u3002",a:"\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6536\u76E4\u50F9\u3002",p:[{name:"\u80A1\u7968\u4EE3\u78BC",detail:"6\u4F4D\u80A1\u7968\u4EE3\u78BC\uFF0C\u5FC5\u586B\u9805\u3002"},{name:"\u65E5\u671F",detail:"\u80A1\u7968\u7684\u4EA4\u6613\u65E5\uFF0C\u9ED8\u8A8D\u70BA\u6700\u65B0\u4EA4\u6613\u65E5"},{name:"\u8907\u6B0A\u9664\u6B0A",detail:"\u9078\u64C7\u80A1\u7968\u7684\u9664\u6B0A\u8907\u6B0A\u985E\u578B\uFF0C\u9ED8\u8A8D0[\u524D\u8907\u6B0A]\uFF0C1[\u539F\u59CB\u50F9\u683C]\uFF0C2[\u5F8C\u8907\u6B0A]"}]},DATA_CN_STOCK_OPEN:{d:"\u6839\u64DA\u80A1\u7968\u4EE3\u78BC\u548C\u65E5\u671F\uFF0C\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u958B\u76E4\u50F9\u3002",a:"\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u958B\u76E4\u50F9\u3002",p:[{name:"\u80A1\u7968\u4EE3\u78BC",detail:"6\u4F4D\u80A1\u7968\u4EE3\u78BC\uFF0C\u5FC5\u586B\u9805\u3002"},{name:"\u65E5\u671F",detail:"\u80A1\u7968\u7684\u4EA4\u6613\u65E5\uFF0C\u9ED8\u8A8D\u70BA\u6700\u65B0\u4EA4\u6613\u65E5"},{name:"\u8907\u6B0A\u9664\u6B0A",detail:"\u9078\u64C7\u80A1\u7968\u7684\u9664\u6B0A\u8907\u6B0A\u985E\u578B\uFF0C\u9ED8\u8A8D0[\u524D\u8907\u6B0A]\uFF0C1[\u539F\u59CB\u50F9\u683C]\uFF0C2[\u5F8C\u8907\u6B0A]"}]},DATA_CN_STOCK_MAX:{d:"\u6839\u64DA\u80A1\u7968\u4EE3\u78BC\u548C\u65E5\u671F\uFF0C\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6700\u9AD8\u50F9\u3002",a:"\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6700\u9AD8\u50F9\u3002",p:[{name:"\u80A1\u7968\u4EE3\u78BC",detail:"6\u4F4D\u80A1\u7968\u4EE3\u78BC\uFF0C\u5FC5\u586B\u9805\u3002"},{name:"\u65E5\u671F",detail:"\u80A1\u7968\u7684\u4EA4\u6613\u65E5\uFF0C\u9ED8\u8A8D\u70BA\u6700\u65B0\u4EA4\u6613\u65E5"},{name:"\u8907\u6B0A\u9664\u6B0A",detail:"\u9078\u64C7\u80A1\u7968\u7684\u9664\u6B0A\u8907\u6B0A\u985E\u578B\uFF0C\u9ED8\u8A8D0[\u524D\u8907\u6B0A]\uFF0C1[\u539F\u59CB\u50F9\u683C]\uFF0C2[\u5F8C\u8907\u6B0A]"}]},DATA_CN_STOCK_MIN:{d:"\u6839\u64DA\u80A1\u7968\u4EE3\u78BC\u548C\u65E5\u671F\uFF0C\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6700\u4F4E\u50F9\u3002",a:"\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6700\u4F4E\u50F9\u3002",p:[{name:"\u80A1\u7968\u4EE3\u78BC",detail:"6\u4F4D\u80A1\u7968\u4EE3\u78BC\uFF0C\u5FC5\u586B\u9805\u3002"},{name:"\u65E5\u671F",detail:"\u80A1\u7968\u7684\u4EA4\u6613\u65E5,\u9ED8\u8BA4\u4E3A\u6700\u65B0\u4EA4\u6613\u65E5"},{name:"\u8907\u6B0A\u9664\u6B0A",detail:"\u9078\u64C7\u80A1\u7968\u7684\u9664\u6B0A\u8907\u6B0A\u985E\u578B\uFF0C\u9ED8\u8A8D0[\u524D\u8907\u6B0A]\uFF0C1[\u539F\u59CB\u50F9\u683C]\uFF0C2[\u5F8C\u8907\u6B0A]"}]},DATA_CN_STOCK_VOLUMN:{d:"\u6839\u64DA\u80A1\u7968\u4EE3\u78BC\u548C\u65E5\u671F\uFF0C\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6210\u4EA4\u91CF\u3002",a:"\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6210\u4EA4\u91CF\u3002",p:[{name:"\u80A1\u7968\u4EE3\u78BC",detail:"6\u4F4D\u80A1\u7968\u4EE3\u78BC\uFF0C\u5FC5\u586B\u9805\u3002"},{name:"\u65E5\u671F",detail:"\u80A1\u7968\u7684\u4EA4\u6613\u65E5\uFF0C\u9ED8\u8A8D\u70BA\u6700\u65B0\u4EA4\u6613\u65E5"},{name:"\u8907\u6B0A\u9664\u6B0A",detail:"\u9078\u64C7\u80A1\u7968\u7684\u9664\u6B0A\u8907\u6B0A\u985E\u578B\uFF0C\u9ED8\u8A8D0[\u524D\u8907\u6B0A]\uFF0C1[\u539F\u59CB\u50F9\u683C]\uFF0C2[\u5F8C\u8907\u6B0A]"}]},DATA_CN_STOCK_AMOUNT:{d:"\u6839\u64DA\u80A1\u7968\u4EE3\u78BC\u548C\u65E5\u671F\uFF0C\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6210\u4EA4\u984D\u3002",a:"\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6210\u4EA4\u984D\u3002",p:[{name:"\u80A1\u7968\u4EE3\u78BC",detail:"6\u4F4D\u80A1\u7968\u4EE3\u78BC\uFF0C\u5FC5\u586B\u9805\u3002"},{name:"\u65E5\u671F",detail:"\u80A1\u7968\u7684\u4EA4\u6613\u65E5\uFF0C\u9ED8\u8A8D\u70BA\u6700\u65B0\u4EA4\u6613\u65E5"},{name:"\u8907\u6B0A\u9664\u6B0A",detail:"\u9078\u64C7\u80A1\u7968\u7684\u9664\u6B0A\u8907\u6B0A\u985E\u578B\uFF0C\u9ED8\u8A8D0[\u524D\u8907\u6B0A]\uFF0C1[\u539F\u59CB\u50F9\u683C]\uFF0C2[\u5F8C\u8907\u6B0A]"}]},ISDATE:{d:"\u9A57\u8B49\u65E5\u671F\u7684\u683C\u5F0F\u662F\u5426\u6B63\u78BA\u3002\u652F\u6301\u591A\u7A2E\u65E5\u671F\u683C\u5F0F",a:"\u9A57\u8B49\u65E5\u671F\u683C\u5F0F\u6B63\u78BA\u6027\u3002",p:[{name:"\u65E5\u671F",detail:"\u65E5\u671F\u503C,\u4F8B\u59821990/01/01, 1990\u5E741\u67081\u65E5\u7B49\u3002"}]},LINESPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u6298\u7DDA\u5716sparklines\uFF0C\u7528\u65BC\u63CF\u8FF0\u6578\u64DA\u7684\u9023\u7E8C\u8D70\u52E2",a:"\u751F\u6210\u5132\u5B58\u683C\u6298\u7DDA\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D\uFF0C\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20\uFF0C{1,2,3,4,5}\u7B49\u3002"},{name:"\u7DDA\u689D\u984F\u8272",detail:"\u7DDA\u5716\u7684\u7DDA\u689D\u984F\u8272\uFF0C\u53EF\u4EE5\u662F\u5426\u500B\u7BC4\u570DA1\u3001\u8272\u9336\u7D22\u5F15\u6578\u503C\u6216\u8005\u5177\u9AD4\u984F\u8272\u503C\uFF0C\u8A2D\u5B9A\u70BA0\u6216false\u5247\u4E0D\u986F\u793A\uFF0C\u652F\u6301regx\u3001rgb\u3001rgba\u7B49\u3002\u9ED8\u8A8D#2ec7c9"},{name:"\u7DDA\u689D\u7C97\u7D30",detail:"\u6298\u7DDA\u5716\u7DDA\u6BB5\u7C97\u7D30\uFF0C\u9ED8\u8A8D\u70BA1px"},{name:"\u8F14\u52A9\u7DDA",detail:"\u4E00\u689D\u6A6B\u7DDA\uFF0C\u53EF\u4EE5\u662Fmin\u3001max\u3001avg\u3001median\u3001\u7BC4\u570D\u6216\u81EA\u5B9A\u7FA9\u6578\u503C\uFF0C\u9ED8\u8A8D0\u7121"},{name:"\u8F14\u52A9\u7DDA\u984F\u8272",detail:"\u8F14\u52A9\u7DDA\u7684\u984F\u8272\u8A2D\u5B9A\uFF0C\u540C\u7DDA\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D#000"},{name:"\u6700\u5927\u503C\u6A19\u8B58",detail:"\u6A19\u8B58\u7DDA\u5716\u6700\u5927\u503C\uFF0C\u540C\u7DDA\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D0\u4E0D\u986F\u793A"},{name:"\u6700\u5C0F\u503C\u6A19\u8B58",detail:"\u6A19\u8B58\u7DDA\u5716\u6700\u5C0F\u503C\uFF0C\u540C\u7DDA\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D0\u4E0D\u986F\u793A"},{name:"\u6A19\u8B58\u5927\u5C0F",detail:"\u6700\u5927\u503C\u548C\u6700\u5C0F\u503C\u7684\u6A19\u8B58\u5927\u5C0F\u8A2D\u5B9A\uFF0C\u9ED8\u8A8D\u70BA1.5"}]},AREASPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u9762\u7A4D\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u6578\u64DA\u7684\u9023\u7E8C\u7D2F\u7A4D\u503C\u8D70\u52E2",a:"\u751F\u6210\u5132\u5B58\u683C\u9762\u7A4D\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D\uFF0C\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20\uFF0C{1,2,3,4,5}\u7B49\u3002"},{name:"\u7DDA\u689D\u984F\u8272",detail:"\u7DDA\u5716\u7684\u7DDA\u689D\u984F\u8272\uFF0C\u53EF\u4EE5\u662F\u5426\u500B\u7BC4\u570DA1\u3001\u8272\u9336\u7D22\u5F15\u6578\u503C\u6216\u8005\u5177\u9AD4\u984F\u8272\u503C\uFF0C\u8A2D\u5B9A\u70BA0\u6216false\u5247\u4E0D\u986F\u793A\uFF0C\u652F\u6301regx\u3001rgb\u3001rgba\u7B49\u3002\u9ED8\u8A8D#2ec7c9"},{name:"\u586B\u5145\u984F\u8272",detail:"\u5F62\u6210\u9762\u7A4D\u5716\uFF0C\u540C\u7DDA\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D0\u4E0D\u986F\u793A"},{name:"\u7DDA\u689D\u7C97\u7D30",detail:"\u6298\u7DDA\u5716\u7DDA\u6BB5\u7C97\u7D30\uFF0C\u9ED8\u8A8D\u70BA1px"},{name:"\u8F14\u52A9\u7DDA",detail:"\u4E00\u689D\u6A6B\u7DDA\uFF0C\u53EF\u4EE5\u662Fmin\u3001max\u3001avg\u3001median\u3001\u7BC4\u570D\u6216\u81EA\u5B9A\u7FA9\u6578\u503C\uFF0C\u9ED8\u8A8D0\u7121"},{name:"\u8F14\u52A9\u7DDA\u984F\u8272",detail:"\u8F14\u52A9\u7DDA\u7684\u984F\u8272\u8A2D\u5B9A\uFF0C\u540C\u7DDA\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D#000"}]},COLUMNSPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u5782\u76F4\u67F1\u72C0\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u96E2\u6563\u6578\u64DA\u4E4B\u9593\u7684\u5927\u5C0F\u60C5\u51B5",a:"\u751F\u6210\u5132\u5B58\u683C\u5782\u76F4\u67F1\u72C0\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D\uFF0C\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20\uFF0C{1,2,3,4,5}\u7B49\u3002"},{name:"\u67F1\u689D\u9593\u9694",detail:"\u67F1\u689D\u4E4B\u9593\u7684\u9593\u9694\u8DDD\u96E2\uFF0C\u9ED8\u8A8D\u70BA1"},{name:"\u67F1\u689D\u984F\u8272",detail:"\u7DDA\u5716\u7684\u7DDA\u689D\u984F\u8272\uFF0C\u53EF\u4EE5\u662F\u5426\u500B\u7BC4\u570DA1\u3001\u8272\u9336\u7D22\u5F15\u6578\u503C\u6216\u8005\u5177\u9AD4\u984F\u8272\u503C\uFF0C\u8A2D\u5B9A\u70BA0\u6216false\u5247\u4E0D\u986F\u793A\uFF0C\u652F\u6301regx\u3001rgb\u3001rgba\u7B49\u3002\u9ED8\u8A8D#fc5c5c"},{name:"\u8CA0\u5411\u67F1\u689D\u984F\u8272",detail:"\u8CA0\u5411\u67F1\u689D\u984F\u8272\u8A2D\u5B9A\uFF0C\u4EE3\u8868\u8CA0\u503C\u7684\u984F\u8272\uFF0C\u540C\u67F1\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D#97b552"},{name:"\u6700\u5927\u503C",detail:"\u67F1\u5716\u6700\u5927\u503C\uFF0C\u7528\u65BC\u898F\u7BC4\u67F1\u5716\u9577\u5EA6\uFF0C\u9ED8\u8A8D\u70BA\u81EA\u52D5\u8A08\u7B97false\u3001auto\u3001null"},{name:"\u8272\u677F",detail:"\u8ABF\u8272\u677F\u53EF\u4EE5\u55AE\u7368\u8A2D\u5B9A\u6BCF\u500B\u67F1\u689D\u7684\u984F\u8272\uFF0C\u53EF\u8A2D\u5B9A\u591A\u500B\uFF0C\u652F\u6301\u5169\u7A2E\u683C\u5F0F:1\u984F\u8272\u4F8B\u5982#000\uFF0C\u4EE3\u8868\u7B2C\u4E00\u500B\u67F1\u7684\u984F\u8272\u662F\u9ED1\u8272\uFF1B2\u6578\u503C\u7BC4\u570D:\u984F\u8272\uFF0C\u4F8B\u5982-2:#000\u8868\u793A\u6578\u503C\u70BA-2\u7684\u67F1\u70BA\u9ED1\u8272\uFF0C0:5:#000\u8868\u793A\u6578\u503C0-5\u7684\u67F1\u70BA\u9ED1\u8272\uFF0C\u9ED8\u8A8D\u70BA\u7A7A"}]},STACKCOLUMNSPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u7D2F\u7A4D\u5782\u76F4\u67F1\u72C0\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u96E2\u6563\u6578\u64DA\u591A\u500B\u7DAD\u5EA6\u7684\u6578\u503C\u5927\u5C0F",a:"\u751F\u6210\u5132\u5B58\u683C\u7D2F\u7A4D\u5782\u76F4\u67F1\u72C0\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D\uFF0C\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20\uFF0C{1,2,3,4,5}\u7B49\u3002"},{name:"\u6309\u5217\u5806\u7A4D",detail:"\u5982\u679C\u9700\u8981\u6309\u884C\u5806\u7A4D\u5247\u672C\u9805\u8A2D\u70BAfalse\u62160\uFF0C\u9ED8\u8A8D\u70BA\u662F1"},{name:"\u67F1\u689D\u9593\u9694",detail:"\u67F1\u689D\u4E4B\u9593\u7684\u9593\u9694\u8DDD\u96E2\uFF0C\u9ED8\u8A8D\u70BA1"},{name:"\u6700\u5927\u503C",detail:"\u7D2F\u7A4D\u67F1\u5716\u6700\u5927\u503C\uFF0C\u7528\u65BC\u898F\u7BC4\u67F1\u5716\u9577\u5EA6\uFF0C\u9ED8\u8A8D\u70BA\u81EA\u52D5\u8A08\u7B97false\u3001auto\u3001null"},{name:"\u7D2F\u7A4D\u8272\u677F",detail:"\u8ABF\u8272\u677F\u53EF\u4EE5\u55AE\u7368\u8A2D\u5B9A\u6BCF\u500B\u7DAD\u5EA6\u7684\u67F1\u689D\u984F\u8272\uFF0C\u53EF\u8A2D\u5B9A\u70BAA1:A10\u7B49\u7BC4\u570D\uFF0C\u9ED8\u8A8D\u70BA#2ec7c9, #fc5c5c, #5ab1ef, #ffb980..."}]},BARSPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u6A6B\u5411\u689D\u5F62\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u96E2\u6563\u6578\u64DA\u4E4B\u9593\u7684\u5927\u5C0F\u60C5\u51B5",a:"\u751F\u6210\u5132\u5B58\u683C\u6A6B\u5411\u689D\u5F62\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D,\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20, {1,2,3,4,5}\u7B49\u3002"},{name:"\u67F1\u689D\u9593\u9694",detail:"\u67F1\u689D\u4E4B\u9593\u7684\u9593\u9694\u8DDD\u96E2\uFF0C\u9ED8\u8A8D\u70BA1"},{name:"\u67F1\u689D\u984F\u8272",detail:"\u7DDA\u5716\u7684\u7DDA\u689D\u984F\u8272\uFF0C\u53EF\u4EE5\u662F\u5426\u500B\u7BC4\u570DA1\u3001\u8272\u9336\u7D22\u5F15\u6578\u503C\u6216\u8005\u5177\u9AD4\u984F\u8272\u503C\uFF0C\u8A2D\u5B9A\u70BA0\u6216false\u5247\u4E0D\u986F\u793A\uFF0C\u652F\u6301regx\u3001rgb\u3001rgba\u7B49\u3002\u9ED8\u8A8D#fc5c5c"},{name:"\u8CA0\u5411\u67F1\u689D\u984F\u8272",detail:"\u8CA0\u5411\u67F1\u689D\u984F\u8272\u8A2D\u5B9A\uFF0C\u4EE3\u8868\u8CA0\u503C\u7684\u984F\u8272\uFF0C\u540C\u67F1\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D#97b552"},{name:"\u6700\u5927\u503C",detail:"\u67F1\u5716\u6700\u5927\u503C\uFF0C\u7528\u65BC\u898F\u7BC4\u67F1\u5716\u9577\u5EA6\uFF0C\u9ED8\u8A8D\u70BA\u81EA\u52D5\u8A08\u7B97false\u3001auto\u3001null"},{name:"\u8272\u677F",detail:"\u8ABF\u8272\u677F\u53EF\u4EE5\u55AE\u7368\u8A2D\u5B9A\u6BCF\u500B\u67F1\u689D\u7684\u984F\u8272\uFF0C\u53EF\u8A2D\u5B9A\u591A\u500B\uFF0C\u652F\u6301\u5169\u7A2E\u683C\u5F0F:1\u984F\u8272\u4F8B\u5982#000\uFF0C\u4EE3\u8868\u7B2C\u4E00\u500B\u67F1\u7684\u984F\u8272\u662F\u9ED1\u8272\uFF1B2\u6578\u503C\u7BC4\u570D:\u984F\u8272\uFF0C\u4F8B\u5982-2:#000\u8868\u793A\u6578\u503C\u70BA-2\u7684\u67F1\u70BA\u9ED1\u8272\uFF0C0:5:#000\u8868\u793A\u6578\u503C0-5\u7684\u67F1\u70BA\u9ED1\u8272\uFF0C\u9ED8\u8A8D\u70BA\u7A7A"}]},STACKBARSPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u7D2F\u7A4D\u6A6B\u5411\u689D\u5F62\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u96E2\u6563\u6578\u64DA\u591A\u500B\u7DAD\u5EA6\u7684\u6578\u503C\u5927\u5C0F",a:"\u751F\u6210\u5132\u5B58\u683C\u7D2F\u7A4D\u6A6B\u5411\u689D\u5F62\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D,\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20, {1,2,3,4,5}\u7B49\u3002"},{name:"\u6309\u5217\u5806\u7A4D",detail:"\u5982\u679C\u9700\u8981\u6309\u884C\u5806\u7A4D\u5247\u672C\u9805\u8A2D\u70BAfalse\u62160\uFF0C\u9ED8\u8A8D\u70BA\u662F1"},{name:"\u67F1\u689D\u9593\u9694",detail:"\u67F1\u689D\u4E4B\u9593\u7684\u9593\u9694\u8DDD\u96E2\uFF0C\u9ED8\u8A8D\u70BA1"},{name:"\u6700\u5927\u503C",detail:"\u7D2F\u7A4D\u67F1\u5716\u6700\u5927\u503C\uFF0C\u7528\u65BC\u898F\u7BC4\u67F1\u5716\u9577\u5EA6\uFF0C\u9ED8\u8A8D\u70BA\u81EA\u52D5\u8A08\u7B97false\u3001auto\u3001null"},{name:"\u7D2F\u7A4D\u8272\u677F",detail:"\u8ABF\u8272\u677F\u53EF\u4EE5\u55AE\u7368\u8A2D\u5B9A\u6BCF\u500B\u7DAD\u5EA6\u7684\u67F1\u689D\u984F\u8272\uFF0C\u53EF\u8A2D\u5B9A\u70BAA1:A10\u7B49\u7BC4\u570D\uFF0C\u9ED8\u8A8D\u70BA#2ec7c9, #fc5c5c, #5ab1ef, #ffb980..."}]},DISCRETESPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u96E2\u6563\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u96E2\u6563\u6578\u64DA\u8D70\u52E2",a:"\u751F\u6210\u5132\u5B58\u683C\u96E2\u6563\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D,\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20, {1,2,3,4,5}\u7B49\u3002"},{name:"\u5206\u5272\u95BE\u503C",detail:"\u96E2\u6563\u5716\u67F1\u5F62\u984F\u8272\u7684\u5340\u5206\uFF0C\u4F8B\u5982:\u8A72\u503C\u70BA0\uFF0C\u5247\u5927\u65BC0\u70BA\u85CD\u8272\uFF0C\u5C0F\u65BC0\u70BA\u7D05\u8272\uFF0C\u9ED8\u8A8D\u70BA0"},{name:"\u95BE\u503C\u4EE5\u4E0A\u984F\u8272",detail:"\u7DDA\u5716\u7684\u7DDA\u689D\u984F\u8272\uFF0C\u53EF\u4EE5\u662F\u5426\u500B\u7BC4\u570DA1\u3001\u8272\u9336\u7D22\u5F15\u6578\u503C\u6216\u8005\u5177\u9AD4\u984F\u8272\u503C\uFF0C\u8A2D\u5B9A\u70BA0\u6216false\u5247\u4E0D\u986F\u793A\uFF0C\u652F\u6301regx\u3001rgb\u3001rgba\u7B49\u3002\u9ED8\u8A8D#2ec7c9"},{name:"\u95BE\u503C\u4EE5\u4E0B\u984F\u8272",detail:"\u95BE\u503C\u4EE5\u4E0B\u67F1\u689D\u984F\u8272\u8A2D\u5B9A\uFF0C\u540C\u95BE\u503C\u4EE5\u4E0A\u984F\u8272\uFF0C\u9ED8\u8A8D#fc5c5c"}]},TRISTATESPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u4E09\u614B\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u4E09\u7A2E\u614B\u52E2\u7684\u8D70\u52E2\u4F8B\u5982\u52DD\u8CA0\u5E73",a:"\u751F\u6210\u5132\u5B58\u683C\u4E09\u614B\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D,\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20, {1,2,3,4,5}\u7B49\u3002"},{name:"\u67F1\u689D\u9593\u9694",detail:"\u67F1\u689D\u4E4B\u9593\u7684\u9593\u9694\u8DDD\u96E2\uFF0C\u9ED8\u8A8D\u70BA1"},{name:"\u67F1\u689D\u984F\u8272",detail:"\u7DDA\u5716\u7684\u7DDA\u689D\u984F\u8272\uFF0C\u53EF\u4EE5\u662F\u5426\u500B\u7BC4\u570DA1\u3001\u8272\u9336\u7D22\u5F15\u6578\u503C\u6216\u8005\u5177\u9AD4\u984F\u8272\u503C\uFF0C\u8A2D\u5B9A\u70BA0\u6216false\u5247\u4E0D\u986F\u793A\uFF0C\u652F\u6301regx\u3001rgb\u3001rgba\u7B49\u3002\u9ED8\u8A8D#fc5c5c"},{name:"\u8D1F\u5411\u67F1\u689D\u984F\u8272",detail:"\u8CA0\u5411\u67F1\u689D\u984F\u8272\u8A2D\u5B9A\uFF0C\u4EE3\u8868\u8CA0\u503C\u7684\u984F\u8272\uFF0C\u540C\u67F1\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D#97b552"},{name:"\u96F6\u503C\u67F1\u689D\u984F\u8272",detail:"\u96F6\u503C\u67F1\u689D\u984F\u8272\u8A2D\u5B9A\uFF0C\u4EE3\u88680\u503C\u984F\u8272\uFF0C\u540C\u67F1\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D#999"},{name:"\u8272\u677F",detail:"\u8ABF\u8272\u677F\u53EF\u4EE5\u55AE\u7368\u8A2D\u5B9A\u6BCF\u500B\u67F1\u689D\u7684\u984F\u8272\uFF0C\u53EF\u8A2D\u5B9A\u591A\u500B\uFF0C\u652F\u6301\u5169\u7A2E\u683C\u5F0F:1\u984F\u8272\u4F8B\u5982#000\uFF0C\u4EE3\u8868\u7B2C\u4E00\u500B\u67F1\u7684\u984F\u8272\u662F\u9ED1\u8272\uFF1B2\u6578\u503C\u7BC4\u570D:\u984F\u8272\uFF0C\u4F8B\u5982-2:#000\u8868\u793A\u6578\u503C\u70BA-2\u7684\u67F1\u70BA\u9ED1\u8272\uFF0C0-5:#000\u8868\u793A\u6578\u503C0-5\u7684\u67F1\u70BA\u9ED1\u8272\uFF0C\u9ED8\u8A8D\u70BA\u7A7A"}]},PIESPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u9905\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u6578\u64DA\u5360\u6BD4",a:"\u751F\u6210\u5132\u5B58\u683C\u9905\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D,\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20, {1,2,3,4,5}\u7B49\u3002"},{name:"\u65CB\u8F49\u89D2\u5EA6",detail:"\u9905\u5716\u7684\u65CB\u8F49\u89D2\u5EA6\uFF0C\u9ED8\u8A8D\u70BA0"},{name:"\u9905\u5716\u908A\u6846",detail:"\u9905\u5716\u908A\u6846\u5927\u5C0F\uFF0C\u9ED8\u8A8D\u70BA\u71210"},{name:"\u908A\u6846\u984F\u8272",detail:"\u9905\u5716\u908A\u6846\u984F\u8272\uFF0C\u9ED8\u8A8D\u70BA#000"},{name:"\u9905\u5716\u8272\u677F",detail:"\u8ABF\u8272\u677F\u53EF\u4EE5\u8A2D\u5B9A\u5207\u7247\u7684\u984F\u8272\uFF0C\u53EF\u8A2D\u5B9A\u70BAA1:A10\u7B49\u7BC4\u570D\uFF0C\u9ED8\u8A8D\u70BA#2ec7c9, #fc5c5c, #5ab1ef, #ffb980..."}]},BOXSPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u7BB1\u7DDA\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u6578\u64DA\u96C6\u7684\u7D71\u8A08\u5206\u4F48",a:"\u751F\u6210\u5132\u5B58\u683C\u7BB1\u7DDA\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D,\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20, {1,2,3,4,5}\u7B49\u3002"},{name:"\u96E2\u7FA4\u9EDE\u6BD4\u4F8B",detail:"\u96E2\u7FA4\u9EDE\u7684\u95BE\u503C\u7BC4\u570D\uFF0C\u5982\u679C\u70BA0\u6216false\u5247\u4E0D\u986F\u793A\uFF0C\u9ED8\u8A8D\u70BA1.5\u500D"},{name:"\u76EE\u6A19\u9EDE\u503C",detail:"\u7BB1\u7DDA\u5716\u4E0A\u7684\u76EE\u6A19\u503C\u8A2D\u5B9A\uFF0C\u9ED8\u8A8D\u70BAfalse\u4E0D\u986F\u793A"},{name:"\u6578\u64DA\u9EDE\u5927\u5C0F",detail:"\u76EE\u6A19\u9EDE\u548C\u96E2\u7FA4\u9EDE\u7684\u534A\u5F91\u5927\u5C0F\u8A2D\u5B9A\uFF0C\u9ED8\u8A8D\u70BA1.5"}]},BULLETSPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u5B50\u5F48\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u4EFB\u52D9\u9054\u6210\u7387",a:"\u751F\u6210\u5132\u5B58\u683C\u5B50\u5F48\u5716",p:[{name:"\u76EE\u6A19",detail:"\u9054\u6210\u7684\u76EE\u6A19\u503C\uFF0C\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1\uFF0C100\u7B49\u3002"},{name:"\u5BE6\u969B\u5B8C\u6210",detail:"\u73FE\u6642\u5B8C\u6210\u503C\uFF0C\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1\uFF0C100\u7B49\u3002"},{name:"\u5C0D\u6BD4\u503C",detail:"\u5C0D\u6BD4\u503C\uFF0C\u4F8B\u5982\u8D85\u984D\u3001\u6700\u4F4E\u3001\u7372\u734E\u5E95\u7DDA\u7B49\uFF0C\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1\uFF0C100\u7B49\u3002\u53EF\u4EE5\u8A2D\u5B9A\u6700\u591A9\u500B\u5C0D\u6BD4\u503C"}]},COMPOSESPLINES:{d:"\u652F\u6301\u591A\u500B\u985E\u578B\u7684\u5716\u756B\u5728\u540C\u4E00\u500B\u5132\u5B58\u683C\uFF0C\u6BCF\u500B\u53C3\u6578\u4EE3\u8868\u4E00\u500Bsparklines\u5716",a:"\u7D44\u5408sparklines\u5716\u5230\u4E00\u500B\u5132\u5B58\u683C",p:[{name:"\u5716\u8A2D\u5B9A",detail:"sparklines\u5716\u8A2D\u5B9A\uFF0C\u4F8B\u5982A1:A20\uFF0C\u4E00\u500B\u5B8C\u6210\u7684\u9905\u5716\u3001\u7DDA\u5716\u8A2D\u5B9A\u7B49\u3002"}]},SORT:{d:"\u8FD4\u56DE\u6578\u7D44\u4E2D\u5143\u7D20\u7684\u6392\u5E8F\u6578\u7D44\u3002\u8FD4\u56DE\u7684\u6578\u7D44\u8207\u63D0\u4F9B\u7684\u6578\u7D44\u53C3\u6578\u5F62\u72C0\u76F8\u540C\u3002",a:"\u8FD4\u56DE\u6578\u7D44\u4E2D\u5143\u7D20\u7684\u6392\u5E8F\u6578\u7D44\u3002\u8FD4\u56DE\u7684\u6578\u7D44\u8207\u63D0\u4F9B\u7684\u6578\u7D44\u53C3\u6578\u5F62\u72C0\u76F8\u540C\u3002",p:[{name:"array",detail:"\u8981\u6392\u5E8F\u7684\u7BC4\u570D\u6216\u6578\u7D44\u3002"},{name:"sort_index",detail:"[\u53EF\u9078] - \u8868\u793A\u8981\u6392\u5E8F\u7684\u884C\u6216\u5217\u7684\u6578\u4F4D\u3002\uFF08\u9ED8\u8A8Drow1/col1\uFF09"},{name:"sort_order",detail:"[\u53EF\u9078] - \u8868\u793A\u6240\u9700\u6392\u5E8F\u9806\u5E8F\u7684\u6578\u4F4D\uFF1B1\u8868\u793A\u6607\u51AA\uFF08\u9ED8\u8A8D\uFF09\uFF0C-1\u8868\u793A\u964D\u5E8F\u3002"},{name:"by_col",detail:"[\u53EF\u9078] - \u8868\u793A\u6240\u9700\u6392\u5E8F\u65B9\u5411\u7684\u908F\u8F2F\u503C\uFF1B\u6309\u884C\u6392\u5E8F\u70BAFALSE\uFF08\uFF09\uFF08\u9ED8\u8A8D\uFF09\uFF0C\u6309\u5217\u6392\u5E8F\u70BATRUE\uFF08\uFF09\u3002"}]},FILTER:{d:"\u57FA\u65BC\u4E00\u500B\u5E03\u6797\uFF08\u771F/\u5047\uFF09\u6578\u7D44\u904E\u6FFE\u4E00\u500B\u6578\u7D44\u3002",a:"\u57FA\u65BC\u4E00\u500B\u5E03\u6797\uFF08\u771F/\u5047\uFF09\u6578\u7D44\u904E\u6FFE\u4E00\u500B\u6578\u7D44\u3002",p:[{name:"array",detail:"\u8981\u7BE9\u9078\u7684\u6578\u7D44\u6216\u7BC4\u570D\u3002"},{name:"include",detail:"\u5E03\u6797\u6578\u7D44\uFF0C\u5176\u9AD8\u5EA6\u6216\u5BEC\u5EA6\u8207\u6578\u7D44\u76F8\u540C"},{name:"if_empty",detail:"[\u53EF\u9078] - \u5982\u679C\u5305\u542B\u6578\u7D44\u4E2D\u7684\u6240\u6709\u503C\u90FD\u70BA\u7A7A\uFF08filter\u4E0D\u8FD4\u56DE\u4EFB\u4F55\u503C\uFF09\uFF0C\u5247\u8FD4\u56DE\u7684\u503C\u3002"}]},UNIQUE:{d:"\u8FD4\u56DE\u5217\u8868\u6216\u5340\u57DF\u4E2D\u7684\u552F\u4E00\u503C\u7684\u6E05\u55AE\u3002",a:"\u8FD4\u56DE\u5217\u8868\u6216\u5340\u57DF\u4E2D\u7684\u552F\u4E00\u503C\u7684\u6E05\u55AE\u3002",p:[{name:"array",detail:"\u5F9E\u5176\u8FD4\u56DE\u552F\u4E00\u503C\u7684\u6578\u7D44\u6216\u5340\u57DF\u3002"},{name:"by_col",detail:"[\u53EF\u9078] - \u908F\u8F2F\u503C\uFF0C\u8A13\u793A\u5982\u4F55\u6BD4\u8F03\uFF1B\u6309\u884C= FALSE\uFF08\uFF09\u6216\u7701\u7565\uFF1B\u6309\u5217= TRUE\uFF08\uFF09\u3002"},{name:"occurs_once",detail:"[\u53EF\u9078] - \u908F\u8F2F\u503C\uFF0C\u50C5\u8FD4\u56DE\u552F\u4E00\u503C\u4E2D\u51FA\u73FE\u4E00\u6B21= TRUE\uFF08\uFF09\uFF1B\u5305\u62EC\u6240\u6709\u552F\u4E00\u503C= FALSE\uFF08\uFF09\u6216\u7701\u7565\u3002"}]},RANDARRAY:{d:"\u8FD4\u56DE0\u52301\u4E4B\u9593\u7684\u96A8\u6A5F\u6578\u4F4D\u6578\u7D44\u3002",a:"\u8FD4\u56DE0\u52301\u4E4B\u9593\u7684\u96A8\u6A5F\u6578\u4F4D\u6578\u7D44",p:[{name:"rows",detail:"[\u53EF\u9078] - \u8981\u8FD4\u56DE\u7684\u884C\u6578\u3002"},{name:"cols",detail:"[\u53EF\u9078] - \u8981\u8FD4\u56DE\u7684\u5217\u6578\u3002"}]},SEQUENCE:{d:"\u751F\u6210\u6578\u4F4D\u5E8F\u5217\u7684\u6E05\u55AE\u3002",a:"\u751F\u6210\u6578\u4F4D\u5E8F\u5217\u7684\u6E05\u55AE\u3002",p:[{name:"rows",detail:"\u8981\u8FD4\u56DE\u7684\u884C\u6578\u3002"},{name:"cols",detail:"[\u53EF\u9078] - \u8981\u8FD4\u56DE\u7684\u5217\u6578\u3002"},{name:"start",detail:"[\u53EF\u9078] - \u5E8F\u5217\u4E2D\u7684\u7B2C\u4E00\u500B\u6578\u4F4D\u3002"},{name:"step",detail:"[\u53EF\u9078] -\u5E8F\u5217\u4E2D\u6BCF\u500B\u5E8F\u5217\u503C\u7684\u589E\u91CF\u3002"}]},EVALUATE:{d:"\u5C0D\u4EE5\u6587\u5B57\u8868\u793A\u7684\u516C\u5F0F\u6216\u8005\u8868\u9054\u5F0F\u6C42\u503C\uFF0C\u4E26\u8FD4\u56DE\u7D50\u679C\u3002",a:"\u6839\u64DA\u6587\u5B57\u516C\u5F0F\u6216\u8005\u8868\u9054\u5F0F\u6C42\u503C\u3002",p:[{name:"\u516C\u5F0F",detail:"\u516C\u5F0F\u6216\u8868\u9054\u5F0F"}]},REMOTE:{d:"Calls a function on a remote server",a:"Calls a function on a remote back end server/API.",p:[{name:"remote_expression",detail:"Formula"}]}},toolbar:{undo:"\u64A4\u92B7",redo:"\u91CD\u505A",paintFormat:"\u683C\u5F0F\u5237",currencyFormat:"\u8CA8\u5E63\u683C\u5F0F",percentageFormat:"\u767E\u5206\u6BD4\u683C\u5F0F",numberDecrease:"\u51CF\u5C11\u5C0F\u6578\u4F4D\u6578",numberIncrease:"\u65B0\u589E\u5C0F\u6578\u4F4D\u6578",moreFormats:"\u66F4\u591A\u683C\u5F0F",font:"\u5B57\u9AD4",fontSize:"\u5B57\u578B\u5927\u5C0F",bold:"\u7C97\u9AD4\uFF08Ctrl+B\uFF09",italic:"\u659C\u9AD4\uFF08Ctrl+I\uFF09",strikethrough:"\u5220\u9664\u7DDA\uFF08Alt+Shift+5\uFF09",underline:"\u5E95\u7DDA",textColor:"\u6587\u5B57\u984F\u8272",chooseColor:"\u984F\u8272\u9078\u64C7",resetColor:"\u91CD\u7F6E\u984F\u8272",customColor:"\u81EA\u5B9A\u7FA9",alternatingColors:"\u4EA4\u66FF\u984F\u8272",confirmColor:"\u78BA\u5B9A\u984F\u8272",cancelColor:"\u53D6\u6D88",collapse:"\u6536\u8D77",fillColor:"\u5132\u5B58\u683C\u984F\u8272",border:"\u908A\u6846",borderStyle:"\u908A\u6846\u985E\u578B",mergeCell:"\u5408\u4F75\u5132\u5B58\u683C",chooseMergeType:"\u9078\u64C7\u5408\u4F75\u985E\u578B",horizontalAlign:"\u6C34\u51C6\u5C0D\u9F4A",verticalAlign:"\u5782\u76F4\u5C0D\u9F4A",alignment:"\u5C0D\u9F4A\u7BA1\u9053",textWrap:"\u6587\u5B57\u63DB\u884C",textWrapMode:"\u63DB\u884C\u7BA1\u9053",textRotate:"\u6587\u5B57\u65CB\u8F49",textRotateMode:"\u65CB\u8F49\u7BA1\u9053",freezeTopRow:"\u51CD\u7D50\u7B2C\u4E00\u884C",sortAndFilter:"\u6392\u5E8F\u548C\u7BE9\u9078",findAndReplace:"\u67E5\u627E\u66FF\u63DB",sum:"\u6C42\u548C",autoSum:"\u81EA\u52D5\u6C42\u548C",moreFunction:"\u66F4\u591A\u51FD\u6578",conditionalFormat:"\u689D\u4EF6\u683C\u5F0F",postil:"\u6279\u8A3B",pivotTable:"\u6578\u64DA\u900F\u8996\u9336",chart:"\u5716\u8868",screenshot:"\u622A\u5716",splitColumn:"\u5206\u5217",insertImage:"\u63D2\u5165\u5716\u7247",insertLink:"\u63D2\u5165\u9023\u7D50",dataVerification:"\u6578\u64DA\u9A57\u8B49",protection:"\u4FDD\u8B77\u5DE5\u4F5C\u8868\u5167\u5BB9",clearText:"\u6E05\u9664\u984F\u8272\u9078\u64C7",noColorSelectedText:"\u6C92\u6709\u984F\u8272\u88AB\u9078\u64C7",toolMore:"\u66F4\u591A",toolLess:"\u5C11\u65BC",toolClose:"\u6536\u8D77",toolMoreTip:"\u66F4\u591A\u529F\u80FD",moreOptions:"\u66F4\u591A\u9078\u9805",cellFormat:"\u8A2D\u5B9A\u5132\u5B58\u683C\u683C\u5F0F",print:"\u5217\u5370"},alternatingColors:{applyRange:"\u61C9\u7528\u7BC4\u570D",selectRange:"\u9078\u64C7\u61C9\u7528\u7BC4\u570D",header:"\u9801\u7709",footer:"\u9801\u8173",errorInfo:"\u4E0D\u80FD\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C,\u8ACB\u9078\u64C7\u55AE\u500B\u5340\u57DF,\u7136\u5F8C\u518D\u8A66",textTitle:"\u683C\u5F0F\u6A23\u5F0F",custom:"\u81EA\u5B9A\u7FA9",close:"\u95DC\u9589",selectionTextColor:"\u9078\u64C7\u6587\u5B57\u984F\u8272",selectionCellColor:"\u9078\u64C7\u5132\u5B58\u683C\u984F\u8272",removeColor:"\u79FB\u9664\u4EA4\u66FF\u984F\u8272",colorShow:"\u984F\u8272",currentColor:"\u7576\u524D\u984F\u8272",tipSelectRange:"\u8ACB\u9078\u64C7\u4EA4\u66FF\u984F\u8272\u61C9\u7528\u7BC4\u570D",errorNoRange:"\u60A8\u9078\u64C7\u7684\u61C9\u7528\u7BC4\u570D\u4E0D\u662F\u9078\u5340\uFF01",errorExistColors:"\u60A8\u9078\u64C7\u7684\u61C9\u7528\u7BC4\u570D\u5DF2\u5B58\u5728\u4EA4\u66FF\u984F\u8272\u4E14\u4E0D\u5C6C\u65BC\u4F60\u8981\u7DE8\u8F2F\u7684\u61C9\u7528\u7BC4\u570D\uFF01"},button:{confirm:"\u78BA\u5B9A",cancel:"\u53D6\u6D88",close:"\u95DC\u9589",update:"Update",delete:"Delete",insert:"\u65B0\u5EFA",prevPage:"\u4E0A\u4E00\u9801",nextPage:"\u4E0B\u4E00\u9801",total:"\u7E3D\u5171\uFF1A"},paint:{start:"\u683C\u5F0F\u5237\u958B\u555F",end:"ESC\u9375\u9000\u51FA",tipSelectRange:"\u8ACB\u9078\u64C7\u9700\u8981\u8907\u88FD\u683C\u5F0F\u7684\u5340\u57DF",tipNotMulti:"\u7121\u6CD5\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C"},format:{moreCurrency:"\u66F4\u591A\u8CA8\u5E63\u683C\u5F0F",moreDateTime:"\u66F4\u591A\u65E5\u671F\u8207\u6642\u9593\u683C\u5F0F",moreNumber:"\u66F4\u591A\u6578\u4F4D\u683C\u5F0F",titleCurrency:"\u8CA8\u5E63\u683C\u5F0F",decimalPlaces:"\u5C0F\u6578\u4F4D\u6578",titleDateTime:"\u65E5\u671F\u8207\u6642\u9593\u683C\u5F0F",titleNumber:"\u6578\u4F4D\u683C\u5F0F"},info:{detailUpdate:"\u65B0\u6253\u958B",detailSave:"\u5DF2\u6062\u5FA9\u672C\u5730\u7DE9\u5B58",row:"\u884C",column:"\u5217",loading:"\u6E32\u67D3\u4E2D\xB7\xB7\xB7",copy:"\u526F\u672C",return:"\u8FD4\u56DE",rename:"\u91CD\u547D\u540D",tips:"\u8868\u683C\u91CD\u547D\u540D",noName:"\u7121\u6A19\u984C\u7684\u8A66\u7B97\u8868",wait:"\u5F85\u66F4\u65B0",add:"\u6DFB\u52A0",addLast:"\u5728\u5E95\u90E8\u6DFB\u52A0",backTop:"\u56DE\u5230\u9802\u90E8",pageInfo:"\u5171${total}\u689D,${totalPage}\u9801,\u7576\u524D\u5DF2\u986F\u793A${currentPage}\u9801",nextPage:"\u4E0B\u4E00\u9801",tipInputNumber:"\u8ACB\u8F38\u5165\u6578\u4F4D",tipInputNumberLimit:"\u65B0\u589E\u7BC4\u570D\u9650\u5236\u57281-100",tipRowHeightLimit:"\u884C\u9AD8\u5FC5\u9808\u57280 ~ 545\u4E4B\u9593",tipColumnWidthLimit:"\u5217\u5BEC\u5FC5\u9808\u57280 ~ 2038\u4E4B\u9593",pageInfoFull:"\u5171${total}\u689D,${totalPage}\u9801,\u5DF2\u986F\u793A\u5168\u90E8\u6578\u64DA"},currencyDetail:{RMB:"\u4EBA\u6C11\u5E63",USdollar:"\u7F8E\u5143",EUR:"\u6B50\u5143",GBP:"\u82F1\u938A",HK:"\u6E2F\u5143",JPY:"\u65E5\u5143",AlbanianLek:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u5217\u514B",AlgerianDinar:"\u963F\u723E\u53CA\u5229\u4E9E\u7B2C\u7D0D\u723E",Afghani:"\u963F\u5BCC\u6C57\u5C3C",ArgentinePeso:"\u963F\u6839\u5EF7\u6BD4\u7D22",UnitedArabEmiratesDirham:"\u963F\u62C9\u4F2F\u806F\u5408\u5927\u516C\u570B\u8FEA\u62C9\u59C6",ArubanFlorin:"\u963F\u9B6F\u5DF4\u5F17\u7F85\u6797",OmaniRial:"\u963F\u66FC\u88E1\u4E9E\u723E",Azerbaijanimanat:"\u963F\u585E\u62DC\u7586\u99AC\u7D0D\u7279",EgyptianPound:"\u57C3\u53CA\u938A",EthiopianBirr:"\u8863\u7D22\u6BD4\u4E9E\u6BD4\u723E",AngolaKwanza:"\u5B89\u54E5\u62C9\u5BEC\u7D2E",AustralianDollar:"\u6FB3\u5927\u5229\u4E9E\u5143",Patacas:"\u6FB3\u9580\u5143",BarbadosDollar:"\u5DF4\u5DF4\u591A\u65AF\u5143",PapuaNewGuineaKina:"\u5DF4\u5E03\u4E9E\u65B0\u5E7E\u5167\u4E9E\u57FA\u90A3",BahamianDollar:"\u5DF4\u54C8\u99AC\u5143",PakistanRupee:"\u5DF4\u57FA\u65AF\u5766\u76E7\u6BD4",ParaguayanGuarani:"\u5DF4\u62C9\u572D\u74DC\u62C9\u5C3C",BahrainiDinar:"\u5DF4\u6797\u7B2C\u7D0D\u723E",PanamanianBalboa:"\u5DF4\u62FF\u99AC\u5DF4\u6CE2\u4E9E",Brazilianreal:"\u5DF4\u897F\u88CF\u4E9E\u4F0A",Belarusianruble:"\u767D\u4FC4\u7F85\u65AF\u76E7\u5E03",BermudianDollar:"\u767E\u6155\u5927\u5143",BulgarianLev:"\u4FDD\u52A0\u5229\u4E9E\u5217\u5F17",IcelandKrona:"\u51B0\u5CF6\u514B\u6717",BosniaHerzegovinaConvertibleMark:"\u6CE2\u9ED1\u53EF\u514C\u63DB\u99AC\u514B",PolishZloty:"\u6CE2\u862D\u8332\u7F85\u63D0",Boliviano:"\u73BB\u5229\u7DAD\u4E9E\u8AFE",BelizeDollar:"\u8C9D\u88E1\u65AF\u5143",BotswanaPula:"\u6CE2\u5284\u90A3\u666E\u62C9",NotDannuzhamu:"\u4E0D\u4E39\u52AA\u7D2E\u59C6",BurundiFranc:"\u5E03\u9686\u8FEA\u6CD5\u90CE",NorthKoreanWon:"\u671D\u9BAE\u5713",DanishKrone:"\u4E39\u9EA5\u514B\u6717",EastCaribbeanDollar:"\u6771\u52A0\u52D2\u6BD4\u5143",DominicaPeso:"\u591A\u660E\u5C3C\u52A0\u6BD4\u7D22",RussianRuble:"\u4FC4\u570B\u76E7\u5E03",EritreanNakfa:"\u5384\u5229\u5782\u4E9E\u7D0D\u514B\u6CD5",CFAfranc:"\u975E\u6D32\u91D1\u878D\u5171\u540C\u9AD4\u6CD5\u90CE",PhilippinePeso:"\u83F2\u5F8B\u8CD3\u6BD4\u7D22",FijiDollar:"\u6590\u6FDF\u5143",CapeVerdeEscudo:"\u4F5B\u5F97\u89D2\u57C3\u65AF\u5EAB\u591A",FalklandIslandsPound:"\u798F\u514B\u862D\u7FA4\u5CF6\u938A",GambianDalasi:"\u5CA1\u6BD4\u4E9E\u9054\u62C9\u897F",Congolesefranc:"\u525B\u679C\u6CD5\u90CE",ColombianPeso:"\u54E5\u502B\u6BD4\u4E9E\u6BD4\u7D22",CostaRicanColon:"\u54E5\u65AF\u5927\u9ECE\u52A0\u79D1\u6717",CubanPeso:"\u53E4\u5DF4\u6BD4\u7D22",Cubanconvertiblepeso:"\u53E4\u5DF4\u53EF\u514C\u63DB\u6BD4\u7D22",GuyanaDollar:"\u84CB\u4E9E\u90A3\u5143",KazakhstanTenge:"\u54C8\u85A9\u514B\u5171\u548C\u570B\u5805\u6208",Haitiangourde:"\u6D77\u5730\u53E4\u5FB7",won:"\u97D3\u5143",NetherlandsAntillesGuilder:"\u8377\u5C6C\u5B89\u7684\u5217\u65AF\u76FE",Honduraslempiras:"\u6D2A\u90FD\u62C9\u65AF\u62C9\u502B\u76AE\u62C9",DjiboutiFranc:"\u5409\u5E03\u63D0\u6CD5\u90CE",KyrgyzstanSom:"\u5409\u723E\u5409\u65AF\u65AF\u5766\u7D22\u59C6",GuineaFranc:"\u5E7E\u5167\u4E9E\u6CD5\u90CE",CanadianDollar:"\u52A0\u62FF\u5927\u5143",GhanaianCedi:"\u52A0\u7D0D\u585E\u5730",Cambodianriel:"\u9AD8\u68C9\u745E\u723E",CzechKoruna:"\u6377\u514B\u514B\u6717",ZimbabweDollar:"\u8F9B\u5DF4\u5A01\u5143",QatariRiyal:"\u5361\u5854\u723E\u88E1\u4E9E\u723E",CaymanIslandsDollar:"\u958B\u66FC\u7FA4\u5CF6\u5143",Comorianfranc:"\u79D1\u6469\u7F85\u6CD5\u90CE",KuwaitiDinar:"\u79D1\u5A01\u7279\u7B2C\u7D0D\u723E",CroatianKuna:"\u514B\u7F85\u5730\u4E9E\u5EAB\u7D0D",KenyanShilling:"\u80AF\u96C5\u5148\u4EE4",LesothoLoti:"\u840A\u7D22\u6258\u6D1B\u8482",LaoKip:"\u8001\u64BE\u57FA\u666E",LebanesePound:"\u9ECE\u5DF4\u5AE9\u938A",Lithuanianlitas:"\u7ACB\u9676\u5B9B\u7ACB\u7279",LibyanDinar:"\u5229\u6BD4\u4E9E\u7B2C\u7D0D\u723E",LiberianDollar:"\u5229\u6BD4\u4E9E\u5143",RwandaFranc:"\u76E7\u5B89\u9054\u6CD5\u90CE",RomanianLeu:"\u7F85\u99AC\u5C3C\u4E9E\u5217\u4F0A",MalagasyAriary:"\u99AC\u62C9\u52A0\u897F\u963F\u88CF\u4E9E\u88CF",MaldivianRufiyaa:"\u746A\u5F8B\u5730\u592B\u62C9\u83F2\u4E9E",MalawiKwacha:"\u99AC\u62C9\u5A01\u514B\u74E6\u67E5",MalaysianRinggit:"\u99AC\u4F86\u897F\u4E9E\u6797\u5409\u7279",MacedoniawearingDinar:"\u99AC\u5176\u9813\u6234\u7B2C\u7D0D\u723E",MauritiusRupee:"\u6A21\u88E1\u897F\u65AF\u76E7\u6BD4",MauritanianOuguiya:"\u8305\u5229\u5854\u5C3C\u4E9E\u70CF\u5409\u4E9E",MongolianTugrik:"\u8499\u53E4\u5716\u683C\u88E1\u514B",BangladeshiTaka:"\u5B5F\u52A0\u62C9\u5854\u5361",PeruvianNuevoSol:"\u79D8\u9B6F\u65B0\u7D22\u723E",MyanmarKyat:"\u7DEC\u7538\u958B\u4E9E\u7279",MoldovanLeu:"\u83AB\u723E\u9054\u74E6\u5217\u4F0A",MoroccanDirham:"\u6469\u6D1B\u54E5\u8FEA\u62C9\u59C6",MozambiqueMetical:"\u83AB\u4E09\u6BD4\u514B\u6885\u8482\u5361\u723E",MexicanPeso:"\u58A8\u897F\u54E5\u6BD4\u7D22",NamibianDollar:"\u7D0D\u7C73\u6BD4\u4E9E\u5143",SouthAfricanRand:"\u5357\u975E\u862D\u7279",SouthSudanesePound:"\u5357\u8607\u4E39\u938A",NicaraguaCordoba:"\u5C3C\u52A0\u62C9\u74DC\u79D1\u591A\u5DF4",NepaleseRupee:"\u5C3C\u6CCA\u723E\u76E7\u6BD4",NigerianNaira:"\u5948\u53CA\u5229\u4E9E\u5948\u62C9",NorwegianKrone:"\u632A\u5A01\u514B\u6717",GeorgianLari:"\u55AC\u6CBB\u4E9E\u62C9\u745E",RMBOffshore:"\u4EBA\u6C11\u5E63\uFF08\u96E2\u5CB8\uFF09",SwedishKrona:"\u745E\u5178\u514B\u6717",SwissFranc:"\u745E\u58EB\u6CD5\u90CE",SerbianDinar:"\u585E\u723E\u7DAD\u4E9E\u7B2C\u7D0D\u723E",SierraLeone:"\u585E\u62C9\u91CC\u6602\u5229\u6602",SeychellesRupee:"\u585E\u820C\u8033\u76E7\u6BD4",SaudiRiyal:"\u6C99\u7279\u88E1\u4E9E\u723E",SaoTomeDobra:"\u8056\u591A\u7F8E\u591A\u5E03\u62C9",SaintHelenapound:"\u8056\u8D6B\u502B\u90A3\u7FA4\u5CF6\u78C5",SriLankaRupee:"\u65AF\u91CC\u862D\u5361\u76E7\u6BD4",SwazilandLilangeni:"\u53F2\u74E6\u6FDF\u862D\u88CF\u862D\u5409\u5C3C",SudanesePound:"\u8607\u4E39\u938A",Surinamesedollar:"\u8607\u5229\u5357\u5143",SolomonIslandsDollar:"\u6240\u7F85\u9580\u7FA4\u5CF6\u5143",SomaliShilling:"\u7D22\u99AC\u5229\u4E9E\u5148\u4EE4",TajikistanSomoni:"\u5854\u5409\u514B\u5171\u548C\u570B\u7D22\u83AB\u5C3C",PacificFranc:"\u592A\u5E73\u6D0B\u6CD5\u90CE",ThaiBaht:"\u6CF0\u570B\u9296",TanzanianShilling:"\u5766\u5C1A\u5C3C\u4E9E\u5148\u4EE4",TonganPaanga:"\u6771\u52A0\u6F58\u52A0",TrinidadandTobagoDollar:"\u5343\u88E1\u9054\u6258\u8C9D\u54E5\u5143",TunisianDinar:"\u7A81\u5C3C\u65AF\u7B2C\u7D0D\u723E",TurkishLira:"\u571F\u8033\u5176\u91CC\u62C9",VanuatuVatu:"\u74E6\u52AA\u963F\u5716\u74E6\u5716",GuatemalanQuetzal:"\u74DC\u5730\u99AC\u62C9\u683C\u67E5\u723E",CommissionBolivar:"\u59D4\u5167\u745E\u62C9\u535A\u5229\u74E6",BruneiDollar:"\u6C76\u840A\u5143",UgandanShilling:"\u70CF\u5E72\u9054\u5148\u4EE4",UkrainianHryvnia:"\u70CF\u514B\u862D\u683C\u88E1\u592B\u5C3C\u4E9E",UruguayanPeso:"\u70CF\u62C9\u572D\u6BD4\u7D22",Uzbekistansom:"\u70CF\u8332\u5225\u514B\u8607\u59C6",WesternSamoaTala:"\u85A9\u6469\u4E9E\u5854\u62C9",SingaporeDollar:"\u65B0\u52A0\u5761\u5143",NT:"\u65B0\u81FA\u5E63",NewZealandDollar:"\u65B0\u897F\u862D\u5143",HungarianForint:"\u5308\u7259\u5229\u798F\u6797",SyrianPound:"\u6558\u5229\u4E9E\u938A",JamaicanDollar:"\u7259\u8CB7\u52A0\u5143",ArmenianDram:"\u4E9E\u7F8E\u5C3C\u4E9E\u5FB7\u62C9\u59C6",YemeniRial:"\u8449\u9580\u88E1\u4E9E\u723E",IraqiDinar:"\u4F0A\u62C9\u514B\u7B2C\u7D0D\u723E",IranianRial:"\u4F0A\u6717\u88E1\u4E9E\u723E",NewIsraeliShekel:"\u4EE5\u8272\u5217\u65B0\u8B1D\u514B\u723E",IndianRupee:"\u5370\u5EA6\u76E7\u6BD4",IndonesianRupiah:"\u5370\u5C3C\u76E7\u6BD4",JordanianDinar:"\u7D04\u65E6\u7B2C\u7D0D\u723E",VND:"\u8D8A\u5357\u76FE",ZambianKwacha:"\u5C1A\u6BD4\u4E9E\u514B\u74E6\u67E5",GibraltarPound:"\u76F4\u5E03\u7F85\u9640\u938A",ChileanPeso:"\u667A\u5229\u6BD4\u7D22",CFAFrancBEAC:"\u4E2D\u975E\u91D1\u878D\u5408\u4F5C\u6CD5\u90CE"},defaultFmt:[{text:"\u81EA\u52D5",value:"General",example:""},{text:"\u7D14\u6587\u5B57",value:"@",example:""},{text:"",value:"split",example:""},{text:"\u6578\u4F4D",value:"##0.00",example:"1000.12"},{text:"\u767E\u5206\u6BD4",value:"#0.00%",example:"12.21%"},{text:"\u79D1\u5B78\u8A08\u6578",value:"0.00E+00",example:"1.01E+5"},{text:"",value:"split",example:""},{text:"\u6703\u8A08",value:"\xA5(0.00)",example:"\xA5(1200.09)"},{text:"\u842C\u5143",value:"w",example:"1\u4EBF2000\u4E072500"},{text:"\u8CA8\u5E63",value:"\xA50.00",example:"\xA51200.09"},{text:"\u842C\u51432\u4F4D\u5C0F\u6578",value:"w0.00",example:"2\u4E072500.55"},{text:"",value:"split",example:""},{text:"\u65E5\u671F",value:"yyyy-MM-dd",example:"2017-11-29"},{text:"\u6642\u9593",value:"hh:mm AM/PM",example:"3:00 PM"},{text:"\u6642\u959324H",value:"hh:mm",example:"15:00"},{text:"\u65E5\u671F\u6642\u9593",value:"yyyy-MM-dd hh:mm AM/PM",example:"2017-11-29 3:00 PM"},{text:"\u65E5\u671F\u6642\u959324H",value:"yyyy-MM-dd hh:mm",example:"2017-11-29 15:00"},{text:"",value:"split",example:""},{text:"\u81EA\u5B9A\u7FA9\u683C\u5F0F",value:"fmtOtherSelf",example:"more"}],dateFmtList:[{name:"1930-08-05",value:"yyyy-MM-dd"},{name:"1930/8/5",value:"yyyy/MM/dd"},{name:"1930\u5E748\u67085\u65E5",value:'yyyy"\u5E74"M"\u6708"d"\u65E5"'},{name:"08-05",value:"MM-dd"},{name:"8-5",value:"M-d"},{name:"8\u67085\u65E5",value:'M"\u6708"d"\u65E5"'},{name:"13:30:30",value:"h:mm:ss"},{name:"13:30",value:"h:mm"},{name:"\u4E0B\u534801:30",value:"\u4E0A\u5348/\u4E0B\u5348 hh:mm"},{name:"\u4E0B\u53481:30",value:"\u4E0A\u5348/\u4E0B\u5348 h:mm"},{name:"\u4E0B\u53481:30:30",value:"\u4E0A\u5348/\u4E0B\u5348 h:mm:ss"},{name:"08-05 \u4E0B\u534801:30",value:"MM-dd \u4E0A\u5348/\u4E0B\u5348 hh:mm"}],fontFamily:{MicrosoftYaHei:"Microsoft YaHei"},fontarray:["Times New Roman","Arial","Tahoma","Verdana","\u5FAE\u8EDF\u96C5\u9ED1","\u5B8B\u9AD4","\u9ED1\u9AD4","\u6977\u9AD4","\u4EFF\u5B8B","\u65B0\u5B8B\u9AD4","\u83EF\u6587\u65B0\u9B4F","\u83EF\u6587\u884C\u6977","\u83EF\u6587\u96B8\u66F8"],fontjson:{"times new roman":0,arial:1,tahoma:2,verdana:3,\u5FAE\u8EDF\u96C5\u9ED1:4,"microsoft yahei":4,\u5B8B\u9AD4:5,simsun:5,\u9ED1\u9AD4:6,simhei:6,\u6977\u9AD4:7,kaiti:7,\u4EFF\u5B8B:8,fangsong:8,\u65B0\u5B8B\u9AD4:9,nsimsun:9,\u83EF\u6587\u65B0\u9B4F:10,stxinwei:10,\u83EF\u6587\u884C\u6977:11,stxingkai:11,\u83EF\u6587\u96B8\u66F8:12,stliti:12},border:{borderTop:"\u4E0A\u6846\u7DDA",borderBottom:"\u4E0B\u6846\u7DDA",borderLeft:"\u5DE6\u6846\u7DDA",borderRight:"\u53F3\u6846\u7DDA",borderNone:"\u7121",borderAll:"\u6240\u6709",borderOutside:"\u5916\u5074",borderInside:"\u5167\u5074",borderHorizontal:"\u5167\u5074\u6A6B\u7DDA",borderVertical:"\u5167\u5074\u5206\u9694\u865F",borderColor:"\u908A\u6846\u984F\u8272",borderSize:"\u908A\u6846\u7C97\u7D30"},merge:{mergeAll:"\u5168\u90E8\u5408\u4F75",mergeV:"\u5782\u76F4\u5408\u4F75",mergeH:"\u6C34\u5E73\u5408\u4F75",mergeCancel:"\u53D6\u6D88\u5408\u4F75",overlappingError:"\u4E0D\u80FD\u5408\u4F75\u91CD\u758A\u5340\u57DF",partiallyError:"\u7121\u6CD5\u5C0D\u90E8\u5206\u5408\u4F75\u5132\u5B58\u683C\u57F7\u884C\u6B64\u64CD\u4F5C"},align:{left:"\u5DE6\u5C0D\u9F4A",center:"\u4E2D\u9593\u5C0D\u9F4A",right:"\u53F3\u5C0D\u9F4A",top:"\u9802\u90E8\u5C0D\u9F4A",middle:"\u5C45\u4E2D\u5C0D\u9F4A",bottom:"\u5E95\u90E8\u5C0D\u9F4A"},textWrap:{overflow:"\u6EA2\u51FA",wrap:"\u81EA\u52D5\u63DB\u884C",clip:"\u622A\u65B7"},rotation:{none:"\u7121\u65CB\u8F49",angleup:"\u5411\u4E0A\u50BE\u659C",angledown:"\u5411\u4E0B\u50BE\u659C",vertical:"\u8C4E\u6392\u6587\u5B57",rotationUp:"\u5411\u4E0A90\xB0",rotationDown:"\u5411\u4E0B90\xB0"},freezen:{default:"\u51CD\u7D50\u7B2C\u4E00\u884C",freezenRow:"\u51CD\u7D50\u7B2C\u4E00\u884C",freezenColumn:"\u51CD\u7D50\u7B2CA\u5217",freezenRC:"\u51CD\u7D50\u884C\u5217",freezenRowRange:"\u51CD\u7D50\u884C\u5230\u9078\u5340",freezenColumnRange:"\u51CD\u7D50\u5217\u5230\u9078\u5340",freezenRCRange:"\u51CD\u7D50\u884C\u5217\u5230\u9078\u5340",freezenCancel:"\u53D6\u6D88\u51CD\u7D50",noSeletionError:"\u6CA1\u6709\u9078\u5340",rangeRCOverErrorTitle:"\u51CD\u7D50\u63D0\u9192",rangeRCOverError:"\u51CD\u7D50\u7A97\u683C\u8D85\u904E\u53EF\u898B\u7BC4\u570D\uFF0C\u6703\u5C0E\u81F4\u7121\u6CD5\u6B63\u5E38\u64CD\u4F5C\uFF0C\u8ACB\u91CD\u65B0\u8A2D\u5B9A\u51CD\u7D50\u5340\u57DF\u3002"},sort:{asc:"\u6607\u51AA",desc:"\u964D\u5E8F",custom:"\u81EA\u5B9A\u7FA9\u6392\u5E8F",hasTitle:"\u6578\u64DA\u5177\u6709\u6A19\u984C\u884C",sortBy:"\u6392\u5E8F\u4F9D\u64DA",addOthers:"\u6DFB\u52A0\u5176\u4ED6\u6392\u5E8F\u5217",close:"\u95DC\u9589",confirm:"\u6392\u5E8F",columnOperation:"\u5217",secondaryTitle:"\u6B21\u8981\u6392\u5E8F",sortTitle:"\u6392\u5E8F\u7BC4\u570D",sortRangeTitle:"\u6392\u5E8F\u7BC4\u570D\u5F9E",sortRangeTitleTo:"\u5230",noRangeError:"\u4E0D\u80FD\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C,\u8ACB\u9078\u64C7\u55AE\u500B\u5340\u57DF,\u7136\u5F8C\u518D\u8A66",mergeError:"\u9078\u5340\u6709\u5408\u4F75\u5132\u5B58\u683C,\u7121\u6CD5\u57F7\u884C\u6B64\u64CD\u4F5C\uFF01",columnSortMergeError:"\u5217\u6392\u5E8F\u6703\u64F4\u5C55\u81F3\u6574\u500B\u8868\u683C\u9078\u5340\uFF0C\u9078\u5340\u6709\u5408\u4E26\u55AE\u5143\u683C\uFF0C\u7121\u6CD5\u57F7\u884C\u6B64\u64CD\u4F5C\uFF0C\u8ACB\u9078\u64C7\u529F\u80FD\u6B04\u6392\u5E8F\u529F\u80FD\uFF01"},filter:{filter:"\u7BE9\u9078",clearFilter:"\u6E05\u9664\u7BE9\u9078",sortByAsc:"\u4EE5A-Z\u6607\u51AA\u6392\u5217",sortByDesc:"\u4EE5Z-A\u964D\u5E8F\u6392\u5217",filterByColor:"\u6309\u984F\u8272\u7BE9\u9078",filterByCondition:"\u6309\u689D\u4EF6\u904E\u6FFE",filterByValues:"\u6309\u503C\u904E\u6FFE",filiterInputNone:"\u7121",filiterInputTip:"\u8F38\u5165\u7BE9\u9078\u503C",filiterRangeStart:"\u5F9E",filiterRangeStartTip:"\u7BC4\u570D\u958B\u59CB",filiterRangeEnd:"\u5230",filiterRangeEndTip:"\u7BC4\u570D\u7ED3\u675F",filterValueByAllBtn:"\u5168\u9078",filterValueByClearBtn:"\u6E05\u9664",filterValueByInverseBtn:"\u53CD\u9078",filterValueByTip:"\u6309\u7167\u503C\u9032\u884C\u7BE9\u9078",filterConform:"\u78BA \u8A8D",filterCancel:"\u53D6 \u6D88",conditionNone:"\u7121",conditionCellIsNull:"\u5132\u5B58\u683C\u70BA\u7A7A",conditionCellNotNull:"\u5132\u5B58\u683C\u6709\u6578\u64DA",conditionCellTextContain:"\u6587\u5B57\u5305\u542B",conditionCellTextNotContain:"\u6587\u5B57\u4E0D\u5305\u542B",conditionCellTextStart:"\u6587\u5B57\u958B\u982D\u70BA",conditionCellTextEnd:"\u6587\u5B57\u7D50\u5C3E\u70BA",conditionCellTextEqual:"\u6587\u5B57\u7B49\u65BC",conditionCellDateEqual:"\u65E5\u671F\u7B49\u65BC",conditionCellDateBefore:"\u65E5\u671F\u65E9\u65BC",conditionCellDateAfter:"\u65E5\u671F\u665A\u65BC",conditionCellGreater:"\u5927\u65BC",conditionCellGreaterEqual:"\u5927\u65BC\u7B49\u65BC",conditionCellLess:"\u5C0F\u65BC",conditionCellLessEqual:"\u5C0F\u4E8E\u7B49\u65BC",conditionCellEqual:"\u7B49\u65BC",conditionCellNotEqual:"\u4E0D\u7B49\u65BC",conditionCellBetween:"\u4ECB\u65BC",conditionCellNotBetween:"\u4E0D\u5728\u5176\u4E2D",filiterMoreDataTip:"\u6578\u64DA\u91CF\u5927\uFF01\u8ACB\u7A0D\u5F8C",filiterMonthText:"\u6708",filiterYearText:"\u5E74",filiterByColorTip:"\u6309\u5132\u5B58\u683C\u984F\u8272\u7BE9\u9078",filiterByTextColorTip:"\u6309\u5132\u5B58\u683C\u5B57\u9AD4\u984F\u8272\u7BE9\u9078",filterContainerOneColorTip:"\u672C\u5217\u50C5\u5305\u542B\u4E00\u7A2E\u984F\u8272",filterDateFormatTip:"\u65E5\u671F\u683C\u5F0F",valueBlank:"(\u7A7A\u767D)",mergeError:"\u7BE9\u9078\u9078\u5340\u6709\u5408\u4F75\u5132\u5B58\u683C,\u7121\u6CD5\u57F7\u884C\u6B64\u64CD\u4F5C\uFF01"},rightclick:{copy:"\u8907\u88FD",copyAs:"\u8907\u88FD\u70BA",paste:"\u7C98\u8CBC",insert:"\u63D2\u5165",delete:"\u5220\u9664",deleteCell:"\u5220\u9664\u5132\u5B58\u683C",deleteSelected:"\u5220\u9664\u9078\u4E2D",hide:"\u96B1\u85CF",hideSelected:"\u96B1\u85CF\u9078\u4E2D",showHide:"\u986F\u793A\u96B1\u85CF",to:"\u5411",left:"\u5DE6",right:"\u53F3",top:"\u4E0A",bottom:"\u4E0B",moveLeft:"\u5DE6\u79FB",moveUp:"\u4E0A\u79FB",add:"\u65B0\u589E",row:"\u884C",column:"\u5217",width:"\u5BEC",height:"\u9AD8",number:"\u6578\u4F4D",confirm:"\u78BA\u8A8D",orderAZ:"A-Z\u9806\u5E8F\u6392\u5217",orderZA:"Z-A\u964D\u5E8F\u6392\u5217",clearContent:"\u6E05\u9664\u5167\u5BB9",matrix:"\u77E9\u9663\u64CD\u4F5C\u9078\u5340",sortSelection:"\u6392\u5E8F\u9078\u5340",filterSelection:"\u7BE9\u9078\u9078\u5340",chartGeneration:"\u5716\u8868\u751F\u6210",firstLineTitle:"\u9996\u884C\u70BA\u6A19\u984C",untitled:"\u7121\u6A19\u984C",array1:"\u4E00\u7DAD\u6578\u7D44",array2:"\u4E8C\u7DAD\u9663\u5217",array3:"\u591A\u5143\u6578\u7D44",diagonal:"\u5C0D\u89D2\u7DDA",antiDiagonal:"\u53CD\u5C0D\u89D2\u7DDA",diagonalOffset:"\u5C0D\u89D2\u504F\u79FB",offset:"\u504F\u79FB\u91CF",boolean:"\u5E03\u6797\u503C",flip:"\u7FFB\u8F49",upAndDown:"\u4E0A\u4E0B",leftAndRight:"\u5DE6\u53F3",clockwise:"\u9806\u6642\u91DD",counterclockwise:"\u9006\u6642\u91DD",transpose:"\u8F49\u7F6E",matrixCalculation:"\u77E9\u9663\u8A08\u7B97",plus:"\u52A0",minus:"\u51CF",multiply:"\u4E58",divided:"\u9664",power:"\u6B21\u65B9",root:"\u6B21\u65B9\u6839",log:"log",delete0:"\u5220\u9664\u5169\u7AEF0\u503C",removeDuplicate:"\u5220\u9664\u91CD\u8907\u503C",byRow:"\u6309\u884C",byCol:"\u6309\u5217",generateNewMatrix:"\u751F\u6210\u65B0\u77E9\u9663"},comment:{insert:"\u65B0\u5EFA\u6279\u8A3B",edit:"\u7DE8\u8F2F\u6279\u8A3B",delete:"\u5220\u9664",showOne:"\u986F\u793A/\u96B1\u85CF\u6279\u8A3B",showAll:"\u986F\u793A/\u96B1\u85CF\u6240\u6709\u6279\u8A3B"},screenshot:{screenshotTipNoSelection:"\u8ACB\u6846\u9078\u9700\u8981\u622A\u5716\u7684\u7BC4\u570D",screenshotTipTitle:"\u63D0\u793A\uFF01",screenshotTipHasMerge:"\u7121\u6CD5\u5C0D\u5408\u4F75\u5132\u5B58\u683C\u57F7\u884C\u6B64\u64CD\u4F5C",screenshotTipHasMulti:"\u7121\u6CD5\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C",screenshotTipSuccess:"\u622A\u53D6\u6210\u529F",screenshotImageName:"\u622A\u5716",downLoadClose:"\u95DC\u9589",downLoadCopy:"\u8907\u88FD\u5230\u526A\u5207\u677F",downLoadBtn:"\u4E0B\u8F09",browserNotTip:"\u4E0B\u8F09\u529F\u80FDIE\u700F\u89BD\u5668\u4E0D\u652F\u6301\uFF01",rightclickTip:"\u8ACB\u5728\u5716\u7247\u4E0A\u53F3\u9375\u9EDE\u64CA'\u8907\u88FD'",successTip:"\u5DF2\u6210\u529F\u8907\u88FD\uFF08\u5982\u679C\u7C98\u8CBC\u5931\u6557,\u8ACB\u5728\u5716\u7247\u4E0A\u53F3\u9375\u9EDE\u64CA'\u8907\u88FD\u5716\u7247'\uFF09"},splitText:{splitDelimiters:"\u5206\u5272\u7B26\u865F",splitOther:"\u5176\u5B83",splitContinueSymbol:"\u9023\u7E8C\u5206\u9694\u7B26\u865F\u8996\u70BA\u55AE\u500B\u8655\u7406",splitDataPreview:"\u6578\u64DA\u9810\u89BD",splitTextTitle:"\u6587\u5B57\u5206\u5217",splitConfirmToExe:"\u6B64\u8655\u5DF2\u6709\u6578\u64DA,\u662F\u5426\u66FF\u63DB\u5B83\uFF1F",tipNoMulti:"\u80FD\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C,\u8ACB\u9078\u64C7\u55AE\u500B\u5340\u57DF,\u7136\u5F8C\u518D\u8A66",tipNoMultiColumn:"\u4E00\u6B21\u53EA\u80FD\u8F49\u63DB\u4E00\u5217\u6578\u64DA,\u9078\u5B9A\u5340\u57DF\u53EF\u4EE5\u6709\u591A\u884C,\u4F46\u4E0D\u80FD\u6709\u591A\u5217,\u8ACB\u5728\u9078\u5B9A\u55AE\u5217\u5340\u57DF\u4EE5\u5F8C\u518D\u8A66"},imageText:{imageSetting:"\u5716\u7247\u8A2D\u5B9A",close:"\u95DC\u9589",conventional:"\u5E38\u898F",moveCell1:"\u79FB\u52D5\u4E26\u8ABF\u6574\u5132\u5B58\u683C\u5927\u5C0F",moveCell2:"\u79FB\u52D5\u4E26\u4E14\u4E0D\u8ABF\u6574\u5132\u5B58\u683C\u7684\u5927\u5C0F",moveCell3:"\u4E0D\u8981\u79FB\u52D5\u5132\u5B58\u683C\u4E26\u8ABF\u6574\u5176\u5927\u5C0F",fixedPos:"\u56FA\u5B9A\u4F4D\u7F6E",border:"\u908A\u6846",width:"\u5BEC\u5EA6",radius:"\u534A\u5F91",style:"\u6A23\u5F0F",solid:"\u5BE6\u7DDA",dashed:"\u865B\u7DDA",dotted:"\u9EDE\u72C0",double:"\u96D9\u7DDA",color:"\u984F\u8272"},punctuation:{tab:"Tab \u9375",semicolon:"\u5206\u865F",comma:"\u9017\u865F",space:"\u7A7A\u683C"},findAndReplace:{find:"\u67E5\u627E",replace:"\u66FF\u63DB",goto:"\u8F49\u5230",location:"\u5B9A\u4F4D\u689D\u4EF6",formula:"\u516C\u5F0F",date:"\u65E5\u671F",number:"\u6578\u4F4D",string:"\u5B57\u5143",error:"\u932F\u8AA4",condition:"\u689D\u4EF6\u683C\u5F0F",rowSpan:"\u9593\u9694\u884C",columnSpan:"\u9593\u9694\u5217",locationExample:"\u5B9A\u4F4D",lessTwoRowTip:"\u8ACB\u9078\u64C7\u6700\u5C11\u5169\u884C",lessTwoColumnTip:"\u8ACB\u9078\u64C7\u6700\u5C11\u5169\u884C",findTextbox:"\u67E5\u627E\u5185\u5BB9",replaceTextbox:"\u66FF\u63DB\u5167\u5BB9",regexTextbox:"\u898F\u5247\u904B\u7B97\u5F0F\u5339\u914D",wholeTextbox:"\u6574\u8A5E\u5339\u914D",distinguishTextbox:"\u5340\u5206\u5927\u5C0F\u5BEB\u5339\u914D",allReplaceBtn:"\u5168\u90E8\u66FF\u63DB",replaceBtn:"\u66FF\u63DB",allFindBtn:"\u67E5\u627E\u5168\u90E8",findBtn:"\u67E5\u627E\u4E0B\u4E00\u500B",noFindTip:"\u6C92\u6709\u67E5\u627E\u5230\u8A72\u5167\u5BB9",modeTip:"\u8A72\u6A21\u5F0F\u4E0B\u4E0D\u53EF\u9032\u884C\u6B64\u64CD\u4F5C",searchTargetSheet:"\u5DE5\u4F5C\u8868",searchTargetCell:"\u5132\u5B58\u683C",searchTargetValue:"\u503C",searchInputTip:"\u8ACB\u8F38\u5165\u67E5\u627E\u5167\u5BB9",noReplceTip:"\u6C92\u6709\u53EF\u66FF\u63DB\u7684\u5167\u5BB9",noMatchTip:"\u627E\u4E0D\u5230\u5339\u914D\u9805",successTip:"\u5DF2\u7D93\u5E6B\u60A8\u8490\u7D22\u4E26\u9032\u884C\u4E86${xlength}\u8655\u66FF\u63DB",locationConstant:"\u5E38\u6578",locationFormula:"\u516C\u5F0F",locationDate:"\u65E5\u671F",locationDigital:"\u6578\u4F4D",locationString:"\u5B57\u5143",locationBool:"\u908F\u8F2F\u503C",locationError:"\u932F\u8AA4",locationNull:"\u7A7A\u503C",locationCondition:"\u689D\u4EF6\u683C\u5F0F",locationRowSpan:"\u9593\u9694\u884C",locationColumnSpan:"\u9593\u9694\u5217",locationTiplessTwoRow:"\u8ACB\u9078\u64C7\u6700\u5C11\u5169\u884C",locationTiplessTwoColumn:"\u8ACB\u9078\u64C7\u6700\u5C11\u5169\u5217",locationTipNotFindCell:"\u672A\u627E\u5230\u5132\u5B58\u683C"},sheetconfig:{delete:"\u5220\u9664",copy:"\u8907\u88FD",rename:"\u91CD\u547D\u540D",changeColor:"\u66F4\u6539\u984F\u8272",hide:"\u96B1\u85CF",unhide:"\u53D6\u6D88\u96B1\u85CF",moveLeft:"\u5411\u5DE6\u79FB",moveRight:"\u5411\u53F3\u79FB",resetColor:"\u91CD\u7F6E\u984F\u8272",cancelText:"\u53D6\u6D88",chooseText:"\u78BA\u5B9A\u984F\u8272",tipNameRepeat:"\u7C64\u9801\u7684\u540D\u7A31\u4E0D\u80FD\u91CD\u8907\uFF01\u8ACB\u91CD\u65B0\u4FEE\u6539",noMoreSheet:"\u5DE5\u4F5C\u8584\u5167\u81F3\u5C11\u542B\u6709\u4E00\u5F35\u53EF\u8996\u5DE5\u4F5C\u8868\u3002\u82E5\u9700\u5220\u9664\u9078\u5B9A\u7684\u5DE5\u4F5C\u8868,\u8ACB\u5148\u63D2\u5165\u4E00\u5F35\u65B0\u5DE5\u4F5C\u8868\u6216\u986F\u793A\u4E00\u5F35\u96B1\u85CF\u7684\u5DE5\u4F5C\u8868\u3002\u3002",confirmDelete:"\u662F\u5426\u5220\u9664",redoDelete:"\u53EF\u4EE5\u901A\u904ECtrl+Z\u64A4\u92B7\u5220\u9664",noHide:"\u4E0D\u80FD\u96B1\u85CF,\u81F3\u5C11\u4FDD\u7559\u4E00\u500Bsheet\u6A19\u7C64",chartEditNoOpt:"\u5716\u8868\u7DE8\u8F2F\u6A21\u5F0F\u4E0B\u4E0D\u5141\u8A31\u8A72\u64CD\u4F5C\uFF01",sheetNameSpecCharError:`\u540D\u7A31\u4E0D\u80FD\u5305\u542B:[ ] : ? * / ' "`,sheetNamecannotIsEmptyError:"\u540D\u7A31\u4E0D\u80FD\u70BA\u7A7A"},conditionformat:{conditionformat_greaterThan:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u5927\u65BC",conditionformat_greaterThan_title:"\u70BA\u5927\u65BC\u4EE5\u4E0B\u503C\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_lessThan:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u5C0F\u65BC",conditionformat_lessThan_title:"\u70BA\u5C0F\u65BC\u4EE5\u4E0B\u503C\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_betweenness:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u4ECB\u65BC",conditionformat_betweenness_title:"\u70BA\u4ECB\u65BC\u4EE5\u4E0B\u503C\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_equal:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u7B49\u65BC",conditionformat_equal_title:"\u70BA\u7B49\u65BC\u4EE5\u4E0B\u503C\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_textContains:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u6587\u5B57\u5305\u542B",conditionformat_textContains_title:"\u70BA\u5305\u542B\u4EE5\u4E0B\u6587\u5B57\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_occurrenceDate:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u767C\u751F\u65E5\u671F",conditionformat_occurrenceDate_title:"\u70BA\u5305\u542B\u4EE5\u4E0B\u65E5\u671F\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_duplicateValue:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u91CD\u8907\u503C",conditionformat_duplicateValue_title:"\u70BA\u5305\u542B\u4EE5\u4E0B\u985E\u578B\u503C\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_top10:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u524D10\u9805",conditionformat_top10_percent:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u524D10%",conditionformat_top10_title:"\u70BA\u503C\u6700\u5927\u7684\u90A3\u4E9B\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_last10:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u6700\u5F8C10\u9805",conditionformat_last10_percent:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u6700\u5F8C10%",conditionformat_last10_title:"\u70BA\u503C\u6700\u5C0F\u7684\u90A3\u4E9B\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_AboveAverage:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u9AD8\u65BC\u5E73\u5747\u503C",conditionformat_AboveAverage_title:"\u70BA\u9AD8\u65BC\u5E73\u5747\u503C\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_SubAverage:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u4F4E\u65BC\u5E73\u5747\u503C",conditionformat_SubAverage_title:"\u70BA\u4F4E\u65BC\u5E73\u5747\u503C\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",rule:"\u898F\u5247",newRule:"\u65B0\u5EFA\u898F\u5247",editRule:"\u7DE8\u8F2F\u898F\u5247",deleteRule:"\u5220\u9664\u898F\u5247",deleteCellRule:"\u6E05\u9664\u6240\u9078\u5132\u5B58\u683C\u7684\u898F\u5247",deleteSheetRule:"\u6E05\u9664\u6574\u500B\u5DE5\u4F5C\u8868\u7684\u898F\u5247",manageRules:"\u7BA1\u7406\u898F\u5247",showRules:"\u986F\u793A\u5176\u683C\u5F0F\u898F\u5247",highlightCellRules:"\u7A81\u51FA\u986F\u793A\u5132\u5B58\u683C\u898F\u5247",itemSelectionRules:"\u9805\u76EE\u9078\u53D6\u898F\u5247",conditionformatManageRules:"\u689D\u4EF6\u683C\u5F0F\u898F\u5247\u7BA1\u7406\u5668",format:"\u683C\u5F0F",setFormat:"\u8A2D\u5B9A\u683C\u5F0F",setAs:"\u8A2D\u5B9A\u70BA",setAsByArea:"\u91DD\u5C0D\u9078\u5B9A\u5340\u57DF,\u8A2D\u5B9A\u70BA",applyRange:"\u61C9\u7528\u7BC4\u570D",selectRange:"\u9EDE\u64CA\u9078\u64C7\u61C9\u7528\u7BC4\u570D",selectRange_percent:"\u6240\u9078\u7BC4\u570D\u7684\u767E\u5206\u6BD4",selectRange_average:"\u9078\u5B9A\u7BC4\u570D\u7684\u5E73\u5747\u503C",selectRange_value:"\u9078\u5B9A\u7BC4\u570D\u4E2D\u7684\u6578\u503C",pleaseSelectRange:"\u8ACB\u9078\u64C7\u61C9\u7528\u7BC4\u570D",selectDataRange:"\u9EDE\u64CA\u9078\u64C7\u6578\u64DA\u7BC4\u570D",selectCell:"\u9078\u64C7\u5132\u5B58\u683C",pleaseSelectCell:"\u8ACB\u9078\u64C7\u5132\u5B58\u683C",pleaseSelectADate:"\u8ACB\u9078\u64C7\u65E5\u671F",pleaseEnterInteger:"\u8ACB\u8F38\u5165\u4E00\u500B\u4ECB\u65BC1\u548C1000\u4E4B\u9593\u7684\u6574\u6578",onlySingleCell:"\u53EA\u80FD\u5C0D\u55AE\u500B\u5132\u5B58\u683C\u9032\u884C\u5F15\u7528",conditionValueCanOnly:"\u689D\u4EF6\u503C\u53EA\u80FD\u662F\u6578\u4F4D\u6216\u8005\u55AE\u500B\u5132\u5B58\u683C",ruleTypeItem1:"\u57FA\u65BC\u5404\u81EA\u503C\u8A2D\u5B9A\u6240\u6709\u5132\u5B58\u683C\u7684\u683C\u5F0F",ruleTypeItem2:"\u53EA\u70BA\u5305\u542B\u4EE5\u4E0B\u5167\u5BB9\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",ruleTypeItem2_title:"\u53EA\u70BA\u6EFF\u8DB3\u4EE5\u4E0B\u689D\u4EF6\u7684\u5132\u5B58\u683C",ruleTypeItem3:"\u50C5\u5C0D\u6392\u540D\u9760\u524D\u6216\u9760\u5F8C\u7684\u6578\u503C\u8A2D\u5B9A\u683C\u5F0F",ruleTypeItem3_title:"\u70BA\u4EE5\u4E0B\u6392\u540D\u5167\u7684\u503C",ruleTypeItem4:"\u50C5\u5C0D\u9AD8\u65BC\u6216\u4F4E\u65BC\u5E73\u5747\u503C\u7684\u6578\u503C\u8A2D\u5B9A\u683C\u5F0F",ruleTypeItem4_title:"\u70BA\u6EFF\u8DB3\u4EE5\u4E0B\u689D\u4EF6\u7684\u503C",ruleTypeItem5:"\u50C5\u5C0D\u552F\u4E00\u503C\u6216\u91CD\u8907\u503C\u8A2D\u5B9A\u683C\u5F0F",ruleTypeItem6:"\u4F7F\u7528\u516C\u5F0F\u78BA\u5B9A\u8981\u8A2D\u7F6E\u683C\u5F0F\u7684\u55AE\u5143\u683C",formula:"\u516C\u5F0F",textColor:"\u6587\u5B57\u984F\u8272",cellColor:"\u5132\u5B58\u683C\u984F\u8272",confirm:"\u78BA\u5B9A",confirmColor:"\u78BA\u5B9A\u984F\u8272",cancel:"\u53D6\u6D88",close:"\u95DC\u9589",clearColorSelect:"\u6E05\u9664\u984F\u8272\u9078\u64C7",sheet:"\u9336",currentSheet:"\u7576\u524D\u5DE5\u4F5C\u8868",dataBar:"\u6578\u64DA\u689D",dataBarColor:"\u6578\u64DA\u689D\u984F\u8272",gradientDataBar_1:"\u85CD-\u767D\u6F38\u8B8A\u6578\u64DA\u689D",gradientDataBar_2:"\u7DA0-\u767D\u6F38\u8B8A\u6578\u64DA\u689D",gradientDataBar_3:"\u7D05-\u767D\u6F38\u8B8A\u6578\u64DA\u689D",gradientDataBar_4:"\u67F3\u4E01-\u767D\u6F38\u8B8A\u6578\u64DA\u689D",gradientDataBar_5:"\u6DFA\u85CD-\u767D\u6F38\u8B8A\u6578\u64DA\u689D",gradientDataBar_6:"\u7D2B-\u767D\u6F38\u8B8A\u6578\u64DA\u689D",solidColorDataBar_1:"\u85CD\u8272\u6578\u64DA\u689D",solidColorDataBar_2:"\u7DA0\u8272\u6578\u64DA\u689D",solidColorDataBar_3:"\u7D05\u8272\u6578\u64DA\u689D",solidColorDataBar_4:"\u6A59\u8272\u6578\u64DA\u689D",solidColorDataBar_5:"\u6DFA\u85CD\u8272\u6578\u64DA\u689D",solidColorDataBar_6:"\u7D2B\u8272\u6578\u64DA\u689D",colorGradation:"\u8272\u968E",colorGradation_1:"\u7DA0-\u9EC3-\u7D05\u8272\u968E",colorGradation_2:"\u7D05-\u9EC3-\u7DA0\u8272\u968E",colorGradation_3:"\u7DA0-\u767D-\u7D05\u8272\u968E",colorGradation_4:"\u7D05-\u767D-\u7DA0\u8272\u968E",colorGradation_5:"\u85CD-\u767D-\u7D05\u8272\u968E",colorGradation_6:"\u7D05-\u767D-\u85CD\u8272\u968E",colorGradation_7:"\u767D-\u7D05\u8272\u968E",colorGradation_8:"\u7D05-\u767D\u8272\u968E",colorGradation_9:"\u7DA0-\u767D\u8272\u968E",colorGradation_10:"\u767D-\u7DA0\u8272\u968E",colorGradation_11:"\u7DA0-\u9EC3\u8272\u968E",colorGradation_12:"\u9EC3-\u7DA0\u8272\u968E",icons:"\u5716\u6A19\u96C6",pleaseSelectIcon:"\u8ACB\u9EDE\u64CA\u9078\u64C7\u4E00\u7D44\u5716\u6A19:",cellValue:"\u5132\u5B58\u683C\u503C",specificText:"\u7279\u5B9A\u6587\u5B57",occurrence:"\u767C\u751F\u65E5\u671F",greaterThan:"\u5927\u65BC",lessThan:"\u5C0F\u65BC",between:"\u4ECB\u65BC",equal:"\u7B49\u65BC",in:"\u548C",to:"\u5230",between2:"\u4E4B\u9593",contain:"\u5305\u542B",textContains:"\u6587\u5B57\u5305\u542B",duplicateValue:"\u91CD\u8907\u503C",uniqueValue:"\u552F\u4E00\u503C",top:"\u524D",top10:"\u524D10\u9805",top10_percent:"\u524D10%",last:"\u5F8C",last10:"\u5F8C10\u9805",last10_percent:"\u5F8C10%",oneself:"\u500B",above:"\u9AD8\u65BC",aboveAverage:"\u9AD8\u65BC\u5E73\u5747\u503C",below:"\u4F4E\u65BC",belowAverage:"\u4F4E\u65BC\u5E73\u5747\u503C",all:"\u5168\u90E8",yesterday:"\u6628\u5929",today:"\u4ECA\u5929",tomorrow:"\u660E\u5929",lastWeek:"\u4E0A\u5468",thisWeek:"\u672C\u5468",lastMonth:"\u4E0A\u6708",thisMonth:"\u672C\u6708",lastYear:"\u53BB\u5E74",thisYear:"\u672C\u5E74",last7days:"\u6700\u8FD17\u5929",last30days:"\u6700\u8FD130\u5929",next7days:"\u672A\u4F867\u5929",next30days:"\u672A\u4F8630\u5929",next60days:"\u672A\u4F8660\u5929",chooseRuleType:"\u9078\u64C7\u898F\u5247\u985E\u578B",editRuleDescription:"\u7DE8\u8F2F\u898F\u5247\u8AAA\u660E",newFormatRule:"\u65B0\u5EFA\u683C\u5F0F\u898F\u5247",editFormatRule:"\u7DE8\u8F2F\u683C\u5F0F\u898F\u5247",formatStyle:"\u683C\u5F0F\u6A23\u5F0F",fillType:"\u586B\u5145\u985E\u578B",color:"\u984F\u8272",twocolor:"\u96D9\u8272",tricolor:"\u4E09\u8272",multicolor:"\u5F69\u8272",grayColor:"\u7070\u8272",gradient:"\u6F38\u8B8A",solid:"\u5BE6\u5FC3",maxValue:"\u6700\u5927\u503C",medianValue:"\u4E2D\u9593\u503C",minValue:"\u6700\u5C0F\u503C",direction:"\u65B9\u5411",threeWayArrow:"\u4E09\u5411\u7BAD\u982D",fourWayArrow:"\u56DB\u5411\u7BAD\u982D",fiveWayArrow:"\u4E94\u5411\u7BAD\u982D",threeTriangles:"3\u500B\u4E09\u89D2\u5F62",shape:"\u5F62\u72C0",threeColorTrafficLight:"\u4E09\u8272\u4EA4\u901A\u71C8",fourColorTrafficLight:"\u56DB\u8272\u4EA4\u901A\u71C8",threeSigns:"\u4E09\u6A19\u8A8C",greenRedBlackGradient:"\u7DA0-\u7D05-\u9ED1\u6F38\u8B8A",rimless:"\u7121\u908A\u6846",bordered:"\u6709\u908A\u6846",mark:"\u6A19\u8A18",threeSymbols:"\u4E09\u500B\u7B26\u865F",tricolorFlag:"\u4E09\u8272\u65D7",circled:"\u6709\u5713\u5708",noCircle:"\u7121\u5713\u5708",grade:"\u7B49\u7D1A",grade4:"\u56DB\u7B49\u7D1A",grade5:"\u4E94\u7B49\u7D1A",threeStars:"3\u500B\u661F\u5F62",fiveQuadrantDiagram:"\u4E94\u8C61\u9650\u5716",fiveBoxes:"5\u500B\u6846"},insertLink:{linkText:"\u6587\u5B57",linkType:"\u9023\u7D50\u985E\u578B",external:"\u5916\u90E8\u9023\u7D50",internal:"\u5185\u90E8\u9023\u7D50",linkAddress:"\u9023\u7D50\u5730\u5740",linkSheet:"\u5DE5\u4F5C\u8868",linkCell:"\u5132\u5B58\u683C\u5F15\u7528",linkTooltip:"\u63D0\u793A",placeholder1:"\u8ACB\u8F38\u5165\u7DB2\u9801\u9023\u7D50\u4F4D\u5740",placeholder2:"\u8ACB\u8F38\u5165\u8981\u5F15\u7528\u7684\u5132\u5B58\u683C,\u4F8BA1",placeholder3:"\u8ACB\u8F38\u5165\u63D0\u793A\u5167\u5BB9",tooltipInfo1:"\u8ACB\u8F38\u5165\u6709\u6548\u7684\u9023\u7D50",tooltipInfo2:"\u8ACB\u8F38\u5165\u6B63\u78BA\u7684\u5132\u5B58\u683C\u5F15\u7528"},dataVerification:{cellRange:"\u5132\u5B58\u683C\u7BC4\u570D",selectCellRange:"\u9EDE\u64CA\u9078\u64C7\u5132\u5B58\u683C\u7BC4\u570D",selectCellRange2:"\u8ACB\u9078\u64C7\u5132\u5B58\u683C\u7BC4\u570D",verificationCondition:"\u9A57\u8B49\u689D\u4EF6",allowMultiSelect:"\u662F\u5426\u5141\u8A31\u591A\u9078",dropdown:"\u4E0B\u62C9\u6E05\u55AE",checkbox:"\u6838\u53D6\u65B9\u584A",number:"\u6578\u4F4D",number_integer:"\u6578\u4F4D-\u6574\u6578",number_decimal:"\u6578\u4F4D-\u5C0F\u6578",text_content:"\u6587\u5B57-\u5167\u5BB9",text_length:"\u6587\u5B57-\u9577\u5EA6",date:"\u65E5\u671F",validity:"\u6709\u6548\u6027",placeholder1:"\u8ACB\u8F38\u5165\u9078\u9805,\u4EE5\u82F1\u6587\u9017\u865F\u5206\u9694,\u59821,2,3,4,5",placeholder2:"\u8ACB\u8F38\u5165\u5167\u5BB9",placeholder3:"\u6578\u503C,\u598210",placeholder4:"\u8ACB\u8F38\u5165\u6307\u5B9A\u7684\u6587\u5B57",placeholder5:"\u8ACB\u8F38\u5165\u9078\u4E2D\u5132\u5B58\u683C\u6642\u986F\u793A\u7684\u63D0\u793A\u8A9E",selected:"\u9078\u64C7\u6642",notSelected:"\u672A\u9078\u64C7",between:"\u4ECB\u65BC",notBetween:"\u4E0D\u4ECB\u65BC",equal:"\u7B49\u65BC",notEqualTo:"\u4E0D\u7B49\u65BC",moreThanThe:"\u5927\u65BC",lessThan:"\u5C0F\u65BC",greaterOrEqualTo:"\u5927\u65BC\u7B49\u65BC",lessThanOrEqualTo:"\u5C0F\u65BC\u7B49\u65BC",include:"\u5305\u62EC",exclude:"\u4E0D\u5305\u62EC",earlierThan:"\u65E9\u65BC",noEarlierThan:"\u4E0D\u65E9\u65BC",laterThan:"\u665A\u65BC",noLaterThan:"\u4E0D\u665A\u65BC",identificationNumber:"\u8EAB\u4EFD\u8B49\u865F\u78BC",phoneNumber:"\u624B\u6A5F\u865F",remote:"\u81EA\u52D5\u9060\u7A0B\u7372\u53D6\u9078\u9805",prohibitInput:"\u8F38\u5165\u6578\u64DA\u7121\u6548\u6642\u7981\u6B62\u8F38\u5165",hintShow:"\u9078\u4E2D\u5132\u5B58\u683C\u6642\u986F\u793A\u63D0\u793A\u8A9E",deleteVerification:"\u5220\u9664\u9A57\u8B49",tooltipInfo1:"\u4E0B\u62C9\u6E05\u55AE\u9078\u9805\u4E0D\u53EF\u70BA\u7A7A",tooltipInfo2:"\u6838\u53D6\u65B9\u584A\u5167\u5BB9\u4E0D\u53EF\u70BA\u7A7A",tooltipInfo3:"\u8F38\u5165\u7684\u503C\u4E0D\u662F\u6578\u503C\u985E\u578B",tooltipInfo4:"\u6578\u503C2\u4E0D\u80FD\u5C0F\u65BC\u6578\u503C1",tooltipInfo5:"\u6587\u5B57\u5167\u5BB9\u4E0D\u80FD\u70BA\u7A7A",tooltipInfo6:"\u8F38\u5165\u7684\u503C\u4E0D\u662F\u65E5\u671F\u985E\u578B",tooltipInfo7:"\u65E5\u671F2\u4E0D\u80FD\u5C0F\u65BC\u65E5\u671F1",textlengthInteger:"\u6587\u5B57\u9577\u5EA6\u5FC5\u9808\u662F\u5927\u65BC\u7B49\u65BC0\u7684\u6574\u6578"},formula:{sum:"\u6C42\u548C",average:"\u5E73\u5747\u503C",count:"\u8A08\u6578",max:"\u6700\u5927\u503C",min:"\u6700\u5C0F\u503C",ifGenerate:"if\u516C\u5F0F\u751F\u6210\u5668",find:"\u66F4\u591A\u51FD\u6578",tipNotBelongToIf:"\u8A72\u5132\u5B58\u683C\u51FD\u6578\u4E0D\u5C6C\u65BCif\u516C\u5F0F!",tipSelectCell:"\u8ACB\u9078\u64C7\u5132\u5B58\u683C\u63D2\u5165\u51FD\u6578",ifGenCompareValueTitle:"\u6BD4\u8F83\u503C",ifGenSelectCellTitle:"\u9EDE\u64CA\u9078\u64C7\u5132\u5B58\u683C",ifGenRangeTitle:"\u7BC4\u570D",ifGenRangeTo:"\u81F3",ifGenRangeEvaluate:"\u7BC4\u570D\u8A55\u4F30",ifGenSelectRangeTitle:"\u9EDE\u64CA\u9078\u64C7\u7BC4\u570D",ifGenCutWay:"\u5283\u5206\u7BA1\u9053",ifGenCutSame:"\u5283\u5206\u503C\u76F8\u540C",ifGenCutNpiece:"\u5283\u5206\u4E3AN\u4EFD",ifGenCutCustom:"\u81EA\u5B9A\u7FA9\u8F38\u5165",ifGenCutConfirm:"\u751F\u6210",ifGenTipSelectCell:"\u9078\u64C7\u5132\u5B58\u683C",ifGenTipSelectCellPlace:"\u8ACB\u9078\u64C7\u5132\u5B58\u683C",ifGenTipSelectRange:"\u9078\u64C7\u55AE\u7BC4\u570D",ifGenTipSelectRangePlace:"\u8ACB\u9078\u64C7\u7BC4\u570D",ifGenTipNotNullValue:"\u6BD4\u8F03\u503C\u4E0D\u80FD\u70BA\u7A7A!",ifGenTipLableTitile:"\u6A19\u7C64",ifGenTipRangeNotforNull:"\u7BC4\u570D\u4E0D\u80FD\u70BA\u7A7A!",ifGenTipCutValueNotforNull:"\u5283\u5206\u503C\u4E0D\u80FD\u70BA\u7A7A\uFF01",ifGenTipNotGenCondition:"\u6C92\u6709\u751F\u6210\u53EF\u7528\u7684\u689D\u4EF6\uFF01"},formulaMore:{valueTitle:"\u503C",tipSelectDataRange:"\u9078\u53D6\u6578\u64DA\u7BC4\u570D",tipDataRangeTile:"\u6578\u64DA\u7BC4\u570D",findFunctionTitle:"\u67E5\u627E\u51FD\u6578",tipInputFunctionName:"\u8ACB\u8F38\u5165\u60A8\u8981\u67E5\u627E\u7684\u51FD\u6578\u540D\u7A31\u6216\u51FD\u6578\u529F\u80FD\u7684\u7C21\u8981\u63CF\u8FF0",Array:"\u6578\u7D44",Database:"\u8CC7\u6599\u4F86\u6E90",Date:"\u65E5\u671F",Engineering:"\u5DE5\u7A0B\u8A08\u7B97",Filter:"\u7BE9\u6AA2\u7A0B\u5F0F",Financial:"\u8CA1\u52D9",luckysheet:"Luckysheet\u5167\u5BD8",other:"\u5176\u5B83",Logical:"\u908F\u8F2F",Lookup:"\u67E5\u627E",Math:"\u6578\u5B78",Operator:"\u904B\u7B97\u5B50",Parser:"\u8F49\u63DB\u5DE5\u5177",Statistical:"\u7D71\u8A08",Text:"\u6587\u5B57",dataMining:"\u8CC7\u6599\u6316\u6398",selectFunctionTitle:"\u9078\u64C7\u51FD\u6578",calculationResult:"\u8A08\u7B97\u7D50\u679C",tipSuccessText:"\u6210\u529F",tipParamErrorText:"\u53C3\u6578\u985E\u578B\u932F\u8AA4",helpClose:"\u95DC\u9589",helpCollapse:"\u6536\u8D77",helpExample:"\u793A\u4F8B",helpAbstract:"\u6458\u8981",execfunctionError:'\u63D0\u793A", "\u516C\u5F0F\u5B58\u5728\u932F\u8AA4',execfunctionSelfError:"\u516C\u5F0F\u4E0D\u53EF\u5F15\u7528\u5176\u672C\u8EAB\u7684\u5132\u5B58\u683C",execfunctionSelfErrorResult:"\u516C\u5F0F\u4E0D\u53EF\u5F15\u7528\u5176\u672C\u8EAB\u7684\u5132\u5B58\u683C,\u6703\u5C0E\u81F4\u8A08\u7B97\u7D50\u679C\u4E0D\u6E96\u78BA",allowRepeatText:"\u53EF\u91CD\u8907",allowOptionText:"\u53EF\u9078",selectCategory:"\u6216\u9078\u64C7\u985E\u5225"},drag:{noMerge:"\u7121\u6CD5\u5C0D\u5408\u4F75\u5132\u5B58\u683C\u57F7\u884C\u6B64\u64CD\u4F5C",affectPivot:"\u7121\u6CD5\u5C0D\u6240\u9078\u5132\u5B58\u683C\u9032\u884C\u6B64\u66F4\u6539,\u56E0\u70BA\u5B83\u6703\u5F71\u97FF\u6578\u64DA\u900F\u8996\u9336\uFF01",noMulti:"\u7121\u6CD5\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C,\u8ACB\u9078\u64C7\u55AE\u500B\u5340\u57DF",noPaste:"\u7121\u6CD5\u5728\u6B64\u8655\u7C98\u8CBC\u6B64\u5167\u5BB9,\u8ACB\u9078\u64C7\u7C98\u8CBC\u5340\u57DF\u7684\u4E00\u500B\u5132\u5B58\u683C,\u7136\u5F8C\u518D\u6B21\u5617\u8A66\u7C98\u8CBC",noPartMerge:"\u7121\u6CD5\u5C0D\u90E8\u5206\u5408\u4F75\u5132\u5B58\u683C\u57F7\u884C\u6B64\u64CD\u4F5C",inputCorrect:"\u8ACB\u8F38\u5165\u6B63\u78BA\u7684\u6578\u503C",notLessOne:"\u884C\u5217\u6578\u4E0D\u80FD\u5C0F\u65BC1",offsetColumnLessZero:"\u504F\u79FB\u5217\u4E0D\u80FD\u70BA\u8CA0\u6578\uFF01",pasteMustKeybordAlert:"Copy and paste in the Sheet: Ctrl + C to copy, Ctrl + V to paste, Ctrl + X to cut",pasteMustKeybordAlertHTMLTitle:"Copy and paste in the Sheet",pasteMustKeybordAlertHTML:"<span style='line-height: 1.0;font-size:36px;font-weight: bold;color:#666;'>Ctrl + C</span> to copy<br/><span style='line-height: 1.0;font-size:36px;font-weight: bold;color:#666;'>Ctrl + V</span> to paste<br/><span style='line-height: 1.0;font-size:36px;font-weight: bold;color:#666;'>Ctrl + X</span> to cut"},paste:{warning:"\u63D0\u793A",errorNotAllowMulti:"\u4E0D\u80FD\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C,\u8ACB\u9078\u64C7\u55AE\u500B\u5340\u57DF,\u7136\u5F8C\u518D\u8A66",errorNotAllowMerged:"\u4E0D\u80FD\u5BF9\u5408\u5E76\u5355\u5143\u683C\u505A\u90E8\u5206\u66F4\u6539"},pivotTable:{title:"\u6578\u64DA\u900F\u8996\u9336",closePannel:"\u95DC\u9589",editRange:"\u7DE8\u8F2F\u7BC4\u570D",tipPivotFieldSelected:"\u9078\u64C7\u9700\u8981\u6DFB\u52A0\u5230\u6578\u64DA\u900F\u8996\u9336\u7684\u6B04\u4F4D",tipClearSelectedField:"\u6E05\u9664\u6240\u6709\u5DF2\u9078\u6B04\u4F4D",btnClearSelectedField:"\u6E05\u9664",btnFilter:"\u7BE9\u9078",titleRow:"\u884C",titleColumn:"\u5217",titleValue:"\u6578\u503C",tipShowColumn:"\u7D71\u8A08\u6B04\u4F4D\u986F\u793A\u70BA\u5217",tipShowRow:"\u7D71\u8A08\u6B04\u4F4D\u986F\u793A\u70BA\u884C",titleSelectionDataRange:"\u9078\u53D6\u6578\u64DA\u7BC4\u570D",titleDataRange:"\u6578\u64DA\u7BC4\u570D",valueSum:"\u7E3D\u8A08",valueStatisticsSUM:"\u6C42\u548C",valueStatisticsCOUNT:"\u6578\u503C\u8A08\u6578",valueStatisticsCOUNTA:"\u8A08\u6578",valueStatisticsCOUNTUNIQUE:"\u53BB\u91CD\u8A08\u6578",valueStatisticsAVERAGE:"\u5E73\u5747\u503C",valueStatisticsMAX:"\u6700\u5927\u503C",valueStatisticsMIN:"\u6700\u5C0F\u503C",valueStatisticsMEDIAN:"\u4E2D\u4F4D\u6578",valueStatisticsPRODUCT:"\u4E58\u7A4D",valueStatisticsSTDEV:"\u6A19\u6E96\u5DEE",valueStatisticsSTDEVP:"\u6574\u9AD4\u6A19\u6E96\u5DEE",valueStatisticslet:"\u65B9\u5DEE",valueStatisticsVARP:"\u6574\u9AD4\u65B9\u5DEE",errorNotAllowEdit:"\u975E\u7DE8\u8F2F\u6A21\u5F0F\u4E0B\u7981\u6B62\u8A72\u64CD\u4F5C!",errorNotAllowMulti:"\u4E0D\u80FD\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C,\u8ACB\u9078\u64C7\u55AE\u500B\u5340\u57DF,\u7136\u5F8C\u518D\u8A66",errorSelectRange:"\u8ACB\u9078\u64C7\u65B0\u5EFA\u900F\u8996\u9336\u7684\u5340\u57DF",errorIsDamage:"\u6B64\u6578\u64DA\u900F\u8996\u9336\u7684\u6E90\u6578\u64DA\u5DF2\u640D\u58DE\uFF01",errorNotAllowPivotData:"\u4E0D\u53EF\u9078\u64C7\u6578\u64DA\u900F\u8996\u9336\u70BA\u6E90\u6578\u64DA!",errorSelectionRange:"\u9078\u64C7\u5931\u6557,\u8F38\u5165\u7BC4\u570D\u932F\u8AA4\uFF01",errorIncreaseRange:"\u8ACB\u64F4\u5927\u9078\u64C7\u7684\u6578\u64DA\u7BC4\u570D!",titleAddColumn:"\u6DFB\u52A0\u5217\u5230\u6578\u64DA\u900F\u8996\u9336",titleMoveColumn:"\u79FB\u52D5\u8A72\u5217\u5230\u4E0B\u65B9\u767D\u6846",titleClearColumnFilter:"\u6E05\u9664\u8A72\u5217\u7684\u7BE9\u9078\u689D\u4EF6",titleFilterColumn:"\u7BE9\u9078\u8A72\u5217",titleSort:"\u6392\u5E8F",titleNoSort:"\u7121\u6392\u5E8F",titleSortAsc:"\u6607\u51AA",titleSortDesc:"\u964D\u5E8F",titleSortBy:"\u6392\u5E8F\u4F9D\u64DA",titleShowSum:"\u986F\u793A\u7E3D\u8A08",titleStasticTrue:"\u662F",titleStasticFalse:"\u5426"},dropCell:{copyCell:"\u8907\u88FD\u5132\u5B58\u683C",sequence:"\u586B\u5145\u5E8F\u5217",onlyFormat:"\u50C5\u586B\u5145\u683C\u5F0F",noFormat:"\u4E0D\u5E36\u683C\u5F0F\u586B\u5145",day:"\u4EE5\u5929\u6578\u586B\u5145",workDay:"\u4EE5\u5DE5\u4F5C\u65E5\u586B\u5145",month:"\u4EE5\u6708\u586B\u5145",year:"\u4EE5\u5E74\u586B\u5145",chineseNumber:"\u4EE5\u4E2D\u6587\u5C0F\u5BEB\u6578\u4F4D\u586B\u5145"},imageCtrl:{borderTile:"\u5716\u7247\u908A\u6846\u984F\u8272\u9078\u64C7",borderCur:"\u7576\u524D\u984F\u8272"},protection:{protectiontTitle:"\u4FDD\u8B77\u5DE5\u4F5C\u8868",enterPassword:"\u8ACB\u8F38\u5165\u5BC6\u78BC\uFF08\u53EF\u7559\u7A7A\uFF09",enterHint:"\u60A8\u8A66\u5716\u66F4\u6539\u7684\u5132\u5B58\u683C\u6216\u5716\u8868\u4F4D\u65BC\u53D7\u4FDD\u8B77\u7684\u5DE5\u4F5C\u8868\u4E2D\u3002\u82E5\u8981\u66F4\u6539,\u8ACB\u53D6\u6D88\u5DE5\u4F5C\u8868\u4FDD\u8B77\u3002\u60A8\u53EF\u80FD\u9700\u8981\u8F38\u5165\u5BC6\u78BC",swichProtectionTip:"\u4FDD\u8B77\u5DE5\u4F5C\u8868\u53CA\u9396\u5B9A\u7684\u5132\u5B58\u683C\u5167\u5BB9",authorityTitle:"\u5141\u8A31\u6B64\u5DE5\u4F5C\u8868\u7684\u7528\u6236\u9032\u884C:",selectLockedCells:"\u5B9A\u9396\u5B9A\u5132\u5B58\u683C",selectunLockedCells:"\u9078\u5B9A\u89E3\u9664\u9396\u5B9A\u7684\u5132\u5B58\u683C",formatCells:"\u8A2D\u5B9A\u5132\u5B58\u683C\u683C\u5F0F",formatColumns:"\u8A2D\u5B9A\u5217\u683C\u5F0F",formatRows:"\u8A2D\u5B9A\u884C\u683C\u5F0F",insertColumns:"\u63D2\u5165\u5217",insertRows:"\u63D2\u5165\u884C",insertHyperlinks:"\u63D2\u5165\u8D85\u9023\u7D50",deleteColumns:"\u5220\u9664\u5217",deleteRows:"\u5220\u9664\u884C",sort:"\u6392\u5E8F",filter:"\u4F7F\u7528\u81EA\u52D5\u7BE9\u9078",usePivotTablereports:"\u4F7F\u7528\u6578\u64DA\u900F\u8996\u9336\u548C\u5831\u8868",editObjects:"\u7DE8\u8F2F\u5C0D\u8C61",editScenarios:"\u7DE8\u8F2F\u65B9\u6848",allowRangeTitle:"\u5141\u8A31\u7528\u6236\u7DE8\u8F2F\u5340\u57DF",allowRangeAdd:"\u65B0\u5EFA...",allowRangeAddTitle:"\u6A19\u984C",allowRangeAddSqrf:"\u5F15\u7528\u5132\u5B58\u683C",selectCellRange:"\u9EDE\u64CA\u9078\u64C7\u5132\u5B58\u683C\u7BC4\u570D",selectCellRangeHolder:"\u8ACB\u8F38\u5165\u5132\u5B58\u683C\u7BC4\u570D",allowRangeAddTitlePassword:"\u5BC6\u78BC",allowRangeAddTitleHint:"\u63D0\u793A",allowRangeAddTitleHintTitle:"\u8A2D\u7F6E\u5BC6\u78BC\u5F8C,\u63D0\u793A\u7528\u6236\u8F38\u5165\u5BC6\u78BC\uFF08\u53EF\u7559\u7A7A\uFF09",allowRangeAddtitleDefault:"\u8ACB\u8F38\u5165\u5340\u57DF\u540D\u7A31",rangeItemDblclick:"\u6309\u5169\u4E0B\u9032\u884C\u7DE8\u8F2F",rangeItemHasPassword:"\u5DF2\u8A2D\u7F6E\u5BC6\u78BC",rangeItemErrorTitleNull:"\u6A19\u984C\u4E0D\u80FD\u70BA\u7A7A",rangeItemErrorRangeNull:"\u5132\u5B58\u683C\u7BC4\u570D\u4E0D\u80FD\u70BA\u7A7A",rangeItemErrorRange:"\u5132\u5B58\u683C\u7BC4\u570D\u683C\u5F0F\u932F\u8AA4",validationTitle:"\u9A57\u8B49\u63D0\u793A",validationTips:"\u9700\u8981\u8F38\u5165\u5BC6\u78BC\u4F86\u64A4\u92B7\u5DE5\u4F5C\u8868\u7684\u4FDD\u8B77",validationInputHint:"\u8ACB\u8F38\u5165\u5BC6\u78BC",checkPasswordNullalert:"\u5BC6\u78BC\u4E0D\u80FD\u70BA\u7A7A!",checkPasswordWrongalert:"\u5BC6\u78BC\u932F\u8AA4,\u8ACB\u91CD\u8A66\uFF01",checkPasswordSucceedalert:"\u89E3\u9396\u6210\u529F,\u53EF\u4EE5\u7DE8\u8F2F\u8A72\u5340\u57DF!",defaultRangeHintText:"\u8A72\u5132\u5B58\u683C\u6B63\u5728\u53D7\u5BC6\u78BC\u4FDD\u8B77",defaultSheetHintText:"\u8A72\u5132\u5B58\u683C\u6216\u5716\u8868\u4F4D\u65BC\u53D7\u4FDD\u8B77\u7684\u5DE5\u4F5C\u8868\u4E2D,\u82E5\u8981\u9032\u884C\u66F4\u6539,\u8ACB\u53D6\u6D88\u5DE5\u4F5C\u8868\u4FDD\u8B77,\u60A8\u53EF\u80FD\u9700\u8981\u8F38\u5165\u5BC6\u78BC\u3002"},cellFormat:{cellFormatTitle:"\u8A2D\u5B9A\u5132\u5B58\u683C\u683C\u5F0F",protection:"\u4FDD\u8B77",locked:"\u9396\u5B9A\u5132\u5B58\u683C",hidden:"\u96B1\u85CF\u516C\u5F0F",protectionTips:"\u53EA\u6709\u4FDD\u8B77\u5DE5\u4F5C\u8868\u529F\u80FD\uFF08\u5728\u529F\u80FD\u8868\u5217\u9EDE\u64CA\u4FDD\u8B77\u5DE5\u4F5C\u8868\u6309\u9215\u9032\u884C\u8A2D\u5B9A\uFF09\u958B\u555F\u5F8C,\u9396\u5B9A\u5132\u5B58\u683C\u6216\u96B1\u85CF\u516C\u5F0F\u624D\u80FD\u751F\u6548",tipsPart:"\u90E8\u5206\u9078\u4E2D",tipsAll:"\u5168\u90E8\u9078\u4E2D",selectionIsNullAlert:"\u8ACB\u9078\u64C7\u4E00\u500B\u7BC4\u570D\uFF01",sheetDataIsNullAlert:"\u6578\u64DA\u70BA\u7A7A\u7121\u6CD5\u8A2D\u5B9A\uFF01"},print:{normalBtn:"\u5E38\u898F\u8996\u5716",layoutBtn:"\u9801\u9762\u4F48\u5C40",pageBtn:"\u5206\u9801\u9810\u89BD",menuItemPrint:"\u5217\u5370(Ctrl+P)",menuItemAreas:"\u5217\u5370\u5340\u57DF",menuItemRows:"\u5217\u5370\u6A19\u984C\u884C",menuItemColumns:"\u5217\u5370\u6A19\u984C\u5217"},edit:{typing:"\u6B63\u5728\u8F38\u5165"},websocket:{success:"WebSocket\u9023\u63A5\u6210\u529F",refresh:"WebSocket\u9023\u63A5\u767C\u751F\u932F\u8AA4,\u8ACB\u5237\u65B0\u9801\u9762\uFF01",wait:"WebSocket\u9023\u63A5\u767C\u751F\u932F\u8AA4,\u8ACB\u8010\u5FC3\u7B49\u5F85\uFF01",close:"WebSocket\u9023\u63A5\u95DC\u9589",contact:"\u670D\u52D9\u5668\u901A\u4FE1\u767C\u751F\u932F\u8AA4,\u8ACB\u5237\u65B0\u9801\u9762\u5F8C\u518D\u8A66,\u5982\u82E5\u4E0D\u884C\u8ACB\u806F\u7CFB\u7BA1\u7406\u54E1\uFF01",support:"\u7576\u524D\u700F\u89BD\u5668\u4E0D\u652F\u6301WebSocket"}}});function Rp(){return ts[h.lang]}var ts,Q,bt=Ie(()=>{hu();fu();pu();yu();Xe();ts={en:uu,zh:du,es:mu,zh_tw:gu};Q=Rp});function vu(){let e=Q().toolbar,n=Q().fontarray,t=Q().defaultFmt,l={undo:`<div class="luckysheet-toolbar-button luckysheet-inline-block disabled" data-tips="${e.undo}" |
| | | field\u53EF\u4EE5\u662F\u8207database\u7B2C\u4E00\u884C\u4E2D\u67D0\u500B\u5217\u6A19\u984C\u5C0D\u61C9\u7684\u6587\u5B57\u6A19\u7C64,\u4E5F\u53EF\u4EE5\u662F\u6307\u5B9A\u76F8\u95DC\u5217\u7684\u6578\u4F4D\u7D22\u5F15,\u7B2C\u4E00\u5217\u7684\u7D22\u5F15\u503C\u70BA1\u3002`},{name:"criteria",detail:"\u5305\u542B\u6240\u6307\u5B9A\u689D\u4EF6\u7684\u5132\u5B58\u683C\u5340\u57DF\u3002\u8A08\u7B97\u4E4B\u524D\u5C07\u4F7F\u7528\u9019\u4E9B\u689D\u4EF6\u4F86\u904E\u6FFEdatabase\u4E2D\u7684\u503C\u3002"}]},AGE_BY_IDCARD:{d:"\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u5E74\u9F61\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u5E74\u9F61",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"},{name:"\u622A\u6B62\u65E5\u671F",detail:"\u5E74\u9F61\u8A08\u7B97\u7684\u622A\u6B62\u65E5\u671F\u6216\u7BC4\u570D,\u9ED8\u8A8D\u70BA\u7576\u65E5\u3002"}]},SEX_BY_IDCARD:{d:"\u6839\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u6027\u5225\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u6839\u64DA\u8EAB\u4EFD\u8B49\u865F\u5F97\u5230\u6027\u5225\u3002",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"}]},BIRTHDAY_BY_IDCARD:{d:"\u6839\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u751F\u65E5\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u6839\u64DA\u8EAB\u4EFD\u8B49\u865F\u5F97\u5230\u751F\u65E5\u3002",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"},{name:"\u751F\u65E5\u683C\u5F0F",detail:"\u65E5\u671F\u985E\u578B,\u9ED8\u8A8D0:[1900/01/01],1:[1900-01-01],2:[1900\u5E741\u67081\u65E5]"}]},PROVINCE_BY_IDCARD:{d:"\u6839\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u7C4D\u8CAB\u7684\u7701\u4EFD\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u6839\u64DA\u8EAB\u4EFD\u8B49\u865F\u5F97\u5230\u7C4D\u8CAB\u7684\u7701\u4EFD\u3002",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"}]},CITY_BY_IDCARD:{d:"\u6839\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u7C4D\u8CAB\u7684\u90FD\u5E02\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u6839\u64DA\u8EAB\u4EFD\u8B49\u865F\u5F97\u5230\u7C4D\u8CAB\u7684\u90FD\u5E02\u3002",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"}]},STAR_BY_IDCARD:{d:"\u6839\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u661F\u5EA7\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u6839\u64DA\u8EAB\u4EFD\u8B49\u865F\u5F97\u5230\u661F\u5EA7\u3002",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"}]},ANIMAL_BY_IDCARD:{d:"\u6839\u64DA\u4E2D\u570B\u8EAB\u4EFD\u8B49\u865F\u8A08\u7B97\u51FA\u751F\u8096\uFF08\u9F20\u3001\u725B\u3001\u864E\u3001\u5154\u2026\uFF09\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u6839\u64DA\u8EAB\u4EFD\u8B49\u865F\u5F97\u5230\u751F\u8096\u3002",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"}]},ISIDCARD:{d:"\u9A57\u8B49\u8EAB\u4EFD\u8B49\u7684\u683C\u5F0F\u662F\u5426\u6B63\u78BA\u3002\u652F\u630115\u4F4D\u621618\u4F4D\u8EAB\u4EFD\u8B49",a:"\u9A57\u8B49\u8EAB\u4EFD\u8B49\u683C\u5F0F\u6B63\u78BA\u6027\u3002",p:[{name:"\u8EAB\u4EFD\u8B49\u865F",detail:"15\u4F4D\u6216\u800518\u4F4D\u7684\u8EAB\u4EFD\u8B49\u865F\u6216\u7BC4\u570D\u3002"}]},DM_TEXT_CUTWORD:{d:"\u6587\u5B57\u5206\u8A5E\u3002\u628A\u4E00\u9023\u4E32\u6587\u5B57\u6298\u958B\u70BA\u4E00\u7CFB\u5217\u55AE\u7368\u8A5E\u8A9E",a:"\u4E2D\u6587\u6587\u5B57\u5206\u8A5E\u3002",p:[{name:"\u6587\u5B57",detail:"\u4EFB\u610F\u9700\u8981\u5206\u8A5E\u7684\u6587\u5B57\u3002"},{name:"\u5206\u8A5E\u6A21\u5F0F",detail:"\u9ED8\u8A8D\u70BA0[\u7CBE\u78BA\u6A21\u5F0F]\uFF0C1[\u5168\u6A21\u5F0F]\uFF0C2[\u641C\u5C0B\u5F15\u64CE\u6A21\u5F0F]\u3002"}]},DM_TEXT_TFIDF:{d:"\u63A1\u7528tf-idf\u7B97\u704B\u9032\u884C\u95DC\u9375\u5B57\u9078\u53D6\u3002\u5F9E\u4E00\u9023\u4E32\u6587\u5B57\u4E2D\u8B58\u5225\u95DC\u9375\u5B57",a:"tf-idf\u95DC\u9375\u5B57\u8B58\u5225\u3002",p:[{name:"\u6587\u5B57",detail:"\u4EFB\u610F\u9700\u8981\u5206\u8A5E\u7684\u6587\u5B57\u3002"},{name:"\u95DC\u9375\u5B57\u500B\u6578",detail:"\u7B97\u704B\u8FD4\u56DE\u7684\u95DC\u9375\u5B57\u500B\u6578\uFF0C\u9ED8\u8A8D20"},{name:"\u8A9E\u6599\u5EAB",detail:"\u9078\u64C7\u7279\u5B9A\u9818\u57DF\u7684\u8A9E\u6599\u5EAB\uFF0C\u9ED8\u8A8D0[\u901A\u7528]\uFF0C1[\u91D1\u878D]\uFF0C2[\u91AB\u7642]"}]},DM_TEXT_TEXTRANK:{d:"\u63A1\u7528TextRank\u7B97\u704B\u9032\u884C\u95DC\u9375\u5B57\u9078\u53D6\u3002\u5F9E\u4E00\u9023\u4E32\u6587\u5B57\u4E2D\u8B58\u5225\u95DC\u9375\u5B57",a:"TextRank\u95DC\u9375\u5B57\u8B58\u5225\u3002",p:[{name:"\u6587\u5B57",detail:"\u4EFB\u610F\u9700\u8981\u5206\u8A5E\u7684\u6587\u5B57\u3002"},{name:"\u95DC\u9375\u5B57\u500B\u6578",detail:"\u7B97\u704B\u8FD4\u56DE\u7684\u95DC\u9375\u5B57\u500B\u6578\uFF0C\u9ED8\u8A8D20"},{name:"\u8A9E\u6599\u5EAB",detail:"\u9078\u64C7\u7279\u5B9A\u9818\u57DF\u7684\u8A9E\u6599\u5EAB\uFF0C\u9ED8\u8A8D0[\u901A\u7528]\uFF0C1[\u91D1\u878D]\uFF0C2[\u91AB\u7642]"}]},DATA_CN_STOCK_CLOSE:{d:"\u6839\u64DA\u80A1\u7968\u4EE3\u78BC\u548C\u65E5\u671F\uFF0C\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6536\u76E4\u50F9\u3002",a:"\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6536\u76E4\u50F9\u3002",p:[{name:"\u80A1\u7968\u4EE3\u78BC",detail:"6\u4F4D\u80A1\u7968\u4EE3\u78BC\uFF0C\u5FC5\u586B\u9805\u3002"},{name:"\u65E5\u671F",detail:"\u80A1\u7968\u7684\u4EA4\u6613\u65E5\uFF0C\u9ED8\u8A8D\u70BA\u6700\u65B0\u4EA4\u6613\u65E5"},{name:"\u8907\u6B0A\u9664\u6B0A",detail:"\u9078\u64C7\u80A1\u7968\u7684\u9664\u6B0A\u8907\u6B0A\u985E\u578B\uFF0C\u9ED8\u8A8D0[\u524D\u8907\u6B0A]\uFF0C1[\u539F\u59CB\u50F9\u683C]\uFF0C2[\u5F8C\u8907\u6B0A]"}]},DATA_CN_STOCK_OPEN:{d:"\u6839\u64DA\u80A1\u7968\u4EE3\u78BC\u548C\u65E5\u671F\uFF0C\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u958B\u76E4\u50F9\u3002",a:"\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u958B\u76E4\u50F9\u3002",p:[{name:"\u80A1\u7968\u4EE3\u78BC",detail:"6\u4F4D\u80A1\u7968\u4EE3\u78BC\uFF0C\u5FC5\u586B\u9805\u3002"},{name:"\u65E5\u671F",detail:"\u80A1\u7968\u7684\u4EA4\u6613\u65E5\uFF0C\u9ED8\u8A8D\u70BA\u6700\u65B0\u4EA4\u6613\u65E5"},{name:"\u8907\u6B0A\u9664\u6B0A",detail:"\u9078\u64C7\u80A1\u7968\u7684\u9664\u6B0A\u8907\u6B0A\u985E\u578B\uFF0C\u9ED8\u8A8D0[\u524D\u8907\u6B0A]\uFF0C1[\u539F\u59CB\u50F9\u683C]\uFF0C2[\u5F8C\u8907\u6B0A]"}]},DATA_CN_STOCK_MAX:{d:"\u6839\u64DA\u80A1\u7968\u4EE3\u78BC\u548C\u65E5\u671F\uFF0C\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6700\u9AD8\u50F9\u3002",a:"\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6700\u9AD8\u50F9\u3002",p:[{name:"\u80A1\u7968\u4EE3\u78BC",detail:"6\u4F4D\u80A1\u7968\u4EE3\u78BC\uFF0C\u5FC5\u586B\u9805\u3002"},{name:"\u65E5\u671F",detail:"\u80A1\u7968\u7684\u4EA4\u6613\u65E5\uFF0C\u9ED8\u8A8D\u70BA\u6700\u65B0\u4EA4\u6613\u65E5"},{name:"\u8907\u6B0A\u9664\u6B0A",detail:"\u9078\u64C7\u80A1\u7968\u7684\u9664\u6B0A\u8907\u6B0A\u985E\u578B\uFF0C\u9ED8\u8A8D0[\u524D\u8907\u6B0A]\uFF0C1[\u539F\u59CB\u50F9\u683C]\uFF0C2[\u5F8C\u8907\u6B0A]"}]},DATA_CN_STOCK_MIN:{d:"\u6839\u64DA\u80A1\u7968\u4EE3\u78BC\u548C\u65E5\u671F\uFF0C\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6700\u4F4E\u50F9\u3002",a:"\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6700\u4F4E\u50F9\u3002",p:[{name:"\u80A1\u7968\u4EE3\u78BC",detail:"6\u4F4D\u80A1\u7968\u4EE3\u78BC\uFF0C\u5FC5\u586B\u9805\u3002"},{name:"\u65E5\u671F",detail:"\u80A1\u7968\u7684\u4EA4\u6613\u65E5,\u9ED8\u8BA4\u4E3A\u6700\u65B0\u4EA4\u6613\u65E5"},{name:"\u8907\u6B0A\u9664\u6B0A",detail:"\u9078\u64C7\u80A1\u7968\u7684\u9664\u6B0A\u8907\u6B0A\u985E\u578B\uFF0C\u9ED8\u8A8D0[\u524D\u8907\u6B0A]\uFF0C1[\u539F\u59CB\u50F9\u683C]\uFF0C2[\u5F8C\u8907\u6B0A]"}]},DATA_CN_STOCK_VOLUMN:{d:"\u6839\u64DA\u80A1\u7968\u4EE3\u78BC\u548C\u65E5\u671F\uFF0C\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6210\u4EA4\u91CF\u3002",a:"\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6210\u4EA4\u91CF\u3002",p:[{name:"\u80A1\u7968\u4EE3\u78BC",detail:"6\u4F4D\u80A1\u7968\u4EE3\u78BC\uFF0C\u5FC5\u586B\u9805\u3002"},{name:"\u65E5\u671F",detail:"\u80A1\u7968\u7684\u4EA4\u6613\u65E5\uFF0C\u9ED8\u8A8D\u70BA\u6700\u65B0\u4EA4\u6613\u65E5"},{name:"\u8907\u6B0A\u9664\u6B0A",detail:"\u9078\u64C7\u80A1\u7968\u7684\u9664\u6B0A\u8907\u6B0A\u985E\u578B\uFF0C\u9ED8\u8A8D0[\u524D\u8907\u6B0A]\uFF0C1[\u539F\u59CB\u50F9\u683C]\uFF0C2[\u5F8C\u8907\u6B0A]"}]},DATA_CN_STOCK_AMOUNT:{d:"\u6839\u64DA\u80A1\u7968\u4EE3\u78BC\u548C\u65E5\u671F\uFF0C\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6210\u4EA4\u984D\u3002",a:"\u8FD4\u56DEA\u80A1\u5C0D\u61C9\u80A1\u7968\u6210\u4EA4\u984D\u3002",p:[{name:"\u80A1\u7968\u4EE3\u78BC",detail:"6\u4F4D\u80A1\u7968\u4EE3\u78BC\uFF0C\u5FC5\u586B\u9805\u3002"},{name:"\u65E5\u671F",detail:"\u80A1\u7968\u7684\u4EA4\u6613\u65E5\uFF0C\u9ED8\u8A8D\u70BA\u6700\u65B0\u4EA4\u6613\u65E5"},{name:"\u8907\u6B0A\u9664\u6B0A",detail:"\u9078\u64C7\u80A1\u7968\u7684\u9664\u6B0A\u8907\u6B0A\u985E\u578B\uFF0C\u9ED8\u8A8D0[\u524D\u8907\u6B0A]\uFF0C1[\u539F\u59CB\u50F9\u683C]\uFF0C2[\u5F8C\u8907\u6B0A]"}]},ISDATE:{d:"\u9A57\u8B49\u65E5\u671F\u7684\u683C\u5F0F\u662F\u5426\u6B63\u78BA\u3002\u652F\u6301\u591A\u7A2E\u65E5\u671F\u683C\u5F0F",a:"\u9A57\u8B49\u65E5\u671F\u683C\u5F0F\u6B63\u78BA\u6027\u3002",p:[{name:"\u65E5\u671F",detail:"\u65E5\u671F\u503C,\u4F8B\u59821990/01/01, 1990\u5E741\u67081\u65E5\u7B49\u3002"}]},LINESPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u6298\u7DDA\u5716sparklines\uFF0C\u7528\u65BC\u63CF\u8FF0\u6578\u64DA\u7684\u9023\u7E8C\u8D70\u52E2",a:"\u751F\u6210\u5132\u5B58\u683C\u6298\u7DDA\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D\uFF0C\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20\uFF0C{1,2,3,4,5}\u7B49\u3002"},{name:"\u7DDA\u689D\u984F\u8272",detail:"\u7DDA\u5716\u7684\u7DDA\u689D\u984F\u8272\uFF0C\u53EF\u4EE5\u662F\u5426\u500B\u7BC4\u570DA1\u3001\u8272\u9336\u7D22\u5F15\u6578\u503C\u6216\u8005\u5177\u9AD4\u984F\u8272\u503C\uFF0C\u8A2D\u5B9A\u70BA0\u6216false\u5247\u4E0D\u986F\u793A\uFF0C\u652F\u6301regx\u3001rgb\u3001rgba\u7B49\u3002\u9ED8\u8A8D#2ec7c9"},{name:"\u7DDA\u689D\u7C97\u7D30",detail:"\u6298\u7DDA\u5716\u7DDA\u6BB5\u7C97\u7D30\uFF0C\u9ED8\u8A8D\u70BA1px"},{name:"\u8F14\u52A9\u7DDA",detail:"\u4E00\u689D\u6A6B\u7DDA\uFF0C\u53EF\u4EE5\u662Fmin\u3001max\u3001avg\u3001median\u3001\u7BC4\u570D\u6216\u81EA\u5B9A\u7FA9\u6578\u503C\uFF0C\u9ED8\u8A8D0\u7121"},{name:"\u8F14\u52A9\u7DDA\u984F\u8272",detail:"\u8F14\u52A9\u7DDA\u7684\u984F\u8272\u8A2D\u5B9A\uFF0C\u540C\u7DDA\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D#000"},{name:"\u6700\u5927\u503C\u6A19\u8B58",detail:"\u6A19\u8B58\u7DDA\u5716\u6700\u5927\u503C\uFF0C\u540C\u7DDA\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D0\u4E0D\u986F\u793A"},{name:"\u6700\u5C0F\u503C\u6A19\u8B58",detail:"\u6A19\u8B58\u7DDA\u5716\u6700\u5C0F\u503C\uFF0C\u540C\u7DDA\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D0\u4E0D\u986F\u793A"},{name:"\u6A19\u8B58\u5927\u5C0F",detail:"\u6700\u5927\u503C\u548C\u6700\u5C0F\u503C\u7684\u6A19\u8B58\u5927\u5C0F\u8A2D\u5B9A\uFF0C\u9ED8\u8A8D\u70BA1.5"}]},AREASPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u9762\u7A4D\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u6578\u64DA\u7684\u9023\u7E8C\u7D2F\u7A4D\u503C\u8D70\u52E2",a:"\u751F\u6210\u5132\u5B58\u683C\u9762\u7A4D\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D\uFF0C\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20\uFF0C{1,2,3,4,5}\u7B49\u3002"},{name:"\u7DDA\u689D\u984F\u8272",detail:"\u7DDA\u5716\u7684\u7DDA\u689D\u984F\u8272\uFF0C\u53EF\u4EE5\u662F\u5426\u500B\u7BC4\u570DA1\u3001\u8272\u9336\u7D22\u5F15\u6578\u503C\u6216\u8005\u5177\u9AD4\u984F\u8272\u503C\uFF0C\u8A2D\u5B9A\u70BA0\u6216false\u5247\u4E0D\u986F\u793A\uFF0C\u652F\u6301regx\u3001rgb\u3001rgba\u7B49\u3002\u9ED8\u8A8D#2ec7c9"},{name:"\u586B\u5145\u984F\u8272",detail:"\u5F62\u6210\u9762\u7A4D\u5716\uFF0C\u540C\u7DDA\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D0\u4E0D\u986F\u793A"},{name:"\u7DDA\u689D\u7C97\u7D30",detail:"\u6298\u7DDA\u5716\u7DDA\u6BB5\u7C97\u7D30\uFF0C\u9ED8\u8A8D\u70BA1px"},{name:"\u8F14\u52A9\u7DDA",detail:"\u4E00\u689D\u6A6B\u7DDA\uFF0C\u53EF\u4EE5\u662Fmin\u3001max\u3001avg\u3001median\u3001\u7BC4\u570D\u6216\u81EA\u5B9A\u7FA9\u6578\u503C\uFF0C\u9ED8\u8A8D0\u7121"},{name:"\u8F14\u52A9\u7DDA\u984F\u8272",detail:"\u8F14\u52A9\u7DDA\u7684\u984F\u8272\u8A2D\u5B9A\uFF0C\u540C\u7DDA\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D#000"}]},COLUMNSPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u5782\u76F4\u67F1\u72C0\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u96E2\u6563\u6578\u64DA\u4E4B\u9593\u7684\u5927\u5C0F\u60C5\u51B5",a:"\u751F\u6210\u5132\u5B58\u683C\u5782\u76F4\u67F1\u72C0\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D\uFF0C\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20\uFF0C{1,2,3,4,5}\u7B49\u3002"},{name:"\u67F1\u689D\u9593\u9694",detail:"\u67F1\u689D\u4E4B\u9593\u7684\u9593\u9694\u8DDD\u96E2\uFF0C\u9ED8\u8A8D\u70BA1"},{name:"\u67F1\u689D\u984F\u8272",detail:"\u7DDA\u5716\u7684\u7DDA\u689D\u984F\u8272\uFF0C\u53EF\u4EE5\u662F\u5426\u500B\u7BC4\u570DA1\u3001\u8272\u9336\u7D22\u5F15\u6578\u503C\u6216\u8005\u5177\u9AD4\u984F\u8272\u503C\uFF0C\u8A2D\u5B9A\u70BA0\u6216false\u5247\u4E0D\u986F\u793A\uFF0C\u652F\u6301regx\u3001rgb\u3001rgba\u7B49\u3002\u9ED8\u8A8D#fc5c5c"},{name:"\u8CA0\u5411\u67F1\u689D\u984F\u8272",detail:"\u8CA0\u5411\u67F1\u689D\u984F\u8272\u8A2D\u5B9A\uFF0C\u4EE3\u8868\u8CA0\u503C\u7684\u984F\u8272\uFF0C\u540C\u67F1\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D#97b552"},{name:"\u6700\u5927\u503C",detail:"\u67F1\u5716\u6700\u5927\u503C\uFF0C\u7528\u65BC\u898F\u7BC4\u67F1\u5716\u9577\u5EA6\uFF0C\u9ED8\u8A8D\u70BA\u81EA\u52D5\u8A08\u7B97false\u3001auto\u3001null"},{name:"\u8272\u677F",detail:"\u8ABF\u8272\u677F\u53EF\u4EE5\u55AE\u7368\u8A2D\u5B9A\u6BCF\u500B\u67F1\u689D\u7684\u984F\u8272\uFF0C\u53EF\u8A2D\u5B9A\u591A\u500B\uFF0C\u652F\u6301\u5169\u7A2E\u683C\u5F0F:1\u984F\u8272\u4F8B\u5982#000\uFF0C\u4EE3\u8868\u7B2C\u4E00\u500B\u67F1\u7684\u984F\u8272\u662F\u9ED1\u8272\uFF1B2\u6578\u503C\u7BC4\u570D:\u984F\u8272\uFF0C\u4F8B\u5982-2:#000\u8868\u793A\u6578\u503C\u70BA-2\u7684\u67F1\u70BA\u9ED1\u8272\uFF0C0:5:#000\u8868\u793A\u6578\u503C0-5\u7684\u67F1\u70BA\u9ED1\u8272\uFF0C\u9ED8\u8A8D\u70BA\u7A7A"}]},STACKCOLUMNSPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u7D2F\u7A4D\u5782\u76F4\u67F1\u72C0\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u96E2\u6563\u6578\u64DA\u591A\u500B\u7DAD\u5EA6\u7684\u6578\u503C\u5927\u5C0F",a:"\u751F\u6210\u5132\u5B58\u683C\u7D2F\u7A4D\u5782\u76F4\u67F1\u72C0\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D\uFF0C\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20\uFF0C{1,2,3,4,5}\u7B49\u3002"},{name:"\u6309\u5217\u5806\u7A4D",detail:"\u5982\u679C\u9700\u8981\u6309\u884C\u5806\u7A4D\u5247\u672C\u9805\u8A2D\u70BAfalse\u62160\uFF0C\u9ED8\u8A8D\u70BA\u662F1"},{name:"\u67F1\u689D\u9593\u9694",detail:"\u67F1\u689D\u4E4B\u9593\u7684\u9593\u9694\u8DDD\u96E2\uFF0C\u9ED8\u8A8D\u70BA1"},{name:"\u6700\u5927\u503C",detail:"\u7D2F\u7A4D\u67F1\u5716\u6700\u5927\u503C\uFF0C\u7528\u65BC\u898F\u7BC4\u67F1\u5716\u9577\u5EA6\uFF0C\u9ED8\u8A8D\u70BA\u81EA\u52D5\u8A08\u7B97false\u3001auto\u3001null"},{name:"\u7D2F\u7A4D\u8272\u677F",detail:"\u8ABF\u8272\u677F\u53EF\u4EE5\u55AE\u7368\u8A2D\u5B9A\u6BCF\u500B\u7DAD\u5EA6\u7684\u67F1\u689D\u984F\u8272\uFF0C\u53EF\u8A2D\u5B9A\u70BAA1:A10\u7B49\u7BC4\u570D\uFF0C\u9ED8\u8A8D\u70BA#2ec7c9, #fc5c5c, #5ab1ef, #ffb980..."}]},BARSPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u6A6B\u5411\u689D\u5F62\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u96E2\u6563\u6578\u64DA\u4E4B\u9593\u7684\u5927\u5C0F\u60C5\u51B5",a:"\u751F\u6210\u5132\u5B58\u683C\u6A6B\u5411\u689D\u5F62\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D,\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20, {1,2,3,4,5}\u7B49\u3002"},{name:"\u67F1\u689D\u9593\u9694",detail:"\u67F1\u689D\u4E4B\u9593\u7684\u9593\u9694\u8DDD\u96E2\uFF0C\u9ED8\u8A8D\u70BA1"},{name:"\u67F1\u689D\u984F\u8272",detail:"\u7DDA\u5716\u7684\u7DDA\u689D\u984F\u8272\uFF0C\u53EF\u4EE5\u662F\u5426\u500B\u7BC4\u570DA1\u3001\u8272\u9336\u7D22\u5F15\u6578\u503C\u6216\u8005\u5177\u9AD4\u984F\u8272\u503C\uFF0C\u8A2D\u5B9A\u70BA0\u6216false\u5247\u4E0D\u986F\u793A\uFF0C\u652F\u6301regx\u3001rgb\u3001rgba\u7B49\u3002\u9ED8\u8A8D#fc5c5c"},{name:"\u8CA0\u5411\u67F1\u689D\u984F\u8272",detail:"\u8CA0\u5411\u67F1\u689D\u984F\u8272\u8A2D\u5B9A\uFF0C\u4EE3\u8868\u8CA0\u503C\u7684\u984F\u8272\uFF0C\u540C\u67F1\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D#97b552"},{name:"\u6700\u5927\u503C",detail:"\u67F1\u5716\u6700\u5927\u503C\uFF0C\u7528\u65BC\u898F\u7BC4\u67F1\u5716\u9577\u5EA6\uFF0C\u9ED8\u8A8D\u70BA\u81EA\u52D5\u8A08\u7B97false\u3001auto\u3001null"},{name:"\u8272\u677F",detail:"\u8ABF\u8272\u677F\u53EF\u4EE5\u55AE\u7368\u8A2D\u5B9A\u6BCF\u500B\u67F1\u689D\u7684\u984F\u8272\uFF0C\u53EF\u8A2D\u5B9A\u591A\u500B\uFF0C\u652F\u6301\u5169\u7A2E\u683C\u5F0F:1\u984F\u8272\u4F8B\u5982#000\uFF0C\u4EE3\u8868\u7B2C\u4E00\u500B\u67F1\u7684\u984F\u8272\u662F\u9ED1\u8272\uFF1B2\u6578\u503C\u7BC4\u570D:\u984F\u8272\uFF0C\u4F8B\u5982-2:#000\u8868\u793A\u6578\u503C\u70BA-2\u7684\u67F1\u70BA\u9ED1\u8272\uFF0C0:5:#000\u8868\u793A\u6578\u503C0-5\u7684\u67F1\u70BA\u9ED1\u8272\uFF0C\u9ED8\u8A8D\u70BA\u7A7A"}]},STACKBARSPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u7D2F\u7A4D\u6A6B\u5411\u689D\u5F62\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u96E2\u6563\u6578\u64DA\u591A\u500B\u7DAD\u5EA6\u7684\u6578\u503C\u5927\u5C0F",a:"\u751F\u6210\u5132\u5B58\u683C\u7D2F\u7A4D\u6A6B\u5411\u689D\u5F62\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D,\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20, {1,2,3,4,5}\u7B49\u3002"},{name:"\u6309\u5217\u5806\u7A4D",detail:"\u5982\u679C\u9700\u8981\u6309\u884C\u5806\u7A4D\u5247\u672C\u9805\u8A2D\u70BAfalse\u62160\uFF0C\u9ED8\u8A8D\u70BA\u662F1"},{name:"\u67F1\u689D\u9593\u9694",detail:"\u67F1\u689D\u4E4B\u9593\u7684\u9593\u9694\u8DDD\u96E2\uFF0C\u9ED8\u8A8D\u70BA1"},{name:"\u6700\u5927\u503C",detail:"\u7D2F\u7A4D\u67F1\u5716\u6700\u5927\u503C\uFF0C\u7528\u65BC\u898F\u7BC4\u67F1\u5716\u9577\u5EA6\uFF0C\u9ED8\u8A8D\u70BA\u81EA\u52D5\u8A08\u7B97false\u3001auto\u3001null"},{name:"\u7D2F\u7A4D\u8272\u677F",detail:"\u8ABF\u8272\u677F\u53EF\u4EE5\u55AE\u7368\u8A2D\u5B9A\u6BCF\u500B\u7DAD\u5EA6\u7684\u67F1\u689D\u984F\u8272\uFF0C\u53EF\u8A2D\u5B9A\u70BAA1:A10\u7B49\u7BC4\u570D\uFF0C\u9ED8\u8A8D\u70BA#2ec7c9, #fc5c5c, #5ab1ef, #ffb980..."}]},DISCRETESPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u96E2\u6563\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u96E2\u6563\u6578\u64DA\u8D70\u52E2",a:"\u751F\u6210\u5132\u5B58\u683C\u96E2\u6563\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D,\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20, {1,2,3,4,5}\u7B49\u3002"},{name:"\u5206\u5272\u95BE\u503C",detail:"\u96E2\u6563\u5716\u67F1\u5F62\u984F\u8272\u7684\u5340\u5206\uFF0C\u4F8B\u5982:\u8A72\u503C\u70BA0\uFF0C\u5247\u5927\u65BC0\u70BA\u85CD\u8272\uFF0C\u5C0F\u65BC0\u70BA\u7D05\u8272\uFF0C\u9ED8\u8A8D\u70BA0"},{name:"\u95BE\u503C\u4EE5\u4E0A\u984F\u8272",detail:"\u7DDA\u5716\u7684\u7DDA\u689D\u984F\u8272\uFF0C\u53EF\u4EE5\u662F\u5426\u500B\u7BC4\u570DA1\u3001\u8272\u9336\u7D22\u5F15\u6578\u503C\u6216\u8005\u5177\u9AD4\u984F\u8272\u503C\uFF0C\u8A2D\u5B9A\u70BA0\u6216false\u5247\u4E0D\u986F\u793A\uFF0C\u652F\u6301regx\u3001rgb\u3001rgba\u7B49\u3002\u9ED8\u8A8D#2ec7c9"},{name:"\u95BE\u503C\u4EE5\u4E0B\u984F\u8272",detail:"\u95BE\u503C\u4EE5\u4E0B\u67F1\u689D\u984F\u8272\u8A2D\u5B9A\uFF0C\u540C\u95BE\u503C\u4EE5\u4E0A\u984F\u8272\uFF0C\u9ED8\u8A8D#fc5c5c"}]},TRISTATESPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u4E09\u614B\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u4E09\u7A2E\u614B\u52E2\u7684\u8D70\u52E2\u4F8B\u5982\u52DD\u8CA0\u5E73",a:"\u751F\u6210\u5132\u5B58\u683C\u4E09\u614B\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D,\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20, {1,2,3,4,5}\u7B49\u3002"},{name:"\u67F1\u689D\u9593\u9694",detail:"\u67F1\u689D\u4E4B\u9593\u7684\u9593\u9694\u8DDD\u96E2\uFF0C\u9ED8\u8A8D\u70BA1"},{name:"\u67F1\u689D\u984F\u8272",detail:"\u7DDA\u5716\u7684\u7DDA\u689D\u984F\u8272\uFF0C\u53EF\u4EE5\u662F\u5426\u500B\u7BC4\u570DA1\u3001\u8272\u9336\u7D22\u5F15\u6578\u503C\u6216\u8005\u5177\u9AD4\u984F\u8272\u503C\uFF0C\u8A2D\u5B9A\u70BA0\u6216false\u5247\u4E0D\u986F\u793A\uFF0C\u652F\u6301regx\u3001rgb\u3001rgba\u7B49\u3002\u9ED8\u8A8D#fc5c5c"},{name:"\u8D1F\u5411\u67F1\u689D\u984F\u8272",detail:"\u8CA0\u5411\u67F1\u689D\u984F\u8272\u8A2D\u5B9A\uFF0C\u4EE3\u8868\u8CA0\u503C\u7684\u984F\u8272\uFF0C\u540C\u67F1\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D#97b552"},{name:"\u96F6\u503C\u67F1\u689D\u984F\u8272",detail:"\u96F6\u503C\u67F1\u689D\u984F\u8272\u8A2D\u5B9A\uFF0C\u4EE3\u88680\u503C\u984F\u8272\uFF0C\u540C\u67F1\u689D\u984F\u8272\u914D\u5BD8\uFF0C\u9ED8\u8A8D#999"},{name:"\u8272\u677F",detail:"\u8ABF\u8272\u677F\u53EF\u4EE5\u55AE\u7368\u8A2D\u5B9A\u6BCF\u500B\u67F1\u689D\u7684\u984F\u8272\uFF0C\u53EF\u8A2D\u5B9A\u591A\u500B\uFF0C\u652F\u6301\u5169\u7A2E\u683C\u5F0F:1\u984F\u8272\u4F8B\u5982#000\uFF0C\u4EE3\u8868\u7B2C\u4E00\u500B\u67F1\u7684\u984F\u8272\u662F\u9ED1\u8272\uFF1B2\u6578\u503C\u7BC4\u570D:\u984F\u8272\uFF0C\u4F8B\u5982-2:#000\u8868\u793A\u6578\u503C\u70BA-2\u7684\u67F1\u70BA\u9ED1\u8272\uFF0C0-5:#000\u8868\u793A\u6578\u503C0-5\u7684\u67F1\u70BA\u9ED1\u8272\uFF0C\u9ED8\u8A8D\u70BA\u7A7A"}]},PIESPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u9905\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u6578\u64DA\u5360\u6BD4",a:"\u751F\u6210\u5132\u5B58\u683C\u9905\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D,\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20, {1,2,3,4,5}\u7B49\u3002"},{name:"\u65CB\u8F49\u89D2\u5EA6",detail:"\u9905\u5716\u7684\u65CB\u8F49\u89D2\u5EA6\uFF0C\u9ED8\u8A8D\u70BA0"},{name:"\u9905\u5716\u908A\u6846",detail:"\u9905\u5716\u908A\u6846\u5927\u5C0F\uFF0C\u9ED8\u8A8D\u70BA\u71210"},{name:"\u908A\u6846\u984F\u8272",detail:"\u9905\u5716\u908A\u6846\u984F\u8272\uFF0C\u9ED8\u8A8D\u70BA#000"},{name:"\u9905\u5716\u8272\u677F",detail:"\u8ABF\u8272\u677F\u53EF\u4EE5\u8A2D\u5B9A\u5207\u7247\u7684\u984F\u8272\uFF0C\u53EF\u8A2D\u5B9A\u70BAA1:A10\u7B49\u7BC4\u570D\uFF0C\u9ED8\u8A8D\u70BA#2ec7c9, #fc5c5c, #5ab1ef, #ffb980..."}]},BOXSPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u7BB1\u7DDA\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u6578\u64DA\u96C6\u7684\u7D71\u8A08\u5206\u4F48",a:"\u751F\u6210\u5132\u5B58\u683C\u7BB1\u7DDA\u5716",p:[{name:"\u6578\u64DA\u7BC4\u570D",detail:"\u6578\u64DA\u7BC4\u570D,\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1:A20, {1,2,3,4,5}\u7B49\u3002"},{name:"\u96E2\u7FA4\u9EDE\u6BD4\u4F8B",detail:"\u96E2\u7FA4\u9EDE\u7684\u95BE\u503C\u7BC4\u570D\uFF0C\u5982\u679C\u70BA0\u6216false\u5247\u4E0D\u986F\u793A\uFF0C\u9ED8\u8A8D\u70BA1.5\u500D"},{name:"\u76EE\u6A19\u9EDE\u503C",detail:"\u7BB1\u7DDA\u5716\u4E0A\u7684\u76EE\u6A19\u503C\u8A2D\u5B9A\uFF0C\u9ED8\u8A8D\u70BAfalse\u4E0D\u986F\u793A"},{name:"\u6578\u64DA\u9EDE\u5927\u5C0F",detail:"\u76EE\u6A19\u9EDE\u548C\u96E2\u7FA4\u9EDE\u7684\u534A\u5F91\u5927\u5C0F\u8A2D\u5B9A\uFF0C\u9ED8\u8A8D\u70BA1.5"}]},BULLETSPLINES:{d:"\u751F\u6210\u5D4C\u5165\u5728\u5132\u5B58\u683C\u5167\u7684\u5B50\u5F48\u5716sparklines\uFF0C\u4E00\u822C\u7528\u65BC\u63CF\u8FF0\u4EFB\u52D9\u9054\u6210\u7387",a:"\u751F\u6210\u5132\u5B58\u683C\u5B50\u5F48\u5716",p:[{name:"\u76EE\u6A19",detail:"\u9054\u6210\u7684\u76EE\u6A19\u503C\uFF0C\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1\uFF0C100\u7B49\u3002"},{name:"\u5BE6\u969B\u5B8C\u6210",detail:"\u73FE\u6642\u5B8C\u6210\u503C\uFF0C\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1\uFF0C100\u7B49\u3002"},{name:"\u5C0D\u6BD4\u503C",detail:"\u5C0D\u6BD4\u503C\uFF0C\u4F8B\u5982\u8D85\u984D\u3001\u6700\u4F4E\u3001\u7372\u734E\u5E95\u7DDA\u7B49\uFF0C\u6578\u503C\u624D\u80FD\u88AB\u6709\u6548\u8A08\u7B97\uFF0C\u4F8B\u5982A1\uFF0C100\u7B49\u3002\u53EF\u4EE5\u8A2D\u5B9A\u6700\u591A9\u500B\u5C0D\u6BD4\u503C"}]},COMPOSESPLINES:{d:"\u652F\u6301\u591A\u500B\u985E\u578B\u7684\u5716\u756B\u5728\u540C\u4E00\u500B\u5132\u5B58\u683C\uFF0C\u6BCF\u500B\u53C3\u6578\u4EE3\u8868\u4E00\u500Bsparklines\u5716",a:"\u7D44\u5408sparklines\u5716\u5230\u4E00\u500B\u5132\u5B58\u683C",p:[{name:"\u5716\u8A2D\u5B9A",detail:"sparklines\u5716\u8A2D\u5B9A\uFF0C\u4F8B\u5982A1:A20\uFF0C\u4E00\u500B\u5B8C\u6210\u7684\u9905\u5716\u3001\u7DDA\u5716\u8A2D\u5B9A\u7B49\u3002"}]},SORT:{d:"\u8FD4\u56DE\u6578\u7D44\u4E2D\u5143\u7D20\u7684\u6392\u5E8F\u6578\u7D44\u3002\u8FD4\u56DE\u7684\u6578\u7D44\u8207\u63D0\u4F9B\u7684\u6578\u7D44\u53C3\u6578\u5F62\u72C0\u76F8\u540C\u3002",a:"\u8FD4\u56DE\u6578\u7D44\u4E2D\u5143\u7D20\u7684\u6392\u5E8F\u6578\u7D44\u3002\u8FD4\u56DE\u7684\u6578\u7D44\u8207\u63D0\u4F9B\u7684\u6578\u7D44\u53C3\u6578\u5F62\u72C0\u76F8\u540C\u3002",p:[{name:"array",detail:"\u8981\u6392\u5E8F\u7684\u7BC4\u570D\u6216\u6578\u7D44\u3002"},{name:"sort_index",detail:"[\u53EF\u9078] - \u8868\u793A\u8981\u6392\u5E8F\u7684\u884C\u6216\u5217\u7684\u6578\u4F4D\u3002\uFF08\u9ED8\u8A8Drow1/col1\uFF09"},{name:"sort_order",detail:"[\u53EF\u9078] - \u8868\u793A\u6240\u9700\u6392\u5E8F\u9806\u5E8F\u7684\u6578\u4F4D\uFF1B1\u8868\u793A\u6607\u51AA\uFF08\u9ED8\u8A8D\uFF09\uFF0C-1\u8868\u793A\u964D\u5E8F\u3002"},{name:"by_col",detail:"[\u53EF\u9078] - \u8868\u793A\u6240\u9700\u6392\u5E8F\u65B9\u5411\u7684\u908F\u8F2F\u503C\uFF1B\u6309\u884C\u6392\u5E8F\u70BAFALSE\uFF08\uFF09\uFF08\u9ED8\u8A8D\uFF09\uFF0C\u6309\u5217\u6392\u5E8F\u70BATRUE\uFF08\uFF09\u3002"}]},FILTER:{d:"\u57FA\u65BC\u4E00\u500B\u5E03\u6797\uFF08\u771F/\u5047\uFF09\u6578\u7D44\u904E\u6FFE\u4E00\u500B\u6578\u7D44\u3002",a:"\u57FA\u65BC\u4E00\u500B\u5E03\u6797\uFF08\u771F/\u5047\uFF09\u6578\u7D44\u904E\u6FFE\u4E00\u500B\u6578\u7D44\u3002",p:[{name:"array",detail:"\u8981\u7BE9\u9078\u7684\u6578\u7D44\u6216\u7BC4\u570D\u3002"},{name:"include",detail:"\u5E03\u6797\u6578\u7D44\uFF0C\u5176\u9AD8\u5EA6\u6216\u5BEC\u5EA6\u8207\u6578\u7D44\u76F8\u540C"},{name:"if_empty",detail:"[\u53EF\u9078] - \u5982\u679C\u5305\u542B\u6578\u7D44\u4E2D\u7684\u6240\u6709\u503C\u90FD\u70BA\u7A7A\uFF08filter\u4E0D\u8FD4\u56DE\u4EFB\u4F55\u503C\uFF09\uFF0C\u5247\u8FD4\u56DE\u7684\u503C\u3002"}]},UNIQUE:{d:"\u8FD4\u56DE\u5217\u8868\u6216\u5340\u57DF\u4E2D\u7684\u552F\u4E00\u503C\u7684\u6E05\u55AE\u3002",a:"\u8FD4\u56DE\u5217\u8868\u6216\u5340\u57DF\u4E2D\u7684\u552F\u4E00\u503C\u7684\u6E05\u55AE\u3002",p:[{name:"array",detail:"\u5F9E\u5176\u8FD4\u56DE\u552F\u4E00\u503C\u7684\u6578\u7D44\u6216\u5340\u57DF\u3002"},{name:"by_col",detail:"[\u53EF\u9078] - \u908F\u8F2F\u503C\uFF0C\u8A13\u793A\u5982\u4F55\u6BD4\u8F03\uFF1B\u6309\u884C= FALSE\uFF08\uFF09\u6216\u7701\u7565\uFF1B\u6309\u5217= TRUE\uFF08\uFF09\u3002"},{name:"occurs_once",detail:"[\u53EF\u9078] - \u908F\u8F2F\u503C\uFF0C\u50C5\u8FD4\u56DE\u552F\u4E00\u503C\u4E2D\u51FA\u73FE\u4E00\u6B21= TRUE\uFF08\uFF09\uFF1B\u5305\u62EC\u6240\u6709\u552F\u4E00\u503C= FALSE\uFF08\uFF09\u6216\u7701\u7565\u3002"}]},RANDARRAY:{d:"\u8FD4\u56DE0\u52301\u4E4B\u9593\u7684\u96A8\u6A5F\u6578\u4F4D\u6578\u7D44\u3002",a:"\u8FD4\u56DE0\u52301\u4E4B\u9593\u7684\u96A8\u6A5F\u6578\u4F4D\u6578\u7D44",p:[{name:"rows",detail:"[\u53EF\u9078] - \u8981\u8FD4\u56DE\u7684\u884C\u6578\u3002"},{name:"cols",detail:"[\u53EF\u9078] - \u8981\u8FD4\u56DE\u7684\u5217\u6578\u3002"}]},SEQUENCE:{d:"\u751F\u6210\u6578\u4F4D\u5E8F\u5217\u7684\u6E05\u55AE\u3002",a:"\u751F\u6210\u6578\u4F4D\u5E8F\u5217\u7684\u6E05\u55AE\u3002",p:[{name:"rows",detail:"\u8981\u8FD4\u56DE\u7684\u884C\u6578\u3002"},{name:"cols",detail:"[\u53EF\u9078] - \u8981\u8FD4\u56DE\u7684\u5217\u6578\u3002"},{name:"start",detail:"[\u53EF\u9078] - \u5E8F\u5217\u4E2D\u7684\u7B2C\u4E00\u500B\u6578\u4F4D\u3002"},{name:"step",detail:"[\u53EF\u9078] -\u5E8F\u5217\u4E2D\u6BCF\u500B\u5E8F\u5217\u503C\u7684\u589E\u91CF\u3002"}]},EVALUATE:{d:"\u5C0D\u4EE5\u6587\u5B57\u8868\u793A\u7684\u516C\u5F0F\u6216\u8005\u8868\u9054\u5F0F\u6C42\u503C\uFF0C\u4E26\u8FD4\u56DE\u7D50\u679C\u3002",a:"\u6839\u64DA\u6587\u5B57\u516C\u5F0F\u6216\u8005\u8868\u9054\u5F0F\u6C42\u503C\u3002",p:[{name:"\u516C\u5F0F",detail:"\u516C\u5F0F\u6216\u8868\u9054\u5F0F"}]},REMOTE:{d:"Calls a function on a remote server",a:"Calls a function on a remote back end server/API.",p:[{name:"remote_expression",detail:"Formula"}]}},toolbar:{undo:"\u64A4\u92B7",redo:"\u91CD\u505A",paintFormat:"\u683C\u5F0F\u5237",currencyFormat:"\u8CA8\u5E63\u683C\u5F0F",percentageFormat:"\u767E\u5206\u6BD4\u683C\u5F0F",numberDecrease:"\u51CF\u5C11\u5C0F\u6578\u4F4D\u6578",numberIncrease:"\u65B0\u589E\u5C0F\u6578\u4F4D\u6578",moreFormats:"\u66F4\u591A\u683C\u5F0F",font:"\u5B57\u9AD4",fontSize:"\u5B57\u578B\u5927\u5C0F",bold:"\u7C97\u9AD4\uFF08Ctrl+B\uFF09",italic:"\u659C\u9AD4\uFF08Ctrl+I\uFF09",strikethrough:"\u5220\u9664\u7DDA\uFF08Alt+Shift+5\uFF09",underline:"\u5E95\u7DDA",textColor:"\u6587\u5B57\u984F\u8272",chooseColor:"\u984F\u8272\u9078\u64C7",resetColor:"\u91CD\u7F6E\u984F\u8272",customColor:"\u81EA\u5B9A\u7FA9",alternatingColors:"\u4EA4\u66FF\u984F\u8272",confirmColor:"\u78BA\u5B9A\u984F\u8272",cancelColor:"\u53D6\u6D88",collapse:"\u6536\u8D77",fillColor:"\u5132\u5B58\u683C\u984F\u8272",border:"\u908A\u6846",borderStyle:"\u908A\u6846\u985E\u578B",mergeCell:"\u5408\u4F75\u5132\u5B58\u683C",chooseMergeType:"\u9078\u64C7\u5408\u4F75\u985E\u578B",horizontalAlign:"\u6C34\u51C6\u5C0D\u9F4A",verticalAlign:"\u5782\u76F4\u5C0D\u9F4A",alignment:"\u5C0D\u9F4A\u7BA1\u9053",textWrap:"\u6587\u5B57\u63DB\u884C",textWrapMode:"\u63DB\u884C\u7BA1\u9053",textRotate:"\u6587\u5B57\u65CB\u8F49",textRotateMode:"\u65CB\u8F49\u7BA1\u9053",freezeTopRow:"\u51CD\u7D50\u7B2C\u4E00\u884C",sortAndFilter:"\u6392\u5E8F\u548C\u7BE9\u9078",findAndReplace:"\u67E5\u627E\u66FF\u63DB",sum:"\u6C42\u548C",autoSum:"\u81EA\u52D5\u6C42\u548C",moreFunction:"\u66F4\u591A\u51FD\u6578",conditionalFormat:"\u689D\u4EF6\u683C\u5F0F",postil:"\u6279\u8A3B",pivotTable:"\u6578\u64DA\u900F\u8996\u9336",chart:"\u5716\u8868",screenshot:"\u622A\u5716",splitColumn:"\u5206\u5217",insertImage:"\u63D2\u5165\u5716\u7247",insertLink:"\u63D2\u5165\u9023\u7D50",dataVerification:"\u6578\u64DA\u9A57\u8B49",protection:"\u4FDD\u8B77\u5DE5\u4F5C\u8868\u5167\u5BB9",clearText:"\u6E05\u9664\u984F\u8272\u9078\u64C7",noColorSelectedText:"\u6C92\u6709\u984F\u8272\u88AB\u9078\u64C7",toolMore:"\u66F4\u591A",toolLess:"\u5C11\u65BC",toolClose:"\u6536\u8D77",toolMoreTip:"\u66F4\u591A\u529F\u80FD",moreOptions:"\u66F4\u591A\u9078\u9805",cellFormat:"\u8A2D\u5B9A\u5132\u5B58\u683C\u683C\u5F0F",print:"\u5217\u5370"},alternatingColors:{applyRange:"\u61C9\u7528\u7BC4\u570D",selectRange:"\u9078\u64C7\u61C9\u7528\u7BC4\u570D",header:"\u9801\u7709",footer:"\u9801\u8173",errorInfo:"\u4E0D\u80FD\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C,\u8ACB\u9078\u64C7\u55AE\u500B\u5340\u57DF,\u7136\u5F8C\u518D\u8A66",textTitle:"\u683C\u5F0F\u6A23\u5F0F",custom:"\u81EA\u5B9A\u7FA9",close:"\u95DC\u9589",selectionTextColor:"\u9078\u64C7\u6587\u5B57\u984F\u8272",selectionCellColor:"\u9078\u64C7\u5132\u5B58\u683C\u984F\u8272",removeColor:"\u79FB\u9664\u4EA4\u66FF\u984F\u8272",colorShow:"\u984F\u8272",currentColor:"\u7576\u524D\u984F\u8272",tipSelectRange:"\u8ACB\u9078\u64C7\u4EA4\u66FF\u984F\u8272\u61C9\u7528\u7BC4\u570D",errorNoRange:"\u60A8\u9078\u64C7\u7684\u61C9\u7528\u7BC4\u570D\u4E0D\u662F\u9078\u5340\uFF01",errorExistColors:"\u60A8\u9078\u64C7\u7684\u61C9\u7528\u7BC4\u570D\u5DF2\u5B58\u5728\u4EA4\u66FF\u984F\u8272\u4E14\u4E0D\u5C6C\u65BC\u4F60\u8981\u7DE8\u8F2F\u7684\u61C9\u7528\u7BC4\u570D\uFF01"},button:{confirm:"\u78BA\u5B9A",cancel:"\u53D6\u6D88",close:"\u95DC\u9589",update:"Update",delete:"Delete",insert:"\u65B0\u5EFA",prevPage:"\u4E0A\u4E00\u9801",nextPage:"\u4E0B\u4E00\u9801",total:"\u7E3D\u5171\uFF1A"},paint:{start:"\u683C\u5F0F\u5237\u958B\u555F",end:"ESC\u9375\u9000\u51FA",tipSelectRange:"\u8ACB\u9078\u64C7\u9700\u8981\u8907\u88FD\u683C\u5F0F\u7684\u5340\u57DF",tipNotMulti:"\u7121\u6CD5\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C"},format:{moreCurrency:"\u66F4\u591A\u8CA8\u5E63\u683C\u5F0F",moreDateTime:"\u66F4\u591A\u65E5\u671F\u8207\u6642\u9593\u683C\u5F0F",moreNumber:"\u66F4\u591A\u6578\u4F4D\u683C\u5F0F",titleCurrency:"\u8CA8\u5E63\u683C\u5F0F",decimalPlaces:"\u5C0F\u6578\u4F4D\u6578",titleDateTime:"\u65E5\u671F\u8207\u6642\u9593\u683C\u5F0F",titleNumber:"\u6578\u4F4D\u683C\u5F0F"},info:{detailUpdate:"\u65B0\u6253\u958B",detailSave:"\u5DF2\u6062\u5FA9\u672C\u5730\u7DE9\u5B58",row:"\u884C",column:"\u5217",loading:"\u6E32\u67D3\u4E2D\xB7\xB7\xB7",copy:"\u526F\u672C",return:"\u8FD4\u56DE",rename:"\u91CD\u547D\u540D",tips:"\u8868\u683C\u91CD\u547D\u540D",noName:"\u7121\u6A19\u984C\u7684\u8A66\u7B97\u8868",wait:"\u5F85\u66F4\u65B0",add:"\u6DFB\u52A0",addLast:"\u5728\u5E95\u90E8\u6DFB\u52A0",backTop:"\u56DE\u5230\u9802\u90E8",pageInfo:"\u5171${total}\u689D,${totalPage}\u9801,\u7576\u524D\u5DF2\u986F\u793A${currentPage}\u9801",nextPage:"\u4E0B\u4E00\u9801",tipInputNumber:"\u8ACB\u8F38\u5165\u6578\u4F4D",tipInputNumberLimit:"\u65B0\u589E\u7BC4\u570D\u9650\u5236\u57281-100",tipRowHeightLimit:"\u884C\u9AD8\u5FC5\u9808\u57280 ~ 545\u4E4B\u9593",tipColumnWidthLimit:"\u5217\u5BEC\u5FC5\u9808\u57280 ~ 2038\u4E4B\u9593",pageInfoFull:"\u5171${total}\u689D,${totalPage}\u9801,\u5DF2\u986F\u793A\u5168\u90E8\u6578\u64DA"},currencyDetail:{RMB:"\u4EBA\u6C11\u5E63",USdollar:"\u7F8E\u5143",EUR:"\u6B50\u5143",GBP:"\u82F1\u938A",HK:"\u6E2F\u5143",JPY:"\u65E5\u5143",AlbanianLek:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u5217\u514B",AlgerianDinar:"\u963F\u723E\u53CA\u5229\u4E9E\u7B2C\u7D0D\u723E",Afghani:"\u963F\u5BCC\u6C57\u5C3C",ArgentinePeso:"\u963F\u6839\u5EF7\u6BD4\u7D22",UnitedArabEmiratesDirham:"\u963F\u62C9\u4F2F\u806F\u5408\u5927\u516C\u570B\u8FEA\u62C9\u59C6",ArubanFlorin:"\u963F\u9B6F\u5DF4\u5F17\u7F85\u6797",OmaniRial:"\u963F\u66FC\u88E1\u4E9E\u723E",Azerbaijanimanat:"\u963F\u585E\u62DC\u7586\u99AC\u7D0D\u7279",EgyptianPound:"\u57C3\u53CA\u938A",EthiopianBirr:"\u8863\u7D22\u6BD4\u4E9E\u6BD4\u723E",AngolaKwanza:"\u5B89\u54E5\u62C9\u5BEC\u7D2E",AustralianDollar:"\u6FB3\u5927\u5229\u4E9E\u5143",Patacas:"\u6FB3\u9580\u5143",BarbadosDollar:"\u5DF4\u5DF4\u591A\u65AF\u5143",PapuaNewGuineaKina:"\u5DF4\u5E03\u4E9E\u65B0\u5E7E\u5167\u4E9E\u57FA\u90A3",BahamianDollar:"\u5DF4\u54C8\u99AC\u5143",PakistanRupee:"\u5DF4\u57FA\u65AF\u5766\u76E7\u6BD4",ParaguayanGuarani:"\u5DF4\u62C9\u572D\u74DC\u62C9\u5C3C",BahrainiDinar:"\u5DF4\u6797\u7B2C\u7D0D\u723E",PanamanianBalboa:"\u5DF4\u62FF\u99AC\u5DF4\u6CE2\u4E9E",Brazilianreal:"\u5DF4\u897F\u88CF\u4E9E\u4F0A",Belarusianruble:"\u767D\u4FC4\u7F85\u65AF\u76E7\u5E03",BermudianDollar:"\u767E\u6155\u5927\u5143",BulgarianLev:"\u4FDD\u52A0\u5229\u4E9E\u5217\u5F17",IcelandKrona:"\u51B0\u5CF6\u514B\u6717",BosniaHerzegovinaConvertibleMark:"\u6CE2\u9ED1\u53EF\u514C\u63DB\u99AC\u514B",PolishZloty:"\u6CE2\u862D\u8332\u7F85\u63D0",Boliviano:"\u73BB\u5229\u7DAD\u4E9E\u8AFE",BelizeDollar:"\u8C9D\u88E1\u65AF\u5143",BotswanaPula:"\u6CE2\u5284\u90A3\u666E\u62C9",NotDannuzhamu:"\u4E0D\u4E39\u52AA\u7D2E\u59C6",BurundiFranc:"\u5E03\u9686\u8FEA\u6CD5\u90CE",NorthKoreanWon:"\u671D\u9BAE\u5713",DanishKrone:"\u4E39\u9EA5\u514B\u6717",EastCaribbeanDollar:"\u6771\u52A0\u52D2\u6BD4\u5143",DominicaPeso:"\u591A\u660E\u5C3C\u52A0\u6BD4\u7D22",RussianRuble:"\u4FC4\u570B\u76E7\u5E03",EritreanNakfa:"\u5384\u5229\u5782\u4E9E\u7D0D\u514B\u6CD5",CFAfranc:"\u975E\u6D32\u91D1\u878D\u5171\u540C\u9AD4\u6CD5\u90CE",PhilippinePeso:"\u83F2\u5F8B\u8CD3\u6BD4\u7D22",FijiDollar:"\u6590\u6FDF\u5143",CapeVerdeEscudo:"\u4F5B\u5F97\u89D2\u57C3\u65AF\u5EAB\u591A",FalklandIslandsPound:"\u798F\u514B\u862D\u7FA4\u5CF6\u938A",GambianDalasi:"\u5CA1\u6BD4\u4E9E\u9054\u62C9\u897F",Congolesefranc:"\u525B\u679C\u6CD5\u90CE",ColombianPeso:"\u54E5\u502B\u6BD4\u4E9E\u6BD4\u7D22",CostaRicanColon:"\u54E5\u65AF\u5927\u9ECE\u52A0\u79D1\u6717",CubanPeso:"\u53E4\u5DF4\u6BD4\u7D22",Cubanconvertiblepeso:"\u53E4\u5DF4\u53EF\u514C\u63DB\u6BD4\u7D22",GuyanaDollar:"\u84CB\u4E9E\u90A3\u5143",KazakhstanTenge:"\u54C8\u85A9\u514B\u5171\u548C\u570B\u5805\u6208",Haitiangourde:"\u6D77\u5730\u53E4\u5FB7",won:"\u97D3\u5143",NetherlandsAntillesGuilder:"\u8377\u5C6C\u5B89\u7684\u5217\u65AF\u76FE",Honduraslempiras:"\u6D2A\u90FD\u62C9\u65AF\u62C9\u502B\u76AE\u62C9",DjiboutiFranc:"\u5409\u5E03\u63D0\u6CD5\u90CE",KyrgyzstanSom:"\u5409\u723E\u5409\u65AF\u65AF\u5766\u7D22\u59C6",GuineaFranc:"\u5E7E\u5167\u4E9E\u6CD5\u90CE",CanadianDollar:"\u52A0\u62FF\u5927\u5143",GhanaianCedi:"\u52A0\u7D0D\u585E\u5730",Cambodianriel:"\u9AD8\u68C9\u745E\u723E",CzechKoruna:"\u6377\u514B\u514B\u6717",ZimbabweDollar:"\u8F9B\u5DF4\u5A01\u5143",QatariRiyal:"\u5361\u5854\u723E\u88E1\u4E9E\u723E",CaymanIslandsDollar:"\u958B\u66FC\u7FA4\u5CF6\u5143",Comorianfranc:"\u79D1\u6469\u7F85\u6CD5\u90CE",KuwaitiDinar:"\u79D1\u5A01\u7279\u7B2C\u7D0D\u723E",CroatianKuna:"\u514B\u7F85\u5730\u4E9E\u5EAB\u7D0D",KenyanShilling:"\u80AF\u96C5\u5148\u4EE4",LesothoLoti:"\u840A\u7D22\u6258\u6D1B\u8482",LaoKip:"\u8001\u64BE\u57FA\u666E",LebanesePound:"\u9ECE\u5DF4\u5AE9\u938A",Lithuanianlitas:"\u7ACB\u9676\u5B9B\u7ACB\u7279",LibyanDinar:"\u5229\u6BD4\u4E9E\u7B2C\u7D0D\u723E",LiberianDollar:"\u5229\u6BD4\u4E9E\u5143",RwandaFranc:"\u76E7\u5B89\u9054\u6CD5\u90CE",RomanianLeu:"\u7F85\u99AC\u5C3C\u4E9E\u5217\u4F0A",MalagasyAriary:"\u99AC\u62C9\u52A0\u897F\u963F\u88CF\u4E9E\u88CF",MaldivianRufiyaa:"\u746A\u5F8B\u5730\u592B\u62C9\u83F2\u4E9E",MalawiKwacha:"\u99AC\u62C9\u5A01\u514B\u74E6\u67E5",MalaysianRinggit:"\u99AC\u4F86\u897F\u4E9E\u6797\u5409\u7279",MacedoniawearingDinar:"\u99AC\u5176\u9813\u6234\u7B2C\u7D0D\u723E",MauritiusRupee:"\u6A21\u88E1\u897F\u65AF\u76E7\u6BD4",MauritanianOuguiya:"\u8305\u5229\u5854\u5C3C\u4E9E\u70CF\u5409\u4E9E",MongolianTugrik:"\u8499\u53E4\u5716\u683C\u88E1\u514B",BangladeshiTaka:"\u5B5F\u52A0\u62C9\u5854\u5361",PeruvianNuevoSol:"\u79D8\u9B6F\u65B0\u7D22\u723E",MyanmarKyat:"\u7DEC\u7538\u958B\u4E9E\u7279",MoldovanLeu:"\u83AB\u723E\u9054\u74E6\u5217\u4F0A",MoroccanDirham:"\u6469\u6D1B\u54E5\u8FEA\u62C9\u59C6",MozambiqueMetical:"\u83AB\u4E09\u6BD4\u514B\u6885\u8482\u5361\u723E",MexicanPeso:"\u58A8\u897F\u54E5\u6BD4\u7D22",NamibianDollar:"\u7D0D\u7C73\u6BD4\u4E9E\u5143",SouthAfricanRand:"\u5357\u975E\u862D\u7279",SouthSudanesePound:"\u5357\u8607\u4E39\u938A",NicaraguaCordoba:"\u5C3C\u52A0\u62C9\u74DC\u79D1\u591A\u5DF4",NepaleseRupee:"\u5C3C\u6CCA\u723E\u76E7\u6BD4",NigerianNaira:"\u5948\u53CA\u5229\u4E9E\u5948\u62C9",NorwegianKrone:"\u632A\u5A01\u514B\u6717",GeorgianLari:"\u55AC\u6CBB\u4E9E\u62C9\u745E",RMBOffshore:"\u4EBA\u6C11\u5E63\uFF08\u96E2\u5CB8\uFF09",SwedishKrona:"\u745E\u5178\u514B\u6717",SwissFranc:"\u745E\u58EB\u6CD5\u90CE",SerbianDinar:"\u585E\u723E\u7DAD\u4E9E\u7B2C\u7D0D\u723E",SierraLeone:"\u585E\u62C9\u91CC\u6602\u5229\u6602",SeychellesRupee:"\u585E\u820C\u8033\u76E7\u6BD4",SaudiRiyal:"\u6C99\u7279\u88E1\u4E9E\u723E",SaoTomeDobra:"\u8056\u591A\u7F8E\u591A\u5E03\u62C9",SaintHelenapound:"\u8056\u8D6B\u502B\u90A3\u7FA4\u5CF6\u78C5",SriLankaRupee:"\u65AF\u91CC\u862D\u5361\u76E7\u6BD4",SwazilandLilangeni:"\u53F2\u74E6\u6FDF\u862D\u88CF\u862D\u5409\u5C3C",SudanesePound:"\u8607\u4E39\u938A",Surinamesedollar:"\u8607\u5229\u5357\u5143",SolomonIslandsDollar:"\u6240\u7F85\u9580\u7FA4\u5CF6\u5143",SomaliShilling:"\u7D22\u99AC\u5229\u4E9E\u5148\u4EE4",TajikistanSomoni:"\u5854\u5409\u514B\u5171\u548C\u570B\u7D22\u83AB\u5C3C",PacificFranc:"\u592A\u5E73\u6D0B\u6CD5\u90CE",ThaiBaht:"\u6CF0\u570B\u9296",TanzanianShilling:"\u5766\u5C1A\u5C3C\u4E9E\u5148\u4EE4",TonganPaanga:"\u6771\u52A0\u6F58\u52A0",TrinidadandTobagoDollar:"\u5343\u88E1\u9054\u6258\u8C9D\u54E5\u5143",TunisianDinar:"\u7A81\u5C3C\u65AF\u7B2C\u7D0D\u723E",TurkishLira:"\u571F\u8033\u5176\u91CC\u62C9",VanuatuVatu:"\u74E6\u52AA\u963F\u5716\u74E6\u5716",GuatemalanQuetzal:"\u74DC\u5730\u99AC\u62C9\u683C\u67E5\u723E",CommissionBolivar:"\u59D4\u5167\u745E\u62C9\u535A\u5229\u74E6",BruneiDollar:"\u6C76\u840A\u5143",UgandanShilling:"\u70CF\u5E72\u9054\u5148\u4EE4",UkrainianHryvnia:"\u70CF\u514B\u862D\u683C\u88E1\u592B\u5C3C\u4E9E",UruguayanPeso:"\u70CF\u62C9\u572D\u6BD4\u7D22",Uzbekistansom:"\u70CF\u8332\u5225\u514B\u8607\u59C6",WesternSamoaTala:"\u85A9\u6469\u4E9E\u5854\u62C9",SingaporeDollar:"\u65B0\u52A0\u5761\u5143",NT:"\u65B0\u81FA\u5E63",NewZealandDollar:"\u65B0\u897F\u862D\u5143",HungarianForint:"\u5308\u7259\u5229\u798F\u6797",SyrianPound:"\u6558\u5229\u4E9E\u938A",JamaicanDollar:"\u7259\u8CB7\u52A0\u5143",ArmenianDram:"\u4E9E\u7F8E\u5C3C\u4E9E\u5FB7\u62C9\u59C6",YemeniRial:"\u8449\u9580\u88E1\u4E9E\u723E",IraqiDinar:"\u4F0A\u62C9\u514B\u7B2C\u7D0D\u723E",IranianRial:"\u4F0A\u6717\u88E1\u4E9E\u723E",NewIsraeliShekel:"\u4EE5\u8272\u5217\u65B0\u8B1D\u514B\u723E",IndianRupee:"\u5370\u5EA6\u76E7\u6BD4",IndonesianRupiah:"\u5370\u5C3C\u76E7\u6BD4",JordanianDinar:"\u7D04\u65E6\u7B2C\u7D0D\u723E",VND:"\u8D8A\u5357\u76FE",ZambianKwacha:"\u5C1A\u6BD4\u4E9E\u514B\u74E6\u67E5",GibraltarPound:"\u76F4\u5E03\u7F85\u9640\u938A",ChileanPeso:"\u667A\u5229\u6BD4\u7D22",CFAFrancBEAC:"\u4E2D\u975E\u91D1\u878D\u5408\u4F5C\u6CD5\u90CE"},defaultFmt:[{text:"\u81EA\u52D5",value:"General",example:""},{text:"\u7D14\u6587\u5B57",value:"@",example:""},{text:"",value:"split",example:""},{text:"\u6578\u4F4D",value:"##0.00",example:"1000.12"},{text:"\u767E\u5206\u6BD4",value:"#0.00%",example:"12.21%"},{text:"\u79D1\u5B78\u8A08\u6578",value:"0.00E+00",example:"1.01E+5"},{text:"",value:"split",example:""},{text:"\u6703\u8A08",value:"\xA5(0.00)",example:"\xA5(1200.09)"},{text:"\u842C\u5143",value:"w",example:"1\u4EBF2000\u4E072500"},{text:"\u8CA8\u5E63",value:"\xA50.00",example:"\xA51200.09"},{text:"\u842C\u51432\u4F4D\u5C0F\u6578",value:"w0.00",example:"2\u4E072500.55"},{text:"",value:"split",example:""},{text:"\u65E5\u671F",value:"yyyy-MM-dd",example:"2017-11-29"},{text:"\u6642\u9593",value:"hh:mm AM/PM",example:"3:00 PM"},{text:"\u6642\u959324H",value:"hh:mm",example:"15:00"},{text:"\u65E5\u671F\u6642\u9593",value:"yyyy-MM-dd hh:mm AM/PM",example:"2017-11-29 3:00 PM"},{text:"\u65E5\u671F\u6642\u959324H",value:"yyyy-MM-dd hh:mm",example:"2017-11-29 15:00"},{text:"",value:"split",example:""},{text:"\u81EA\u5B9A\u7FA9\u683C\u5F0F",value:"fmtOtherSelf",example:"more"}],dateFmtList:[{name:"1930-08-05",value:"yyyy-MM-dd"},{name:"1930/8/5",value:"yyyy/MM/dd"},{name:"1930\u5E748\u67085\u65E5",value:'yyyy"\u5E74"M"\u6708"d"\u65E5"'},{name:"08-05",value:"MM-dd"},{name:"8-5",value:"M-d"},{name:"8\u67085\u65E5",value:'M"\u6708"d"\u65E5"'},{name:"13:30:30",value:"h:mm:ss"},{name:"13:30",value:"h:mm"},{name:"\u4E0B\u534801:30",value:"\u4E0A\u5348/\u4E0B\u5348 hh:mm"},{name:"\u4E0B\u53481:30",value:"\u4E0A\u5348/\u4E0B\u5348 h:mm"},{name:"\u4E0B\u53481:30:30",value:"\u4E0A\u5348/\u4E0B\u5348 h:mm:ss"},{name:"08-05 \u4E0B\u534801:30",value:"MM-dd \u4E0A\u5348/\u4E0B\u5348 hh:mm"}],fontFamily:{MicrosoftYaHei:"Microsoft YaHei"},fontarray:["Times New Roman","Arial","Tahoma","Verdana","\u5FAE\u8EDF\u96C5\u9ED1","\u5B8B\u9AD4","\u9ED1\u9AD4","\u6977\u9AD4","\u4EFF\u5B8B","\u65B0\u5B8B\u9AD4","\u83EF\u6587\u65B0\u9B4F","\u83EF\u6587\u884C\u6977","\u83EF\u6587\u96B8\u66F8"],fontjson:{"times new roman":0,arial:1,tahoma:2,verdana:3,\u5FAE\u8EDF\u96C5\u9ED1:4,"microsoft yahei":4,\u5B8B\u9AD4:5,simsun:5,\u9ED1\u9AD4:6,simhei:6,\u6977\u9AD4:7,kaiti:7,\u4EFF\u5B8B:8,fangsong:8,\u65B0\u5B8B\u9AD4:9,nsimsun:9,\u83EF\u6587\u65B0\u9B4F:10,stxinwei:10,\u83EF\u6587\u884C\u6977:11,stxingkai:11,\u83EF\u6587\u96B8\u66F8:12,stliti:12},border:{borderTop:"\u4E0A\u6846\u7DDA",borderBottom:"\u4E0B\u6846\u7DDA",borderLeft:"\u5DE6\u6846\u7DDA",borderRight:"\u53F3\u6846\u7DDA",borderNone:"\u7121",borderAll:"\u6240\u6709",borderOutside:"\u5916\u5074",borderInside:"\u5167\u5074",borderHorizontal:"\u5167\u5074\u6A6B\u7DDA",borderVertical:"\u5167\u5074\u5206\u9694\u865F",borderColor:"\u908A\u6846\u984F\u8272",borderSize:"\u908A\u6846\u7C97\u7D30"},merge:{mergeAll:"\u5168\u90E8\u5408\u4F75",mergeV:"\u5782\u76F4\u5408\u4F75",mergeH:"\u6C34\u5E73\u5408\u4F75",mergeCancel:"\u53D6\u6D88\u5408\u4F75",overlappingError:"\u4E0D\u80FD\u5408\u4F75\u91CD\u758A\u5340\u57DF",partiallyError:"\u7121\u6CD5\u5C0D\u90E8\u5206\u5408\u4F75\u5132\u5B58\u683C\u57F7\u884C\u6B64\u64CD\u4F5C"},align:{left:"\u5DE6\u5C0D\u9F4A",center:"\u4E2D\u9593\u5C0D\u9F4A",right:"\u53F3\u5C0D\u9F4A",top:"\u9802\u90E8\u5C0D\u9F4A",middle:"\u5C45\u4E2D\u5C0D\u9F4A",bottom:"\u5E95\u90E8\u5C0D\u9F4A"},textWrap:{overflow:"\u6EA2\u51FA",wrap:"\u81EA\u52D5\u63DB\u884C",clip:"\u622A\u65B7"},rotation:{none:"\u7121\u65CB\u8F49",angleup:"\u5411\u4E0A\u50BE\u659C",angledown:"\u5411\u4E0B\u50BE\u659C",vertical:"\u8C4E\u6392\u6587\u5B57",rotationUp:"\u5411\u4E0A90\xB0",rotationDown:"\u5411\u4E0B90\xB0"},freezen:{default:"\u51CD\u7D50\u7B2C\u4E00\u884C",freezenRow:"\u51CD\u7D50\u7B2C\u4E00\u884C",freezenColumn:"\u51CD\u7D50\u7B2CA\u5217",freezenRC:"\u51CD\u7D50\u884C\u5217",freezenRowRange:"\u51CD\u7D50\u884C\u5230\u9078\u5340",freezenColumnRange:"\u51CD\u7D50\u5217\u5230\u9078\u5340",freezenRCRange:"\u51CD\u7D50\u884C\u5217\u5230\u9078\u5340",freezenCancel:"\u53D6\u6D88\u51CD\u7D50",noSeletionError:"\u6CA1\u6709\u9078\u5340",rangeRCOverErrorTitle:"\u51CD\u7D50\u63D0\u9192",rangeRCOverError:"\u51CD\u7D50\u7A97\u683C\u8D85\u904E\u53EF\u898B\u7BC4\u570D\uFF0C\u6703\u5C0E\u81F4\u7121\u6CD5\u6B63\u5E38\u64CD\u4F5C\uFF0C\u8ACB\u91CD\u65B0\u8A2D\u5B9A\u51CD\u7D50\u5340\u57DF\u3002"},sort:{asc:"\u6607\u51AA",desc:"\u964D\u5E8F",custom:"\u81EA\u5B9A\u7FA9\u6392\u5E8F",hasTitle:"\u6578\u64DA\u5177\u6709\u6A19\u984C\u884C",sortBy:"\u6392\u5E8F\u4F9D\u64DA",addOthers:"\u6DFB\u52A0\u5176\u4ED6\u6392\u5E8F\u5217",close:"\u95DC\u9589",confirm:"\u6392\u5E8F",columnOperation:"\u5217",secondaryTitle:"\u6B21\u8981\u6392\u5E8F",sortTitle:"\u6392\u5E8F\u7BC4\u570D",sortRangeTitle:"\u6392\u5E8F\u7BC4\u570D\u5F9E",sortRangeTitleTo:"\u5230",noRangeError:"\u4E0D\u80FD\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C,\u8ACB\u9078\u64C7\u55AE\u500B\u5340\u57DF,\u7136\u5F8C\u518D\u8A66",mergeError:"\u9078\u5340\u6709\u5408\u4F75\u5132\u5B58\u683C,\u7121\u6CD5\u57F7\u884C\u6B64\u64CD\u4F5C\uFF01",columnSortMergeError:"\u5217\u6392\u5E8F\u6703\u64F4\u5C55\u81F3\u6574\u500B\u8868\u683C\u9078\u5340\uFF0C\u9078\u5340\u6709\u5408\u4E26\u55AE\u5143\u683C\uFF0C\u7121\u6CD5\u57F7\u884C\u6B64\u64CD\u4F5C\uFF0C\u8ACB\u9078\u64C7\u529F\u80FD\u6B04\u6392\u5E8F\u529F\u80FD\uFF01"},filter:{filter:"\u7BE9\u9078",clearFilter:"\u6E05\u9664\u7BE9\u9078",sortByAsc:"\u4EE5A-Z\u6607\u51AA\u6392\u5217",sortByDesc:"\u4EE5Z-A\u964D\u5E8F\u6392\u5217",filterByColor:"\u6309\u984F\u8272\u7BE9\u9078",filterByCondition:"\u6309\u689D\u4EF6\u904E\u6FFE",filterByValues:"\u6309\u503C\u904E\u6FFE",filiterInputNone:"\u7121",filiterInputTip:"\u8F38\u5165\u7BE9\u9078\u503C",filiterRangeStart:"\u5F9E",filiterRangeStartTip:"\u7BC4\u570D\u958B\u59CB",filiterRangeEnd:"\u5230",filiterRangeEndTip:"\u7BC4\u570D\u7ED3\u675F",filterValueByAllBtn:"\u5168\u9078",filterValueByClearBtn:"\u6E05\u9664",filterValueByInverseBtn:"\u53CD\u9078",filterValueByTip:"\u6309\u7167\u503C\u9032\u884C\u7BE9\u9078",filterConform:"\u78BA \u8A8D",filterCancel:"\u53D6 \u6D88",conditionNone:"\u7121",conditionCellIsNull:"\u5132\u5B58\u683C\u70BA\u7A7A",conditionCellNotNull:"\u5132\u5B58\u683C\u6709\u6578\u64DA",conditionCellTextContain:"\u6587\u5B57\u5305\u542B",conditionCellTextNotContain:"\u6587\u5B57\u4E0D\u5305\u542B",conditionCellTextStart:"\u6587\u5B57\u958B\u982D\u70BA",conditionCellTextEnd:"\u6587\u5B57\u7D50\u5C3E\u70BA",conditionCellTextEqual:"\u6587\u5B57\u7B49\u65BC",conditionCellDateEqual:"\u65E5\u671F\u7B49\u65BC",conditionCellDateBefore:"\u65E5\u671F\u65E9\u65BC",conditionCellDateAfter:"\u65E5\u671F\u665A\u65BC",conditionCellGreater:"\u5927\u65BC",conditionCellGreaterEqual:"\u5927\u65BC\u7B49\u65BC",conditionCellLess:"\u5C0F\u65BC",conditionCellLessEqual:"\u5C0F\u4E8E\u7B49\u65BC",conditionCellEqual:"\u7B49\u65BC",conditionCellNotEqual:"\u4E0D\u7B49\u65BC",conditionCellBetween:"\u4ECB\u65BC",conditionCellNotBetween:"\u4E0D\u5728\u5176\u4E2D",filiterMoreDataTip:"\u6578\u64DA\u91CF\u5927\uFF01\u8ACB\u7A0D\u5F8C",filiterMonthText:"\u6708",filiterYearText:"\u5E74",filiterByColorTip:"\u6309\u5132\u5B58\u683C\u984F\u8272\u7BE9\u9078",filiterByTextColorTip:"\u6309\u5132\u5B58\u683C\u5B57\u9AD4\u984F\u8272\u7BE9\u9078",filterContainerOneColorTip:"\u672C\u5217\u50C5\u5305\u542B\u4E00\u7A2E\u984F\u8272",filterDateFormatTip:"\u65E5\u671F\u683C\u5F0F",valueBlank:"(\u7A7A\u767D)",mergeError:"\u7BE9\u9078\u9078\u5340\u6709\u5408\u4F75\u5132\u5B58\u683C,\u7121\u6CD5\u57F7\u884C\u6B64\u64CD\u4F5C\uFF01"},rightclick:{copy:"\u8907\u88FD",copyAs:"\u8907\u88FD\u70BA",paste:"\u7C98\u8CBC",insert:"\u63D2\u5165",delete:"\u5220\u9664",deleteCell:"\u5220\u9664\u5132\u5B58\u683C",deleteSelected:"\u5220\u9664\u9078\u4E2D",hide:"\u96B1\u85CF",hideSelected:"\u96B1\u85CF\u9078\u4E2D",showHide:"\u986F\u793A\u96B1\u85CF",to:"\u5411",left:"\u5DE6",right:"\u53F3",top:"\u4E0A",bottom:"\u4E0B",moveLeft:"\u5DE6\u79FB",moveUp:"\u4E0A\u79FB",add:"\u65B0\u589E",row:"\u884C",column:"\u5217",width:"\u5BEC",height:"\u9AD8",number:"\u6578\u4F4D",confirm:"\u78BA\u8A8D",orderAZ:"A-Z\u9806\u5E8F\u6392\u5217",orderZA:"Z-A\u964D\u5E8F\u6392\u5217",clearContent:"\u6E05\u9664\u5167\u5BB9",matrix:"\u77E9\u9663\u64CD\u4F5C\u9078\u5340",sortSelection:"\u6392\u5E8F\u9078\u5340",filterSelection:"\u7BE9\u9078\u9078\u5340",chartGeneration:"\u5716\u8868\u751F\u6210",firstLineTitle:"\u9996\u884C\u70BA\u6A19\u984C",untitled:"\u7121\u6A19\u984C",array1:"\u4E00\u7DAD\u6578\u7D44",array2:"\u4E8C\u7DAD\u9663\u5217",array3:"\u591A\u5143\u6578\u7D44",diagonal:"\u5C0D\u89D2\u7DDA",antiDiagonal:"\u53CD\u5C0D\u89D2\u7DDA",diagonalOffset:"\u5C0D\u89D2\u504F\u79FB",offset:"\u504F\u79FB\u91CF",boolean:"\u5E03\u6797\u503C",flip:"\u7FFB\u8F49",upAndDown:"\u4E0A\u4E0B",leftAndRight:"\u5DE6\u53F3",clockwise:"\u9806\u6642\u91DD",counterclockwise:"\u9006\u6642\u91DD",transpose:"\u8F49\u7F6E",matrixCalculation:"\u77E9\u9663\u8A08\u7B97",plus:"\u52A0",minus:"\u51CF",multiply:"\u4E58",divided:"\u9664",power:"\u6B21\u65B9",root:"\u6B21\u65B9\u6839",log:"log",delete0:"\u5220\u9664\u5169\u7AEF0\u503C",removeDuplicate:"\u5220\u9664\u91CD\u8907\u503C",byRow:"\u6309\u884C",byCol:"\u6309\u5217",generateNewMatrix:"\u751F\u6210\u65B0\u77E9\u9663"},comment:{insert:"\u65B0\u5EFA\u6279\u8A3B",edit:"\u7DE8\u8F2F\u6279\u8A3B",delete:"\u5220\u9664",showOne:"\u986F\u793A/\u96B1\u85CF\u6279\u8A3B",showAll:"\u986F\u793A/\u96B1\u85CF\u6240\u6709\u6279\u8A3B"},screenshot:{screenshotTipNoSelection:"\u8ACB\u6846\u9078\u9700\u8981\u622A\u5716\u7684\u7BC4\u570D",screenshotTipTitle:"\u63D0\u793A\uFF01",screenshotTipHasMerge:"\u7121\u6CD5\u5C0D\u5408\u4F75\u5132\u5B58\u683C\u57F7\u884C\u6B64\u64CD\u4F5C",screenshotTipHasMulti:"\u7121\u6CD5\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C",screenshotTipSuccess:"\u622A\u53D6\u6210\u529F",screenshotImageName:"\u622A\u5716",downLoadClose:"\u95DC\u9589",downLoadCopy:"\u8907\u88FD\u5230\u526A\u5207\u677F",downLoadBtn:"\u4E0B\u8F09",browserNotTip:"\u4E0B\u8F09\u529F\u80FDIE\u700F\u89BD\u5668\u4E0D\u652F\u6301\uFF01",rightclickTip:"\u8ACB\u5728\u5716\u7247\u4E0A\u53F3\u9375\u9EDE\u64CA'\u8907\u88FD'",successTip:"\u5DF2\u6210\u529F\u8907\u88FD\uFF08\u5982\u679C\u7C98\u8CBC\u5931\u6557,\u8ACB\u5728\u5716\u7247\u4E0A\u53F3\u9375\u9EDE\u64CA'\u8907\u88FD\u5716\u7247'\uFF09"},splitText:{splitDelimiters:"\u5206\u5272\u7B26\u865F",splitOther:"\u5176\u5B83",splitContinueSymbol:"\u9023\u7E8C\u5206\u9694\u7B26\u865F\u8996\u70BA\u55AE\u500B\u8655\u7406",splitDataPreview:"\u6578\u64DA\u9810\u89BD",splitTextTitle:"\u6587\u5B57\u5206\u5217",splitConfirmToExe:"\u6B64\u8655\u5DF2\u6709\u6578\u64DA,\u662F\u5426\u66FF\u63DB\u5B83\uFF1F",tipNoMulti:"\u80FD\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C,\u8ACB\u9078\u64C7\u55AE\u500B\u5340\u57DF,\u7136\u5F8C\u518D\u8A66",tipNoMultiColumn:"\u4E00\u6B21\u53EA\u80FD\u8F49\u63DB\u4E00\u5217\u6578\u64DA,\u9078\u5B9A\u5340\u57DF\u53EF\u4EE5\u6709\u591A\u884C,\u4F46\u4E0D\u80FD\u6709\u591A\u5217,\u8ACB\u5728\u9078\u5B9A\u55AE\u5217\u5340\u57DF\u4EE5\u5F8C\u518D\u8A66"},imageText:{imageSetting:"\u5716\u7247\u8A2D\u5B9A",close:"\u95DC\u9589",conventional:"\u5E38\u898F",moveCell1:"\u79FB\u52D5\u4E26\u8ABF\u6574\u5132\u5B58\u683C\u5927\u5C0F",moveCell2:"\u79FB\u52D5\u4E26\u4E14\u4E0D\u8ABF\u6574\u5132\u5B58\u683C\u7684\u5927\u5C0F",moveCell3:"\u4E0D\u8981\u79FB\u52D5\u5132\u5B58\u683C\u4E26\u8ABF\u6574\u5176\u5927\u5C0F",fixedPos:"\u56FA\u5B9A\u4F4D\u7F6E",border:"\u908A\u6846",width:"\u5BEC\u5EA6",radius:"\u534A\u5F91",style:"\u6A23\u5F0F",solid:"\u5BE6\u7DDA",dashed:"\u865B\u7DDA",dotted:"\u9EDE\u72C0",double:"\u96D9\u7DDA",color:"\u984F\u8272"},punctuation:{tab:"Tab \u9375",semicolon:"\u5206\u865F",comma:"\u9017\u865F",space:"\u7A7A\u683C"},findAndReplace:{find:"\u67E5\u627E",replace:"\u66FF\u63DB",goto:"\u8F49\u5230",location:"\u5B9A\u4F4D\u689D\u4EF6",formula:"\u516C\u5F0F",date:"\u65E5\u671F",number:"\u6578\u4F4D",string:"\u5B57\u5143",error:"\u932F\u8AA4",condition:"\u689D\u4EF6\u683C\u5F0F",rowSpan:"\u9593\u9694\u884C",columnSpan:"\u9593\u9694\u5217",locationExample:"\u5B9A\u4F4D",lessTwoRowTip:"\u8ACB\u9078\u64C7\u6700\u5C11\u5169\u884C",lessTwoColumnTip:"\u8ACB\u9078\u64C7\u6700\u5C11\u5169\u884C",findTextbox:"\u67E5\u627E\u5185\u5BB9",replaceTextbox:"\u66FF\u63DB\u5167\u5BB9",regexTextbox:"\u898F\u5247\u904B\u7B97\u5F0F\u5339\u914D",wholeTextbox:"\u6574\u8A5E\u5339\u914D",distinguishTextbox:"\u5340\u5206\u5927\u5C0F\u5BEB\u5339\u914D",allReplaceBtn:"\u5168\u90E8\u66FF\u63DB",replaceBtn:"\u66FF\u63DB",allFindBtn:"\u67E5\u627E\u5168\u90E8",findBtn:"\u67E5\u627E\u4E0B\u4E00\u500B",noFindTip:"\u6C92\u6709\u67E5\u627E\u5230\u8A72\u5167\u5BB9",modeTip:"\u8A72\u6A21\u5F0F\u4E0B\u4E0D\u53EF\u9032\u884C\u6B64\u64CD\u4F5C",searchTargetSheet:"\u5DE5\u4F5C\u8868",searchTargetCell:"\u5132\u5B58\u683C",searchTargetValue:"\u503C",searchInputTip:"\u8ACB\u8F38\u5165\u67E5\u627E\u5167\u5BB9",noReplceTip:"\u6C92\u6709\u53EF\u66FF\u63DB\u7684\u5167\u5BB9",noMatchTip:"\u627E\u4E0D\u5230\u5339\u914D\u9805",successTip:"\u5DF2\u7D93\u5E6B\u60A8\u8490\u7D22\u4E26\u9032\u884C\u4E86${xlength}\u8655\u66FF\u63DB",locationConstant:"\u5E38\u6578",locationFormula:"\u516C\u5F0F",locationDate:"\u65E5\u671F",locationDigital:"\u6578\u4F4D",locationString:"\u5B57\u5143",locationBool:"\u908F\u8F2F\u503C",locationError:"\u932F\u8AA4",locationNull:"\u7A7A\u503C",locationCondition:"\u689D\u4EF6\u683C\u5F0F",locationRowSpan:"\u9593\u9694\u884C",locationColumnSpan:"\u9593\u9694\u5217",locationTiplessTwoRow:"\u8ACB\u9078\u64C7\u6700\u5C11\u5169\u884C",locationTiplessTwoColumn:"\u8ACB\u9078\u64C7\u6700\u5C11\u5169\u5217",locationTipNotFindCell:"\u672A\u627E\u5230\u5132\u5B58\u683C"},sheetconfig:{delete:"\u5220\u9664",copy:"\u8907\u88FD",rename:"\u91CD\u547D\u540D",changeColor:"\u66F4\u6539\u984F\u8272",hide:"\u96B1\u85CF",unhide:"\u53D6\u6D88\u96B1\u85CF",moveLeft:"\u5411\u5DE6\u79FB",moveRight:"\u5411\u53F3\u79FB",resetColor:"\u91CD\u7F6E\u984F\u8272",cancelText:"\u53D6\u6D88",chooseText:"\u78BA\u5B9A\u984F\u8272",tipNameRepeat:"\u7C64\u9801\u7684\u540D\u7A31\u4E0D\u80FD\u91CD\u8907\uFF01\u8ACB\u91CD\u65B0\u4FEE\u6539",noMoreSheet:"\u5DE5\u4F5C\u8584\u5167\u81F3\u5C11\u542B\u6709\u4E00\u5F35\u53EF\u8996\u5DE5\u4F5C\u8868\u3002\u82E5\u9700\u5220\u9664\u9078\u5B9A\u7684\u5DE5\u4F5C\u8868,\u8ACB\u5148\u63D2\u5165\u4E00\u5F35\u65B0\u5DE5\u4F5C\u8868\u6216\u986F\u793A\u4E00\u5F35\u96B1\u85CF\u7684\u5DE5\u4F5C\u8868\u3002\u3002",confirmDelete:"\u662F\u5426\u5220\u9664",redoDelete:"\u53EF\u4EE5\u901A\u904ECtrl+Z\u64A4\u92B7\u5220\u9664",noHide:"\u4E0D\u80FD\u96B1\u85CF,\u81F3\u5C11\u4FDD\u7559\u4E00\u500Bsheet\u6A19\u7C64",chartEditNoOpt:"\u5716\u8868\u7DE8\u8F2F\u6A21\u5F0F\u4E0B\u4E0D\u5141\u8A31\u8A72\u64CD\u4F5C\uFF01",sheetNameSpecCharError:`\u540D\u7A31\u4E0D\u80FD\u5305\u542B:[ ] : ? * / ' "`,sheetNamecannotIsEmptyError:"\u540D\u7A31\u4E0D\u80FD\u70BA\u7A7A"},conditionformat:{conditionformat_greaterThan:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u5927\u65BC",conditionformat_greaterThan_title:"\u70BA\u5927\u65BC\u4EE5\u4E0B\u503C\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_lessThan:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u5C0F\u65BC",conditionformat_lessThan_title:"\u70BA\u5C0F\u65BC\u4EE5\u4E0B\u503C\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_betweenness:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u4ECB\u65BC",conditionformat_betweenness_title:"\u70BA\u4ECB\u65BC\u4EE5\u4E0B\u503C\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_equal:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u7B49\u65BC",conditionformat_equal_title:"\u70BA\u7B49\u65BC\u4EE5\u4E0B\u503C\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_textContains:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u6587\u5B57\u5305\u542B",conditionformat_textContains_title:"\u70BA\u5305\u542B\u4EE5\u4E0B\u6587\u5B57\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_occurrenceDate:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u767C\u751F\u65E5\u671F",conditionformat_occurrenceDate_title:"\u70BA\u5305\u542B\u4EE5\u4E0B\u65E5\u671F\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_duplicateValue:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u91CD\u8907\u503C",conditionformat_duplicateValue_title:"\u70BA\u5305\u542B\u4EE5\u4E0B\u985E\u578B\u503C\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_top10:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u524D10\u9805",conditionformat_top10_percent:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u524D10%",conditionformat_top10_title:"\u70BA\u503C\u6700\u5927\u7684\u90A3\u4E9B\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_last10:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u6700\u5F8C10\u9805",conditionformat_last10_percent:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u6700\u5F8C10%",conditionformat_last10_title:"\u70BA\u503C\u6700\u5C0F\u7684\u90A3\u4E9B\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_AboveAverage:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u9AD8\u65BC\u5E73\u5747\u503C",conditionformat_AboveAverage_title:"\u70BA\u9AD8\u65BC\u5E73\u5747\u503C\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",conditionformat_SubAverage:"\u689D\u4EF6\u683C\u5F0F\u2014\u2014\u4F4E\u65BC\u5E73\u5747\u503C",conditionformat_SubAverage_title:"\u70BA\u4F4E\u65BC\u5E73\u5747\u503C\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",rule:"\u898F\u5247",newRule:"\u65B0\u5EFA\u898F\u5247",editRule:"\u7DE8\u8F2F\u898F\u5247",deleteRule:"\u5220\u9664\u898F\u5247",deleteCellRule:"\u6E05\u9664\u6240\u9078\u5132\u5B58\u683C\u7684\u898F\u5247",deleteSheetRule:"\u6E05\u9664\u6574\u500B\u5DE5\u4F5C\u8868\u7684\u898F\u5247",manageRules:"\u7BA1\u7406\u898F\u5247",showRules:"\u986F\u793A\u5176\u683C\u5F0F\u898F\u5247",highlightCellRules:"\u7A81\u51FA\u986F\u793A\u5132\u5B58\u683C\u898F\u5247",itemSelectionRules:"\u9805\u76EE\u9078\u53D6\u898F\u5247",conditionformatManageRules:"\u689D\u4EF6\u683C\u5F0F\u898F\u5247\u7BA1\u7406\u5668",format:"\u683C\u5F0F",setFormat:"\u8A2D\u5B9A\u683C\u5F0F",setAs:"\u8A2D\u5B9A\u70BA",setAsByArea:"\u91DD\u5C0D\u9078\u5B9A\u5340\u57DF,\u8A2D\u5B9A\u70BA",applyRange:"\u61C9\u7528\u7BC4\u570D",selectRange:"\u9EDE\u64CA\u9078\u64C7\u61C9\u7528\u7BC4\u570D",selectRange_percent:"\u6240\u9078\u7BC4\u570D\u7684\u767E\u5206\u6BD4",selectRange_average:"\u9078\u5B9A\u7BC4\u570D\u7684\u5E73\u5747\u503C",selectRange_value:"\u9078\u5B9A\u7BC4\u570D\u4E2D\u7684\u6578\u503C",pleaseSelectRange:"\u8ACB\u9078\u64C7\u61C9\u7528\u7BC4\u570D",selectDataRange:"\u9EDE\u64CA\u9078\u64C7\u6578\u64DA\u7BC4\u570D",selectCell:"\u9078\u64C7\u5132\u5B58\u683C",pleaseSelectCell:"\u8ACB\u9078\u64C7\u5132\u5B58\u683C",pleaseSelectADate:"\u8ACB\u9078\u64C7\u65E5\u671F",pleaseEnterInteger:"\u8ACB\u8F38\u5165\u4E00\u500B\u4ECB\u65BC1\u548C1000\u4E4B\u9593\u7684\u6574\u6578",onlySingleCell:"\u53EA\u80FD\u5C0D\u55AE\u500B\u5132\u5B58\u683C\u9032\u884C\u5F15\u7528",conditionValueCanOnly:"\u689D\u4EF6\u503C\u53EA\u80FD\u662F\u6578\u4F4D\u6216\u8005\u55AE\u500B\u5132\u5B58\u683C",ruleTypeItem1:"\u57FA\u65BC\u5404\u81EA\u503C\u8A2D\u5B9A\u6240\u6709\u5132\u5B58\u683C\u7684\u683C\u5F0F",ruleTypeItem2:"\u53EA\u70BA\u5305\u542B\u4EE5\u4E0B\u5167\u5BB9\u7684\u5132\u5B58\u683C\u8A2D\u5B9A\u683C\u5F0F",ruleTypeItem2_title:"\u53EA\u70BA\u6EFF\u8DB3\u4EE5\u4E0B\u689D\u4EF6\u7684\u5132\u5B58\u683C",ruleTypeItem3:"\u50C5\u5C0D\u6392\u540D\u9760\u524D\u6216\u9760\u5F8C\u7684\u6578\u503C\u8A2D\u5B9A\u683C\u5F0F",ruleTypeItem3_title:"\u70BA\u4EE5\u4E0B\u6392\u540D\u5167\u7684\u503C",ruleTypeItem4:"\u50C5\u5C0D\u9AD8\u65BC\u6216\u4F4E\u65BC\u5E73\u5747\u503C\u7684\u6578\u503C\u8A2D\u5B9A\u683C\u5F0F",ruleTypeItem4_title:"\u70BA\u6EFF\u8DB3\u4EE5\u4E0B\u689D\u4EF6\u7684\u503C",ruleTypeItem5:"\u50C5\u5C0D\u552F\u4E00\u503C\u6216\u91CD\u8907\u503C\u8A2D\u5B9A\u683C\u5F0F",ruleTypeItem6:"\u4F7F\u7528\u516C\u5F0F\u78BA\u5B9A\u8981\u8A2D\u7F6E\u683C\u5F0F\u7684\u55AE\u5143\u683C",formula:"\u516C\u5F0F",textColor:"\u6587\u5B57\u984F\u8272",cellColor:"\u5132\u5B58\u683C\u984F\u8272",confirm:"\u78BA\u5B9A",confirmColor:"\u78BA\u5B9A\u984F\u8272",cancel:"\u53D6\u6D88",close:"\u95DC\u9589",clearColorSelect:"\u6E05\u9664\u984F\u8272\u9078\u64C7",sheet:"\u9336",currentSheet:"\u7576\u524D\u5DE5\u4F5C\u8868",dataBar:"\u6578\u64DA\u689D",dataBarColor:"\u6578\u64DA\u689D\u984F\u8272",gradientDataBar_1:"\u85CD-\u767D\u6F38\u8B8A\u6578\u64DA\u689D",gradientDataBar_2:"\u7DA0-\u767D\u6F38\u8B8A\u6578\u64DA\u689D",gradientDataBar_3:"\u7D05-\u767D\u6F38\u8B8A\u6578\u64DA\u689D",gradientDataBar_4:"\u67F3\u4E01-\u767D\u6F38\u8B8A\u6578\u64DA\u689D",gradientDataBar_5:"\u6DFA\u85CD-\u767D\u6F38\u8B8A\u6578\u64DA\u689D",gradientDataBar_6:"\u7D2B-\u767D\u6F38\u8B8A\u6578\u64DA\u689D",solidColorDataBar_1:"\u85CD\u8272\u6578\u64DA\u689D",solidColorDataBar_2:"\u7DA0\u8272\u6578\u64DA\u689D",solidColorDataBar_3:"\u7D05\u8272\u6578\u64DA\u689D",solidColorDataBar_4:"\u6A59\u8272\u6578\u64DA\u689D",solidColorDataBar_5:"\u6DFA\u85CD\u8272\u6578\u64DA\u689D",solidColorDataBar_6:"\u7D2B\u8272\u6578\u64DA\u689D",colorGradation:"\u8272\u968E",colorGradation_1:"\u7DA0-\u9EC3-\u7D05\u8272\u968E",colorGradation_2:"\u7D05-\u9EC3-\u7DA0\u8272\u968E",colorGradation_3:"\u7DA0-\u767D-\u7D05\u8272\u968E",colorGradation_4:"\u7D05-\u767D-\u7DA0\u8272\u968E",colorGradation_5:"\u85CD-\u767D-\u7D05\u8272\u968E",colorGradation_6:"\u7D05-\u767D-\u85CD\u8272\u968E",colorGradation_7:"\u767D-\u7D05\u8272\u968E",colorGradation_8:"\u7D05-\u767D\u8272\u968E",colorGradation_9:"\u7DA0-\u767D\u8272\u968E",colorGradation_10:"\u767D-\u7DA0\u8272\u968E",colorGradation_11:"\u7DA0-\u9EC3\u8272\u968E",colorGradation_12:"\u9EC3-\u7DA0\u8272\u968E",icons:"\u5716\u6A19\u96C6",pleaseSelectIcon:"\u8ACB\u9EDE\u64CA\u9078\u64C7\u4E00\u7D44\u5716\u6A19:",cellValue:"\u5132\u5B58\u683C\u503C",specificText:"\u7279\u5B9A\u6587\u5B57",occurrence:"\u767C\u751F\u65E5\u671F",greaterThan:"\u5927\u65BC",lessThan:"\u5C0F\u65BC",between:"\u4ECB\u65BC",equal:"\u7B49\u65BC",in:"\u548C",to:"\u5230",between2:"\u4E4B\u9593",contain:"\u5305\u542B",textContains:"\u6587\u5B57\u5305\u542B",duplicateValue:"\u91CD\u8907\u503C",uniqueValue:"\u552F\u4E00\u503C",top:"\u524D",top10:"\u524D10\u9805",top10_percent:"\u524D10%",last:"\u5F8C",last10:"\u5F8C10\u9805",last10_percent:"\u5F8C10%",oneself:"\u500B",above:"\u9AD8\u65BC",aboveAverage:"\u9AD8\u65BC\u5E73\u5747\u503C",below:"\u4F4E\u65BC",belowAverage:"\u4F4E\u65BC\u5E73\u5747\u503C",all:"\u5168\u90E8",yesterday:"\u6628\u5929",today:"\u4ECA\u5929",tomorrow:"\u660E\u5929",lastWeek:"\u4E0A\u5468",thisWeek:"\u672C\u5468",lastMonth:"\u4E0A\u6708",thisMonth:"\u672C\u6708",lastYear:"\u53BB\u5E74",thisYear:"\u672C\u5E74",last7days:"\u6700\u8FD17\u5929",last30days:"\u6700\u8FD130\u5929",next7days:"\u672A\u4F867\u5929",next30days:"\u672A\u4F8630\u5929",next60days:"\u672A\u4F8660\u5929",chooseRuleType:"\u9078\u64C7\u898F\u5247\u985E\u578B",editRuleDescription:"\u7DE8\u8F2F\u898F\u5247\u8AAA\u660E",newFormatRule:"\u65B0\u5EFA\u683C\u5F0F\u898F\u5247",editFormatRule:"\u7DE8\u8F2F\u683C\u5F0F\u898F\u5247",formatStyle:"\u683C\u5F0F\u6A23\u5F0F",fillType:"\u586B\u5145\u985E\u578B",color:"\u984F\u8272",twocolor:"\u96D9\u8272",tricolor:"\u4E09\u8272",multicolor:"\u5F69\u8272",grayColor:"\u7070\u8272",gradient:"\u6F38\u8B8A",solid:"\u5BE6\u5FC3",maxValue:"\u6700\u5927\u503C",medianValue:"\u4E2D\u9593\u503C",minValue:"\u6700\u5C0F\u503C",direction:"\u65B9\u5411",threeWayArrow:"\u4E09\u5411\u7BAD\u982D",fourWayArrow:"\u56DB\u5411\u7BAD\u982D",fiveWayArrow:"\u4E94\u5411\u7BAD\u982D",threeTriangles:"3\u500B\u4E09\u89D2\u5F62",shape:"\u5F62\u72C0",threeColorTrafficLight:"\u4E09\u8272\u4EA4\u901A\u71C8",fourColorTrafficLight:"\u56DB\u8272\u4EA4\u901A\u71C8",threeSigns:"\u4E09\u6A19\u8A8C",greenRedBlackGradient:"\u7DA0-\u7D05-\u9ED1\u6F38\u8B8A",rimless:"\u7121\u908A\u6846",bordered:"\u6709\u908A\u6846",mark:"\u6A19\u8A18",threeSymbols:"\u4E09\u500B\u7B26\u865F",tricolorFlag:"\u4E09\u8272\u65D7",circled:"\u6709\u5713\u5708",noCircle:"\u7121\u5713\u5708",grade:"\u7B49\u7D1A",grade4:"\u56DB\u7B49\u7D1A",grade5:"\u4E94\u7B49\u7D1A",threeStars:"3\u500B\u661F\u5F62",fiveQuadrantDiagram:"\u4E94\u8C61\u9650\u5716",fiveBoxes:"5\u500B\u6846"},insertLink:{linkText:"\u6587\u5B57",linkType:"\u9023\u7D50\u985E\u578B",external:"\u5916\u90E8\u9023\u7D50",internal:"\u5185\u90E8\u9023\u7D50",linkAddress:"\u9023\u7D50\u5730\u5740",linkSheet:"\u5DE5\u4F5C\u8868",linkCell:"\u5132\u5B58\u683C\u5F15\u7528",linkTooltip:"\u63D0\u793A",placeholder1:"\u8ACB\u8F38\u5165\u7DB2\u9801\u9023\u7D50\u4F4D\u5740",placeholder2:"\u8ACB\u8F38\u5165\u8981\u5F15\u7528\u7684\u5132\u5B58\u683C,\u4F8BA1",placeholder3:"\u8ACB\u8F38\u5165\u63D0\u793A\u5167\u5BB9",tooltipInfo1:"\u8ACB\u8F38\u5165\u6709\u6548\u7684\u9023\u7D50",tooltipInfo2:"\u8ACB\u8F38\u5165\u6B63\u78BA\u7684\u5132\u5B58\u683C\u5F15\u7528"},dataVerification:{cellRange:"\u5132\u5B58\u683C\u7BC4\u570D",selectCellRange:"\u9EDE\u64CA\u9078\u64C7\u5132\u5B58\u683C\u7BC4\u570D",selectCellRange2:"\u8ACB\u9078\u64C7\u5132\u5B58\u683C\u7BC4\u570D",verificationCondition:"\u9A57\u8B49\u689D\u4EF6",allowMultiSelect:"\u662F\u5426\u5141\u8A31\u591A\u9078",dropdown:"\u4E0B\u62C9\u6E05\u55AE",checkbox:"\u6838\u53D6\u65B9\u584A",number:"\u6578\u4F4D",number_integer:"\u6578\u4F4D-\u6574\u6578",number_decimal:"\u6578\u4F4D-\u5C0F\u6578",text_content:"\u6587\u5B57-\u5167\u5BB9",text_length:"\u6587\u5B57-\u9577\u5EA6",date:"\u65E5\u671F",validity:"\u6709\u6548\u6027",placeholder1:"\u8ACB\u8F38\u5165\u9078\u9805,\u4EE5\u82F1\u6587\u9017\u865F\u5206\u9694,\u59821,2,3,4,5",placeholder2:"\u8ACB\u8F38\u5165\u5167\u5BB9",placeholder3:"\u6578\u503C,\u598210",placeholder4:"\u8ACB\u8F38\u5165\u6307\u5B9A\u7684\u6587\u5B57",placeholder5:"\u8ACB\u8F38\u5165\u9078\u4E2D\u5132\u5B58\u683C\u6642\u986F\u793A\u7684\u63D0\u793A\u8A9E",selected:"\u9078\u64C7\u6642",notSelected:"\u672A\u9078\u64C7",between:"\u4ECB\u65BC",notBetween:"\u4E0D\u4ECB\u65BC",equal:"\u7B49\u65BC",notEqualTo:"\u4E0D\u7B49\u65BC",moreThanThe:"\u5927\u65BC",lessThan:"\u5C0F\u65BC",greaterOrEqualTo:"\u5927\u65BC\u7B49\u65BC",lessThanOrEqualTo:"\u5C0F\u65BC\u7B49\u65BC",include:"\u5305\u62EC",exclude:"\u4E0D\u5305\u62EC",earlierThan:"\u65E9\u65BC",noEarlierThan:"\u4E0D\u65E9\u65BC",laterThan:"\u665A\u65BC",noLaterThan:"\u4E0D\u665A\u65BC",identificationNumber:"\u8EAB\u4EFD\u8B49\u865F\u78BC",phoneNumber:"\u624B\u6A5F\u865F",remote:"\u81EA\u52D5\u9060\u7A0B\u7372\u53D6\u9078\u9805",prohibitInput:"\u8F38\u5165\u6578\u64DA\u7121\u6548\u6642\u7981\u6B62\u8F38\u5165",hintShow:"\u9078\u4E2D\u5132\u5B58\u683C\u6642\u986F\u793A\u63D0\u793A\u8A9E",deleteVerification:"\u5220\u9664\u9A57\u8B49",tooltipInfo1:"\u4E0B\u62C9\u6E05\u55AE\u9078\u9805\u4E0D\u53EF\u70BA\u7A7A",tooltipInfo2:"\u6838\u53D6\u65B9\u584A\u5167\u5BB9\u4E0D\u53EF\u70BA\u7A7A",tooltipInfo3:"\u8F38\u5165\u7684\u503C\u4E0D\u662F\u6578\u503C\u985E\u578B",tooltipInfo4:"\u6578\u503C2\u4E0D\u80FD\u5C0F\u65BC\u6578\u503C1",tooltipInfo5:"\u6587\u5B57\u5167\u5BB9\u4E0D\u80FD\u70BA\u7A7A",tooltipInfo6:"\u8F38\u5165\u7684\u503C\u4E0D\u662F\u65E5\u671F\u985E\u578B",tooltipInfo7:"\u65E5\u671F2\u4E0D\u80FD\u5C0F\u65BC\u65E5\u671F1",textlengthInteger:"\u6587\u5B57\u9577\u5EA6\u5FC5\u9808\u662F\u5927\u65BC\u7B49\u65BC0\u7684\u6574\u6578"},formula:{sum:"\u6C42\u548C",average:"\u5E73\u5747\u503C",count:"\u8A08\u6578",max:"\u6700\u5927\u503C",min:"\u6700\u5C0F\u503C",ifGenerate:"if\u516C\u5F0F\u751F\u6210\u5668",find:"\u66F4\u591A\u51FD\u6578",tipNotBelongToIf:"\u8A72\u5132\u5B58\u683C\u51FD\u6578\u4E0D\u5C6C\u65BCif\u516C\u5F0F!",tipSelectCell:"\u8ACB\u9078\u64C7\u5132\u5B58\u683C\u63D2\u5165\u51FD\u6578",ifGenCompareValueTitle:"\u6BD4\u8F83\u503C",ifGenSelectCellTitle:"\u9EDE\u64CA\u9078\u64C7\u5132\u5B58\u683C",ifGenRangeTitle:"\u7BC4\u570D",ifGenRangeTo:"\u81F3",ifGenRangeEvaluate:"\u7BC4\u570D\u8A55\u4F30",ifGenSelectRangeTitle:"\u9EDE\u64CA\u9078\u64C7\u7BC4\u570D",ifGenCutWay:"\u5283\u5206\u7BA1\u9053",ifGenCutSame:"\u5283\u5206\u503C\u76F8\u540C",ifGenCutNpiece:"\u5283\u5206\u4E3AN\u4EFD",ifGenCutCustom:"\u81EA\u5B9A\u7FA9\u8F38\u5165",ifGenCutConfirm:"\u751F\u6210",ifGenTipSelectCell:"\u9078\u64C7\u5132\u5B58\u683C",ifGenTipSelectCellPlace:"\u8ACB\u9078\u64C7\u5132\u5B58\u683C",ifGenTipSelectRange:"\u9078\u64C7\u55AE\u7BC4\u570D",ifGenTipSelectRangePlace:"\u8ACB\u9078\u64C7\u7BC4\u570D",ifGenTipNotNullValue:"\u6BD4\u8F03\u503C\u4E0D\u80FD\u70BA\u7A7A!",ifGenTipLableTitile:"\u6A19\u7C64",ifGenTipRangeNotforNull:"\u7BC4\u570D\u4E0D\u80FD\u70BA\u7A7A!",ifGenTipCutValueNotforNull:"\u5283\u5206\u503C\u4E0D\u80FD\u70BA\u7A7A\uFF01",ifGenTipNotGenCondition:"\u6C92\u6709\u751F\u6210\u53EF\u7528\u7684\u689D\u4EF6\uFF01"},formulaMore:{valueTitle:"\u503C",tipSelectDataRange:"\u9078\u53D6\u6578\u64DA\u7BC4\u570D",tipDataRangeTile:"\u6578\u64DA\u7BC4\u570D",findFunctionTitle:"\u67E5\u627E\u51FD\u6578",tipInputFunctionName:"\u8ACB\u8F38\u5165\u60A8\u8981\u67E5\u627E\u7684\u51FD\u6578\u540D\u7A31\u6216\u51FD\u6578\u529F\u80FD\u7684\u7C21\u8981\u63CF\u8FF0",Array:"\u6578\u7D44",Database:"\u8CC7\u6599\u4F86\u6E90",Date:"\u65E5\u671F",Engineering:"\u5DE5\u7A0B\u8A08\u7B97",Filter:"\u7BE9\u6AA2\u7A0B\u5F0F",Financial:"\u8CA1\u52D9",luckysheet:"Luckysheet\u5167\u5BD8",other:"\u5176\u5B83",Logical:"\u908F\u8F2F",Lookup:"\u67E5\u627E",Math:"\u6578\u5B78",Operator:"\u904B\u7B97\u5B50",Parser:"\u8F49\u63DB\u5DE5\u5177",Statistical:"\u7D71\u8A08",Text:"\u6587\u5B57",dataMining:"\u8CC7\u6599\u6316\u6398",selectFunctionTitle:"\u9078\u64C7\u51FD\u6578",calculationResult:"\u8A08\u7B97\u7D50\u679C",tipSuccessText:"\u6210\u529F",tipParamErrorText:"\u53C3\u6578\u985E\u578B\u932F\u8AA4",helpClose:"\u95DC\u9589",helpCollapse:"\u6536\u8D77",helpExample:"\u793A\u4F8B",helpAbstract:"\u6458\u8981",execfunctionError:'\u63D0\u793A", "\u516C\u5F0F\u5B58\u5728\u932F\u8AA4',execfunctionSelfError:"\u516C\u5F0F\u4E0D\u53EF\u5F15\u7528\u5176\u672C\u8EAB\u7684\u5132\u5B58\u683C",execfunctionSelfErrorResult:"\u516C\u5F0F\u4E0D\u53EF\u5F15\u7528\u5176\u672C\u8EAB\u7684\u5132\u5B58\u683C,\u6703\u5C0E\u81F4\u8A08\u7B97\u7D50\u679C\u4E0D\u6E96\u78BA",allowRepeatText:"\u53EF\u91CD\u8907",allowOptionText:"\u53EF\u9078",selectCategory:"\u6216\u9078\u64C7\u985E\u5225"},drag:{noMerge:"\u7121\u6CD5\u5C0D\u5408\u4F75\u5132\u5B58\u683C\u57F7\u884C\u6B64\u64CD\u4F5C",affectPivot:"\u7121\u6CD5\u5C0D\u6240\u9078\u5132\u5B58\u683C\u9032\u884C\u6B64\u66F4\u6539,\u56E0\u70BA\u5B83\u6703\u5F71\u97FF\u6578\u64DA\u900F\u8996\u9336\uFF01",noMulti:"\u7121\u6CD5\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C,\u8ACB\u9078\u64C7\u55AE\u500B\u5340\u57DF",noPaste:"\u7121\u6CD5\u5728\u6B64\u8655\u7C98\u8CBC\u6B64\u5167\u5BB9,\u8ACB\u9078\u64C7\u7C98\u8CBC\u5340\u57DF\u7684\u4E00\u500B\u5132\u5B58\u683C,\u7136\u5F8C\u518D\u6B21\u5617\u8A66\u7C98\u8CBC",noPartMerge:"\u7121\u6CD5\u5C0D\u90E8\u5206\u5408\u4F75\u5132\u5B58\u683C\u57F7\u884C\u6B64\u64CD\u4F5C",inputCorrect:"\u8ACB\u8F38\u5165\u6B63\u78BA\u7684\u6578\u503C",notLessOne:"\u884C\u5217\u6578\u4E0D\u80FD\u5C0F\u65BC1",offsetColumnLessZero:"\u504F\u79FB\u5217\u4E0D\u80FD\u70BA\u8CA0\u6578\uFF01",pasteMustKeybordAlert:"Copy and paste in the Sheet: Ctrl + C to copy, Ctrl + V to paste, Ctrl + X to cut",pasteMustKeybordAlertHTMLTitle:"Copy and paste in the Sheet",pasteMustKeybordAlertHTML:"<span style='line-height: 1.0;font-size:36px;font-weight: bold;color:#666;'>Ctrl + C</span> to copy<br/><span style='line-height: 1.0;font-size:36px;font-weight: bold;color:#666;'>Ctrl + V</span> to paste<br/><span style='line-height: 1.0;font-size:36px;font-weight: bold;color:#666;'>Ctrl + X</span> to cut"},paste:{warning:"\u63D0\u793A",errorNotAllowMulti:"\u4E0D\u80FD\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C,\u8ACB\u9078\u64C7\u55AE\u500B\u5340\u57DF,\u7136\u5F8C\u518D\u8A66",errorNotAllowMerged:"\u4E0D\u80FD\u5BF9\u5408\u5E76\u5355\u5143\u683C\u505A\u90E8\u5206\u66F4\u6539"},pivotTable:{title:"\u6578\u64DA\u900F\u8996\u9336",closePannel:"\u95DC\u9589",editRange:"\u7DE8\u8F2F\u7BC4\u570D",tipPivotFieldSelected:"\u9078\u64C7\u9700\u8981\u6DFB\u52A0\u5230\u6578\u64DA\u900F\u8996\u9336\u7684\u6B04\u4F4D",tipClearSelectedField:"\u6E05\u9664\u6240\u6709\u5DF2\u9078\u6B04\u4F4D",btnClearSelectedField:"\u6E05\u9664",btnFilter:"\u7BE9\u9078",titleRow:"\u884C",titleColumn:"\u5217",titleValue:"\u6578\u503C",tipShowColumn:"\u7D71\u8A08\u6B04\u4F4D\u986F\u793A\u70BA\u5217",tipShowRow:"\u7D71\u8A08\u6B04\u4F4D\u986F\u793A\u70BA\u884C",titleSelectionDataRange:"\u9078\u53D6\u6578\u64DA\u7BC4\u570D",titleDataRange:"\u6578\u64DA\u7BC4\u570D",valueSum:"\u7E3D\u8A08",valueStatisticsSUM:"\u6C42\u548C",valueStatisticsCOUNT:"\u6578\u503C\u8A08\u6578",valueStatisticsCOUNTA:"\u8A08\u6578",valueStatisticsCOUNTUNIQUE:"\u53BB\u91CD\u8A08\u6578",valueStatisticsAVERAGE:"\u5E73\u5747\u503C",valueStatisticsMAX:"\u6700\u5927\u503C",valueStatisticsMIN:"\u6700\u5C0F\u503C",valueStatisticsMEDIAN:"\u4E2D\u4F4D\u6578",valueStatisticsPRODUCT:"\u4E58\u7A4D",valueStatisticsSTDEV:"\u6A19\u6E96\u5DEE",valueStatisticsSTDEVP:"\u6574\u9AD4\u6A19\u6E96\u5DEE",valueStatisticslet:"\u65B9\u5DEE",valueStatisticsVARP:"\u6574\u9AD4\u65B9\u5DEE",errorNotAllowEdit:"\u975E\u7DE8\u8F2F\u6A21\u5F0F\u4E0B\u7981\u6B62\u8A72\u64CD\u4F5C!",errorNotAllowMulti:"\u4E0D\u80FD\u5C0D\u591A\u91CD\u9078\u64C7\u5340\u57DF\u57F7\u884C\u6B64\u64CD\u4F5C,\u8ACB\u9078\u64C7\u55AE\u500B\u5340\u57DF,\u7136\u5F8C\u518D\u8A66",errorSelectRange:"\u8ACB\u9078\u64C7\u65B0\u5EFA\u900F\u8996\u9336\u7684\u5340\u57DF",errorIsDamage:"\u6B64\u6578\u64DA\u900F\u8996\u9336\u7684\u6E90\u6578\u64DA\u5DF2\u640D\u58DE\uFF01",errorNotAllowPivotData:"\u4E0D\u53EF\u9078\u64C7\u6578\u64DA\u900F\u8996\u9336\u70BA\u6E90\u6578\u64DA!",errorSelectionRange:"\u9078\u64C7\u5931\u6557,\u8F38\u5165\u7BC4\u570D\u932F\u8AA4\uFF01",errorIncreaseRange:"\u8ACB\u64F4\u5927\u9078\u64C7\u7684\u6578\u64DA\u7BC4\u570D!",titleAddColumn:"\u6DFB\u52A0\u5217\u5230\u6578\u64DA\u900F\u8996\u9336",titleMoveColumn:"\u79FB\u52D5\u8A72\u5217\u5230\u4E0B\u65B9\u767D\u6846",titleClearColumnFilter:"\u6E05\u9664\u8A72\u5217\u7684\u7BE9\u9078\u689D\u4EF6",titleFilterColumn:"\u7BE9\u9078\u8A72\u5217",titleSort:"\u6392\u5E8F",titleNoSort:"\u7121\u6392\u5E8F",titleSortAsc:"\u6607\u51AA",titleSortDesc:"\u964D\u5E8F",titleSortBy:"\u6392\u5E8F\u4F9D\u64DA",titleShowSum:"\u986F\u793A\u7E3D\u8A08",titleStasticTrue:"\u662F",titleStasticFalse:"\u5426"},dropCell:{copyCell:"\u8907\u88FD\u5132\u5B58\u683C",sequence:"\u586B\u5145\u5E8F\u5217",onlyFormat:"\u50C5\u586B\u5145\u683C\u5F0F",noFormat:"\u4E0D\u5E36\u683C\u5F0F\u586B\u5145",day:"\u4EE5\u5929\u6578\u586B\u5145",workDay:"\u4EE5\u5DE5\u4F5C\u65E5\u586B\u5145",month:"\u4EE5\u6708\u586B\u5145",year:"\u4EE5\u5E74\u586B\u5145",chineseNumber:"\u4EE5\u4E2D\u6587\u5C0F\u5BEB\u6578\u4F4D\u586B\u5145"},imageCtrl:{borderTile:"\u5716\u7247\u908A\u6846\u984F\u8272\u9078\u64C7",borderCur:"\u7576\u524D\u984F\u8272"},protection:{protectiontTitle:"\u4FDD\u8B77\u5DE5\u4F5C\u8868",enterPassword:"\u8ACB\u8F38\u5165\u5BC6\u78BC\uFF08\u53EF\u7559\u7A7A\uFF09",enterHint:"\u60A8\u8A66\u5716\u66F4\u6539\u7684\u5132\u5B58\u683C\u6216\u5716\u8868\u4F4D\u65BC\u53D7\u4FDD\u8B77\u7684\u5DE5\u4F5C\u8868\u4E2D\u3002\u82E5\u8981\u66F4\u6539,\u8ACB\u53D6\u6D88\u5DE5\u4F5C\u8868\u4FDD\u8B77\u3002\u60A8\u53EF\u80FD\u9700\u8981\u8F38\u5165\u5BC6\u78BC",swichProtectionTip:"\u4FDD\u8B77\u5DE5\u4F5C\u8868\u53CA\u9396\u5B9A\u7684\u5132\u5B58\u683C\u5167\u5BB9",authorityTitle:"\u5141\u8A31\u6B64\u5DE5\u4F5C\u8868\u7684\u7528\u6236\u9032\u884C:",selectLockedCells:"\u5B9A\u9396\u5B9A\u5132\u5B58\u683C",selectunLockedCells:"\u9078\u5B9A\u89E3\u9664\u9396\u5B9A\u7684\u5132\u5B58\u683C",formatCells:"\u8A2D\u5B9A\u5132\u5B58\u683C\u683C\u5F0F",formatColumns:"\u8A2D\u5B9A\u5217\u683C\u5F0F",formatRows:"\u8A2D\u5B9A\u884C\u683C\u5F0F",insertColumns:"\u63D2\u5165\u5217",insertRows:"\u63D2\u5165\u884C",insertHyperlinks:"\u63D2\u5165\u8D85\u9023\u7D50",deleteColumns:"\u5220\u9664\u5217",deleteRows:"\u5220\u9664\u884C",sort:"\u6392\u5E8F",filter:"\u4F7F\u7528\u81EA\u52D5\u7BE9\u9078",usePivotTablereports:"\u4F7F\u7528\u6578\u64DA\u900F\u8996\u9336\u548C\u5831\u8868",editObjects:"\u7DE8\u8F2F\u5C0D\u8C61",editScenarios:"\u7DE8\u8F2F\u65B9\u6848",allowRangeTitle:"\u5141\u8A31\u7528\u6236\u7DE8\u8F2F\u5340\u57DF",allowRangeAdd:"\u65B0\u5EFA...",allowRangeAddTitle:"\u6A19\u984C",allowRangeAddSqrf:"\u5F15\u7528\u5132\u5B58\u683C",selectCellRange:"\u9EDE\u64CA\u9078\u64C7\u5132\u5B58\u683C\u7BC4\u570D",selectCellRangeHolder:"\u8ACB\u8F38\u5165\u5132\u5B58\u683C\u7BC4\u570D",allowRangeAddTitlePassword:"\u5BC6\u78BC",allowRangeAddTitleHint:"\u63D0\u793A",allowRangeAddTitleHintTitle:"\u8A2D\u7F6E\u5BC6\u78BC\u5F8C,\u63D0\u793A\u7528\u6236\u8F38\u5165\u5BC6\u78BC\uFF08\u53EF\u7559\u7A7A\uFF09",allowRangeAddtitleDefault:"\u8ACB\u8F38\u5165\u5340\u57DF\u540D\u7A31",rangeItemDblclick:"\u6309\u5169\u4E0B\u9032\u884C\u7DE8\u8F2F",rangeItemHasPassword:"\u5DF2\u8A2D\u7F6E\u5BC6\u78BC",rangeItemErrorTitleNull:"\u6A19\u984C\u4E0D\u80FD\u70BA\u7A7A",rangeItemErrorRangeNull:"\u5132\u5B58\u683C\u7BC4\u570D\u4E0D\u80FD\u70BA\u7A7A",rangeItemErrorRange:"\u5132\u5B58\u683C\u7BC4\u570D\u683C\u5F0F\u932F\u8AA4",validationTitle:"\u9A57\u8B49\u63D0\u793A",validationTips:"\u9700\u8981\u8F38\u5165\u5BC6\u78BC\u4F86\u64A4\u92B7\u5DE5\u4F5C\u8868\u7684\u4FDD\u8B77",validationInputHint:"\u8ACB\u8F38\u5165\u5BC6\u78BC",checkPasswordNullalert:"\u5BC6\u78BC\u4E0D\u80FD\u70BA\u7A7A!",checkPasswordWrongalert:"\u5BC6\u78BC\u932F\u8AA4,\u8ACB\u91CD\u8A66\uFF01",checkPasswordSucceedalert:"\u89E3\u9396\u6210\u529F,\u53EF\u4EE5\u7DE8\u8F2F\u8A72\u5340\u57DF!",defaultRangeHintText:"\u8A72\u5132\u5B58\u683C\u6B63\u5728\u53D7\u5BC6\u78BC\u4FDD\u8B77",defaultSheetHintText:"\u8A72\u5132\u5B58\u683C\u6216\u5716\u8868\u4F4D\u65BC\u53D7\u4FDD\u8B77\u7684\u5DE5\u4F5C\u8868\u4E2D,\u82E5\u8981\u9032\u884C\u66F4\u6539,\u8ACB\u53D6\u6D88\u5DE5\u4F5C\u8868\u4FDD\u8B77,\u60A8\u53EF\u80FD\u9700\u8981\u8F38\u5165\u5BC6\u78BC\u3002"},cellFormat:{cellFormatTitle:"\u8A2D\u5B9A\u5132\u5B58\u683C\u683C\u5F0F",protection:"\u4FDD\u8B77",locked:"\u9396\u5B9A\u5132\u5B58\u683C",hidden:"\u96B1\u85CF\u516C\u5F0F",protectionTips:"\u53EA\u6709\u4FDD\u8B77\u5DE5\u4F5C\u8868\u529F\u80FD\uFF08\u5728\u529F\u80FD\u8868\u5217\u9EDE\u64CA\u4FDD\u8B77\u5DE5\u4F5C\u8868\u6309\u9215\u9032\u884C\u8A2D\u5B9A\uFF09\u958B\u555F\u5F8C,\u9396\u5B9A\u5132\u5B58\u683C\u6216\u96B1\u85CF\u516C\u5F0F\u624D\u80FD\u751F\u6548",tipsPart:"\u90E8\u5206\u9078\u4E2D",tipsAll:"\u5168\u90E8\u9078\u4E2D",selectionIsNullAlert:"\u8ACB\u9078\u64C7\u4E00\u500B\u7BC4\u570D\uFF01",sheetDataIsNullAlert:"\u6578\u64DA\u70BA\u7A7A\u7121\u6CD5\u8A2D\u5B9A\uFF01"},print:{normalBtn:"\u5E38\u898F\u8996\u5716",layoutBtn:"\u9801\u9762\u4F48\u5C40",pageBtn:"\u5206\u9801\u9810\u89BD",menuItemPrint:"\u5217\u5370(Ctrl+P)",menuItemAreas:"\u5217\u5370\u5340\u57DF",menuItemRows:"\u5217\u5370\u6A19\u984C\u884C",menuItemColumns:"\u5217\u5370\u6A19\u984C\u5217"},edit:{typing:"\u6B63\u5728\u8F38\u5165"},websocket:{success:"WebSocket\u9023\u63A5\u6210\u529F",refresh:"WebSocket\u9023\u63A5\u767C\u751F\u932F\u8AA4,\u8ACB\u5237\u65B0\u9801\u9762\uFF01",wait:"WebSocket\u9023\u63A5\u767C\u751F\u932F\u8AA4,\u8ACB\u8010\u5FC3\u7B49\u5F85\uFF01",close:"WebSocket\u9023\u63A5\u95DC\u9589",contact:"\u670D\u52D9\u5668\u901A\u4FE1\u767C\u751F\u932F\u8AA4,\u8ACB\u5237\u65B0\u9801\u9762\u5F8C\u518D\u8A66,\u5982\u82E5\u4E0D\u884C\u8ACB\u806F\u7CFB\u7BA1\u7406\u54E1\uFF01",support:"\u7576\u524D\u700F\u89BD\u5668\u4E0D\u652F\u6301WebSocket"}}});function Rp(){return ts[h.lang]}var ts,Q,bt=Ie(()=>{hu();du();pu();yu();Xe();ts={en:uu,zh:fu,es:mu,zh_tw:gu};Q=Rp});function vu(){let e=Q().toolbar,n=Q().fontarray,t=Q().defaultFmt,l={undo:`<div class="luckysheet-toolbar-button luckysheet-inline-block disabled" data-tips="${e.undo}" |
| | | id="luckysheet-icon-undo" role="button" style="user-select: none;"> |
| | | <div class="luckysheet-toolbar-button-outer-box luckysheet-inline-block" |
| | | style="user-select: none;"> |
| | |
| | | style="user-select: none;"> |
| | | <div class="luckysheet-color-menu-button-indicator" style="border-bottom-color: rgb(0, 0, 0); user-select: none;"> |
| | | <div class="luckysheet-icon luckysheet-inline-block " style="user-select: none;"> |
| | | <div class="text-color-bar" style="background-color:${fe.defaultTextColor}"></div> |
| | | <div class="text-color-bar" style="background-color:${de.defaultTextColor}"></div> |
| | | <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-text-color iconfont luckysheet-iconfont-wenbenyanse" |
| | | style="user-select: none;"> |
| | | </div> |
| | |
| | | style="user-select: none;"> |
| | | <div class="luckysheet-color-menu-button-indicator" style="border-bottom-color: rgb(255, 255, 255); user-select: none;"> |
| | | <div class="luckysheet-icon luckysheet-inline-block " style="user-select: none;"> |
| | | <div class="text-color-bar" style="background-color:${fe.defaultCellColor}"></div> |
| | | <div class="text-color-bar" style="background-color:${de.defaultCellColor}"></div> |
| | | <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-cell-color iconfont luckysheet-iconfont-tianchong" |
| | | style="user-select: none;"> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div>`},a=fe.showtoolbar,o=fe.showtoolbarConfig,s=['<div class="luckysheet-toolbar-left-theme"></div>'];if(P(o)==="array"){if(!a)return"";let d=0;return o.forEach(function(f,m){if(f==="|"){let g=o[m-1];g!=="|"&&s.push(`<div id="toolbar-separator-${Rn(g)}" class="luckysheet-toolbar-separator luckysheet-inline-block" style="user-select: none;"></div>`)}else s.push(l[f])}),s.join("")}let u=Fr.reduce(function(d,f){return f!=="|"&&(d[f]=!0),d},{});if(!a)for(let d in u)u[d]=!1;JSON.stringify(o)!=="{}"&&(o.hasOwnProperty("undoRedo")&&(u.undo=u.redo=o.undoRedo),Object.assign(u,o));for(let d=0;d<Fr.length;d++){let f=Fr[d];if(!u[f]&&f!=="|"){Fr[d+1]==="|"&&d++;continue}if(f==="|"){let m=Fr[d-1];m!=="|"&&s.push(`<div id="toolbar-separator-${Rn(m)}" class="luckysheet-toolbar-separator luckysheet-inline-block" style="user-select: none;"></div>`)}else s.push(l[f])}return s.join("")}var Fr,ls,rs=Ie(()=>{bt();xl();dt();Fr=["undo","redo","paintFormat","|","currencyFormat","percentageFormat","numberIncrease","numberDecrease","moreFormats","|","font","|","fontSize","|","bold","italic","strikethrough","underline","textColor","|","fillColor","border","mergeCell","|","horizontalAlignMode","verticalAlignMode","textWrapMode","textRotateMode","|","image","link","chart","postil","pivotTable","|","function","frozenMode","sortAndFilter","conditionalFormat","dataVerification","splitColumn","screenshot","findAndReplace","protection","print"],ls={undo:"#luckysheet-icon-undo",redo:"#luckysheet-icon-redo",paintFormat:["#luckysheet-icon-paintformat"],currencyFormat:"#luckysheet-icon-currency",percentageFormat:"#luckysheet-icon-percent",numberDecrease:"#luckysheet-icon-fmt-decimal-decrease",numberIncrease:"#luckysheet-icon-fmt-decimal-increase",moreFormats:"#luckysheet-icon-fmt-other",font:"#luckysheet-icon-font-family",fontSize:"#luckysheet-icon-font-size",bold:"#luckysheet-icon-bold",italic:"#luckysheet-icon-italic",strikethrough:"#luckysheet-icon-strikethrough",underline:"#luckysheet-icon-underline",textColor:["#luckysheet-icon-text-color","#luckysheet-icon-text-color-menu"],fillColor:["#luckysheet-icon-cell-color","#luckysheet-icon-cell-color-menu"],border:["#luckysheet-icon-border-all","#luckysheet-icon-border-menu"],mergeCell:["#luckysheet-icon-merge-button","#luckysheet-icon-merge-menu"],horizontalAlignMode:["#luckysheet-icon-align","#luckysheet-icon-align-menu"],verticalAlignMode:["#luckysheet-icon-valign","#luckysheet-icon-valign-menu"],textWrapMode:["#luckysheet-icon-textwrap","#luckysheet-icon-textwrap-menu"],textRotateMode:["#luckysheet-icon-rotation","#luckysheet-icon-rotation-menu"],image:"#luckysheet-insertImg-btn-title",link:"#luckysheet-insertLink-btn-title",chart:"#luckysheet-chart-btn-title",postil:"#luckysheet-icon-postil",pivotTable:["#luckysheet-pivot-btn-title"],function:["#luckysheet-icon-function","#luckysheet-icon-function-menu"],frozenMode:["#luckysheet-freezen-btn-horizontal","#luckysheet-icon-freezen-menu"],sortAndFilter:"#luckysheet-icon-autofilter",conditionalFormat:"#luckysheet-icon-conditionformat",dataVerification:"#luckysheet-dataVerification-btn-title",splitColumn:"#luckysheet-splitColumn-btn-title",screenshot:"#luckysheet-chart-btn-screenshot",findAndReplace:"#luckysheet-icon-seachmore",protection:"#luckysheet-icon-protection",print:"#luckysheet-icon-print"}});function xu(){let e=Q(),n=e.rightclick,t=e.toolbar,l=Mp(),a=!0;!l.insertRow&&!l.insertColumn&&!l.deleteRow&&!l.deleteColumn&&!l.deleteCell&&(a=!1);let o=!0;!l.clear&&!l.matrix&&!l.sort&&!l.filter&&!l.chart&&!l.image&&!l.link&&!l.data&&!l.cellFormat&&(o=!1);let s=(l.customs||[]).map((d,f)=>` |
| | | <div data-index="${f}" class="luckysheetColsRowsHandleAdd_custom luckysheet-cols-menuitem luckysheet-mousedown-cancel"> |
| | | </div>`},a=de.showtoolbar,o=de.showtoolbarConfig,s=['<div class="luckysheet-toolbar-left-theme"></div>'];if(P(o)==="array"){if(!a)return"";let f=0;return o.forEach(function(d,m){if(d==="|"){let g=o[m-1];g!=="|"&&s.push(`<div id="toolbar-separator-${Rn(g)}" class="luckysheet-toolbar-separator luckysheet-inline-block" style="user-select: none;"></div>`)}else s.push(l[d])}),s.join("")}let u=Fr.reduce(function(f,d){return d!=="|"&&(f[d]=!0),f},{});if(!a)for(let f in u)u[f]=!1;JSON.stringify(o)!=="{}"&&(o.hasOwnProperty("undoRedo")&&(u.undo=u.redo=o.undoRedo),Object.assign(u,o));for(let f=0;f<Fr.length;f++){let d=Fr[f];if(!u[d]&&d!=="|"){Fr[f+1]==="|"&&f++;continue}if(d==="|"){let m=Fr[f-1];m!=="|"&&s.push(`<div id="toolbar-separator-${Rn(m)}" class="luckysheet-toolbar-separator luckysheet-inline-block" style="user-select: none;"></div>`)}else s.push(l[d])}return s.join("")}var Fr,ls,rs=Ie(()=>{bt();xl();ft();Fr=["undo","redo","paintFormat","|","currencyFormat","percentageFormat","numberIncrease","numberDecrease","moreFormats","|","font","|","fontSize","|","bold","italic","strikethrough","underline","textColor","|","fillColor","border","mergeCell","|","horizontalAlignMode","verticalAlignMode","textWrapMode","textRotateMode","|","image","link","chart","postil","pivotTable","|","function","frozenMode","sortAndFilter","conditionalFormat","dataVerification","splitColumn","screenshot","findAndReplace","protection","print"],ls={undo:"#luckysheet-icon-undo",redo:"#luckysheet-icon-redo",paintFormat:["#luckysheet-icon-paintformat"],currencyFormat:"#luckysheet-icon-currency",percentageFormat:"#luckysheet-icon-percent",numberDecrease:"#luckysheet-icon-fmt-decimal-decrease",numberIncrease:"#luckysheet-icon-fmt-decimal-increase",moreFormats:"#luckysheet-icon-fmt-other",font:"#luckysheet-icon-font-family",fontSize:"#luckysheet-icon-font-size",bold:"#luckysheet-icon-bold",italic:"#luckysheet-icon-italic",strikethrough:"#luckysheet-icon-strikethrough",underline:"#luckysheet-icon-underline",textColor:["#luckysheet-icon-text-color","#luckysheet-icon-text-color-menu"],fillColor:["#luckysheet-icon-cell-color","#luckysheet-icon-cell-color-menu"],border:["#luckysheet-icon-border-all","#luckysheet-icon-border-menu"],mergeCell:["#luckysheet-icon-merge-button","#luckysheet-icon-merge-menu"],horizontalAlignMode:["#luckysheet-icon-align","#luckysheet-icon-align-menu"],verticalAlignMode:["#luckysheet-icon-valign","#luckysheet-icon-valign-menu"],textWrapMode:["#luckysheet-icon-textwrap","#luckysheet-icon-textwrap-menu"],textRotateMode:["#luckysheet-icon-rotation","#luckysheet-icon-rotation-menu"],image:"#luckysheet-insertImg-btn-title",link:"#luckysheet-insertLink-btn-title",chart:"#luckysheet-chart-btn-title",postil:"#luckysheet-icon-postil",pivotTable:["#luckysheet-pivot-btn-title"],function:["#luckysheet-icon-function","#luckysheet-icon-function-menu"],frozenMode:["#luckysheet-freezen-btn-horizontal","#luckysheet-icon-freezen-menu"],sortAndFilter:"#luckysheet-icon-autofilter",conditionalFormat:"#luckysheet-icon-conditionformat",dataVerification:"#luckysheet-dataVerification-btn-title",splitColumn:"#luckysheet-splitColumn-btn-title",screenshot:"#luckysheet-chart-btn-screenshot",findAndReplace:"#luckysheet-icon-seachmore",protection:"#luckysheet-icon-protection",print:"#luckysheet-icon-print"}});function xu(){let e=Q(),n=e.rightclick,t=e.toolbar,l=Mp(),a=!0;!l.insertRow&&!l.insertColumn&&!l.deleteRow&&!l.deleteColumn&&!l.deleteCell&&(a=!1);let o=!0;!l.clear&&!l.matrix&&!l.sort&&!l.filter&&!l.chart&&!l.image&&!l.link&&!l.data&&!l.cellFormat&&(o=!1);let s=(l.customs||[]).map((f,d)=>` |
| | | <div data-index="${d}" class="luckysheetColsRowsHandleAdd_custom luckysheet-cols-menuitem luckysheet-mousedown-cancel"> |
| | | <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> |
| | | ${d.title} |
| | | ${f.title} |
| | | </div> |
| | | </div>`).join("");return`<div id="luckysheet-rightclick-menu" class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-mousedown-cancel"> |
| | | <div id="luckysheet-copy-btn" class="luckysheet-cols-menuitem luckysheet-mousedown-cancel luckysheet-copy-btn" data-clipboard-action="copy" data-clipboard-target="#luckysheet-copy-content" style="display:${l.copy?"block":"none"};"> |
| | |
| | | </div> |
| | | </div>`}function Gi(){let n=Q().filter;return`<div class="luckysheet-cols-menu luckysheet-mousedown-cancel luckysheet-filter-menu" id="luckysheet-\${menuid}-menu"><div id="luckysheet-\${menuid}-orderby-asc" class="luckysheet-cols-menuitem luckysheet-mousedown-cancel"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.sortByAsc}</div></div><div id="luckysheet-\${menuid}-orderby-desc" class="luckysheet-cols-menuitem luckysheet-mousedown-cancel"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"><div style="width:205px;" class="luckysheet-mousedown-cancel">${n.sortByDesc}</div></div></div> <div class="luckysheet-menuseparator luckysheet-mousedown-cancel" role="separator"></div><div id="luckysheet-\${menuid}-orderby-color" class="luckysheet-cols-menuitem luckysheet-cols-submenu luckysheet-mousedown-cancel"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="position: relative;">${n.filterByColor}<span class="luckysheet-submenu-arrow iconfont luckysheet-iconfont-youjiantou" style="user-select: none;right: 0;"></span></div></div><div class="luckysheet-menuseparator luckysheet-mousedown-cancel" role="separator"></div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" id="luckysheet-\${menuid}-bycondition" style="padding-top:0px;padding-bottom:0px;"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"><i class="fa fa-caret-right" aria-hidden="true"></i> ${n.filterByCondition}</div></div> <div class="luckysheet-\${menuid}-bycondition" style="display:none;"><div class="luckysheet-flat-menu-button luckysheet-mousedown-cancel" id="luckysheet-\${menuid}-selected"><span class="luckysheet-mousedown-cancel" data-value="null" data-type="0">${n.filiterInputNone}</span><div class="luckysheet-mousedown-cancel"><i class="fa fa-sort" aria-hidden="true"></i></div></div><div class="luckysheet-\${menuid}-selected-input"><input type="text" placeholder="${n.filiterInputTip}" class="luckysheet-mousedown-cancel" /></div><div class="luckysheet-\${menuid}-selected-input luckysheet-\${menuid}-selected-input2"><span>${n.filiterRangeStart}</span><input type="text" placeholder="${n.filiterRangeStartTip}" class="luckysheet-mousedown-cancel" /><span>${n.filiterRangeEnd}</span><input type="text" placeholder="${n.filiterRangeEndTip}" class="luckysheet-mousedown-cancel" /></div></div> <div class="luckysheet-menuseparator luckysheet-mousedown-cancel" role="separator"></div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" id="luckysheet-\${menuid}-byvalue" style="padding-top:0px;padding-bottom:0px;"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"><i class="fa fa-caret-right" aria-hidden="true"></i> ${n.filterByValues}</div></div> <div class="luckysheet-\${menuid}-byvalue"><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel luckysheet-mousedown-\${menuid}-byvalue-btn"><span id="luckysheet-\${menuid}-byvalue-btn-all" class="luckysheet-mousedown-cancel">${n.filterValueByAllBtn}</span> - <span id="luckysheet-\${menuid}-byvalue-btn-clear" class="luckysheet-mousedown-cancel">${n.filterValueByClearBtn}</span> - <span id="luckysheet-\${menuid}-byvalue-btn-contra" class="luckysheet-mousedown-cancel">${n.filterValueByInverseBtn}</span> <div><i class="fa fa-\${menuid} luckysheet-mousedown-cancel" aria-hidden="true"></i></div></div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" style="padding-left:3px; padding-right:3px;"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"><input type="text" placeholder="${n.filterValueByTip}" class="luckysheet-mousedown-cancel" id="luckysheet-\${menuid}-byvalue-input" /><div class="luckysheet-\${menuid}-byvalue-input-icon luckysheet-mousedown-cancel"><i class="fa fa-search luckysheet-mousedown-cancel" aria-hidden="true"></i></div></div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel"><div id="luckysheet-\${menuid}-byvalue-select" class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"></div></div></div> <div class="luckysheet-menuseparator luckysheet-mousedown-cancel" role="separator"></div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"><div class="btn btn-primary luckysheet-mousedown-cancel" id="luckysheet-\${menuid}-confirm">${n.filterConform}</div> <div class="btn btn-default luckysheet-mousedown-cancel" id="luckysheet-\${menuid}-cancel">${n.filterCancel}</div> <div class="btn btn-danger luckysheet-mousedown-cancel" id="luckysheet-\${menuid}-initial">${n.clearFilter}</div></div></div> </div>`}function Wi(){let n=Q().filter;return`<div style="z-index:1004;overflow-y:auto;" class="luckysheet-filter-submenu luckysheet-cols-menu luckysheet-mousedown-cancel" id="luckysheet-\${menuid}-submenu"><div data-value="null" data-type="0" class="luckysheet-cols-menuitem luckysheet-mousedown-cancel"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionNone}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="cellnull" data-type="0"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellIsNull}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="cellnonull" data-type="0"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellNotNull}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="textinclude"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellTextContain}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="textnotinclude"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellTextNotContain}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="textstart"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellTextStart}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="textend"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellTextEnd}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="textequal"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellTextEqual}</div></div> <div class="luckysheet-menuseparator luckysheet-mousedown-cancel" role="separator"></div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="dateequal"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellDateEqual}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="datelessthan"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellDateBefore}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="datemorethan"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellDateAfter}</div></div> <div class="luckysheet-menuseparator luckysheet-mousedown-cancel" role="separator"></div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="morethan"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellGreater}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="moreequalthan"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellGreaterEqual}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="lessthan"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellLess}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="lessequalthan"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellLessEqual}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="equal"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellEqual}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="noequal"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellNotEqual}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="include" data-type="2"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellBetween}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-value="noinclude" data-type="2"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${n.conditionCellNotBetween}</div></div> </div>`}function Mu(){let e=Q(),n=e.alternatingColors,t=e.toolbar;return'<div id="luckysheet-modal-dialog-slider-alternateformat" class="luckysheet-modal-dialog-slider luckysheet-modal-dialog-slider-alternateformat" style="display: block;"><div class="luckysheet-modal-dialog-slider-title"><span>'+t.alternatingColors+'</span><span class="luckysheet-model-close-btn" title="'+n.close+'"><i class="fa fa-times" aria-hidden="true"></i></span></div><div class="luckysheet-modal-dialog-slider-content"><div class="textTitle">'+n.applyRange+'</div><div id="luckysheet-alternateformat-range"><input class="formulaInputFocus" placeholder="'+n.selectRange+'"/><i class="fa fa-table" aria-hidden="true"></i></div><div id="luckysheet-alternateformat-checkbox"><div class="cf"><input type="checkbox" id="luckysheet-alternateformat-rowHeader"/><label for="luckysheet-alternateformat-rowHeader">'+n.header+'</label></div><div class="cf"><input type="checkbox" id="luckysheet-alternateformat-rowFooter"/><label for="luckysheet-alternateformat-rowFooter">'+n.footer+'</label></div></div><div class="textTitle">'+n.textTitle+'</div><div id="luckysheet-alternateformat-modelList" class="cf"></div><div class="textTitle">'+n.custom+'</div><div id="luckysheet-alternateformat-modelCustom" class="cf"></div><div id="luckysheet-alternateformat-modelToning"><div class="toningbox header"><div class="toningShow"> '+n.header+' </div><div class="luckysheet-color-menu-button-indicator" title="'+n.selectionTextColor+'" style="border-bottom-color: #000;margin-right: 10px;"> <div class="luckysheet-icon luckysheet-inline-block"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-text-color" style="user-select: none;"> </div> </div> </div><div class="luckysheet-color-menu-button-indicator" title="'+n.selectionCellColor+'" style="border-bottom-color: #fff;"> <div class="luckysheet-icon luckysheet-inline-block"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-cell-color" style="user-select: none;"> </div> </div> </div></div><div class="toningbox ctOne"><div class="toningShow"> '+n.colorShow+'1 </div><div class="luckysheet-color-menu-button-indicator" title="'+n.selectionTextColor+'" style="border-bottom-color: #000;margin-right: 10px;"> <div class="luckysheet-icon luckysheet-inline-block"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-text-color" style="user-select: none;"> </div> </div> </div><div class="luckysheet-color-menu-button-indicator" title="'+n.selectionCellColor+'" style="border-bottom-color: #fff;"> <div class="luckysheet-icon luckysheet-inline-block"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-cell-color" style="user-select: none;"> </div> </div> </div></div><div class="toningbox ctTwo"><div class="toningShow"> '+n.colorShow+'2 </div><div class="luckysheet-color-menu-button-indicator" title="'+n.selectionTextColor+'" style="border-bottom-color: #000;margin-right: 10px;"> <div class="luckysheet-icon luckysheet-inline-block"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-text-color" style="user-select: none;"> </div> </div> </div><div class="luckysheet-color-menu-button-indicator" title="'+n.selectionCellColor+'" style="border-bottom-color: #fff;"> <div class="luckysheet-icon luckysheet-inline-block"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-cell-color" style="user-select: none;"> </div> </div> </div></div><div class="toningbox footer"><div class="toningShow"> '+n.footer+' </div><div class="luckysheet-color-menu-button-indicator" title="'+n.selectionTextColor+'" style="border-bottom-color: #000;margin-right: 10px;"> <div class="luckysheet-icon luckysheet-inline-block"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-text-color" style="user-select: none;"> </div> </div> </div><div class="luckysheet-color-menu-button-indicator" title="'+n.selectionCellColor+'" style="border-bottom-color: #fff;"> <div class="luckysheet-icon luckysheet-inline-block"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-cell-color" style="user-select: none;"> </div> </div> </div></div></div><button id="luckysheet-alternateformat-remove" class="btn btn-default" style="margin: 10px;">'+n.removeColor+"</button></div></div>"}function Nu(){return vu()}function Ap(){let n=Q().info,t={enable:!0,image:()=>`<svg viewBox="25 25 50 50" class="circular"> |
| | | <circle cx="50" cy="50" r="20" fill="none"></circle> |
| | | </svg>`,text:n.loading,viewBox:"32 32 64 64",imageClass:"",textClass:"",customClass:""};return JSON.stringify(fe.loading)!=="{}"&&Object.assign(t,fe.loading),t}function Mp(){let e={copy:!0,copyAs:!0,paste:!0,insertRow:!0,insertColumn:!0,deleteRow:!0,deleteColumn:!0,deleteCell:!0,hideRow:!0,hideColumn:!0,rowHeight:!0,columnWidth:!0,clear:!0,matrix:!0,sort:!0,filter:!0,chart:!0,image:!0,link:!0,data:!0,cellFormat:!0};return JSON.stringify(fe.cellRightClickConfig)!=="{}"&&Object.assign(e,fe.cellRightClickConfig),fe.cellRightClickConfig=e,e}function Fp(){let e={delete:!0,copy:!0,rename:!0,color:!0,hide:!0,move:!0};return JSON.stringify(fe.sheetRightClickConfig)!=="{}"&&Object.assign(e,fe.sheetRightClickConfig),fe.sheetRightClickConfig=e,e}var bu,ku,wu,_u,Cu,Ql,Tu,Su,$u,Iu,ft,Ru,Du,Fu,Eu,Dp,Er,Yl,it,Sl,Zn,wa,Jr,Gt=Ie(()=>{bt();Xe();xl();dt();rs();bu=function(){let e=Q(),n=e.info,t=e.print,l=fe.userInfo===!0?'<i style="font-size:16px;color:#ff6a00;" class="fa fa-taxi" aria-hidden="true"></i> Lucky':fe.userInfo;return`<div class="luckysheet"> |
| | | </svg>`,text:n.loading,viewBox:"32 32 64 64",imageClass:"",textClass:"",customClass:""};return JSON.stringify(de.loading)!=="{}"&&Object.assign(t,de.loading),t}function Mp(){let e={copy:!0,copyAs:!0,paste:!0,insertRow:!0,insertColumn:!0,deleteRow:!0,deleteColumn:!0,deleteCell:!0,hideRow:!0,hideColumn:!0,rowHeight:!0,columnWidth:!0,clear:!0,matrix:!0,sort:!0,filter:!0,chart:!0,image:!0,link:!0,data:!0,cellFormat:!0};return JSON.stringify(de.cellRightClickConfig)!=="{}"&&Object.assign(e,de.cellRightClickConfig),de.cellRightClickConfig=e,e}function Fp(){let e={delete:!0,copy:!0,rename:!0,color:!0,hide:!0,move:!0};return JSON.stringify(de.sheetRightClickConfig)!=="{}"&&Object.assign(e,de.sheetRightClickConfig),de.sheetRightClickConfig=e,e}var bu,ku,wu,_u,Cu,Ql,Tu,Su,$u,Iu,dt,Ru,Du,Fu,Eu,Dp,Er,Yl,it,Sl,Zn,wa,Jr,Gt=Ie(()=>{bt();Xe();xl();ft();rs();bu=function(){let e=Q(),n=e.info,t=e.print,l=de.userInfo===!0?'<i style="font-size:16px;color:#ff6a00;" class="fa fa-taxi" aria-hidden="true"></i> Lucky':de.userInfo;return`<div class="luckysheet"> |
| | | <canvas id="luckysheetTableContentF" style="display:none;" class="luckysheetTableContent"></canvas> |
| | | <div class="luckysheet-work-area luckysheet-noselected-text"> |
| | | <div id ="luckysheet_info_detail" class="luckysheet_info_detail"> |
| | |
| | | <div id="luckysheet-copy-content" contenteditable="true"></div> |
| | | <input id="luckysheet-copy-btn" type="button" data-clipboard-target="luckysheet-copy-content"> |
| | | <div id="testdpidiv" style="height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"></div> |
| | | </div>`},ku='<div id="luckysheet-cell-flow_${index}" class="luckysheet-cell-flow luckysheetsheetchange" style="width:${width}px;"><div class="luckysheet-cell-flow-clip"><div class="luckysheet-grdblkpush"></div>${flow}</div></div>',wu="";_u=function(){let n=Q().pivotTable;return'<div class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-mousedown-cancel" id="luckysheet-pivotTable-config-option"> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <div class="luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.titleSort+'</span> <select class="luckysheet-mousedown-cancel" style="height:24px;" id="luckysheet-pivotTable-config-option-order"> <option selected="selected" value="default">'+n.titleNoSort+'</option> <option value="asc">'+n.titleSortAsc+'</option> <option value="desc">'+n.titleSortDesc+'</option> </select> </div> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <div class="luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.titleSortBy+'</span> <select class="luckysheet-mousedown-cancel" style="height:24px;" id="luckysheet-pivotTable-config-option-orderby"> </select> </div> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <div class="luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.titleShowSum+'</span> <select class="luckysheet-mousedown-cancel" style="height:24px;" id="luckysheet-pivotTable-config-option-stastic"> <option value="0">'+n.titleStasticFalse+'</option> <option value="1" selected="selected">'+n.titleStasticTrue+"</option> </select> </div> </div> </div> </div>"},Cu=function(){let n=Q().pivotTable;return'<div class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-mousedown-cancel" id="luckysheet-pivotTable-config-option-sumtype"> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="SUM"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsSUM+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="COUNT"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsCOUNT+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="COUNTA"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsCOUNTA+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="COUNTUNIQUE"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsCOUNTUNIQUE+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="AVERAGE"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsAVERAGE+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="MAX"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsMAX+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="MIN"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsMIN+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="MEDIAN"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsMEDIAN+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="PRODUCT"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsPRODUCT+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="STDEV"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsSTDEV+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="STDEVP"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsSTDEVP+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="VAR"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticslet+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="VARP"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsVARP+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> </div>'},Ql='<div style="${style}" id="luckysheet-sheets-item${index}" data-index="${index}" class="luckysheet-sheets-item ${active}"><span class="luckysheet-sheets-item-name" spellcheck ="false" contenteditable="false">${name}</span> <span class="luckysheet-sheets-item-menu luckysheet-mousedown-cancel"><i class="fa fa-sort-desc luckysheet-mousedown-cancel"></i></span>${colorset}</div>',Tu='<div class="luckysheet-cols-h-cells luckysheetsheetchange" id="luckysheet-cols-h-cells_${index}" style="width:${width}px;"> <div class="luckysheet-cols-h-cells-c"> <div class="luckysheet-grdblkpush"></div>${column}</div></div>',Su='<div class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-mousedown-cancel" id="luckysheet-sheet-list">${item}</div>',$u='<div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" id="luckysheet-sheet-btn${index}" data-index="${index}"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="${style}" ><span class="icon luckysheet-mousedown-cancel">${icon}</span>${name}</div></div>',Iu='<div dir="ltr"><div class="luckysheet-input-box-index" id="luckysheet-input-box-index"></div><div id="luckysheet-input-box" spellcheck="false" aria-hidden="false" class="luckysheet-input-box"><div class="luckysheet-cell-input editable" tabindex="0" role="combobox" contenteditable="true" id="luckysheet-rich-text-editor" dir="ltr" g_editable="true" aria-autocomplete="list"></div></div></div>',ft='<div id="${id}" style="${style}" class="luckysheet-modal-dialog ${addclass}" tabindex="0" role="dialog" aria-labelledby=":41e" dir="ltr"> <div class="luckysheet-modal-dialog-title luckysheet-modal-dialog-title-draggable"> <span class="luckysheet-modal-dialog-title-text" role="heading">${title}</span> <span class="luckysheet-modal-dialog-title-close" role="button" tabindex="0" aria-label="${close}"><i class="fa fa-times" aria-hidden="true"></i></span> </div> <div class="luckysheet-modal-dialog-content">${content}</div> <div class="luckysheet-modal-dialog-buttons"> ${botton} </div></div>',Ru='<div class="luckysheet-modal-dialog-mask" id="luckysheet-modal-dialog-mask"></div>';Du=function(){let n=Q().pivotTable;return` |
| | | </div>`},ku='<div id="luckysheet-cell-flow_${index}" class="luckysheet-cell-flow luckysheetsheetchange" style="width:${width}px;"><div class="luckysheet-cell-flow-clip"><div class="luckysheet-grdblkpush"></div>${flow}</div></div>',wu="";_u=function(){let n=Q().pivotTable;return'<div class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-mousedown-cancel" id="luckysheet-pivotTable-config-option"> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <div class="luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.titleSort+'</span> <select class="luckysheet-mousedown-cancel" style="height:24px;" id="luckysheet-pivotTable-config-option-order"> <option selected="selected" value="default">'+n.titleNoSort+'</option> <option value="asc">'+n.titleSortAsc+'</option> <option value="desc">'+n.titleSortDesc+'</option> </select> </div> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <div class="luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.titleSortBy+'</span> <select class="luckysheet-mousedown-cancel" style="height:24px;" id="luckysheet-pivotTable-config-option-orderby"> </select> </div> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <div class="luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.titleShowSum+'</span> <select class="luckysheet-mousedown-cancel" style="height:24px;" id="luckysheet-pivotTable-config-option-stastic"> <option value="0">'+n.titleStasticFalse+'</option> <option value="1" selected="selected">'+n.titleStasticTrue+"</option> </select> </div> </div> </div> </div>"},Cu=function(){let n=Q().pivotTable;return'<div class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-mousedown-cancel" id="luckysheet-pivotTable-config-option-sumtype"> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="SUM"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsSUM+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="COUNT"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsCOUNT+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="COUNTA"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsCOUNTA+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="COUNTUNIQUE"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsCOUNTUNIQUE+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="AVERAGE"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsAVERAGE+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="MAX"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsMAX+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="MIN"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsMIN+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="MEDIAN"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsMEDIAN+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="PRODUCT"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsPRODUCT+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="STDEV"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsSTDEV+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="STDEVP"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsSTDEVP+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="VAR"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticslet+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> <div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" sumtype="VARP"> <div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel"> <span class="luckysheet-mousedown-cancel">'+n.valueStatisticsVARP+'</span> <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel" style="user-select: none;"><i class="fa fa-check luckysheet-mousedown-cancel" aria-hidden="true"></i></span> </div> </div> </div>'},Ql='<div style="${style}" id="luckysheet-sheets-item${index}" data-index="${index}" class="luckysheet-sheets-item ${active}"><span class="luckysheet-sheets-item-name" spellcheck ="false" contenteditable="false">${name}</span> <span class="luckysheet-sheets-item-menu luckysheet-mousedown-cancel"><i class="fa fa-sort-desc luckysheet-mousedown-cancel"></i></span>${colorset}</div>',Tu='<div class="luckysheet-cols-h-cells luckysheetsheetchange" id="luckysheet-cols-h-cells_${index}" style="width:${width}px;"> <div class="luckysheet-cols-h-cells-c"> <div class="luckysheet-grdblkpush"></div>${column}</div></div>',Su='<div class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-mousedown-cancel" id="luckysheet-sheet-list">${item}</div>',$u='<div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" id="luckysheet-sheet-btn${index}" data-index="${index}"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="${style}" ><span class="icon luckysheet-mousedown-cancel">${icon}</span>${name}</div></div>',Iu='<div dir="ltr"><div class="luckysheet-input-box-index" id="luckysheet-input-box-index"></div><div id="luckysheet-input-box" spellcheck="false" aria-hidden="false" class="luckysheet-input-box"><div class="luckysheet-cell-input editable" tabindex="0" role="combobox" contenteditable="true" id="luckysheet-rich-text-editor" dir="ltr" g_editable="true" aria-autocomplete="list"></div></div></div>',dt='<div id="${id}" style="${style}" class="luckysheet-modal-dialog ${addclass}" tabindex="0" role="dialog" aria-labelledby=":41e" dir="ltr"> <div class="luckysheet-modal-dialog-title luckysheet-modal-dialog-title-draggable"> <span class="luckysheet-modal-dialog-title-text" role="heading">${title}</span> <span class="luckysheet-modal-dialog-title-close" role="button" tabindex="0" aria-label="${close}"><i class="fa fa-times" aria-hidden="true"></i></span> </div> <div class="luckysheet-modal-dialog-content">${content}</div> <div class="luckysheet-modal-dialog-buttons"> ${botton} </div></div>',Ru='<div class="luckysheet-modal-dialog-mask" id="luckysheet-modal-dialog-mask"></div>';Du=function(){let n=Q().pivotTable;return` |
| | | <div id="luckysheet-modal-dialog-slider-pivot" class="luckysheet-modal-dialog-slider luckysheet-modal-dialog-slider-pivot"> |
| | | <div class="luckysheet-modal-dialog-slider-title"> <span>${n.title}</span> <span id="luckysheet-modal-dialog-slider-close" title="${n.closePannel}"><i class="fa fa-times" aria-hidden="true"></i></span> </div> |
| | | <div class="luckysheet-modal-dialog-slider-content"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | `};Fu='<div class="luckysheet-chart-point-config"> <div class="luckysheet-chart-point-config-set"> <div class="luckysheet-chart-point-config-left"> <div class="luckysheet-chart-point-config-left-top"> <div class="luckysheet-chart-point-searchcondition"> <div class="luckysheet-datavisual-content-row" style="margin-bottom: 0px;margin-top: 0px;height: 30px;"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u9009\u62E9\u7EF4\u5EA6</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <select data-tips="\u7EF4\u5EA6\u9009\u62E9" name="luckysheetpointconfigsearchdim" id="luckysheetpointconfigsearchdim"> </select> </div> </div> <div class="luckysheet-datavisual-content-row" style="margin-bottom: 0px;margin-top: 3px;height: 30px;"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;">\u6392\u5E8F</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <label data-tips="\u65E0\u6392\u5E8F" for="luckysheetpointconfigsearchorderno">\u65E0\u6392\u5E8F</label> <input type="radio" checked="checked" value="0" name="luckysheetpointconfigsearchorder" id="luckysheetpointconfigsearchorderno"> <label data-tips="\u5347\u5E8F" for="luckysheetpointconfigsearchorderasc">\u5347\u5E8F</label> <input type="radio" value="1" name="luckysheetpointconfigsearchorder" id="luckysheetpointconfigsearchorderasc"> <label data-tips="\u964D\u5E8F" for="luckysheetpointconfigsearchorderdesc">\u964D\u5E8F</label> <input type="radio" value="2" name="luckysheetpointconfigsearchorder" id="luckysheetpointconfigsearchorderdesc"> </div> </div> <div class="luckysheet-datavisual-content-row" style="margin-bottom: 0px;margin-top: 5px;height: 30px;"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:90%;text-align: left;"> <select data-width="70" data-tips="\u6309\u7167\u4EC0\u4E48\u65B9\u5F0F\u67E5\u8BE2" name="luckysheetpointconfigsearchtype" id="luckysheetpointconfigsearchtype"> <option value="0" selected="selected">\u6309\u7167\u540D\u79F0</option> <option value="1">\u6309\u6392\u5E8F\u524D%</option> </select> <input data-tips="\u67E5\u8BE2\u5173\u4E8E\u70B9\u7684\u5173\u952E\u5B57" id="luckysheetpointconfigsearchcontent" type="text" class="luckysheet-datavisual-config-input-no" style="width:40%;" placeholder="\u67E5\u8BE2\u5185\u5BB9" /> <button id="luckysheetpointconfigsearchcomfirm" class="btn btn-primary luckysheet-model-conform-btn">\u67E5\u8BE2</button> </div> </div> </div> </div> <div class="luckysheet-chart-point-config-left-mid"> <span id="luckysheet-chart-point-btn-all" class="luckysheet-mousedown-cancel">\u5168\u9009</span> - <span id="luckysheet-chart-point-btn-clear" class="luckysheet-mousedown-cancel">\u6E05\u9664</span> - <span id="luckysheet-chart-point-btn-contra" class="luckysheet-mousedown-cancel">\u53CD\u9009</span><span style="text-decoration:none;color:#8D8D8D;float:right;margin-right:40px;cursor:default;" class="luckysheet-mousedown-cancel">\u53EF\u4EE5\u76F4\u63A5\u6846\u9009\u6570\u636E\u70B9</span> </div> <div class="luckysheet-chart-point-config-left-bottom"> <div class="luckysheet-chart-point-searchitem-c luckysheet-noselected-text"> </div> </div> </div> <div class="luckysheet-chart-point-config-right"> <div class="luckysheet-chart-point-itemconfig"> <div class="luckysheet-datavisual-content-row" style="font-size: 16px;font-weight: bold;"> \u6570\u636E\u70B9\u8BBE\u7F6E </div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u56FE\u5F62\u989C\u8272</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <input data-tips="\u989C\u8272" class="luckysheet-datavisual-config-colorOpacity" id="scattersingleitemstylecolor" type="text" data-bigclass="scattersingle" data-attr="itemstyle" data-func="color" /> </div> </div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u56FE\u5F62\u5927\u5C0F</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <select data-sliderdiy="scattersingleallsymbolsizeslider" data-tips="\u70B9\u5927\u5C0F\u8BBE\u7F6E" name="scattersingleallsymbolsize" id="scattersingleallsymbolsize" data-width="50" data-bigclass="scattersingle" data-attr="all" data-func="symbolsize"> <option value="4" selected="selected">4px</option> <option value="6">6px</option> <option value="8">8px</option> <option value="10">10px</option> <option value="12">12px</option> <option value="14">14px</option> <option value="16">16px</option> <option value="diy">\u81EA\u5B9A\u4E49</option> </select> </div> </div> <div class="luckysheet-datavisual-content-row" style="display:none;"> <div data-tips="\u6ED1\u52A8\u4FEE\u6539\u70B9\u5927\u5C0F" id="scattersingleallsymbolsizeslider" data-bigclass="scattersingle" data-attr="all" data-func="symbolsize" class="luckysheet-datavisual-config-slider" style="width:70%;" data-min="1" data-max="50" data-step="1"></div> <input data-tips="\u81EA\u5B9A\u4E49\u70B9\u5927\u5C0F" data-sliderid="scattersingleallsymbolsizeslider" id="scattersingleallsymbolsizesliderdiy" type="text" class="luckysheet-datavisual-config-input" data-bigclass="scattersingle" data-attr="all" data-func="symbolsize" placeholder="\u8BF7\u8F93\u5165" style="width:10%;margin-left:10px;text-align:center;margin-right: 2px;" /><label for="scattersingleallsymbolsizesliderdiy">px</label> </div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u56FE\u5F62\u5F62\u72B6</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <select data-tips="\u70B9\u7C7B\u578B\u8BBE\u7F6E" data-width="70" name="scattersingleallsymboltype" id="scattersingleallsymboltype" data-bigclass="scattersingle" data-attr="all" data-func="symboltype"> <option value="emptyCircle" selected="selected">\u7A7A\u5FC3\u5706</option> <option value="circle">\u5706\u5F62</option> <option value="emptyRectangle">\u7A7A\u5FC3\u77E9\u5F62</option> <option value="rect">\u77E9\u5F62</option> <option value="roundRect">\u5706\u89D2\u77E9\u5F62</option> <option value="emptyTriangle">\u7A7A\u5FC3\u4E09\u89D2</option> <option value="triangle">\u4E09\u89D2\u5F62</option> <option value="emptyDiamond">\u7A7A\u5FC3\u83F1\u5F62</option> <option value="diamond">\u83F1\u5F62</option> <option value="droplet">\u6C34\u6EF4</option> <option value="pin">\u6807\u6CE8</option> <option value="arrow">\u7BAD\u5934</option> <option value="heart">\u5FC3\u5F62</option> <option value="star">\u661F\u661F</option> </select> </div> </div> <div class="luckysheet-datavisual-content-rowsplit-sub"></div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u8FB9\u6846\u7C97\u7EC6</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <select data-sliderdiy="scattersingleitemstyleborderwidthslider" data-tips="\u70B9\u8FB9\u6846\u7C97\u7EC6" name="scattersingleitemstyleborderwidth" id="scattersingleitemstyleborderwidth" data-width="50" data-bigclass="scattersingle" data-attr="itemstyle" data-func="borderwidth"><option value="0" selected="selected">\u65E0</option> <option value="1">1px</option> <option value="2">2px</option> <option value="3">3px</option> <option value="4">4px</option> <option value="5">5px</option> <option value="6">6px</option> <option value="7">7px</option> <option value="8">8px</option> <option value="diy">\u81EA\u5B9A\u4E49</option> </select> </div> </div> <div class="luckysheet-datavisual-content-row" style="display:none;"> <div data-tips="\u6ED1\u52A8\u4FEE\u6539\u8FB9\u6846\u7C97\u7EC6" id="scattersingleitemstyleborderwidthslider" data-bigclass="scattersingle" data-attr="itemstyle" data-func="borderwidth" class="luckysheet-datavisual-config-slider" style="width:70%;" data-min="12" data-max="100" data-step="1"></div> <input data-tips="\u81EA\u5B9A\u4E49\u8FB9\u6846\u7C97\u7EC6" data-sliderid="scattersingleitemstyleborderwidthslider" id="scattersingleitemstyleborderwidthsliderdiy" type="text" class="luckysheet-datavisual-config-input" data-bigclass="scattersingle" data-attr="itemstyle" data-func="borderwidth" placeholder="\u8BF7\u8F93\u5165" style="width:10%;margin-left:10px;text-align:center;margin-right: 2px;" /><label for="scattersingleitemstyleborderwidthsliderdiy">%</label> </div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u8FB9\u6846\u6837\u5F0F</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <select data-tips="\u70B9\u8FB9\u6846\u7C7B\u578B\u8BBE\u7F6E" data-width="50" name="scattersingleitemstyleborderlinetype" id="scattersingleitemstyleborderlinetype" data-bigclass="scattersingle" data-attr="itemstyle" data-func="borderlinetype"> <option value="solid" selected="selected">\u5B9E\u7EBF</option> <option value="dashed">\u865A\u7EBF</option> <option value="dotted">\u70B9\u7EBF</option> </select> </div> </div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u8FB9\u6846\u989C\u8272</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <input data-tips="\u70B9\u8FB9\u6846\u989C\u8272" class="luckysheet-datavisual-config-colorOpacity" id="scattersingleitemstyleborderlinecolor" type="text" data-bigclass="scattersingle" data-attr="itemstyle" data-func="borderlinecolor" /> </div> </div> <div class="luckysheet-datavisual-content-rowsplit-sub"></div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;"><i class="fa fa-th-large" aria-hidden="true"></i> \u6587\u5B57\u6807\u7B7E</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <label data-tips="\u663E\u793A\u6570\u636E\u70B9\u7684\u6807\u7B7E" data-bigclass="scattersingle" data-attr="label" data-func="labelshow" for="scattersinglelabellabelshow">\u663E\u793A</label> <input type="radio" checked="checked" value="1" name="scattersinglelabellabelshow" id="scattersinglelabellabelshow" data-bigclass="scattersingle" data-attr="label" data-func="labelshow"> <label data-tips="\u9690\u85CF\u6570\u636E\u70B9\u7684\u6807\u7B7E" data-bigclass="scattersingle" data-attr="label" data-func="labelshow" for="scattersinglelabellabelshow1">\u9690\u85CF</label> <input type="radio" value="0" name="scattersinglelabellabelshow" id="scattersinglelabellabelshow1" data-bigclass="scattersingle" data-attr="label" data-func="labelshow"> </div> </div> <div class="luckysheet-datavisual-content-row" style="height:auto;line-height: initial;margin-left:auto;" showfor="scattersinglelabellabelshow1" hidefor="scattersinglelabellabelshow"> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:40%;">\u6570\u503C\u6BD4\u4F8B</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:50%;"> <select data-tips="\u523B\u5EA6\u6570\u503C\u653E\u5927\u6BD4\u4F8B" name="scattersinglelabelformatratio" id="scattersinglelabelformatratio" data-bigclass="scattersingle" data-attr="label" data-func="formatratio"> <option value="0.01">\u4E58\u4EE5100</option> <option value="0.1">\u4E58\u4EE510</option> <option value="1" selected="selected">\u9ED8\u8BA4</option> <option value="10">\u9664\u4EE510</option> <option value="100">\u9664\u4EE5100</option> <option value="1000">\u9664\u4EE51000</option> <option value="10000">\u9664\u4EE51\u4E07</option> <option value="100000">\u9664\u4EE510\u4E07</option> <option value="1000000">\u9664\u4EE5\u4E00\u767E\u4E07</option> <option value="10000000">\u9664\u4EE5\u4E00\u5343\u4E07</option> <option value="100000000">\u9664\u4EE5\u4E00\u4EBF</option> <option value="1000000000">\u9664\u4EE5\u5341\u4EBF</option> </select> </div> </div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:40%;white-space: nowrap;">\u5C0F\u6570\u4F4D\u6570</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:50%;"> <select data-tips="\u6570\u503C\u5C0F\u6570\u70B9\u4F4D\u6570" name="scattersinglelabelfloatlen" id="scattersinglelabelfloatlen" data-bigclass="scattersingle" data-attr="label" data-func="floatlen"> <option value="auto" selected="selected">\u81EA\u52A8\u663E\u793A</option> <option value="0">\u6574\u6570</option> <option value="1">1\u4F4D\u5C0F\u6570</option> <option value="2">2\u4F4D\u5C0F\u6570</option> <option value="3">3\u4F4D\u5C0F\u6570</option> <option value="4">4\u4F4D\u5C0F\u6570</option> <option value="5">5\u4F4D\u5C0F\u6570</option> <option value="6">6\u4F4D\u5C0F\u6570</option> <option value="7">7\u4F4D\u5C0F\u6570</option> <option value="8">8\u4F4D\u5C0F\u6570</option> </select> </div> </div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:20%;">\u6807\u7B7E\u683C\u5F0F</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:70%;"> <select data-sliderdiy="scattersinglelabelcontentformatslider" data-tips="\u6807\u7B7E\u663E\u793A\u683C\u5F0F" name="scattersinglelabelcontentformat" id="scattersinglelabelcontentformat" data-bigclass="scattersingle" data-attr="label" data-func="contentformat"> <option value="default" selected="selected">\u9ED8\u8BA4</option> <option value="1">\u4EC5\u6570\u636E\u540D</option> <option value="2">\u6570\u636E\u540D+2\u7EF4\u6570\u503C</option> <option value="5">\u6570\u636E\u540D+\u5168\u90E8\u6570\u503C</option> <option value="diy">\u81EA\u5B9A\u4E49</option> </select> </div> </div> <div style="display:none;"> <div class="luckysheet-datavisual-content-row" id="scattersinglelabelcontentformatslider"> <div style="text-align:center; width:60px; display:inline-block;">\u6570\u636E\u540D\u79F0</div> <label data-tips="\u662F\u5426\u663E\u793A\u6570\u636E\u540D" data-bigclass="scattersingle" data-attr="label" data-func="scattersingledatalabelshow" for="scattersinglelabeldatalabelshow" style="font-weight:bold;"><i class="fa fa-eye" aria-hidden="true"></i></label> <input type="checkbox" checked="checked" name="scattersinglelabeldatalabelshow" id="scattersinglelabeldatalabelshow" data-bigclass="scattersingle" data-attr="label" data-func="scattersingledatalabelshow"> <input data-tips="\u663E\u793A\u5728\u6570\u636E\u540D\u524D\u90E8\u6587\u5B57" placeholder="\u524D\u7F00" id="scattersinglelabeldatalabelprefix" type="text" class="luckysheet-datavisual-config-input" style="width:60px;height:19px;" data-bigclass="scattersingle" data-attr="label" data-func="scattersingledatalabelprefix" /> <input data-tips="\u663E\u793A\u5728\u6570\u636E\u540D\u5C3E\u90E8\u6587\u5B57" placeholder="\u540E\u7F00" id="scattersinglelabeldatalabelsuffix" type="text" class="luckysheet-datavisual-config-input" style="width:60px;height:19px;" data-bigclass="scattersingle" data-attr="label" data-func="scattersingledatalabelsuffix" /> <label data-tips="\u662F\u5426\u5728\u6570\u636E\u540D\u540E\u6362\u884C" data-bigclass="scattersingle" data-attr="label" data-func="scattersingledatalabelline" for="scattersinglelabeldatalabelline" style="font-weight:bold;">\u6362\u884C</label> <input type="checkbox" checked="checked" name="scattersinglelabeldatalabelline" id="scattersinglelabeldatalabelline" data-bigclass="scattersingle" data-attr="label" data-func="scattersingledatalabelline"> </div> </div> <div class="luckysheet-datavisual-content-row" > <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u6807\u7B7E\u4F4D\u7F6E</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <select data-sliderdiy="scattersinglelabellabelplaceslider" data-tips="\u6807\u7B7E\u8DDD\u79BB\u56FE\u5F62\u4F4D\u7F6E" data-width="70" name="scattersinglelabellabelplace" id="scattersinglelabellabelplace" data-bigclass="scattersingle" data-attr="label" data-func="labelplace"> <option value="top" selected="selected">\u9876\u7AEF</option> <option value="left">\u5DE6\u4FA7</option> <option value="right">\u53F3\u4FA7</option> <option value="bottom">\u5E95\u90E8</option> <option value="inside">\u5185\u90E8\u5C45\u4E2D</option> <option value="diy">\u81EA\u5B9A\u4E49</option> <option value="insideLeft">\u5185\u90E8\u5DE6\u4FA7</option> <option value="insideRight">\u5185\u90E8\u53F3\u4FA7</option> <option value="insideTop">\u5185\u90E8\u9876\u7AEF</option> <option value="insideBottom">\u5185\u90E8\u5E95\u7AEF</option> <option value="insideTopLeft">\u5185\u90E8\u5DE6\u4E0A</option> <option value="insideBottomLeft">\u5185\u90E8\u5DE6\u4E0B</option> <option value="insideTopRight">\u5185\u90E8\u53F3\u4E0A</option> <option value="insideBottomRight">\u5185\u90E8\u53F3\u4E0B</option> </select> </div> </div> <div class="luckysheet-datavisual-content-row" style="display:none;height:65px;"> <div data-tips="\u6ED1\u52A8\u4FEE\u6539\u70B9\u6587\u672C\u6C34\u5E73\u4F4D\u7F6E" id="scattersinglelabellabelplaceslider" data-bigclass="scattersingle" data-attr="label" data-func="labelplacediy" class="luckysheet-datavisual-config-slider" style="width:70%;" data-min="-100" data-max="100" data-step="1"></div> <input data-tips="\u81EA\u5B9A\u4E49\u70B9\u6587\u672C\u6C34\u5E73\u4F4D\u7F6E" data-sliderid="scattersinglelabellabelplaceslider" id="scattersinglelabellabelplacesliderdiy" type="text" class="luckysheet-datavisual-config-input" data-bigclass="scattersingle" data-attr="label" data-func="labelplacediy" placeholder="\u8BF7\u8F93\u5165" style="width:10%;margin-left:10px;text-align:center;margin-right: 2px;" /><label for="scattersinglelabellabelplacesliderdiy">px</label> <br /> <div data-tips="\u6ED1\u52A8\u4FEE\u6539\u70B9\u6587\u672C\u5782\u76F4\u4F4D\u7F6E" id="scattersinglelabellabelplaceslider1" data-bigclass="scattersingle" data-attr="label" data-func="labelplacediy" class="luckysheet-datavisual-config-slider" style="width:70%;" data-min="-100" data-max="100" data-step="1"></div> <input data-tips="\u81EA\u5B9A\u4E49\u70B9\u6587\u672C\u5782\u76F4\u4F4D\u7F6E" data-sliderid="scattersinglelabellabelplaceslider1" id="scattersinglelabellabelplaceslider1diy" type="text" class="luckysheet-datavisual-config-input" data-bigclass="scattersingle" data-attr="label" data-func="labelplacediy" placeholder="\u8BF7\u8F93\u5165" style="width:10%;margin-left:10px;text-align:center;margin-right: 2px;" /><label for="scattersinglelabellabelplaceslider1diy">px</label> </div> <div class="luckysheet-datavisual-content-row"> <label data-tips="\u52A0\u7C97" data-bigclass="scattersingle" data-attr="label" data-func="labelbold" for="scattersinglelabellabelbold" style="font-weight:bold;"><i class="fa fa-bold" aria-hidden="true"></i></label> <input type="checkbox" name="scattersinglelabellabelbold" id="scattersinglelabellabelbold" data-bigclass="scattersingle" data-attr="label" data-func="labelbold"> <label data-tips="\u659C\u4F53" data-bigclass="scattersingle" data-attr="label" data-func="labelitalic" for="scattersinglelabellabelitalic" class="luckysheet-datavisual-content-column-italic"><i class="fa fa-italic" aria-hidden="true"></i></label> <input type="checkbox" name="scattersinglelabellabelitalic" id="scattersinglelabellabelitalic" data-bigclass="scattersingle" data-attr="label" data-func="labelitalic"> <select data-sliderdiy="scattersinglelabellabelfontsizeslider" data-width="50" data-tips="\u5B57\u4F53\u5927\u5C0F" name="scattersinglelabellabelfontsize" id="scattersinglelabellabelfontsize" data-bigclass="scattersingle" data-attr="label" data-func="labelfontsize"> <option value="12">12px</option> <option value="14">14px</option> <option value="16">16px</option> <option value="18">18px</option> <option value="20">20px</option> <option value="22">22px</option> <option value="24">24px</option> <option value="30">30px</option> <option value="36">36px</option> <option value="diy">\u81EA\u5B9A\u4E49</option> </select> <input data-tips="\u5B57\u4F53\u989C\u8272" class="luckysheet-datavisual-config-color" id="scattersinglelinelabelcolor" type="text" data-bigclass="scattersingle" data-attr="label" data-func="labelcolor" /> </div> <div class="luckysheet-datavisual-content-row" style="display:none;"> <div data-tips="\u6ED1\u52A8\u4FEE\u6539\u5B57\u4F53\u5927\u5C0F" id="scattersinglelabellabelfontsizeslider" data-bigclass="scattersingle" data-attr="label" data-func="labelfontsize" class="luckysheet-datavisual-config-slider" style="width:70%;" data-min="12" data-max="100" data-step="1"></div> <input data-tips="\u81EA\u5B9A\u4E49\u5B57\u4F53\u5927\u5C0F" data-sliderid="scattersinglelabellabelfontsizeslider" id="scattersinglelabellabelfontsizesliderdiy" type="text" class="luckysheet-datavisual-config-input" data-bigclass="scattersingle" data-attr="label" data-func="labelfontsize" placeholder="\u8BF7\u8F93\u5165" style="width:10%;margin-left:10px;text-align:center;margin-right: 2px;" /><label for="scattersinglelabellabelfontsizesliderdiy">px</label> </div> </div> </div> </div> </div> <div class="luckysheet-chart-point-config-chart"> <div id="luckysheet-chart-point-config-chart-c" class="luckysheet-chart-point-config-chart-c"> </div> </div> </div>',Eu='<div id="luckysheet-tooltip-up" class="jfk-tooltip" role="tooltip" aria-hidden="true" style="left: 505px; top: 410px;"><div class="jfk-tooltip-contentId">\u7EC4\u5408\u56FE\u8868</div><div class="jfk-tooltip-arrow jfk-tooltip-arrowup" style="left: 35.5px;"><div class="jfk-tooltip-arrowimplbefore"></div><div class="jfk-tooltip-arrowimplafter"></div></div></div>';Dp=function(e){if(typeof e.image=="function")return e.image();let t=new RegExp("^(image|path)://").exec(e.image),l="";if(t!==null){let a=t[0],o=t[1],s=t.input.substring(a.length);switch(o){case"image":l=`<div class="image-type" style="background-image: url(${s});"></div>`;break;case"path":let u=document.createElementNS("http://www.w3.org/2000/svg","svg");u.setAttribute("class","path-type"),u.setAttribute("viewBox",e.viewBox);let d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("d",s),d.setAttribute("fill","currentColor"),u.appendChild(d),l=u.outerHTML;break;default:break}}return l},Er=function(e,n){if(!e)return;let t=Ap();if(n&&JSON.stringify(n)!=="{}"&&Object.assign(t,n),typeof t.enable=="boolean"&&t.enable===!1)return{el:"",show:u,close:d};let l=Dp(t),a="luckysheet-loading-"+uuid.v4(),o=` |
| | | `};Fu='<div class="luckysheet-chart-point-config"> <div class="luckysheet-chart-point-config-set"> <div class="luckysheet-chart-point-config-left"> <div class="luckysheet-chart-point-config-left-top"> <div class="luckysheet-chart-point-searchcondition"> <div class="luckysheet-datavisual-content-row" style="margin-bottom: 0px;margin-top: 0px;height: 30px;"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u9009\u62E9\u7EF4\u5EA6</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <select data-tips="\u7EF4\u5EA6\u9009\u62E9" name="luckysheetpointconfigsearchdim" id="luckysheetpointconfigsearchdim"> </select> </div> </div> <div class="luckysheet-datavisual-content-row" style="margin-bottom: 0px;margin-top: 3px;height: 30px;"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;">\u6392\u5E8F</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <label data-tips="\u65E0\u6392\u5E8F" for="luckysheetpointconfigsearchorderno">\u65E0\u6392\u5E8F</label> <input type="radio" checked="checked" value="0" name="luckysheetpointconfigsearchorder" id="luckysheetpointconfigsearchorderno"> <label data-tips="\u5347\u5E8F" for="luckysheetpointconfigsearchorderasc">\u5347\u5E8F</label> <input type="radio" value="1" name="luckysheetpointconfigsearchorder" id="luckysheetpointconfigsearchorderasc"> <label data-tips="\u964D\u5E8F" for="luckysheetpointconfigsearchorderdesc">\u964D\u5E8F</label> <input type="radio" value="2" name="luckysheetpointconfigsearchorder" id="luckysheetpointconfigsearchorderdesc"> </div> </div> <div class="luckysheet-datavisual-content-row" style="margin-bottom: 0px;margin-top: 5px;height: 30px;"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:90%;text-align: left;"> <select data-width="70" data-tips="\u6309\u7167\u4EC0\u4E48\u65B9\u5F0F\u67E5\u8BE2" name="luckysheetpointconfigsearchtype" id="luckysheetpointconfigsearchtype"> <option value="0" selected="selected">\u6309\u7167\u540D\u79F0</option> <option value="1">\u6309\u6392\u5E8F\u524D%</option> </select> <input data-tips="\u67E5\u8BE2\u5173\u4E8E\u70B9\u7684\u5173\u952E\u5B57" id="luckysheetpointconfigsearchcontent" type="text" class="luckysheet-datavisual-config-input-no" style="width:40%;" placeholder="\u67E5\u8BE2\u5185\u5BB9" /> <button id="luckysheetpointconfigsearchcomfirm" class="btn btn-primary luckysheet-model-conform-btn">\u67E5\u8BE2</button> </div> </div> </div> </div> <div class="luckysheet-chart-point-config-left-mid"> <span id="luckysheet-chart-point-btn-all" class="luckysheet-mousedown-cancel">\u5168\u9009</span> - <span id="luckysheet-chart-point-btn-clear" class="luckysheet-mousedown-cancel">\u6E05\u9664</span> - <span id="luckysheet-chart-point-btn-contra" class="luckysheet-mousedown-cancel">\u53CD\u9009</span><span style="text-decoration:none;color:#8D8D8D;float:right;margin-right:40px;cursor:default;" class="luckysheet-mousedown-cancel">\u53EF\u4EE5\u76F4\u63A5\u6846\u9009\u6570\u636E\u70B9</span> </div> <div class="luckysheet-chart-point-config-left-bottom"> <div class="luckysheet-chart-point-searchitem-c luckysheet-noselected-text"> </div> </div> </div> <div class="luckysheet-chart-point-config-right"> <div class="luckysheet-chart-point-itemconfig"> <div class="luckysheet-datavisual-content-row" style="font-size: 16px;font-weight: bold;"> \u6570\u636E\u70B9\u8BBE\u7F6E </div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u56FE\u5F62\u989C\u8272</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <input data-tips="\u989C\u8272" class="luckysheet-datavisual-config-colorOpacity" id="scattersingleitemstylecolor" type="text" data-bigclass="scattersingle" data-attr="itemstyle" data-func="color" /> </div> </div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u56FE\u5F62\u5927\u5C0F</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <select data-sliderdiy="scattersingleallsymbolsizeslider" data-tips="\u70B9\u5927\u5C0F\u8BBE\u7F6E" name="scattersingleallsymbolsize" id="scattersingleallsymbolsize" data-width="50" data-bigclass="scattersingle" data-attr="all" data-func="symbolsize"> <option value="4" selected="selected">4px</option> <option value="6">6px</option> <option value="8">8px</option> <option value="10">10px</option> <option value="12">12px</option> <option value="14">14px</option> <option value="16">16px</option> <option value="diy">\u81EA\u5B9A\u4E49</option> </select> </div> </div> <div class="luckysheet-datavisual-content-row" style="display:none;"> <div data-tips="\u6ED1\u52A8\u4FEE\u6539\u70B9\u5927\u5C0F" id="scattersingleallsymbolsizeslider" data-bigclass="scattersingle" data-attr="all" data-func="symbolsize" class="luckysheet-datavisual-config-slider" style="width:70%;" data-min="1" data-max="50" data-step="1"></div> <input data-tips="\u81EA\u5B9A\u4E49\u70B9\u5927\u5C0F" data-sliderid="scattersingleallsymbolsizeslider" id="scattersingleallsymbolsizesliderdiy" type="text" class="luckysheet-datavisual-config-input" data-bigclass="scattersingle" data-attr="all" data-func="symbolsize" placeholder="\u8BF7\u8F93\u5165" style="width:10%;margin-left:10px;text-align:center;margin-right: 2px;" /><label for="scattersingleallsymbolsizesliderdiy">px</label> </div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u56FE\u5F62\u5F62\u72B6</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <select data-tips="\u70B9\u7C7B\u578B\u8BBE\u7F6E" data-width="70" name="scattersingleallsymboltype" id="scattersingleallsymboltype" data-bigclass="scattersingle" data-attr="all" data-func="symboltype"> <option value="emptyCircle" selected="selected">\u7A7A\u5FC3\u5706</option> <option value="circle">\u5706\u5F62</option> <option value="emptyRectangle">\u7A7A\u5FC3\u77E9\u5F62</option> <option value="rect">\u77E9\u5F62</option> <option value="roundRect">\u5706\u89D2\u77E9\u5F62</option> <option value="emptyTriangle">\u7A7A\u5FC3\u4E09\u89D2</option> <option value="triangle">\u4E09\u89D2\u5F62</option> <option value="emptyDiamond">\u7A7A\u5FC3\u83F1\u5F62</option> <option value="diamond">\u83F1\u5F62</option> <option value="droplet">\u6C34\u6EF4</option> <option value="pin">\u6807\u6CE8</option> <option value="arrow">\u7BAD\u5934</option> <option value="heart">\u5FC3\u5F62</option> <option value="star">\u661F\u661F</option> </select> </div> </div> <div class="luckysheet-datavisual-content-rowsplit-sub"></div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u8FB9\u6846\u7C97\u7EC6</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <select data-sliderdiy="scattersingleitemstyleborderwidthslider" data-tips="\u70B9\u8FB9\u6846\u7C97\u7EC6" name="scattersingleitemstyleborderwidth" id="scattersingleitemstyleborderwidth" data-width="50" data-bigclass="scattersingle" data-attr="itemstyle" data-func="borderwidth"><option value="0" selected="selected">\u65E0</option> <option value="1">1px</option> <option value="2">2px</option> <option value="3">3px</option> <option value="4">4px</option> <option value="5">5px</option> <option value="6">6px</option> <option value="7">7px</option> <option value="8">8px</option> <option value="diy">\u81EA\u5B9A\u4E49</option> </select> </div> </div> <div class="luckysheet-datavisual-content-row" style="display:none;"> <div data-tips="\u6ED1\u52A8\u4FEE\u6539\u8FB9\u6846\u7C97\u7EC6" id="scattersingleitemstyleborderwidthslider" data-bigclass="scattersingle" data-attr="itemstyle" data-func="borderwidth" class="luckysheet-datavisual-config-slider" style="width:70%;" data-min="12" data-max="100" data-step="1"></div> <input data-tips="\u81EA\u5B9A\u4E49\u8FB9\u6846\u7C97\u7EC6" data-sliderid="scattersingleitemstyleborderwidthslider" id="scattersingleitemstyleborderwidthsliderdiy" type="text" class="luckysheet-datavisual-config-input" data-bigclass="scattersingle" data-attr="itemstyle" data-func="borderwidth" placeholder="\u8BF7\u8F93\u5165" style="width:10%;margin-left:10px;text-align:center;margin-right: 2px;" /><label for="scattersingleitemstyleborderwidthsliderdiy">%</label> </div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u8FB9\u6846\u6837\u5F0F</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <select data-tips="\u70B9\u8FB9\u6846\u7C7B\u578B\u8BBE\u7F6E" data-width="50" name="scattersingleitemstyleborderlinetype" id="scattersingleitemstyleborderlinetype" data-bigclass="scattersingle" data-attr="itemstyle" data-func="borderlinetype"> <option value="solid" selected="selected">\u5B9E\u7EBF</option> <option value="dashed">\u865A\u7EBF</option> <option value="dotted">\u70B9\u7EBF</option> </select> </div> </div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u8FB9\u6846\u989C\u8272</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <input data-tips="\u70B9\u8FB9\u6846\u989C\u8272" class="luckysheet-datavisual-config-colorOpacity" id="scattersingleitemstyleborderlinecolor" type="text" data-bigclass="scattersingle" data-attr="itemstyle" data-func="borderlinecolor" /> </div> </div> <div class="luckysheet-datavisual-content-rowsplit-sub"></div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;"><i class="fa fa-th-large" aria-hidden="true"></i> \u6587\u5B57\u6807\u7B7E</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <label data-tips="\u663E\u793A\u6570\u636E\u70B9\u7684\u6807\u7B7E" data-bigclass="scattersingle" data-attr="label" data-func="labelshow" for="scattersinglelabellabelshow">\u663E\u793A</label> <input type="radio" checked="checked" value="1" name="scattersinglelabellabelshow" id="scattersinglelabellabelshow" data-bigclass="scattersingle" data-attr="label" data-func="labelshow"> <label data-tips="\u9690\u85CF\u6570\u636E\u70B9\u7684\u6807\u7B7E" data-bigclass="scattersingle" data-attr="label" data-func="labelshow" for="scattersinglelabellabelshow1">\u9690\u85CF</label> <input type="radio" value="0" name="scattersinglelabellabelshow" id="scattersinglelabellabelshow1" data-bigclass="scattersingle" data-attr="label" data-func="labelshow"> </div> </div> <div class="luckysheet-datavisual-content-row" style="height:auto;line-height: initial;margin-left:auto;" showfor="scattersinglelabellabelshow1" hidefor="scattersinglelabellabelshow"> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:40%;">\u6570\u503C\u6BD4\u4F8B</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:50%;"> <select data-tips="\u523B\u5EA6\u6570\u503C\u653E\u5927\u6BD4\u4F8B" name="scattersinglelabelformatratio" id="scattersinglelabelformatratio" data-bigclass="scattersingle" data-attr="label" data-func="formatratio"> <option value="0.01">\u4E58\u4EE5100</option> <option value="0.1">\u4E58\u4EE510</option> <option value="1" selected="selected">\u9ED8\u8BA4</option> <option value="10">\u9664\u4EE510</option> <option value="100">\u9664\u4EE5100</option> <option value="1000">\u9664\u4EE51000</option> <option value="10000">\u9664\u4EE51\u4E07</option> <option value="100000">\u9664\u4EE510\u4E07</option> <option value="1000000">\u9664\u4EE5\u4E00\u767E\u4E07</option> <option value="10000000">\u9664\u4EE5\u4E00\u5343\u4E07</option> <option value="100000000">\u9664\u4EE5\u4E00\u4EBF</option> <option value="1000000000">\u9664\u4EE5\u5341\u4EBF</option> </select> </div> </div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:40%;white-space: nowrap;">\u5C0F\u6570\u4F4D\u6570</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:50%;"> <select data-tips="\u6570\u503C\u5C0F\u6570\u70B9\u4F4D\u6570" name="scattersinglelabelfloatlen" id="scattersinglelabelfloatlen" data-bigclass="scattersingle" data-attr="label" data-func="floatlen"> <option value="auto" selected="selected">\u81EA\u52A8\u663E\u793A</option> <option value="0">\u6574\u6570</option> <option value="1">1\u4F4D\u5C0F\u6570</option> <option value="2">2\u4F4D\u5C0F\u6570</option> <option value="3">3\u4F4D\u5C0F\u6570</option> <option value="4">4\u4F4D\u5C0F\u6570</option> <option value="5">5\u4F4D\u5C0F\u6570</option> <option value="6">6\u4F4D\u5C0F\u6570</option> <option value="7">7\u4F4D\u5C0F\u6570</option> <option value="8">8\u4F4D\u5C0F\u6570</option> </select> </div> </div> <div class="luckysheet-datavisual-content-row"> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:20%;">\u6807\u7B7E\u683C\u5F0F</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:70%;"> <select data-sliderdiy="scattersinglelabelcontentformatslider" data-tips="\u6807\u7B7E\u663E\u793A\u683C\u5F0F" name="scattersinglelabelcontentformat" id="scattersinglelabelcontentformat" data-bigclass="scattersingle" data-attr="label" data-func="contentformat"> <option value="default" selected="selected">\u9ED8\u8BA4</option> <option value="1">\u4EC5\u6570\u636E\u540D</option> <option value="2">\u6570\u636E\u540D+2\u7EF4\u6570\u503C</option> <option value="5">\u6570\u636E\u540D+\u5168\u90E8\u6570\u503C</option> <option value="diy">\u81EA\u5B9A\u4E49</option> </select> </div> </div> <div style="display:none;"> <div class="luckysheet-datavisual-content-row" id="scattersinglelabelcontentformatslider"> <div style="text-align:center; width:60px; display:inline-block;">\u6570\u636E\u540D\u79F0</div> <label data-tips="\u662F\u5426\u663E\u793A\u6570\u636E\u540D" data-bigclass="scattersingle" data-attr="label" data-func="scattersingledatalabelshow" for="scattersinglelabeldatalabelshow" style="font-weight:bold;"><i class="fa fa-eye" aria-hidden="true"></i></label> <input type="checkbox" checked="checked" name="scattersinglelabeldatalabelshow" id="scattersinglelabeldatalabelshow" data-bigclass="scattersingle" data-attr="label" data-func="scattersingledatalabelshow"> <input data-tips="\u663E\u793A\u5728\u6570\u636E\u540D\u524D\u90E8\u6587\u5B57" placeholder="\u524D\u7F00" id="scattersinglelabeldatalabelprefix" type="text" class="luckysheet-datavisual-config-input" style="width:60px;height:19px;" data-bigclass="scattersingle" data-attr="label" data-func="scattersingledatalabelprefix" /> <input data-tips="\u663E\u793A\u5728\u6570\u636E\u540D\u5C3E\u90E8\u6587\u5B57" placeholder="\u540E\u7F00" id="scattersinglelabeldatalabelsuffix" type="text" class="luckysheet-datavisual-config-input" style="width:60px;height:19px;" data-bigclass="scattersingle" data-attr="label" data-func="scattersingledatalabelsuffix" /> <label data-tips="\u662F\u5426\u5728\u6570\u636E\u540D\u540E\u6362\u884C" data-bigclass="scattersingle" data-attr="label" data-func="scattersingledatalabelline" for="scattersinglelabeldatalabelline" style="font-weight:bold;">\u6362\u884C</label> <input type="checkbox" checked="checked" name="scattersinglelabeldatalabelline" id="scattersinglelabeldatalabelline" data-bigclass="scattersingle" data-attr="label" data-func="scattersingledatalabelline"> </div> </div> <div class="luckysheet-datavisual-content-row" > <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-title luckysheet-datavisual-content-column-2x" style="width:10%;white-space:nowrap;">\u6807\u7B7E\u4F4D\u7F6E</div> <div class="luckysheet-datavisual-content-column luckysheet-datavisual-content-column-right luckysheet-datavisual-content-column-2x" style="width:80%;"> <select data-sliderdiy="scattersinglelabellabelplaceslider" data-tips="\u6807\u7B7E\u8DDD\u79BB\u56FE\u5F62\u4F4D\u7F6E" data-width="70" name="scattersinglelabellabelplace" id="scattersinglelabellabelplace" data-bigclass="scattersingle" data-attr="label" data-func="labelplace"> <option value="top" selected="selected">\u9876\u7AEF</option> <option value="left">\u5DE6\u4FA7</option> <option value="right">\u53F3\u4FA7</option> <option value="bottom">\u5E95\u90E8</option> <option value="inside">\u5185\u90E8\u5C45\u4E2D</option> <option value="diy">\u81EA\u5B9A\u4E49</option> <option value="insideLeft">\u5185\u90E8\u5DE6\u4FA7</option> <option value="insideRight">\u5185\u90E8\u53F3\u4FA7</option> <option value="insideTop">\u5185\u90E8\u9876\u7AEF</option> <option value="insideBottom">\u5185\u90E8\u5E95\u7AEF</option> <option value="insideTopLeft">\u5185\u90E8\u5DE6\u4E0A</option> <option value="insideBottomLeft">\u5185\u90E8\u5DE6\u4E0B</option> <option value="insideTopRight">\u5185\u90E8\u53F3\u4E0A</option> <option value="insideBottomRight">\u5185\u90E8\u53F3\u4E0B</option> </select> </div> </div> <div class="luckysheet-datavisual-content-row" style="display:none;height:65px;"> <div data-tips="\u6ED1\u52A8\u4FEE\u6539\u70B9\u6587\u672C\u6C34\u5E73\u4F4D\u7F6E" id="scattersinglelabellabelplaceslider" data-bigclass="scattersingle" data-attr="label" data-func="labelplacediy" class="luckysheet-datavisual-config-slider" style="width:70%;" data-min="-100" data-max="100" data-step="1"></div> <input data-tips="\u81EA\u5B9A\u4E49\u70B9\u6587\u672C\u6C34\u5E73\u4F4D\u7F6E" data-sliderid="scattersinglelabellabelplaceslider" id="scattersinglelabellabelplacesliderdiy" type="text" class="luckysheet-datavisual-config-input" data-bigclass="scattersingle" data-attr="label" data-func="labelplacediy" placeholder="\u8BF7\u8F93\u5165" style="width:10%;margin-left:10px;text-align:center;margin-right: 2px;" /><label for="scattersinglelabellabelplacesliderdiy">px</label> <br /> <div data-tips="\u6ED1\u52A8\u4FEE\u6539\u70B9\u6587\u672C\u5782\u76F4\u4F4D\u7F6E" id="scattersinglelabellabelplaceslider1" data-bigclass="scattersingle" data-attr="label" data-func="labelplacediy" class="luckysheet-datavisual-config-slider" style="width:70%;" data-min="-100" data-max="100" data-step="1"></div> <input data-tips="\u81EA\u5B9A\u4E49\u70B9\u6587\u672C\u5782\u76F4\u4F4D\u7F6E" data-sliderid="scattersinglelabellabelplaceslider1" id="scattersinglelabellabelplaceslider1diy" type="text" class="luckysheet-datavisual-config-input" data-bigclass="scattersingle" data-attr="label" data-func="labelplacediy" placeholder="\u8BF7\u8F93\u5165" style="width:10%;margin-left:10px;text-align:center;margin-right: 2px;" /><label for="scattersinglelabellabelplaceslider1diy">px</label> </div> <div class="luckysheet-datavisual-content-row"> <label data-tips="\u52A0\u7C97" data-bigclass="scattersingle" data-attr="label" data-func="labelbold" for="scattersinglelabellabelbold" style="font-weight:bold;"><i class="fa fa-bold" aria-hidden="true"></i></label> <input type="checkbox" name="scattersinglelabellabelbold" id="scattersinglelabellabelbold" data-bigclass="scattersingle" data-attr="label" data-func="labelbold"> <label data-tips="\u659C\u4F53" data-bigclass="scattersingle" data-attr="label" data-func="labelitalic" for="scattersinglelabellabelitalic" class="luckysheet-datavisual-content-column-italic"><i class="fa fa-italic" aria-hidden="true"></i></label> <input type="checkbox" name="scattersinglelabellabelitalic" id="scattersinglelabellabelitalic" data-bigclass="scattersingle" data-attr="label" data-func="labelitalic"> <select data-sliderdiy="scattersinglelabellabelfontsizeslider" data-width="50" data-tips="\u5B57\u4F53\u5927\u5C0F" name="scattersinglelabellabelfontsize" id="scattersinglelabellabelfontsize" data-bigclass="scattersingle" data-attr="label" data-func="labelfontsize"> <option value="12">12px</option> <option value="14">14px</option> <option value="16">16px</option> <option value="18">18px</option> <option value="20">20px</option> <option value="22">22px</option> <option value="24">24px</option> <option value="30">30px</option> <option value="36">36px</option> <option value="diy">\u81EA\u5B9A\u4E49</option> </select> <input data-tips="\u5B57\u4F53\u989C\u8272" class="luckysheet-datavisual-config-color" id="scattersinglelinelabelcolor" type="text" data-bigclass="scattersingle" data-attr="label" data-func="labelcolor" /> </div> <div class="luckysheet-datavisual-content-row" style="display:none;"> <div data-tips="\u6ED1\u52A8\u4FEE\u6539\u5B57\u4F53\u5927\u5C0F" id="scattersinglelabellabelfontsizeslider" data-bigclass="scattersingle" data-attr="label" data-func="labelfontsize" class="luckysheet-datavisual-config-slider" style="width:70%;" data-min="12" data-max="100" data-step="1"></div> <input data-tips="\u81EA\u5B9A\u4E49\u5B57\u4F53\u5927\u5C0F" data-sliderid="scattersinglelabellabelfontsizeslider" id="scattersinglelabellabelfontsizesliderdiy" type="text" class="luckysheet-datavisual-config-input" data-bigclass="scattersingle" data-attr="label" data-func="labelfontsize" placeholder="\u8BF7\u8F93\u5165" style="width:10%;margin-left:10px;text-align:center;margin-right: 2px;" /><label for="scattersinglelabellabelfontsizesliderdiy">px</label> </div> </div> </div> </div> </div> <div class="luckysheet-chart-point-config-chart"> <div id="luckysheet-chart-point-config-chart-c" class="luckysheet-chart-point-config-chart-c"> </div> </div> </div>',Eu='<div id="luckysheet-tooltip-up" class="jfk-tooltip" role="tooltip" aria-hidden="true" style="left: 505px; top: 410px;"><div class="jfk-tooltip-contentId">\u7EC4\u5408\u56FE\u8868</div><div class="jfk-tooltip-arrow jfk-tooltip-arrowup" style="left: 35.5px;"><div class="jfk-tooltip-arrowimplbefore"></div><div class="jfk-tooltip-arrowimplafter"></div></div></div>';Dp=function(e){if(typeof e.image=="function")return e.image();let t=new RegExp("^(image|path)://").exec(e.image),l="";if(t!==null){let a=t[0],o=t[1],s=t.input.substring(a.length);switch(o){case"image":l=`<div class="image-type" style="background-image: url(${s});"></div>`;break;case"path":let u=document.createElementNS("http://www.w3.org/2000/svg","svg");u.setAttribute("class","path-type"),u.setAttribute("viewBox",e.viewBox);let f=document.createElementNS("http://www.w3.org/2000/svg","path");f.setAttribute("d",s),f.setAttribute("fill","currentColor"),u.appendChild(f),l=u.outerHTML;break;default:break}}return l},Er=function(e,n){if(!e)return;let t=Ap();if(n&&JSON.stringify(n)!=="{}"&&Object.assign(t,n),typeof t.enable=="boolean"&&t.enable===!1)return{el:"",show:u,close:f};let l=Dp(t),a="luckysheet-loading-"+uuid.v4(),o=` |
| | | <div class="luckysheet-loading-content"> |
| | | <div class="${t.imageClass} luckysheet-loading-image"> |
| | | ${l} |
| | |
| | | <div class="${t.textClass} luckysheet-loading-text"> |
| | | <span>${t.text}</span> |
| | | </div> |
| | | </div>`,s=document.createElement("div");s.id=a,s.className="luckysheet-loading-mask "+t.customClass,$(s).html(o),$(e).append(s);function u(){a&&$("#"+a).show()}function d(){a&&$("#"+a).hide()}return{el:s,show:u,close:d}},Yl=["#c1232b","#27727b","#fcce10","#e87c25","#b5c334","#fe8463","#9bca63","#fad860","#f3a43b","#60c0dd","#d7504b","#c6e579","#f4e001","#f0805a","#26c0c0","#c12e34","#e6b600","#0098d9","#2b821d","#005eaa","#339ca8","#cda819","#32a487","#3fb1e3","#6be6c1","#626c91","#a0a7e6","#c4ebad","#96dee8"],it={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,PAUSE:19,CAPSLOCK:20,ESC:27,SPACE:33,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DELETE:46,WIN:91,WIN_R:92,MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SCROLLLOCK:145},Sl={fillStyle:"#000000",textBaseline:"middle",strokeStyle:"#dfdfdf",rowFillStyle:"#5e5e5e",textAlign:"center"},Zn=function(){return"normal normal normal "+h.defaultFontSize+"pt "+Q().fontarray[0]+', "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif'},wa=new Image;wa.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZoAAAGACAYAAACUS6SeAAAACXBIWXMAAC4jAAAuIwF4pT92AAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4IF5mOBCJhSDSSgKQg6YgUUSLFyHKkAqlCapFdSCPyLXIUOY1cQPqQ28ggMor8irxHMZSBslED1AJ1QLmoHxqKxqBz0XQ0D12AlqJr0Rq0Hj2AtqKn0UvodXQAfYqOY4DRMQ5mjNlhXIyHRWCJWBomxxZj5Vg1Vo81Yx1YN3YVG8CeYe8IJAKLgBPsCF6EEMJsgpCQR1hMWEOoJewjtBK6CFcJg4Qxwicik6hPtCV6EvnEeGI6sZBYRqwm7iEeIZ4lXicOE1+TSCQOyZLkTgohJZAySQtJa0jbSC2kU6Q+0hBpnEwm65Btyd7kCLKArCCXkbeQD5BPkvvJw+S3FDrFiOJMCaIkUqSUEko1ZT/lBKWfMkKZoKpRzame1AiqiDqfWkltoHZQL1OHqRM0dZolzZsWQ8ukLaPV0JppZ2n3aC/pdLoJ3YMeRZfQl9Jr6Afp5+mD9HcMDYYNg8dIYigZaxl7GacYtxkvmUymBdOXmchUMNcyG5lnmA+Yb1VYKvYqfBWRyhKVOpVWlX6V56pUVXNVP9V5qgtUq1UPq15WfaZGVbNQ46kJ1Bar1akdVbupNq7OUndSj1DPUV+jvl/9gvpjDbKGhUaghkijVGO3xhmNIRbGMmXxWELWclYD6yxrmE1iW7L57Ex2Bfsbdi97TFNDc6pmrGaRZp3mcc0BDsax4PA52ZxKziHODc57LQMtPy2x1mqtZq1+rTfaetq+2mLtcu0W7eva73VwnUCdLJ31Om0693UJuja6UbqFutt1z+o+02PreekJ9cr1Dund0Uf1bfSj9Rfq79bv0R83MDQINpAZbDE4Y/DMkGPoa5hpuNHwhOGoEctoupHEaKPRSaMnuCbuh2fjNXgXPmasbxxirDTeZdxrPGFiaTLbpMSkxeS+Kc2Ua5pmutG003TMzMgs3KzYrMnsjjnVnGueYb7ZvNv8jYWlRZzFSos2i8eW2pZ8ywWWTZb3rJhWPlZ5VvVW16xJ1lzrLOtt1ldsUBtXmwybOpvLtqitm63Edptt3xTiFI8p0in1U27aMez87ArsmuwG7Tn2YfYl9m32zx3MHBId1jt0O3xydHXMdmxwvOuk4TTDqcSpw+lXZxtnoXOd8zUXpkuQyxKXdpcXU22niqdun3rLleUa7rrStdP1o5u7m9yt2W3U3cw9xX2r+00umxvJXcM970H08PdY4nHM452nm6fC85DnL152Xlle+70eT7OcJp7WMG3I28Rb4L3Le2A6Pj1l+s7pAz7GPgKfep+Hvqa+It89viN+1n6Zfgf8nvs7+sv9j/i/4XnyFvFOBWABwQHlAb2BGoGzA2sDHwSZBKUHNQWNBbsGLww+FUIMCQ1ZH3KTb8AX8hv5YzPcZyya0RXKCJ0VWhv6MMwmTB7WEY6GzwjfEH5vpvlM6cy2CIjgR2yIuB9pGZkX+X0UKSoyqi7qUbRTdHF09yzWrORZ+2e9jvGPqYy5O9tqtnJ2Z6xqbFJsY+ybuIC4qriBeIf4RfGXEnQTJAntieTE2MQ9ieNzAudsmjOc5JpUlnRjruXcorkX5unOy553PFk1WZB8OIWYEpeyP+WDIEJQLxhP5aduTR0T8oSbhU9FvqKNolGxt7hKPJLmnVaV9jjdO31D+miGT0Z1xjMJT1IreZEZkrkj801WRNberM/ZcdktOZSclJyjUg1plrQr1zC3KLdPZisrkw3keeZtyhuTh8r35CP5c/PbFWyFTNGjtFKuUA4WTC+oK3hbGFt4uEi9SFrUM99m/ur5IwuCFny9kLBQuLCz2Lh4WfHgIr9FuxYji1MXdy4xXVK6ZHhp8NJ9y2jLspb9UOJYUlXyannc8o5Sg9KlpUMrglc0lamUycturvRauWMVYZVkVe9ql9VbVn8qF5VfrHCsqK74sEa45uJXTl/VfPV5bdra3kq3yu3rSOuk626s91m/r0q9akHV0IbwDa0b8Y3lG19tSt50oXpq9Y7NtM3KzQM1YTXtW8y2rNvyoTaj9nqdf13LVv2tq7e+2Sba1r/dd3vzDoMdFTve75TsvLUreFdrvUV99W7S7oLdjxpiG7q/5n7duEd3T8Wej3ulewf2Re/ranRvbNyvv7+yCW1SNo0eSDpw5ZuAb9qb7Zp3tXBaKg7CQeXBJ9+mfHvjUOihzsPcw83fmX+39QjrSHkr0jq/dawto22gPaG97+iMo50dXh1Hvrf/fu8x42N1xzWPV56gnSg98fnkgpPjp2Snnp1OPz3Umdx590z8mWtdUV29Z0PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAHBbSURBVHja7J13mFxV+cc/M7OzLbvpjZBKQhISUgAhgAlVkADSRcDyky4iYAAhAmpQQtMIiqigYkV6FRHphgBBKSGBkB5IIb1sdrO72dmZ+f3xniGTzZR755a5s/t+nmefTGbuPec7Z8497ynveU9on5m3YJMuwNnAt4B9gA3A48CPgY0UyPxJUzN/MLMShxwDXAMcAmwGbgD+UlBKhzVn/+yqqwrVFwIuBL7tZnkyYwaK98yaNb/QW6uBk4DLgfHAduDfwI+ApYUmOnHiKC+0AowAfgh8EYgAvwF+AMTd1OlQ40nAtcB+QIMpzx8Cy70oT8U6YZvXn2x+tN8A44ByYE/gMmA18B9g7wB9v58AzwNfADoBA4A/m4c5KPwWuCdDef4X6KVVtF1yGPAx8IDpAFUBPYGvAguBucCRAdJ7CvAecA7QA+gKfB94DKgMiMargaeAQ0159gK+BrwNqLUoIUNzFPAw0C3L5+XmAXoZ6B+A7/ZNM3rJxDTgl2Y0UUwmAxdl+WwI8HOtou2OzwFP5+hERIAxwDPAhADoHQvcbxrvTB3PZ4HaImscDmSbmukO/F6rXWkYmgnAP4wxyUd/U/m6FPF7lQO35bnmMuCvQLSIOs/J8/npQIVW03bDPjaejWrgn8boFJPpRks2jgReKfLo+yygLMfnhwCDtPoF29CMMUam2ka6Y8wDVV2k73Uw0NvCdV9F1kOqiqQzX+WvQqfP2gsDkWlcO79nD/McFWuGoAJZk8nHAcBM8x2LwRAL1+ytVTC4hmawqeiFNHaHInPQkSJ8rxob156ILBp2LYLOkAu/kRJ8egEvFWgw+iPT0cXocJTnGSmkMxJ4zfxbDJ1WjKYSQEPTC3jBYW/qJODX+L8WMhuos3H9JDP876NVQnGZLsbIDHOQxt5mVqGTz9rrgTdtjtpmmhGOouQ1NF2MkRnmQh4XATf7/L02GyO3zcY944FZZhSnKG5QDfwLd9ZZJiBOBOU+f4evAAtsjt5eIVhec0oADU21qdDjXMxnKnCJz99tJuIpt97GPcOA14HRWjUUh5QDTyAL0W5xFPAn/J2OXoV4k75j455aZMr9ZK0GSiZDE0XWVQ7zIK+7kI2efvKO+S6f2LinnzFSB2v1UAokAvwNONaDtM82z5KfbDBG7lUb91Qi+2z+T6uDkm5oQsAfkSknrx6+P5kK6ycLkTWYj2zc0x14EYkqoCh2CCGbcL/sYR6XIDve/WQbsu/rKZvP/B+BKVotOjbpHiW/RNx9vZ5OeByZv32vwDQmG51DsOdJYne/TCdk09xXgUcdfN9DkE2urwGbXCjDLsDvEG+5rcCTSASENVqdA8HtwAU+5HOjGWn8psD7RxmDNRZ7TgZ2p+1CyMbjzkZzoR3izyGOSf8DVrrUFv0S2cvWgqyl3Qgs0SrsnaH5IfAdn/LsgrgTH2rzR031FC/ysXzKzSjsBex5sQGci2wa7ZXWIzzZ5vRDW6oR76NJ5v9VprE4wxie/2qVLirXIaFQ/OIu03l52OZ93wTuxd/NytOQdZv/2bzvGMRzNeWY1Aqch2y2djLqvK9Nx/prSKidc8wzprhI2PxoN/qcby/Tg7CzN+BbPhuZ9JHNWTbvmW4qcvr362xGH/sXqCOCrJ9NylKezwB9tUoXjfPM7+4nEdPg2pmOHoXE1itGRIyLbV7/VdNODGvTOXY6xf8rMs/e1AAPoc5Anhia64uU9zDsxSD6VhHL6ds2e2DX5RjNPYd9t/GQeThOymO8r9cqXTSKVfblyNRuZ4vXX4D/LtLpowarcdGGmPYhksXAPkhh671T8zzPVfi/HaNDGJo9LF77EWAlhvetNvK342s/oojlZGe387UWRnN2A4/ebNHQnqpVumhYfY5WIfu18vFzZO3ACt2QfWBW2KeIZVSB9ZhjV5A7MnQVst5rZ3PoNy0akckUL3xWuzU0b1h8OI5FNkLm4zc2jI2dDZUbi1hOG2xce6iFawYg61TdLVx7iemFWaGzVumi8YbFenQcsMLCtS8jrsxWz3tpKIHnCGCLxeusRK7ugkytWYl1dpIZIVmJUhLFXhgrxYKhud3Cw3GUMTZWuQ5ZuM/HEzbSfLqI5fSkjWuten+Nwto5GVNt5P2KVumike8EwTrEYeNDG2k+jkQZz8cyrHtxPlHEMnoLObfKTYPUC2ubYi/Cusfc+9jb6K1YMDTP5xhO1plh5GKb6SYRL7an8/Ss7Cye/gg5LMpvmhCPGatML9JvuQR/3GqVzLyU47dvBE6jMK/A35B9zS/1rH3X/GvV0DxVpDK6zsa1P8H61KHbsxdnaHV239CALGSex65TRNsQd793Ckw7bob+r2X5MU8E1tqsABOQHdfNPpbRbJvTDffZNExuPRyTsTfFp7jPDchO+LVtjMyZyFSYk9HS3VmesSuw546bRDaT3oi/02hbsrQF2XgT2SIQ91FjI/AldC+N66Rv2PwjcpLeoUjI/FkuVMTUD/d7Y1i24GyD4Xrg66bn3gfrIcwxUxDftZnfJxTmUn2jGdJf6sNvmBp16sMRDP6CuKEfjBzP/KbNDlWu+rsNcQqJIGGSbkKmo+wSM52hn5jnyM5xzIcj0+J2PNe2m05nzKbOvyPrML/24XdrQQKIvqVV2FtDkyrsVz1oCN0Ox7EDawuqIIt/PynAyHyALNyudtAwdMXbaAstZkrmHa3KgSJms/dudSRyHfamn6zMOnxq4/pTTaNvx8hsAk5w0ID/BnGaucnD3yuJzOg8o1XXG9r7oVoRJFyL3T0Os5BgnKtdqLxeOTHETfovazVWfOAi4BGbo5+V5jlyOkqYDvzCw+92HTKbo6ihsU3Kz/58m/c9jbhyb3FBQwvZ16mccpk+HIpP/BCJJmAnztl84PNY23tnhSke1fefYW/vn6KG5jO6IN50dsNU/AGZimpyUUtqnWqei2neSuHBFBXFKiHECcFuiKo3kVBJK13UkkQ2XLo5Q3A/cI3+zGpoCuVeYGIBw/ML8cbLpQ44GncW7H+Hu/P0ipKNb2Mv/BLIOscXsLa52y6tZobgPy6k9SIy9ZzUn1kNTaF80ca1CeByxDXVy0q3AZmSW+UgjaeRSAH6cCh+MNnm9X9CHAYaPdTUiERBn+sgjbdMGi36EwfT0Fhp4BIB+F5Wp75akLDgfp1YuBw4nsLOpXkDeyFJFMUp221ce5sZIbT6oKvOjJoKmSFYgkxlN+rPG1xDk8+luIlgbBq0Emaj3jT6D/msbR7i7tlo857j9eFoN6x04VnzAysRBJLIQv1Un0fahcwQrEK2LOjG5oAbmnxeH48he1yKzfQ8lWkdEjn6pSLpewtxVGix+HAcj/2D15Tg8mCekf/7uOs84kTnm3lmBL4G3FkkfXZmCOrMtUu1+vlPmc3r/4UsRl+Y5Ue/MiDfa7UZNfyT3Q9XW4as4RR7J/1LyE7k+5Aw722JmYf8Apyt6yjBYw4Su+8nGT7bioSxCQIJJAzVv9j9wL4G4HTEu7OYzEPWkv6BRDloS9xcc4mbxnvWrPmB+IEmThxVEhW+EGeAi82PNtf0aFYju4UPCtiQ9H/AOGT9ZRUyrfcY4tsflHAtTyIhzi/NUJ79kHAfi1HaIzchMdBmI7H7NpsRxEFmRBMU1iMenFORM6l2GM2HB8DIpD/rQ0x5vmnKcxMyA7M3sJ/RrJTIiAZkHva3WDsGoNisQTzKLg+wxjpjWH6t1bFDUY1sgEyav4TpfScCqLUJWey/LcDl2YRELnikBH77k5EDEsebkeG/KF50en8MzfxJU/WRd4MZM7QMFKschhy/nD6tW4XExTsL2U1/BR3wfKHUVFCxp6Y8nJK6po3BrgK+gawfTQIW6IimKI9kM4rSjvgcsh+qS5bPI8AYZOPjUbgYTXjixFFWGvAIsmbY3fzb9nWuz3Yga7h3k8VrzmEDPhwYbUYBb2L9VNFUg/4dY8hHmbZvCTKd/jNkbcxrRpL97K+eSJifw9XQKIrihH2AZ3MYmXSqEWeWI/HOA60PEl7mc0APYzScHAdebXrs1yBrjlchO/Cd0h/4K3BE2nv1yHTTneR3q+6OBJ8dl6Hhv96MJCfhvdPN2eSOF3cYMJBguLa7a2hGvVb8eHLtYvruqquCo0Wn8YLIQGTxvJeNe3oYw3SIB41gZyRK+TCPvu9Y4DkkUsA/HKTTAwlKO7jN+7XAz5HF/kvzGJvpGYxMOoMR54xvelwHBlu4ZkB7NDRhff4VxXN6Ie7s/Qvszb9s00BZ4bseGpkUEeTQw04O0rg+TwN9CRIMN9dIYYKFfD7nR8fewjWh9vgAhB1WgM3m73qUFF8CPkRCcSR9+ms1eZ6kxR84uhgj46RR39uMCjq5qOsMn75/byQieqGcbuGac5GTTbMZGysLvT20qgbP0HzJDDVTi4A3aSP3GX9GFhsjPuYZMXn+RYs/UFQjrqtjXEhrAuJEUO6StmE+lsP3HdxrdRR4DvBwlvKxEkm6m1bXYBma/mTe8zHDg+F9KfJQB81b2ZVyJObeIS6meRQSIdmNToyf+3VGOrjXztrUaYgXWUUBhqYC8UxTAmBouiCLk/2z9JAecrHHVapcgr1z2N3ieiRqg1J8IsDfkKCPbnM27kQb93OjipN1h6dsXn8iMs1Ynfae1dNydVTjEWU2H57780wDHImc7X2JawpnVgantKzv6TkTWcD1y+g+CNyi1TkQhJCoGV/2uDOzFvixgzQeBg70qUycbIb7MbKTfqCNe44xHeITkb02dgzNp1qFizuiuQsJVJmPb2H/VL72xuv4d3rf28D56GFoQeF2JBCq19zosEP3K5wdHmYHJxHdNxrDYfdY6FQsti42DI1Th4Awspb2JSRWoRuUIxs5601Z/AUY2l4NzVSblfpOZD7ZbWqR8A2fIHPMXnlxJUwet5k8C+F+vD9y+VO8P9FQsc51wNU+5neXGT0XOso4GtnJPx8JTPk8Mv39G2QH+/eQTZfFrl+LjOH42OZ9hyAef1an7pxMnU0GFiLBO59Gotmf5fB7p6ZgLwJqjCH8OhL9e3IpPRhWps5OQjY82SFqKuwhuBcpuRqYiQSi82P6YyCyw/lYJOJzIQ/brchu8G94NB1xGnqEQFA4r4DnxCkRZMf8RmSqtpDRwkU5Pu9sjE91AMp3ObJz/kUkFI1VDjDPoJeG5qtmpBFuMxL5i2k3nnbQkcg0BVuDxMo7gBKJjZZvRDMBeIDCvNN6Il43XVzSer1PRqYt43G2T+jCAhsBK+m+hRIUirWXrNw0Op1dTrcaibc2IUBlvBIJQ/NRAd/FK0OzN7JhNJylw/2AMZB2yTeLVF2Ejo0nhmYvdvfesMu+Zujnhjvm2UUsJyd5t5iRh5vxqm435aoEhz0sXrcKCf2Sj59j7QTWVAPpZiesCvH2mhTAcl6DTKPN8SDtQgzNVezuTt3WIDyNhOSxyiVkD76ZzomzZs0vD8ohbIUYmi7IoVxu7Is50WKh5WPPIpaT07zrkLUUNw6Gewbv134U+7xh4ZoNyJn1VmJZvWw6OHGL+Te49D1SI6QvBLisNyDrS28HwNAcYOGaLsiU3xAL156ETJmFLP5WnUrh4QhnEf847uxmTnENcra4E1YXsZzcyHsp4o3iZGH1Q1OOcZSgkc+9vM50uj60kebjwGUWrlsGvOfCdyhDXOWPd7ls6jwo783GGL7uYprdC7hnq8XremFt8+73sD4D9DbWPeoCZ2juxRuPsd/hbL73gSKWk1t5v2V6qYW4Im9Czm+vQwkiL5F9zrwRmT79bwHp/ibPCDaJBMh06t6e8nA6tYTKvM6MEP9TREPzQ6xPcbo9qju7VH6otoZmKvB/HuVVaXpo/Qu8fzrezMvmYw7uLro9jf2pr1bEjXUJSpC5wTw/a9sYmdQGXiejpbszvB9HTuL8h0PdISTK8lds3vc84tJbTBrMCOzfLqRVyNTZm/i3Zy69Tn2plNqDdEPzVdxZS8lFP2Nsqgss3MOQmGp+nNewAlmQPQz39xHcanqqVvku3niuKe7zF8Q1/jAzihmKHGDmlMuMwdkCbEPW6j6P83A0IVMXv2nzvv+Y0Y9fvfnO5rvOR6ahlwLvINNHM3FnDbdQ9+b7kdM7/aDFzGyUlMdpah/NocB9+HMWwoGIO+A5BfQC6pENcVdT+lyGnLORb+PVPVl6s0pwiSGHdblJ0oyE3XYE+Tn2Y+S9ifP1Rrsd4ieREFde4mTD5q+RdZhpHupLmtHTC6X2QKQMzSP4GwzzLMTdN/8I6rBm2ilxZI71NbI7XrwCXK7ttuIRl5vRsh3eMZ2jeh91nuaDkXFqaEDCAvVCTvz0gmvN6KnkCJthc78i5D0dCT7YkalD5pcz7e5fisyZt6Ao7lNlGkY7zAO+yK4OKVY2czvtLZ7uU5m40au9zCNjcCvw01KtbGG8jTJrZWTT0VlF5iCkV+LOvhtFycQEoKuN6z9C9q5savO+lViAOxxqHe5TmfzZhTRS01vPuKjLj7iJnhua85EFNj/3ZsRNnv+nzzsgXkM3ID75683rp7VYFA+xEyx2CRJBeUOBowCnbUvYpzL5lUvptJjZCDf2+PwT/73aXKcMCTXxlD53RWc6JRS7SCl5rG4c/QTZV5dt0/LLFkYcTj2kluB9nMMluOuq3Ygcq5JrDRYL5XYm7WD6vEyfN5eYMUPLQCklliFhUXKFmlllPs91FsxU05B+PsvnryOL2E54AjjDw7JIIjvy3R411CHR319DTiC2a/j89Ozz1tDMnzRVHzlF8Rcrh3j5sVfsXNMIDs6i8RjybwqsQ/YMnYl4h40w7y9FTvF8GDnfyQkPIftUDvGgDLYi3ndPelTGaxEvvVexvtdnFeJl127WaHVEoyj+86DpQWdbe3gfd6N952rQPocccfBlJGrHKmRT9XRkvdAKCfOdHvRIZxyZhrrNGLVo2mchcjs1VJM5uvJyxJPrYazHKyuUJcbYvEb+Y1NyeaKWrqEZ9dqtgRCiIyufuOqqYOnpmFOOc4AfAT/J0sP200lmE+LheGVQCidL2Pst5D6kzRMNEyeOcivJecg02jNkjorfYurFFW52MoJyhEDpjGhmVhY3//a7cVQpDjchi89XIgvdjUjssB8Ci7V42iX/RaYpT0M2dY4HtgP/An6A/aOqS2dEU8A9XZAd7d9CjkjdYIbaP0aOhu3YtF+DGEJO9fy2/u6uUI1ETE6avwQyRZTQonHEPsZYH2PK91dIWJigHK3RiETJLoWDC7+JbEAdbUa+T5myXG83IbuG5mTgj+waqmFPI+ZiYDZwgY89sj2Rk0ArkXnaKvOXel1ptKa/rmxzTRVyBvd7wJ3I/pXt+rzuxm/bTF2kfvcTkc1/urnUOocjYZ/Sp1CqkMC2ZyF7zK5AQhAp1jkN2dyY3tu7ARiFxFbc4VZGqSm1Yk9NuTi115Y7TR1M0Q85+fN4YCI215DsGJqjkIWzbDHRypGFupcR7xAvF7MipuE7H/cCgR4E/N00mBfizt6iEOLZc4Xpae1AFgSnYf9skqh5YHoCnwKLfOylTSb7/PgQJDDj17Wds8SBpm51yVG3xyBz+UfhfZTersjR4HYX2TtlaQuWIlGmH0GiTPvFOPP8VmQxQM8iUY/9iNE2wjyrDUgAUjunn1aZ9uJMk0YYcSZ4xDxnfpxHdVgbI5POIKPjTDsJWt1xOwHZvW4l8GZ/86N28bAgrjYjJy+iTfcCHjOF7dTI3IdEqh5rHuIa02i/bvRboQb4mTGAc5C9D/ONsbkO66fxOeGcPJ+fTu5z05Wd0zr/tPhsVJtrx3ioJ2Ke1QtN47hX2t8QMwOQ7S9bWzAUOdtmKd7ufWnLLXnq4FHI4XQ9PNTQ34xCFyDTys+b5/S7Fu/vaTqgtwD7me8TZed04DvAHj6UZb4D1U7B5hHSVgzNGGNk7JwhM8ZU4GqPHg6vPWQipnF32jh/M8dI8l5knSsX5UhI8KsyNE69ERfUe32oeIMs9MJ6qR3JW4bP2yynHuY56u+Rpq/gzd6UVKP5EOJp5TVVFvM50MwoeFGePUzaR7R5vxa4A1krytcxvhnYN8fnQ43B8ZoBFmZXbJVhPkMz2FT0QhqRQ5EjkN3uce9jGlk/pjic9B7yGZEQcoZFrgOTTgUOzpPOuRYqhlNCLtSljkxvMxItpIHrj0xHe2HIvT62OYwcVOg1lTbamX2AWbgfqPN6Mm98TXEpcrZUrufkIAv5HBSQOl1utyJko5fpTTux/ieZxtTNKa4ePhbmjx0aRCsN+C/JfubMEItpDEIJKl2MkRnmII29zaxCJ5e1DfXh++9rsR47YQty0qad0eVMZHrKLawcZXAhEiE6m1GMWUijWyk+BOEcD8cLDh+OFBfh7hHRW30sHyfHGFhdAAwBvyDzdGCTxTRqUYJINbJHwo11lgmIR6SbBxT6FRH4Uh/yOANxkLFKHyQszOEu5W+1Q/41xGkhmsVg5qN7ezE01aZCj3Mxn6mIa5wbzMe/0/2cjMRetHn9DHY/otpqQL1qlKBRjgSDdHMN5CjgT7g3Hb3Ip7I414c8PkEceN61cU9n0xH4kgv52/GyPZPMpxpbMTRd8McByFNDE0XWVQ7zIK+7yO/NYIUY8DufysdJ5NRbsO+K+FNjlFNY3c+jhiZYRJD9HF4shJ9tniU3eMyn8vBrF/M6JBjlf2zcU4V4iH3NYd52t0OcbO6psmlooASnz8Jteu9/RNZVvHr4/mR6ZU6ZhvinB9nQLEWm3pps3ncLO0/Ts7oPoUbb9sAQQhZ9vXTtvQR3vI8eR6aPvGaLj+W/DdlC8A8b95QBfyH7WqkVfoz9vYPHsatH76b2amjSN2z+EtmZ7PV0wuOm1/Geg3TqETfCVMTZHcYo1JmGvRHx5jrZhUrrhOcQn/MnbI46ppvfZpbF62td+F0OMRX4NRsVPt8Q/3dI5ICtSBj2nwBr2rmhuR3ZSOw1NyJ7q37jII2EeUamI8c0p/ah1LEzFE4lEoLECZsd3LsvEnVkLPacIexGPUmtldZQ2JryRuTsHrvehUcD/0aiU/s1ooki3qw9gTfMSNApnZGtFieZ+vOPdOOb+jF+SG43WzfpYgr2UPKfdZGLFjM9kYkfuWBkwJ1QNM+bwn/aprG5EXEtt4KTqbNzkfDrvdKM68kOe7rVpqJNSpueuMT08k/EflSEUuE6dl9n85K7TKfgYYedqcty/I5PFtHQnGdGh34G//0JslH2/QLuXcjO6CiDbdw30bQTj/hgaL6C7Ozvl9bGnWmjrcnWUX2CnbNVVYiH3anGgP43bH7MG31+IHshi3Be7A24HplacwO3Trd7yRS43fSO99jQTEeiF/Rq0zN5Eti/wDQjyDrfpCy/+zNA33ZoZM7D/6O4I8BfcWc6ui01pvE5xoW0Cpk6G10EIwOynODEcWk54slmtxM9AevbKQo1NNcgZwb1S3uvkzFwBzuog/dnqYM9U8972DTMxWAYEqrCTaYi4dfdws1jVF9F5o4bPGoU7HIMO9eCMo06n8O+e3sI2QF9Up5ORrHqnJcU6zuVA4+aDoKbsw7P457rbyGG5iKKd4zJN3G2Z2mFKbuPCpgJsEIhLs4HI+u/2fJ9jsLc8O8i93pkL+AHYazvfv8IcS3Oh52T1I50sXJcnaMgnUwruMlMY2zcds8uZI0m3znuvcwUgJ355pvJHxEBvN+RXgysPkersLb29nNkethqD3e8S9+juxmBu+mWXYih2aeIv2UFzjdBf4qsI8/1QF8hI5qryb1Bv5DOpdVtKyeHkcUgKw/HsViba/2NDWPjVkM+BXENdhsvjguYZYyNm1FYC5k6O9TCNQOQ9TQrPahL2NU1OxedaX9YeY42IJ5GKyxc+zLiymw1QrcbI+XeJt8DXC6bQgzNpiL/nm7kvx6ZUnrXZW3dPHre+yFLGr0tPu9WO/a9w4iXTL6H4yjsue5dh4Txz8cTLhT6Fab3ZwerD2+jR5X4ddPguGVsCjE0Vr2/Rpk/K70bq7THc1byPXR1iCPEhzbSfJzsC/XpLMOZF2dqRPYq7m7UdmJonijib/km7nhipQzWUbi7HaMQQ7PW4nXDkDiPVgyNVf4RRuZib87xcEzG/kFmScSL7ekc12zE+eLpZUhkVDvUYX0+vdHDyjzbjBK3upBWIWs004v0EC/B+hEJpcRLOcq0ETkTpRBvu9+QfS0t9ax9F2fhZAYaI2N3usrq81HI6OARZCG5GHzf5fTqgC8iWweKZWhuxr+QQ+ksBS5Pzdldj3jNpJ+SuA3ZA/JOgRnEzdD/tSyjpBNtWNlsFvUX2AsTU4csgltdpHM6tRdBDgSbgUwnXofENLsI2czZz7zvtAIUskZzH+5551llg+m4tNfTOG8A/q9NvW5E3EdfdjhaujvLM3YF9jYntmUIspPebjTj/2F902ghI5qkMc434e802mbTCXSbejOL8aILaRViaB5Fjhvx+3k/Dlid7tXxR8RN7VDkZL1ZOD8LvhGJI/R7Y1i24M7GvQvMg2fXyBxnHpBzLN7jZI0mjIT4ONmHH7RQ9+YbkUV/P4IepkbHS2jf/AVx705tiHvTYYcqffS+DXG2iCCOJTfh7ATO4abhs3vMxCzzPFsdmRY6ao8BPzAdoj7YC2VzpBkNRm3csx3nRz53ZvcNsFvTOpNuhOMp1L35DvO8f9+H5yDV9i+B3d0HW3A/JEUdsoPfLQ4yFciOkalH9qTMtjkCcDJ19nWfjIwTQ5NqwLribVSIFtM7fYeOQczFaZL0Hv515J5Gs0NPJEK7XSPzimlAttto8JyGoIkjXlxWOcN0RO0YmU3IXjcnhjuMxC87wuP65eSolOvM836Jx8/7yellWYqHVV2PPf/6BmNk3iigYXZiaM7zsUycxDpLGq1Pe6QtbtJ/GSVI/ABZm7HDv81IJjXSt7qfw89YZ99GNiXaOVr8E2R3/lsO8z7NByPjZEST3rl80CNtqfbkxbYWuNSws/em0fRSZhU4AnCyRrOfj2VS5UIP5GwPeuGpSn2/tuuB4xSb1z+NbMRN73wFzdDcaEYydsLofwB8HljgQv6n+/Q9dzi8P46sJb7ggbZrMz3vpWhorM5xNpqRzEwHIwAnazRVPpbJHBfSSM2pznNR1604C/qoeEc/G9c+ikx/txTQs64HWj3+LqmI2XYjWs9CYpOtdknHCJ9+u/tcSKPFdDbecvl5z7ifsRQNjZWGsNH0vv7j0Ag4MTQrfSwTt85lr0MWMd1YsP8d7q0nKO5jdc3jfsRDMlOUAiuGxg+PscsRT067I7RjXR5thXz67e52KZ1UZ9yNzuX9uZ73UjQ0v87zeZOx1C/luMbK5rbN2Ntc15YXfSqPjTiLvNqWDeYBXOUgjaeRxcYkSlCxcujZH5AplmwbnK0cK+3HtJndEzL/gKynNLmsww+Pyg+Aj11Mb7MxNssdpPFPZF0m6ZahsdJwJHwYNv4xxzD9FPLPPf6N3HsPms0D5sQZ4Kd4u+ET0wCcj/uBOpebyldIb/QN7IVOUYrD9DwN1m+QUO+5fkcr0y7/8+G71Nn83hd6VD+9jmaQwJu9MKkQY4Xsb3sL2SeWMy6fXUOTL0ZTE95vxkuaxvUbSCiXTUbXn5AF+OctNtCnGGPyH2Og4ubBuxeJYup0V/Ji0+Bu9qgc3jaVwytvsXnYP9pgnjFQjSi5WOnCs+aUTchRDq9m6KxdieytytexvN70sLOxDH+OILHSwCeQKbYbPBxpP4Q3mz1TMxdnWmzfCh2NfcGm0V5iRpN5n3e7YbjvJ/d+i8dw7hFh1dj81fw56R38xfx5xdPIPoXhyL6FSmR9qFva667m39TrSsQrLv11F/N5Ajnk6gfY21dQKG8ha13PWpgmWWWMTB1KPh4Evpejo/c+7jpl5PrNjjT1c7QZGb9pY4S8EdnXdoVpBEchHl9LTFvwM9wJsZSPBxC35mwRp1tMx/QhH2YYjkcOEjyMXffxhMwznY1OWZ6xpUhkiEdwP5p8W+aa5/1f5PfMTdUdSwMLu4bmX8gi74VZpluu7LBNx8ysznCNuOMVZl3HYc1upvgScirffWRe/I2ZxukCnK3r7MpVVwXr950xw83U5iCnwP4kw2dbzUjbTxaZv0JoQryNbi3irxNHNmlmOlOlHjmW4iWftGzBvmNCoFoyxMPw76aDm+l5fxuZVbL8vBdysNDFSNjrS4CRxqI9ZR6cjZ59fXcbT8UeTyI7wr9qfn//fvf2y03I0b9XImfJNJppkR9iP4itIiP8CWZ09Q1gr7R26n0tHls8i5xDdZYZKY5GplqfMbMptiNbF2JoUmeJJNv0KIo1YvAH7w3dMchRq4cg6zo34O20nl3qEI+/Xwf8IQmZEfe3kWjEG5Bw+z8OoEF8BOvnxLvCxImjaMf4Prpqx+XZgMSodOUUZLuG5mTE4yt9CmVPZPf3xchC2AXaI7PNT4xhSdEJ+DMSWdfdxdTUFFD7Ndy/bTN1kaqfJ5oer6vOKu284VZKnKDUTzuG5ihkITrbonA5sgD2sumVr/JB/56mMU5fVK80hjD9db5F+Bpkb82diNtzg4+/wTfbGJl0piEB9K7A2z0pIeBck88+iEPHayZ/u2eoRJFF4Z5mOmMR/rk6Tyb7/PgQ5IC8r2vzo42jEkxDM8E0wFY2aPVH5vgm4Z0HUgj4pZkecWvT6UHIAthGMyp7yofyL0c8VHJxGRJT6lxkIc6LsrzPGLx0YzEZmc67xOLwucYYpgvYdRFxPXJu0G0+GJx8xz+cbvTt0EdfUfzDSiM9xhgZO6HoxxhjU+2R7suREzy9iGzQE3HNPMyH8j8Ya+dzfxVZZ/Aifto5bYxM247IvcgZKPkM5gvIZrK2niq9kU1y9/pQnoPyfF6FnMehKEqADM1gYzAKeTgPRfzbIy5rDgFXe1wuEWQPgNfYCe9/IhKmvavLGr5lobx/bQx7Nk41RjMX52L/7JNC6oYbnStFUXwyNL1ML7W/g/RPMo2Um8HmhjrUZJUDgT08zmM29qYXJyFuxn1c1GDlnPjUVOXlWT4fYjGNQfrIKYoamhRdjJEZ5kIeFwE3u6i5t4/l82OP099sjLGdHb/jkfDmg13SYNXxIYSstWTalGs1OGGtPnKKooYGZF3laWCci/lMxb2jQ/3cC3GWD3nMRDz61tu4ZxgS5220C/nbjTI9g92nLq3GNqvWR05R1NBEkXUVLxbC70KCTDplCf6ccZHqxfvBO6bMP7FxTz9jpA52mPct2PcO/KnpPKSwem6PGhpF6eCGJoRsxjzJo7wiSITloxymk0A25fmBn1GIFyJrMB/ZuKe7GZEc4yDfpWbkZvdsjlvYedCR1am/Gn3kFKXjkb6P5pfkjszsBuWIm+6RWDt8LBs3mxHApAAbmsmmPIcAFTbui9rMpxMSg+iryJG7hfAccmzCEzZHHdNNHZpl8fpaF+rPIcjG29dcGtl2QQLFnogEtHwSidSwRpsHRXHX0PyQ3O6rbtIFcdM9lMJPpGtEjhz+MuIyu8O8V4ccWrYdWRM6zaHWQsJyh9g9DIrXlJvR4gsUvkn2eTOafdqmsbkR6yd8Opk6OxfZ9Nkr7bc5md3PU7FDNbJHLNVhqTL15gxjeP6rTYSiuGNozsOfw4nS6YUcOXAohceeiiE7+TPxfReMDFhfe0jnWxQnTHgnZArsHgdpvIQcdvZPm0bheI8NzXR2P4+8sxl9HIVE6bVLBFmPnJSlfj4DjAXWajOhKM4II6fkFYNhuBQZtA3fwz136kKmzr5VxN/z2y6k8Soy7edFvLdC1miOyWBk0kfHz2HfDT8E/Irc65G9ivhsKEq7MzRWNyV+BMy3cJ2dEN1Huvx9pgC3u5heIYZmRBF/z5EupTPTGJt6l/UVskYz1cLo+GXsbeK92WKH4FRtIhTFHUPzhoXrViHn02+2cO1vbBgbN48mvQKJzusmhegr5pknbobAn2WMjZuBUQuZOjvEwjUDkHW/7hauvcSC8UrRWZsIRXHH0OQbAWxA5sHthP2/DmsuyE+49D2+A9zhQfkUskbzdBF/zyddTu914DgXjU0hhsaq99co8+d0hJTOK9pEKIo7huZ5sq9p1Jlerd2DzJKm8X86T89/ugvf4RLENTtkU58VCpk6+xHwcRF+yyYkTL/bzDaj2a0upFXIGs30Ij0bS5AjBRRFcUjKvfl682C1dR89Bdm1XghxJBLAc+zu2bMB+BLOPXouBO62aWTqTONlZS2nEEOzATm/ZwbiJuvXUZazKXzaLoIcFzAe8ebbhriJN6S9vhXZpOkkWkIhazT3IVNj03x8LjaYDtYGbSIUxT1DAxIV4H7E5bgrMkfvdL2h0RiU3yP7Erbg3oa48xBXXrtGZjLW5vJTxrYQ1iMnOV6ARFq2c5LpZcB3beb3CYW7VIeR83dO9qG+FerefKPpAF3qg8ZUHVmizYOiuG9oAFpwtgEu24P7ZZfT/Bqym9uOkalH9nu8ifWYa9sd6twBrLB4bcgYYLtG5gNkHWV1gRq/7pORcWJoUga4K95Gr2hB9l+9o02DonhnaEqB/YE/YO8Aq+3GyLxhs8HzK9ZZxIzOzrd53yxkL8gWhyNDv3AS6yxptNbiTTy+uEn/ZW0WFMVdSvG0weuQkCtWaTRGZlYBPWs/DE0VEv/NrpF5Glmk3+Iw//18/O2cHkXdYkajr3mg7TJk6lhRFDU0tgJpNiJrQzPbvN/J4v3bPP4uXdgZY8wOf0CmeJpc0FDl4283x4U0Uut+81zUdSuy/0tRFDU0toxEI+I1l2kvhNWNeNs9/i73AhNt3jMd8baLu6RhpY+/3QyX0qlDgqq6sWD/O7KHuFEUpYMamrkWrmk2Pf4XsnxudW3Ka0PzRRvXJoDLgRuwvg/ICi/69LttxHqUZytsQKYOVzlI42lkH1ZSmwJFCY6hsfJAJjzWfFeez1uQGFX/znGNlbNwNgMfevxdrE59tSD7XO7yQMNP8X4tKo6sQbkdqHM5sv5WyLk0byDrPXFtBhQlWIYmn6tuE95vcnsAme7IRIMxMs/lSeNhcoe/aQb+z4cG2EoInpRb9kMeaVhsGtzNHqX/thl5eBWaZx5ytEGjzXuOx98TVBWlw2LXvfl+cu9jeAzZO+I1FyFuqJcAo02D8Qqyc32BxR72Gch+nHMRl+lOyHrF86aX78eGvelGR68sn68zjajX+zqeRnbfDwd6ItEMqpCTLFOvu5p/U68rEe+99NddzOcJY8x/AHzqQzm+hThUPEt+j8RVxsjU6eOvKME0NP8yo4kLs0xjXOm6wplZI7g8aP4KJQH8xfxZ03FYc/bPnypo0/pqTr47ddBYW2OzDPgiT11q3+AdVlB5NOKOV1ixeAn4ChKypluGz2PIZt0LcLauo3jMxRdfHBgt99xzj/4gRTA0ABcjJxpegpx/sgF4CgkmuVGL1CZPXfo/Tr57HHIq6KlAD9Mz/w5PXaqnO9rjSTOy/aqpp57Xz1JpFLXxVkrF0NQg0zhHIsEX+yLOAT2R6Z8DTI/4FdNDbyjSd2qrcwgypQMyXbI8cDqfurStzkmm0fROZ67RWWlTB/za/BWDPZCp3QPwbo9SEzKdei+FxwwsFZ19kaC/JyKH25UhzjG5PEIbzAg2E0l2j0QeQyKuP4Ksm6oXYhEMzTDgWmTBONselt7mb4LpSW5HFu1vw8Jax/xJU934Lp7rdIlS0VlcZswoRdWnIFOxtT7k9SXgKiRW3VPtVOcYxP2+d5v3y8m9FtetAJ0HA2eZTt2ZqKOIq+TyOqtEdkx/iMxrd7KRbidzz4emcfQyVL7qVILAvsiaYa2PedYi3oj7tkOd5WZ00dvn3/EE3NtYrOQxNEORhdNrsRdXLFNlucakNcwD/apTCQo/ACqKkG+Fybu96TzJPDfF4EJkmk7x0NDsjxzhO97FfMYjQS33dzFN1emuTsUZRxUx7yPboc4Di6gzQqG+m0pG2q7RDEM2O/byIK8+Ju1Dcb7OoDrd1ak4p6edi+NlYbb0q6KuTyVNtVGSYQgloKo+Rpd1zXT7tIlIq+UgG7280llR1srofqsZ0WctvWrqiYQTxBNhNjTUsnBdXz78dE92tJZ5odPW1F6nUIgxkQj7lpWxRzhMp1CIeDJJXTLJikSCD1pbmR+P2wlb0kWrtDeGpgp41KNGMb2iPYYsvBUaeVh1uqtT8ZGWqggrxnRl3dBaEpHdz+3bQhWfjuhMOJ6kz9J6Bs7bSnmT/1FyOlc1ccK+7/P5oUuIRjLnf8TwBcTiEV5fOox/fjCObU1VvuvsFApxXHk5R0ajRNt+GArRExgaiXBkNMrmZJJnW1qYFYupW5nPpE+dTQPG+ZDnWJyd/6463dWp+MSGwZ14++T+rBneOaORSScRCbFmeGfePrk/GwZ38lXngYOWc9NJj3PE8IVZjUyKaCTOEcMXctNJj3PgoOW+6hwdiXBjdTXHZjIyGegeCvG1igqmVFXRORTSClkEQzMUmOJjvlMobDFbdbqrU/GJT8Z1Y8HE3sTL7IUXjJeFWTCxN5+M6+aLzi+NncP5E2dSUdZq676KslbOnziTk8bO8ccYlpXxnaoqagswGCMiEa6tqqKbGhvfDc1UsNQpcIuoydMuqtNdnYoPrN6nCyvGdHWUxooxXVm9j7fLBl8YOZ8Tx7xPoc1vCDhhzPt8YeR8N+RkXfjZOxLhm5WVjs446RkOc1lVVS4XUJ1dc9nQ1CKbB/3mLOwt+KlOd3UqPrC9WznL93NnNLJ8v25s71buic7+3TZz6n7uxG49db93GNDNcTDwjPOFFaEQ51VWFhQ7qy17hsOcWpHV03ub1l53Dc3x2Ns86BadTN5WUZ3u6lR8YNkB3UmG3ZmiSYZDLDuguyc6v7z/25SF3TlKqiyc4Iz93/ZE59HRKN1dnPI6IhqldzisFdUHQ3N0EfM/2qNrVadSdBq6l7O1r7ueWFv7VtHQ3d1RzYBumxnZd42raY7su8aNUc1ujdWR0Wjg01Qyl/PYIuY/1qNrVadSdDYMqimJdA8c7I23mNvpDotEPPEW26+sTCurD4ZmaBHzH+rRtapTKTp1fSpLIt29e6/zRKfb6Q6NRDzR2S0Uood6oHluaDoXMf/OHl2rOpWi01xbVhLp9q71Zt3b7XR7e2gMdJ3Ge0OjKIoHxMq96YHHKtxNt1N5iyc6O1U4OtV9t8WtMg8NTYa0m7UGu2toiunGt82ja1WnUnQicW+2YkRa3U23Je6NQWxpdTTy2s3jwctAPK3J3cp0h9Zgdw3N0iLmv9Sja1WnUnQqtreWRLqbt3vjje92uhsTCc9+q01J3Z/ptaGZW8T853p0repUik7N5h0lke6KzT080el2usvj3oxp6pNJNnhoxBQxNC8VMf+XPLpWdSpFp8dKb04D7rHK3XTnrBroic73Vw1wNb2F8TjbPRh5zGlt1XgzPhiaZ5Ez6f2m0eRtFdXprk7Fa0OzqtH1EP/lTXHXDdjcVQPY2lTtappbm6p532UD1grMisVcTTMJvOpymkpmQ1OPnCHuNw+YvC2PcFWnqzoVjwklkgx6f4uraQ56fwuhhLv979ZEmGfmunuixTNzx9GacN+p9d+xGPUujmr+29rKKp0288XQANwK+GnWY8BtBdynOt3VqXhM3yX1dPvUnTPpun3aRN+l3vQlZi0Zzodr+rmS1odr+jFr6d5Ok8kYIHZ7Mslfd+xwZaprUzLJQzuyrnepB6cHhmYJcIeP+d4JLC7gPtXprk7FB0a+tp5OW5ztVem0pYWRr633LHh9Evjda4ezaquzSNOrtnbjd68dTjLpeM9L1uHQ+62tPObQ2NQnk/yqqSnXmo8u23hgaEBOafTDa2kuzk+uVJ3u6VQ8piyWYOwLa+i6rrA9gF3XNTP2hTWUxbyd4mmKlfPzF77IwnV9C7p/4bq+/PyFL9IUK/e8TF+IxfhTczOFmO9PEwlub2riU50yK4qhaQJOBzZ4mN8Gk4eT1UzV6a5OxQ9j05Jg3xfXsNc7mylrSVi+Z693NrPvi2ss3+OU7S0V3PnSsTzyzoE0tlgzGI0t5TzyzoHc+dKxbG+p8K1MZ7e2cmNjI/+z6DXWnEzyj5YWbm5sZL0aGX/rf5v/LwGOQ7yX+ric1zrkvJQlLqSlOt3VqTinGcgZ7TKUhD0/qqPvknrW7VXDpv7V1PesIB7d2d+LxBLUbtxBj1WN9FnWQMTaKKbZTZ2JZIgXF4xi1tK9OXjIUsYPWMGQHhupjO5cdmyORVm+qSdzVg5k9vKhNMeibuu0tEayMZHg983NPB0Os19ZGaMjEXqGQnQxscu2JhKsTCT4MB7n7dZWmqw7EmzXKu2doQF4F5gIPIZ7Yefnmp63m42i6lQjEyTmAAdbuTASS9Bv4Tb6LZS2NFYZIV4WItKaJNocLzRv13U2x6K8umgkry4aCUBtZTMVZTF2tEapb670Wucb2DjIb30iwb9bWvi3O79lE7BQq7R7hHP0xCcAt+PMeypm0pjgUaOoOpWgcG+hN0ab41Q2tBZqZOzmXbDO+uZKNjbUFmpk7OZ9D7C5SL/lfeh0tC+GJjXMvRYYDfzeZsE3AX8w916Lt5FQVWdbrrpKa7b//Am4vwj53m/ybm86NwKnAVt91vkOMFWrs7tYCa+6GLgQmAKcCBwJjAeGAF3NNVuB5WZo/ArwDNDghsBRoWlWL10MXDg/Oc2WzlGhaZZ1znenzItanopnJIFvAP8Fvmt+Ty9ZjrjQ3409V9xg69y1k/QfYIx5Vo5G9tZUA7k8DroChfhWrzYjmVutdAJnzZofmIo3ceKodmFo2lbS9L9ElveLhjEcD1Kc3fl2SNc5wlTwY035zQKuBpZp+11SJIBfmr8eQJe2F8Sj4fDy/bqNbexafmhrNDwyGQ7tmQzJdaEkdaFEcnVZLLGgemvszSHvbX4/EsvoHlUHbPJSZ2U0Fj51/Dtj9+y69dDKaGxkWTixZziU7AKQSIbqWhPh1c2x6II1dV3ffOy9A95vjkW90AmwCsg6RL+npiYMHGgM0ThgEJDaDLQF+AR4H3j5rqam9z6IxzPF2on50JGzrNN0AtqVW5wVQzPMTNecDWSL+93b/E0ALkY8Nh5AdqsXey3hOGTaqRm4FHguYL/B54Dn0yodwKnAJOAY7C2gKsFhU3oj+9rXhnQz9e9CIFcQsPHACXW9K1kzvHYF8Dvg7kl/W77FD533fPXPtnTu3Xsdh+298DOdF9//f1v8KNx7amqs6pwAnAlwWVXVTp0NDVt8qge2dQKf6TRGqOQJ7TPzlmyfVSIbAaeQ4RAii7Qgu9Z/RI51hfmTsk+JjnrtViffr4cZFaSOON5mpgoKWmTMpbPAdZHPAS+wc8qsLRsLNjYzZmhT78cIOn/9DAHfBm7K8TvnYyvwA+DXuXq6OevnzMrA6OSwZifPkX86czxDFqbOfNNZClNn2ZwBhgJvmpGMk22+5cA1Jq1hRfh+J6UZGczrEwM0knkhTyXsaa4Zr016SVIDPAH8ykFjg7n3LuBxk6bqVJ0lRSZDsz/wusuN23hk3WF/H79b1Bi5tlxOYYuFfhsZNTalzWDTwTrZxTRPNmkOVp2qs5QNzTBkDaOPB3n1MWn7NbK5FBiZ4f0DgHNKxMiosSlNepnfa18P0t7XpN1LdarOUjQ0VcCjHn+RXsgO+SqPv1dPZF0oG9PJ7SIZJCOjxqa0iJg67mWHahgynVKmOlVnqRmaaYjbndeMxftowz/O05gPAr5TQkZGjU3pcC3iMeg1E8k8Naw6VWdgDc1QxLvML6Z4aPn3RVwJ83E90L2EjIwam+DT39Qrv7je5Kk6VWdJGJqpyOK5X0TxLszDnRaHlt2AG0rMyKixCTZXIzvX/aLa5Kk6VWfgDU0tshnTb84iy3GtDjgF2XlrlW/jrSeHF0ZGjU0wqQTOLUK+52JvzVN1dkydRTc0x5N9x7+XdMJGGHALVCCRje3ec3MJGhk1NsFjMrvu2fKLziZv1ak6A21oji5i/m7mfRmwd4EjqwNL0MiosQkWXyiR50h1dkydRTc0Y4uYv1t590FCNRRCqICRUC729tHIpBub54G9tL0vGsU09ONUp+oMuqEZWsT83cr7JofD1yNwLzTNz3w2Mil6IRGgleKwdxHzHq46VWfQDU3nIubvRt7jgfNcSOc23NkIVcyh9LHa3pd0XfYjb9XZMXUW3dCUOne69D1GuWSwikkcpSM+S2HVqTqD/nBsK2L+TvP+MnC4i3puxLkH3vNFLM8Xtb0v2brsV96qs2PqLLqhWVrE/J3kXYlMd7lJX5xvhLoa2FCEstxACYamaEcsL2Ley1Sn6gy6oZlbxPyd5H0l3px3frUxOE6M57E4P8LWrpE5EjkOVim9uuxn3qqzY+osuqF5qYj5F5r3HsD3PdJUg0yhOWEO4hTgh7FJGZkPta0vKi8XMe9XVKfqDLqheRbYXoS8G03ehXAL3p44dx6wTwkYGzUyweEfQFMR8m0GnlGdqjPohqYeeLAIeT9g8rbL54BveKytDHf2pHhpbNTIBIttwMNFyPchoE51qs6gGxpMoxrzMd8YhS3kh4Bf4M9RzCfhjkebF8ZGjUwwuQVo9TG/1gI7RKqzY+osuqFZAtzhY753AosLuO8s4FAfdf7UJaPmprFRIxNcFgJ3+ZjfXcAC1ak6S8XQgJx66YcXw1wKP2Fzms/lcyBwpktpuWFs1MgEnxuA+T7kMx9n5ympzo6ps+iGpgk4HW/3gGwweTQWcO9eFCe2z624F6zSibFRI1MaNAIn+/AcnVzgc6Q6O7bOohsakCm044B1HuS1zqS9pMD77y1SGQ0G7nMxvUKMzXo1MiXFEuSsEC8anQ0m7SWqU3WWqqEBeBeYiLvTaHNNmu86SGNCEcvpEJfTs2Ns1gNHqZEpOd4BPg984GKaH5g031GdqrPUDU3KMk9Azmlx4o0WM2lMcMES/7eI5TTbgzStGBs1MqXNYlP3Z+DMK6kV+LlJa7HqVJ2lRq6w+M3AtcDvkRha5wDVFtNtAv6OuDC7VUAXAn82lj3kU/kkgdfx7kzwlLF5EejR5rN1yAl6rhqZiy++ODCV75577ukIxqYRCWt0DzAVOBvrZ703IfvNbvWhoVGdHVNn0Q1NunW+EJiCHA52JHIGzBB2HvC1FQkuNwcJi/AM0OCy1mXApHbYEM0BDjIjv6ONcXsOuA74WAcF7Wp0cz7wXeAEM1Idl+U5eh8JbfIs/kfoVZ0dU2fRDU3bHn76XyLL+0Vj/pMbaswPmm4Qu5iP69oYxH+OOqVXQzF0zjr1/Ew6Uz2eo5FoDZ/pnPjEHxqKVKS2ytODDkZ7IxWJ40HVqTo7CqF9Zt6S75phyBTa2Vg/q2W7GfrdhoW1mfmTpmb/8KqrrH4Xz3UyY4ZjnbNOPd+RzolP/MHaWlcWrTamzjwvzw4ydaYoHZ5cI5pKZIPkFKDcZrqdgAuQmGR3Aj9C1ny8IBA6Z516vi86Z516fl6dEyeOKvnyVBSl/ZDN62wo8Kbp0ZY7SL8ccSR40/SQ3UZ1dkydiqKUuKHZH/G0Gu9iPuOBWSZtt1CdHVOnoiglbmiGIR5PfTzIq49J240erursmDoVRSlxQ1MFPAr08jC/XsBjWPcnz4Tq7Jg6FUVpB4ZmGuLf7TVjcRaFWXV2TJ2KopS4oRmKeBn5xRQKm0pRnR1Tp6Io7cDQTAWiPuYbNXnaRXV2TJ2KopS4oalFNuX5zVkmb6uozo6pU1GUdmBojsf6zm836WTytorq7Jg6FUVpB4bm6CLmf7RH16rO9qNTUZR2YGjGFjH/sR5dqzrbj05FUdqBoRlaxPyHenSt6mw/OhVFaQeGpnMR8+/s0bWqs/3oVBSlHRgaRVEURfHU0BTzJLdtHl2rOtuPTkVR2oGhWVrE/Jd6dK3qbD86FUVpB4ZmbhHzn+vRtaqz/ehUFKUdGJqXipj/Sx5dqzrbj05FUdqBoXkWOevdbxpN3lZRnR1Tp6Io7cDQ1AMPFiHvB0zeVlGdHVOnoijtwNAA3ArEfMw3BtxWwH2qs2PqVBSlHRiaJcAdPuZ7J7C4gPtUZ8fUqShKOzA0IKcf+uENNBfnJ0Kqzo6nU1GUdmBomoDTgQ0e5rfB5NHoIA3V2TF1KorSDgwNyFTKccA6D/JaZ9Je4kJaqrNj6lQUpR0YGoB3gYm4O50y16T5rotpqs6OqVNRlHZgaFI93AnA7TjzSoqZNCZ41KNVnR1Tp6IoJURon5m35Ltmb+Aa4Byg2mK6TcDfEVdWS15G8ydNzfzBzEprOT51qTOdJ99tzRvqsObM7191laXbZ516viOdE5/4gzWdM2ZkfPviiy+2Wjc8/93vuecefQKVgp4j38jyHCn2KLNwzWLgQmAKcCJwJDAeGAJ0NddsBZYDc4BXgGeABl+/iRiKC3nqUns6T77bV53GUFw469Tzbemc+MQfGnyuG6XxuyveYLWDZ7UjpqihaVecfHdJyJz4xB9KpUQbkAgCD+rj0mEZCnwPmAz0BdYD/7YzY1EghwJTgdHARuBfyF6srS6lvwdwHXAS0AP4ELgBeEF/cv8NzTDgWnJPofQyfwcBFyFTKPcj8/R+bdBTnRbQ6SrFJieYTkZN2nv9gfNNHf4G8KgH+U5Cgq9Gzf/3Ms/DhcBpwFsO0z8GeDhtdI5J/1/A4cDr+tP7Y2gqgRuB7wLl5r1VSEDE2cBCYLN5vzswAjgYON5UxAtMJbwT+BHg1Zi6ves8AdjTR52KDUa9dmug9GRd6yyM4aYxztYhqjIdoI/MaMBNbkwzMun0A140z+9rBaZ9LPCk0d+WiOkInqS123tDMwx4DBhr/j8LuNkMlxNZ7nkD+CPiyfZFMySdiCwoH4ds2HPbAymfzu7AZaaHAvAf4K4A6gxKeSpKOt8nvyNIOXC9Gd24ybgcn9WYkcfxwEyb6X4BeCKLkUmxj/707pLJvXl/0xCOReZCv2aGsf/K0SimkzDXHmbu3WrSmmXSdot8Oochi9TTkIXsI83rOeazoOgMSnkqweeL5ndvMqPfv5hRuVcca6Pxdpu6PJ93Ms/FUTbSPBJ4yoLx3KRVzVtDMwx4DugDLAIOMEPjQkiaew8w00J9TNrDXBoh5NP5B2BAhnsHmM+CorOQ8lzksk4l+HwbmWb9PDIN2w34OvBfZGrVC/aweF0vD/J+0cI11cA/LBq6wxGvSCuu+s9rdfPO0FQhi3q9zJTMJGCZC3ksM73xJSbtx/IMW/NhRedgk2c2DkPcdIuhM4TsUdnHvM5HCBiFeN6ETRqTXNSpBJ9LgV9lmYHYA++OXggV8Tv/FGixaGyeMqO9XM/7sxaNzFZkel3xyNBMQ+ZF65A1gPUu5rPeVIStyLTPNAdpWdFppZc/tAg6RyELp4uA+UholiE50hgCvI0stH5g/kaZtCabtJ3qVILNd0zDl6vRP6Edfu/FwHlmJG/F2DxpnrO2TLJhZFqBr+JtgNkObWiGIhvzUhV7qYt5VCOLd8uQhXlMXoVM+VjVWWEhrYocIzAvdIaQRcgRadeNRxYzh2ZJYya7rsPsY0ZJITOi+Y5DnUqwuRz4pYWRRXU7/f73I1OGVoxNpTE2x6e9N9EYmU4W7o8jDg16zLiHhmYq4ko4i8LXENrSHXgE2Gb+/o3sHp9l8irED/P7HujMVsHd1jkMcRdtS39TLkPbGJlXybzQu0+aUXGqUwkuVyCu7Famr95qx+XwW+Bii8amwnTmvoSsZT3Lrvt/8hmZR7TaeWdoaoGzzf9vtviDWjEyLwBnIH7pIcSD5QkgFVztbJO3VbzQmY2kyQPgLJd0xnPcMyDN2Aw1r/vneTDa6rRbnkpw+S5y8qkVIxNH9py0Z36H7COz4qVZbkb9z1p8HuKIN+fDWu28NTTHm6HlajPqcMvIZHK9PRBYaf6qkRhaVjnB3OOWznz82+js1GY4XqjOZYhrdT5j8wqZveVSvMeuzg//LrA8Fe/oCQwke3T0XEyxYWSSprf/Ugco0/uQNZu4RWPT2aKR+QYaXskXQ3O0ef2MxR5DoUYmvRKk5kGPtJH2US7qtEIiTefRLuk8A4kGkMvY5DIyq4Azc+g8Uqt0UdkfeBNZTP4EWMPOdTQrXAn83Eb9vIBdXfXbO38GzrVobKwYmW8i0cYVHwxNarf6bB+MzErkMKw3zf/H2UjfLZ12eLNN3k51LgWOyGNschmZI8gcDaCQ8lTcZTQSEuXgtPd6Ix5j+bzGAK4GrMakTxmZ+zpgOf/VjEKcGJu4GR39Tautf4YmtQi9oM1nZWSONVSokakHvowcirXIvLeXDa3ZdBaKlTWeRW3ydkNnIcYmZWSW5tG5l1bponET2b2/voPsg8lmbL6H7Bux2khegIQn8ppkQMv674gbciHGJlV+f9Eq66+hSc1lpkI+9EHcBOuQEPF/IfeimhUjsw3Z95Hyjtli/u1sQ2tbnblYa+EaK/uEvNJpx9iszGNkCtWpuEu+UCjfBu7OYGyuQaJyW20kz/fJyIBM/VmhGPtOHkIcYOycBJtAoj//Saur/4amLY8CJ5veWTkS5uJ5oIsDI3M8/obdnpun8m8E3g9A+Sddvk4JNpcAv04zNlOxvqs/Nd3zZx/1Wg3F8mKRynMJsN3m85bQalgcQ7PNvO6C7DqfmOG6g5G4Wl1cMjLd0j63SrrOfMTIva/kWos9Ia90plyYB1hIbwCyp2Yvl3Uq7vKyxeu+hewNuY6drv5WjMy5+D/dcyv5j6NoYaeLvZ+MN+1PVxv3RBDniXO1uvpvaFJTMiPIvYM23dg4Hcnsbf61E0stXacV7jOjsfTpqVXmPauLqHu3ydsNnanNmANspJkyNkPz6FymVbpoXA80Wrz2ImC6DSPzf8giuN8sRDYyZhs1NCFrJR/4rGucaX96FHBvythcoFXWX0Mz17w+BJlOWm3B2DidLjvU/DvXhtZ0nVb5GzDINPojzGs7niZu6xxG9h3/VozNK1mMTSE6FXeZj+yhanQxzdQ+j/uL+L2eMKOHe5H1wphpI+4z7z/qs56xpv3p6SCNkPk+F2m19c/QpDZ7ncjOoHKNeYyNEyOT2iRqZ7oB08imdFrdCNcJ8fi5xfx9B2txj9rqfMklnY/kMTIryb/P5mGXylNxn1fNb+GGsYmb0XcQ9nksQTaGDkTWbVNHOS/yWce+yHqQG8cShJApzG9rtfXH0DxrhsZ7IpGL/2MayUIeFisL/8eaBrMR2dRolWfMPSmd+egPvAP8Ajlj/DTz+h2LI4p0nc+6oHMv0wPMZWRSB7TlMjb7s+t6TaHlqXjDfxAPy+0O0oibDt8DAflOIeTMl5+ZGYGfI5GS/TxGYLTpSFkxMklgh8Xv9SvsbapVCjQ09ewMwXBdWq/c7jSAVe+y682/D5i8rVKf9uBdZ+H635N5nWSE+QyfdUZy3LPKGJilpveYz9hEXNCpeMdMY2waCjQyZyPuu0FgD2M8XwCuMgZwCnK65evYW2sslFE2jcwUJLCmlfYrhETIvkKrrbeGBsS7JIZ4nH0tbRrAqrGxamS+avKIUdhhTZl0ZhvN5Br1fDHPA+KFziXI4momI3MEuzocLCH7PpuF7IwO4FSn4h2vmWfCjrFpNUYmKFGEOyGx9CZl+fwQYwC83L+1j8mjt8XrrzQzFy/YNDZ3mnsVDw3NEiSQH0i4jCE2jI1VIzPEDFMxP+riAvRm05kpr3wM8llnEpm++yjtuneR0/8yebUtRY6fndPGyJxm0trLBZ2K98ZmssWRZixgRgYkivSYPNcMQyIbeMEAY2T62DAyd6b9/2XTflmdxpyB7HVSPDI0IKc0zkX80p9P60HkMjapHf/5jExv0zPqavKY5kBzNp3prLSQzuoi6JyPzDUPN9MBnwOW50hjGbImsy8y5TfKpOGmTsVbZplnZJsFI/NowLSfbfG6r3iQdwiZ0u9r8fqr0zp36byKvWnMu9CYgZ4amibgdGRH/TAkKOS+aT/W8ey62z517PEbefLYFwn6uLe5/3SceeXk0pniY9ObzPXwLy+SzqQZfXyEtR3/SeQo50XIruYxJq1hLulUvOd18/xkCku0wzTojwVQt9VTW4d4kPcX2Om2n49ryB2Q1M7IMoIcXKh4ZGhSUz7HAetM5XkDWQcAWRAchoSnOdZ8ni+S8tdMGnuZNI8jc/Rhu+TSmeK8LCObley+M7iYOu3wNdNoDXFZp+KPsZmA7EupM9M5LyDrH48FVPMmi9dt8SDvYy1eNxVrAUlnmefFSqzEL2h19dbQgKwbTDRTMrWIO2O6F83T5gFpzJHmZHPPX00ac02a77qoPZfOsGmA90OmlV41f9PMe0sCpNPKb+SHTsV7UmtsXZEjho8F/hdgvcWMdWZlQ+Z12HOCecOisemiVdVdynL0xCcgR8ROMb2uScAKJDLAG2b6J9Xj6Y6sOxxiGsWB5v0YMm/6I/LHTCp0xJBP5wvsdN/ujuwRCqLOTOV5qNE5wCedipLOrchR5pU5rvEq1tlHeT6/Aeux4tKZDRxjjGjXLNdohA2XCe0zM+9vtTcyB3oO2c/baEsTsqP5Nix6Q82flCUG5sxKq9/FF50clqV9v+qqYOmcMUNrt1I4O5+7U81IulOWevkN0p0YDnPY/9n5HPVAYqi1dQZIkH9NxgrjgKfY3fs0DpxEapO2PkeejmjSWYyc4TDFjAaORHa4D0nrEWxFFtfnIJs9n6GwzWpOUJ2K4j6pWGffQ6ad+iKOQM+bjo9XYWg2Ia7/M8wz0oJMH9+GO6fsvo8451yBeNX2Mc/mT7EXckqxYWgms/Ps8fORXb9nmh+5GtkA9QQyBfVgEfWqTkXxn1SsM79ZbEYXXtGARNGerj+xt6Smzj5FQk2AnKrXD9jMznNOUryKrDO86rYQi1NnRddpceqs+Dp1yK+UItanoP1BnyNXDU3b/Rwhcu/xmGkaSMfRgrMamMzGpmg6Lc0973xIiqdTHwxFUQJGuMD7DkPmMV9DPDiCiupUFEUpUUOTYiKyKPg6slAYVFSnoihKiRqaFIciC96z2XkIVxBRnYqiKCVqaFJMAP4J/Bdx3Q0F9HurTkVRlBI1NCkOBP6BhNc4KcANpOpUFEUpUUOT4gBk9+07wCkBbiBVp6IoSokamhT7IRsU30PC2tcEtDxUp6IoSokamhTjkLhI64BLA1wuqlNRFMUHQxP3MN9qJAKxG6hOd3UqiqL4Zmi8DOIYY9ezvZ2gOt3VqSiK4iplPuc3F7gdOSNmfYDLRXUqiqKUmKF5Azmk6J/kjvlVbFSnoihKiRma55BT+v4T8HJQnYqiKCVkaBLA48jxru8F+LurTkVRlBIzNC3A3/D21D3VqSiK0gENzXbg98jpkSsD/F1Vp6IoSokZmi3A3cixxBsD/B1Vp6IoSokZmrXAz4HfAvUB/m6qU1EUJeCGZivQJe3/y4CfAn8CmgP0HVSnoihKgMkVGeAyZI2gHnGpHWF63UFrFFWnoihKiY5o/mH+go7qVBRFKdERjaIoiqKooVEURVHU0CiKoihqaBRFURRFDY2iKIqihkZRFEVRdiWU/E8Fo0LTPgX2MO+tnZ+ctofvSg7Lsp1kZmX6/3bRmfY6WDqfunRXnSffHRydiqIoRRrRXGAa7tXA+QHWqzoVRVFKcUTjwEg9D4SAY5BzU7we0ahOHdEEkilXrPUzu0OQI7yHAzOBKXf8ou+qYuls2B5mwIAYx03eSjwO8Xgo9VE34FFgLHLc+LkTJ47a4YXObdsijB7dxJFHb6OxMUzS3rmzruls2RGiulOCE760lepOCVp2hNws6oJ1Fhsn0ZvPAI42r78MPBTQ76g6lfZEGXAHMMH8/xRgA/DtYgmKhGFHc4jWVohEIB7/7KOngEnm9dmmE3V2AMtUdXqME2eAi7O8DhqqU2lP7JVmZFKGp6iNTUV5gk2byti4sYyqqs8G4kPTGsUUpwWwPFVngA1NH+DwtP8fZt4LGqpTaW/0zvBe16I2ImXQ3BxmyeJKQjtblJ4ZLo0HsDxVZ4ANzalABJgPLDCvTw3g91OdSqnRBTgPuBQYk+HzUIC0HgGcQhKqq+OsXFHBpo0RKisTIEeRt6XVSzGhUB6dmfFdZ97yDL5O3wzNmebfR4CHzesvB/D7qU6llKgBbgamAz8BbkMW/NNJBkTrr4FXgCeAuRUVyZ5btkRYtqySikr/JaYW/8Ph3DqzjAwCV54B1umboRmITO2AeEA8Yl4fDgwI0HdTnUqpMQlZ1O+LeBhNBs4NoM7jgEvS/j8GmBEOw7o1UVpjoVyjC08oiyTZVh8mFttlZJNRZ6mUZ0c3NNciUztzgA/N33vmvakB+m5tdX5QAjo/CLBOxXsOyfDeoQHUeUSG9yaEw5BIiNeZ34amsirBmk/LWbMmSk1NPDXCyaizVMqzIxuak4Bvmdc/Ar5o/m40733LXFNsMumkBHQSUJ2Ku0SyvF9u49piEsvw3g6QqatQEVaRysqguSnM4oVVhMPJlIasOkulPDuiobkQmdYJA38GnjY97qmIf/efzGePmGuLRTadlIBOAqhTcdfA7Ad8BTgggxHJtLhRrDWZPoj77OAMn8UtvuebzmSSwTU1cZYvq2Dt2ijV1Ymi6QyF5C9ZmuVZFENTARwPvAzca3pczyD7PA5B1hEON68vNp+Vm2tfNvdW+PA9rOhMEVSdbSmmTsUbJpvf9PfIsd4nBlTnocBi4DHz7wmloLO8InnCtvoIixdWEo0W32ciVHrl6d2I01T+84D+QNS838181jdtOB8DbjXTOnF2XT+4FnHLO8VMAU0FjjR/LUjcr1ZgS1paq4A/As/aeEid6sToCaJOfNapeDNiCZtRSCbX0+lAP/O6CvEqeyZgvdcw8CBQm9ZGPAp0B5qCrDOZ5NFoWbL7+g3RpuYdIVJrRr5WgDLYvj3M9u0hunZN0LIjUirl6bmheRhxq8zGZuBxxAtigXlvFPCltGtOMu/NB34I/B24ygwVuyOeVZk4Lu0HyEchOke30Zk+LA2Szmx4qVNxl1rgeuBgYDnwY/Nvih5IjKp0RiBurOt81noVEu5oBXA5u+7R6Mfu3o6VwEjESSXQOiPh5MhkkvcS8RChUBKfth19pjMSSV5eXx9p+eTjCgYMaAlaeRbV0PwWuNr8f7lp2NaZXtla4CPT4NUi88rDgYva/IIh4G4zxbPI/F2ILGbvY3ryIWSe8sfAEHPfvTa02tH5OaPzwjw1bUERddrBC52Ku0xBNlnWABOR3fqnszM4aqcs91X6rPNaM5JOsTc7Y+xBZoeE1Ggt8DqTEPHZIWE3nRXlyaM/Xl7JmLFNRKPJ8lgsFITyLLqhuQbxcLjONFiXmQdklRkRPG96XnvmSesIdnXTWw0sND2RF41Vv8nkkUQ2pv3AhlYrOkemTU3YIc5O12IvdTrFTZ2Ku1ycNpKNINOeg9JGNdmaPr8XE65r8/+jzEhrblody1b3VKcFndHy5NimpvDchoYwvXu3xrMYmnhHejhS88k3INGD64GDgHeRRfQPjZHYs4C09wReMmkcArxj0q43ed1g8yGzorOfw/LwWqdbuKFTcZd+ed4Lym9TleG9/gEsz5LVmUzSPxIRF+ukPpGfGZoUjyObhBYAvUzDvR9wCzCtgLSnmV7255CzE3qZEc4Ek1ehuK0zhV86neK2TsWf5ysoZNqf0aI63dcZCukDkO1B+Mj0lucA1ciZKFWIZ9R0G+nebO6pBh5A5qffRxZKP3JBdyad1QXoTO+V/N3onOODTie9Jy90Kt6QLBFNqrP96wxcj2srspN+PbIAd5l5/wbgLgtp/grxvsHcO8ykdaxJ2y3a6vyOTZ3pXG7SWG/S9ENnIXipU1EUxdeh/Xp2hkH5Ttp1cyyk+V5a2pea1zeaNN3GiU4CoJOA6VQURfHN0AD8BdlQNAA40Ly3j4U0U9ccaO5tMml5RaE6CYBOAqhTURTFN0PTAMw2rw8y/46ykOaoNvfMNml5RaE6CYBOAqhTURTFN0MD8LH5d2CGBnwJslP9NPO6raEZ2CYNL7GiMxupe5YXQacd/NSpKIrim6HZbv6NIJ5Og4CNyCL/aOQ0uCfM68vMZ4PMtZG0nrzXWNGZjUibNPzSaRc/dSqKovhmaIaaf9eYxvs2xOvpV+zq095i3tsbuN30vteYz/by4XtY1ZmJlM5hPuu0i586FUVRXKMsx2flyNGyAP9FAmZ+HwmzcQayZtDHfL7OXPMcO6Ml9zb/TkSiGMc8+g6F6mxIuweThp86U9QgwTCDolNRFMU3Q/N50wjWAW8gmwW/j+zl6JLlnjrgl8gu/TfM/7sYY/OKR99BdSqKopSooUkdzvM8srj+ADvdhj9FwqCkFqaHAMcgsZ1+YEYSZ5l7v2zS8qphVJ1KUAlleY2F93HpekUpCUPTF3GprUQW2K8G/sbu0UcjwNeAn5kG9C12TvecwM7Q+V414KpTCRrpoUiyRetNtPnN8z2jTsObRPO8V2bhvvJsn6fF94rabG981Zknn/aos6hkcwYYhITcB1kTqDQ96PHI+fbZzrj+s7nmFXPPYeazkSZNt1GdSlCoy/DehrTX29oYlZTRSPfKzHQA2uY2/88UEWKrDZ2ZjFlDG52ZSH8/li3dROKziMV1DhtGT3Xm+d3ao87ijmhmhd/d7c2Jif3T96G0IscJ3zor/K6Vg1FXT0zs/wVk/WFaWmGMmhV+95MMeTnRn1Fnhgc6o04go07gE5fLuVR0lhyzZs13dP/EiaPckvIAcEHa7/MWsLRNw/I0cDI7p7+eZedx3CDHaqxjp1PIduDJNvksM2lPSKtPD9jQ+ZAZKadYC/yvjXF8AZm6TfEBu54G+whyoF86fw2FksQTIRKJEKFQciGE5rLrqaIvBkFnm/8vRM64ae86AzmiWWJ6Uq8Ch84Kv3uzRSMjD3/43cSs8LvTgUNNGpvZdVOnW+yiE4kabeeU8AQS7Vl1Kk6ZbozCemAWcKUxAulch6yzrTdG5Zo2n8811yw0HYzfAfe3uaYVOc1zlknnSVOfrHIBsq9ss8nvKHYPdf8Vo3OzyWdym88/AM5BNiBvRE7XvSUUgkQilH4Gy5dMo7sZ+HebBrloOjPk1RF0FndEk8VQLEbOOP+MjRsX1SBrA0ea6Zwh7PSWqkMWsueYaZ5/9uw5vGFW+N3/mesd8+TmBzO9vYvOUChEMpm0pdMMc/PqPKX7Wa7pNNjSGQ6HGxKJhHs6n3wy62emHAmHwyQSiULKMy+nnHKKqxW5kPrp8rO0CnHUyMVHiCt7rg7FfebPK3aQO1IGZpT1RQsjuAcAGraHGTAgxtlf3UQ8DmknStabv4RpHLd7pXPbtgijRzdx5NHbaGwM09IS2k1nDlzT2bIjRHWnBCd8aSvVnRI0NYVtl6cXOp2O/G1yCLKfcjgwE5hSZuEBHgZcC6Gzy8urO0WjnYhGKwmHo4RCMiBKJhO9E4lY71iseUIstv3ilpbG7Rs3LnoAuK1nz+F+9byHAddWVFSe06NH7+q+ffegS5daKisriETCvPnmgow6IfkAssHTV53ZyvOQQ0YSjyd6Nzfv6F1XVz9h/fp1F69fv6axtTX2oOnl+Knz+2Vl0bN69uxd3bt3b7p160KnTtU0NcVYtmwd9fXbfSnPjz7aeeROeXk54XCY1tZWamtr2bhx0bBIJPL9aLT8rJ49U797Z6qrqygrk/rZ2pro3djY1LuubtuEtWvXXLxx4/rGLVuWPhiPx29Zu7b7kvr6esrKykgkErS07Nzfu88++xBAyoA70qbOTjHTM98ulqBIGHY0h2hthUgE4jtXHJ9i596xs82U4dkBLFPV6XH9LMthYCqBaaFQeEpVVbfyysquhMORLD3gCOFwhLKySqqqupJIxDs1N2+9oKlpyzc2blx0J/Cjnj2HN2e8+bDm3LJTn2fvgVcC02pqaq8cOHCv6MCB/ams3NVBI5lMEgqFcupMJhN3ImsnnurMV56RSJiysggVFVG6dKlh4MA9iMX2rV6x4tPzPv54ydfr67fd4UhnfiqBH1dVVX934MDB0UGD+lNdvetZbS0tccLhEOGwg/J0yIcfflgJTKuu7nTlgAGDo4MGDaCyspxQKLzbyYbl5WHKy2vp0qWWAQP2oLm5pfqTT1aet3Llx1+fPXv2HcCPxo0b10xpsFfaQ5x6sM8upqGpKE+waVMZGzeWMXhwC7FYBCQKxqQ2l54WwPJUnT7Uz7IsRmYo8GhFRe34Tp16EQ7bc24IhyNUV/egsrJL+fbtG67ZsaP+2I0bF33Zg9HN0HA4/NigQUPHDR8+jKqqCsc6zfTHEg8qScHlGY2WMXToQAYO7BddtGjpNR9/vGRyLBY7zQud4XD48X79BowdOXI4NTWdAlme77///tBQKPTYnnsOHDdy5AiqqysJh/Mf8RMKQSgUprq6khEjhjJgwJ7RBQsWXrN69Yovvv/++2eMGTOmFNa9emd4r2sxBYXLoHlbmCWLKxmy12cjwp4ZLo0HsDxVpw/1M5zByOwPvF5T03t8be0ethvFXRueMmpr96Cmpvd4YJZJ2y32j0ajb4wf/7lx48aNtm1kcukEXNXpVnlGo2WMHj2C/fc/aExlZeUbbuuMRqNvjho1Zuz48WNsGxm/ynPevHn7R6PRN0ePHjduzJjR1NRUWzIyu2sMU1NTzZgxoxk9ety4aDT6xrx58/YPwIPaBTgPOeRuTCZ7GaBG5QjgFJJQXR1n5YoKNm2MUFmZgMwxBlu9FBMK5dGZGd915i3PYOssqH6G2xiZYcBztbV79KmsdK+TVFnZldraPfoAz5k8nDIsGo3+e7/9Duo9cGA/T3TiTvBKT8pzjz16cdBBh/SqrKx83i2d0Wj0hX33HddryJBBlJWVBbI8Fy5cOCwajT6/777jew0e3J+KinLn0z4V5Qwe3J999x3fKxqNPr9w4cJiBi2tQTzIpgM/Qda6hre5Jijn0f8acax4AphbUZHsuWVLhGXLKqmo9F9iytMtQ59jF51ZRgaBK8+A6iy4fobTjEwV8GhNTe9eFRW1riusqKilpqZ3L+Axk1ehVIXD4cf23Xe/nv369fJUJxKPrGCdXpZn9+5dOOCAg3qUlZU94VRnOBx+bMSIUd3799+DSCQcyPJcuHBhFfDoyJH79thzzz6uGUOAsrIy9tyzLyNH7tsDeMzkVQwmIWstfYFuiBvsuQFscI4DLkn7/xhgRjgM69ZEaY2Fco0uPKEskmRbfZhYbJeRTUadpVKeAdRZcP1Mb1WmVVTUjnOz552ph1tRUTsW2XhYKNMGDRo6duDAPQKv0+vy7NWrO3vvPXLfcDj848KnG0I37rnnwLEDB/YnEokEsjzLy8sBpvXvP2jcgAH9XDUyO41NhAED+tG//6CxwDSTp98ckuG9QwPY4ByR4b0J4bBEBojH8d3QVFYlWPNpOWvWRKmpiadGOBl1lkp5BlBnwfUzbEYzQ0Oh8JROnXp5rrRTp96EQuEpBU6hDa2pqb1y+PBhhDyuySmdBU75+Faew4btRW1t5+8WqrOysmrKiBF7U14eDWx5zps3b2hVVdWVw4cP91RneXmU4cOHU1VVfeW8efO8nELLZtHLbVxbTDKFTNkBMnUVKsIqUlkZNDeFWbywinA4mdKQVWeplGeRcL1+pkY0U6uqukWdLFRbJRyOUFXVLcrOc2vs9L6nDhy4V5mThX8/dPpZnpFImOHD9ymLRCLX2f+O4esHDBhUVlVVGfTf/bqBA/cqq6mp9lxnTU01AwcOKQuFQtd59ADvh+wUPyDDQ5ppfrtYazJ9EPfZwRk+i1t8zzedySSDa2riLF9Wwdq1UaqrE0XTKd6Nu/1wpVCentXP8MaNi2ohdLaXUzyZplIgdJbkbZna8vKKcwYO3NN3nYAtnX6X5x579Ka8vOIrdnVGImVfGTx4oGdTZm6U55NPPlkbiZSdNXjwQMJh77vK4XAIKZOyrzz55JNuL65NBp4Bfg/8AziRYHIoEs3iMfPvCaWgs7wiecK2+giLF1YSjRbfZyJUeuXpWf0MA8eXl1d3yrYZ06vebXl5dSfgeBu3Hd+zZ+/qysrywOv0vzxD9OvXv9quzl69eldXVlYEvjx79epT7ccodqdBrKBXrz52yzPVI4ySParudOSMoSpgD8RrJ2hTY2HgwbTOQBnwKM4cTnzRmUzyaLQsWbV+Q5TmHSHCYf9FRcpg+/Yw27eHqChPBK08i1Y/w8DR0Wgn37+xyfNoG7cc3afPHiWhsxjl2atXb9s6e/fu7flalxvl2bdvX397oiEwedrRWWse1BeQYJhD2nzeg10j7wKMoDhurFchkaN/y+7z7v2AAW1tLzuPuQi0zkg4OTKZhEQ8RCiU9F1nJJIsb2wM88nHFYTDySCVZ1HrZxkwtqyswvcaZPIca+OWsZ0715aEzmKUZ21tp3Zbnl27dvFdp8nTjs4pyCa2GuSo7a7A6eyM0p2t91Hp81e7FjmiIsXebQxqeY7ecOB1JiHis0PCbjorypNHf7y8kjFjm4hGk+VpQUaLWZ5FrZ9hYGgk4r8rp8lzqI1bhlZXV5SEzmKUp9m8aLM8q30f0RRSnlVV/s8ymDzt6LzYPMSpRuQUdj2cLltB+72Y0NbJ4ag2BjXbInRcdVrTGS1Pjm1qCtPQECYaTQZFZ1HrZxjoHC7CZKbJs7ONWzqHw2GSyaTtv0Qi6bvOUijPaLRwr7iUgZJgpdb/jOOBLZ2pKMz+jrxsl2e/PO8FZUd/Jqvdn+BRsjqTSfpHIuJinUwGRmdR62fJHAUKMHv2AoIV6ik4JBIJ3/KqqalizJjCTpKOx+M888yijvKzhAOoaQe7nz/fojrd1xkKaf1Mz2ibn41Um4Zxm41bVGcOWlpitnXGYoXH5LM7kkn9tbbGbetsbfW/PE2e2xwmkwxg45JUnR1SZ1HrZxhYGo/731EweS61cYvqzEF9faNtnY2NjSR9HNsnk0kaG+3rbGpq8r08TZ5LURTFFUMzt7XV/2gH8fgOkCilVlGdOdi8eYttndu21fuu0+RpS+fWrXW+6zR5ztUmQlHcMTQvxWLbfc+4pWU7wEs2blGdWUgkkqxZ86ltnevXr/d9RLN+/XrbOteuXevromoyCWvXrrWrU1GUHIbm2ZaWxu2JhH/edolEnJaWxkZkk5NVVGcW1q/fSkPDVts6N2xY39jc7N/oq7l5Bxs2rG+yr3NdEXSus6tTUZRshqZnz+H1kHywuXmrjw/yViD5gORtmaLplLyDqTMeT7Bs2XISibhtnfF468OffLKSeDzug844klfrQ3Z0nnLKKfXxeOtDH3+8wpGbup3R4ccfryAeb33wlFNOqdcmQlHcGdEA3NrUtCXmRy88kYjT1LQlhsTRsYvqbMOKFevZuHF1QToTicT0FSs+bm1qavZcZ1NTMytXftyaSCRutntvMpm8ecWK5a0NDY2e69y+vZEVK5a3JpPJW7R5UBQXDU3PnsOXJJOJO7ZvX+/Dg7yeZDJxZ8+ewxcXcLvvOpFoq4HUuWlTPYsXLyCRiBess7m56Y6FCxen3KM9oaUlxsKFi2lsbLyjEJ1jxoxZ0tTU+PNFixb5orOpqfGOMWPGLNbmQVHcHdEATNuxo36ul1M+zc1b2bGjfi4OT65UnbB163bmz19IY+NWRzqTyeSPVq9eMW/FilWeTKHF43FWrFjF6tUr5hWqs6WlBWDaqlWfzF258tPUXhxXaW1tZeXKT1m9+pN5wDSTp6Iobhqanj2HNwGnNzSs37Bjh/tT0zt21NPQsH4DcHrPnsOdzIH4phMIpM716+v44IOFbNq0yhWdiUTitIUL529etWoN8bh7myPj8QSrVq1h4cL5mxOJxGlOdI4YMaIJOH3Bgg82rV691lVj09oaZ/XqdSxY8MGmZDJ52ogRIxq1aVAUb0Y09Ow5fAlwXH39mnVu9sSbm7dSX79mHXCcycMpnus0eQRKZyzWytKla5g/fwEbN65wVWcsFjvmgw/e37h8+Se0trY6TrC1tZXlyz/hgw/e3xiLxY5xQ+eIESOWxGKxYz/4YM6Gjz9eyY4dzkcdO3a08PHHK/nggzkbYrHYsSNGjFji4vMVyvIaC+/j0vWKUvT6uVusm549h78LTGxoWD+3vn4NiUThjU4iEae+fg0NDevnAhNN2m7hmU6TdmB0xmJxVqzYwJw5y1i0aD5bt67xRGcsFjtk/vx5H8yZM4+GhsL3AjU0bGfOnHnMnz/vg1gsdoibOseMGfNuLBY7dP78ufPmzfuQhobGguK8JRIJGhoamTfvQ+bPnzsvFosdOmbMmHddfpDT3eSyDcHSxWcKHV+WI81CiOZ5r8zCfeXZPk+L7xW18F2KpjNPPu1RZ1HrZ8agambUMWHHjvrbt2z5ONbYuAk7HlSJRJzGxk1s2bI8tmNH/e3ABJdGMplGDK7qdGmEULDOeDxJS0sr27Y18umnm5k/fyVvv72QhQsX8umnCzzXmUgkDly9esXPXn/99daPPlqUChljicbGRj76aBGvv/566+rVK36WSCQO9ELnuHHjliQSiYNWrfrk9jfeeL114cKlNDY2k0gkcm7sTCbFwDQ2NrNw4VLeeOP11lWrPrk9kUgcNG7cOKc6M4Uv2JD2elubhzb1UDak/X9dhjQ2t/l/Jg8TO8PlTI1FQxudmUh/P5Yt3UTis4jFdQ4bRk915vnd2qPOotbPrEJ79hzeDFy7ceOi3zc2brqmsXHzOeXl1dXRaCei0UrC4WgqND2JRIJEIkYs1kwstp2WlsYmSP4duK1A7zJbM17AtclkwpFOCvPacl3n7NkfBUHn95qaGu9dvHjB1KVLF5/ds2fvqt69e9OtWxeqq6soKyv7bHqssbGJLVvqWL9+PRs3rm9OJOIPJBKJW0KhkKc6R48e3VxbW3vt7Nmzf79kyYKpy5aJzr59+9K1axeqqqooK4sYnXGamprYurWOtWvXfqYzHo/fcvDBBy+ur3dlDe0B4IK0h/8tdo2Vtg14Gjg5bXrhWWBL2jUvmYe5j/n/duDJNvksM2lPSM1Smryt8hDwtbT/rwX+16bxeQE4Ju29D4AFaf9/BPhhm3T/GgoliSdCJBIhQqHkQgjNZdczZF4Mgs42/1+IhBpq7zqLWj9Dr732oSWVGzcuqgFOBI4ExiNHgXZN61EtB+YArwDP9Ow5vMFKuo890p07fpH9qN4pV6wF4PAjZ1stUFs621js7K1vUwVnnT056+cPPvAvACqrdpS8zlAoRDKZJBwOk0gkbOkMh8MNiUTiszSc6sxH/wGDHNXPVSs/yZtHLp1p9bQ/cAdwGLAIOXnxjTaX7WOu2Q+YB1wOzG8zw/BN4BpTPx4Brmd3J4pDgNuB4cBMYModv+i7ykp5TblibYVpdA4HVgFnAR+1uawbcs7954y+s8216ZwN3Gx0PgR8Z/v2MHv2j3Hc5K0kEhCPhwYCjyIHyP0POGfixFGbvdS5vSG8qv/AFo6bXEc8DvF4aDedGbJzVWcsFvooGk0y+YSt9OjRSlNTuKDydFPnrFnzi1o/Q9+9fE034H7gWKwdL9oCPAycf/qXN7cYY1GJnEP9lSxziW1pNVb+bKDOiqExlaognUDLhIPfAzmWtGCdFhtGRzrNe6rTBZ39BwxqMcbEM52KouQnDPwCmIz1M6zLzVDx+sce6c5jj3QH+IF5L2oxjTKT5502tBasM+091dmBdK5a+UlqxOKHTkVRchiaQrtr6fcd50Iabl6rOlWn3zoVRclhaHoWeG+ftNdupJEP1ak6g6xTUZQchkZRlCzo+oyiqKFRFEVR1NAoiqIoamgURVEURQ2NoiiKooZGURRFUdTQKIqiKGpoFEVRlHZlaOoKvDc9mJsbaeRDdarOIOtUFCWHoXm0wHsfS3vtRhr5UJ2qM8g6FUXJQhlwFVALfAFrx3a2mgfw9rT3bgX6IefXWwl+mEDOUvieDa2qU3UGWaeiKDkMTR0SPt0JLcC3zJ9XqE7VGWSdiqLkMDQdgrdm7+c4jbPO9jZ9t/BDpznfR1EUxZKh6QLci/WpiTgyNXE5Ow/AKgfuAk6zODWRRA6WuhjrC7WqU3UGWaeiKDkMzQzgTJv3XYwcRXqT+f9U4CKbaXwFOafa6n2qU3UGWaeiKFkIA2cUeO/paa/dSCMfqlN1Blmnoig5DE2XAu/t3mZ6w2ka+VCdqjPIOhVFyWFoFEVRFEUNjaIoiqKGRlEURVHU0CiKoihqaBRFURQ1NIqiKIqihkZRFEVRQ6MoiqJ0BEOzscB716W9diONfKhO1RlknYqi5DA0/yrw3mfTXj/nQhr5UJ2qM8g6FUXJYWguNw9zq8V7WoC/Ajenvfdj4G/sjJabj1bzEE+xoVV1qs4g61QUJQv/PwAlukJhy2ScjQAAAABJRU5ErkJggg==";Jr={border:{"border-top":" iconfont luckysheet-iconfont-shangbiankuang","border-bottom":" iconfont luckysheet-iconfont-xiabiankuang","border-left":" iconfont luckysheet-iconfont-zuobiankuang","border-right":" iconfont luckysheet-iconfont-youbiankuang","border-none":" iconfont luckysheet-iconfont-wubiankuang","border-all":" iconfont luckysheet-iconfont-quanjiabiankuang","border-outside":" iconfont luckysheet-iconfont-sizhoujiabiankuang","border-inside":" iconfont luckysheet-iconfont-neikuangxian","border-horizontal":" iconfont luckysheet-iconfont-neikuanghengxian","border-vertical":" iconfont luckysheet-iconfont-neikuangshuxian"},align:{left:" iconfont luckysheet-iconfont-wenbenzuoduiqi",center:" iconfont luckysheet-iconfont-wenbenjuzhongduiqi",right:" iconfont luckysheet-iconfont-wenbenyouduiqi",top:" iconfont luckysheet-iconfont-dingbuduiqi",middle:" iconfont luckysheet-iconfont-shuipingduiqi",bottom:" iconfont luckysheet-iconfont-dibuduiqi"},textWrap:{overflow:" iconfont luckysheet-iconfont-yichu1",wrap:" iconfont luckysheet-iconfont-zidonghuanhang",clip:" iconfont luckysheet-iconfont-jieduan"},rotation:{none:" iconfont luckysheet-iconfont-wuxuanzhuang",angleup:" iconfont luckysheet-iconfont-xiangshangqingxie",angledown:" iconfont luckysheet-iconfont-xiangxiaqingxie",vertical:" iconfont luckysheet-iconfont-shupaiwenzi","rotation-up":" iconfont luckysheet-iconfont-wenbenxiangshang","rotation-down":" iconfont luckysheet-iconfont-xiangxia90"}}});function Z(e){for(let n=0;n<h.luckysheetfile.length;n++)if(h.luckysheetfile[n].index==e)return n;return null}function xt(e,n,t){let l="";t==null&&(t=h.currentSheetIndex),e!=t&&(l=h.luckysheetfile[Z(e)].name.replace(/'/g,"''"),/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/.test(l)?l=l+"!":l="'"+l+"'!");let a=n.row[0],o=n.row[1],s=n.column[0],u=n.column[1];return a==null&&o==null?l+tt(s)+":"+tt(u):s==null&&u==null?l+(a+1)+":"+(o+1):s==u&&a==o?l+tt(s)+(a+1):l+tt(s)+(a+1)+":"+tt(u)+(o+1)}function Pu(){return h.luckysheet_select_save}function Et(e){return e&&h.luckysheetfile.forEach(n=>{n.chart&&n.chart.forEach(t=>{let l=h.getChartJson(t.chart_id);t.chartOptions=l})}),h.luckysheetfile}function Lu(){return h.config}function Yi(){return h.visibledatarow}function Xi(){return h.visibledatacolumn}var Nt=Ie(()=>{dt();Xe()});function zu(e){h.luckysheet_select_save=e}function Qr(e){h.luckysheet_scroll_status=e}function Jn(e){h.luckysheetfile=e}var An=Ie(()=>{Nt();Xe()});var Ep,dr,xa=Ie(()=>{Ep={mobilecheck:function(){var e=!1;return function(n){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),document.body&&document.body.clientWidth&&document.body.clientHeight&&document.body.clientWidth<350&&document.body.clientHeight<500&&(e=!0),e},iphoneCheck:function(){var e=!1;return/iPhone/i.test(navigator.userAgent)&&(e=!0),!0},isWeixin:function(){var e=navigator.userAgent.toLowerCase();return e.match(/MicroMessenger/i)=="micromessenger"},isAndroid:function(){var e=navigator.userAgent,n=(navigator.appVersion,e.indexOf("Android")>-1||e.indexOf("Linux")>-1);return n},tabletCheck:function(){var e=/ipad|android|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i.test(navigator.userAgent.toLowerCase());return e},BrowserType:function(){var e=navigator.userAgent,n=e.indexOf("Opera")>-1,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1&&!n,l=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1,a=e.indexOf("Edge")>-1,o=e.indexOf("Firefox")>-1,s=e.indexOf("Safari")>-1&&e.indexOf("Chrome")==-1,u=e.indexOf("Chrome")>-1&&e.indexOf("Safari")>-1;if(t){var d=new RegExp("MSIE (\\d+\\.\\d+);");d.test(e);var f=parseFloat(RegExp.$1);return f==7?"IE7":f==8?"IE8":f==9?"IE9":f==10?"IE10":"0"}if(o)return"FF";if(n)return"Opera";if(s)return"Safari";if(u)return"Chrome";if(a)return"Edge";if(l)return"IE11"},isIE:function(){var e=navigator.userAgent,n=e.indexOf("Opera")>-1,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1&&!n,l=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;return t||l?"1":"-1"},IEVersion:function(){var e=navigator.userAgent,n=e.indexOf("Opera")>-1,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1&&!n,l=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1,a=e.indexOf("Windows NT 6.1; Trident/7.0;")>-1&&!t;if(t){var o=new RegExp("MSIE (\\d+\\.\\d+);");o.test(e);var s=parseFloat(RegExp.$1);return s==7?"IE7":s==8?"IE8":s==9?"IE9":s==10?"IE10":"0"}else return a?"Edge":l?"IE11":"-1"},luckysheetrefreshfixednum:null,luckysheetrefreshfixed:function(){var e=this;return e.luckysheetrefreshfixednum==null&&(e.BrowserType()=="FF"?e.luckysheetrefreshfixednum=5:e.luckysheetrefreshfixednum=0),e.luckysheetrefreshfixednum},detectOS(){var e=navigator.userAgent,n=navigator.platform=="Win32"||navigator.platform=="Windows",t=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";if(t)return"Mac";var l=navigator.platform=="X11"&&!n&&!t;if(l)return"Unix";var a=String(navigator.platform).indexOf("Linux")>-1;if(a)return"Linux";if(n){var o=e.indexOf("Windows NT 5.0")>-1||e.indexOf("Windows 2000")>-1;if(o)return"Win2000";var s=e.indexOf("Windows NT 5.1")>-1||e.indexOf("Windows XP")>-1;if(s)return"WinXP";var u=e.indexOf("Windows NT 5.2")>-1||e.indexOf("Windows 2003")>-1;if(u)return"Win2003";var d=e.indexOf("Windows NT 6.0")>-1||e.indexOf("Windows Vista")>-1;if(d)return"WinVista";var f=e.indexOf("Windows NT 6.1")>-1||e.indexOf("Windows 7")>-1;if(f)return"Win7"}return"other"}},dr=Ep});var dn=vl(Xl=>{"use strict";var Np=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function Pp(e,n){return Object.prototype.hasOwnProperty.call(e,n)}Xl.assign=function(e){for(var n=Array.prototype.slice.call(arguments,1);n.length;){var t=n.shift();if(!!t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(var l in t)Pp(t,l)&&(e[l]=t[l])}}return e};Xl.shrinkBuf=function(e,n){return e.length===n?e:e.subarray?e.subarray(0,n):(e.length=n,e)};var Lp={arraySet:function(e,n,t,l,a){if(n.subarray&&e.subarray){e.set(n.subarray(t,t+l),a);return}for(var o=0;o<l;o++)e[a+o]=n[t+o]},flattenChunks:function(e){var n,t,l,a,o,s;for(l=0,n=0,t=e.length;n<t;n++)l+=e[n].length;for(s=new Uint8Array(l),a=0,n=0,t=e.length;n<t;n++)o=e[n],s.set(o,a),a+=o.length;return s}},zp={arraySet:function(e,n,t,l,a){for(var o=0;o<l;o++)e[a+o]=n[t+o]},flattenChunks:function(e){return[].concat.apply([],e)}};Xl.setTyped=function(e){e?(Xl.Buf8=Uint8Array,Xl.Buf16=Uint16Array,Xl.Buf32=Int32Array,Xl.assign(Xl,Lp)):(Xl.Buf8=Array,Xl.Buf16=Array,Xl.Buf32=Array,Xl.assign(Xl,zp))};Xl.setTyped(Np)});var oh=vl(Ta=>{"use strict";var Op=dn(),Bp=4,Ou=0,Bu=1,Hp=2;function _a(e){for(var n=e.length;--n>=0;)e[n]=0}var Vp=0,Hu=1,qp=2,jp=3,Up=258,ns=29,oi=256,si=oi+1+ns,Ca=30,as=19,Vu=2*si+1,Qn=15,is=16,Gp=7,os=256,qu=16,ju=17,Uu=18,ss=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ki=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Wp=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Gu=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Yp=512,fn=new Array((si+2)*2);_a(fn);var ci=new Array(Ca*2);_a(ci);var ui=new Array(Yp);_a(ui);var hi=new Array(Up-jp+1);_a(hi);var cs=new Array(ns);_a(cs);var Zi=new Array(Ca);_a(Zi);function us(e,n,t,l,a){this.static_tree=e,this.extra_bits=n,this.extra_base=t,this.elems=l,this.max_length=a,this.has_stree=e&&e.length}var Wu,Yu,Xu;function hs(e,n){this.dyn_tree=e,this.max_code=0,this.stat_desc=n}function Ku(e){return e<256?ui[e]:ui[256+(e>>>7)]}function di(e,n){e.pending_buf[e.pending++]=n&255,e.pending_buf[e.pending++]=n>>>8&255}function er(e,n,t){e.bi_valid>is-t?(e.bi_buf|=n<<e.bi_valid&65535,di(e,e.bi_buf),e.bi_buf=n>>is-e.bi_valid,e.bi_valid+=t-is):(e.bi_buf|=n<<e.bi_valid&65535,e.bi_valid+=t)}function en(e,n,t){er(e,t[n*2],t[n*2+1])}function Zu(e,n){var t=0;do t|=e&1,e>>>=1,t<<=1;while(--n>0);return t>>>1}function Xp(e){e.bi_valid===16?(di(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function Kp(e,n){var t=n.dyn_tree,l=n.max_code,a=n.stat_desc.static_tree,o=n.stat_desc.has_stree,s=n.stat_desc.extra_bits,u=n.stat_desc.extra_base,d=n.stat_desc.max_length,f,m,g,y,v,b,k=0;for(y=0;y<=Qn;y++)e.bl_count[y]=0;for(t[e.heap[e.heap_max]*2+1]=0,f=e.heap_max+1;f<Vu;f++)m=e.heap[f],y=t[t[m*2+1]*2+1]+1,y>d&&(y=d,k++),t[m*2+1]=y,!(m>l)&&(e.bl_count[y]++,v=0,m>=u&&(v=s[m-u]),b=t[m*2],e.opt_len+=b*(y+v),o&&(e.static_len+=b*(a[m*2+1]+v)));if(k!==0){do{for(y=d-1;e.bl_count[y]===0;)y--;e.bl_count[y]--,e.bl_count[y+1]+=2,e.bl_count[d]--,k-=2}while(k>0);for(y=d;y!==0;y--)for(m=e.bl_count[y];m!==0;)g=e.heap[--f],!(g>l)&&(t[g*2+1]!==y&&(e.opt_len+=(y-t[g*2+1])*t[g*2],t[g*2+1]=y),m--)}}function Ju(e,n,t){var l=new Array(Qn+1),a=0,o,s;for(o=1;o<=Qn;o++)l[o]=a=a+t[o-1]<<1;for(s=0;s<=n;s++){var u=e[s*2+1];u!==0&&(e[s*2]=Zu(l[u]++,u))}}function Zp(){var e,n,t,l,a,o=new Array(Qn+1);for(t=0,l=0;l<ns-1;l++)for(cs[l]=t,e=0;e<1<<ss[l];e++)hi[t++]=l;for(hi[t-1]=l,a=0,l=0;l<16;l++)for(Zi[l]=a,e=0;e<1<<Ki[l];e++)ui[a++]=l;for(a>>=7;l<Ca;l++)for(Zi[l]=a<<7,e=0;e<1<<Ki[l]-7;e++)ui[256+a++]=l;for(n=0;n<=Qn;n++)o[n]=0;for(e=0;e<=143;)fn[e*2+1]=8,e++,o[8]++;for(;e<=255;)fn[e*2+1]=9,e++,o[9]++;for(;e<=279;)fn[e*2+1]=7,e++,o[7]++;for(;e<=287;)fn[e*2+1]=8,e++,o[8]++;for(Ju(fn,si+1,o),e=0;e<Ca;e++)ci[e*2+1]=5,ci[e*2]=Zu(e,5);Wu=new us(fn,ss,oi+1,si,Qn),Yu=new us(ci,Ki,0,Ca,Qn),Xu=new us(new Array(0),Wp,0,as,Gp)}function Qu(e){var n;for(n=0;n<si;n++)e.dyn_ltree[n*2]=0;for(n=0;n<Ca;n++)e.dyn_dtree[n*2]=0;for(n=0;n<as;n++)e.bl_tree[n*2]=0;e.dyn_ltree[os*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function eh(e){e.bi_valid>8?di(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Jp(e,n,t,l){eh(e),l&&(di(e,t),di(e,~t)),Op.arraySet(e.pending_buf,e.window,n,t,e.pending),e.pending+=t}function th(e,n,t,l){var a=n*2,o=t*2;return e[a]<e[o]||e[a]===e[o]&&l[n]<=l[t]}function ds(e,n,t){for(var l=e.heap[t],a=t<<1;a<=e.heap_len&&(a<e.heap_len&&th(n,e.heap[a+1],e.heap[a],e.depth)&&a++,!th(n,l,e.heap[a],e.depth));)e.heap[t]=e.heap[a],t=a,a<<=1;e.heap[t]=l}function lh(e,n,t){var l,a,o=0,s,u;if(e.last_lit!==0)do l=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],a=e.pending_buf[e.l_buf+o],o++,l===0?en(e,a,n):(s=hi[a],en(e,s+oi+1,n),u=ss[s],u!==0&&(a-=cs[s],er(e,a,u)),l--,s=Ku(l),en(e,s,t),u=Ki[s],u!==0&&(l-=Zi[s],er(e,l,u)));while(o<e.last_lit);en(e,os,n)}function fs(e,n){var t=n.dyn_tree,l=n.stat_desc.static_tree,a=n.stat_desc.has_stree,o=n.stat_desc.elems,s,u,d=-1,f;for(e.heap_len=0,e.heap_max=Vu,s=0;s<o;s++)t[s*2]!==0?(e.heap[++e.heap_len]=d=s,e.depth[s]=0):t[s*2+1]=0;for(;e.heap_len<2;)f=e.heap[++e.heap_len]=d<2?++d:0,t[f*2]=1,e.depth[f]=0,e.opt_len--,a&&(e.static_len-=l[f*2+1]);for(n.max_code=d,s=e.heap_len>>1;s>=1;s--)ds(e,t,s);f=o;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ds(e,t,1),u=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=u,t[f*2]=t[s*2]+t[u*2],e.depth[f]=(e.depth[s]>=e.depth[u]?e.depth[s]:e.depth[u])+1,t[s*2+1]=t[u*2+1]=f,e.heap[1]=f++,ds(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Kp(e,n),Ju(t,d,e.bl_count)}function rh(e,n,t){var l,a=-1,o,s=n[0*2+1],u=0,d=7,f=4;for(s===0&&(d=138,f=3),n[(t+1)*2+1]=65535,l=0;l<=t;l++)o=s,s=n[(l+1)*2+1],!(++u<d&&o===s)&&(u<f?e.bl_tree[o*2]+=u:o!==0?(o!==a&&e.bl_tree[o*2]++,e.bl_tree[qu*2]++):u<=10?e.bl_tree[ju*2]++:e.bl_tree[Uu*2]++,u=0,a=o,s===0?(d=138,f=3):o===s?(d=6,f=3):(d=7,f=4))}function nh(e,n,t){var l,a=-1,o,s=n[0*2+1],u=0,d=7,f=4;for(s===0&&(d=138,f=3),l=0;l<=t;l++)if(o=s,s=n[(l+1)*2+1],!(++u<d&&o===s)){if(u<f)do en(e,o,e.bl_tree);while(--u!=0);else o!==0?(o!==a&&(en(e,o,e.bl_tree),u--),en(e,qu,e.bl_tree),er(e,u-3,2)):u<=10?(en(e,ju,e.bl_tree),er(e,u-3,3)):(en(e,Uu,e.bl_tree),er(e,u-11,7));u=0,a=o,s===0?(d=138,f=3):o===s?(d=6,f=3):(d=7,f=4)}}function Qp(e){var n;for(rh(e,e.dyn_ltree,e.l_desc.max_code),rh(e,e.dyn_dtree,e.d_desc.max_code),fs(e,e.bl_desc),n=as-1;n>=3&&e.bl_tree[Gu[n]*2+1]===0;n--);return e.opt_len+=3*(n+1)+5+5+4,n}function eg(e,n,t,l){var a;for(er(e,n-257,5),er(e,t-1,5),er(e,l-4,4),a=0;a<l;a++)er(e,e.bl_tree[Gu[a]*2+1],3);nh(e,e.dyn_ltree,n-1),nh(e,e.dyn_dtree,t-1)}function tg(e){var n=4093624447,t;for(t=0;t<=31;t++,n>>>=1)if(n&1&&e.dyn_ltree[t*2]!==0)return Ou;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Bu;for(t=32;t<oi;t++)if(e.dyn_ltree[t*2]!==0)return Bu;return Ou}var ah=!1;function lg(e){ah||(Zp(),ah=!0),e.l_desc=new hs(e.dyn_ltree,Wu),e.d_desc=new hs(e.dyn_dtree,Yu),e.bl_desc=new hs(e.bl_tree,Xu),e.bi_buf=0,e.bi_valid=0,Qu(e)}function ih(e,n,t,l){er(e,(Vp<<1)+(l?1:0),3),Jp(e,n,t,!0)}function rg(e){er(e,Hu<<1,3),en(e,os,fn),Xp(e)}function ng(e,n,t,l){var a,o,s=0;e.level>0?(e.strm.data_type===Hp&&(e.strm.data_type=tg(e)),fs(e,e.l_desc),fs(e,e.d_desc),s=Qp(e),a=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=a&&(a=o)):a=o=t+5,t+4<=a&&n!==-1?ih(e,n,t,l):e.strategy===Bp||o===a?(er(e,(Hu<<1)+(l?1:0),3),lh(e,fn,ci)):(er(e,(qp<<1)+(l?1:0),3),eg(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),lh(e,e.dyn_ltree,e.dyn_dtree)),Qu(e),l&&eh(e)}function ag(e,n,t){return e.pending_buf[e.d_buf+e.last_lit*2]=n>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=n&255,e.pending_buf[e.l_buf+e.last_lit]=t&255,e.last_lit++,n===0?e.dyn_ltree[t*2]++:(e.matches++,n--,e.dyn_ltree[(hi[t]+oi+1)*2]++,e.dyn_dtree[Ku(n)*2]++),e.last_lit===e.lit_bufsize-1}Ta._tr_init=lg;Ta._tr_stored_block=ih;Ta._tr_flush_block=ng;Ta._tr_tally=ag;Ta._tr_align=rg});var ms=vl((Sk,sh)=>{"use strict";function ig(e,n,t,l){for(var a=e&65535|0,o=e>>>16&65535|0,s=0;t!==0;){s=t>2e3?2e3:t,t-=s;do a=a+n[l++]|0,o=o+a|0;while(--s);a%=65521,o%=65521}return a|o<<16|0}sh.exports=ig});var ps=vl(($k,ch)=>{"use strict";function og(){for(var e,n=[],t=0;t<256;t++){e=t;for(var l=0;l<8;l++)e=e&1?3988292384^e>>>1:e>>>1;n[t]=e}return n}var sg=og();function cg(e,n,t,l){var a=sg,o=l+t;e^=-1;for(var s=l;s<o;s++)e=e>>>8^a[(e^n[s])&255];return e^-1}ch.exports=cg});var Ji=vl((Ik,uh)=>{"use strict";uh.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var bh=vl(rn=>{"use strict";var Kl=dn(),kr=oh(),hh=ms(),Dn=ps(),ug=Ji(),ea=0,hg=1,dg=3,Mn=4,dh=5,tn=0,fh=1,wr=-2,fg=-3,gs=-5,mg=-1,pg=1,Qi=2,gg=3,yg=4,vg=0,bg=2,eo=8,kg=9,wg=15,xg=8,_g=29,Cg=256,ys=Cg+1+_g,Tg=30,Sg=19,$g=2*ys+1,Ig=15,qt=3,Fn=258,Nr=Fn+qt+1,Rg=32,to=42,vs=69,lo=73,ro=91,no=103,ta=113,fi=666,$l=1,mi=2,la=3,Sa=4,Ag=3;function En(e,n){return e.msg=ug[n],n}function mh(e){return(e<<1)-(e>4?9:0)}function Nn(e){for(var n=e.length;--n>=0;)e[n]=0}function Pn(e){var n=e.state,t=n.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(Kl.arraySet(e.output,n.pending_buf,n.pending_out,t,e.next_out),e.next_out+=t,n.pending_out+=t,e.total_out+=t,e.avail_out-=t,n.pending-=t,n.pending===0&&(n.pending_out=0))}function Nl(e,n){kr._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,n),e.block_start=e.strstart,Pn(e.strm)}function Wt(e,n){e.pending_buf[e.pending++]=n}function pi(e,n){e.pending_buf[e.pending++]=n>>>8&255,e.pending_buf[e.pending++]=n&255}function Dg(e,n,t,l){var a=e.avail_in;return a>l&&(a=l),a===0?0:(e.avail_in-=a,Kl.arraySet(n,e.input,e.next_in,a,t),e.state.wrap===1?e.adler=hh(e.adler,n,a,t):e.state.wrap===2&&(e.adler=Dn(e.adler,n,a,t)),e.next_in+=a,e.total_in+=a,a)}function ph(e,n){var t=e.max_chain_length,l=e.strstart,a,o,s=e.prev_length,u=e.nice_match,d=e.strstart>e.w_size-Nr?e.strstart-(e.w_size-Nr):0,f=e.window,m=e.w_mask,g=e.prev,y=e.strstart+Fn,v=f[l+s-1],b=f[l+s];e.prev_length>=e.good_match&&(t>>=2),u>e.lookahead&&(u=e.lookahead);do if(a=n,!(f[a+s]!==b||f[a+s-1]!==v||f[a]!==f[l]||f[++a]!==f[l+1])){l+=2,a++;do;while(f[++l]===f[++a]&&f[++l]===f[++a]&&f[++l]===f[++a]&&f[++l]===f[++a]&&f[++l]===f[++a]&&f[++l]===f[++a]&&f[++l]===f[++a]&&f[++l]===f[++a]&&l<y);if(o=Fn-(y-l),l=y-Fn,o>s){if(e.match_start=n,s=o,o>=u)break;v=f[l+s-1],b=f[l+s]}}while((n=g[n&m])>d&&--t!=0);return s<=e.lookahead?s:e.lookahead}function ra(e){var n=e.w_size,t,l,a,o,s;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=n+(n-Nr)){Kl.arraySet(e.window,e.window,n,n,0),e.match_start-=n,e.strstart-=n,e.block_start-=n,l=e.hash_size,t=l;do a=e.head[--t],e.head[t]=a>=n?a-n:0;while(--l);l=n,t=l;do a=e.prev[--t],e.prev[t]=a>=n?a-n:0;while(--l);o+=n}if(e.strm.avail_in===0)break;if(l=Dg(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=l,e.lookahead+e.insert>=qt)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+qt-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<qt)););}while(e.lookahead<Nr&&e.strm.avail_in!==0)}function Mg(e,n){var t=65535;for(t>e.pending_buf_size-5&&(t=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ra(e),e.lookahead===0&&n===ea)return $l;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var l=e.block_start+t;if((e.strstart===0||e.strstart>=l)&&(e.lookahead=e.strstart-l,e.strstart=l,Nl(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Nr&&(Nl(e,!1),e.strm.avail_out===0))return $l}return e.insert=0,n===Mn?(Nl(e,!0),e.strm.avail_out===0?la:Sa):(e.strstart>e.block_start&&(Nl(e,!1),e.strm.avail_out===0),$l)}function bs(e,n){for(var t,l;;){if(e.lookahead<Nr){if(ra(e),e.lookahead<Nr&&n===ea)return $l;if(e.lookahead===0)break}if(t=0,e.lookahead>=qt&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+qt-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-Nr&&(e.match_length=ph(e,t)),e.match_length>=qt)if(l=kr._tr_tally(e,e.strstart-e.match_start,e.match_length-qt),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=qt){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+qt-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!=0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else l=kr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(l&&(Nl(e,!1),e.strm.avail_out===0))return $l}return e.insert=e.strstart<qt-1?e.strstart:qt-1,n===Mn?(Nl(e,!0),e.strm.avail_out===0?la:Sa):e.last_lit&&(Nl(e,!1),e.strm.avail_out===0)?$l:mi}function $a(e,n){for(var t,l,a;;){if(e.lookahead<Nr){if(ra(e),e.lookahead<Nr&&n===ea)return $l;if(e.lookahead===0)break}if(t=0,e.lookahead>=qt&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+qt-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=qt-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-Nr&&(e.match_length=ph(e,t),e.match_length<=5&&(e.strategy===pg||e.match_length===qt&&e.strstart-e.match_start>4096)&&(e.match_length=qt-1)),e.prev_length>=qt&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-qt,l=kr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-qt),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=a&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+qt-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!=0);if(e.match_available=0,e.match_length=qt-1,e.strstart++,l&&(Nl(e,!1),e.strm.avail_out===0))return $l}else if(e.match_available){if(l=kr._tr_tally(e,0,e.window[e.strstart-1]),l&&Nl(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return $l}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(l=kr._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<qt-1?e.strstart:qt-1,n===Mn?(Nl(e,!0),e.strm.avail_out===0?la:Sa):e.last_lit&&(Nl(e,!1),e.strm.avail_out===0)?$l:mi}function Fg(e,n){for(var t,l,a,o,s=e.window;;){if(e.lookahead<=Fn){if(ra(e),e.lookahead<=Fn&&n===ea)return $l;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=qt&&e.strstart>0&&(a=e.strstart-1,l=s[a],l===s[++a]&&l===s[++a]&&l===s[++a])){o=e.strstart+Fn;do;while(l===s[++a]&&l===s[++a]&&l===s[++a]&&l===s[++a]&&l===s[++a]&&l===s[++a]&&l===s[++a]&&l===s[++a]&&a<o);e.match_length=Fn-(o-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=qt?(t=kr._tr_tally(e,1,e.match_length-qt),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=kr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(Nl(e,!1),e.strm.avail_out===0))return $l}return e.insert=0,n===Mn?(Nl(e,!0),e.strm.avail_out===0?la:Sa):e.last_lit&&(Nl(e,!1),e.strm.avail_out===0)?$l:mi}function Eg(e,n){for(var t;;){if(e.lookahead===0&&(ra(e),e.lookahead===0)){if(n===ea)return $l;break}if(e.match_length=0,t=kr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(Nl(e,!1),e.strm.avail_out===0))return $l}return e.insert=0,n===Mn?(Nl(e,!0),e.strm.avail_out===0?la:Sa):e.last_lit&&(Nl(e,!1),e.strm.avail_out===0)?$l:mi}function ln(e,n,t,l,a){this.good_length=e,this.max_lazy=n,this.nice_length=t,this.max_chain=l,this.func=a}var Ia;Ia=[new ln(0,0,0,0,Mg),new ln(4,4,8,4,bs),new ln(4,5,16,8,bs),new ln(4,6,32,32,bs),new ln(4,4,16,16,$a),new ln(8,16,32,32,$a),new ln(8,16,128,128,$a),new ln(8,32,128,256,$a),new ln(32,128,258,1024,$a),new ln(32,258,258,4096,$a)];function Ng(e){e.window_size=2*e.w_size,Nn(e.head),e.max_lazy_match=Ia[e.level].max_lazy,e.good_match=Ia[e.level].good_length,e.nice_match=Ia[e.level].nice_length,e.max_chain_length=Ia[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=qt-1,e.match_available=0,e.ins_h=0}function Pg(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=eo,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Kl.Buf16($g*2),this.dyn_dtree=new Kl.Buf16((2*Tg+1)*2),this.bl_tree=new Kl.Buf16((2*Sg+1)*2),Nn(this.dyn_ltree),Nn(this.dyn_dtree),Nn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Kl.Buf16(Ig+1),this.heap=new Kl.Buf16(2*ys+1),Nn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Kl.Buf16(2*ys+1),Nn(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function gh(e){var n;return!e||!e.state?En(e,wr):(e.total_in=e.total_out=0,e.data_type=bg,n=e.state,n.pending=0,n.pending_out=0,n.wrap<0&&(n.wrap=-n.wrap),n.status=n.wrap?to:ta,e.adler=n.wrap===2?0:1,n.last_flush=ea,kr._tr_init(n),tn)}function yh(e){var n=gh(e);return n===tn&&Ng(e.state),n}function Lg(e,n){return!e||!e.state||e.state.wrap!==2?wr:(e.state.gzhead=n,tn)}function vh(e,n,t,l,a,o){if(!e)return wr;var s=1;if(n===mg&&(n=6),l<0?(s=0,l=-l):l>15&&(s=2,l-=16),a<1||a>kg||t!==eo||l<8||l>15||n<0||n>9||o<0||o>yg)return En(e,wr);l===8&&(l=9);var u=new Pg;return e.state=u,u.strm=e,u.wrap=s,u.gzhead=null,u.w_bits=l,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=a+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+qt-1)/qt),u.window=new Kl.Buf8(u.w_size*2),u.head=new Kl.Buf16(u.hash_size),u.prev=new Kl.Buf16(u.w_size),u.lit_bufsize=1<<a+6,u.pending_buf_size=u.lit_bufsize*4,u.pending_buf=new Kl.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=(1+2)*u.lit_bufsize,u.level=n,u.strategy=o,u.method=t,yh(e)}function zg(e,n){return vh(e,n,eo,wg,xg,vg)}function Og(e,n){var t,l,a,o;if(!e||!e.state||n>dh||n<0)return e?En(e,wr):wr;if(l=e.state,!e.output||!e.input&&e.avail_in!==0||l.status===fi&&n!==Mn)return En(e,e.avail_out===0?gs:wr);if(l.strm=e,t=l.last_flush,l.last_flush=n,l.status===to)if(l.wrap===2)e.adler=0,Wt(l,31),Wt(l,139),Wt(l,8),l.gzhead?(Wt(l,(l.gzhead.text?1:0)+(l.gzhead.hcrc?2:0)+(l.gzhead.extra?4:0)+(l.gzhead.name?8:0)+(l.gzhead.comment?16:0)),Wt(l,l.gzhead.time&255),Wt(l,l.gzhead.time>>8&255),Wt(l,l.gzhead.time>>16&255),Wt(l,l.gzhead.time>>24&255),Wt(l,l.level===9?2:l.strategy>=Qi||l.level<2?4:0),Wt(l,l.gzhead.os&255),l.gzhead.extra&&l.gzhead.extra.length&&(Wt(l,l.gzhead.extra.length&255),Wt(l,l.gzhead.extra.length>>8&255)),l.gzhead.hcrc&&(e.adler=Dn(e.adler,l.pending_buf,l.pending,0)),l.gzindex=0,l.status=vs):(Wt(l,0),Wt(l,0),Wt(l,0),Wt(l,0),Wt(l,0),Wt(l,l.level===9?2:l.strategy>=Qi||l.level<2?4:0),Wt(l,Ag),l.status=ta);else{var s=eo+(l.w_bits-8<<4)<<8,u=-1;l.strategy>=Qi||l.level<2?u=0:l.level<6?u=1:l.level===6?u=2:u=3,s|=u<<6,l.strstart!==0&&(s|=Rg),s+=31-s%31,l.status=ta,pi(l,s),l.strstart!==0&&(pi(l,e.adler>>>16),pi(l,e.adler&65535)),e.adler=1}if(l.status===vs)if(l.gzhead.extra){for(a=l.pending;l.gzindex<(l.gzhead.extra.length&65535)&&!(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>a&&(e.adler=Dn(e.adler,l.pending_buf,l.pending-a,a)),Pn(e),a=l.pending,l.pending===l.pending_buf_size));)Wt(l,l.gzhead.extra[l.gzindex]&255),l.gzindex++;l.gzhead.hcrc&&l.pending>a&&(e.adler=Dn(e.adler,l.pending_buf,l.pending-a,a)),l.gzindex===l.gzhead.extra.length&&(l.gzindex=0,l.status=lo)}else l.status=lo;if(l.status===lo)if(l.gzhead.name){a=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>a&&(e.adler=Dn(e.adler,l.pending_buf,l.pending-a,a)),Pn(e),a=l.pending,l.pending===l.pending_buf_size)){o=1;break}l.gzindex<l.gzhead.name.length?o=l.gzhead.name.charCodeAt(l.gzindex++)&255:o=0,Wt(l,o)}while(o!==0);l.gzhead.hcrc&&l.pending>a&&(e.adler=Dn(e.adler,l.pending_buf,l.pending-a,a)),o===0&&(l.gzindex=0,l.status=ro)}else l.status=ro;if(l.status===ro)if(l.gzhead.comment){a=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>a&&(e.adler=Dn(e.adler,l.pending_buf,l.pending-a,a)),Pn(e),a=l.pending,l.pending===l.pending_buf_size)){o=1;break}l.gzindex<l.gzhead.comment.length?o=l.gzhead.comment.charCodeAt(l.gzindex++)&255:o=0,Wt(l,o)}while(o!==0);l.gzhead.hcrc&&l.pending>a&&(e.adler=Dn(e.adler,l.pending_buf,l.pending-a,a)),o===0&&(l.status=no)}else l.status=no;if(l.status===no&&(l.gzhead.hcrc?(l.pending+2>l.pending_buf_size&&Pn(e),l.pending+2<=l.pending_buf_size&&(Wt(l,e.adler&255),Wt(l,e.adler>>8&255),e.adler=0,l.status=ta)):l.status=ta),l.pending!==0){if(Pn(e),e.avail_out===0)return l.last_flush=-1,tn}else if(e.avail_in===0&&mh(n)<=mh(t)&&n!==Mn)return En(e,gs);if(l.status===fi&&e.avail_in!==0)return En(e,gs);if(e.avail_in!==0||l.lookahead!==0||n!==ea&&l.status!==fi){var d=l.strategy===Qi?Eg(l,n):l.strategy===gg?Fg(l,n):Ia[l.level].func(l,n);if((d===la||d===Sa)&&(l.status=fi),d===$l||d===la)return e.avail_out===0&&(l.last_flush=-1),tn;if(d===mi&&(n===hg?kr._tr_align(l):n!==dh&&(kr._tr_stored_block(l,0,0,!1),n===dg&&(Nn(l.head),l.lookahead===0&&(l.strstart=0,l.block_start=0,l.insert=0))),Pn(e),e.avail_out===0))return l.last_flush=-1,tn}return n!==Mn?tn:l.wrap<=0?fh:(l.wrap===2?(Wt(l,e.adler&255),Wt(l,e.adler>>8&255),Wt(l,e.adler>>16&255),Wt(l,e.adler>>24&255),Wt(l,e.total_in&255),Wt(l,e.total_in>>8&255),Wt(l,e.total_in>>16&255),Wt(l,e.total_in>>24&255)):(pi(l,e.adler>>>16),pi(l,e.adler&65535)),Pn(e),l.wrap>0&&(l.wrap=-l.wrap),l.pending!==0?tn:fh)}function Bg(e){var n;return!e||!e.state?wr:(n=e.state.status,n!==to&&n!==vs&&n!==lo&&n!==ro&&n!==no&&n!==ta&&n!==fi?En(e,wr):(e.state=null,n===ta?En(e,fg):tn))}function Hg(e,n){var t=n.length,l,a,o,s,u,d,f,m;if(!e||!e.state||(l=e.state,s=l.wrap,s===2||s===1&&l.status!==to||l.lookahead))return wr;for(s===1&&(e.adler=hh(e.adler,n,t,0)),l.wrap=0,t>=l.w_size&&(s===0&&(Nn(l.head),l.strstart=0,l.block_start=0,l.insert=0),m=new Kl.Buf8(l.w_size),Kl.arraySet(m,n,t-l.w_size,l.w_size,0),n=m,t=l.w_size),u=e.avail_in,d=e.next_in,f=e.input,e.avail_in=t,e.next_in=0,e.input=n,ra(l);l.lookahead>=qt;){a=l.strstart,o=l.lookahead-(qt-1);do l.ins_h=(l.ins_h<<l.hash_shift^l.window[a+qt-1])&l.hash_mask,l.prev[a&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=a,a++;while(--o);l.strstart=a,l.lookahead=qt-1,ra(l)}return l.strstart+=l.lookahead,l.block_start=l.strstart,l.insert=l.lookahead,l.lookahead=0,l.match_length=l.prev_length=qt-1,l.match_available=0,e.next_in=d,e.input=f,e.avail_in=u,l.wrap=s,tn}rn.deflateInit=zg;rn.deflateInit2=vh;rn.deflateReset=yh;rn.deflateResetKeep=gh;rn.deflateSetHeader=Lg;rn.deflate=Og;rn.deflateEnd=Bg;rn.deflateSetDictionary=Hg;rn.deflateInfo="pako deflate (from Nodeca project)"});var ks=vl(Ra=>{"use strict";var ao=dn(),kh=!0,wh=!0;try{String.fromCharCode.apply(null,[0])}catch(e){kh=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){wh=!1}var gi=new ao.Buf8(256);for(var Ln=0;Ln<256;Ln++)gi[Ln]=Ln>=252?6:Ln>=248?5:Ln>=240?4:Ln>=224?3:Ln>=192?2:1;gi[254]=gi[254]=1;Ra.string2buf=function(e){var n,t,l,a,o,s=e.length,u=0;for(a=0;a<s;a++)t=e.charCodeAt(a),(t&64512)==55296&&a+1<s&&(l=e.charCodeAt(a+1),(l&64512)==56320&&(t=65536+(t-55296<<10)+(l-56320),a++)),u+=t<128?1:t<2048?2:t<65536?3:4;for(n=new ao.Buf8(u),o=0,a=0;o<u;a++)t=e.charCodeAt(a),(t&64512)==55296&&a+1<s&&(l=e.charCodeAt(a+1),(l&64512)==56320&&(t=65536+(t-55296<<10)+(l-56320),a++)),t<128?n[o++]=t:t<2048?(n[o++]=192|t>>>6,n[o++]=128|t&63):t<65536?(n[o++]=224|t>>>12,n[o++]=128|t>>>6&63,n[o++]=128|t&63):(n[o++]=240|t>>>18,n[o++]=128|t>>>12&63,n[o++]=128|t>>>6&63,n[o++]=128|t&63);return n};function xh(e,n){if(n<65534&&(e.subarray&&wh||!e.subarray&&kh))return String.fromCharCode.apply(null,ao.shrinkBuf(e,n));for(var t="",l=0;l<n;l++)t+=String.fromCharCode(e[l]);return t}Ra.buf2binstring=function(e){return xh(e,e.length)};Ra.binstring2buf=function(e){for(var n=new ao.Buf8(e.length),t=0,l=n.length;t<l;t++)n[t]=e.charCodeAt(t);return n};Ra.buf2string=function(e,n){var t,l,a,o,s=n||e.length,u=new Array(s*2);for(l=0,t=0;t<s;){if(a=e[t++],a<128){u[l++]=a;continue}if(o=gi[a],o>4){u[l++]=65533,t+=o-1;continue}for(a&=o===2?31:o===3?15:7;o>1&&t<s;)a=a<<6|e[t++]&63,o--;if(o>1){u[l++]=65533;continue}a<65536?u[l++]=a:(a-=65536,u[l++]=55296|a>>10&1023,u[l++]=56320|a&1023)}return xh(u,l)};Ra.utf8border=function(e,n){var t;for(n=n||e.length,n>e.length&&(n=e.length),t=n-1;t>=0&&(e[t]&192)==128;)t--;return t<0||t===0?n:t+gi[e[t]]>n?t:n}});var ws=vl((Dk,_h)=>{"use strict";function Vg(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}_h.exports=Vg});var $h=vl(bi=>{"use strict";var yi=bh(),vi=dn(),xs=ks(),_s=Ji(),qg=ws(),Ch=Object.prototype.toString,jg=0,Cs=4,Aa=0,Th=1,Sh=2,Ug=-1,Gg=0,Wg=8;function na(e){if(!(this instanceof na))return new na(e);this.options=vi.assign({level:Ug,method:Wg,chunkSize:16384,windowBits:15,memLevel:8,strategy:Gg,to:""},e||{});var n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qg,this.strm.avail_out=0;var t=yi.deflateInit2(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy);if(t!==Aa)throw new Error(_s[t]);if(n.header&&yi.deflateSetHeader(this.strm,n.header),n.dictionary){var l;if(typeof n.dictionary=="string"?l=xs.string2buf(n.dictionary):Ch.call(n.dictionary)==="[object ArrayBuffer]"?l=new Uint8Array(n.dictionary):l=n.dictionary,t=yi.deflateSetDictionary(this.strm,l),t!==Aa)throw new Error(_s[t]);this._dict_set=!0}}na.prototype.push=function(e,n){var t=this.strm,l=this.options.chunkSize,a,o;if(this.ended)return!1;o=n===~~n?n:n===!0?Cs:jg,typeof e=="string"?t.input=xs.string2buf(e):Ch.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new vi.Buf8(l),t.next_out=0,t.avail_out=l),a=yi.deflate(t,o),a!==Th&&a!==Aa)return this.onEnd(a),this.ended=!0,!1;(t.avail_out===0||t.avail_in===0&&(o===Cs||o===Sh))&&(this.options.to==="string"?this.onData(xs.buf2binstring(vi.shrinkBuf(t.output,t.next_out))):this.onData(vi.shrinkBuf(t.output,t.next_out)))}while((t.avail_in>0||t.avail_out===0)&&a!==Th);return o===Cs?(a=yi.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===Aa):(o===Sh&&(this.onEnd(Aa),t.avail_out=0),!0)};na.prototype.onData=function(e){this.chunks.push(e)};na.prototype.onEnd=function(e){e===Aa&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=vi.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ts(e,n){var t=new na(n);if(t.push(e,!0),t.err)throw t.msg||_s[t.err];return t.result}function Yg(e,n){return n=n||{},n.raw=!0,Ts(e,n)}function Xg(e,n){return n=n||{},n.gzip=!0,Ts(e,n)}bi.Deflate=na;bi.deflate=Ts;bi.deflateRaw=Yg;bi.gzip=Xg});var Rh=vl((Fk,Ih)=>{"use strict";var io=30,Kg=12;Ih.exports=function(n,t){var l,a,o,s,u,d,f,m,g,y,v,b,k,w,x,C,S,_,T,A,R,I,F,z,M;l=n.state,a=n.next_in,z=n.input,o=a+(n.avail_in-5),s=n.next_out,M=n.output,u=s-(t-n.avail_out),d=s+(n.avail_out-257),f=l.dmax,m=l.wsize,g=l.whave,y=l.wnext,v=l.window,b=l.hold,k=l.bits,w=l.lencode,x=l.distcode,C=(1<<l.lenbits)-1,S=(1<<l.distbits)-1;e:do{k<15&&(b+=z[a++]<<k,k+=8,b+=z[a++]<<k,k+=8),_=w[b&C];t:for(;;){if(T=_>>>24,b>>>=T,k-=T,T=_>>>16&255,T===0)M[s++]=_&65535;else if(T&16){A=_&65535,T&=15,T&&(k<T&&(b+=z[a++]<<k,k+=8),A+=b&(1<<T)-1,b>>>=T,k-=T),k<15&&(b+=z[a++]<<k,k+=8,b+=z[a++]<<k,k+=8),_=x[b&S];l:for(;;){if(T=_>>>24,b>>>=T,k-=T,T=_>>>16&255,T&16){if(R=_&65535,T&=15,k<T&&(b+=z[a++]<<k,k+=8,k<T&&(b+=z[a++]<<k,k+=8)),R+=b&(1<<T)-1,R>f){n.msg="invalid distance too far back",l.mode=io;break e}if(b>>>=T,k-=T,T=s-u,R>T){if(T=R-T,T>g&&l.sane){n.msg="invalid distance too far back",l.mode=io;break e}if(I=0,F=v,y===0){if(I+=m-T,T<A){A-=T;do M[s++]=v[I++];while(--T);I=s-R,F=M}}else if(y<T){if(I+=m+y-T,T-=y,T<A){A-=T;do M[s++]=v[I++];while(--T);if(I=0,y<A){T=y,A-=T;do M[s++]=v[I++];while(--T);I=s-R,F=M}}}else if(I+=y-T,T<A){A-=T;do M[s++]=v[I++];while(--T);I=s-R,F=M}for(;A>2;)M[s++]=F[I++],M[s++]=F[I++],M[s++]=F[I++],A-=3;A&&(M[s++]=F[I++],A>1&&(M[s++]=F[I++]))}else{I=s-R;do M[s++]=M[I++],M[s++]=M[I++],M[s++]=M[I++],A-=3;while(A>2);A&&(M[s++]=M[I++],A>1&&(M[s++]=M[I++]))}}else if((T&64)==0){_=x[(_&65535)+(b&(1<<T)-1)];continue l}else{n.msg="invalid distance code",l.mode=io;break e}break}}else if((T&64)==0){_=w[(_&65535)+(b&(1<<T)-1)];continue t}else if(T&32){l.mode=Kg;break e}else{n.msg="invalid literal/length code",l.mode=io;break e}break}}while(a<o&&s<d);A=k>>3,a-=A,k-=A<<3,b&=(1<<k)-1,n.next_in=a,n.next_out=s,n.avail_in=a<o?5+(o-a):5-(a-o),n.avail_out=s<d?257+(d-s):257-(s-d),l.hold=b,l.bits=k}});var Ph=vl((Ek,Nh)=>{"use strict";var Ah=dn(),Da=15,Dh=852,Mh=592,Fh=0,Ss=1,Eh=2,Zg=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Jg=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Qg=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],ey=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Nh.exports=function(n,t,l,a,o,s,u,d){var f=d.bits,m=0,g=0,y=0,v=0,b=0,k=0,w=0,x=0,C=0,S=0,_,T,A,R,I,F=null,z=0,M,E=new Ah.Buf16(Da+1),N=new Ah.Buf16(Da+1),L=null,O=0,V,q,W;for(m=0;m<=Da;m++)E[m]=0;for(g=0;g<a;g++)E[t[l+g]]++;for(b=f,v=Da;v>=1&&E[v]===0;v--);if(b>v&&(b=v),v===0)return o[s++]=1<<24|64<<16|0,o[s++]=1<<24|64<<16|0,d.bits=1,0;for(y=1;y<v&&E[y]===0;y++);for(b<y&&(b=y),x=1,m=1;m<=Da;m++)if(x<<=1,x-=E[m],x<0)return-1;if(x>0&&(n===Fh||v!==1))return-1;for(N[1]=0,m=1;m<Da;m++)N[m+1]=N[m]+E[m];for(g=0;g<a;g++)t[l+g]!==0&&(u[N[t[l+g]]++]=g);if(n===Fh?(F=L=u,M=19):n===Ss?(F=Zg,z-=257,L=Jg,O-=257,M=256):(F=Qg,L=ey,M=-1),S=0,g=0,m=y,I=s,k=b,w=0,A=-1,C=1<<b,R=C-1,n===Ss&&C>Dh||n===Eh&&C>Mh)return 1;for(;;){V=m-w,u[g]<M?(q=0,W=u[g]):u[g]>M?(q=L[O+u[g]],W=F[z+u[g]]):(q=32+64,W=0),_=1<<m-w,T=1<<k,y=T;do T-=_,o[I+(S>>w)+T]=V<<24|q<<16|W|0;while(T!==0);for(_=1<<m-1;S&_;)_>>=1;if(_!==0?(S&=_-1,S+=_):S=0,g++,--E[m]==0){if(m===v)break;m=t[l+u[g]]}if(m>b&&(S&R)!==A){for(w===0&&(w=b),I+=y,k=m-w,x=1<<k;k+w<v&&(x-=E[k+w],!(x<=0));)k++,x<<=1;if(C+=1<<k,n===Ss&&C>Dh||n===Eh&&C>Mh)return 1;A=S&R,o[A]=b<<24|k<<16|I-s|0}}return S!==0&&(o[I+S]=m-w<<24|64<<16|0),d.bits=b,0}});var yd=vl(Pr=>{"use strict";var fr=dn(),$s=ms(),nn=ps(),ty=Rh(),ki=Ph(),ly=0,Lh=1,zh=2,Oh=4,ry=5,oo=6,aa=0,ny=1,ay=2,xr=-2,Bh=-3,Is=-4,iy=-5,Hh=8,Vh=1,qh=2,jh=3,Uh=4,Gh=5,Wh=6,Yh=7,Xh=8,Kh=9,Zh=10,so=11,mn=12,Rs=13,Jh=14,As=15,Qh=16,ed=17,td=18,ld=19,co=20,uo=21,rd=22,nd=23,ad=24,id=25,od=26,Ds=27,sd=28,cd=29,dl=30,Ms=31,oy=32,sy=852,cy=592,uy=15,hy=uy;function ud(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function dy(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new fr.Buf16(320),this.work=new fr.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function hd(e){var n;return!e||!e.state?xr:(n=e.state,e.total_in=e.total_out=n.total=0,e.msg="",n.wrap&&(e.adler=n.wrap&1),n.mode=Vh,n.last=0,n.havedict=0,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new fr.Buf32(sy),n.distcode=n.distdyn=new fr.Buf32(cy),n.sane=1,n.back=-1,aa)}function dd(e){var n;return!e||!e.state?xr:(n=e.state,n.wsize=0,n.whave=0,n.wnext=0,hd(e))}function fd(e,n){var t,l;return!e||!e.state||(l=e.state,n<0?(t=0,n=-n):(t=(n>>4)+1,n<48&&(n&=15)),n&&(n<8||n>15))?xr:(l.window!==null&&l.wbits!==n&&(l.window=null),l.wrap=t,l.wbits=n,dd(e))}function md(e,n){var t,l;return e?(l=new dy,e.state=l,l.window=null,t=fd(e,n),t!==aa&&(e.state=null),t):xr}function fy(e){return md(e,hy)}var pd=!0,Fs,Es;function my(e){if(pd){var n;for(Fs=new fr.Buf32(512),Es=new fr.Buf32(32),n=0;n<144;)e.lens[n++]=8;for(;n<256;)e.lens[n++]=9;for(;n<280;)e.lens[n++]=7;for(;n<288;)e.lens[n++]=8;for(ki(Lh,e.lens,0,288,Fs,0,e.work,{bits:9}),n=0;n<32;)e.lens[n++]=5;ki(zh,e.lens,0,32,Es,0,e.work,{bits:5}),pd=!1}e.lencode=Fs,e.lenbits=9,e.distcode=Es,e.distbits=5}function gd(e,n,t,l){var a,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new fr.Buf8(o.wsize)),l>=o.wsize?(fr.arraySet(o.window,n,t-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>l&&(a=l),fr.arraySet(o.window,n,t-l,a,o.wnext),l-=a,l?(fr.arraySet(o.window,n,t-l,l,0),o.wnext=l,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}function py(e,n){var t,l,a,o,s,u,d,f,m,g,y,v,b,k,w=0,x,C,S,_,T,A,R,I,F=new fr.Buf8(4),z,M,E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return xr;t=e.state,t.mode===mn&&(t.mode=Rs),s=e.next_out,a=e.output,d=e.avail_out,o=e.next_in,l=e.input,u=e.avail_in,f=t.hold,m=t.bits,g=u,y=d,I=aa;e:for(;;)switch(t.mode){case Vh:if(t.wrap===0){t.mode=Rs;break}for(;m<16;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}if(t.wrap&2&&f===35615){t.check=0,F[0]=f&255,F[1]=f>>>8&255,t.check=nn(t.check,F,2,0),f=0,m=0,t.mode=qh;break}if(t.flags=0,t.head&&(t.head.done=!1),!(t.wrap&1)||(((f&255)<<8)+(f>>8))%31){e.msg="incorrect header check",t.mode=dl;break}if((f&15)!==Hh){e.msg="unknown compression method",t.mode=dl;break}if(f>>>=4,m-=4,R=(f&15)+8,t.wbits===0)t.wbits=R;else if(R>t.wbits){e.msg="invalid window size",t.mode=dl;break}t.dmax=1<<R,e.adler=t.check=1,t.mode=f&512?Zh:mn,f=0,m=0;break;case qh:for(;m<16;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}if(t.flags=f,(t.flags&255)!==Hh){e.msg="unknown compression method",t.mode=dl;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=dl;break}t.head&&(t.head.text=f>>8&1),t.flags&512&&(F[0]=f&255,F[1]=f>>>8&255,t.check=nn(t.check,F,2,0)),f=0,m=0,t.mode=jh;case jh:for(;m<32;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}t.head&&(t.head.time=f),t.flags&512&&(F[0]=f&255,F[1]=f>>>8&255,F[2]=f>>>16&255,F[3]=f>>>24&255,t.check=nn(t.check,F,4,0)),f=0,m=0,t.mode=Uh;case Uh:for(;m<16;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}t.head&&(t.head.xflags=f&255,t.head.os=f>>8),t.flags&512&&(F[0]=f&255,F[1]=f>>>8&255,t.check=nn(t.check,F,2,0)),f=0,m=0,t.mode=Gh;case Gh:if(t.flags&1024){for(;m<16;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}t.length=f,t.head&&(t.head.extra_len=f),t.flags&512&&(F[0]=f&255,F[1]=f>>>8&255,t.check=nn(t.check,F,2,0)),f=0,m=0}else t.head&&(t.head.extra=null);t.mode=Wh;case Wh:if(t.flags&1024&&(v=t.length,v>u&&(v=u),v&&(t.head&&(R=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),fr.arraySet(t.head.extra,l,o,v,R)),t.flags&512&&(t.check=nn(t.check,l,v,o)),u-=v,o+=v,t.length-=v),t.length))break e;t.length=0,t.mode=Yh;case Yh:if(t.flags&2048){if(u===0)break e;v=0;do R=l[o+v++],t.head&&R&&t.length<65536&&(t.head.name+=String.fromCharCode(R));while(R&&v<u);if(t.flags&512&&(t.check=nn(t.check,l,v,o)),u-=v,o+=v,R)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=Xh;case Xh:if(t.flags&4096){if(u===0)break e;v=0;do R=l[o+v++],t.head&&R&&t.length<65536&&(t.head.comment+=String.fromCharCode(R));while(R&&v<u);if(t.flags&512&&(t.check=nn(t.check,l,v,o)),u-=v,o+=v,R)break e}else t.head&&(t.head.comment=null);t.mode=Kh;case Kh:if(t.flags&512){for(;m<16;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}if(f!==(t.check&65535)){e.msg="header crc mismatch",t.mode=dl;break}f=0,m=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=mn;break;case Zh:for(;m<32;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}e.adler=t.check=ud(f),f=0,m=0,t.mode=so;case so:if(t.havedict===0)return e.next_out=s,e.avail_out=d,e.next_in=o,e.avail_in=u,t.hold=f,t.bits=m,ay;e.adler=t.check=1,t.mode=mn;case mn:if(n===ry||n===oo)break e;case Rs:if(t.last){f>>>=m&7,m-=m&7,t.mode=Ds;break}for(;m<3;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}switch(t.last=f&1,f>>>=1,m-=1,f&3){case 0:t.mode=Jh;break;case 1:if(my(t),t.mode=co,n===oo){f>>>=2,m-=2;break e}break;case 2:t.mode=ed;break;case 3:e.msg="invalid block type",t.mode=dl}f>>>=2,m-=2;break;case Jh:for(f>>>=m&7,m-=m&7;m<32;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}if((f&65535)!=(f>>>16^65535)){e.msg="invalid stored block lengths",t.mode=dl;break}if(t.length=f&65535,f=0,m=0,t.mode=As,n===oo)break e;case As:t.mode=Qh;case Qh:if(v=t.length,v){if(v>u&&(v=u),v>d&&(v=d),v===0)break e;fr.arraySet(a,l,o,v,s),u-=v,o+=v,d-=v,s+=v,t.length-=v;break}t.mode=mn;break;case ed:for(;m<14;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}if(t.nlen=(f&31)+257,f>>>=5,m-=5,t.ndist=(f&31)+1,f>>>=5,m-=5,t.ncode=(f&15)+4,f>>>=4,m-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=dl;break}t.have=0,t.mode=td;case td:for(;t.have<t.ncode;){for(;m<3;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}t.lens[E[t.have++]]=f&7,f>>>=3,m-=3}for(;t.have<19;)t.lens[E[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,z={bits:t.lenbits},I=ki(ly,t.lens,0,19,t.lencode,0,t.work,z),t.lenbits=z.bits,I){e.msg="invalid code lengths set",t.mode=dl;break}t.have=0,t.mode=ld;case ld:for(;t.have<t.nlen+t.ndist;){for(;w=t.lencode[f&(1<<t.lenbits)-1],x=w>>>24,C=w>>>16&255,S=w&65535,!(x<=m);){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}if(S<16)f>>>=x,m-=x,t.lens[t.have++]=S;else{if(S===16){for(M=x+2;m<M;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}if(f>>>=x,m-=x,t.have===0){e.msg="invalid bit length repeat",t.mode=dl;break}R=t.lens[t.have-1],v=3+(f&3),f>>>=2,m-=2}else if(S===17){for(M=x+3;m<M;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}f>>>=x,m-=x,R=0,v=3+(f&7),f>>>=3,m-=3}else{for(M=x+7;m<M;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}f>>>=x,m-=x,R=0,v=11+(f&127),f>>>=7,m-=7}if(t.have+v>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=dl;break}for(;v--;)t.lens[t.have++]=R}}if(t.mode===dl)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=dl;break}if(t.lenbits=9,z={bits:t.lenbits},I=ki(Lh,t.lens,0,t.nlen,t.lencode,0,t.work,z),t.lenbits=z.bits,I){e.msg="invalid literal/lengths set",t.mode=dl;break}if(t.distbits=6,t.distcode=t.distdyn,z={bits:t.distbits},I=ki(zh,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,z),t.distbits=z.bits,I){e.msg="invalid distances set",t.mode=dl;break}if(t.mode=co,n===oo)break e;case co:t.mode=uo;case uo:if(u>=6&&d>=258){e.next_out=s,e.avail_out=d,e.next_in=o,e.avail_in=u,t.hold=f,t.bits=m,ty(e,y),s=e.next_out,a=e.output,d=e.avail_out,o=e.next_in,l=e.input,u=e.avail_in,f=t.hold,m=t.bits,t.mode===mn&&(t.back=-1);break}for(t.back=0;w=t.lencode[f&(1<<t.lenbits)-1],x=w>>>24,C=w>>>16&255,S=w&65535,!(x<=m);){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}if(C&&(C&240)==0){for(_=x,T=C,A=S;w=t.lencode[A+((f&(1<<_+T)-1)>>_)],x=w>>>24,C=w>>>16&255,S=w&65535,!(_+x<=m);){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}f>>>=_,m-=_,t.back+=_}if(f>>>=x,m-=x,t.back+=x,t.length=S,C===0){t.mode=od;break}if(C&32){t.back=-1,t.mode=mn;break}if(C&64){e.msg="invalid literal/length code",t.mode=dl;break}t.extra=C&15,t.mode=rd;case rd:if(t.extra){for(M=t.extra;m<M;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}t.length+=f&(1<<t.extra)-1,f>>>=t.extra,m-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=nd;case nd:for(;w=t.distcode[f&(1<<t.distbits)-1],x=w>>>24,C=w>>>16&255,S=w&65535,!(x<=m);){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}if((C&240)==0){for(_=x,T=C,A=S;w=t.distcode[A+((f&(1<<_+T)-1)>>_)],x=w>>>24,C=w>>>16&255,S=w&65535,!(_+x<=m);){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}f>>>=_,m-=_,t.back+=_}if(f>>>=x,m-=x,t.back+=x,C&64){e.msg="invalid distance code",t.mode=dl;break}t.offset=S,t.extra=C&15,t.mode=ad;case ad:if(t.extra){for(M=t.extra;m<M;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}t.offset+=f&(1<<t.extra)-1,f>>>=t.extra,m-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=dl;break}t.mode=id;case id:if(d===0)break e;if(v=y-d,t.offset>v){if(v=t.offset-v,v>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=dl;break}v>t.wnext?(v-=t.wnext,b=t.wsize-v):b=t.wnext-v,v>t.length&&(v=t.length),k=t.window}else k=a,b=s-t.offset,v=t.length;v>d&&(v=d),d-=v,t.length-=v;do a[s++]=k[b++];while(--v);t.length===0&&(t.mode=uo);break;case od:if(d===0)break e;a[s++]=t.length,d--,t.mode=uo;break;case Ds:if(t.wrap){for(;m<32;){if(u===0)break e;u--,f|=l[o++]<<m,m+=8}if(y-=d,e.total_out+=y,t.total+=y,y&&(e.adler=t.check=t.flags?nn(t.check,a,y,s-y):$s(t.check,a,y,s-y)),y=d,(t.flags?f:ud(f))!==t.check){e.msg="incorrect data check",t.mode=dl;break}f=0,m=0}t.mode=sd;case sd:if(t.wrap&&t.flags){for(;m<32;){if(u===0)break e;u--,f+=l[o++]<<m,m+=8}if(f!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=dl;break}f=0,m=0}t.mode=cd;case cd:I=ny;break e;case dl:I=Bh;break e;case Ms:return Is;case oy:default:return xr}return e.next_out=s,e.avail_out=d,e.next_in=o,e.avail_in=u,t.hold=f,t.bits=m,(t.wsize||y!==e.avail_out&&t.mode<dl&&(t.mode<Ds||n!==Oh))&&gd(e,e.output,e.next_out,y-e.avail_out)?(t.mode=Ms,Is):(g-=e.avail_in,y-=e.avail_out,e.total_in+=g,e.total_out+=y,t.total+=y,t.wrap&&y&&(e.adler=t.check=t.flags?nn(t.check,a,y,e.next_out-y):$s(t.check,a,y,e.next_out-y)),e.data_type=t.bits+(t.last?64:0)+(t.mode===mn?128:0)+(t.mode===co||t.mode===As?256:0),(g===0&&y===0||n===Oh)&&I===aa&&(I=iy),I)}function gy(e){if(!e||!e.state)return xr;var n=e.state;return n.window&&(n.window=null),e.state=null,aa}function yy(e,n){var t;return!e||!e.state||(t=e.state,(t.wrap&2)==0)?xr:(t.head=n,n.done=!1,aa)}function vy(e,n){var t=n.length,l,a,o;return!e||!e.state||(l=e.state,l.wrap!==0&&l.mode!==so)?xr:l.mode===so&&(a=1,a=$s(a,n,t,0),a!==l.check)?Bh:(o=gd(e,n,t,t),o?(l.mode=Ms,Is):(l.havedict=1,aa))}Pr.inflateReset=dd;Pr.inflateReset2=fd;Pr.inflateResetKeep=hd;Pr.inflateInit=fy;Pr.inflateInit2=md;Pr.inflate=py;Pr.inflateEnd=gy;Pr.inflateGetHeader=yy;Pr.inflateSetDictionary=vy;Pr.inflateInfo="pako inflate (from Nodeca project)"});var Ns=vl((Pk,vd)=>{"use strict";vd.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var kd=vl((Lk,bd)=>{"use strict";function by(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}bd.exports=by});var xd=vl(xi=>{"use strict";var Ma=yd(),wi=dn(),ho=ks(),bl=Ns(),Ps=Ji(),ky=ws(),wy=kd(),wd=Object.prototype.toString;function ia(e){if(!(this instanceof ia))return new ia(e);this.options=wi.assign({chunkSize:16384,windowBits:0,to:""},e||{});var n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(e&&e.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)==0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ky,this.strm.avail_out=0;var t=Ma.inflateInit2(this.strm,n.windowBits);if(t!==bl.Z_OK)throw new Error(Ps[t]);if(this.header=new wy,Ma.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=ho.string2buf(n.dictionary):wd.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(t=Ma.inflateSetDictionary(this.strm,n.dictionary),t!==bl.Z_OK)))throw new Error(Ps[t])}ia.prototype.push=function(e,n){var t=this.strm,l=this.options.chunkSize,a=this.options.dictionary,o,s,u,d,f,m=!1;if(this.ended)return!1;s=n===~~n?n:n===!0?bl.Z_FINISH:bl.Z_NO_FLUSH,typeof e=="string"?t.input=ho.binstring2buf(e):wd.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new wi.Buf8(l),t.next_out=0,t.avail_out=l),o=Ma.inflate(t,bl.Z_NO_FLUSH),o===bl.Z_NEED_DICT&&a&&(o=Ma.inflateSetDictionary(this.strm,a)),o===bl.Z_BUF_ERROR&&m===!0&&(o=bl.Z_OK,m=!1),o!==bl.Z_STREAM_END&&o!==bl.Z_OK)return this.onEnd(o),this.ended=!0,!1;t.next_out&&(t.avail_out===0||o===bl.Z_STREAM_END||t.avail_in===0&&(s===bl.Z_FINISH||s===bl.Z_SYNC_FLUSH))&&(this.options.to==="string"?(u=ho.utf8border(t.output,t.next_out),d=t.next_out-u,f=ho.buf2string(t.output,u),t.next_out=d,t.avail_out=l-d,d&&wi.arraySet(t.output,t.output,u,d,0),this.onData(f)):this.onData(wi.shrinkBuf(t.output,t.next_out))),t.avail_in===0&&t.avail_out===0&&(m=!0)}while((t.avail_in>0||t.avail_out===0)&&o!==bl.Z_STREAM_END);return o===bl.Z_STREAM_END&&(s=bl.Z_FINISH),s===bl.Z_FINISH?(o=Ma.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===bl.Z_OK):(s===bl.Z_SYNC_FLUSH&&(this.onEnd(bl.Z_OK),t.avail_out=0),!0)};ia.prototype.onData=function(e){this.chunks.push(e)};ia.prototype.onEnd=function(e){e===bl.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=wi.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ls(e,n){var t=new ia(n);if(t.push(e,!0),t.err)throw t.msg||Ps[t.err];return t.result}function xy(e,n){return n=n||{},n.raw=!0,Ls(e,n)}xi.Inflate=ia;xi.inflate=Ls;xi.inflateRaw=xy;xi.ungzip=Ls});var Td=vl((Ok,Cd)=>{"use strict";var _y=dn().assign,Cy=$h(),Ty=xd(),Sy=Ns(),_d={};_y(_d,Cy,Ty,Sy);Cd.exports=_d});function Fa(e){$("#luckysheet-cell-loading").find("span").text(e).end().show()}function _i(){$("#luckysheet-cell-loading").hide()}var zs=Ie(()=>{});var $y,xe,Jt=Ie(()=>{xa();Ut();Kt();Yt();Nt();Xe();$y={deepCopyFlowDataState:!1,deepCopyFlowDataCache:"",deepCopyFlowDataWorker:null,deepCopyFlowData:function(e){let n=this;return n.deepCopyFlowDataState?(n.deepCopyFlowDataWorker!=null&&n.deepCopyFlowDataWorker.terminate(),n.deepCopyFlowDataCache):(e==null&&(e=h.flowdata),$.extend(!0,[],e))},webWorkerFlowDataCache:function(e){let n=this;try{n.deepCopyFlowDataWorker!=null&&n.deepCopyFlowDataWorker.terminate();let t="data:text/javascript;chartset=US-ASCII,onmessage = function (e) { postMessage(e.data); };";n.deepCopyFlowDataState=!1;let l;if(dr.isIE()==1){let a="self.onmessage=function(e){postMessage(e.data);}";l=new Worker("./plugins/Worker-helper.js"),l.postMessage(a)}else l=new Worker(t);n.deepCopyFlowDataWorker=l,l.postMessage(e),l.onmessage=function(a){n.deepCopyFlowDataCache=a.data,n.deepCopyFlowDataState=!0}}catch(t){n.deepCopyFlowDataCache=$.extend(!0,[],e)}},controlHandler:function(e,n){let l=this.deepCopyFlowData(h.flowdata),a=n||h.luckysheet_select_save[h.luckysheet_select_save.length-1],o=a.row==null?0:a.row[0],s=a.column==null?0:a.column[0],u=e.length,d=e[0].length,f=o+u-l.length,m=s+d-l[0].length;(f>0||m>0)&&(l=cl([].concat(l),f,m,!0));for(let g=0;g<u;g++){let y=[].concat(l[g+o]);for(let v=0;v<d;v++){let b="";e[g]!=null&&e[g][v]!=null&&(b=e[g][v]),y[v+s]=b}l[g+o]=y}f>0||m>0?Zl(l[0].length,l.length,l,null,h.luckysheet_select_save,"datachangeAll"):Ea(l,h.luckysheet_select_save)},clearRangeByindex:function(e,n,t,l,a){let o=Z(a),s=$.extend(!0,[],h.luckysheetfile[o].data);for(let u=e;u<=n;u++){let d=[].concat(s[u]);for(let f=t;f<=l;f++)p.delFunctionGroup(u,f),p.execFunctionGroup(u,f,""),d[f]=null;s[u]=d}if(a==h.currentSheetIndex){let u=n-e+1,d=l-t+1;u>5e3?Ze(s,[{row:[e,n],column:[t,l]}]):Ea(s,{row:[e,n],column:[t,l]})}else h.luckysheetfile[o].data=s},controlHandlerD:function(e){let t=this.deepCopyFlowData(h.flowdata),l=h.luckysheet_select_save[h.luckysheet_select_save.length-1],a=l.row[0],o=l.row[1],s=l.column[0],u=l.column[1],d=e.length,f=e[0].length,m=a+d-t.length,g=s+f-t[0].length;(m>0||g>0)&&(t=cl([].concat(t),m,g,!0));for(let v=a;v<=o;v++)for(let b=s;b<=u;b++)t[v][b]=null;for(let v=0;v<d;v++)for(let b=0;b<f;b++)t[a+v][s+b]=e[v][b];let y=[{row:[a,o],column:[s,u]},{row:[a,a+d-1],column:[s,s+f-1]}];Ze(t,y)}},xe=$y});function Ci(e){let n={};if(P(e)=="array")for(let t=0;t<e.length;t++){let l=e[t].r,a=e[t].c,o=e[t].f;if(h.flowdata[l][a]!=null&&h.flowdata[l][a].f!=null&&h.flowdata[l][a].f==o){l+"_"+a in n&&(n=Iy(n,l,a));let s=e[t].data,u=s.length,d=1;if(P(s[0])=="array"&&(d=s[0].length),Ry({row:[l,l+u-1],column:[a,a+d-1]},h.flowdata))for(let f=0;f<u;f++)for(let m=0;m<d;m++){let g=l+f,y=a+m;P(s[0])=="array"?n[g+"_"+y]={v:s[f][m],r:l,c:a}:n[g+"_"+y]={v:s[f],r:l,c:a}}else n[l+"_"+a]={v:"#SPILL!",r:l,c:a}}}return n}function Iy(e,n,t){let l=e[n+"_"+t].r,a=e[n+"_"+t].c;for(let o in e)o==l+"_"+a?e[o].v="#SPILL!":e[o].r==l&&e[o].c==a&&delete e[o];return e}function Ry(e,n){let t=e.row[0],l=e.row[1],a=e.column[0],o=e.column[1],s=!0;for(let u=t;u<=l;u++)for(let d=a;d<=o;d++)if(!(u==t&&d==a)&&n[u][d]!=null&&n[u][d].v!=null&&n[u][d].v.toString()!=""){s=!1;break}return s}function Sd(e,n){let t=h.luckysheetfile[Z(h.currentSheetIndex)].dynamicArray==null?[]:h.luckysheetfile[Z(h.currentSheetIndex)].dynamicArray,l=Ci(t);if(e+"_"+n in l&&l[e+"_"+n].v!="#SPILL!"){let a=l[e+"_"+n].r,o=l[e+"_"+n].c,s=h.flowdata[a][o].f,u,d;for(let k=0;k<t.length;k++)t[k].f==s&&(u=t[k].data.length,P(t[k].data[0])=="array"?d=t[k].data[0].length:d=1);let f=a+u-1,m=o+d-1,g=h.visibledatarow[f],y=a-1==-1?0:h.visibledatarow[a-1],v=h.visibledatacolumn[m],b=o-1==-1?0:h.visibledatacolumn[o-1];$("#luckysheet-dynamicArray-hightShow").css({left:b,width:v-b-1,top:y,height:g-y-1,display:"block"})}else $("#luckysheet-dynamicArray-hightShow").hide()}var fo=Ie(()=>{dt();Nt();Xe()});function _r(e){let n;if(document.createRange)if(e.innerHTML!=e.innerText||e.innerHTML=="")e.focus(),n=window.getSelection(),n.selectAllChildren(e),n.collapseToEnd();else{let t=e.innerText.length;n=document.createRange(),n.selectNodeContents(e),n.setStart(e.childNodes[0],t),n.collapse(!0);let l=window.getSelection();l.removeAllRanges(),l.addRange(n)}else document.selection&&(n=document.body.createTextRange(),n.moveToElementText(e),n.collapse(!1),n.select())}function Cr(e){e.target.classList&&(e.target.classList.contains("luckysheet-cols-rows-shift-left")||e.target.classList.contains("luckysheet-cols-rows-shift-right"))||!$(e.target).hasClass("luckysheet-mousedown-cancel")&&$(e.target).filter("[class*='sp-palette']").length==0&&$(e.target).filter("[class*='sp-thumb']").length==0&&$(e.target).filter("[class*='sp-']").length==0&&($("#luckysheet-rightclick-menu").hide(),$("#luckysheet-cols-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide(),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu, #luckysheet-user-menu").hide(),$("body > .luckysheet-filter-menu, body > .luckysheet-filter-submenu, body > .luckysheet-cols-menu").hide(),h.luckysheet_cols_menu_status=!1)}function $d(e){if(window.getSelection){let n=document.createRange();n.selectNodeContents(e),n.startContainer&&mo(n.startContainer)&&(window.getSelection().removeAllRanges(),window.getSelection().addRange(n))}else if(document.selection){let n=document.body.createTextRange();n.moveToElementText(e),n.select()}}function Id(e){if(window.getSelection){let t=document.createRange();var n=e.firstChild;t.setStart(n,0),t.setEnd(n,n.length),t.startContainer&&mo(t.startContainer)&&(window.getSelection().removeAllRanges(),window.getSelection().addRange(t))}else if(document.selection){let t=document.body.createTextRange();t.moveToElementText(e),t.select()}}function Rd(e,n){if(window.getSelection){let a=document.createRange();var t=e.firstChild,l=n.firstChild;a.setStart(t,0),a.setEnd(l,l.length),a.startContainer&&mo(a.startContainer)&&(window.getSelection().removeAllRanges(),window.getSelection().addRange(a))}}function Ad(e,n){if(window.getSelection){let l=document.createRange();var t=e.firstChild;n>t.length?n=t.length:n<0&&(n=0),l.setStart(t,n),l.collapse(!0),l.startContainer&&mo(l.startContainer)&&(window.getSelection().removeAllRanges(),window.getSelection().addRange(l))}}function mo(e){return e===document.body?!1:document.body.contains(e)}var pn=Ie(()=>{Xe()});function _l(e){return e&&e.ct!=null&&e.ct.t=="inlineStr"&&e.ct.s!=null&&e.ct.s.length>0}function Na(e){return e!=null&&e.t=="inlineStr"&&e.s!=null&&e.s.length>0}function Fd(e,n,t,l){var a=window.getSelection(),o;a.type=="None"?o=h.inlineStringEditRange:o=a.getRangeAt(0);let s=o.commonAncestorContainer,u;s.id=="luckysheet-rich-text-editor"?u=$(s):u=$(s).closest("#luckysheet-rich-text-editor");let d=$(s).closest("#luckysheet-functionbox-cell");if(u.length==0&&d.length==0&&h.inlineStringEditRange!=null&&(o=h.inlineStringEditRange,s=o.commonAncestorContainer,s.id=="luckysheet-rich-text-editor"?u=$(s):u=$(s).closest("#luckysheet-rich-text-editor"),d=$(s).closest("#luckysheet-functionbox-cell")),o.collapsed===!0)return;let f=o.endContainer,m=o.startContainer,g=o.endOffset,y=o.startOffset;if(u.length>0){if(m===f){let v=m.parentNode,b,k=!1,w=v.innerText;u.html().substr(0,5)!="<span"&&(k=!0);let C="",S="",_="",T=0,A=y,R=g,I=w.length;C=w.substring(T,A),S=w.substring(A,R),_=w.substring(R,I);let F="";if(C!=""){let M=v.style.cssText;if(k){let E=$(v).closest("#luckysheet-input-box").get(0);E!=null&&(M=Bs(E.style.cssText,M))}F+="<span style='"+M+"'>"+C+"</span>"}if(S!=""){let M=po(v.style.cssText,n,t);if(k){let E=$(v).closest("#luckysheet-input-box").get(0);E!=null&&(M=Bs(E.style.cssText,M))}F+="<span style='"+M+"'>"+S+"</span>"}if(_!=""){let M=v.style.cssText;if(k){let E=$(v).closest("#luckysheet-input-box").get(0);E!=null&&(M=Bs(E.style.cssText,M))}F+="<span style='"+M+"'>"+_+"</span>"}m.parentNode.tagName=="SPAN"?(b=u.find("span").index(v),$(v).replaceWith(F)):(b=0,$(v).html(F));let z=0;T==A?z=b:z=b+1,Id(u.find("span").get(z))}else if(m.parentNode.tagName=="SPAN"&&f.parentNode.tagName=="SPAN"){let v=m.parentNode,b,k=f.parentNode,w;b=u.find("span").index(v),w=u.find("span").index(k);let x=v.innerHTML,C=k.innerHTML,S="",_="",T="",A="",R=0,I=y,F=g,z=C.length;S=x.substring(R,I),_=x.substring(I,x.length),T=C.substring(0,F),A=C.substring(F,z);let M=u.find("span"),E=M.slice(b,w+1),N="";for(let V=0;V<b;V++){let q=M.get(V),W=q.innerHTML;N+="<span style='"+q.style.cssText+"'>"+W+"</span>"}if(S!=""&&(N+="<span style='"+v.style.cssText+"'>"+S+"</span>"),_!=""){let V=po(v.style.cssText,n,t);N+="<span style='"+V+"'>"+_+"</span>"}if(b<w)for(let V=b+1;V<w;V++){let q=M.get(V),W=q.innerHTML,X=po(q.style.cssText,n,t);N+="<span style='"+X+"'>"+W+"</span>"}if(T!=""){let V=po(k.style.cssText,n,t);N+="<span style='"+V+"'>"+T+"</span>"}A!=""&&(N+="<span style='"+k.style.cssText+"'>"+A+"</span>");for(let V=w+1;V<M.length;V++){let q=M.get(V),W=q.innerHTML;N+="<span style='"+q.style.cssText+"'>"+W+"</span>"}u.html(N);let L,O;R==I?(L=b,O=w):(L=b+1,O=w+1),M=u.find("span"),Rd(M.get(L),M.get(O))}}else d.length>0}function Ed(e){var n=window.getSelection();if(n.type=="None")return;var t=n.getRangeAt(0);let l=t.commonAncestorContainer,a;l.id=="luckysheet-rich-text-editor"?a=$(l):a=$(l).closest("#luckysheet-rich-text-editor");let o=$(l).closest("#luckysheet-functionbox-cell"),s=t.endContainer,u=t.startContainer,d=t.endOffset,f=t.startOffset;if(a.length>0){let m=u.parentNode;u.id=="luckysheet-rich-text-editor"&&(m=$(u).find("span"),m.length==0&&(u.innerHTML=`<span>${u.innerText}</span>`,m=$(u).find("span")),m=m.get(m.length-1),f=m.innerHTML.length),t.collapsed===!1&&t.deleteContents();let g=m.innerText,y="",v="",b=0,k=f;y=g.substring(b,k),v=g.substring(k,g.length);let w,x;if(u.parentNode.tagName=="SPAN"){let C=a.find("span");if(w=C.index(m),w==C.length-1&&v==""){let S=C[w].innerHTML;S.substr(S.length-1,1)==` |
| | | </div>`,s=document.createElement("div");s.id=a,s.className="luckysheet-loading-mask "+t.customClass,$(s).html(o),$(e).append(s);function u(){a&&$("#"+a).show()}function f(){a&&$("#"+a).hide()}return{el:s,show:u,close:f}},Yl=["#c1232b","#27727b","#fcce10","#e87c25","#b5c334","#fe8463","#9bca63","#fad860","#f3a43b","#60c0dd","#d7504b","#c6e579","#f4e001","#f0805a","#26c0c0","#c12e34","#e6b600","#0098d9","#2b821d","#005eaa","#339ca8","#cda819","#32a487","#3fb1e3","#6be6c1","#626c91","#a0a7e6","#c4ebad","#96dee8"],it={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,PAUSE:19,CAPSLOCK:20,ESC:27,SPACE:33,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DELETE:46,WIN:91,WIN_R:92,MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SCROLLLOCK:145},Sl={fillStyle:"#000000",textBaseline:"middle",strokeStyle:"#dfdfdf",rowFillStyle:"#5e5e5e",textAlign:"center"},Zn=function(){return"normal normal normal "+h.defaultFontSize+"pt "+Q().fontarray[0]+', "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif'},wa=new Image;wa.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZoAAAGACAYAAACUS6SeAAAACXBIWXMAAC4jAAAuIwF4pT92AAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4IF5mOBCJhSDSSgKQg6YgUUSLFyHKkAqlCapFdSCPyLXIUOY1cQPqQ28ggMor8irxHMZSBslED1AJ1QLmoHxqKxqBz0XQ0D12AlqJr0Rq0Hj2AtqKn0UvodXQAfYqOY4DRMQ5mjNlhXIyHRWCJWBomxxZj5Vg1Vo81Yx1YN3YVG8CeYe8IJAKLgBPsCF6EEMJsgpCQR1hMWEOoJewjtBK6CFcJg4Qxwicik6hPtCV6EvnEeGI6sZBYRqwm7iEeIZ4lXicOE1+TSCQOyZLkTgohJZAySQtJa0jbSC2kU6Q+0hBpnEwm65Btyd7kCLKArCCXkbeQD5BPkvvJw+S3FDrFiOJMCaIkUqSUEko1ZT/lBKWfMkKZoKpRzame1AiqiDqfWkltoHZQL1OHqRM0dZolzZsWQ8ukLaPV0JppZ2n3aC/pdLoJ3YMeRZfQl9Jr6Afp5+mD9HcMDYYNg8dIYigZaxl7GacYtxkvmUymBdOXmchUMNcyG5lnmA+Yb1VYKvYqfBWRyhKVOpVWlX6V56pUVXNVP9V5qgtUq1UPq15WfaZGVbNQ46kJ1Bar1akdVbupNq7OUndSj1DPUV+jvl/9gvpjDbKGhUaghkijVGO3xhmNIRbGMmXxWELWclYD6yxrmE1iW7L57Ex2Bfsbdi97TFNDc6pmrGaRZp3mcc0BDsax4PA52ZxKziHODc57LQMtPy2x1mqtZq1+rTfaetq+2mLtcu0W7eva73VwnUCdLJ31Om0693UJuja6UbqFutt1z+o+02PreekJ9cr1Dund0Uf1bfSj9Rfq79bv0R83MDQINpAZbDE4Y/DMkGPoa5hpuNHwhOGoEctoupHEaKPRSaMnuCbuh2fjNXgXPmasbxxirDTeZdxrPGFiaTLbpMSkxeS+Kc2Ua5pmutG003TMzMgs3KzYrMnsjjnVnGueYb7ZvNv8jYWlRZzFSos2i8eW2pZ8ywWWTZb3rJhWPlZ5VvVW16xJ1lzrLOtt1ldsUBtXmwybOpvLtqitm63Edptt3xTiFI8p0in1U27aMez87ArsmuwG7Tn2YfYl9m32zx3MHBId1jt0O3xydHXMdmxwvOuk4TTDqcSpw+lXZxtnoXOd8zUXpkuQyxKXdpcXU22niqdun3rLleUa7rrStdP1o5u7m9yt2W3U3cw9xX2r+00umxvJXcM970H08PdY4nHM452nm6fC85DnL152Xlle+70eT7OcJp7WMG3I28Rb4L3Le2A6Pj1l+s7pAz7GPgKfep+Hvqa+It89viN+1n6Zfgf8nvs7+sv9j/i/4XnyFvFOBWABwQHlAb2BGoGzA2sDHwSZBKUHNQWNBbsGLww+FUIMCQ1ZH3KTb8AX8hv5YzPcZyya0RXKCJ0VWhv6MMwmTB7WEY6GzwjfEH5vpvlM6cy2CIjgR2yIuB9pGZkX+X0UKSoyqi7qUbRTdHF09yzWrORZ+2e9jvGPqYy5O9tqtnJ2Z6xqbFJsY+ybuIC4qriBeIf4RfGXEnQTJAntieTE2MQ9ieNzAudsmjOc5JpUlnRjruXcorkX5unOy553PFk1WZB8OIWYEpeyP+WDIEJQLxhP5aduTR0T8oSbhU9FvqKNolGxt7hKPJLmnVaV9jjdO31D+miGT0Z1xjMJT1IreZEZkrkj801WRNberM/ZcdktOZSclJyjUg1plrQr1zC3KLdPZisrkw3keeZtyhuTh8r35CP5c/PbFWyFTNGjtFKuUA4WTC+oK3hbGFt4uEi9SFrUM99m/ur5IwuCFny9kLBQuLCz2Lh4WfHgIr9FuxYji1MXdy4xXVK6ZHhp8NJ9y2jLspb9UOJYUlXyannc8o5Sg9KlpUMrglc0lamUycturvRauWMVYZVkVe9ql9VbVn8qF5VfrHCsqK74sEa45uJXTl/VfPV5bdra3kq3yu3rSOuk626s91m/r0q9akHV0IbwDa0b8Y3lG19tSt50oXpq9Y7NtM3KzQM1YTXtW8y2rNvyoTaj9nqdf13LVv2tq7e+2Sba1r/dd3vzDoMdFTve75TsvLUreFdrvUV99W7S7oLdjxpiG7q/5n7duEd3T8Wej3ulewf2Re/ranRvbNyvv7+yCW1SNo0eSDpw5ZuAb9qb7Zp3tXBaKg7CQeXBJ9+mfHvjUOihzsPcw83fmX+39QjrSHkr0jq/dawto22gPaG97+iMo50dXh1Hvrf/fu8x42N1xzWPV56gnSg98fnkgpPjp2Snnp1OPz3Umdx590z8mWtdUV29Z0PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAHBbSURBVHja7J13mFxV+cc/M7OzLbvpjZBKQhISUgAhgAlVkADSRcDyky4iYAAhAmpQQtMIiqigYkV6FRHphgBBKSGBkB5IIb1sdrO72dmZ+f3xniGTzZR755a5s/t+nmefTGbuPec7Z8497ynveU9on5m3YJMuwNnAt4B9gA3A48CPgY0UyPxJUzN/MLMShxwDXAMcAmwGbgD+UlBKhzVn/+yqqwrVFwIuBL7tZnkyYwaK98yaNb/QW6uBk4DLgfHAduDfwI+ApYUmOnHiKC+0AowAfgh8EYgAvwF+AMTd1OlQ40nAtcB+QIMpzx8Cy70oT8U6YZvXn2x+tN8A44ByYE/gMmA18B9g7wB9v58AzwNfADoBA4A/m4c5KPwWuCdDef4X6KVVtF1yGPAx8IDpAFUBPYGvAguBucCRAdJ7CvAecA7QA+gKfB94DKgMiMargaeAQ0159gK+BrwNqLUoIUNzFPAw0C3L5+XmAXoZ6B+A7/ZNM3rJxDTgl2Y0UUwmAxdl+WwI8HOtou2OzwFP5+hERIAxwDPAhADoHQvcbxrvTB3PZ4HaImscDmSbmukO/F6rXWkYmgnAP4wxyUd/U/m6FPF7lQO35bnmMuCvQLSIOs/J8/npQIVW03bDPjaejWrgn8boFJPpRks2jgReKfLo+yygLMfnhwCDtPoF29CMMUam2ka6Y8wDVV2k73Uw0NvCdV9F1kOqiqQzX+WvQqfP2gsDkWlcO79nD/McFWuGoAJZk8nHAcBM8x2LwRAL1+ytVTC4hmawqeiFNHaHInPQkSJ8rxob156ILBp2LYLOkAu/kRJ8egEvFWgw+iPT0cXocJTnGSmkMxJ4zfxbDJ1WjKYSQEPTC3jBYW/qJODX+L8WMhuos3H9JDP876NVQnGZLsbIDHOQxt5mVqGTz9rrgTdtjtpmmhGOouQ1NF2MkRnmQh4XATf7/L02GyO3zcY944FZZhSnKG5QDfwLd9ZZJiBOBOU+f4evAAtsjt5eIVhec0oADU21qdDjXMxnKnCJz99tJuIpt97GPcOA14HRWjUUh5QDTyAL0W5xFPAn/J2OXoV4k75j455aZMr9ZK0GSiZDE0XWVQ7zIK+7kI2efvKO+S6f2LinnzFSB2v1UAokAvwNONaDtM82z5KfbDBG7lUb91Qi+2z+T6uDkm5oQsAfkSknrx6+P5kK6ycLkTWYj2zc0x14EYkqoCh2CCGbcL/sYR6XIDve/WQbsu/rKZvP/B+BKVotOjbpHiW/RNx9vZ5OeByZv32vwDQmG51DsOdJYne/TCdk09xXgUcdfN9DkE2urwGbXCjDLsDvEG+5rcCTSASENVqdA8HtwAU+5HOjGWn8psD7RxmDNRZ7TgZ2p+1CyMbjzkZzoR3izyGOSf8DVrrUFv0S2cvWgqyl3Qgs0SrsnaH5IfAdn/LsgrgTH2rzR031FC/ysXzKzSjsBex5sQGci2wa7ZXWIzzZ5vRDW6oR76NJ5v9VprE4wxie/2qVLirXIaFQ/OIu03l52OZ93wTuxd/NytOQdZv/2bzvGMRzNeWY1Aqch2y2djLqvK9Nx/prSKidc8wzprhI2PxoN/qcby/Tg7CzN+BbPhuZ9JHNWTbvmW4qcvr362xGH/sXqCOCrJ9NylKezwB9tUoXjfPM7+4nEdPg2pmOHoXE1itGRIyLbV7/VdNODGvTOXY6xf8rMs/e1AAPoc5Anhia64uU9zDsxSD6VhHL6ds2e2DX5RjNPYd9t/GQeThOymO8r9cqXTSKVfblyNRuZ4vXX4D/LtLpowarcdGGmPYhksXAPkhh671T8zzPVfi/HaNDGJo9LF77EWAlhvetNvK342s/oojlZGe387UWRnN2A4/ebNHQnqpVumhYfY5WIfu18vFzZO3ACt2QfWBW2KeIZVSB9ZhjV5A7MnQVst5rZ3PoNy0akckUL3xWuzU0b1h8OI5FNkLm4zc2jI2dDZUbi1hOG2xce6iFawYg61TdLVx7iemFWaGzVumi8YbFenQcsMLCtS8jrsxWz3tpKIHnCGCLxeusRK7ugkytWYl1dpIZIVmJUhLFXhgrxYKhud3Cw3GUMTZWuQ5ZuM/HEzbSfLqI5fSkjWuten+Nwto5GVNt5P2KVumike8EwTrEYeNDG2k+jkQZz8cyrHtxPlHEMnoLObfKTYPUC2ubYi/Cusfc+9jb6K1YMDTP5xhO1plh5GKb6SYRL7an8/Ss7Cye/gg5LMpvmhCPGatML9JvuQR/3GqVzLyU47dvBE6jMK/A35B9zS/1rH3X/GvV0DxVpDK6zsa1P8H61KHbsxdnaHV239CALGSex65TRNsQd793Ckw7bob+r2X5MU8E1tqsABOQHdfNPpbRbJvTDffZNExuPRyTsTfFp7jPDchO+LVtjMyZyFSYk9HS3VmesSuw546bRDaT3oi/02hbsrQF2XgT2SIQ91FjI/AldC+N66Rv2PwjcpLeoUjI/FkuVMTUD/d7Y1i24GyD4Xrg66bn3gfrIcwxUxDftZnfJxTmUn2jGdJf6sNvmBp16sMRDP6CuKEfjBzP/KbNDlWu+rsNcQqJIGGSbkKmo+wSM52hn5jnyM5xzIcj0+J2PNe2m05nzKbOvyPrML/24XdrQQKIvqVV2FtDkyrsVz1oCN0Ox7EDawuqIIt/PynAyHyALNyudtAwdMXbaAstZkrmHa3KgSJms/dudSRyHfamn6zMOnxq4/pTTaNvx8hsAk5w0ID/BnGaucnD3yuJzOg8o1XXG9r7oVoRJFyL3T0Os5BgnKtdqLxeOTHETfovazVWfOAi4BGbo5+V5jlyOkqYDvzCw+92HTKbo6ihsU3Kz/58m/c9jbhyb3FBQwvZ16mccpk+HIpP/BCJJmAnztl84PNY23tnhSke1fefYW/vn6KG5jO6IN50dsNU/AGZimpyUUtqnWqei2neSuHBFBXFKiHECcFuiKo3kVBJK13UkkQ2XLo5Q3A/cI3+zGpoCuVeYGIBw/ML8cbLpQ44GncW7H+Hu/P0ipKNb2Mv/BLIOscXsLa52y6tZobgPy6k9SIy9ZzUn1kNTaF80ca1CeByxDXVy0q3AZmSW+UgjaeRSAH6cCh+MNnm9X9CHAYaPdTUiERBn+sgjbdMGi36EwfT0Fhp4BIB+F5Wp75akLDgfp1YuBw4nsLOpXkDeyFJFMUp221ce5sZIbT6oKvOjJoKmSFYgkxlN+rPG1xDk8+luIlgbBq0Emaj3jT6D/msbR7i7tlo857j9eFoN6x04VnzAysRBJLIQv1Un0fahcwQrEK2LOjG5oAbmnxeH48he1yKzfQ8lWkdEjn6pSLpewtxVGix+HAcj/2D15Tg8mCekf/7uOs84kTnm3lmBL4G3FkkfXZmCOrMtUu1+vlPmc3r/4UsRl+Y5Ue/MiDfa7UZNfyT3Q9XW4as4RR7J/1LyE7k+5Aw722JmYf8Apyt6yjBYw4Su+8nGT7bioSxCQIJJAzVv9j9wL4G4HTEu7OYzEPWkv6BRDloS9xcc4mbxnvWrPmB+IEmThxVEhW+EGeAi82PNtf0aFYju4UPCtiQ9H/AOGT9ZRUyrfcY4tsflHAtTyIhzi/NUJ79kHAfi1HaIzchMdBmI7H7NpsRxEFmRBMU1iMenFORM6l2GM2HB8DIpD/rQ0x5vmnKcxMyA7M3sJ/RrJTIiAZkHva3WDsGoNisQTzKLg+wxjpjWH6t1bFDUY1sgEyav4TpfScCqLUJWey/LcDl2YRELnikBH77k5EDEsebkeG/KF50en8MzfxJU/WRd4MZM7QMFKschhy/nD6tW4XExTsL2U1/BR3wfKHUVFCxp6Y8nJK6po3BrgK+gawfTQIW6IimKI9kM4rSjvgcsh+qS5bPI8AYZOPjUbgYTXjixFFWGvAIsmbY3fzb9nWuz3Yga7h3k8VrzmEDPhwYbUYBb2L9VNFUg/4dY8hHmbZvCTKd/jNkbcxrRpL97K+eSJifw9XQKIrihH2AZ3MYmXSqEWeWI/HOA60PEl7mc0APYzScHAdebXrs1yBrjlchO/Cd0h/4K3BE2nv1yHTTneR3q+6OBJ8dl6Hhv96MJCfhvdPN2eSOF3cYMJBguLa7a2hGvVb8eHLtYvruqquCo0Wn8YLIQGTxvJeNe3oYw3SIB41gZyRK+TCPvu9Y4DkkUsA/HKTTAwlKO7jN+7XAz5HF/kvzGJvpGYxMOoMR54xvelwHBlu4ZkB7NDRhff4VxXN6Ie7s/Qvszb9s00BZ4bseGpkUEeTQw04O0rg+TwN9CRIMN9dIYYKFfD7nR8fewjWh9vgAhB1WgM3m73qUFF8CPkRCcSR9+ms1eZ6kxR84uhgj46RR39uMCjq5qOsMn75/byQieqGcbuGac5GTTbMZGysLvT20qgbP0HzJDDVTi4A3aSP3GX9GFhsjPuYZMXn+RYs/UFQjrqtjXEhrAuJEUO6StmE+lsP3HdxrdRR4DvBwlvKxEkm6m1bXYBma/mTe8zHDg+F9KfJQB81b2ZVyJObeIS6meRQSIdmNToyf+3VGOrjXztrUaYgXWUUBhqYC8UxTAmBouiCLk/2z9JAecrHHVapcgr1z2N3ieiRqg1J8IsDfkKCPbnM27kQb93OjipN1h6dsXn8iMs1Ynfae1dNydVTjEWU2H57780wDHImc7X2JawpnVgantKzv6TkTWcD1y+g+CNyi1TkQhJCoGV/2uDOzFvixgzQeBg70qUycbIb7MbKTfqCNe44xHeITkb02dgzNp1qFizuiuQsJVJmPb2H/VL72xuv4d3rf28D56GFoQeF2JBCq19zosEP3K5wdHmYHJxHdNxrDYfdY6FQsti42DI1Th4Awspb2JSRWoRuUIxs5601Z/AUY2l4NzVSblfpOZD7ZbWqR8A2fIHPMXnlxJUwet5k8C+F+vD9y+VO8P9FQsc51wNU+5neXGT0XOso4GtnJPx8JTPk8Mv39G2QH+/eQTZfFrl+LjOH42OZ9hyAef1an7pxMnU0GFiLBO59Gotmf5fB7p6ZgLwJqjCH8OhL9e3IpPRhWps5OQjY82SFqKuwhuBcpuRqYiQSi82P6YyCyw/lYJOJzIQ/brchu8G94NB1xGnqEQFA4r4DnxCkRZMf8RmSqtpDRwkU5Pu9sjE91AMp3ObJz/kUkFI1VDjDPoJeG5qtmpBFuMxL5i2k3nnbQkcg0BVuDxMo7gBKJjZZvRDMBeIDCvNN6Il43XVzSer1PRqYt43G2T+jCAhsBK+m+hRIUirWXrNw0Op1dTrcaibc2IUBlvBIJQ/NRAd/FK0OzN7JhNJylw/2AMZB2yTeLVF2Ejo0nhmYvdvfesMu+Zujnhjvm2UUsJyd5t5iRh5vxqm435aoEhz0sXrcKCf2Sj59j7QTWVAPpZiesCvH2mhTAcl6DTKPN8SDtQgzNVezuTt3WIDyNhOSxyiVkD76ZzomzZs0vD8ohbIUYmi7IoVxu7Is50WKh5WPPIpaT07zrkLUUNw6Gewbv134U+7xh4ZoNyJn1VmJZvWw6OHGL+Te49D1SI6QvBLisNyDrS28HwNAcYOGaLsiU3xAL156ETJmFLP5WnUrh4QhnEf847uxmTnENcra4E1YXsZzcyHsp4o3iZGH1Q1OOcZSgkc+9vM50uj60kebjwGUWrlsGvOfCdyhDXOWPd7ls6jwo783GGL7uYprdC7hnq8XremFt8+73sD4D9DbWPeoCZ2juxRuPsd/hbL73gSKWk1t5v2V6qYW4Im9Czm+vQwkiL5F9zrwRmT79bwHp/ibPCDaJBMh06t6e8nA6tYTKvM6MEP9TREPzQ6xPcbo9qju7VH6otoZmKvB/HuVVaXpo/Qu8fzrezMvmYw7uLro9jf2pr1bEjXUJSpC5wTw/a9sYmdQGXiejpbszvB9HTuL8h0PdISTK8lds3vc84tJbTBrMCOzfLqRVyNTZm/i3Zy69Tn2plNqDdEPzVdxZS8lFP2Nsqgss3MOQmGp+nNewAlmQPQz39xHcanqqVvku3niuKe7zF8Q1/jAzihmKHGDmlMuMwdkCbEPW6j6P83A0IVMXv2nzvv+Y0Y9fvfnO5rvOR6ahlwLvINNHM3FnDbdQ9+b7kdM7/aDFzGyUlMdpah/NocB9+HMWwoGIO+A5BfQC6pENcVdT+lyGnLORb+PVPVl6s0pwiSGHdblJ0oyE3XYE+Tn2Y+S9ifP1Rrsd4ieREFde4mTD5q+RdZhpHupLmtHTC6X2QKQMzSP4GwzzLMTdN/8I6rBm2ilxZI71NbI7XrwCXK7ttuIRl5vRsh3eMZ2jeh91nuaDkXFqaEDCAvVCTvz0gmvN6KnkCJthc78i5D0dCT7YkalD5pcz7e5fisyZt6Ao7lNlGkY7zAO+yK4OKVY2czvtLZ7uU5m40au9zCNjcCvw01KtbGG8jTJrZWTT0VlF5iCkV+LOvhtFycQEoKuN6z9C9q5savO+lViAOxxqHe5TmfzZhTRS01vPuKjLj7iJnhua85EFNj/3ZsRNnv+nzzsgXkM3ID75683rp7VYFA+xEyx2CRJBeUOBowCnbUvYpzL5lUvptJjZCDf2+PwT/73aXKcMCTXxlD53RWc6JRS7SCl5rG4c/QTZV5dt0/LLFkYcTj2kluB9nMMluOuq3Ygcq5JrDRYL5XYm7WD6vEyfN5eYMUPLQCklliFhUXKFmlllPs91FsxU05B+PsvnryOL2E54AjjDw7JIIjvy3R411CHR319DTiC2a/j89Ozz1tDMnzRVHzlF8Rcrh3j5sVfsXNMIDs6i8RjybwqsQ/YMnYl4h40w7y9FTvF8GDnfyQkPIftUDvGgDLYi3ndPelTGaxEvvVexvtdnFeJl127WaHVEoyj+86DpQWdbe3gfd6N952rQPocccfBlJGrHKmRT9XRkvdAKCfOdHvRIZxyZhrrNGLVo2mchcjs1VJM5uvJyxJPrYazHKyuUJcbYvEb+Y1NyeaKWrqEZ9dqtgRCiIyufuOqqYOnpmFOOc4AfAT/J0sP200lmE+LheGVQCidL2Pst5D6kzRMNEyeOcivJecg02jNkjorfYurFFW52MoJyhEDpjGhmVhY3//a7cVQpDjchi89XIgvdjUjssB8Ci7V42iX/RaYpT0M2dY4HtgP/An6A/aOqS2dEU8A9XZAd7d9CjkjdYIbaP0aOhu3YtF+DGEJO9fy2/u6uUI1ETE6avwQyRZTQonHEPsZYH2PK91dIWJigHK3RiETJLoWDC7+JbEAdbUa+T5myXG83IbuG5mTgj+waqmFPI+ZiYDZwgY89sj2Rk0ArkXnaKvOXel1ptKa/rmxzTRVyBvd7wJ3I/pXt+rzuxm/bTF2kfvcTkc1/urnUOocjYZ/Sp1CqkMC2ZyF7zK5AQhAp1jkN2dyY3tu7ARiFxFbc4VZGqSm1Yk9NuTi115Y7TR1M0Q85+fN4YCI215DsGJqjkIWzbDHRypGFupcR7xAvF7MipuE7H/cCgR4E/N00mBfizt6iEOLZc4Xpae1AFgSnYf9skqh5YHoCnwKLfOylTSb7/PgQJDDj17Wds8SBpm51yVG3xyBz+UfhfZTersjR4HYX2TtlaQuWIlGmH0GiTPvFOPP8VmQxQM8iUY/9iNE2wjyrDUgAUjunn1aZ9uJMk0YYcSZ4xDxnfpxHdVgbI5POIKPjTDsJWt1xOwHZvW4l8GZ/86N28bAgrjYjJy+iTfcCHjOF7dTI3IdEqh5rHuIa02i/bvRboQb4mTGAc5C9D/ONsbkO66fxOeGcPJ+fTu5z05Wd0zr/tPhsVJtrx3ioJ2Ke1QtN47hX2t8QMwOQ7S9bWzAUOdtmKd7ufWnLLXnq4FHI4XQ9PNTQ34xCFyDTys+b5/S7Fu/vaTqgtwD7me8TZed04DvAHj6UZb4D1U7B5hHSVgzNGGNk7JwhM8ZU4GqPHg6vPWQipnF32jh/M8dI8l5knSsX5UhI8KsyNE69ERfUe32oeIMs9MJ6qR3JW4bP2yynHuY56u+Rpq/gzd6UVKP5EOJp5TVVFvM50MwoeFGePUzaR7R5vxa4A1krytcxvhnYN8fnQ43B8ZoBFmZXbJVhPkMz2FT0QhqRQ5EjkN3uce9jGlk/pjic9B7yGZEQcoZFrgOTTgUOzpPOuRYqhlNCLtSljkxvMxItpIHrj0xHe2HIvT62OYwcVOg1lTbamX2AWbgfqPN6Mm98TXEpcrZUrufkIAv5HBSQOl1utyJko5fpTTux/ieZxtTNKa4ePhbmjx0aRCsN+C/JfubMEItpDEIJKl2MkRnmII29zaxCJ5e1DfXh++9rsR47YQty0qad0eVMZHrKLawcZXAhEiE6m1GMWUijWyk+BOEcD8cLDh+OFBfh7hHRW30sHyfHGFhdAAwBvyDzdGCTxTRqUYJINbJHwo11lgmIR6SbBxT6FRH4Uh/yOANxkLFKHyQszOEu5W+1Q/41xGkhmsVg5qN7ezE01aZCj3Mxn6mIa5wbzMe/0/2cjMRetHn9DHY/otpqQL1qlKBRjgSDdHMN5CjgT7g3Hb3Ip7I414c8PkEceN61cU9n0xH4kgv52/GyPZPMpxpbMTRd8McByFNDE0XWVQ7zIK+7yO/NYIUY8DufysdJ5NRbsO+K+FNjlFNY3c+jhiZYRJD9HF4shJ9tniU3eMyn8vBrF/M6JBjlf2zcU4V4iH3NYd52t0OcbO6psmlooASnz8Jteu9/RNZVvHr4/mR6ZU6ZhvinB9nQLEWm3pps3ncLO0/Ts7oPoUbb9sAQQhZ9vXTtvQR3vI8eR6aPvGaLj+W/DdlC8A8b95QBfyH7WqkVfoz9vYPHsatH76b2amjSN2z+EtmZ7PV0wuOm1/Geg3TqETfCVMTZHcYo1JmGvRHx5jrZhUrrhOcQn/MnbI46ppvfZpbF62td+F0OMRX4NRsVPt8Q/3dI5ICtSBj2nwBr2rmhuR3ZSOw1NyJ7q37jII2EeUamI8c0p/ah1LEzFE4lEoLECZsd3LsvEnVkLPacIexGPUmtldZQ2JryRuTsHrvehUcD/0aiU/s1ooki3qw9gTfMSNApnZGtFieZ+vOPdOOb+jF+SG43WzfpYgr2UPKfdZGLFjM9kYkfuWBkwJ1QNM+bwn/aprG5EXEtt4KTqbNzkfDrvdKM68kOe7rVpqJNSpueuMT08k/EflSEUuE6dl9n85K7TKfgYYedqcty/I5PFtHQnGdGh34G//0JslH2/QLuXcjO6CiDbdw30bQTj/hgaL6C7Ozvl9bGnWmjrcnWUX2CnbNVVYiH3anGgP43bH7MG31+IHshi3Be7A24HplacwO3Trd7yRS43fSO99jQTEeiF/Rq0zN5Eti/wDQjyDrfpCy/+zNA33ZoZM7D/6O4I8BfcWc6ui01pvE5xoW0Cpk6G10EIwOynODEcWk54slmtxM9AevbKQo1NNcgZwb1S3uvkzFwBzuog/dnqYM9U8972DTMxWAYEqrCTaYi4dfdws1jVF9F5o4bPGoU7HIMO9eCMo06n8O+e3sI2QF9Up5ORrHqnJcU6zuVA4+aDoKbsw7P457rbyGG5iKKd4zJN3G2Z2mFKbuPCpgJsEIhLs4HI+u/2fJ9jsLc8O8i93pkL+AHYazvfv8IcS3Oh52T1I50sXJcnaMgnUwruMlMY2zcds8uZI0m3znuvcwUgJ355pvJHxEBvN+RXgysPkersLb29nNkethqD3e8S9+juxmBu+mWXYih2aeIv2UFzjdBf4qsI8/1QF8hI5qryb1Bv5DOpdVtKyeHkcUgKw/HsViba/2NDWPjVkM+BXENdhsvjguYZYyNm1FYC5k6O9TCNQOQ9TQrPahL2NU1OxedaX9YeY42IJ5GKyxc+zLiymw1QrcbI+XeJt8DXC6bQgzNpiL/nm7kvx6ZUnrXZW3dPHre+yFLGr0tPu9WO/a9w4iXTL6H4yjsue5dh4Txz8cTLhT6Fab3ZwerD2+jR5X4ddPguGVsCjE0Vr2/Rpk/K70bq7THc1byPXR1iCPEhzbSfJzsC/XpLMOZF2dqRPYq7m7UdmJonijib/km7nhipQzWUbi7HaMQQ7PW4nXDkDiPVgyNVf4RRuZib87xcEzG/kFmScSL7ekc12zE+eLpZUhkVDvUYX0+vdHDyjzbjBK3upBWIWs004v0EC/B+hEJpcRLOcq0ETkTpRBvu9+QfS0t9ax9F2fhZAYaI2N3usrq81HI6OARZCG5GHzf5fTqgC8iWweKZWhuxr+QQ+ksBS5Pzdldj3jNpJ+SuA3ZA/JOgRnEzdD/tSyjpBNtWNlsFvUX2AsTU4csgltdpHM6tRdBDgSbgUwnXofENLsI2czZz7zvtAIUskZzH+5551llg+m4tNfTOG8A/q9NvW5E3EdfdjhaujvLM3YF9jYntmUIspPebjTj/2F902ghI5qkMc434e802mbTCXSbejOL8aILaRViaB5Fjhvx+3k/Dlid7tXxR8RN7VDkZL1ZOD8LvhGJI/R7Y1i24M7GvQvMg2fXyBxnHpBzLN7jZI0mjIT4ONmHH7RQ9+YbkUV/P4IepkbHS2jf/AVx705tiHvTYYcqffS+DXG2iCCOJTfh7ATO4abhs3vMxCzzPFsdmRY6ao8BPzAdoj7YC2VzpBkNRm3csx3nRz53ZvcNsFvTOpNuhOMp1L35DvO8f9+H5yDV9i+B3d0HW3A/JEUdsoPfLQ4yFciOkalH9qTMtjkCcDJ19nWfjIwTQ5NqwLribVSIFtM7fYeOQczFaZL0Hv515J5Gs0NPJEK7XSPzimlAttto8JyGoIkjXlxWOcN0RO0YmU3IXjcnhjuMxC87wuP65eSolOvM836Jx8/7yellWYqHVV2PPf/6BmNk3iigYXZiaM7zsUycxDpLGq1Pe6QtbtJ/GSVI/ABZm7HDv81IJjXSt7qfw89YZ99GNiXaOVr8E2R3/lsO8z7NByPjZEST3rl80CNtqfbkxbYWuNSws/em0fRSZhU4AnCyRrOfj2VS5UIP5GwPeuGpSn2/tuuB4xSb1z+NbMRN73wFzdDcaEYydsLofwB8HljgQv6n+/Q9dzi8P46sJb7ggbZrMz3vpWhorM5xNpqRzEwHIwAnazRVPpbJHBfSSM2pznNR1604C/qoeEc/G9c+ikx/txTQs64HWj3+LqmI2XYjWs9CYpOtdknHCJ9+u/tcSKPFdDbecvl5z7ifsRQNjZWGsNH0vv7j0Ag4MTQrfSwTt85lr0MWMd1YsP8d7q0nKO5jdc3jfsRDMlOUAiuGxg+PscsRT067I7RjXR5thXz67e52KZ1UZ9yNzuX9uZ73UjQ0v87zeZOx1C/luMbK5rbN2Ntc15YXfSqPjTiLvNqWDeYBXOUgjaeRxcYkSlCxcujZH5AplmwbnK0cK+3HtJndEzL/gKynNLmsww+Pyg+Aj11Mb7MxNssdpPFPZF0m6ZahsdJwJHwYNv4xxzD9FPLPPf6N3HsPms0D5sQZ4Kd4u+ET0wCcj/uBOpebyldIb/QN7IVOUYrD9DwN1m+QUO+5fkcr0y7/8+G71Nn83hd6VD+9jmaQwJu9MKkQY4Xsb3sL2SeWMy6fXUOTL0ZTE95vxkuaxvUbSCiXTUbXn5AF+OctNtCnGGPyH2Og4ubBuxeJYup0V/Ji0+Bu9qgc3jaVwytvsXnYP9pgnjFQjSi5WOnCs+aUTchRDq9m6KxdieytytexvN70sLOxDH+OILHSwCeQKbYbPBxpP4Q3mz1TMxdnWmzfCh2NfcGm0V5iRpN5n3e7YbjvJ/d+i8dw7hFh1dj81fw56R38xfx5xdPIPoXhyL6FSmR9qFva667m39TrSsQrLv11F/N5Ajnk6gfY21dQKG8ha13PWpgmWWWMTB1KPh4Evpejo/c+7jpl5PrNjjT1c7QZGb9pY4S8EdnXdoVpBEchHl9LTFvwM9wJsZSPBxC35mwRp1tMx/QhH2YYjkcOEjyMXffxhMwznY1OWZ6xpUhkiEdwP5p8W+aa5/1f5PfMTdUdSwMLu4bmX8gi74VZpluu7LBNx8ysznCNuOMVZl3HYc1upvgScirffWRe/I2ZxukCnK3r7MpVVwXr950xw83U5iCnwP4kw2dbzUjbTxaZv0JoQryNbi3irxNHNmlmOlOlHjmW4iWftGzBvmNCoFoyxMPw76aDm+l5fxuZVbL8vBdysNDFSNjrS4CRxqI9ZR6cjZ59fXcbT8UeTyI7wr9qfn//fvf2y03I0b9XImfJNJppkR9iP4itIiP8CWZ09Q1gr7R26n0tHls8i5xDdZYZKY5GplqfMbMptiNbF2JoUmeJJNv0KIo1YvAH7w3dMchRq4cg6zo34O20nl3qEI+/Xwf8IQmZEfe3kWjEG5Bw+z8OoEF8BOvnxLvCxImjaMf4Prpqx+XZgMSodOUUZLuG5mTE4yt9CmVPZPf3xchC2AXaI7PNT4xhSdEJ+DMSWdfdxdTUFFD7Ndy/bTN1kaqfJ5oer6vOKu284VZKnKDUTzuG5ihkITrbonA5sgD2sumVr/JB/56mMU5fVK80hjD9db5F+Bpkb82diNtzg4+/wTfbGJl0piEB9K7A2z0pIeBck88+iEPHayZ/u2eoRJFF4Z5mOmMR/rk6Tyb7/PgQ5IC8r2vzo42jEkxDM8E0wFY2aPVH5vgm4Z0HUgj4pZkecWvT6UHIAthGMyp7yofyL0c8VHJxGRJT6lxkIc6LsrzPGLx0YzEZmc67xOLwucYYpgvYdRFxPXJu0G0+GJx8xz+cbvTt0EdfUfzDSiM9xhgZO6HoxxhjU+2R7suREzy9iGzQE3HNPMyH8j8Ya+dzfxVZZ/Aifto5bYxM247IvcgZKPkM5gvIZrK2niq9kU1y9/pQnoPyfF6FnMehKEqADM1gYzAKeTgPRfzbIy5rDgFXe1wuEWQPgNfYCe9/IhKmvavLGr5lobx/bQx7Nk41RjMX52L/7JNC6oYbnStFUXwyNL1ML7W/g/RPMo2Um8HmhjrUZJUDgT08zmM29qYXJyFuxn1c1GDlnPjUVOXlWT4fYjGNQfrIKYoamhRdjJEZ5kIeFwE3u6i5t4/l82OP099sjLGdHb/jkfDmg13SYNXxIYSstWTalGs1OGGtPnKKooYGZF3laWCci/lMxb2jQ/3cC3GWD3nMRDz61tu4ZxgS5220C/nbjTI9g92nLq3GNqvWR05R1NBEkXUVLxbC70KCTDplCf6ccZHqxfvBO6bMP7FxTz9jpA52mPct2PcO/KnpPKSwem6PGhpF6eCGJoRsxjzJo7wiSITloxymk0A25fmBn1GIFyJrMB/ZuKe7GZEc4yDfpWbkZvdsjlvYedCR1am/Gn3kFKXjkb6P5pfkjszsBuWIm+6RWDt8LBs3mxHApAAbmsmmPIcAFTbui9rMpxMSg+iryJG7hfAccmzCEzZHHdNNHZpl8fpaF+rPIcjG29dcGtl2QQLFnogEtHwSidSwRpsHRXHX0PyQ3O6rbtIFcdM9lMJPpGtEjhz+MuIyu8O8V4ccWrYdWRM6zaHWQsJyh9g9DIrXlJvR4gsUvkn2eTOafdqmsbkR6yd8Opk6OxfZ9Nkr7bc5md3PU7FDNbJHLNVhqTL15gxjeP6rTYSiuGNozsOfw4nS6YUcOXAohceeiiE7+TPxfReMDFhfe0jnWxQnTHgnZArsHgdpvIQcdvZPm0bheI8NzXR2P4+8sxl9HIVE6bVLBFmPnJSlfj4DjAXWajOhKM4II6fkFYNhuBQZtA3fwz136kKmzr5VxN/z2y6k8Soy7edFvLdC1miOyWBk0kfHz2HfDT8E/Irc65G9ivhsKEq7MzRWNyV+BMy3cJ2dEN1Huvx9pgC3u5heIYZmRBF/z5EupTPTGJt6l/UVskYz1cLo+GXsbeK92WKH4FRtIhTFHUPzhoXrViHn02+2cO1vbBgbN48mvQKJzusmhegr5pknbobAn2WMjZuBUQuZOjvEwjUDkHW/7hauvcSC8UrRWZsIRXHH0OQbAWxA5sHthP2/DmsuyE+49D2+A9zhQfkUskbzdBF/zyddTu914DgXjU0hhsaq99co8+d0hJTOK9pEKIo7huZ5sq9p1Jlerd2DzJKm8X86T89/ugvf4RLENTtkU58VCpk6+xHwcRF+yyYkTL/bzDaj2a0upFXIGs30Ij0bS5AjBRRFcUjKvfl682C1dR89Bdm1XghxJBLAc+zu2bMB+BLOPXouBO62aWTqTONlZS2nEEOzATm/ZwbiJuvXUZazKXzaLoIcFzAe8ebbhriJN6S9vhXZpOkkWkIhazT3IVNj03x8LjaYDtYGbSIUxT1DAxIV4H7E5bgrMkfvdL2h0RiU3yP7Erbg3oa48xBXXrtGZjLW5vJTxrYQ1iMnOV6ARFq2c5LpZcB3beb3CYW7VIeR83dO9qG+FerefKPpAF3qg8ZUHVmizYOiuG9oAFpwtgEu24P7ZZfT/Bqym9uOkalH9nu8ifWYa9sd6twBrLB4bcgYYLtG5gNkHWV1gRq/7pORcWJoUga4K95Gr2hB9l+9o02DonhnaEqB/YE/YO8Aq+3GyLxhs8HzK9ZZxIzOzrd53yxkL8gWhyNDv3AS6yxptNbiTTy+uEn/ZW0WFMVdSvG0weuQkCtWaTRGZlYBPWs/DE0VEv/NrpF5Glmk3+Iw//18/O2cHkXdYkajr3mg7TJk6lhRFDU0tgJpNiJrQzPbvN/J4v3bPP4uXdgZY8wOf0CmeJpc0FDl4283x4U0Uut+81zUdSuy/0tRFDU0toxEI+I1l2kvhNWNeNs9/i73AhNt3jMd8baLu6RhpY+/3QyX0qlDgqq6sWD/O7KHuFEUpYMamrkWrmk2Pf4XsnxudW3Ka0PzRRvXJoDLgRuwvg/ICi/69LttxHqUZytsQKYOVzlI42lkH1ZSmwJFCY6hsfJAJjzWfFeez1uQGFX/znGNlbNwNgMfevxdrE59tSD7XO7yQMNP8X4tKo6sQbkdqHM5sv5WyLk0byDrPXFtBhQlWIYmn6tuE95vcnsAme7IRIMxMs/lSeNhcoe/aQb+z4cG2EoInpRb9kMeaVhsGtzNHqX/thl5eBWaZx5ytEGjzXuOx98TVBWlw2LXvfl+cu9jeAzZO+I1FyFuqJcAo02D8Qqyc32BxR72Gch+nHMRl+lOyHrF86aX78eGvelGR68sn68zjajX+zqeRnbfDwd6ItEMqpCTLFOvu5p/U68rEe+99NddzOcJY8x/AHzqQzm+hThUPEt+j8RVxsjU6eOvKME0NP8yo4kLs0xjXOm6wplZI7g8aP4KJQH8xfxZ03FYc/bPnypo0/pqTr47ddBYW2OzDPgiT11q3+AdVlB5NOKOV1ixeAn4ChKypluGz2PIZt0LcLauo3jMxRdfHBgt99xzj/4gRTA0ABcjJxpegpx/sgF4CgkmuVGL1CZPXfo/Tr57HHIq6KlAD9Mz/w5PXaqnO9rjSTOy/aqpp57Xz1JpFLXxVkrF0NQg0zhHIsEX+yLOAT2R6Z8DTI/4FdNDbyjSd2qrcwgypQMyXbI8cDqfurStzkmm0fROZ67RWWlTB/za/BWDPZCp3QPwbo9SEzKdei+FxwwsFZ19kaC/JyKH25UhzjG5PEIbzAg2E0l2j0QeQyKuP4Ksm6oXYhEMzTDgWmTBONselt7mb4LpSW5HFu1vw8Jax/xJU934Lp7rdIlS0VlcZswoRdWnIFOxtT7k9SXgKiRW3VPtVOcYxP2+d5v3y8m9FtetAJ0HA2eZTt2ZqKOIq+TyOqtEdkx/iMxrd7KRbidzz4emcfQyVL7qVILAvsiaYa2PedYi3oj7tkOd5WZ00dvn3/EE3NtYrOQxNEORhdNrsRdXLFNlucakNcwD/apTCQo/ACqKkG+Fybu96TzJPDfF4EJkmk7x0NDsjxzhO97FfMYjQS33dzFN1emuTsUZRxUx7yPboc4Di6gzQqG+m0pG2q7RDEM2O/byIK8+Ju1Dcb7OoDrd1ak4p6edi+NlYbb0q6KuTyVNtVGSYQgloKo+Rpd1zXT7tIlIq+UgG7280llR1srofqsZ0WctvWrqiYQTxBNhNjTUsnBdXz78dE92tJZ5odPW1F6nUIgxkQj7lpWxRzhMp1CIeDJJXTLJikSCD1pbmR+P2wlb0kWrtDeGpgp41KNGMb2iPYYsvBUaeVh1uqtT8ZGWqggrxnRl3dBaEpHdz+3bQhWfjuhMOJ6kz9J6Bs7bSnmT/1FyOlc1ccK+7/P5oUuIRjLnf8TwBcTiEV5fOox/fjCObU1VvuvsFApxXHk5R0ajRNt+GArRExgaiXBkNMrmZJJnW1qYFYupW5nPpE+dTQPG+ZDnWJyd/6463dWp+MSGwZ14++T+rBneOaORSScRCbFmeGfePrk/GwZ38lXngYOWc9NJj3PE8IVZjUyKaCTOEcMXctNJj3PgoOW+6hwdiXBjdTXHZjIyGegeCvG1igqmVFXRORTSClkEQzMUmOJjvlMobDFbdbqrU/GJT8Z1Y8HE3sTL7IUXjJeFWTCxN5+M6+aLzi+NncP5E2dSUdZq676KslbOnziTk8bO8ccYlpXxnaoqagswGCMiEa6tqqKbGhvfDc1UsNQpcIuoydMuqtNdnYoPrN6nCyvGdHWUxooxXVm9j7fLBl8YOZ8Tx7xPoc1vCDhhzPt8YeR8N+RkXfjZOxLhm5WVjs446RkOc1lVVS4XUJ1dc9nQ1CKbB/3mLOwt+KlOd3UqPrC9WznL93NnNLJ8v25s71buic7+3TZz6n7uxG49db93GNDNcTDwjPOFFaEQ51VWFhQ7qy17hsOcWpHV03ub1l53Dc3x2Ns86BadTN5WUZ3u6lR8YNkB3UmG3ZmiSYZDLDuguyc6v7z/25SF3TlKqiyc4Iz93/ZE59HRKN1dnPI6IhqldzisFdUHQ3N0EfM/2qNrVadSdBq6l7O1r7ueWFv7VtHQ3d1RzYBumxnZd42raY7su8aNUc1ujdWR0Wjg01Qyl/PYIuY/1qNrVadSdDYMqimJdA8c7I23mNvpDotEPPEW26+sTCurD4ZmaBHzH+rRtapTKTp1fSpLIt29e6/zRKfb6Q6NRDzR2S0Uood6oHluaDoXMf/OHl2rOpWi01xbVhLp9q71Zt3b7XR7e2gMdJ3Ge0OjKIoHxMq96YHHKtxNt1N5iyc6O1U4OtV9t8WtMg8NTYa0m7UGu2toiunGt82ja1WnUnQicW+2YkRa3U23Je6NQWxpdTTy2s3jwctAPK3J3cp0h9Zgdw3N0iLmv9Sja1WnUnQqtreWRLqbt3vjje92uhsTCc9+q01J3Z/ptaGZW8T853p0repUik7N5h0lke6KzT080el2usvj3oxp6pNJNnhoxBQxNC8VMf+XPLpWdSpFp8dKb04D7rHK3XTnrBroic73Vw1wNb2F8TjbPRh5zGlt1XgzPhiaZ5Ez6f2m0eRtFdXprk7Fa0OzqtH1EP/lTXHXDdjcVQPY2lTtappbm6p532UD1grMisVcTTMJvOpymkpmQ1OPnCHuNw+YvC2PcFWnqzoVjwklkgx6f4uraQ56fwuhhLv979ZEmGfmunuixTNzx9GacN+p9d+xGPUujmr+29rKKp0288XQANwK+GnWY8BtBdynOt3VqXhM3yX1dPvUnTPpun3aRN+l3vQlZi0Zzodr+rmS1odr+jFr6d5Ok8kYIHZ7Mslfd+xwZaprUzLJQzuyrnepB6cHhmYJcIeP+d4JLC7gPtXprk7FB0a+tp5OW5ztVem0pYWRr633LHh9Evjda4ezaquzSNOrtnbjd68dTjLpeM9L1uHQ+62tPObQ2NQnk/yqqSnXmo8u23hgaEBOafTDa2kuzk+uVJ3u6VQ8piyWYOwLa+i6rrA9gF3XNTP2hTWUxbyd4mmKlfPzF77IwnV9C7p/4bq+/PyFL9IUK/e8TF+IxfhTczOFmO9PEwlub2riU50yK4qhaQJOBzZ4mN8Gk4eT1UzV6a5OxQ9j05Jg3xfXsNc7mylrSVi+Z693NrPvi2ss3+OU7S0V3PnSsTzyzoE0tlgzGI0t5TzyzoHc+dKxbG+p8K1MZ7e2cmNjI/+z6DXWnEzyj5YWbm5sZL0aGX/rf5v/LwGOQ7yX+ric1zrkvJQlLqSlOt3VqTinGcgZ7TKUhD0/qqPvknrW7VXDpv7V1PesIB7d2d+LxBLUbtxBj1WN9FnWQMTaKKbZTZ2JZIgXF4xi1tK9OXjIUsYPWMGQHhupjO5cdmyORVm+qSdzVg5k9vKhNMeibuu0tEayMZHg983NPB0Os19ZGaMjEXqGQnQxscu2JhKsTCT4MB7n7dZWmqw7EmzXKu2doQF4F5gIPIZ7Yefnmp63m42i6lQjEyTmAAdbuTASS9Bv4Tb6LZS2NFYZIV4WItKaJNocLzRv13U2x6K8umgkry4aCUBtZTMVZTF2tEapb670Wucb2DjIb30iwb9bWvi3O79lE7BQq7R7hHP0xCcAt+PMeypm0pjgUaOoOpWgcG+hN0ab41Q2tBZqZOzmXbDO+uZKNjbUFmpk7OZ9D7C5SL/lfeh0tC+GJjXMvRYYDfzeZsE3AX8w916Lt5FQVWdbrrpKa7b//Am4vwj53m/ybm86NwKnAVt91vkOMFWrs7tYCa+6GLgQmAKcCBwJjAeGAF3NNVuB5WZo/ArwDNDghsBRoWlWL10MXDg/Oc2WzlGhaZZ1znenzItanopnJIFvAP8Fvmt+Ty9ZjrjQ3409V9xg69y1k/QfYIx5Vo5G9tZUA7k8DroChfhWrzYjmVutdAJnzZofmIo3ceKodmFo2lbS9L9ElveLhjEcD1Kc3fl2SNc5wlTwY035zQKuBpZp+11SJIBfmr8eQJe2F8Sj4fDy/bqNbexafmhrNDwyGQ7tmQzJdaEkdaFEcnVZLLGgemvszSHvbX4/EsvoHlUHbPJSZ2U0Fj51/Dtj9+y69dDKaGxkWTixZziU7AKQSIbqWhPh1c2x6II1dV3ffOy9A95vjkW90AmwCsg6RL+npiYMHGgM0ThgEJDaDLQF+AR4H3j5rqam9z6IxzPF2on50JGzrNN0AtqVW5wVQzPMTNecDWSL+93b/E0ALkY8Nh5AdqsXey3hOGTaqRm4FHguYL/B54Dn0yodwKnAJOAY7C2gKsFhU3oj+9rXhnQz9e9CIFcQsPHACXW9K1kzvHYF8Dvg7kl/W77FD533fPXPtnTu3Xsdh+298DOdF9//f1v8KNx7amqs6pwAnAlwWVXVTp0NDVt8qge2dQKf6TRGqOQJ7TPzlmyfVSIbAaeQ4RAii7Qgu9Z/RI51hfmTsk+JjnrtViffr4cZFaSOON5mpgoKWmTMpbPAdZHPAS+wc8qsLRsLNjYzZmhT78cIOn/9DAHfBm7K8TvnYyvwA+DXuXq6OevnzMrA6OSwZifPkX86czxDFqbOfNNZClNn2ZwBhgJvmpGMk22+5cA1Jq1hRfh+J6UZGczrEwM0knkhTyXsaa4Zr016SVIDPAH8ykFjg7n3LuBxk6bqVJ0lRSZDsz/wusuN23hk3WF/H79b1Bi5tlxOYYuFfhsZNTalzWDTwTrZxTRPNmkOVp2qs5QNzTBkDaOPB3n1MWn7NbK5FBiZ4f0DgHNKxMiosSlNepnfa18P0t7XpN1LdarOUjQ0VcCjHn+RXsgO+SqPv1dPZF0oG9PJ7SIZJCOjxqa0iJg67mWHahgynVKmOlVnqRmaaYjbndeMxftowz/O05gPAr5TQkZGjU3pcC3iMeg1E8k8Naw6VWdgDc1QxLvML6Z4aPn3RVwJ83E90L2EjIwam+DT39Qrv7je5Kk6VWdJGJqpyOK5X0TxLszDnRaHlt2AG0rMyKixCTZXIzvX/aLa5Kk6VWfgDU0tshnTb84iy3GtDjgF2XlrlW/jrSeHF0ZGjU0wqQTOLUK+52JvzVN1dkydRTc0x5N9x7+XdMJGGHALVCCRje3ec3MJGhk1NsFjMrvu2fKLziZv1ak6A21oji5i/m7mfRmwd4EjqwNL0MiosQkWXyiR50h1dkydRTc0Y4uYv1t590FCNRRCqICRUC729tHIpBub54G9tL0vGsU09ONUp+oMuqEZWsT83cr7JofD1yNwLzTNz3w2Mil6IRGgleKwdxHzHq46VWfQDU3nIubvRt7jgfNcSOc23NkIVcyh9LHa3pd0XfYjb9XZMXUW3dCUOne69D1GuWSwikkcpSM+S2HVqTqD/nBsK2L+TvP+MnC4i3puxLkH3vNFLM8Xtb0v2brsV96qs2PqLLqhWVrE/J3kXYlMd7lJX5xvhLoa2FCEstxACYamaEcsL2Ley1Sn6gy6oZlbxPyd5H0l3px3frUxOE6M57E4P8LWrpE5EjkOVim9uuxn3qqzY+osuqF5qYj5F5r3HsD3PdJUg0yhOWEO4hTgh7FJGZkPta0vKi8XMe9XVKfqDLqheRbYXoS8G03ehXAL3p44dx6wTwkYGzUyweEfQFMR8m0GnlGdqjPohqYeeLAIeT9g8rbL54BveKytDHf2pHhpbNTIBIttwMNFyPchoE51qs6gGxpMoxrzMd8YhS3kh4Bf4M9RzCfhjkebF8ZGjUwwuQVo9TG/1gI7RKqzY+osuqFZAtzhY753AosLuO8s4FAfdf7UJaPmprFRIxNcFgJ3+ZjfXcAC1ak6S8XQgJx66YcXw1wKP2Fzms/lcyBwpktpuWFs1MgEnxuA+T7kMx9n5ympzo6ps+iGpgk4HW/3gGwweTQWcO9eFCe2z624F6zSibFRI1MaNAIn+/AcnVzgc6Q6O7bOohsakCm044B1HuS1zqS9pMD77y1SGQ0G7nMxvUKMzXo1MiXFEuSsEC8anQ0m7SWqU3WWqqEBeBeYiLvTaHNNmu86SGNCEcvpEJfTs2Ns1gNHqZEpOd4BPg984GKaH5g031GdqrPUDU3KMk9Azmlx4o0WM2lMcMES/7eI5TTbgzStGBs1MqXNYlP3Z+DMK6kV+LlJa7HqVJ2lRq6w+M3AtcDvkRha5wDVFtNtAv6OuDC7VUAXAn82lj3kU/kkgdfx7kzwlLF5EejR5rN1yAl6rhqZiy++ODCV75577ukIxqYRCWt0DzAVOBvrZ703IfvNbvWhoVGdHVNn0Q1NunW+EJiCHA52JHIGzBB2HvC1FQkuNwcJi/AM0OCy1mXApHbYEM0BDjIjv6ONcXsOuA74WAcF7Wp0cz7wXeAEM1Idl+U5eh8JbfIs/kfoVZ0dU2fRDU3bHn76XyLL+0Vj/pMbaswPmm4Qu5iP69oYxH+OOqVXQzF0zjr1/Ew6Uz2eo5FoDZ/pnPjEHxqKVKS2ytODDkZ7IxWJ40HVqTo7CqF9Zt6S75phyBTa2Vg/q2W7GfrdhoW1mfmTpmb/8KqrrH4Xz3UyY4ZjnbNOPd+RzolP/MHaWlcWrTamzjwvzw4ydaYoHZ5cI5pKZIPkFKDcZrqdgAuQmGR3Aj9C1ny8IBA6Z516vi86Z516fl6dEyeOKvnyVBSl/ZDN62wo8Kbp0ZY7SL8ccSR40/SQ3UZ1dkydiqKUuKHZH/G0Gu9iPuOBWSZtt1CdHVOnoiglbmiGIR5PfTzIq49J240erursmDoVRSlxQ1MFPAr08jC/XsBjWPcnz4Tq7Jg6FUVpB4ZmGuLf7TVjcRaFWXV2TJ2KopS4oRmKeBn5xRQKm0pRnR1Tp6Io7cDQTAWiPuYbNXnaRXV2TJ2KopS4oalFNuX5zVkmb6uozo6pU1GUdmBojsf6zm836WTytorq7Jg6FUVpB4bm6CLmf7RH16rO9qNTUZR2YGjGFjH/sR5dqzrbj05FUdqBoRlaxPyHenSt6mw/OhVFaQeGpnMR8+/s0bWqs/3oVBSlHRgaRVEURfHU0BTzJLdtHl2rOtuPTkVR2oGhWVrE/Jd6dK3qbD86FUVpB4ZmbhHzn+vRtaqz/ehUFKUdGJqXipj/Sx5dqzrbj05FUdqBoXkWOevdbxpN3lZRnR1Tp6Io7cDQ1AMPFiHvB0zeVlGdHVOnoijtwNAA3ArEfMw3BtxWwH2qs2PqVBSlHRiaJcAdPuZ7J7C4gPtUZ8fUqShKOzA0IKcf+uENNBfnJ0Kqzo6nU1GUdmBomoDTgQ0e5rfB5NHoIA3V2TF1KorSDgwNyFTKccA6D/JaZ9Je4kJaqrNj6lQUpR0YGoB3gYm4O50y16T5rotpqs6OqVNRlHZgaFI93AnA7TjzSoqZNCZ41KNVnR1Tp6IoJURon5m35Ltmb+Aa4Byg2mK6TcDfEVdWS15G8ydNzfzBzEprOT51qTOdJ99tzRvqsObM7191laXbZ516viOdE5/4gzWdM2ZkfPviiy+2Wjc8/93vuecefQKVgp4j38jyHCn2KLNwzWLgQmAKcCJwJDAeGAJ0NddsBZYDc4BXgGeABl+/iRiKC3nqUns6T77bV53GUFw469Tzbemc+MQfGnyuG6XxuyveYLWDZ7UjpqihaVecfHdJyJz4xB9KpUQbkAgCD+rj0mEZCnwPmAz0BdYD/7YzY1EghwJTgdHARuBfyF6srS6lvwdwHXAS0AP4ELgBeEF/cv8NzTDgWnJPofQyfwcBFyFTKPcj8/R+bdBTnRbQ6SrFJieYTkZN2nv9gfNNHf4G8KgH+U5Cgq9Gzf/3Ms/DhcBpwFsO0z8GeDhtdI5J/1/A4cDr+tP7Y2gqgRuB7wLl5r1VSEDE2cBCYLN5vzswAjgYON5UxAtMJbwT+BHg1Zi6ves8AdjTR52KDUa9dmug9GRd6yyM4aYxztYhqjIdoI/MaMBNbkwzMun0A140z+9rBaZ9LPCk0d+WiOkInqS123tDMwx4DBhr/j8LuNkMlxNZ7nkD+CPiyfZFMySdiCwoH4ds2HPbAymfzu7AZaaHAvAf4K4A6gxKeSpKOt8nvyNIOXC9Gd24ybgcn9WYkcfxwEyb6X4BeCKLkUmxj/707pLJvXl/0xCOReZCv2aGsf/K0SimkzDXHmbu3WrSmmXSdot8Oochi9TTkIXsI83rOeazoOgMSnkqweeL5ndvMqPfv5hRuVcca6Pxdpu6PJ93Ms/FUTbSPBJ4yoLx3KRVzVtDMwx4DugDLAIOMEPjQkiaew8w00J9TNrDXBoh5NP5B2BAhnsHmM+CorOQ8lzksk4l+HwbmWb9PDIN2w34OvBfZGrVC/aweF0vD/J+0cI11cA/LBq6wxGvSCuu+s9rdfPO0FQhi3q9zJTMJGCZC3ksM73xJSbtx/IMW/NhRedgk2c2DkPcdIuhM4TsUdnHvM5HCBiFeN6ETRqTXNSpBJ9LgV9lmYHYA++OXggV8Tv/FGixaGyeMqO9XM/7sxaNzFZkel3xyNBMQ+ZF65A1gPUu5rPeVIStyLTPNAdpWdFppZc/tAg6RyELp4uA+UholiE50hgCvI0stH5g/kaZtCabtJ3qVILNd0zDl6vRP6Edfu/FwHlmJG/F2DxpnrO2TLJhZFqBr+JtgNkObWiGIhvzUhV7qYt5VCOLd8uQhXlMXoVM+VjVWWEhrYocIzAvdIaQRcgRadeNRxYzh2ZJYya7rsPsY0ZJITOi+Y5DnUqwuRz4pYWRRXU7/f73I1OGVoxNpTE2x6e9N9EYmU4W7o8jDg16zLiHhmYq4ko4i8LXENrSHXgE2Gb+/o3sHp9l8irED/P7HujMVsHd1jkMcRdtS39TLkPbGJlXybzQu0+aUXGqUwkuVyCu7Famr95qx+XwW+Bii8amwnTmvoSsZT3Lrvt/8hmZR7TaeWdoaoGzzf9vtviDWjEyLwBnIH7pIcSD5QkgFVztbJO3VbzQmY2kyQPgLJd0xnPcMyDN2Aw1r/vneTDa6rRbnkpw+S5y8qkVIxNH9py0Z36H7COz4qVZbkb9z1p8HuKIN+fDWu28NTTHm6HlajPqcMvIZHK9PRBYaf6qkRhaVjnB3OOWznz82+js1GY4XqjOZYhrdT5j8wqZveVSvMeuzg//LrA8Fe/oCQwke3T0XEyxYWSSprf/Ugco0/uQNZu4RWPT2aKR+QYaXskXQ3O0ef2MxR5DoUYmvRKk5kGPtJH2US7qtEIiTefRLuk8A4kGkMvY5DIyq4Azc+g8Uqt0UdkfeBNZTP4EWMPOdTQrXAn83Eb9vIBdXfXbO38GzrVobKwYmW8i0cYVHwxNarf6bB+MzErkMKw3zf/H2UjfLZ12eLNN3k51LgWOyGNschmZI8gcDaCQ8lTcZTQSEuXgtPd6Ix5j+bzGAK4GrMakTxmZ+zpgOf/VjEKcGJu4GR39Tautf4YmtQi9oM1nZWSONVSokakHvowcirXIvLeXDa3ZdBaKlTWeRW3ydkNnIcYmZWSW5tG5l1bponET2b2/voPsg8lmbL6H7Bux2khegIQn8ppkQMv674gbciHGJlV+f9Eq66+hSc1lpkI+9EHcBOuQEPF/IfeimhUjsw3Z95Hyjtli/u1sQ2tbnblYa+EaK/uEvNJpx9iszGNkCtWpuEu+UCjfBu7OYGyuQaJyW20kz/fJyIBM/VmhGPtOHkIcYOycBJtAoj//Saur/4amLY8CJ5veWTkS5uJ5oIsDI3M8/obdnpun8m8E3g9A+Sddvk4JNpcAv04zNlOxvqs/Nd3zZx/1Wg3F8mKRynMJsN3m85bQalgcQ7PNvO6C7DqfmOG6g5G4Wl1cMjLd0j63SrrOfMTIva/kWos9Ia90plyYB1hIbwCyp2Yvl3Uq7vKyxeu+hewNuY6drv5WjMy5+D/dcyv5j6NoYaeLvZ+MN+1PVxv3RBDniXO1uvpvaFJTMiPIvYM23dg4Hcnsbf61E0stXacV7jOjsfTpqVXmPauLqHu3ydsNnanNmANspJkyNkPz6FymVbpoXA80Wrz2ImC6DSPzf8giuN8sRDYyZhs1NCFrJR/4rGucaX96FHBvythcoFXWX0Mz17w+BJlOWm3B2DidLjvU/DvXhtZ0nVb5GzDINPojzGs7niZu6xxG9h3/VozNK1mMTSE6FXeZj+yhanQxzdQ+j/uL+L2eMKOHe5H1wphpI+4z7z/qs56xpv3p6SCNkPk+F2m19c/QpDZ7ncjOoHKNeYyNEyOT2iRqZ7oB08imdFrdCNcJ8fi5xfx9B2txj9rqfMklnY/kMTIryb/P5mGXylNxn1fNb+GGsYmb0XcQ9nksQTaGDkTWbVNHOS/yWce+yHqQG8cShJApzG9rtfXH0DxrhsZ7IpGL/2MayUIeFisL/8eaBrMR2dRolWfMPSmd+egPvAP8Ajlj/DTz+h2LI4p0nc+6oHMv0wPMZWRSB7TlMjb7s+t6TaHlqXjDfxAPy+0O0oibDt8DAflOIeTMl5+ZGYGfI5GS/TxGYLTpSFkxMklgh8Xv9SvsbapVCjQ09ewMwXBdWq/c7jSAVe+y682/D5i8rVKf9uBdZ+H635N5nWSE+QyfdUZy3LPKGJilpveYz9hEXNCpeMdMY2waCjQyZyPuu0FgD2M8XwCuMgZwCnK65evYW2sslFE2jcwUJLCmlfYrhETIvkKrrbeGBsS7JIZ4nH0tbRrAqrGxamS+avKIUdhhTZl0ZhvN5Br1fDHPA+KFziXI4momI3MEuzocLCH7PpuF7IwO4FSn4h2vmWfCjrFpNUYmKFGEOyGx9CZl+fwQYwC83L+1j8mjt8XrrzQzFy/YNDZ3mnsVDw3NEiSQH0i4jCE2jI1VIzPEDFMxP+riAvRm05kpr3wM8llnEpm++yjtuneR0/8yebUtRY6fndPGyJxm0trLBZ2K98ZmssWRZixgRgYkivSYPNcMQyIbeMEAY2T62DAyd6b9/2XTflmdxpyB7HVSPDI0IKc0zkX80p9P60HkMjapHf/5jExv0zPqavKY5kBzNp3prLSQzuoi6JyPzDUPN9MBnwOW50hjGbImsy8y5TfKpOGmTsVbZplnZJsFI/NowLSfbfG6r3iQdwiZ0u9r8fqr0zp36byKvWnMu9CYgZ4amibgdGRH/TAkKOS+aT/W8ey62z517PEbefLYFwn6uLe5/3SceeXk0pniY9ObzPXwLy+SzqQZfXyEtR3/SeQo50XIruYxJq1hLulUvOd18/xkCku0wzTojwVQt9VTW4d4kPcX2Om2n49ryB2Q1M7IMoIcXKh4ZGhSUz7HAetM5XkDWQcAWRAchoSnOdZ8ni+S8tdMGnuZNI8jc/Rhu+TSmeK8LCObley+M7iYOu3wNdNoDXFZp+KPsZmA7EupM9M5LyDrH48FVPMmi9dt8SDvYy1eNxVrAUlnmefFSqzEL2h19dbQgKwbTDRTMrWIO2O6F83T5gFpzJHmZHPPX00ac02a77qoPZfOsGmA90OmlV41f9PMe0sCpNPKb+SHTsV7UmtsXZEjho8F/hdgvcWMdWZlQ+Z12HOCecOisemiVdVdynL0xCcgR8ROMb2uScAKJDLAG2b6J9Xj6Y6sOxxiGsWB5v0YMm/6I/LHTCp0xJBP5wvsdN/ujuwRCqLOTOV5qNE5wCedipLOrchR5pU5rvEq1tlHeT6/Aeux4tKZDRxjjGjXLNdohA2XCe0zM+9vtTcyB3oO2c/baEsTsqP5Nix6Q82flCUG5sxKq9/FF50clqV9v+qqYOmcMUNrt1I4O5+7U81IulOWevkN0p0YDnPY/9n5HPVAYqi1dQZIkH9NxgrjgKfY3fs0DpxEapO2PkeejmjSWYyc4TDFjAaORHa4D0nrEWxFFtfnIJs9n6GwzWpOUJ2K4j6pWGffQ6ad+iKOQM+bjo9XYWg2Ia7/M8wz0oJMH9+GO6fsvo8451yBeNX2Mc/mT7EXckqxYWgms/Ps8fORXb9nmh+5GtkA9QQyBfVgEfWqTkXxn1SsM79ZbEYXXtGARNGerj+xt6Smzj5FQk2AnKrXD9jMznNOUryKrDO86rYQi1NnRddpceqs+Dp1yK+UItanoP1BnyNXDU3b/Rwhcu/xmGkaSMfRgrMamMzGpmg6Lc0973xIiqdTHwxFUQJGuMD7DkPmMV9DPDiCiupUFEUpUUOTYiKyKPg6slAYVFSnoihKiRqaFIciC96z2XkIVxBRnYqiKCVqaFJMAP4J/Bdx3Q0F9HurTkVRlBI1NCkOBP6BhNc4KcANpOpUFEUpUUOT4gBk9+07wCkBbiBVp6IoSokamhT7IRsU30PC2tcEtDxUp6IoSokamhTjkLhI64BLA1wuqlNRFMUHQxP3MN9qJAKxG6hOd3UqiqL4Zmi8DOIYY9ezvZ2gOt3VqSiK4iplPuc3F7gdOSNmfYDLRXUqiqKUmKF5Azmk6J/kjvlVbFSnoihKiRma55BT+v4T8HJQnYqiKCVkaBLA48jxru8F+LurTkVRlBIzNC3A3/D21D3VqSiK0gENzXbg98jpkSsD/F1Vp6IoSokZmi3A3cixxBsD/B1Vp6IoSokZmrXAz4HfAvUB/m6qU1EUJeCGZivQJe3/y4CfAn8CmgP0HVSnoihKgMkVGeAyZI2gHnGpHWF63UFrFFWnoihKiY5o/mH+go7qVBRFKdERjaIoiqKooVEURVHU0CiKoihqaBRFURRFDY2iKIqihkZRFEVRdiWU/E8Fo0LTPgX2MO+tnZ+ctofvSg7Lsp1kZmX6/3bRmfY6WDqfunRXnSffHRydiqIoRRrRXGAa7tXA+QHWqzoVRVFKcUTjwEg9D4SAY5BzU7we0ahOHdEEkilXrPUzu0OQI7yHAzOBKXf8ou+qYuls2B5mwIAYx03eSjwO8Xgo9VE34FFgLHLc+LkTJ47a4YXObdsijB7dxJFHb6OxMUzS3rmzruls2RGiulOCE760lepOCVp2hNws6oJ1Fhsn0ZvPAI42r78MPBTQ76g6lfZEGXAHMMH8/xRgA/DtYgmKhGFHc4jWVohEIB7/7KOngEnm9dmmE3V2AMtUdXqME2eAi7O8DhqqU2lP7JVmZFKGp6iNTUV5gk2byti4sYyqqs8G4kPTGsUUpwWwPFVngA1NH+DwtP8fZt4LGqpTaW/0zvBe16I2ImXQ3BxmyeJKQjtblJ4ZLo0HsDxVZ4ANzalABJgPLDCvTw3g91OdSqnRBTgPuBQYk+HzUIC0HgGcQhKqq+OsXFHBpo0RKisTIEeRt6XVSzGhUB6dmfFdZ97yDL5O3wzNmebfR4CHzesvB/D7qU6llKgBbgamAz8BbkMW/NNJBkTrr4FXgCeAuRUVyZ5btkRYtqySikr/JaYW/8Ph3DqzjAwCV54B1umboRmITO2AeEA8Yl4fDgwI0HdTnUqpMQlZ1O+LeBhNBs4NoM7jgEvS/j8GmBEOw7o1UVpjoVyjC08oiyTZVh8mFttlZJNRZ6mUZ0c3NNciUztzgA/N33vmvakB+m5tdX5QAjo/CLBOxXsOyfDeoQHUeUSG9yaEw5BIiNeZ34amsirBmk/LWbMmSk1NPDXCyaizVMqzIxuak4Bvmdc/Ar5o/m40733LXFNsMumkBHQSUJ2Ku0SyvF9u49piEsvw3g6QqatQEVaRysqguSnM4oVVhMPJlIasOkulPDuiobkQmdYJA38GnjY97qmIf/efzGePmGuLRTadlIBOAqhTcdfA7Ad8BTgggxHJtLhRrDWZPoj77OAMn8UtvuebzmSSwTU1cZYvq2Dt2ijV1Ymi6QyF5C9ZmuVZFENTARwPvAzca3pczyD7PA5B1hEON68vNp+Vm2tfNvdW+PA9rOhMEVSdbSmmTsUbJpvf9PfIsd4nBlTnocBi4DHz7wmloLO8InnCtvoIixdWEo0W32ciVHrl6d2I01T+84D+QNS838181jdtOB8DbjXTOnF2XT+4FnHLO8VMAU0FjjR/LUjcr1ZgS1paq4A/As/aeEid6sToCaJOfNapeDNiCZtRSCbX0+lAP/O6CvEqeyZgvdcw8CBQm9ZGPAp0B5qCrDOZ5NFoWbL7+g3RpuYdIVJrRr5WgDLYvj3M9u0hunZN0LIjUirl6bmheRhxq8zGZuBxxAtigXlvFPCltGtOMu/NB34I/B24ygwVuyOeVZk4Lu0HyEchOke30Zk+LA2Szmx4qVNxl1rgeuBgYDnwY/Nvih5IjKp0RiBurOt81noVEu5oBXA5u+7R6Mfu3o6VwEjESSXQOiPh5MhkkvcS8RChUBKfth19pjMSSV5eXx9p+eTjCgYMaAlaeRbV0PwWuNr8f7lp2NaZXtla4CPT4NUi88rDgYva/IIh4G4zxbPI/F2ILGbvY3ryIWSe8sfAEHPfvTa02tH5OaPzwjw1bUERddrBC52Ku0xBNlnWABOR3fqnszM4aqcs91X6rPNaM5JOsTc7Y+xBZoeE1Ggt8DqTEPHZIWE3nRXlyaM/Xl7JmLFNRKPJ8lgsFITyLLqhuQbxcLjONFiXmQdklRkRPG96XnvmSesIdnXTWw0sND2RF41Vv8nkkUQ2pv3AhlYrOkemTU3YIc5O12IvdTrFTZ2Ku1ycNpKNINOeg9JGNdmaPr8XE65r8/+jzEhrblody1b3VKcFndHy5NimpvDchoYwvXu3xrMYmnhHejhS88k3INGD64GDgHeRRfQPjZHYs4C09wReMmkcArxj0q43ed1g8yGzorOfw/LwWqdbuKFTcZd+ed4Lym9TleG9/gEsz5LVmUzSPxIRF+ukPpGfGZoUjyObhBYAvUzDvR9wCzCtgLSnmV7255CzE3qZEc4Ek1ehuK0zhV86neK2TsWf5ysoZNqf0aI63dcZCukDkO1B+Mj0lucA1ciZKFWIZ9R0G+nebO6pBh5A5qffRxZKP3JBdyad1QXoTO+V/N3onOODTie9Jy90Kt6QLBFNqrP96wxcj2srspN+PbIAd5l5/wbgLgtp/grxvsHcO8ykdaxJ2y3a6vyOTZ3pXG7SWG/S9ENnIXipU1EUxdeh/Xp2hkH5Ttp1cyyk+V5a2pea1zeaNN3GiU4CoJOA6VQURfHN0AD8BdlQNAA40Ly3j4U0U9ccaO5tMml5RaE6CYBOAqhTURTFN0PTAMw2rw8y/46ykOaoNvfMNml5RaE6CYBOAqhTURTFN0MD8LH5d2CGBnwJslP9NPO6raEZ2CYNL7GiMxupe5YXQacd/NSpKIrim6HZbv6NIJ5Og4CNyCL/aOQ0uCfM68vMZ4PMtZG0nrzXWNGZjUibNPzSaRc/dSqKovhmaIaaf9eYxvs2xOvpV+zq095i3tsbuN30vteYz/by4XtY1ZmJlM5hPuu0i586FUVRXKMsx2flyNGyAP9FAmZ+HwmzcQayZtDHfL7OXPMcO6Ml9zb/TkSiGMc8+g6F6mxIuweThp86U9QgwTCDolNRFMU3Q/N50wjWAW8gmwW/j+zl6JLlnjrgl8gu/TfM/7sYY/OKR99BdSqKopSooUkdzvM8srj+ADvdhj9FwqCkFqaHAMcgsZ1+YEYSZ5l7v2zS8qphVJ1KUAlleY2F93HpekUpCUPTF3GprUQW2K8G/sbu0UcjwNeAn5kG9C12TvecwM7Q+V414KpTCRrpoUiyRetNtPnN8z2jTsObRPO8V2bhvvJsn6fF94rabG981Zknn/aos6hkcwYYhITcB1kTqDQ96PHI+fbZzrj+s7nmFXPPYeazkSZNt1GdSlCoy/DehrTX29oYlZTRSPfKzHQA2uY2/88UEWKrDZ2ZjFlDG52ZSH8/li3dROKziMV1DhtGT3Xm+d3ao87ijmhmhd/d7c2Jif3T96G0IscJ3zor/K6Vg1FXT0zs/wVk/WFaWmGMmhV+95MMeTnRn1Fnhgc6o04go07gE5fLuVR0lhyzZs13dP/EiaPckvIAcEHa7/MWsLRNw/I0cDI7p7+eZedx3CDHaqxjp1PIduDJNvksM2lPSKtPD9jQ+ZAZKadYC/yvjXF8AZm6TfEBu54G+whyoF86fw2FksQTIRKJEKFQciGE5rLrqaIvBkFnm/8vRM64ae86AzmiWWJ6Uq8Ch84Kv3uzRSMjD3/43cSs8LvTgUNNGpvZdVOnW+yiE4kabeeU8AQS7Vl1Kk6ZbozCemAWcKUxAulch6yzrTdG5Zo2n8811yw0HYzfAfe3uaYVOc1zlknnSVOfrHIBsq9ss8nvKHYPdf8Vo3OzyWdym88/AM5BNiBvRE7XvSUUgkQilH4Gy5dMo7sZ+HebBrloOjPk1RF0FndEk8VQLEbOOP+MjRsX1SBrA0ea6Zwh7PSWqkMWsueYaZ5/9uw5vGFW+N3/mesd8+TmBzO9vYvOUChEMpm0pdMMc/PqPKX7Wa7pNNjSGQ6HGxKJhHs6n3wy62emHAmHwyQSiULKMy+nnHKKqxW5kPrp8rO0CnHUyMVHiCt7rg7FfebPK3aQO1IGZpT1RQsjuAcAGraHGTAgxtlf3UQ8DmknStabv4RpHLd7pXPbtgijRzdx5NHbaGwM09IS2k1nDlzT2bIjRHWnBCd8aSvVnRI0NYVtl6cXOp2O/G1yCLKfcjgwE5hSZuEBHgZcC6Gzy8urO0WjnYhGKwmHo4RCMiBKJhO9E4lY71iseUIstv3ilpbG7Rs3LnoAuK1nz+F+9byHAddWVFSe06NH7+q+ffegS5daKisriETCvPnmgow6IfkAssHTV53ZyvOQQ0YSjyd6Nzfv6F1XVz9h/fp1F69fv6axtTX2oOnl+Knz+2Vl0bN69uxd3bt3b7p160KnTtU0NcVYtmwd9fXbfSnPjz7aeeROeXk54XCY1tZWamtr2bhx0bBIJPL9aLT8rJ49U797Z6qrqygrk/rZ2pro3djY1LuubtuEtWvXXLxx4/rGLVuWPhiPx29Zu7b7kvr6esrKykgkErS07Nzfu88++xBAyoA70qbOTjHTM98ulqBIGHY0h2hthUgE4jtXHJ9i596xs82U4dkBLFPV6XH9LMthYCqBaaFQeEpVVbfyysquhMORLD3gCOFwhLKySqqqupJIxDs1N2+9oKlpyzc2blx0J/Cjnj2HN2e8+bDm3LJTn2fvgVcC02pqaq8cOHCv6MCB/ams3NVBI5lMEgqFcupMJhN3ImsnnurMV56RSJiysggVFVG6dKlh4MA9iMX2rV6x4tPzPv54ydfr67fd4UhnfiqBH1dVVX934MDB0UGD+lNdvetZbS0tccLhEOGwg/J0yIcfflgJTKuu7nTlgAGDo4MGDaCyspxQKLzbyYbl5WHKy2vp0qWWAQP2oLm5pfqTT1aet3Llx1+fPXv2HcCPxo0b10xpsFfaQ5x6sM8upqGpKE+waVMZGzeWMXhwC7FYBCQKxqQ2l54WwPJUnT7Uz7IsRmYo8GhFRe34Tp16EQ7bc24IhyNUV/egsrJL+fbtG67ZsaP+2I0bF33Zg9HN0HA4/NigQUPHDR8+jKqqCsc6zfTHEg8qScHlGY2WMXToQAYO7BddtGjpNR9/vGRyLBY7zQud4XD48X79BowdOXI4NTWdAlme77///tBQKPTYnnsOHDdy5AiqqysJh/Mf8RMKQSgUprq6khEjhjJgwJ7RBQsWXrN69Yovvv/++2eMGTOmFNa9emd4r2sxBYXLoHlbmCWLKxmy12cjwp4ZLo0HsDxVpw/1M5zByOwPvF5T03t8be0ethvFXRueMmpr96Cmpvd4YJZJ2y32j0ajb4wf/7lx48aNtm1kcukEXNXpVnlGo2WMHj2C/fc/aExlZeUbbuuMRqNvjho1Zuz48WNsGxm/ynPevHn7R6PRN0ePHjduzJjR1NRUWzIyu2sMU1NTzZgxoxk9ety4aDT6xrx58/YPwIPaBTgPOeRuTCZ7GaBG5QjgFJJQXR1n5YoKNm2MUFmZgMwxBlu9FBMK5dGZGd915i3PYOssqH6G2xiZYcBztbV79KmsdK+TVFnZldraPfoAz5k8nDIsGo3+e7/9Duo9cGA/T3TiTvBKT8pzjz16cdBBh/SqrKx83i2d0Wj0hX33HddryJBBlJWVBbI8Fy5cOCwajT6/777jew0e3J+KinLn0z4V5Qwe3J999x3fKxqNPr9w4cJiBi2tQTzIpgM/Qda6hre5Jijn0f8acax4AphbUZHsuWVLhGXLKqmo9F9iytMtQ59jF51ZRgaBK8+A6iy4fobTjEwV8GhNTe9eFRW1riusqKilpqZ3L+Axk1ehVIXD4cf23Xe/nv369fJUJxKPrGCdXpZn9+5dOOCAg3qUlZU94VRnOBx+bMSIUd3799+DSCQcyPJcuHBhFfDoyJH79thzzz6uGUOAsrIy9tyzLyNH7tsDeMzkVQwmIWstfYFuiBvsuQFscI4DLkn7/xhgRjgM69ZEaY2Fco0uPKEskmRbfZhYbJeRTUadpVKeAdRZcP1Mb1WmVVTUjnOz552ph1tRUTsW2XhYKNMGDRo6duDAPQKv0+vy7NWrO3vvPXLfcDj848KnG0I37rnnwLEDB/YnEokEsjzLy8sBpvXvP2jcgAH9XDUyO41NhAED+tG//6CxwDSTp98ckuG9QwPY4ByR4b0J4bBEBojH8d3QVFYlWPNpOWvWRKmpiadGOBl1lkp5BlBnwfUzbEYzQ0Oh8JROnXp5rrRTp96EQuEpBU6hDa2pqb1y+PBhhDyuySmdBU75+Faew4btRW1t5+8WqrOysmrKiBF7U14eDWx5zps3b2hVVdWVw4cP91RneXmU4cOHU1VVfeW8efO8nELLZtHLbVxbTDKFTNkBMnUVKsIqUlkZNDeFWbywinA4mdKQVWeplGeRcL1+pkY0U6uqukWdLFRbJRyOUFXVLcrOc2vs9L6nDhy4V5mThX8/dPpZnpFImOHD9ymLRCLX2f+O4esHDBhUVlVVGfTf/bqBA/cqq6mp9lxnTU01AwcOKQuFQtd59ADvh+wUPyDDQ5ppfrtYazJ9EPfZwRk+i1t8zzedySSDa2riLF9Wwdq1UaqrE0XTKd6Nu/1wpVCentXP8MaNi2ohdLaXUzyZplIgdJbkbZna8vKKcwYO3NN3nYAtnX6X5x579Ka8vOIrdnVGImVfGTx4oGdTZm6U55NPPlkbiZSdNXjwQMJh77vK4XAIKZOyrzz55JNuL65NBp4Bfg/8AziRYHIoEs3iMfPvCaWgs7wiecK2+giLF1YSjRbfZyJUeuXpWf0MA8eXl1d3yrYZ06vebXl5dSfgeBu3Hd+zZ+/qysrywOv0vzxD9OvXv9quzl69eldXVlYEvjx79epT7ccodqdBrKBXrz52yzPVI4ySParudOSMoSpgD8RrJ2hTY2HgwbTOQBnwKM4cTnzRmUzyaLQsWbV+Q5TmHSHCYf9FRcpg+/Yw27eHqChPBK08i1Y/w8DR0Wgn37+xyfNoG7cc3afPHiWhsxjl2atXb9s6e/fu7flalxvl2bdvX397oiEwedrRWWse1BeQYJhD2nzeg10j7wKMoDhurFchkaN/y+7z7v2AAW1tLzuPuQi0zkg4OTKZhEQ8RCiU9F1nJJIsb2wM88nHFYTDySCVZ1HrZxkwtqyswvcaZPIca+OWsZ0715aEzmKUZ21tp3Zbnl27dvFdp8nTjs4pyCa2GuSo7a7A6eyM0p2t91Hp81e7FjmiIsXebQxqeY7ecOB1JiHis0PCbjorypNHf7y8kjFjm4hGk+VpQUaLWZ5FrZ9hYGgk4r8rp8lzqI1bhlZXV5SEzmKUp9m8aLM8q30f0RRSnlVV/s8ymDzt6LzYPMSpRuQUdj2cLltB+72Y0NbJ4ag2BjXbInRcdVrTGS1Pjm1qCtPQECYaTQZFZ1HrZxjoHC7CZKbJs7ONWzqHw2GSyaTtv0Qi6bvOUijPaLRwr7iUgZJgpdb/jOOBLZ2pKMz+jrxsl2e/PO8FZUd/Jqvdn+BRsjqTSfpHIuJinUwGRmdR62fJHAUKMHv2AoIV6ik4JBIJ3/KqqalizJjCTpKOx+M888yijvKzhAOoaQe7nz/fojrd1xkKaf1Mz2ibn41Um4Zxm41bVGcOWlpitnXGYoXH5LM7kkn9tbbGbetsbfW/PE2e2xwmkwxg45JUnR1SZ1HrZxhYGo/731EweS61cYvqzEF9faNtnY2NjSR9HNsnk0kaG+3rbGpq8r08TZ5LURTFFUMzt7XV/2gH8fgOkCilVlGdOdi8eYttndu21fuu0+RpS+fWrXW+6zR5ztUmQlHcMTQvxWLbfc+4pWU7wEs2blGdWUgkkqxZ86ltnevXr/d9RLN+/XrbOteuXevromoyCWvXrrWrU1GUHIbm2ZaWxu2JhH/edolEnJaWxkZkk5NVVGcW1q/fSkPDVts6N2xY39jc7N/oq7l5Bxs2rG+yr3NdEXSus6tTUZRshqZnz+H1kHywuXmrjw/yViD5gORtmaLplLyDqTMeT7Bs2XISibhtnfF468OffLKSeDzug844klfrQ3Z0nnLKKfXxeOtDH3+8wpGbup3R4ccfryAeb33wlFNOqdcmQlHcGdEA3NrUtCXmRy88kYjT1LQlhsTRsYvqbMOKFevZuHF1QToTicT0FSs+bm1qavZcZ1NTMytXftyaSCRutntvMpm8ecWK5a0NDY2e69y+vZEVK5a3JpPJW7R5UBQXDU3PnsOXJJOJO7ZvX+/Dg7yeZDJxZ8+ewxcXcLvvOpFoq4HUuWlTPYsXLyCRiBess7m56Y6FCxen3KM9oaUlxsKFi2lsbLyjEJ1jxoxZ0tTU+PNFixb5orOpqfGOMWPGLNbmQVHcHdEATNuxo36ul1M+zc1b2bGjfi4OT65UnbB163bmz19IY+NWRzqTyeSPVq9eMW/FilWeTKHF43FWrFjF6tUr5hWqs6WlBWDaqlWfzF258tPUXhxXaW1tZeXKT1m9+pN5wDSTp6Iobhqanj2HNwGnNzSs37Bjh/tT0zt21NPQsH4DcHrPnsOdzIH4phMIpM716+v44IOFbNq0yhWdiUTitIUL529etWoN8bh7myPj8QSrVq1h4cL5mxOJxGlOdI4YMaIJOH3Bgg82rV691lVj09oaZ/XqdSxY8MGmZDJ52ogRIxq1aVAUb0Y09Ow5fAlwXH39mnVu9sSbm7dSX79mHXCcycMpnus0eQRKZyzWytKla5g/fwEbN65wVWcsFjvmgw/e37h8+Se0trY6TrC1tZXlyz/hgw/e3xiLxY5xQ+eIESOWxGKxYz/4YM6Gjz9eyY4dzkcdO3a08PHHK/nggzkbYrHYsSNGjFji4vMVyvIaC+/j0vWKUvT6uVusm549h78LTGxoWD+3vn4NiUThjU4iEae+fg0NDevnAhNN2m7hmU6TdmB0xmJxVqzYwJw5y1i0aD5bt67xRGcsFjtk/vx5H8yZM4+GhsL3AjU0bGfOnHnMnz/vg1gsdoibOseMGfNuLBY7dP78ufPmzfuQhobGguK8JRIJGhoamTfvQ+bPnzsvFosdOmbMmHddfpDT3eSyDcHSxWcKHV+WI81CiOZ5r8zCfeXZPk+L7xW18F2KpjNPPu1RZ1HrZ8agambUMWHHjvrbt2z5ONbYuAk7HlSJRJzGxk1s2bI8tmNH/e3ABJdGMplGDK7qdGmEULDOeDxJS0sr27Y18umnm5k/fyVvv72QhQsX8umnCzzXmUgkDly9esXPXn/99daPPlqUChljicbGRj76aBGvv/566+rVK36WSCQO9ELnuHHjliQSiYNWrfrk9jfeeL114cKlNDY2k0gkcm7sTCbFwDQ2NrNw4VLeeOP11lWrPrk9kUgcNG7cOKc6M4Uv2JD2elubhzb1UDak/X9dhjQ2t/l/Jg8TO8PlTI1FQxudmUh/P5Yt3UTis4jFdQ4bRk915vnd2qPOotbPrEJ79hzeDFy7ceOi3zc2brqmsXHzOeXl1dXRaCei0UrC4WgqND2JRIJEIkYs1kwstp2WlsYmSP4duK1A7zJbM17AtclkwpFOCvPacl3n7NkfBUHn95qaGu9dvHjB1KVLF5/ds2fvqt69e9OtWxeqq6soKyv7bHqssbGJLVvqWL9+PRs3rm9OJOIPJBKJW0KhkKc6R48e3VxbW3vt7Nmzf79kyYKpy5aJzr59+9K1axeqqqooK4sYnXGamprYurWOtWvXfqYzHo/fcvDBBy+ur3dlDe0B4IK0h/8tdo2Vtg14Gjg5bXrhWWBL2jUvmYe5j/n/duDJNvksM2lPSM1Smryt8hDwtbT/rwX+16bxeQE4Ju29D4AFaf9/BPhhm3T/GgoliSdCJBIhQqHkQgjNZdczZF4Mgs42/1+IhBpq7zqLWj9Dr732oSWVGzcuqgFOBI4ExiNHgXZN61EtB+YArwDP9Ow5vMFKuo890p07fpH9qN4pV6wF4PAjZ1stUFs621js7K1vUwVnnT056+cPPvAvACqrdpS8zlAoRDKZJBwOk0gkbOkMh8MNiUTiszSc6sxH/wGDHNXPVSs/yZtHLp1p9bQ/cAdwGLAIOXnxjTaX7WOu2Q+YB1wOzG8zw/BN4BpTPx4Brmd3J4pDgNuB4cBMYModv+i7ykp5TblibYVpdA4HVgFnAR+1uawbcs7954y+s8216ZwN3Gx0PgR8Z/v2MHv2j3Hc5K0kEhCPhwYCjyIHyP0POGfixFGbvdS5vSG8qv/AFo6bXEc8DvF4aDedGbJzVWcsFvooGk0y+YSt9OjRSlNTuKDydFPnrFnzi1o/Q9+9fE034H7gWKwdL9oCPAycf/qXN7cYY1GJnEP9lSxziW1pNVb+bKDOiqExlaognUDLhIPfAzmWtGCdFhtGRzrNe6rTBZ39BwxqMcbEM52KouQnDPwCmIz1M6zLzVDx+sce6c5jj3QH+IF5L2oxjTKT5502tBasM+091dmBdK5a+UlqxOKHTkVRchiaQrtr6fcd50Iabl6rOlWn3zoVRclhaHoWeG+ftNdupJEP1ak6g6xTUZQchkZRlCzo+oyiqKFRFEVR1NAoiqIoamgURVEURQ2NoiiKooZGURRFUdTQKIqiKGpoFEVRlHZlaOoKvDc9mJsbaeRDdarOIOtUFCWHoXm0wHsfS3vtRhr5UJ2qM8g6FUXJQhlwFVALfAFrx3a2mgfw9rT3bgX6IefXWwl+mEDOUvieDa2qU3UGWaeiKDkMTR0SPt0JLcC3zJ9XqE7VGWSdiqLkMDQdgrdm7+c4jbPO9jZ9t/BDpznfR1EUxZKh6QLci/WpiTgyNXE5Ow/AKgfuAk6zODWRRA6WuhjrC7WqU3UGWaeiKDkMzQzgTJv3XYwcRXqT+f9U4CKbaXwFOafa6n2qU3UGWaeiKFkIA2cUeO/paa/dSCMfqlN1Blmnoig5DE2XAu/t3mZ6w2ka+VCdqjPIOhVFyWFoFEVRFEUNjaIoiqKGRlEURVHU0CiKoihqaBRFURQ1NIqiKIqihkZRFEVRQ6MoiqJ0BEOzscB716W9diONfKhO1RlknYqi5DA0/yrw3mfTXj/nQhr5UJ2qM8g6FUXJYWguNw9zq8V7WoC/Ajenvfdj4G/sjJabj1bzEE+xoVV1qs4g61QUJQv/PwAlukJhy2ScjQAAAABJRU5ErkJggg==";Jr={border:{"border-top":" iconfont luckysheet-iconfont-shangbiankuang","border-bottom":" iconfont luckysheet-iconfont-xiabiankuang","border-left":" iconfont luckysheet-iconfont-zuobiankuang","border-right":" iconfont luckysheet-iconfont-youbiankuang","border-none":" iconfont luckysheet-iconfont-wubiankuang","border-all":" iconfont luckysheet-iconfont-quanjiabiankuang","border-outside":" iconfont luckysheet-iconfont-sizhoujiabiankuang","border-inside":" iconfont luckysheet-iconfont-neikuangxian","border-horizontal":" iconfont luckysheet-iconfont-neikuanghengxian","border-vertical":" iconfont luckysheet-iconfont-neikuangshuxian"},align:{left:" iconfont luckysheet-iconfont-wenbenzuoduiqi",center:" iconfont luckysheet-iconfont-wenbenjuzhongduiqi",right:" iconfont luckysheet-iconfont-wenbenyouduiqi",top:" iconfont luckysheet-iconfont-dingbuduiqi",middle:" iconfont luckysheet-iconfont-shuipingduiqi",bottom:" iconfont luckysheet-iconfont-dibuduiqi"},textWrap:{overflow:" iconfont luckysheet-iconfont-yichu1",wrap:" iconfont luckysheet-iconfont-zidonghuanhang",clip:" iconfont luckysheet-iconfont-jieduan"},rotation:{none:" iconfont luckysheet-iconfont-wuxuanzhuang",angleup:" iconfont luckysheet-iconfont-xiangshangqingxie",angledown:" iconfont luckysheet-iconfont-xiangxiaqingxie",vertical:" iconfont luckysheet-iconfont-shupaiwenzi","rotation-up":" iconfont luckysheet-iconfont-wenbenxiangshang","rotation-down":" iconfont luckysheet-iconfont-xiangxia90"}}});function Z(e){for(let n=0;n<h.luckysheetfile.length;n++)if(h.luckysheetfile[n].index==e)return n;return null}function xt(e,n,t){let l="";t==null&&(t=h.currentSheetIndex),e!=t&&(l=h.luckysheetfile[Z(e)].name.replace(/'/g,"''"),/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/.test(l)?l=l+"!":l="'"+l+"'!");let a=n.row[0],o=n.row[1],s=n.column[0],u=n.column[1];return a==null&&o==null?l+tt(s)+":"+tt(u):s==null&&u==null?l+(a+1)+":"+(o+1):s==u&&a==o?l+tt(s)+(a+1):l+tt(s)+(a+1)+":"+tt(u)+(o+1)}function Pu(){return h.luckysheet_select_save}function Et(e){return e&&h.luckysheetfile.forEach(n=>{n.chart&&n.chart.forEach(t=>{let l=h.getChartJson(t.chart_id);t.chartOptions=l})}),h.luckysheetfile}function Lu(){return h.config}function Yi(){return h.visibledatarow}function Xi(){return h.visibledatacolumn}var Nt=Ie(()=>{ft();Xe()});function zu(e){h.luckysheet_select_save=e}function Qr(e){h.luckysheet_scroll_status=e}function Jn(e){h.luckysheetfile=e}var An=Ie(()=>{Nt();Xe()});var Ep,fr,xa=Ie(()=>{Ep={mobilecheck:function(){var e=!1;return function(n){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),document.body&&document.body.clientWidth&&document.body.clientHeight&&document.body.clientWidth<350&&document.body.clientHeight<500&&(e=!0),e},iphoneCheck:function(){var e=!1;return/iPhone/i.test(navigator.userAgent)&&(e=!0),!0},isWeixin:function(){var e=navigator.userAgent.toLowerCase();return e.match(/MicroMessenger/i)=="micromessenger"},isAndroid:function(){var e=navigator.userAgent,n=(navigator.appVersion,e.indexOf("Android")>-1||e.indexOf("Linux")>-1);return n},tabletCheck:function(){var e=/ipad|android|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i.test(navigator.userAgent.toLowerCase());return e},BrowserType:function(){var e=navigator.userAgent,n=e.indexOf("Opera")>-1,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1&&!n,l=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1,a=e.indexOf("Edge")>-1,o=e.indexOf("Firefox")>-1,s=e.indexOf("Safari")>-1&&e.indexOf("Chrome")==-1,u=e.indexOf("Chrome")>-1&&e.indexOf("Safari")>-1;if(t){var f=new RegExp("MSIE (\\d+\\.\\d+);");f.test(e);var d=parseFloat(RegExp.$1);return d==7?"IE7":d==8?"IE8":d==9?"IE9":d==10?"IE10":"0"}if(o)return"FF";if(n)return"Opera";if(s)return"Safari";if(u)return"Chrome";if(a)return"Edge";if(l)return"IE11"},isIE:function(){var e=navigator.userAgent,n=e.indexOf("Opera")>-1,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1&&!n,l=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;return t||l?"1":"-1"},IEVersion:function(){var e=navigator.userAgent,n=e.indexOf("Opera")>-1,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1&&!n,l=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1,a=e.indexOf("Windows NT 6.1; Trident/7.0;")>-1&&!t;if(t){var o=new RegExp("MSIE (\\d+\\.\\d+);");o.test(e);var s=parseFloat(RegExp.$1);return s==7?"IE7":s==8?"IE8":s==9?"IE9":s==10?"IE10":"0"}else return a?"Edge":l?"IE11":"-1"},luckysheetrefreshfixednum:null,luckysheetrefreshfixed:function(){var e=this;return e.luckysheetrefreshfixednum==null&&(e.BrowserType()=="FF"?e.luckysheetrefreshfixednum=5:e.luckysheetrefreshfixednum=0),e.luckysheetrefreshfixednum},detectOS(){var e=navigator.userAgent,n=navigator.platform=="Win32"||navigator.platform=="Windows",t=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";if(t)return"Mac";var l=navigator.platform=="X11"&&!n&&!t;if(l)return"Unix";var a=String(navigator.platform).indexOf("Linux")>-1;if(a)return"Linux";if(n){var o=e.indexOf("Windows NT 5.0")>-1||e.indexOf("Windows 2000")>-1;if(o)return"Win2000";var s=e.indexOf("Windows NT 5.1")>-1||e.indexOf("Windows XP")>-1;if(s)return"WinXP";var u=e.indexOf("Windows NT 5.2")>-1||e.indexOf("Windows 2003")>-1;if(u)return"Win2003";var f=e.indexOf("Windows NT 6.0")>-1||e.indexOf("Windows Vista")>-1;if(f)return"WinVista";var d=e.indexOf("Windows NT 6.1")>-1||e.indexOf("Windows 7")>-1;if(d)return"Win7"}return"other"}},fr=Ep});var fn=vl(Xl=>{"use strict";var Np=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function Pp(e,n){return Object.prototype.hasOwnProperty.call(e,n)}Xl.assign=function(e){for(var n=Array.prototype.slice.call(arguments,1);n.length;){var t=n.shift();if(!!t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(var l in t)Pp(t,l)&&(e[l]=t[l])}}return e};Xl.shrinkBuf=function(e,n){return e.length===n?e:e.subarray?e.subarray(0,n):(e.length=n,e)};var Lp={arraySet:function(e,n,t,l,a){if(n.subarray&&e.subarray){e.set(n.subarray(t,t+l),a);return}for(var o=0;o<l;o++)e[a+o]=n[t+o]},flattenChunks:function(e){var n,t,l,a,o,s;for(l=0,n=0,t=e.length;n<t;n++)l+=e[n].length;for(s=new Uint8Array(l),a=0,n=0,t=e.length;n<t;n++)o=e[n],s.set(o,a),a+=o.length;return s}},zp={arraySet:function(e,n,t,l,a){for(var o=0;o<l;o++)e[a+o]=n[t+o]},flattenChunks:function(e){return[].concat.apply([],e)}};Xl.setTyped=function(e){e?(Xl.Buf8=Uint8Array,Xl.Buf16=Uint16Array,Xl.Buf32=Int32Array,Xl.assign(Xl,Lp)):(Xl.Buf8=Array,Xl.Buf16=Array,Xl.Buf32=Array,Xl.assign(Xl,zp))};Xl.setTyped(Np)});var oh=vl(Ta=>{"use strict";var Op=fn(),Bp=4,Ou=0,Bu=1,Hp=2;function _a(e){for(var n=e.length;--n>=0;)e[n]=0}var Vp=0,Hu=1,qp=2,jp=3,Up=258,ns=29,oi=256,si=oi+1+ns,Ca=30,as=19,Vu=2*si+1,Qn=15,is=16,Gp=7,os=256,qu=16,ju=17,Uu=18,ss=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ki=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Wp=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Gu=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Yp=512,dn=new Array((si+2)*2);_a(dn);var ci=new Array(Ca*2);_a(ci);var ui=new Array(Yp);_a(ui);var hi=new Array(Up-jp+1);_a(hi);var cs=new Array(ns);_a(cs);var Zi=new Array(Ca);_a(Zi);function us(e,n,t,l,a){this.static_tree=e,this.extra_bits=n,this.extra_base=t,this.elems=l,this.max_length=a,this.has_stree=e&&e.length}var Wu,Yu,Xu;function hs(e,n){this.dyn_tree=e,this.max_code=0,this.stat_desc=n}function Ku(e){return e<256?ui[e]:ui[256+(e>>>7)]}function fi(e,n){e.pending_buf[e.pending++]=n&255,e.pending_buf[e.pending++]=n>>>8&255}function er(e,n,t){e.bi_valid>is-t?(e.bi_buf|=n<<e.bi_valid&65535,fi(e,e.bi_buf),e.bi_buf=n>>is-e.bi_valid,e.bi_valid+=t-is):(e.bi_buf|=n<<e.bi_valid&65535,e.bi_valid+=t)}function en(e,n,t){er(e,t[n*2],t[n*2+1])}function Zu(e,n){var t=0;do t|=e&1,e>>>=1,t<<=1;while(--n>0);return t>>>1}function Xp(e){e.bi_valid===16?(fi(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function Kp(e,n){var t=n.dyn_tree,l=n.max_code,a=n.stat_desc.static_tree,o=n.stat_desc.has_stree,s=n.stat_desc.extra_bits,u=n.stat_desc.extra_base,f=n.stat_desc.max_length,d,m,g,y,v,b,k=0;for(y=0;y<=Qn;y++)e.bl_count[y]=0;for(t[e.heap[e.heap_max]*2+1]=0,d=e.heap_max+1;d<Vu;d++)m=e.heap[d],y=t[t[m*2+1]*2+1]+1,y>f&&(y=f,k++),t[m*2+1]=y,!(m>l)&&(e.bl_count[y]++,v=0,m>=u&&(v=s[m-u]),b=t[m*2],e.opt_len+=b*(y+v),o&&(e.static_len+=b*(a[m*2+1]+v)));if(k!==0){do{for(y=f-1;e.bl_count[y]===0;)y--;e.bl_count[y]--,e.bl_count[y+1]+=2,e.bl_count[f]--,k-=2}while(k>0);for(y=f;y!==0;y--)for(m=e.bl_count[y];m!==0;)g=e.heap[--d],!(g>l)&&(t[g*2+1]!==y&&(e.opt_len+=(y-t[g*2+1])*t[g*2],t[g*2+1]=y),m--)}}function Ju(e,n,t){var l=new Array(Qn+1),a=0,o,s;for(o=1;o<=Qn;o++)l[o]=a=a+t[o-1]<<1;for(s=0;s<=n;s++){var u=e[s*2+1];u!==0&&(e[s*2]=Zu(l[u]++,u))}}function Zp(){var e,n,t,l,a,o=new Array(Qn+1);for(t=0,l=0;l<ns-1;l++)for(cs[l]=t,e=0;e<1<<ss[l];e++)hi[t++]=l;for(hi[t-1]=l,a=0,l=0;l<16;l++)for(Zi[l]=a,e=0;e<1<<Ki[l];e++)ui[a++]=l;for(a>>=7;l<Ca;l++)for(Zi[l]=a<<7,e=0;e<1<<Ki[l]-7;e++)ui[256+a++]=l;for(n=0;n<=Qn;n++)o[n]=0;for(e=0;e<=143;)dn[e*2+1]=8,e++,o[8]++;for(;e<=255;)dn[e*2+1]=9,e++,o[9]++;for(;e<=279;)dn[e*2+1]=7,e++,o[7]++;for(;e<=287;)dn[e*2+1]=8,e++,o[8]++;for(Ju(dn,si+1,o),e=0;e<Ca;e++)ci[e*2+1]=5,ci[e*2]=Zu(e,5);Wu=new us(dn,ss,oi+1,si,Qn),Yu=new us(ci,Ki,0,Ca,Qn),Xu=new us(new Array(0),Wp,0,as,Gp)}function Qu(e){var n;for(n=0;n<si;n++)e.dyn_ltree[n*2]=0;for(n=0;n<Ca;n++)e.dyn_dtree[n*2]=0;for(n=0;n<as;n++)e.bl_tree[n*2]=0;e.dyn_ltree[os*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function eh(e){e.bi_valid>8?fi(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Jp(e,n,t,l){eh(e),l&&(fi(e,t),fi(e,~t)),Op.arraySet(e.pending_buf,e.window,n,t,e.pending),e.pending+=t}function th(e,n,t,l){var a=n*2,o=t*2;return e[a]<e[o]||e[a]===e[o]&&l[n]<=l[t]}function fs(e,n,t){for(var l=e.heap[t],a=t<<1;a<=e.heap_len&&(a<e.heap_len&&th(n,e.heap[a+1],e.heap[a],e.depth)&&a++,!th(n,l,e.heap[a],e.depth));)e.heap[t]=e.heap[a],t=a,a<<=1;e.heap[t]=l}function lh(e,n,t){var l,a,o=0,s,u;if(e.last_lit!==0)do l=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],a=e.pending_buf[e.l_buf+o],o++,l===0?en(e,a,n):(s=hi[a],en(e,s+oi+1,n),u=ss[s],u!==0&&(a-=cs[s],er(e,a,u)),l--,s=Ku(l),en(e,s,t),u=Ki[s],u!==0&&(l-=Zi[s],er(e,l,u)));while(o<e.last_lit);en(e,os,n)}function ds(e,n){var t=n.dyn_tree,l=n.stat_desc.static_tree,a=n.stat_desc.has_stree,o=n.stat_desc.elems,s,u,f=-1,d;for(e.heap_len=0,e.heap_max=Vu,s=0;s<o;s++)t[s*2]!==0?(e.heap[++e.heap_len]=f=s,e.depth[s]=0):t[s*2+1]=0;for(;e.heap_len<2;)d=e.heap[++e.heap_len]=f<2?++f:0,t[d*2]=1,e.depth[d]=0,e.opt_len--,a&&(e.static_len-=l[d*2+1]);for(n.max_code=f,s=e.heap_len>>1;s>=1;s--)fs(e,t,s);d=o;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],fs(e,t,1),u=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=u,t[d*2]=t[s*2]+t[u*2],e.depth[d]=(e.depth[s]>=e.depth[u]?e.depth[s]:e.depth[u])+1,t[s*2+1]=t[u*2+1]=d,e.heap[1]=d++,fs(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Kp(e,n),Ju(t,f,e.bl_count)}function rh(e,n,t){var l,a=-1,o,s=n[0*2+1],u=0,f=7,d=4;for(s===0&&(f=138,d=3),n[(t+1)*2+1]=65535,l=0;l<=t;l++)o=s,s=n[(l+1)*2+1],!(++u<f&&o===s)&&(u<d?e.bl_tree[o*2]+=u:o!==0?(o!==a&&e.bl_tree[o*2]++,e.bl_tree[qu*2]++):u<=10?e.bl_tree[ju*2]++:e.bl_tree[Uu*2]++,u=0,a=o,s===0?(f=138,d=3):o===s?(f=6,d=3):(f=7,d=4))}function nh(e,n,t){var l,a=-1,o,s=n[0*2+1],u=0,f=7,d=4;for(s===0&&(f=138,d=3),l=0;l<=t;l++)if(o=s,s=n[(l+1)*2+1],!(++u<f&&o===s)){if(u<d)do en(e,o,e.bl_tree);while(--u!=0);else o!==0?(o!==a&&(en(e,o,e.bl_tree),u--),en(e,qu,e.bl_tree),er(e,u-3,2)):u<=10?(en(e,ju,e.bl_tree),er(e,u-3,3)):(en(e,Uu,e.bl_tree),er(e,u-11,7));u=0,a=o,s===0?(f=138,d=3):o===s?(f=6,d=3):(f=7,d=4)}}function Qp(e){var n;for(rh(e,e.dyn_ltree,e.l_desc.max_code),rh(e,e.dyn_dtree,e.d_desc.max_code),ds(e,e.bl_desc),n=as-1;n>=3&&e.bl_tree[Gu[n]*2+1]===0;n--);return e.opt_len+=3*(n+1)+5+5+4,n}function eg(e,n,t,l){var a;for(er(e,n-257,5),er(e,t-1,5),er(e,l-4,4),a=0;a<l;a++)er(e,e.bl_tree[Gu[a]*2+1],3);nh(e,e.dyn_ltree,n-1),nh(e,e.dyn_dtree,t-1)}function tg(e){var n=4093624447,t;for(t=0;t<=31;t++,n>>>=1)if(n&1&&e.dyn_ltree[t*2]!==0)return Ou;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Bu;for(t=32;t<oi;t++)if(e.dyn_ltree[t*2]!==0)return Bu;return Ou}var ah=!1;function lg(e){ah||(Zp(),ah=!0),e.l_desc=new hs(e.dyn_ltree,Wu),e.d_desc=new hs(e.dyn_dtree,Yu),e.bl_desc=new hs(e.bl_tree,Xu),e.bi_buf=0,e.bi_valid=0,Qu(e)}function ih(e,n,t,l){er(e,(Vp<<1)+(l?1:0),3),Jp(e,n,t,!0)}function rg(e){er(e,Hu<<1,3),en(e,os,dn),Xp(e)}function ng(e,n,t,l){var a,o,s=0;e.level>0?(e.strm.data_type===Hp&&(e.strm.data_type=tg(e)),ds(e,e.l_desc),ds(e,e.d_desc),s=Qp(e),a=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=a&&(a=o)):a=o=t+5,t+4<=a&&n!==-1?ih(e,n,t,l):e.strategy===Bp||o===a?(er(e,(Hu<<1)+(l?1:0),3),lh(e,dn,ci)):(er(e,(qp<<1)+(l?1:0),3),eg(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),lh(e,e.dyn_ltree,e.dyn_dtree)),Qu(e),l&&eh(e)}function ag(e,n,t){return e.pending_buf[e.d_buf+e.last_lit*2]=n>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=n&255,e.pending_buf[e.l_buf+e.last_lit]=t&255,e.last_lit++,n===0?e.dyn_ltree[t*2]++:(e.matches++,n--,e.dyn_ltree[(hi[t]+oi+1)*2]++,e.dyn_dtree[Ku(n)*2]++),e.last_lit===e.lit_bufsize-1}Ta._tr_init=lg;Ta._tr_stored_block=ih;Ta._tr_flush_block=ng;Ta._tr_tally=ag;Ta._tr_align=rg});var ms=vl((Sk,sh)=>{"use strict";function ig(e,n,t,l){for(var a=e&65535|0,o=e>>>16&65535|0,s=0;t!==0;){s=t>2e3?2e3:t,t-=s;do a=a+n[l++]|0,o=o+a|0;while(--s);a%=65521,o%=65521}return a|o<<16|0}sh.exports=ig});var ps=vl(($k,ch)=>{"use strict";function og(){for(var e,n=[],t=0;t<256;t++){e=t;for(var l=0;l<8;l++)e=e&1?3988292384^e>>>1:e>>>1;n[t]=e}return n}var sg=og();function cg(e,n,t,l){var a=sg,o=l+t;e^=-1;for(var s=l;s<o;s++)e=e>>>8^a[(e^n[s])&255];return e^-1}ch.exports=cg});var Ji=vl((Ik,uh)=>{"use strict";uh.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var bh=vl(rn=>{"use strict";var Kl=fn(),kr=oh(),hh=ms(),Dn=ps(),ug=Ji(),ea=0,hg=1,fg=3,Mn=4,fh=5,tn=0,dh=1,wr=-2,dg=-3,gs=-5,mg=-1,pg=1,Qi=2,gg=3,yg=4,vg=0,bg=2,eo=8,kg=9,wg=15,xg=8,_g=29,Cg=256,ys=Cg+1+_g,Tg=30,Sg=19,$g=2*ys+1,Ig=15,qt=3,Fn=258,Nr=Fn+qt+1,Rg=32,to=42,vs=69,lo=73,ro=91,no=103,ta=113,di=666,$l=1,mi=2,la=3,Sa=4,Ag=3;function En(e,n){return e.msg=ug[n],n}function mh(e){return(e<<1)-(e>4?9:0)}function Nn(e){for(var n=e.length;--n>=0;)e[n]=0}function Pn(e){var n=e.state,t=n.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(Kl.arraySet(e.output,n.pending_buf,n.pending_out,t,e.next_out),e.next_out+=t,n.pending_out+=t,e.total_out+=t,e.avail_out-=t,n.pending-=t,n.pending===0&&(n.pending_out=0))}function Nl(e,n){kr._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,n),e.block_start=e.strstart,Pn(e.strm)}function Wt(e,n){e.pending_buf[e.pending++]=n}function pi(e,n){e.pending_buf[e.pending++]=n>>>8&255,e.pending_buf[e.pending++]=n&255}function Dg(e,n,t,l){var a=e.avail_in;return a>l&&(a=l),a===0?0:(e.avail_in-=a,Kl.arraySet(n,e.input,e.next_in,a,t),e.state.wrap===1?e.adler=hh(e.adler,n,a,t):e.state.wrap===2&&(e.adler=Dn(e.adler,n,a,t)),e.next_in+=a,e.total_in+=a,a)}function ph(e,n){var t=e.max_chain_length,l=e.strstart,a,o,s=e.prev_length,u=e.nice_match,f=e.strstart>e.w_size-Nr?e.strstart-(e.w_size-Nr):0,d=e.window,m=e.w_mask,g=e.prev,y=e.strstart+Fn,v=d[l+s-1],b=d[l+s];e.prev_length>=e.good_match&&(t>>=2),u>e.lookahead&&(u=e.lookahead);do if(a=n,!(d[a+s]!==b||d[a+s-1]!==v||d[a]!==d[l]||d[++a]!==d[l+1])){l+=2,a++;do;while(d[++l]===d[++a]&&d[++l]===d[++a]&&d[++l]===d[++a]&&d[++l]===d[++a]&&d[++l]===d[++a]&&d[++l]===d[++a]&&d[++l]===d[++a]&&d[++l]===d[++a]&&l<y);if(o=Fn-(y-l),l=y-Fn,o>s){if(e.match_start=n,s=o,o>=u)break;v=d[l+s-1],b=d[l+s]}}while((n=g[n&m])>f&&--t!=0);return s<=e.lookahead?s:e.lookahead}function ra(e){var n=e.w_size,t,l,a,o,s;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=n+(n-Nr)){Kl.arraySet(e.window,e.window,n,n,0),e.match_start-=n,e.strstart-=n,e.block_start-=n,l=e.hash_size,t=l;do a=e.head[--t],e.head[t]=a>=n?a-n:0;while(--l);l=n,t=l;do a=e.prev[--t],e.prev[t]=a>=n?a-n:0;while(--l);o+=n}if(e.strm.avail_in===0)break;if(l=Dg(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=l,e.lookahead+e.insert>=qt)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+qt-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<qt)););}while(e.lookahead<Nr&&e.strm.avail_in!==0)}function Mg(e,n){var t=65535;for(t>e.pending_buf_size-5&&(t=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ra(e),e.lookahead===0&&n===ea)return $l;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var l=e.block_start+t;if((e.strstart===0||e.strstart>=l)&&(e.lookahead=e.strstart-l,e.strstart=l,Nl(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Nr&&(Nl(e,!1),e.strm.avail_out===0))return $l}return e.insert=0,n===Mn?(Nl(e,!0),e.strm.avail_out===0?la:Sa):(e.strstart>e.block_start&&(Nl(e,!1),e.strm.avail_out===0),$l)}function bs(e,n){for(var t,l;;){if(e.lookahead<Nr){if(ra(e),e.lookahead<Nr&&n===ea)return $l;if(e.lookahead===0)break}if(t=0,e.lookahead>=qt&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+qt-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-Nr&&(e.match_length=ph(e,t)),e.match_length>=qt)if(l=kr._tr_tally(e,e.strstart-e.match_start,e.match_length-qt),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=qt){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+qt-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!=0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else l=kr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(l&&(Nl(e,!1),e.strm.avail_out===0))return $l}return e.insert=e.strstart<qt-1?e.strstart:qt-1,n===Mn?(Nl(e,!0),e.strm.avail_out===0?la:Sa):e.last_lit&&(Nl(e,!1),e.strm.avail_out===0)?$l:mi}function $a(e,n){for(var t,l,a;;){if(e.lookahead<Nr){if(ra(e),e.lookahead<Nr&&n===ea)return $l;if(e.lookahead===0)break}if(t=0,e.lookahead>=qt&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+qt-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=qt-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-Nr&&(e.match_length=ph(e,t),e.match_length<=5&&(e.strategy===pg||e.match_length===qt&&e.strstart-e.match_start>4096)&&(e.match_length=qt-1)),e.prev_length>=qt&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-qt,l=kr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-qt),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=a&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+qt-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!=0);if(e.match_available=0,e.match_length=qt-1,e.strstart++,l&&(Nl(e,!1),e.strm.avail_out===0))return $l}else if(e.match_available){if(l=kr._tr_tally(e,0,e.window[e.strstart-1]),l&&Nl(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return $l}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(l=kr._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<qt-1?e.strstart:qt-1,n===Mn?(Nl(e,!0),e.strm.avail_out===0?la:Sa):e.last_lit&&(Nl(e,!1),e.strm.avail_out===0)?$l:mi}function Fg(e,n){for(var t,l,a,o,s=e.window;;){if(e.lookahead<=Fn){if(ra(e),e.lookahead<=Fn&&n===ea)return $l;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=qt&&e.strstart>0&&(a=e.strstart-1,l=s[a],l===s[++a]&&l===s[++a]&&l===s[++a])){o=e.strstart+Fn;do;while(l===s[++a]&&l===s[++a]&&l===s[++a]&&l===s[++a]&&l===s[++a]&&l===s[++a]&&l===s[++a]&&l===s[++a]&&a<o);e.match_length=Fn-(o-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=qt?(t=kr._tr_tally(e,1,e.match_length-qt),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=kr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(Nl(e,!1),e.strm.avail_out===0))return $l}return e.insert=0,n===Mn?(Nl(e,!0),e.strm.avail_out===0?la:Sa):e.last_lit&&(Nl(e,!1),e.strm.avail_out===0)?$l:mi}function Eg(e,n){for(var t;;){if(e.lookahead===0&&(ra(e),e.lookahead===0)){if(n===ea)return $l;break}if(e.match_length=0,t=kr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(Nl(e,!1),e.strm.avail_out===0))return $l}return e.insert=0,n===Mn?(Nl(e,!0),e.strm.avail_out===0?la:Sa):e.last_lit&&(Nl(e,!1),e.strm.avail_out===0)?$l:mi}function ln(e,n,t,l,a){this.good_length=e,this.max_lazy=n,this.nice_length=t,this.max_chain=l,this.func=a}var Ia;Ia=[new ln(0,0,0,0,Mg),new ln(4,4,8,4,bs),new ln(4,5,16,8,bs),new ln(4,6,32,32,bs),new ln(4,4,16,16,$a),new ln(8,16,32,32,$a),new ln(8,16,128,128,$a),new ln(8,32,128,256,$a),new ln(32,128,258,1024,$a),new ln(32,258,258,4096,$a)];function Ng(e){e.window_size=2*e.w_size,Nn(e.head),e.max_lazy_match=Ia[e.level].max_lazy,e.good_match=Ia[e.level].good_length,e.nice_match=Ia[e.level].nice_length,e.max_chain_length=Ia[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=qt-1,e.match_available=0,e.ins_h=0}function Pg(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=eo,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Kl.Buf16($g*2),this.dyn_dtree=new Kl.Buf16((2*Tg+1)*2),this.bl_tree=new Kl.Buf16((2*Sg+1)*2),Nn(this.dyn_ltree),Nn(this.dyn_dtree),Nn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Kl.Buf16(Ig+1),this.heap=new Kl.Buf16(2*ys+1),Nn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Kl.Buf16(2*ys+1),Nn(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function gh(e){var n;return!e||!e.state?En(e,wr):(e.total_in=e.total_out=0,e.data_type=bg,n=e.state,n.pending=0,n.pending_out=0,n.wrap<0&&(n.wrap=-n.wrap),n.status=n.wrap?to:ta,e.adler=n.wrap===2?0:1,n.last_flush=ea,kr._tr_init(n),tn)}function yh(e){var n=gh(e);return n===tn&&Ng(e.state),n}function Lg(e,n){return!e||!e.state||e.state.wrap!==2?wr:(e.state.gzhead=n,tn)}function vh(e,n,t,l,a,o){if(!e)return wr;var s=1;if(n===mg&&(n=6),l<0?(s=0,l=-l):l>15&&(s=2,l-=16),a<1||a>kg||t!==eo||l<8||l>15||n<0||n>9||o<0||o>yg)return En(e,wr);l===8&&(l=9);var u=new Pg;return e.state=u,u.strm=e,u.wrap=s,u.gzhead=null,u.w_bits=l,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=a+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+qt-1)/qt),u.window=new Kl.Buf8(u.w_size*2),u.head=new Kl.Buf16(u.hash_size),u.prev=new Kl.Buf16(u.w_size),u.lit_bufsize=1<<a+6,u.pending_buf_size=u.lit_bufsize*4,u.pending_buf=new Kl.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=(1+2)*u.lit_bufsize,u.level=n,u.strategy=o,u.method=t,yh(e)}function zg(e,n){return vh(e,n,eo,wg,xg,vg)}function Og(e,n){var t,l,a,o;if(!e||!e.state||n>fh||n<0)return e?En(e,wr):wr;if(l=e.state,!e.output||!e.input&&e.avail_in!==0||l.status===di&&n!==Mn)return En(e,e.avail_out===0?gs:wr);if(l.strm=e,t=l.last_flush,l.last_flush=n,l.status===to)if(l.wrap===2)e.adler=0,Wt(l,31),Wt(l,139),Wt(l,8),l.gzhead?(Wt(l,(l.gzhead.text?1:0)+(l.gzhead.hcrc?2:0)+(l.gzhead.extra?4:0)+(l.gzhead.name?8:0)+(l.gzhead.comment?16:0)),Wt(l,l.gzhead.time&255),Wt(l,l.gzhead.time>>8&255),Wt(l,l.gzhead.time>>16&255),Wt(l,l.gzhead.time>>24&255),Wt(l,l.level===9?2:l.strategy>=Qi||l.level<2?4:0),Wt(l,l.gzhead.os&255),l.gzhead.extra&&l.gzhead.extra.length&&(Wt(l,l.gzhead.extra.length&255),Wt(l,l.gzhead.extra.length>>8&255)),l.gzhead.hcrc&&(e.adler=Dn(e.adler,l.pending_buf,l.pending,0)),l.gzindex=0,l.status=vs):(Wt(l,0),Wt(l,0),Wt(l,0),Wt(l,0),Wt(l,0),Wt(l,l.level===9?2:l.strategy>=Qi||l.level<2?4:0),Wt(l,Ag),l.status=ta);else{var s=eo+(l.w_bits-8<<4)<<8,u=-1;l.strategy>=Qi||l.level<2?u=0:l.level<6?u=1:l.level===6?u=2:u=3,s|=u<<6,l.strstart!==0&&(s|=Rg),s+=31-s%31,l.status=ta,pi(l,s),l.strstart!==0&&(pi(l,e.adler>>>16),pi(l,e.adler&65535)),e.adler=1}if(l.status===vs)if(l.gzhead.extra){for(a=l.pending;l.gzindex<(l.gzhead.extra.length&65535)&&!(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>a&&(e.adler=Dn(e.adler,l.pending_buf,l.pending-a,a)),Pn(e),a=l.pending,l.pending===l.pending_buf_size));)Wt(l,l.gzhead.extra[l.gzindex]&255),l.gzindex++;l.gzhead.hcrc&&l.pending>a&&(e.adler=Dn(e.adler,l.pending_buf,l.pending-a,a)),l.gzindex===l.gzhead.extra.length&&(l.gzindex=0,l.status=lo)}else l.status=lo;if(l.status===lo)if(l.gzhead.name){a=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>a&&(e.adler=Dn(e.adler,l.pending_buf,l.pending-a,a)),Pn(e),a=l.pending,l.pending===l.pending_buf_size)){o=1;break}l.gzindex<l.gzhead.name.length?o=l.gzhead.name.charCodeAt(l.gzindex++)&255:o=0,Wt(l,o)}while(o!==0);l.gzhead.hcrc&&l.pending>a&&(e.adler=Dn(e.adler,l.pending_buf,l.pending-a,a)),o===0&&(l.gzindex=0,l.status=ro)}else l.status=ro;if(l.status===ro)if(l.gzhead.comment){a=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>a&&(e.adler=Dn(e.adler,l.pending_buf,l.pending-a,a)),Pn(e),a=l.pending,l.pending===l.pending_buf_size)){o=1;break}l.gzindex<l.gzhead.comment.length?o=l.gzhead.comment.charCodeAt(l.gzindex++)&255:o=0,Wt(l,o)}while(o!==0);l.gzhead.hcrc&&l.pending>a&&(e.adler=Dn(e.adler,l.pending_buf,l.pending-a,a)),o===0&&(l.status=no)}else l.status=no;if(l.status===no&&(l.gzhead.hcrc?(l.pending+2>l.pending_buf_size&&Pn(e),l.pending+2<=l.pending_buf_size&&(Wt(l,e.adler&255),Wt(l,e.adler>>8&255),e.adler=0,l.status=ta)):l.status=ta),l.pending!==0){if(Pn(e),e.avail_out===0)return l.last_flush=-1,tn}else if(e.avail_in===0&&mh(n)<=mh(t)&&n!==Mn)return En(e,gs);if(l.status===di&&e.avail_in!==0)return En(e,gs);if(e.avail_in!==0||l.lookahead!==0||n!==ea&&l.status!==di){var f=l.strategy===Qi?Eg(l,n):l.strategy===gg?Fg(l,n):Ia[l.level].func(l,n);if((f===la||f===Sa)&&(l.status=di),f===$l||f===la)return e.avail_out===0&&(l.last_flush=-1),tn;if(f===mi&&(n===hg?kr._tr_align(l):n!==fh&&(kr._tr_stored_block(l,0,0,!1),n===fg&&(Nn(l.head),l.lookahead===0&&(l.strstart=0,l.block_start=0,l.insert=0))),Pn(e),e.avail_out===0))return l.last_flush=-1,tn}return n!==Mn?tn:l.wrap<=0?dh:(l.wrap===2?(Wt(l,e.adler&255),Wt(l,e.adler>>8&255),Wt(l,e.adler>>16&255),Wt(l,e.adler>>24&255),Wt(l,e.total_in&255),Wt(l,e.total_in>>8&255),Wt(l,e.total_in>>16&255),Wt(l,e.total_in>>24&255)):(pi(l,e.adler>>>16),pi(l,e.adler&65535)),Pn(e),l.wrap>0&&(l.wrap=-l.wrap),l.pending!==0?tn:dh)}function Bg(e){var n;return!e||!e.state?wr:(n=e.state.status,n!==to&&n!==vs&&n!==lo&&n!==ro&&n!==no&&n!==ta&&n!==di?En(e,wr):(e.state=null,n===ta?En(e,dg):tn))}function Hg(e,n){var t=n.length,l,a,o,s,u,f,d,m;if(!e||!e.state||(l=e.state,s=l.wrap,s===2||s===1&&l.status!==to||l.lookahead))return wr;for(s===1&&(e.adler=hh(e.adler,n,t,0)),l.wrap=0,t>=l.w_size&&(s===0&&(Nn(l.head),l.strstart=0,l.block_start=0,l.insert=0),m=new Kl.Buf8(l.w_size),Kl.arraySet(m,n,t-l.w_size,l.w_size,0),n=m,t=l.w_size),u=e.avail_in,f=e.next_in,d=e.input,e.avail_in=t,e.next_in=0,e.input=n,ra(l);l.lookahead>=qt;){a=l.strstart,o=l.lookahead-(qt-1);do l.ins_h=(l.ins_h<<l.hash_shift^l.window[a+qt-1])&l.hash_mask,l.prev[a&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=a,a++;while(--o);l.strstart=a,l.lookahead=qt-1,ra(l)}return l.strstart+=l.lookahead,l.block_start=l.strstart,l.insert=l.lookahead,l.lookahead=0,l.match_length=l.prev_length=qt-1,l.match_available=0,e.next_in=f,e.input=d,e.avail_in=u,l.wrap=s,tn}rn.deflateInit=zg;rn.deflateInit2=vh;rn.deflateReset=yh;rn.deflateResetKeep=gh;rn.deflateSetHeader=Lg;rn.deflate=Og;rn.deflateEnd=Bg;rn.deflateSetDictionary=Hg;rn.deflateInfo="pako deflate (from Nodeca project)"});var ks=vl(Ra=>{"use strict";var ao=fn(),kh=!0,wh=!0;try{String.fromCharCode.apply(null,[0])}catch(e){kh=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){wh=!1}var gi=new ao.Buf8(256);for(var Ln=0;Ln<256;Ln++)gi[Ln]=Ln>=252?6:Ln>=248?5:Ln>=240?4:Ln>=224?3:Ln>=192?2:1;gi[254]=gi[254]=1;Ra.string2buf=function(e){var n,t,l,a,o,s=e.length,u=0;for(a=0;a<s;a++)t=e.charCodeAt(a),(t&64512)==55296&&a+1<s&&(l=e.charCodeAt(a+1),(l&64512)==56320&&(t=65536+(t-55296<<10)+(l-56320),a++)),u+=t<128?1:t<2048?2:t<65536?3:4;for(n=new ao.Buf8(u),o=0,a=0;o<u;a++)t=e.charCodeAt(a),(t&64512)==55296&&a+1<s&&(l=e.charCodeAt(a+1),(l&64512)==56320&&(t=65536+(t-55296<<10)+(l-56320),a++)),t<128?n[o++]=t:t<2048?(n[o++]=192|t>>>6,n[o++]=128|t&63):t<65536?(n[o++]=224|t>>>12,n[o++]=128|t>>>6&63,n[o++]=128|t&63):(n[o++]=240|t>>>18,n[o++]=128|t>>>12&63,n[o++]=128|t>>>6&63,n[o++]=128|t&63);return n};function xh(e,n){if(n<65534&&(e.subarray&&wh||!e.subarray&&kh))return String.fromCharCode.apply(null,ao.shrinkBuf(e,n));for(var t="",l=0;l<n;l++)t+=String.fromCharCode(e[l]);return t}Ra.buf2binstring=function(e){return xh(e,e.length)};Ra.binstring2buf=function(e){for(var n=new ao.Buf8(e.length),t=0,l=n.length;t<l;t++)n[t]=e.charCodeAt(t);return n};Ra.buf2string=function(e,n){var t,l,a,o,s=n||e.length,u=new Array(s*2);for(l=0,t=0;t<s;){if(a=e[t++],a<128){u[l++]=a;continue}if(o=gi[a],o>4){u[l++]=65533,t+=o-1;continue}for(a&=o===2?31:o===3?15:7;o>1&&t<s;)a=a<<6|e[t++]&63,o--;if(o>1){u[l++]=65533;continue}a<65536?u[l++]=a:(a-=65536,u[l++]=55296|a>>10&1023,u[l++]=56320|a&1023)}return xh(u,l)};Ra.utf8border=function(e,n){var t;for(n=n||e.length,n>e.length&&(n=e.length),t=n-1;t>=0&&(e[t]&192)==128;)t--;return t<0||t===0?n:t+gi[e[t]]>n?t:n}});var ws=vl((Dk,_h)=>{"use strict";function Vg(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}_h.exports=Vg});var $h=vl(bi=>{"use strict";var yi=bh(),vi=fn(),xs=ks(),_s=Ji(),qg=ws(),Ch=Object.prototype.toString,jg=0,Cs=4,Aa=0,Th=1,Sh=2,Ug=-1,Gg=0,Wg=8;function na(e){if(!(this instanceof na))return new na(e);this.options=vi.assign({level:Ug,method:Wg,chunkSize:16384,windowBits:15,memLevel:8,strategy:Gg,to:""},e||{});var n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qg,this.strm.avail_out=0;var t=yi.deflateInit2(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy);if(t!==Aa)throw new Error(_s[t]);if(n.header&&yi.deflateSetHeader(this.strm,n.header),n.dictionary){var l;if(typeof n.dictionary=="string"?l=xs.string2buf(n.dictionary):Ch.call(n.dictionary)==="[object ArrayBuffer]"?l=new Uint8Array(n.dictionary):l=n.dictionary,t=yi.deflateSetDictionary(this.strm,l),t!==Aa)throw new Error(_s[t]);this._dict_set=!0}}na.prototype.push=function(e,n){var t=this.strm,l=this.options.chunkSize,a,o;if(this.ended)return!1;o=n===~~n?n:n===!0?Cs:jg,typeof e=="string"?t.input=xs.string2buf(e):Ch.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new vi.Buf8(l),t.next_out=0,t.avail_out=l),a=yi.deflate(t,o),a!==Th&&a!==Aa)return this.onEnd(a),this.ended=!0,!1;(t.avail_out===0||t.avail_in===0&&(o===Cs||o===Sh))&&(this.options.to==="string"?this.onData(xs.buf2binstring(vi.shrinkBuf(t.output,t.next_out))):this.onData(vi.shrinkBuf(t.output,t.next_out)))}while((t.avail_in>0||t.avail_out===0)&&a!==Th);return o===Cs?(a=yi.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===Aa):(o===Sh&&(this.onEnd(Aa),t.avail_out=0),!0)};na.prototype.onData=function(e){this.chunks.push(e)};na.prototype.onEnd=function(e){e===Aa&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=vi.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ts(e,n){var t=new na(n);if(t.push(e,!0),t.err)throw t.msg||_s[t.err];return t.result}function Yg(e,n){return n=n||{},n.raw=!0,Ts(e,n)}function Xg(e,n){return n=n||{},n.gzip=!0,Ts(e,n)}bi.Deflate=na;bi.deflate=Ts;bi.deflateRaw=Yg;bi.gzip=Xg});var Rh=vl((Fk,Ih)=>{"use strict";var io=30,Kg=12;Ih.exports=function(n,t){var l,a,o,s,u,f,d,m,g,y,v,b,k,w,x,C,S,_,T,A,R,I,F,z,M;l=n.state,a=n.next_in,z=n.input,o=a+(n.avail_in-5),s=n.next_out,M=n.output,u=s-(t-n.avail_out),f=s+(n.avail_out-257),d=l.dmax,m=l.wsize,g=l.whave,y=l.wnext,v=l.window,b=l.hold,k=l.bits,w=l.lencode,x=l.distcode,C=(1<<l.lenbits)-1,S=(1<<l.distbits)-1;e:do{k<15&&(b+=z[a++]<<k,k+=8,b+=z[a++]<<k,k+=8),_=w[b&C];t:for(;;){if(T=_>>>24,b>>>=T,k-=T,T=_>>>16&255,T===0)M[s++]=_&65535;else if(T&16){A=_&65535,T&=15,T&&(k<T&&(b+=z[a++]<<k,k+=8),A+=b&(1<<T)-1,b>>>=T,k-=T),k<15&&(b+=z[a++]<<k,k+=8,b+=z[a++]<<k,k+=8),_=x[b&S];l:for(;;){if(T=_>>>24,b>>>=T,k-=T,T=_>>>16&255,T&16){if(R=_&65535,T&=15,k<T&&(b+=z[a++]<<k,k+=8,k<T&&(b+=z[a++]<<k,k+=8)),R+=b&(1<<T)-1,R>d){n.msg="invalid distance too far back",l.mode=io;break e}if(b>>>=T,k-=T,T=s-u,R>T){if(T=R-T,T>g&&l.sane){n.msg="invalid distance too far back",l.mode=io;break e}if(I=0,F=v,y===0){if(I+=m-T,T<A){A-=T;do M[s++]=v[I++];while(--T);I=s-R,F=M}}else if(y<T){if(I+=m+y-T,T-=y,T<A){A-=T;do M[s++]=v[I++];while(--T);if(I=0,y<A){T=y,A-=T;do M[s++]=v[I++];while(--T);I=s-R,F=M}}}else if(I+=y-T,T<A){A-=T;do M[s++]=v[I++];while(--T);I=s-R,F=M}for(;A>2;)M[s++]=F[I++],M[s++]=F[I++],M[s++]=F[I++],A-=3;A&&(M[s++]=F[I++],A>1&&(M[s++]=F[I++]))}else{I=s-R;do M[s++]=M[I++],M[s++]=M[I++],M[s++]=M[I++],A-=3;while(A>2);A&&(M[s++]=M[I++],A>1&&(M[s++]=M[I++]))}}else if((T&64)==0){_=x[(_&65535)+(b&(1<<T)-1)];continue l}else{n.msg="invalid distance code",l.mode=io;break e}break}}else if((T&64)==0){_=w[(_&65535)+(b&(1<<T)-1)];continue t}else if(T&32){l.mode=Kg;break e}else{n.msg="invalid literal/length code",l.mode=io;break e}break}}while(a<o&&s<f);A=k>>3,a-=A,k-=A<<3,b&=(1<<k)-1,n.next_in=a,n.next_out=s,n.avail_in=a<o?5+(o-a):5-(a-o),n.avail_out=s<f?257+(f-s):257-(s-f),l.hold=b,l.bits=k}});var Ph=vl((Ek,Nh)=>{"use strict";var Ah=fn(),Da=15,Dh=852,Mh=592,Fh=0,Ss=1,Eh=2,Zg=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Jg=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Qg=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],ey=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Nh.exports=function(n,t,l,a,o,s,u,f){var d=f.bits,m=0,g=0,y=0,v=0,b=0,k=0,w=0,x=0,C=0,S=0,_,T,A,R,I,F=null,z=0,M,E=new Ah.Buf16(Da+1),N=new Ah.Buf16(Da+1),L=null,O=0,V,q,W;for(m=0;m<=Da;m++)E[m]=0;for(g=0;g<a;g++)E[t[l+g]]++;for(b=d,v=Da;v>=1&&E[v]===0;v--);if(b>v&&(b=v),v===0)return o[s++]=1<<24|64<<16|0,o[s++]=1<<24|64<<16|0,f.bits=1,0;for(y=1;y<v&&E[y]===0;y++);for(b<y&&(b=y),x=1,m=1;m<=Da;m++)if(x<<=1,x-=E[m],x<0)return-1;if(x>0&&(n===Fh||v!==1))return-1;for(N[1]=0,m=1;m<Da;m++)N[m+1]=N[m]+E[m];for(g=0;g<a;g++)t[l+g]!==0&&(u[N[t[l+g]]++]=g);if(n===Fh?(F=L=u,M=19):n===Ss?(F=Zg,z-=257,L=Jg,O-=257,M=256):(F=Qg,L=ey,M=-1),S=0,g=0,m=y,I=s,k=b,w=0,A=-1,C=1<<b,R=C-1,n===Ss&&C>Dh||n===Eh&&C>Mh)return 1;for(;;){V=m-w,u[g]<M?(q=0,W=u[g]):u[g]>M?(q=L[O+u[g]],W=F[z+u[g]]):(q=32+64,W=0),_=1<<m-w,T=1<<k,y=T;do T-=_,o[I+(S>>w)+T]=V<<24|q<<16|W|0;while(T!==0);for(_=1<<m-1;S&_;)_>>=1;if(_!==0?(S&=_-1,S+=_):S=0,g++,--E[m]==0){if(m===v)break;m=t[l+u[g]]}if(m>b&&(S&R)!==A){for(w===0&&(w=b),I+=y,k=m-w,x=1<<k;k+w<v&&(x-=E[k+w],!(x<=0));)k++,x<<=1;if(C+=1<<k,n===Ss&&C>Dh||n===Eh&&C>Mh)return 1;A=S&R,o[A]=b<<24|k<<16|I-s|0}}return S!==0&&(o[I+S]=m-w<<24|64<<16|0),f.bits=b,0}});var vf=vl(Pr=>{"use strict";var dr=fn(),$s=ms(),nn=ps(),ty=Rh(),ki=Ph(),ly=0,Lh=1,zh=2,Oh=4,ry=5,oo=6,aa=0,ny=1,ay=2,xr=-2,Bh=-3,Is=-4,iy=-5,Hh=8,Vh=1,qh=2,jh=3,Uh=4,Gh=5,Wh=6,Yh=7,Xh=8,Kh=9,Zh=10,so=11,mn=12,Rs=13,Jh=14,As=15,Qh=16,ef=17,tf=18,lf=19,co=20,uo=21,rf=22,nf=23,af=24,of=25,sf=26,Ds=27,cf=28,uf=29,fl=30,Ms=31,oy=32,sy=852,cy=592,uy=15,hy=uy;function hf(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function fy(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new dr.Buf16(320),this.work=new dr.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ff(e){var n;return!e||!e.state?xr:(n=e.state,e.total_in=e.total_out=n.total=0,e.msg="",n.wrap&&(e.adler=n.wrap&1),n.mode=Vh,n.last=0,n.havedict=0,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new dr.Buf32(sy),n.distcode=n.distdyn=new dr.Buf32(cy),n.sane=1,n.back=-1,aa)}function df(e){var n;return!e||!e.state?xr:(n=e.state,n.wsize=0,n.whave=0,n.wnext=0,ff(e))}function mf(e,n){var t,l;return!e||!e.state||(l=e.state,n<0?(t=0,n=-n):(t=(n>>4)+1,n<48&&(n&=15)),n&&(n<8||n>15))?xr:(l.window!==null&&l.wbits!==n&&(l.window=null),l.wrap=t,l.wbits=n,df(e))}function pf(e,n){var t,l;return e?(l=new fy,e.state=l,l.window=null,t=mf(e,n),t!==aa&&(e.state=null),t):xr}function dy(e){return pf(e,hy)}var gf=!0,Fs,Es;function my(e){if(gf){var n;for(Fs=new dr.Buf32(512),Es=new dr.Buf32(32),n=0;n<144;)e.lens[n++]=8;for(;n<256;)e.lens[n++]=9;for(;n<280;)e.lens[n++]=7;for(;n<288;)e.lens[n++]=8;for(ki(Lh,e.lens,0,288,Fs,0,e.work,{bits:9}),n=0;n<32;)e.lens[n++]=5;ki(zh,e.lens,0,32,Es,0,e.work,{bits:5}),gf=!1}e.lencode=Fs,e.lenbits=9,e.distcode=Es,e.distbits=5}function yf(e,n,t,l){var a,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new dr.Buf8(o.wsize)),l>=o.wsize?(dr.arraySet(o.window,n,t-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>l&&(a=l),dr.arraySet(o.window,n,t-l,a,o.wnext),l-=a,l?(dr.arraySet(o.window,n,t-l,l,0),o.wnext=l,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}function py(e,n){var t,l,a,o,s,u,f,d,m,g,y,v,b,k,w=0,x,C,S,_,T,A,R,I,F=new dr.Buf8(4),z,M,E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return xr;t=e.state,t.mode===mn&&(t.mode=Rs),s=e.next_out,a=e.output,f=e.avail_out,o=e.next_in,l=e.input,u=e.avail_in,d=t.hold,m=t.bits,g=u,y=f,I=aa;e:for(;;)switch(t.mode){case Vh:if(t.wrap===0){t.mode=Rs;break}for(;m<16;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}if(t.wrap&2&&d===35615){t.check=0,F[0]=d&255,F[1]=d>>>8&255,t.check=nn(t.check,F,2,0),d=0,m=0,t.mode=qh;break}if(t.flags=0,t.head&&(t.head.done=!1),!(t.wrap&1)||(((d&255)<<8)+(d>>8))%31){e.msg="incorrect header check",t.mode=fl;break}if((d&15)!==Hh){e.msg="unknown compression method",t.mode=fl;break}if(d>>>=4,m-=4,R=(d&15)+8,t.wbits===0)t.wbits=R;else if(R>t.wbits){e.msg="invalid window size",t.mode=fl;break}t.dmax=1<<R,e.adler=t.check=1,t.mode=d&512?Zh:mn,d=0,m=0;break;case qh:for(;m<16;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}if(t.flags=d,(t.flags&255)!==Hh){e.msg="unknown compression method",t.mode=fl;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=fl;break}t.head&&(t.head.text=d>>8&1),t.flags&512&&(F[0]=d&255,F[1]=d>>>8&255,t.check=nn(t.check,F,2,0)),d=0,m=0,t.mode=jh;case jh:for(;m<32;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}t.head&&(t.head.time=d),t.flags&512&&(F[0]=d&255,F[1]=d>>>8&255,F[2]=d>>>16&255,F[3]=d>>>24&255,t.check=nn(t.check,F,4,0)),d=0,m=0,t.mode=Uh;case Uh:for(;m<16;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}t.head&&(t.head.xflags=d&255,t.head.os=d>>8),t.flags&512&&(F[0]=d&255,F[1]=d>>>8&255,t.check=nn(t.check,F,2,0)),d=0,m=0,t.mode=Gh;case Gh:if(t.flags&1024){for(;m<16;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}t.length=d,t.head&&(t.head.extra_len=d),t.flags&512&&(F[0]=d&255,F[1]=d>>>8&255,t.check=nn(t.check,F,2,0)),d=0,m=0}else t.head&&(t.head.extra=null);t.mode=Wh;case Wh:if(t.flags&1024&&(v=t.length,v>u&&(v=u),v&&(t.head&&(R=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),dr.arraySet(t.head.extra,l,o,v,R)),t.flags&512&&(t.check=nn(t.check,l,v,o)),u-=v,o+=v,t.length-=v),t.length))break e;t.length=0,t.mode=Yh;case Yh:if(t.flags&2048){if(u===0)break e;v=0;do R=l[o+v++],t.head&&R&&t.length<65536&&(t.head.name+=String.fromCharCode(R));while(R&&v<u);if(t.flags&512&&(t.check=nn(t.check,l,v,o)),u-=v,o+=v,R)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=Xh;case Xh:if(t.flags&4096){if(u===0)break e;v=0;do R=l[o+v++],t.head&&R&&t.length<65536&&(t.head.comment+=String.fromCharCode(R));while(R&&v<u);if(t.flags&512&&(t.check=nn(t.check,l,v,o)),u-=v,o+=v,R)break e}else t.head&&(t.head.comment=null);t.mode=Kh;case Kh:if(t.flags&512){for(;m<16;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}if(d!==(t.check&65535)){e.msg="header crc mismatch",t.mode=fl;break}d=0,m=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=mn;break;case Zh:for(;m<32;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}e.adler=t.check=hf(d),d=0,m=0,t.mode=so;case so:if(t.havedict===0)return e.next_out=s,e.avail_out=f,e.next_in=o,e.avail_in=u,t.hold=d,t.bits=m,ay;e.adler=t.check=1,t.mode=mn;case mn:if(n===ry||n===oo)break e;case Rs:if(t.last){d>>>=m&7,m-=m&7,t.mode=Ds;break}for(;m<3;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}switch(t.last=d&1,d>>>=1,m-=1,d&3){case 0:t.mode=Jh;break;case 1:if(my(t),t.mode=co,n===oo){d>>>=2,m-=2;break e}break;case 2:t.mode=ef;break;case 3:e.msg="invalid block type",t.mode=fl}d>>>=2,m-=2;break;case Jh:for(d>>>=m&7,m-=m&7;m<32;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}if((d&65535)!=(d>>>16^65535)){e.msg="invalid stored block lengths",t.mode=fl;break}if(t.length=d&65535,d=0,m=0,t.mode=As,n===oo)break e;case As:t.mode=Qh;case Qh:if(v=t.length,v){if(v>u&&(v=u),v>f&&(v=f),v===0)break e;dr.arraySet(a,l,o,v,s),u-=v,o+=v,f-=v,s+=v,t.length-=v;break}t.mode=mn;break;case ef:for(;m<14;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}if(t.nlen=(d&31)+257,d>>>=5,m-=5,t.ndist=(d&31)+1,d>>>=5,m-=5,t.ncode=(d&15)+4,d>>>=4,m-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=fl;break}t.have=0,t.mode=tf;case tf:for(;t.have<t.ncode;){for(;m<3;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}t.lens[E[t.have++]]=d&7,d>>>=3,m-=3}for(;t.have<19;)t.lens[E[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,z={bits:t.lenbits},I=ki(ly,t.lens,0,19,t.lencode,0,t.work,z),t.lenbits=z.bits,I){e.msg="invalid code lengths set",t.mode=fl;break}t.have=0,t.mode=lf;case lf:for(;t.have<t.nlen+t.ndist;){for(;w=t.lencode[d&(1<<t.lenbits)-1],x=w>>>24,C=w>>>16&255,S=w&65535,!(x<=m);){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}if(S<16)d>>>=x,m-=x,t.lens[t.have++]=S;else{if(S===16){for(M=x+2;m<M;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}if(d>>>=x,m-=x,t.have===0){e.msg="invalid bit length repeat",t.mode=fl;break}R=t.lens[t.have-1],v=3+(d&3),d>>>=2,m-=2}else if(S===17){for(M=x+3;m<M;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}d>>>=x,m-=x,R=0,v=3+(d&7),d>>>=3,m-=3}else{for(M=x+7;m<M;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}d>>>=x,m-=x,R=0,v=11+(d&127),d>>>=7,m-=7}if(t.have+v>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=fl;break}for(;v--;)t.lens[t.have++]=R}}if(t.mode===fl)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=fl;break}if(t.lenbits=9,z={bits:t.lenbits},I=ki(Lh,t.lens,0,t.nlen,t.lencode,0,t.work,z),t.lenbits=z.bits,I){e.msg="invalid literal/lengths set",t.mode=fl;break}if(t.distbits=6,t.distcode=t.distdyn,z={bits:t.distbits},I=ki(zh,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,z),t.distbits=z.bits,I){e.msg="invalid distances set",t.mode=fl;break}if(t.mode=co,n===oo)break e;case co:t.mode=uo;case uo:if(u>=6&&f>=258){e.next_out=s,e.avail_out=f,e.next_in=o,e.avail_in=u,t.hold=d,t.bits=m,ty(e,y),s=e.next_out,a=e.output,f=e.avail_out,o=e.next_in,l=e.input,u=e.avail_in,d=t.hold,m=t.bits,t.mode===mn&&(t.back=-1);break}for(t.back=0;w=t.lencode[d&(1<<t.lenbits)-1],x=w>>>24,C=w>>>16&255,S=w&65535,!(x<=m);){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}if(C&&(C&240)==0){for(_=x,T=C,A=S;w=t.lencode[A+((d&(1<<_+T)-1)>>_)],x=w>>>24,C=w>>>16&255,S=w&65535,!(_+x<=m);){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}d>>>=_,m-=_,t.back+=_}if(d>>>=x,m-=x,t.back+=x,t.length=S,C===0){t.mode=sf;break}if(C&32){t.back=-1,t.mode=mn;break}if(C&64){e.msg="invalid literal/length code",t.mode=fl;break}t.extra=C&15,t.mode=rf;case rf:if(t.extra){for(M=t.extra;m<M;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}t.length+=d&(1<<t.extra)-1,d>>>=t.extra,m-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=nf;case nf:for(;w=t.distcode[d&(1<<t.distbits)-1],x=w>>>24,C=w>>>16&255,S=w&65535,!(x<=m);){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}if((C&240)==0){for(_=x,T=C,A=S;w=t.distcode[A+((d&(1<<_+T)-1)>>_)],x=w>>>24,C=w>>>16&255,S=w&65535,!(_+x<=m);){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}d>>>=_,m-=_,t.back+=_}if(d>>>=x,m-=x,t.back+=x,C&64){e.msg="invalid distance code",t.mode=fl;break}t.offset=S,t.extra=C&15,t.mode=af;case af:if(t.extra){for(M=t.extra;m<M;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}t.offset+=d&(1<<t.extra)-1,d>>>=t.extra,m-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=fl;break}t.mode=of;case of:if(f===0)break e;if(v=y-f,t.offset>v){if(v=t.offset-v,v>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=fl;break}v>t.wnext?(v-=t.wnext,b=t.wsize-v):b=t.wnext-v,v>t.length&&(v=t.length),k=t.window}else k=a,b=s-t.offset,v=t.length;v>f&&(v=f),f-=v,t.length-=v;do a[s++]=k[b++];while(--v);t.length===0&&(t.mode=uo);break;case sf:if(f===0)break e;a[s++]=t.length,f--,t.mode=uo;break;case Ds:if(t.wrap){for(;m<32;){if(u===0)break e;u--,d|=l[o++]<<m,m+=8}if(y-=f,e.total_out+=y,t.total+=y,y&&(e.adler=t.check=t.flags?nn(t.check,a,y,s-y):$s(t.check,a,y,s-y)),y=f,(t.flags?d:hf(d))!==t.check){e.msg="incorrect data check",t.mode=fl;break}d=0,m=0}t.mode=cf;case cf:if(t.wrap&&t.flags){for(;m<32;){if(u===0)break e;u--,d+=l[o++]<<m,m+=8}if(d!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=fl;break}d=0,m=0}t.mode=uf;case uf:I=ny;break e;case fl:I=Bh;break e;case Ms:return Is;case oy:default:return xr}return e.next_out=s,e.avail_out=f,e.next_in=o,e.avail_in=u,t.hold=d,t.bits=m,(t.wsize||y!==e.avail_out&&t.mode<fl&&(t.mode<Ds||n!==Oh))&&yf(e,e.output,e.next_out,y-e.avail_out)?(t.mode=Ms,Is):(g-=e.avail_in,y-=e.avail_out,e.total_in+=g,e.total_out+=y,t.total+=y,t.wrap&&y&&(e.adler=t.check=t.flags?nn(t.check,a,y,e.next_out-y):$s(t.check,a,y,e.next_out-y)),e.data_type=t.bits+(t.last?64:0)+(t.mode===mn?128:0)+(t.mode===co||t.mode===As?256:0),(g===0&&y===0||n===Oh)&&I===aa&&(I=iy),I)}function gy(e){if(!e||!e.state)return xr;var n=e.state;return n.window&&(n.window=null),e.state=null,aa}function yy(e,n){var t;return!e||!e.state||(t=e.state,(t.wrap&2)==0)?xr:(t.head=n,n.done=!1,aa)}function vy(e,n){var t=n.length,l,a,o;return!e||!e.state||(l=e.state,l.wrap!==0&&l.mode!==so)?xr:l.mode===so&&(a=1,a=$s(a,n,t,0),a!==l.check)?Bh:(o=yf(e,n,t,t),o?(l.mode=Ms,Is):(l.havedict=1,aa))}Pr.inflateReset=df;Pr.inflateReset2=mf;Pr.inflateResetKeep=ff;Pr.inflateInit=dy;Pr.inflateInit2=pf;Pr.inflate=py;Pr.inflateEnd=gy;Pr.inflateGetHeader=yy;Pr.inflateSetDictionary=vy;Pr.inflateInfo="pako inflate (from Nodeca project)"});var Ns=vl((Pk,bf)=>{"use strict";bf.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var wf=vl((Lk,kf)=>{"use strict";function by(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}kf.exports=by});var _f=vl(xi=>{"use strict";var Ma=vf(),wi=fn(),ho=ks(),bl=Ns(),Ps=Ji(),ky=ws(),wy=wf(),xf=Object.prototype.toString;function ia(e){if(!(this instanceof ia))return new ia(e);this.options=wi.assign({chunkSize:16384,windowBits:0,to:""},e||{});var n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(e&&e.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)==0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ky,this.strm.avail_out=0;var t=Ma.inflateInit2(this.strm,n.windowBits);if(t!==bl.Z_OK)throw new Error(Ps[t]);if(this.header=new wy,Ma.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=ho.string2buf(n.dictionary):xf.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(t=Ma.inflateSetDictionary(this.strm,n.dictionary),t!==bl.Z_OK)))throw new Error(Ps[t])}ia.prototype.push=function(e,n){var t=this.strm,l=this.options.chunkSize,a=this.options.dictionary,o,s,u,f,d,m=!1;if(this.ended)return!1;s=n===~~n?n:n===!0?bl.Z_FINISH:bl.Z_NO_FLUSH,typeof e=="string"?t.input=ho.binstring2buf(e):xf.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new wi.Buf8(l),t.next_out=0,t.avail_out=l),o=Ma.inflate(t,bl.Z_NO_FLUSH),o===bl.Z_NEED_DICT&&a&&(o=Ma.inflateSetDictionary(this.strm,a)),o===bl.Z_BUF_ERROR&&m===!0&&(o=bl.Z_OK,m=!1),o!==bl.Z_STREAM_END&&o!==bl.Z_OK)return this.onEnd(o),this.ended=!0,!1;t.next_out&&(t.avail_out===0||o===bl.Z_STREAM_END||t.avail_in===0&&(s===bl.Z_FINISH||s===bl.Z_SYNC_FLUSH))&&(this.options.to==="string"?(u=ho.utf8border(t.output,t.next_out),f=t.next_out-u,d=ho.buf2string(t.output,u),t.next_out=f,t.avail_out=l-f,f&&wi.arraySet(t.output,t.output,u,f,0),this.onData(d)):this.onData(wi.shrinkBuf(t.output,t.next_out))),t.avail_in===0&&t.avail_out===0&&(m=!0)}while((t.avail_in>0||t.avail_out===0)&&o!==bl.Z_STREAM_END);return o===bl.Z_STREAM_END&&(s=bl.Z_FINISH),s===bl.Z_FINISH?(o=Ma.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===bl.Z_OK):(s===bl.Z_SYNC_FLUSH&&(this.onEnd(bl.Z_OK),t.avail_out=0),!0)};ia.prototype.onData=function(e){this.chunks.push(e)};ia.prototype.onEnd=function(e){e===bl.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=wi.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ls(e,n){var t=new ia(n);if(t.push(e,!0),t.err)throw t.msg||Ps[t.err];return t.result}function xy(e,n){return n=n||{},n.raw=!0,Ls(e,n)}xi.Inflate=ia;xi.inflate=Ls;xi.inflateRaw=xy;xi.ungzip=Ls});var Sf=vl((Ok,Tf)=>{"use strict";var _y=fn().assign,Cy=$h(),Ty=_f(),Sy=Ns(),Cf={};_y(Cf,Cy,Ty,Sy);Tf.exports=Cf});function Fa(e){$("#luckysheet-cell-loading").find("span").text(e).end().show()}function _i(){$("#luckysheet-cell-loading").hide()}var zs=Ie(()=>{});var $y,xe,Jt=Ie(()=>{xa();Ut();Kt();Yt();Nt();Xe();$y={deepCopyFlowDataState:!1,deepCopyFlowDataCache:"",deepCopyFlowDataWorker:null,deepCopyFlowData:function(e){let n=this;return n.deepCopyFlowDataState?(n.deepCopyFlowDataWorker!=null&&n.deepCopyFlowDataWorker.terminate(),n.deepCopyFlowDataCache):(e==null&&(e=h.flowdata),$.extend(!0,[],e))},webWorkerFlowDataCache:function(e){let n=this;try{n.deepCopyFlowDataWorker!=null&&n.deepCopyFlowDataWorker.terminate();let t="data:text/javascript;chartset=US-ASCII,onmessage = function (e) { postMessage(e.data); };";n.deepCopyFlowDataState=!1;let l;if(fr.isIE()==1){let a="self.onmessage=function(e){postMessage(e.data);}";l=new Worker("./plugins/Worker-helper.js"),l.postMessage(a)}else l=new Worker(t);n.deepCopyFlowDataWorker=l,l.postMessage(e),l.onmessage=function(a){n.deepCopyFlowDataCache=a.data,n.deepCopyFlowDataState=!0}}catch(t){n.deepCopyFlowDataCache=$.extend(!0,[],e)}},controlHandler:function(e,n){let l=this.deepCopyFlowData(h.flowdata),a=n||h.luckysheet_select_save[h.luckysheet_select_save.length-1],o=a.row==null?0:a.row[0],s=a.column==null?0:a.column[0],u=e.length,f=e[0].length,d=o+u-l.length,m=s+f-l[0].length;(d>0||m>0)&&(l=cl([].concat(l),d,m,!0));for(let g=0;g<u;g++){let y=[].concat(l[g+o]);for(let v=0;v<f;v++){let b="";e[g]!=null&&e[g][v]!=null&&(b=e[g][v]),y[v+s]=b}l[g+o]=y}d>0||m>0?Zl(l[0].length,l.length,l,null,h.luckysheet_select_save,"datachangeAll"):Ea(l,h.luckysheet_select_save)},clearRangeByindex:function(e,n,t,l,a){let o=Z(a),s=$.extend(!0,[],h.luckysheetfile[o].data);for(let u=e;u<=n;u++){let f=[].concat(s[u]);for(let d=t;d<=l;d++)p.delFunctionGroup(u,d),p.execFunctionGroup(u,d,""),f[d]=null;s[u]=f}if(a==h.currentSheetIndex){let u=n-e+1,f=l-t+1;u>5e3?Ze(s,[{row:[e,n],column:[t,l]}]):Ea(s,{row:[e,n],column:[t,l]})}else h.luckysheetfile[o].data=s},controlHandlerD:function(e){let t=this.deepCopyFlowData(h.flowdata),l=h.luckysheet_select_save[h.luckysheet_select_save.length-1],a=l.row[0],o=l.row[1],s=l.column[0],u=l.column[1],f=e.length,d=e[0].length,m=a+f-t.length,g=s+d-t[0].length;(m>0||g>0)&&(t=cl([].concat(t),m,g,!0));for(let v=a;v<=o;v++)for(let b=s;b<=u;b++)t[v][b]=null;for(let v=0;v<f;v++)for(let b=0;b<d;b++)t[a+v][s+b]=e[v][b];let y=[{row:[a,o],column:[s,u]},{row:[a,a+f-1],column:[s,s+d-1]}];Ze(t,y)}},xe=$y});function Ci(e){let n={};if(P(e)=="array")for(let t=0;t<e.length;t++){let l=e[t].r,a=e[t].c,o=e[t].f;if(h.flowdata[l][a]!=null&&h.flowdata[l][a].f!=null&&h.flowdata[l][a].f==o){l+"_"+a in n&&(n=Iy(n,l,a));let s=e[t].data,u=s.length,f=1;if(P(s[0])=="array"&&(f=s[0].length),Ry({row:[l,l+u-1],column:[a,a+f-1]},h.flowdata))for(let d=0;d<u;d++)for(let m=0;m<f;m++){let g=l+d,y=a+m;P(s[0])=="array"?n[g+"_"+y]={v:s[d][m],r:l,c:a}:n[g+"_"+y]={v:s[d],r:l,c:a}}else n[l+"_"+a]={v:"#SPILL!",r:l,c:a}}}return n}function Iy(e,n,t){let l=e[n+"_"+t].r,a=e[n+"_"+t].c;for(let o in e)o==l+"_"+a?e[o].v="#SPILL!":e[o].r==l&&e[o].c==a&&delete e[o];return e}function Ry(e,n){let t=e.row[0],l=e.row[1],a=e.column[0],o=e.column[1],s=!0;for(let u=t;u<=l;u++)for(let f=a;f<=o;f++)if(!(u==t&&f==a)&&n[u][f]!=null&&n[u][f].v!=null&&n[u][f].v.toString()!=""){s=!1;break}return s}function $f(e,n){let t=h.luckysheetfile[Z(h.currentSheetIndex)].dynamicArray==null?[]:h.luckysheetfile[Z(h.currentSheetIndex)].dynamicArray,l=Ci(t);if(e+"_"+n in l&&l[e+"_"+n].v!="#SPILL!"){let a=l[e+"_"+n].r,o=l[e+"_"+n].c,s=h.flowdata[a][o].f,u,f;for(let k=0;k<t.length;k++)t[k].f==s&&(u=t[k].data.length,P(t[k].data[0])=="array"?f=t[k].data[0].length:f=1);let d=a+u-1,m=o+f-1,g=h.visibledatarow[d],y=a-1==-1?0:h.visibledatarow[a-1],v=h.visibledatacolumn[m],b=o-1==-1?0:h.visibledatacolumn[o-1];$("#luckysheet-dynamicArray-hightShow").css({left:b,width:v-b-1,top:y,height:g-y-1,display:"block"})}else $("#luckysheet-dynamicArray-hightShow").hide()}var fo=Ie(()=>{ft();Nt();Xe()});function _r(e){let n;if(document.createRange)if(e.innerHTML!=e.innerText||e.innerHTML=="")e.focus(),n=window.getSelection(),n.selectAllChildren(e),n.collapseToEnd();else{let t=e.innerText.length;n=document.createRange(),n.selectNodeContents(e),n.setStart(e.childNodes[0],t),n.collapse(!0);let l=window.getSelection();l.removeAllRanges(),l.addRange(n)}else document.selection&&(n=document.body.createTextRange(),n.moveToElementText(e),n.collapse(!1),n.select())}function Cr(e){e.target.classList&&(e.target.classList.contains("luckysheet-cols-rows-shift-left")||e.target.classList.contains("luckysheet-cols-rows-shift-right"))||!$(e.target).hasClass("luckysheet-mousedown-cancel")&&$(e.target).filter("[class*='sp-palette']").length==0&&$(e.target).filter("[class*='sp-thumb']").length==0&&$(e.target).filter("[class*='sp-']").length==0&&($("#luckysheet-rightclick-menu").hide(),$("#luckysheet-cols-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide(),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu, #luckysheet-user-menu").hide(),$("body > .luckysheet-filter-menu, body > .luckysheet-filter-submenu, body > .luckysheet-cols-menu").hide(),h.luckysheet_cols_menu_status=!1)}function If(e){if(window.getSelection){let n=document.createRange();n.selectNodeContents(e),n.startContainer&&mo(n.startContainer)&&(window.getSelection().removeAllRanges(),window.getSelection().addRange(n))}else if(document.selection){let n=document.body.createTextRange();n.moveToElementText(e),n.select()}}function Rf(e){if(window.getSelection){let t=document.createRange();var n=e.firstChild;t.setStart(n,0),t.setEnd(n,n.length),t.startContainer&&mo(t.startContainer)&&(window.getSelection().removeAllRanges(),window.getSelection().addRange(t))}else if(document.selection){let t=document.body.createTextRange();t.moveToElementText(e),t.select()}}function Af(e,n){if(window.getSelection){let a=document.createRange();var t=e.firstChild,l=n.firstChild;a.setStart(t,0),a.setEnd(l,l.length),a.startContainer&&mo(a.startContainer)&&(window.getSelection().removeAllRanges(),window.getSelection().addRange(a))}}function Df(e,n){if(window.getSelection){let l=document.createRange();var t=e.firstChild;n>t.length?n=t.length:n<0&&(n=0),l.setStart(t,n),l.collapse(!0),l.startContainer&&mo(l.startContainer)&&(window.getSelection().removeAllRanges(),window.getSelection().addRange(l))}}function mo(e){return e===document.body?!1:document.body.contains(e)}var pn=Ie(()=>{Xe()});function _l(e){return e&&e.ct!=null&&e.ct.t=="inlineStr"&&e.ct.s!=null&&e.ct.s.length>0}function Na(e){return e!=null&&e.t=="inlineStr"&&e.s!=null&&e.s.length>0}function Ef(e,n,t,l){var a=window.getSelection(),o;a.type=="None"?o=h.inlineStringEditRange:o=a.getRangeAt(0);let s=o.commonAncestorContainer,u;s.id=="luckysheet-rich-text-editor"?u=$(s):u=$(s).closest("#luckysheet-rich-text-editor");let f=$(s).closest("#luckysheet-functionbox-cell");if(u.length==0&&f.length==0&&h.inlineStringEditRange!=null&&(o=h.inlineStringEditRange,s=o.commonAncestorContainer,s.id=="luckysheet-rich-text-editor"?u=$(s):u=$(s).closest("#luckysheet-rich-text-editor"),f=$(s).closest("#luckysheet-functionbox-cell")),o.collapsed===!0)return;let d=o.endContainer,m=o.startContainer,g=o.endOffset,y=o.startOffset;if(u.length>0){if(m===d){let v=m.parentNode,b,k=!1,w=v.innerText;u.html().substr(0,5)!="<span"&&(k=!0);let C="",S="",_="",T=0,A=y,R=g,I=w.length;C=w.substring(T,A),S=w.substring(A,R),_=w.substring(R,I);let F="";if(C!=""){let M=v.style.cssText;if(k){let E=$(v).closest("#luckysheet-input-box").get(0);E!=null&&(M=Bs(E.style.cssText,M))}F+="<span style='"+M+"'>"+C+"</span>"}if(S!=""){let M=po(v.style.cssText,n,t);if(k){let E=$(v).closest("#luckysheet-input-box").get(0);E!=null&&(M=Bs(E.style.cssText,M))}F+="<span style='"+M+"'>"+S+"</span>"}if(_!=""){let M=v.style.cssText;if(k){let E=$(v).closest("#luckysheet-input-box").get(0);E!=null&&(M=Bs(E.style.cssText,M))}F+="<span style='"+M+"'>"+_+"</span>"}m.parentNode.tagName=="SPAN"?(b=u.find("span").index(v),$(v).replaceWith(F)):(b=0,$(v).html(F));let z=0;T==A?z=b:z=b+1,Rf(u.find("span").get(z))}else if(m.parentNode.tagName=="SPAN"&&d.parentNode.tagName=="SPAN"){let v=m.parentNode,b,k=d.parentNode,w;b=u.find("span").index(v),w=u.find("span").index(k);let x=v.innerHTML,C=k.innerHTML,S="",_="",T="",A="",R=0,I=y,F=g,z=C.length;S=x.substring(R,I),_=x.substring(I,x.length),T=C.substring(0,F),A=C.substring(F,z);let M=u.find("span"),E=M.slice(b,w+1),N="";for(let V=0;V<b;V++){let q=M.get(V),W=q.innerHTML;N+="<span style='"+q.style.cssText+"'>"+W+"</span>"}if(S!=""&&(N+="<span style='"+v.style.cssText+"'>"+S+"</span>"),_!=""){let V=po(v.style.cssText,n,t);N+="<span style='"+V+"'>"+_+"</span>"}if(b<w)for(let V=b+1;V<w;V++){let q=M.get(V),W=q.innerHTML,X=po(q.style.cssText,n,t);N+="<span style='"+X+"'>"+W+"</span>"}if(T!=""){let V=po(k.style.cssText,n,t);N+="<span style='"+V+"'>"+T+"</span>"}A!=""&&(N+="<span style='"+k.style.cssText+"'>"+A+"</span>");for(let V=w+1;V<M.length;V++){let q=M.get(V),W=q.innerHTML;N+="<span style='"+q.style.cssText+"'>"+W+"</span>"}u.html(N);let L,O;R==I?(L=b,O=w):(L=b+1,O=w+1),M=u.find("span"),Af(M.get(L),M.get(O))}}else f.length>0}function Nf(e){var n=window.getSelection();if(n.type=="None")return;var t=n.getRangeAt(0);let l=t.commonAncestorContainer,a;l.id=="luckysheet-rich-text-editor"?a=$(l):a=$(l).closest("#luckysheet-rich-text-editor");let o=$(l).closest("#luckysheet-functionbox-cell"),s=t.endContainer,u=t.startContainer,f=t.endOffset,d=t.startOffset;if(a.length>0){let m=u.parentNode;u.id=="luckysheet-rich-text-editor"&&(m=$(u).find("span"),m.length==0&&(u.innerHTML=`<span>${u.innerText}</span>`,m=$(u).find("span")),m=m.get(m.length-1),d=m.innerHTML.length),t.collapsed===!1&&t.deleteContents();let g=m.innerText,y="",v="",b=0,k=d;y=g.substring(b,k),v=g.substring(k,g.length);let w,x;if(u.parentNode.tagName=="SPAN"){let C=a.find("span");if(w=C.index(m),w==C.length-1&&v==""){let S=C[w].innerHTML;S.substr(S.length-1,1)==` |
| | | `?x="<span style='"+m.style.cssText+"'>"+y+` |
| | | </span>`:x="<span style='"+m.style.cssText+"'>"+y+` |
| | | |
| | |
| | | `+v+"</span>";$(m).replaceWith(x)}else{let C=m.style.cssText;if(v==""?x="<span style='"+C+"'>"+y+` |
| | | |
| | | </span>`:x="<span style='"+C+"'>"+y+` |
| | | `+v+"</span>",u.id=="luckysheet-rich-text-editor"){$(m).replaceWith(x);let S=a.find("span");w=S.length-1,f=S.get(w).innerHTML.length-1}else $(m).html(x),w=0}Ad(a.find("span").get(w),f+1)}else o.length>0}function Nd(e,n,t){if(e.ct==null)return;let l=e.ct.s;if(l!=null)for(let a=0;a<l.length;a++){let o=l[a];o[n]=t}}function Pd(e){let n=[],t,l=null;for(let a=0;a<e.length;a++){let o=e.get(a),s=Os(o.style.cssText),u=JSON.stringify(s),d=o.innerText;d=d.replace(/\n/g,`\r |
| | | `),u==l?t.v+=d:(s.v=d,n.push(s),l=u,t=s)}return n}function Os(e){if(e==null||e.length==0)return{};let n=e.split(";"),t=Q(),l=t.fontarray,a=t.fontjson,o={ff:l[0],fc:"#000000",fs:10,cl:0,un:0,bl:0,it:0};return n.forEach(s=>{s=s.toLowerCase();let u=Pl(s.substr(0,s.indexOf(":"))),d=Pl(s.substr(s.indexOf(":")+1));if(u=="font-weight"&&(d=="bold"?o.bl=1:o.bl=0),u=="font-style"&&(d=="italic"?o.it=1:o.it=0),u=="font-family"){let f=a[d];f==null?o.ff=d:o.ff=f}u=="font-size"&&(o.fs=parseInt(d)),u=="color"&&(o.fc=d),u=="text-decoration"&&(o.cl=1),u=="border-bottom"&&(o.un=1),u=="lucky-strike"&&(o.cl=d),u=="lucky-underline"&&(o.un=d)}),o}function zd(e,n){let t=e.split(";");if(n==null||n.length==0)return e;if(e.indexOf(n)>-1)for(let l=0;l<t.length;l++){let a=t[l];a=a.toLowerCase();let o=Pl(a.substr(0,a.indexOf(":"))),s=Pl(a.substr(a.indexOf(":")+1));if(o==n)return s}return""}function Ay(e,n,t){let l=e.split(";"),a="";if(n==null||n.length==0)return e;if(e.indexOf(n)>-1)for(let o=0;o<l.length;o++){let s=l[o];s=s.toLowerCase();let u=Pl(s.substr(0,s.indexOf(":"))),d=Pl(s.substr(s.indexOf(":")+1));u==n?a+=u+":"+t+";":u.length>0&&(a+=u+":"+d+";")}else n.length>0&&(e+=n+":"+t+";",a=e);return a}function Dy(e,n){let t=e.split(";"),l="",a=n;if(n==null||n.length==0)return e;if(n in Ld&&(n=Ld[n]),e.indexOf(n)>-1)for(let o=0;o<t.length;o++){let s=t[o];s=s.toLowerCase();let u=Pl(s.substr(0,s.indexOf(":"))),d=Pl(s.substr(s.indexOf(":")+1));u==n||a=="cl"&&u=="lucky-strike"||a=="un"&&u=="lucky-underline"||u.length>0&&(l+=u+":"+d+";")}else l=e;return l}function po(e,n,t){let l={};if(l[n]=t,n=="un"){let u=zd(e,"color");u==""&&(u="#000000");let d=zd(e,"font-size");d==""&&(d=11),d=parseInt(d),l._fontSize=d,l._color=u}let a=Ti(l,void 0,void 0,!1),o=Pl(a.substr(0,a.indexOf(":"))),s=Pl(a.substr(a.indexOf(":")+1));return s=s.substr(0,s.length-1),e=Dy(e,n),e=Ay(e,o,s),e}function Bs(e,n,t=!0){let l=e.split(";"),a=n.split(";"),o="",s={};for(let u=0;u<l.length;u++){let d=l[u],f=!0;d=d.toLowerCase();let m=Pl(d.substr(0,d.indexOf(":")));if(m=="font-size")continue;let g=Pl(d.substr(d.indexOf(":")+1));if(!(t&&!(m in Md))){for(let y=0;y<a.length;y++){let v=a[y];v=v.toLowerCase();let b=Pl(v.substr(0,v.indexOf(":"))),k=Pl(v.substr(v.indexOf(":")+1));if(m==b){o+=b+":"+k+";",f=!1;continue}}f&&(o+=m+":"+g+";"),s[m]=1}}for(let u=0;u<a.length;u++){let d=a[u];d=d.toLowerCase();let f=Pl(d.substr(0,d.indexOf(":"))),m=Pl(d.substr(d.indexOf(":")+1));t&&!(f in Md)||f in s||(o+=f+":"+m+";")}return o}var Dd,Md,Ld,gn=Ie(()=>{Kt();pn();bt();Xe();Dd={bl:1,it:1,ff:1,cl:1,un:1,fs:1,fc:1},Md={"font-weight":1,"font-style":1,"font-family":1,"text-decoration":1,"border-bottom":1,"font-size":1,color:1};Ld={bl:"font-weight",it:"font-style",ff:"font-family",fs:"font-size",fc:"color",cl:"text-decoration",un:"border-bottom"}});function Pt(e,n){if(e==null&&(e=h.luckysheet_select_save[0]),e.row==null||e.row.length==0)return[];let t,l;n!=null&&n!=h.currentSheetIndex?(t=h.luckysheetfile[Z(n)].data,l=h.luckysheetfile[Z(n)].config):(t=xe.deepCopyFlowData(h.flowdata),l=h.config);let a=[];for(let o=e.row[0];o<=e.row[1];o++){if(t[o]==null||l.rowhidden!=null&&l.rowhidden[o]!=null)continue;let s=[];for(let u=e.column[0];u<=e.column[1];u++)s.push(t[o][u]);a.push(s)}return a}function Si(e,n){if(n==null||n.row==null||n.row.length==0)return[];let t=Ci(h.luckysheetfile[Z(h.currentSheetIndex)].dynamicArray),l=[];if(e==null)return l;for(let a=n.row[0];a<=n.row[1];a++){if(e[a]==null)continue;let o=[];for(let s=n.column[0];s<=n.column[1];s++){let u;a+"_"+s in t?u=t[a+"_"+s]:u=e[a][s],o.push(u)}l.push(o)}return l}function Od(e){if(e==null||e.row==null||e.row.length==0)return[];let n=[];for(let t=e.row[0];t<=e.row[1];t++){let l=[];if(!(h.config.rowhidden!=null&&h.config.rowhidden[t]!=null)){for(let a=e.column[0];a<=e.column[1];a++){let o="";h.flowdata[t]!=null&&h.flowdata[t][a]!=null&&(o=h.flowdata[t][a]),l.push(o)}n.push(l)}}return n}function ze(e,n,t,l){l==null&&(l="v"),t==null&&(t=h.flowdata);let a;if(e!=null&&n!=null)a=t[e][n];else if(e!=null)a=t[e];else if(n!=null)a=t[0].map(function(u,d){return t.map(function(f){return f[d]})})[n];else return t;let o=a;return P(a)=="object"&&(o=a[l],l=="f"&&o!=null?o=p.functionHTMLGenerate(o):l=="f"?o=a.v:a&&a.ct&&a.ct.t=="d"&&(o=a.m)),o==null&&(o=null),o}function cl(e,n,t,l){if(n<=0&&t<=0)return e;n<=0&&(n=0),t<=0&&(t=0);let a=0;e.length==0?(e=[],a=0):a=e[0].length;let o=[];for(let u=0;u<t;u++)o.push(null);let s=[];for(let u=0;u<a+t;u++)s.push(null);for(let u=0;u<e.length;u++)e[u]=[].concat(e[u].concat(o));for(let u=0;u<n;u++)e.push([].concat(s));return l&&(ne.saveParam("all",h.currentSheetIndex,e.length,{k:"row"}),ne.saveParam("all",h.currentSheetIndex,e[0].length,{k:"column"})),e}function zl(e,n,t,l){let a;return l!=null?a=l[e][n]:a=My(e,n,t),a==null?null:a.f}function My(e,n,t){if(e==null||n==null)return;let l;if(t==null?l=h.flowdata:l=ve.getSheetByIndex(t).data,!(!l||!l[e]||!l[e][n]))return l[e][n]}function Hs(e,n){let t=ze(e,n,null,"m");if(t==null&&(t=ze(e,n),t==null)){let l=ze(e,n,null,"ct");Na(l)&&(t=l.s)}return t}function Bd(e,n){let t=ze(e,n,null,"ct");if(Na(t)){let l=t.s,a="";for(let o=0;o<l.length;o++){let s=l[o];s.v!=null&&(a+=s.v)}return a}return""}function Hd(e,n,t){let l=ze(e,n,t,"ct");t==null&&(t=h.flowdata);let a=t[e][n];if(Na(l)){let o=l.s,s="";for(let u=0;u<o.length;u++){let d=o[u];if(d.v!=null){let f=Ti(d);s+="<span index='"+u+"' style='"+f+"'>"+d.v+"</span>"}}return s}return""}function Ti(e,n,t,l=!0){if(e==null)return;let a="",s=Q().fontarray;for(let u in e){let d=e[u];if(l&&(d=Tr(e,u)),u=="bl"&&d!="0"&&(a+="font-weight: bold;"),u=="it"&&d!="0"&&(a+="font-style:italic;"),u=="ff"){let f=d;isNaN(parseInt(d))?f=d:f=s[parseInt(d)],a+="font-family: "+f+";"}u=="fs"&&(a+="font-size: "+d+"pt;"),(u=="fc"&&d!="#000000"||n!=null||t!=null&&t.textColor!=null)&&(t!=null&&t.textColor!=null?a+="color: "+t.textColor+";":n!=null?a+="color: "+n[0]+";":a+="color: "+d+";"),u=="cl"&&d!="0"&&(a+="text-decoration: line-through;")}return a}function Tr(e,n){let t=e;return n in{bl:1,it:1,ff:1,cl:1,un:1}||n=="fs"&&_l(e)?t==null?t="0":(t=t[n],t==null&&(t="0")):n=="fc"?t==null?t="#000000":(t=t[n],t==null&&(t="#000000"),t.indexOf("rgba")>-1&&(t=zn(t))):n=="bg"?t==null?t=null:(t=t[n],t==null?t=null:t.toString().indexOf("rgba")>-1&&(t=zn(t))):n.substr(0,2)=="bs"?t==null?t="none":(t=t[n],t==null&&(t="none")):n.substr(0,2)=="bc"?t==null?t="#000000":(t=t[n],t==null&&(t="#000000")):n=="ht"?(t==null?t="1":(t=t[n],t==null&&(t="1")),["0","1","2"].indexOf(t.toString())==-1&&(t="1")):n=="vt"?(t==null?t="0":(t=t[n],t==null&&(t="0")),["0","1","2"].indexOf(t.toString())==-1&&(t="0")):n=="ct"?t==null?t=null:(t=t[n],t==null&&(t=null)):n=="fs"?t==null?t=String(h.defaultFontSize):(t=t[n],t==null&&(t=String(h.defaultFontSize))):n=="tb"||n=="tr"?t==null?t="0":(t=t[n],t==null&&(t="0")):n=="rt"&&(t==null?t=null:(t=t[n],t==null&&(t=null))),t}function Pl(e){return e==null||e.length==0?e:e.replace(/^\s+|\s+$/gm,"")}var Kt=Ie(()=>{dt();Nt();Qt();Ut();Jt();fo();fl();gn();bt();Xe()});function Fy(e,n){let t=0,l=e.length-1;for(;t<=l;){let a=parseInt((l+t)/2);if(n<e[a]&&(a==0||n>=e[a-1]))return a;if(n>=e[a])t=a+1;else if(n<e[a])l=a-1;else return-1}}function Ey(e,n){let t=0,l=0,a=0,o=-1,s=e.length-1;for(;t<e.length&&s>=0&&s>=t;){if(l=e[s],s==0?a=0:a=e[s-1],n>=a&&n<l){o=s;break}if(l=e[t],t==0?a=0:a=e[t-1],n>=a&&n<l){o=t;break}t++,s--}return o}function st(e,n){let t=e.length-1;return e.length<40||n<=e[20]||n>=e[t-20]?t=Ey(e,n):t=Fy(e,n),t}var Lr=Ie(()=>{});function tl(e){let n=0,t=0;return n=h.visibledatarow[e],e==0?t=0:t=h.visibledatarow[e-1],[t,n,e]}function _t(e){let n=st(h.visibledatarow,e);return n==-1&&e>0?n=h.visibledatarow.length-1:n==-1&&e<=0&&(n=0),tl(n)}function At(e){let n=0,t=0;return n=h.visibledatacolumn[e],e==0?t=0:t=h.visibledatacolumn[e-1],[t,n,e]}function Vd(e,n){let t=0,l=0;return t=h.visibledatacolumn[e+n-1],e==0?l=0:l=h.visibledatacolumn[e-1],[l,t,e]}function wt(e){let n=st(h.visibledatacolumn,e);return n==-1&&e>0?n=h.visibledatacolumn.length-1:n==-1&&e<=0&&(n=0),At(n)}function nt(e,n){let t=$("#"+h.container).offset(),l=e-t.left-h.rowHeaderWidth,a=n-t.top-h.infobarHeight-h.toolbarHeight-h.calculatebarHeight-h.columnHeaderHeight;return[l,a]}var Ol=Ie(()=>{Lr();Xe()});function yl(e,n,t,l){var s;let a=$.extend(!0,{},l);a.rowlen==null&&(a.rowlen={}),a.customHeight==null&&(a.customHeight={});let o=$("#luckysheetTableContent").get(0).getContext("2d");o.textBaseline="top";for(let u=n;u<=t;u++){if(a.rowhidden!=null&&a.rowhidden[u]!=null)continue;let d=h.defaultrowlen;if(a.customHeight[u]!=1){delete a.rowlen[u];for(let f=0;f<e[u].length;f++){let m=e[u][f];if(m!=null&&m!=null&&(m.v!=null||_l(m))){let g;if(m.mc)if(f===m.mc.c){let b=At(f)[0];g=At(m.mc.c+m.mc.cs-1)[1]-b-2}else continue;else g=At(f)[1]-At(f)[0]-2;let y=Sr(m,o,{r:u,c:f,cellWidth:g}),v=0;y!=null&&(v=y.textHeightAll+2),v>d&&(d=v)}}d=d/h.zoomRatio,d!=h.defaultrowlen?a.rowlen[u]=d:((s=l.rowlen)==null?void 0:s[u])&&(a.rowlen[u]=l.rowlen[u])}}return a}function qd(e,n){let t=0,l=$("#luckysheetTableContent").get(0).getContext("2d");l.textBaseline="top";for(let a=0;a<e[n].length;a++){let o=e[n][a];if(o!=null&&!(o.mc!=null&&o.mc.rs!==1)&&!(h.config.colhidden!=null&&h.config.colhidden[a]!=null)&&o!=null&&(o.v!=null||_l(o))){let s=Ny(o,a),u=Sr(o,l,{r:n,c:a,cellWidth:s}),d=0;u!=null&&(d=u.textHeightAll+2),d>t&&(t=d)}}return t}function Ny(e,n){let t=At(n);return e.mc&&e.mc.cs!==1&&(t=Vd(n,e.mc.cs)),t[1]-t[0]-2}function jd(e,n,t){let l=0,a=go(t,n),o=$("#luckysheetTableContent").get(0).getContext("2d");o.textBaseline="top";for(var s=0;s<e.length;s++){var u=e[s][n];if(u!=null&&(u.v!=null||_l(u))){let d=a[n],f=Sr(u,o,{r:s,c:n,cellHeight:d}),m=0;f!=null&&(m=f.textWidthAll+2),m>l&&(l=m)}}return l}function go(e,n){let t=[],l=0;for(let a=0;a<e;a++){let o=h.defaultrowlen;if(n.rowlen!=null&&n.rowlen[a]!=null&&(o=n.rowlen[a]),n.rowhidden!=null&&n.rowhidden[a]!=null){o=n.rowhidden[a],t.push(l);continue}else l+=o+1;t.push(l)}return t}function zr(e,n,t){let l=h.measureTextCache[e+"_"+n.font];if(t!=null&&(l=h.measureTextCache[e+"_"+t]),l!=null)return l;{if(t!=null){let s=n.font;n.font=t}let a=n.measureText(e),o={};if(o.width=a.width,t!=null&&(n.font=t),o.actualBoundingBoxDescent=a.actualBoundingBoxDescent,o.actualBoundingBoxAscent=a.actualBoundingBoxAscent,o.actualBoundingBoxDescent==null||o.actualBoundingBoxAscent==null||isNaN(o.actualBoundingBoxDescent)||isNaN(o.actualBoundingBoxAscent)){let s="M";In(e)&&(s="\u7530");let u=ke.getTextSize(s,n.font)[1]*.8;n.textBaseline=="top"?(o.actualBoundingBoxDescent=u,o.actualBoundingBoxAscent=0):n.textBaseline=="middle"?(o.actualBoundingBoxDescent=u/2,o.actualBoundingBoxAscent=u/2):(o.actualBoundingBoxDescent=0,o.actualBoundingBoxAscent=u)}if(n.textBaseline=="alphabetic"){let s="gjpqy",u="abcdABCD",d=h.measureTextCache[s+"_"+n.font];t!=null&&(d=h.measureTextCache[s+"_"+t]);let f=h.measureTextCache[u+"_"+n.font];t!=null&&(f=h.measureTextCache[u+"_"+t]),d==null&&(d=n.measureText(s)),f==null&&(f=n.measureText(u)),o.actualBoundingBoxDescent<=f.actualBoundingBoxDescent&&(o.actualBoundingBoxDescent=d.actualBoundingBoxDescent,o.actualBoundingBoxDescent==null&&(o.actualBoundingBoxDescent=0))}return o.width*=h.zoomRatio,o.actualBoundingBoxDescent*=h.zoomRatio,o.actualBoundingBoxAscent*=h.zoomRatio,h.measureTextCache[e+"_"+h.zoomRatio+"_"+n.font]=o,o}}function Py(e){return e.measureText("\u7530").actualBoundingBoxAscent!=null}function Sr(e,n,t){let l=t.cellWidth,a=t.cellHeight,o="",s="";l==null&&(o="onlyWidth",s="_");let u=h.measureTextCellInfoCache[t.r+"_"+t.c+s+o];if(u!=null)return u;let d=t.space_width,f=t.space_height;d==null&&(d=2),f==null&&(f=2);let m=Tr(e,"ht"),g=Tr(e,"vt"),y=Tr(e,"tb"),v=Tr(e,"tr"),b=Tr(e,"rt"),k=1,w=0;b==null&&(v=="0"?b=0:v=="1"?b=45:v=="4"?b=90:v=="2"?b=135:v=="5"&&(b=180),b==null&&(b=0)),(b>180||b<0)&&(b=0),b=parseInt(b),b>90&&(b=90-b,k=0,w=1),n.textAlign="start";let x={};x.values=[];let C,S="0",_="0",T=11,A=!1,R,I=[];if(_l(e)){let F=e.ct.s,z=0;for(let M=0;M<F.length;M++){let E=F[M],N=oa(E),L=E.fc,O=E.cl,V=E.un,q=E.v,W=E.fs;q=q.replace(/\r\n/g,"_x000D_").replace(/ /g,"_x000D_").replace(/\r/g,"_x000D_").replace(/\n/g,"_x000D_");let X=q.split("_x000D_");for(let te=0;te<X.length;te++){let le=X[te];if(le==""&&te!=X.length-1)I.push({fontset:N,fc:L==null?"#000":L,cl:O==null?0:O,un:V==null?0:V,wrap:!0,fs:W==null?11:W}),z++;else{let oe=le.split("");for(let se=0;se<oe.length;se++){let ce=oe[se];I.push({fontset:N,fc:L==null?"#000":L,cl:O==null?0:O,un:V==null?0:V,v:ce,si:z,fs:W==null?11:W})}te!=X.length-1&&(I.push({fontset:N,fc:L==null?"#000":L,cl:O==null?0:O,un:V==null?0:V,wrap:!0,fs:W==null?11:W}),z++)}}z++}A=!0}else if(C=oa(e),n.font=C,S=Tr(e,"cl"),_=Tr(e,"un"),T=Tr(e,"fs"),e instanceof Object?(R=e.m,R==null&&(R=e.v)):R=e,me(R))return null;if(v=="3"){n.textBaseline="top";let F=0,z=0,M=0,E=0,N={},L=[];if(A){let q=null;for(let W=0;W<I.length;W++){let X=I[W],te=X.v,le=X.v;if(X.wrap===!0&&(te="M",le="",q!=null&&q.wrap!==!0&&W<I.length-1)){L.push(E),E=0,M+=1,q=X;continue}let oe=zr(te,n,X.fontset),se=oe.width+d,ce=oe.actualBoundingBoxAscent+oe.actualBoundingBoxDescent+f;E+=ce,y=="2"&&!X.wrap&&E>a&&N[M]!=null&&(L.push(E-ce),E=ce,M+=1),W==I.length-1&&L.push(E),N[M]==null&&(N[M]=[]);let he={content:le,style:X,width:se,height:ce,left:0,top:0,colIndex:M,asc:oe.actualBoundingBoxAscent,desc:oe.actualBoundingBoxDescent,inline:!0};X.wrap===!0&&(he.wrap=!0),N[M].push(he),console.log("normal",W,M,X,q,N),q=X}}else{let q=zr(R,n),W=q.actualBoundingBoxDescent+q.actualBoundingBoxAscent;R=R.toString();let X=[];R.length>1?X=R.split(""):X.push(R);let te=zr(X[0],n).width;for(let le=0;le<X.length;le++){let oe=te+d,se=W+f;E+=se,y=="2"&&E>a&&N[M]!=null&&(L.push(E-se),E=se,M+=1),le==X.length-1&&L.push(E),N[M]==null&&(N[M]=[]),N[M].push({content:X[le],style:C,width:oe,height:se,left:0,top:0,colIndex:M,asc:q.actualBoundingBoxAscent,desc:q.actualBoundingBoxDescent})}}let O=[];for(let q=0;q<L.length;q++){let W=L[q],X=N[q],te=0;for(let le=0;le<X.length;le++){let oe=X[le];te=Math.max(te,oe.width)}O.push(te),F+=te,z=Math.max(z,W)}if(x.type="verticalWrap",x.textWidthAll=F,x.textHeightAll=z,o=="onlyWidth")return x;let V=0;for(let q=0;q<L.length;q++){let W=L[q],X=O[q],te=N[q],le=0;for(let oe=0;oe<te.length;oe++){let se=te[oe],ce=d+V;m=="0"?ce=l/2+V-F/2+d*L.length:m=="2"&&(ce=l+V-F+d);let he=a-f+le-W;g=="0"?he=a/2+le-W/2:g=="1"&&(he=f+le),le+=se.height,se.left=ce,se.top=he,$i(se,S,_,{width:X,height:se.height,left:ce,top:he+se.height-f,asc:se.height,desc:0,fs:T}),x.values.push(se)}V+=X}}else{let F=Py(n);if(F?n.textBaseline="alphabetic":n.textBaseline="bottom",y=="2"||A){let z=0,M=0,E=0,N=0,L=0,O={},V=[];x.rotate=b,b=Math.abs(b);let q=0,W=0,X=0,te,le,oe,se,ce=1,he={},ue=null,K=null;if(A)for(;ce<=I.length;){let Ne=I.slice(q,ce);if(Ne[Ne.length-1].wrap===!0){if(q=ce,Ne.length>1)for(let qe=0;qe<Ne.length-1;qe++){let Se=Ne[qe],Ke={content:Se.v,style:Se,width:Se.measureText.width,height:Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.measureText.actualBoundingBoxAscent,desc:Se.measureText.actualBoundingBoxDescent,inline:!0,fs:Se.fs};O[N].push(Ke)}if(Ne.length==1||ce==I.length){let qe=Ne[0],Se=zr("M",n,qe.fontset);O[N]==null&&(O[N]=[]),O[N].push({content:"",style:qe,width:Se.width,height:Se.actualBoundingBoxAscent+Se.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.actualBoundingBoxAscent,desc:Se.actualBoundingBoxDescent,inline:!0,wrap:!0,fs:qe.fs})}N+=1,ce++;continue}let et=0,vt=0;for(let qe=0;qe<Ne.length;qe++){let Se=Ne[qe];Se.measureText==null&&(Se.measureText=zr(Se.v,n,Se.fontset)),et+=Se.measureText.width,vt=Math.max(Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent)}let It=et*Math.cos(b*Math.PI/180)+vt*Math.sin(b*Math.PI/180),ot=et*Math.sin(b*Math.PI/180)+vt*Math.cos(b*Math.PI/180),kt=Ne[Ne.length-1];if((kt.v==" "||es(kt.v)==2)&&(K=ce),b!=0)if(console.log(ot,f,a,Ne,ot+f>a),ot+f>a&&O[N]!=null&&y=="2"&&ce!=I.length)if(K!=null&&K<ce){for(let qe=0;qe<K-q;qe++){let Se=Ne[qe];O[N].push({content:Se.v,style:Se,width:Se.measureText.width,height:Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.measureText.actualBoundingBoxAscent,desc:Se.measureText.actualBoundingBoxDescent,inline:!0,fs:Se.fs})}q=K,ce=K+1,N+=1,K=null}else{q=ce-1;for(let qe=0;qe<Ne.length-1;qe++){let Se=Ne[qe];O[N].push({content:Se.v,style:Se,width:Se.measureText.width,height:Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.measureText.actualBoundingBoxAscent,desc:Se.measureText.actualBoundingBoxDescent,inline:!0,fs:Se.fs})}N+=1}else if(ce==I.length){O[N]==null&&(O[N]=[]);for(let qe=0;qe<Ne.length;qe++){let Se=Ne[qe];O[N].push({content:Se.v,style:Se,width:Se.measureText.width,height:Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.measureText.actualBoundingBoxAscent,desc:Se.measureText.actualBoundingBoxDescent,inline:!0,fs:Se.fs})}break}else O[N]==null&&(O[N]=[]),ce++;else if(It+d>l&&O[N]!=null&&y=="2"&&ce!=I.length)if(K!=null&&K<ce){for(let qe=0;qe<K-q;qe++){let Se=Ne[qe];O[N].push({content:Se.v,style:Se,width:Se.measureText.width,height:Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.measureText.actualBoundingBoxAscent,desc:Se.measureText.actualBoundingBoxDescent,inline:!0,fs:Se.fs})}q=K,ce=K+1,N+=1,K=null}else{q=ce-1;for(let qe=0;qe<Ne.length-1;qe++){let Se=Ne[qe];O[N].push({content:Se.v,style:Se,width:Se.measureText.width,height:Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.measureText.actualBoundingBoxAscent,desc:Se.measureText.actualBoundingBoxDescent,inline:!0,fs:Se.fs})}N+=1}else if(ce==I.length){O[N]==null&&(O[N]=[]);for(let qe=0;qe<Ne.length;qe++){let Se=Ne[qe];O[N].push({content:Se.v,style:Se,width:Se.measureText.width,height:Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.measureText.actualBoundingBoxAscent,desc:Se.measureText.actualBoundingBoxDescent,inline:!0,fs:Se.fs})}break}else O[N]==null&&(O[N]=[]),ce++}else for(R=R.toString();ce<=R.length;){let Ne=R.substring(q,ce),et=zr(Ne,n),vt=et.width,It=et.actualBoundingBoxAscent+et.actualBoundingBoxDescent,ot=vt*Math.cos(b*Math.PI/180)+It*Math.sin(b*Math.PI/180),kt=vt*Math.sin(b*Math.PI/180)+It*Math.cos(b*Math.PI/180),qe=Ne.substr(Ne.length-1,1);if((qe==" "||es(qe)==2)&&se!=null&&(ue={index:ce,str:te+qe,width:oe,height:le,asc:se.actualBoundingBoxAscent,desc:se.actualBoundingBoxDescent}),b!=0)if(kt+f>a&&O[N]!=null&&ce!=R.length)ue!=null&&ue.index<ce?(q=ue.index,ce=ue.index+1,O[N].push({content:ue.str,style:C,width:ue.width,height:ue.height,left:0,top:0,splitIndex:N,asc:ue.asc,desc:ue.desc,fs:T}),N+=1,ue=null):(q=ce-1,O[N].push({content:te,style:C,left:0,top:0,splitIndex:N,height:le,width:oe,asc:et.actualBoundingBoxAscent,desc:et.actualBoundingBoxDescent,fs:T}),N+=1);else if(ce==R.length){O[N]==null&&(O[N]=[]),O[N].push({content:Ne,style:C,left:0,top:0,splitIndex:N,height:It,width:vt,asc:et.actualBoundingBoxAscent,desc:et.actualBoundingBoxDescent,fs:T});break}else O[N]==null&&(O[N]=[]),ce++;else if(ot+d>l&&O[N]!=null&&ce!=R.length)ue!=null&&ue.index<ce?(q=ue.index,ce=ue.index+1,O[N].push({content:ue.str,style:C,width:ue.width,height:ue.height,left:0,top:0,splitIndex:N,asc:ue.asc,desc:ue.desc,fs:T}),N+=1,ue=null):(ue=null,q=ce-1,O[N].push({content:te,style:C,width:oe,height:le,left:0,top:0,splitIndex:N,asc:et.actualBoundingBoxAscent,desc:et.actualBoundingBoxDescent,fs:T}),N+=1);else if(ce==R.length){O[N]==null&&(O[N]=[]),O[N].push({content:Ne,style:C,width:vt,height:It,left:0,top:0,splitIndex:N,asc:et.actualBoundingBoxAscent,desc:et.actualBoundingBoxDescent,fs:T});break}else O[N]==null&&(O[N]=[]),ce++;te=Ne,le=It,oe=vt,se=et}let G=[],ee=0,pe=Object.keys(O).length;for(let Ne=0;Ne<pe;Ne++){let et=O[Ne];if(et==null)continue;let vt=0,It=0,ot=0,kt=0,qe=0,Se=0;for(let Ke=0;Ke<et.length;Ke++){let Fe=et[Ke];b!=0,vt+=Fe.width,It=Math.max(It,Fe.height-(F?Fe.desc:0)),ot=Math.max(ot,F?Fe.desc:0),kt=Math.max(kt,Fe.asc),Se++}qe=It/2,ee=Math.max(ee,Se),b!=0?(It+=qe,E=Math.max(E,vt),M+=It):(It+=qe,z=Math.max(z,vt),M+=It),G.push({width:vt,height:It,desc:ot,asc:kt,lineHeight:qe,wordCount:Se})}let ae=0,Te=0,ie=b*Math.PI/180,Ee=G[pe-1],je=Ee.lineHeight;M=M-je+Ee.desc;let Ce=M/Math.sin(ie)+E*Math.cos(ie),Le=E*Math.sin(ie),Ge=0;if(b!=0?(pe==1?(z=E+2*(M/Math.tan(ie)),Ge=M/Math.tan(ie)):z=E+M/Math.tan(ie),x.textWidthAll=Ce,x.textHeightAll=Le):(x.textWidthAll=z,x.textHeightAll=M),o=="onlyWidth")return x;if(b!=0&&k=="1"){n.textAlign="end";for(let Ne=0;Ne<pe;Ne++){let et=O[Ne];if(et==null)continue;let vt=G[Ne];Te=0;for(let It=et.length-1;It>=0;It--){let ot=et[It],kt,qe;if(b!=0){let Se,Ke=ae+vt.asc;if(Se=ae/Math.tan(ie)-Te+E,m=="0"){let Fe=M/Math.sin(ie);g=="0"?(kt=Se+l/2-z/2+je*Math.cos(ie)/2,qe=Ke+a/2-M/2-je*Math.cos(ie)/2):g=="1"?(kt=Se+l/2-z/2,qe=Ke-(M/2-Le/2)):g=="2"&&(kt=Se+l/2-z/2+je*Math.cos(ie),qe=Ke+a-Le/2-M/2-je*Math.cos(ie))}else m=="1"?g=="0"?(kt=Se-Le*Math.sin(ie)/2+je*Math.cos(ie)/2,qe=Ke+a/2+Le*Math.cos(ie)/2-je*Math.cos(ie)/2):g=="1"?(kt=Se-Le*Math.sin(ie),qe=Ke+Le*Math.cos(ie)):g=="2"&&(kt=Se+je*Math.cos(ie),qe=Ke+a-je*Math.cos(ie)):m=="2"&&(g=="0"?(kt=Se+l-Ce/2-(E/2+M/2/Math.tan(ie))+je*Math.cos(ie)/2,qe=Ke+a/2-M/2-je*Math.cos(ie)/2):g=="1"?(kt=Se+l-z+Ge,qe=Ke-M):g=="2"&&(kt=Se+l-Ce*Math.cos(ie)+je*Math.cos(ie),qe=Ke+a-Ce*Math.sin(ie)-je*Math.cos(ie)))}ot.left=kt,ot.top=qe,$i(ot,S,_,{width:ot.width,height:ot.height,left:kt-ot.width,top:qe,asc:vt.asc,desc:vt.desc,fs:ot.fs}),x.values.push(ot),Te+=ot.width}ae+=vt.height}}else for(let Ne=0;Ne<pe;Ne++){let et=O[Ne];if(et==null)continue;let vt=G[Ne];Te=0;for(let It=0;It<et.length;It++){let ot=et[It],kt,qe;if(b!=0){let Se,Ke=ae+vt.asc;if(Se=(M-ae)/Math.tan(ie)+Te,m=="0"){let Fe=M/Math.sin(ie);g=="0"?(kt=Se+l/2-z/2-je*Math.cos(ie)/2,qe=Ke+a/2-M/2+je*Math.cos(ie)/2):g=="1"?(kt=Se+l/2-z/2-je*Math.cos(ie)/2,qe=Ke-(M/2-Le/2)+je*Math.cos(ie)/2):g=="2"&&(kt=Se+l/2-z/2-je*Math.cos(ie),qe=Ke+a-Le/2-M/2-je*Math.cos(ie))}else m=="1"?g=="0"?(kt=Se-Le*Math.sin(ie)/2-je*Math.cos(ie)/2,qe=Ke-M+a/2-Le*Math.cos(ie)/2-je*Math.cos(ie)/2):g=="1"?(kt=Se,qe=Ke-M):g=="2"&&(kt=Se-Le*Math.sin(ie)-je*Math.cos(ie),qe=Ke-M+a-Le*Math.cos(ie)-je*Math.cos(ie)):m=="2"&&(g=="0"?(kt=Se+l-Ce/2-z/2-je*Math.cos(ie)/2,qe=Ke+a/2-M/2-je*Math.cos(ie)/2):g=="1"?(kt=Se+l-Ce*Math.cos(ie),qe=Ke+Le*Math.cos(ie)):g=="2"&&(kt=Se+l-z-je*Math.cos(ie)+Ge,qe=Ke+a-je*Math.cos(ie)));$i(ot,S,_,{width:ot.width,height:ot.height,left:kt,top:qe,asc:vt.asc,desc:vt.desc,fs:ot.fs})}else kt=d+Te,m=="0"?kt=l/2+Te-vt.width/2:m=="2"&&(kt=l+Te-vt.width),qe=a-f+ae+vt.asc-M,g=="0"?qe=a/2+ae-M/2+vt.asc:g=="1"&&(qe=f+ae+vt.asc),$i(ot,S,_,{width:ot.width,height:ot.height,left:kt,top:qe,asc:vt.asc,desc:vt.desc,fs:ot.fs});ot.left=kt,ot.top=qe,x.values.push(ot),Te+=ot.width}ae+=vt.height}x.type="plainWrap",b!=0&&(m=="0"?g=="0"?(x.textLeftAll=l/2,x.textTopAll=a/2):g=="1"?(x.textLeftAll=l/2,x.textTopAll=Le/2):g=="2"&&(x.textLeftAll=l/2,x.textTopAll=a-Le/2):m=="1"?g=="0"?(x.textLeftAll=0,x.textTopAll=a/2):g=="1"?(x.textLeftAll=0,x.textTopAll=0):g=="2"&&(x.textLeftAll=0,x.textTopAll=a):m=="2"&&(g=="0"?(x.textLeftAll=l-Ce/2,x.textTopAll=a/2):g=="1"?(x.textLeftAll=l,x.textTopAll=0):g=="2"&&(x.textLeftAll=l,x.textTopAll=a)))}else{let z=zr(R,n),M=z.width,E=z.actualBoundingBoxDescent+z.actualBoundingBoxAscent;x.rotate=b,b=Math.abs(b);let N=b*Math.PI/180,L=M*Math.cos(N)+E*Math.sin(N),O=M*Math.sin(N)+E*Math.cos(N);if(b!=0?x.textHeightAll=O:x.textHeightAll=O+E/2-z.actualBoundingBoxDescent-f,x.textWidthAll=L,o=="onlyWidth")return x;let V=L,q=O,W=d+E*Math.sin(N)*k;m=="0"?W=l/2-V/2+E*Math.sin(N)*k:m=="2"&&(W=l-d-V+E*Math.sin(N)*k);let X=a-f-q+z.actualBoundingBoxAscent*Math.cos(N)+M*Math.sin(N)*k;g=="0"?X=a/2-q/2+z.actualBoundingBoxAscent*Math.cos(N)+M*Math.sin(N)*k:g=="1"&&(X=f+z.actualBoundingBoxAscent*Math.cos(N)+M*Math.sin(N)*k),x.type="plain";let te={content:R,style:C,width:V,height:q,left:W,top:X};$i(te,S,_,{width:M,height:E,left:W,top:X,asc:z.actualBoundingBoxAscent,desc:z.actualBoundingBoxDescent,fs:T}),x.values.push(te),x.textLeftAll=W,x.textTopAll=X,x.asc=z.actualBoundingBoxAscent,x.desc=z.actualBoundingBoxDescent}}return x}function $i(e,n,t,l){let a=l.left,o=l.top,s=l.width,u=l.height,d=l.asc,f=l.desc,m=l.fs;if(e.wrap!==!0&&(e.inline==!0&&e.style!=null&&(n=e.style.cl,t=e.style.un),n!="0"&&(e.cancelLine={},e.cancelLine.startX=a,e.cancelLine.startY=o-d/2+1,e.cancelLine.endX=a+s,e.cancelLine.endY=o-d/2+1,e.cancelLine.fs=m),t!="0")){if(e.underLine=[],t=="1"||t=="2"){let g={};g.startX=a,g.startY=o+3,g.endX=a+s,g.endY=o+3,g.fs=m,e.underLine.push(g)}if(t=="2"){let g={};g.startX=a,g.startY=o+f,g.endX=a+s,g.endY=o+f,g.fs=m,e.underLine.push(g)}if(t=="3"||t=="4"){let g={};g.startX=a,g.startY=o+f,g.endX=a+s,g.endY=o+f,g.fs=m,e.underLine.push(g)}if(t=="4"){let g={};g.startX=a,g.startY=o+f+2,g.endX=a+s,g.endY=o+f+2,g.fs=m,e.underLine.push(g)}}}var mr=Ie(()=>{dt();il();Kt();Ol();Ft();gn();Xe()});function yn(e,n){if(Ly(),e!=null){h.visibledatarow=[],h.rh_height=0;for(let t=0;t<e;t++){let l=h.defaultrowlen;if(h.config.rowlen!=null&&h.config.rowlen[t]!=null&&(l=h.config.rowlen[t]),h.config.rowhidden!=null&&h.config.rowhidden[t]!=null){h.visibledatarow.push(h.rh_height);continue}l==="auto"&&(l=qd(h.flowdata,t)),h.rh_height+=Math.round((l+1)*h.zoomRatio),h.visibledatarow.push(h.rh_height)}!fe.enableAddRow&&!fe.enableAddBackTop?h.rh_height+=29:h.rh_height+=80}if(n!=null){h.visibledatacolumn=[],h.ch_width=0;let t=120;for(let l=0;l<n;l++){let a=h.defaultcollen;if(h.config.columnlen!=null&&h.config.columnlen[l]!=null?a=h.config.columnlen[l]:h.flowdata[0]!=null&&h.flowdata[0][l]!=null&&(a>300?a=300:a<h.defaultcollen&&(a=h.defaultcollen),a!=h.defaultcollen&&(h.config.columnlen==null&&(h.config.columnlen={}),h.config.columnlen[l]=a)),h.config.colhidden!=null&&h.config.colhidden[l]!=null){h.visibledatacolumn.push(h.ch_width);continue}a==="auto"&&(a=jd(h.flowdata,l,e)),h.ch_width+=Math.round((a+1)*h.zoomRatio),h.visibledatacolumn.push(h.ch_width)}h.ch_width+=t}}function Ly(){h.rowHeaderWidth=fe.rowHeaderWidth*h.zoomRatio,h.columnHeaderHeight=fe.columnHeaderHeight*h.zoomRatio,$("#luckysheet-rows-h").width(h.rowHeaderWidth-1.5),$("#luckysheet-cols-h-c").height(h.columnHeaderHeight-1.5),$("#luckysheet-left-top").css({width:h.rowHeaderWidth-1.5,height:h.columnHeaderHeight-1.5})}var Ii=Ie(()=>{Xe();mr();xl()});var vn=vl((Vs,qs)=>{(function(e,n){typeof Vs=="object"&&typeof qs!="undefined"?qs.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis!="undefined"?globalThis:e||self).dayjs=n()})(Vs,function(){"use strict";var e=1e3,n=6e4,t=36e5,l="millisecond",a="second",o="minute",s="hour",u="day",d="week",f="month",m="quarter",g="year",y="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var N=["th","st","nd","rd"],L=E%100;return"["+E+(N[(L-20)%10]||N[L]||N[0])+"]"}},x=function(E,N,L){var O=String(E);return!O||O.length>=N?E:""+Array(N+1-O.length).join(L)+E},C={s:x,z:function(E){var N=-E.utcOffset(),L=Math.abs(N),O=Math.floor(L/60),V=L%60;return(N<=0?"+":"-")+x(O,2,"0")+":"+x(V,2,"0")},m:function E(N,L){if(N.date()<L.date())return-E(L,N);var O=12*(L.year()-N.year())+(L.month()-N.month()),V=N.clone().add(O,f),q=L-V<0,W=N.clone().add(O+(q?-1:1),f);return+(-(O+(L-V)/(q?V-W:W-V))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:f,y:g,w:d,d:u,D:y,h:s,m:o,s:a,ms:l,Q:m}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},S="en",_={};_[S]=w;var T="$isDayjsObject",A=function(E){return E instanceof z||!(!E||!E[T])},R=function E(N,L,O){var V;if(!N)return S;if(typeof N=="string"){var q=N.toLowerCase();_[q]&&(V=q),L&&(_[q]=L,V=q);var W=N.split("-");if(!V&&W.length>1)return E(W[0])}else{var X=N.name;_[X]=N,V=X}return!O&&V&&(S=V),V||!O&&S},I=function(E,N){if(A(E))return E.clone();var L=typeof N=="object"?N:{};return L.date=E,L.args=arguments,new z(L)},F=C;F.l=R,F.i=A,F.w=function(E,N){return I(E,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var z=function(){function E(L){this.$L=R(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[T]=!0}var N=E.prototype;return N.parse=function(L){this.$d=function(O){var V=O.date,q=O.utc;if(V===null)return new Date(NaN);if(F.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var W=V.match(b);if(W){var X=W[2]-1||0,te=(W[7]||"0").substring(0,3);return q?new Date(Date.UTC(W[1],X,W[3]||1,W[4]||0,W[5]||0,W[6]||0,te)):new Date(W[1],X,W[3]||1,W[4]||0,W[5]||0,W[6]||0,te)}}return new Date(V)}(L),this.init()},N.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},N.$utils=function(){return F},N.isValid=function(){return this.$d.toString()!==v},N.isSame=function(L,O){var V=I(L);return this.startOf(O)<=V&&V<=this.endOf(O)},N.isAfter=function(L,O){return I(L)<this.startOf(O)},N.isBefore=function(L,O){return this.endOf(O)<I(L)},N.$g=function(L,O,V){return F.u(L)?this[O]:this.set(V,L)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(L,O){var V=this,q=!!F.u(O)||O,W=F.p(L),X=function(K,G){var ee=F.w(V.$u?Date.UTC(V.$y,G,K):new Date(V.$y,G,K),V);return q?ee:ee.endOf(u)},te=function(K,G){return F.w(V.toDate()[K].apply(V.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(G)),V)},le=this.$W,oe=this.$M,se=this.$D,ce="set"+(this.$u?"UTC":"");switch(W){case g:return q?X(1,0):X(31,11);case f:return q?X(1,oe):X(0,oe+1);case d:var he=this.$locale().weekStart||0,ue=(le<he?le+7:le)-he;return X(q?se-ue:se+(6-ue),oe);case u:case y:return te(ce+"Hours",0);case s:return te(ce+"Minutes",1);case o:return te(ce+"Seconds",2);case a:return te(ce+"Milliseconds",3);default:return this.clone()}},N.endOf=function(L){return this.startOf(L,!1)},N.$set=function(L,O){var V,q=F.p(L),W="set"+(this.$u?"UTC":""),X=(V={},V[u]=W+"Date",V[y]=W+"Date",V[f]=W+"Month",V[g]=W+"FullYear",V[s]=W+"Hours",V[o]=W+"Minutes",V[a]=W+"Seconds",V[l]=W+"Milliseconds",V)[q],te=q===u?this.$D+(O-this.$W):O;if(q===f||q===g){var le=this.clone().set(y,1);le.$d[X](te),le.init(),this.$d=le.set(y,Math.min(this.$D,le.daysInMonth())).$d}else X&&this.$d[X](te);return this.init(),this},N.set=function(L,O){return this.clone().$set(L,O)},N.get=function(L){return this[F.p(L)]()},N.add=function(L,O){var V,q=this;L=Number(L);var W=F.p(O),X=function(oe){var se=I(q);return F.w(se.date(se.date()+Math.round(oe*L)),q)};if(W===f)return this.set(f,this.$M+L);if(W===g)return this.set(g,this.$y+L);if(W===u)return X(1);if(W===d)return X(7);var te=(V={},V[o]=n,V[s]=t,V[a]=e,V)[W]||1,le=this.$d.getTime()+L*te;return F.w(le,this)},N.subtract=function(L,O){return this.add(-1*L,O)},N.format=function(L){var O=this,V=this.$locale();if(!this.isValid())return V.invalidDate||v;var q=L||"YYYY-MM-DDTHH:mm:ssZ",W=F.z(this),X=this.$H,te=this.$m,le=this.$M,oe=V.weekdays,se=V.months,ce=V.meridiem,he=function(G,ee,pe,ae){return G&&(G[ee]||G(O,q))||pe[ee].slice(0,ae)},ue=function(G){return F.s(X%12||12,G,"0")},K=ce||function(G,ee,pe){var ae=G<12?"AM":"PM";return pe?ae.toLowerCase():ae};return q.replace(k,function(G,ee){return ee||function(pe){switch(pe){case"YY":return String(O.$y).slice(-2);case"YYYY":return F.s(O.$y,4,"0");case"M":return le+1;case"MM":return F.s(le+1,2,"0");case"MMM":return he(V.monthsShort,le,se,3);case"MMMM":return he(se,le);case"D":return O.$D;case"DD":return F.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return he(V.weekdaysMin,O.$W,oe,2);case"ddd":return he(V.weekdaysShort,O.$W,oe,3);case"dddd":return oe[O.$W];case"H":return String(X);case"HH":return F.s(X,2,"0");case"h":return ue(1);case"hh":return ue(2);case"a":return K(X,te,!0);case"A":return K(X,te,!1);case"m":return String(te);case"mm":return F.s(te,2,"0");case"s":return String(O.$s);case"ss":return F.s(O.$s,2,"0");case"SSS":return F.s(O.$ms,3,"0");case"Z":return W}return null}(G)||W.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(L,O,V){var q,W=this,X=F.p(O),te=I(L),le=(te.utcOffset()-this.utcOffset())*n,oe=this-te,se=function(){return F.m(W,te)};switch(X){case g:q=se()/12;break;case f:q=se();break;case m:q=se()/3;break;case d:q=(oe-le)/6048e5;break;case u:q=(oe-le)/864e5;break;case s:q=oe/t;break;case o:q=oe/n;break;case a:q=oe/e;break;default:q=oe}return V?q:F.a(q)},N.daysInMonth=function(){return this.endOf(f).$D},N.$locale=function(){return _[this.$L]},N.locale=function(L,O){if(!L)return this.$L;var V=this.clone(),q=R(L,O,!0);return q&&(V.$L=q),V},N.clone=function(){return F.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},E}(),M=z.prototype;return I.prototype=M,[["$ms",l],["$s",a],["$m",o],["$H",s],["$W",u],["$M",f],["$y",g],["$D",y]].forEach(function(E){M[E[1]]=function(N){return this.$g(N,E[0],E[1])}}),I.extend=function(E,N){return E.$i||(E(N,z,I),E.$i=!0),I},I.locale=R,I.isDayjs=A,I.unix=function(E){return I(1e3*E)},I.en=_[S],I.Ls=_,I.p={},I})});function Lt(e){if(e==null||e.toString().length<5)return!1;return!!n(e);function n(t){var l=/^(\d{4})-(\d{1,2})-(\d{1,2})(\s(\d{1,2}):(\d{1,2})(:(\d{1,2}))?)?$/,a=/^(\d{4})\/(\d{1,2})\/(\d{1,2})(\s(\d{1,2}):(\d{1,2})(:(\d{1,2}))?)?$/;if(!l.test(t)&&!a.test(t))return!1;var o=RegExp.$1,s=RegExp.$2,u=RegExp.$3;if(o<1900||s>12||u>31)return!1;if(s==2){if(new Date(o,1,29).getDate()==29&&u>29)return!1;if(new Date(o,1,29).getDate()!=29&&u>28)return!1}return!0}}function ul(e,n){return(0,js.default)(e).diff((0,js.default)(n))}function On(e){let n={};return Lt(e)&&(n.date=!0),!isNaN(parseFloat(e))&&!In(e)&&(n.num=!0),n}function tr(e){let n="string";return Lt(e)?n="date":!isNaN(parseFloat(e))&&!In(e)&&(n="num"),n}var js,Or=Ie(()=>{Ft();js=Fl(vn())});var sa=vl((Ud,yo)=>{(function(e,n){typeof define=="function"&&define.amd?define(n):typeof yo=="object"&&yo.exports?yo.exports=n():e.numeral=n()})(Ud,function(){var e,n,t="2.0.6",l={},a={},o={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},s={currentLocale:o.currentLocale,zeroFormat:o.zeroFormat,nullFormat:o.nullFormat,defaultFormat:o.defaultFormat,scalePercentBy100:o.scalePercentBy100};function u(d,f){this._input=d,this._value=f}return e=function(d){var f,m,g,y;if(e.isNumeral(d))f=d.value();else if(d===0||typeof d=="undefined")f=0;else if(d===null||n.isNaN(d))f=null;else if(typeof d=="string")if(s.zeroFormat&&d===s.zeroFormat)f=0;else if(s.nullFormat&&d===s.nullFormat||!d.replace(/[^0-9]+/g,"").length)f=null;else{for(m in l)if(y=typeof l[m].regexps.unformat=="function"?l[m].regexps.unformat():l[m].regexps.unformat,y&&d.match(y)){g=l[m].unformat;break}g=g||e._.stringToNumber,f=g(d)}else f=Number(d)||null;return new u(d,f)},e.version=t,e.isNumeral=function(d){return d instanceof u},e._=n={numberToFormat:function(d,f,m){var g=a[e.options.currentLocale],y=!1,v=!1,b=0,k="",w=1e12,x=1e9,C=1e6,S=1e3,_="",T=!1,A,R,I,F,z,M,E,N,L,O;if(d=d||0,R=Math.abs(d),e._.includes(f,"(")?(y=!0,f=f.replace(/[\(|\)]/g,"")):(e._.includes(f,"+")||e._.includes(f,"-"))&&(N=e._.includes(f,"+")?f.indexOf("+"):d<0?f.indexOf("-"):-1,f=f.replace(/[\+|\-]/g,"")),e._.includes(f,"a")&&(A=f.match(/a(k|m|b|t)?/),A=A?A[1]:!1,e._.includes(f," a")&&(k=" "),f=f.replace(new RegExp(k+"a[kmbt]?"),""),R>=w&&!A||A==="t"?(k+=g.abbreviations.trillion,d=d/w):R<w&&R>=x&&!A||A==="b"?(k+=g.abbreviations.billion,d=d/x):R<x&&R>=C&&!A||A==="m"?(k+=g.abbreviations.million,d=d/C):(R<C&&R>=S&&!A||A==="k")&&(k+=g.abbreviations.thousand,d=d/S)),e._.includes(f,"[.]")&&(v=!0,f=f.replace("[.]",".")),M=d.toString().split(".")[0],E=f.split(".")[1],L=f.indexOf(","),b=(f.split(".")[0].split(",")[0].match(/0/g)||[]).length,E?(e._.includes(E,"[")?(E=E.replace("]",""),E=E.split("["),_=e._.toFixed(d,E[0].length+E[1].length,m,E[1].length)):_=e._.toFixed(d,E.length,m),M=_.split(".")[0],e._.includes(_,".")?_=g.delimiters.decimal+_.split(".")[1]:_="",v&&Number(_.slice(1))===0&&(_="")):M=e._.toFixed(d,0,m),k&&!A&&Number(M)>=1e3&&k!==g.abbreviations.trillion)switch(M=String(Number(M)/1e3),k){case g.abbreviations.thousand:k=g.abbreviations.million;break;case g.abbreviations.million:k=g.abbreviations.billion;break;case g.abbreviations.billion:k=g.abbreviations.trillion;break}if(e._.includes(M,"-")&&(M=M.slice(1),T=!0),M.length<b)for(var V=b-M.length;V>0;V--)M="0"+M;return L>-1&&(M=M.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+g.delimiters.thousands)),f.indexOf(".")===0&&(M=""),O=M+_+(k||""),y?O=(y&&T?"(":"")+O+(y&&T?")":""):N>=0?O=N===0?(T?"-":"+")+O:O+(T?"-":"+"):T&&(O="-"+O),O},stringToNumber:function(d){var f=a[s.currentLocale],m=d,g={thousand:3,million:6,billion:9,trillion:12},y,v,b,k;if(s.zeroFormat&&d===s.zeroFormat)v=0;else if(s.nullFormat&&d===s.nullFormat||!d.replace(/[^0-9]+/g,"").length)v=null;else{v=1,f.delimiters.decimal!=="."&&(d=d.replace(/\./g,"").replace(f.delimiters.decimal,"."));for(y in g)if(k=new RegExp("[^a-zA-Z]"+f.abbreviations[y]+"(?:\\)|(\\"+f.currency.symbol+")?(?:\\))?)?$"),m.match(k)){v*=Math.pow(10,g[y]);break}v*=(d.split("-").length+Math.min(d.split("(").length-1,d.split(")").length-1))%2?1:-1,d=d.replace(/[^0-9\.]+/g,""),v*=Number(d)}return v},isNaN:function(d){return typeof d=="number"&&isNaN(d)},includes:function(d,f){return d.indexOf(f)!==-1},insert:function(d,f,m){return d.slice(0,m)+f+d.slice(m)},reduce:function(d,f){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof f!="function")throw new TypeError(f+" is not a function");var m=Object(d),g=m.length>>>0,y=0,v;if(arguments.length===3)v=arguments[2];else{for(;y<g&&!(y in m);)y++;if(y>=g)throw new TypeError("Reduce of empty array with no initial value");v=m[y++]}for(;y<g;y++)y in m&&(v=f(v,m[y],y,m));return v},multiplier:function(d){var f=d.toString().split(".");return f.length<2?1:Math.pow(10,f[1].length)},correctionFactor:function(){var d=Array.prototype.slice.call(arguments);return d.reduce(function(f,m){var g=n.multiplier(m);return f>g?f:g},1)},toFixed:function(d,f,m,g){var y=d.toString().split("."),v=f-(g||0),b,k,w,x;return y.length===2?b=Math.min(Math.max(y[1].length,v),f):b=v,w=Math.pow(10,b),x=(m(d+"e+"+b)/w).toFixed(b),g>f-b&&(k=new RegExp("\\.?0{1,"+(g-(f-b))+"}$"),x=x.replace(k,"")),x}},e.options=s,e.formats=l,e.locales=a,e.locale=function(d){return d&&(s.currentLocale=d.toLowerCase()),s.currentLocale},e.localeData=function(d){if(!d)return a[s.currentLocale];if(d=d.toLowerCase(),!a[d])throw new Error("Unknown locale : "+d);return a[d]},e.reset=function(){for(var d in o)s[d]=o[d]},e.zeroFormat=function(d){s.zeroFormat=typeof d=="string"?d:null},e.nullFormat=function(d){s.nullFormat=typeof d=="string"?d:null},e.defaultFormat=function(d){s.defaultFormat=typeof d=="string"?d:"0.0"},e.register=function(d,f,m){if(f=f.toLowerCase(),this[d+"s"][f])throw new TypeError(f+" "+d+" already registered.");return this[d+"s"][f]=m,m},e.validate=function(d,f){var m,g,y,v,b,k,w,x;if(typeof d!="string"&&(d+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",d)),d=d.trim(),d.match(/^\d+$/))return!0;if(d==="")return!1;try{w=e.localeData(f)}catch(C){w=e.localeData(e.locale())}return y=w.currency.symbol,b=w.abbreviations,m=w.delimiters.decimal,w.delimiters.thousands==="."?g="\\.":g=w.delimiters.thousands,x=d.match(/^[^\d]+/),x!==null&&(d=d.substr(1),x[0]!==y)||(x=d.match(/[^\d]+$/),x!==null&&(d=d.slice(0,-1),x[0]!==b.thousand&&x[0]!==b.million&&x[0]!==b.billion&&x[0]!==b.trillion))?!1:(k=new RegExp(g+"{2}"),d.match(/[^\d.,]/g)?!1:(v=d.split(m),v.length>2?!1:v.length<2?!!v[0].match(/^\d+.*\d$/)&&!v[0].match(k):v[0].length===1?!!v[0].match(/^\d+$/)&&!v[0].match(k)&&!!v[1].match(/^\d+$/):!!v[0].match(/^\d+.*\d$/)&&!v[0].match(k)&&!!v[1].match(/^\d+$/)))},e.fn=u.prototype={clone:function(){return e(this)},format:function(d,f){var m=this._value,g=d||s.defaultFormat,y,v,b;if(f=f||Math.round,m===0&&s.zeroFormat!==null)v=s.zeroFormat;else if(m===null&&s.nullFormat!==null)v=s.nullFormat;else{for(y in l)if(g.match(l[y].regexps.format)){b=l[y].format;break}b=b||e._.numberToFormat,v=b(m,g,f)}return v},value:function(){return this._value},input:function(){return this._input},set:function(d){return this._value=Number(d),this},add:function(d){var f=n.correctionFactor.call(null,this._value,d);function m(g,y,v,b){return g+Math.round(f*y)}return this._value=n.reduce([this._value,d],m,0)/f,this},subtract:function(d){var f=n.correctionFactor.call(null,this._value,d);function m(g,y,v,b){return g-Math.round(f*y)}return this._value=n.reduce([d],m,Math.round(this._value*f))/f,this},multiply:function(d){function f(m,g,y,v){var b=n.correctionFactor(m,g);return Math.round(m*b)*Math.round(g*b)/Math.round(b*b)}return this._value=n.reduce([this._value,d],f,1),this},divide:function(d){function f(m,g,y,v){var b=n.correctionFactor(m,g);return Math.round(m*b)/Math.round(g*b)}return this._value=n.reduce([this._value,d],f),this},difference:function(d){return Math.abs(e(this._value).subtract(d).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(d){var f=d%10;return~~(d%100/10)==1?"th":f===1?"st":f===2?"nd":f===3?"rd":"th"},currency:{symbol:"$"}}),function(){e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(d,f,m){var g=e._.includes(f," BPS")?" ":"",y;return d=d*1e4,f=f.replace(/\s?BPS/,""),y=e._.numberToFormat(d,f,m),e._.includes(y,")")?(y=y.split(""),y.splice(-1,0,g+"BPS"),y=y.join("")):y=y+g+"BPS",y},unformat:function(d){return+(e._.stringToNumber(d)*1e-4).toFixed(15)}})}(),function(){var d={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},f={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},m=d.suffixes.concat(f.suffixes.filter(function(y){return d.suffixes.indexOf(y)<0})),g=m.join("|");g="("+g.replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(g)},format:function(y,v,b){var k,w=e._.includes(v,"ib")?f:d,x=e._.includes(v," b")||e._.includes(v," ib")?" ":"",C,S,_;for(v=v.replace(/\s?i?b/,""),C=0;C<=w.suffixes.length;C++)if(S=Math.pow(w.base,C),_=Math.pow(w.base,C+1),y===null||y===0||y>=S&&y<_){x+=w.suffixes[C],S>0&&(y=y/S);break}return k=e._.numberToFormat(y,v,b),k+x},unformat:function(y){var v=e._.stringToNumber(y),b,k;if(v){for(b=d.suffixes.length-1;b>=0;b--){if(e._.includes(y,d.suffixes[b])){k=Math.pow(d.base,b);break}if(e._.includes(y,f.suffixes[b])){k=Math.pow(f.base,b);break}}v*=k||1}return v}})}(),function(){e.register("format","currency",{regexps:{format:/(\$)/},format:function(d,f,m){var g=e.locales[e.options.currentLocale],y={before:f.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:f.match(/([\+|\-|\)|\s|\$]*)$/)[0]},v,b,k;for(f=f.replace(/\s?\$\s?/,""),v=e._.numberToFormat(d,f,m),d>=0?(y.before=y.before.replace(/[\-\(]/,""),y.after=y.after.replace(/[\-\)]/,"")):d<0&&!e._.includes(y.before,"-")&&!e._.includes(y.before,"(")&&(y.before="-"+y.before),k=0;k<y.before.length;k++)switch(b=y.before[k],b){case"$":v=e._.insert(v,g.currency.symbol,k);break;case" ":v=e._.insert(v," ",k+g.currency.symbol.length-1);break}for(k=y.after.length-1;k>=0;k--)switch(b=y.after[k],b){case"$":v=k===y.after.length-1?v+g.currency.symbol:e._.insert(v,g.currency.symbol,-(y.after.length-(1+k)));break;case" ":v=k===y.after.length-1?v+" ":e._.insert(v," ",-(y.after.length-(1+k)+g.currency.symbol.length-1));break}return v}})}(),function(){e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(d,f,m){var g,y=typeof d=="number"&&!e._.isNaN(d)?d.toExponential():"0e+0",v=y.split("e");return f=f.replace(/e[\+|\-]{1}0/,""),g=e._.numberToFormat(Number(v[0]),f,m),g+"e"+v[1]},unformat:function(d){var f=e._.includes(d,"e+")?d.split("e+"):d.split("e-"),m=Number(f[0]),g=Number(f[1]);g=e._.includes(d,"e-")?g*=-1:g;function y(v,b,k,w){var x=e._.correctionFactor(v,b),C=v*x*(b*x)/(x*x);return C}return e._.reduce([m,Math.pow(10,g)],y,1)}})}(),function(){e.register("format","ordinal",{regexps:{format:/(o)/},format:function(d,f,m){var g=e.locales[e.options.currentLocale],y,v=e._.includes(f," o")?" ":"";return f=f.replace(/\s?o/,""),v+=g.ordinal(d),y=e._.numberToFormat(d,f,m),y+v}})}(),function(){e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(d,f,m){var g=e._.includes(f," %")?" ":"",y;return e.options.scalePercentBy100&&(d=d*100),f=f.replace(/\s?\%/,""),y=e._.numberToFormat(d,f,m),e._.includes(y,")")?(y=y.split(""),y.splice(-1,0,g+"%"),y=y.join("")):y=y+g+"%",y},unformat:function(d){var f=e._.stringToNumber(d);return e.options.scalePercentBy100?f*.01:f}})}(),function(){e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(d,f,m){var g=Math.floor(d/60/60),y=Math.floor((d-g*60*60)/60),v=Math.round(d-g*60*60-y*60);return g+":"+(y<10?"0"+y:y)+":"+(v<10?"0"+v:v)},unformat:function(d){var f=d.split(":"),m=0;return f.length===3?(m=m+Number(f[0])*60*60,m=m+Number(f[1])*60,m=m+Number(f[2])):f.length===2&&(m=m+Number(f[0])*60,m=m+Number(f[1])),Number(m)}})}(),e})});function Us(e,n){var t=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()),l=Date.UTC(1899,11,31,0,0,0);return n?t-=1461*24*60*60*1e3:e>=By&&(t+=24*60*60*1e3),(t-l)/(24*60*60*1e3)}function Vy(e,n){var t=new Date(e);if(Hy)return n>0?t.setTime(t.getTime()+t.getTimezoneOffset()*60*1e3):n<0&&t.setTime(t.getTime()-t.getTimezoneOffset()*60*1e3),t;if(e instanceof Date)return e;if(vo.getFullYear()==1917&&!isNaN(t.getFullYear())){var l=t.getFullYear();return e.indexOf(""+l)>-1||t.setFullYear(t.getFullYear()+100),t}var a=e.match(/\d+/g)||["2017","2","19","0","0","0"],o=new Date(+a[0],+a[1]-1,+a[2],+a[3]||0,+a[4]||0,+a[5]||0);return e.indexOf("Z")>-1&&(o=new Date(o.getTime()-o.getTimezoneOffset()*60*1e3)),o}function qy(e){var n=Number(e);if(typeof e=="number")return e;if(!isNaN(n))return n;var t=1,l=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return t*=100,""});return!isNaN(n=Number(l))||(l=l.replace(/[(](.*)[)]/,function(a,o){return t=-t,o}),!isNaN(n=Number(l)))?n/t:n}function at(e){var n=[],t=null,l={},a=e;if(e==null)return null;if(/^-?[0-9]{1,}[,][0-9]{3}(.[0-9]{1,2})?$/.test(e)){t=e,a=Number(e.split(".")[0].replace(",",""));let x="#,##0";if(e.split(".")[1]){x="#,##0.";for(let C=0;C<e.split(".")[1].length;C++)x+=0}l={fa:x,t:"n"}}else if(e.toString().substr(0,1)==="'")t=e.toString().substr(1),l={fa:"@",t:"s"};else if(e.toString().toUpperCase()==="TRUE")t="TRUE",l={fa:"General",t:"b"},a=!0;else if(e.toString().toUpperCase()==="FALSE")t="FALSE",l={fa:"General",t:"b"},a=!1;else if(H(e))t=e.toString(),l={fa:"General",t:"e"};else if(/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(e))t=e.toString(),l={fa:"@",t:"s"};else if(B(e)&&Math.abs(parseFloat(e))>0&&(Math.abs(parseFloat(e))>=1e11||Math.abs(parseFloat(e))<1e-9)){a=(0,Br.default)(e).value();var o=a.toExponential();if(o.indexOf(".")>-1){var s=o.split(".")[1].split("e")[0].length;s>5&&(s=5),l={fa:"#0."+new Array(s+1).join("0")+"E+00",t:"n"}}else l={fa:"#0.E+00",t:"n"};t=kl.format(l.fa,a)}else if(e.toString().indexOf("%")>-1){var u=e.toString().indexOf("%"),d=e.toString().substr(0,u),f=d.replace(/,/g,"");if(u==e.toString().length-1&&B(f))if(d.indexOf(".")>-1)if(d.indexOf(".")==d.lastIndexOf(".")){var m=d.split(".")[0],g=d.split(".")[1],y=g.length;if(y>9&&(y=9),m.indexOf(",")>-1){for(var v=!0,b=m.split(","),k=1;k<b.length;k++)if(b[k].length<3){v=!1;break}v?(l={fa:"#,##0."+new Array(y+1).join("0")+"%",t:"n"},a=(0,Br.default)(e).value(),t=kl.format(l.fa,a)):(t=e.toString(),l={fa:"@",t:"s"})}else l={fa:"0."+new Array(y+1).join("0")+"%",t:"n"},a=(0,Br.default)(e).value(),t=kl.format(l.fa,a)}else t=e.toString(),l={fa:"@",t:"s"};else if(d.indexOf(",")>-1){for(var v=!0,b=d.split(","),k=1;k<b.length;k++)if(b[k].length<3){v=!1;break}v?(l={fa:"#,##0%",t:"n"},a=(0,Br.default)(e).value(),t=kl.format(l.fa,a)):(t=e.toString(),l={fa:"@",t:"s"})}else l={fa:"0%",t:"n"},a=(0,Br.default)(e).value(),t=kl.format(l.fa,a);else t=e.toString(),l={fa:"@",t:"s"}}else if(e.toString().indexOf(".")>-1)if(e.toString().indexOf(".")==e.toString().lastIndexOf(".")){var w=e.toString().split(".")[0],d=e.toString().split(".")[1],y=d.length;if(y>9&&(y=9),w.indexOf(",")>-1){for(var v=!0,b=w.split(","),k=1;k<b.length;k++)if(!B(b[k])||b[k].length<3){v=!1;break}v?(l={fa:"#,##0."+new Array(y+1).join("0"),t:"n"},a=(0,Br.default)(e).value(),t=kl.format(l.fa,a)):(t=e.toString(),l={fa:"@",t:"s"})}else B(w)&&B(d)?(l={fa:"0."+new Array(y+1).join("0"),t:"n"},a=(0,Br.default)(e).value(),t=kl.format(l.fa,a)):(t=e.toString(),l={fa:"@",t:"s"})}else t=e.toString(),l={fa:"@",t:"s"};else B(e)?(t=e.toString(),l={fa:"General",t:"n"},a=parseFloat(e)):Lt(e)&&(e.toString().indexOf(".")>-1||e.toString().indexOf(":")>-1||e.toString().length<16)?(a=Us(Vy(e.toString().replace(/-/g,"/"))),a.toString().indexOf(".")>-1?e.toString().length>18?l.fa="yyyy-MM-dd hh:mm:ss":e.toString().length>11?l.fa="yyyy-MM-dd hh:mm":l.fa="yyyy-MM-dd":l.fa="yyyy-MM-dd",l.t="d",t=kl.format(l.fa,a)):(t=e,l.fa="General",l.t="g");return[t,l,a]}function mt(e,n){return kl.format(e,n)}function Gd(e,n){return kl.is_date(e,n)}function bn(e,n,t){var l=ze(e,n,t,"m");return l==null?l=ze(e,n,t,"v"):isNaN(qy(l))?t[e][n].ct!=null&&t[e][n].ct.t=="d"||t[e][n].ct!=null&&t[e][n].ct.t=="b"||(l=ze(e,n,t,"v")):typeof l=="string"&&l.indexOf("%")>-1||(l=ze(e,n,t,"v")),l}var Br,kl,zy,O1,B1,Oy,H1,By,vo,Hy,Al=Ie(()=>{Ft();Or();Kt();Br=Fl(sa()),kl={},zy=function(n){n.version="0.11.2";function t(K){for(var G="",ee=K.length-1;ee>=0;)G+=K.charAt(ee--);return G}function l(K,G){for(var ee="";ee.length<G;)ee+=K;return ee}function a(K,G){var ee=""+K;return ee.length>=G?ee:l("0",G-ee.length)+ee}function o(K,G){var ee=""+K;return ee.length>=G?ee:l(" ",G-ee.length)+ee}function s(K,G){var ee=""+K;return ee.length>=G?ee:ee+l(" ",G-ee.length)}function u(K,G){var ee=""+Math.round(K);return ee.length>=G?ee:l("0",G-ee.length)+ee}function d(K,G){var ee=""+K;return ee.length>=G?ee:l("0",G-ee.length)+ee}var f=Math.pow(2,32);function m(K,G){if(K>f||K<-f)return u(K,G);var ee=Math.round(K);return d(ee,G)}function g(K,G){return G=G||0,K.length>=7+G&&(K.charCodeAt(G)|32)==103&&(K.charCodeAt(G+1)|32)==101&&(K.charCodeAt(G+2)|32)==110&&(K.charCodeAt(G+3)|32)==101&&(K.charCodeAt(G+4)|32)==114&&(K.charCodeAt(G+5)|32)==97&&(K.charCodeAt(G+6)|32)==108}var y=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],v=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function b(K){K[0]="General",K[1]="0",K[2]="0.00",K[3]="#,##0",K[4]="#,##0.00",K[9]="0%",K[10]="0.00%",K[11]="0.00E+00",K[12]="# ?/?",K[13]="# ??/??",K[14]="m/d/yy",K[15]="d-mmm-yy",K[16]="d-mmm",K[17]="mmm-yy",K[18]="h:mm AM/PM",K[19]="h:mm:ss AM/PM",K[20]="h:mm",K[21]="h:mm:ss",K[22]="m/d/yy h:mm",K[37]="#,##0 ;(#,##0)",K[38]="#,##0 ;[Red](#,##0)",K[39]="#,##0.00;(#,##0.00)",K[40]="#,##0.00;[Red](#,##0.00)",K[45]="mm:ss",K[46]="[h]:mm:ss",K[47]="mmss.0",K[48]="##0.0E+0",K[49]="@",K[56]='"\u4E0A\u5348/\u4E0B\u5348 "hh"\u6642"mm"\u5206"ss"\u79D2 "',K[65535]="General"}var k={};b(k);var w=[],x=0;for(x=5;x<=8;++x)w[x]=32+x;for(x=23;x<=26;++x)w[x]=0;for(x=27;x<=31;++x)w[x]=14;for(x=50;x<=58;++x)w[x]=14;for(x=59;x<=62;++x)w[x]=x-58;for(x=67;x<=68;++x)w[x]=x-58;for(x=72;x<=75;++x)w[x]=x-58;for(x=67;x<=68;++x)w[x]=x-57;for(x=76;x<=78;++x)w[x]=x-56;for(x=79;x<=81;++x)w[x]=x-34;var C=[];C[5]=C[63]='"$"#,##0_);\\("$"#,##0\\)',C[6]=C[64]='"$"#,##0_);[Red]\\("$"#,##0\\)',C[7]=C[65]='"$"#,##0.00_);\\("$"#,##0.00\\)',C[8]=C[66]='"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',C[41]='_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',C[42]='_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',C[43]='_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',C[44]='_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)';function S(K,G,ee){for(var pe=K<0?-1:1,ae=K*pe,Te=0,ie=1,Ee=0,je=1,Ce=0,Le=0,Ge=Math.floor(ae);Ce<G&&(Ge=Math.floor(ae),Ee=Ge*ie+Te,Le=Ge*Ce+je,!(ae-Ge<5e-8));)ae=1/(ae-Ge),Te=ie,ie=Ee,je=Ce,Ce=Le;if(Le>G&&(Ce>G?(Le=je,Ee=Te):(Le=Ce,Ee=ie)),!ee)return[0,pe*Ee,Le];var Ne=Math.floor(pe*Ee/Le);return[Ne,pe*Ee-Ne*Le,Le]}function _(K,G,ee){if(K>2958465||K<0)return null;var pe=K|0,ae=Math.floor(86400*(K-pe)),Te=0,ie=[],Ee={D:pe,T:ae,u:86400*(K-pe)-ae,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(Ee.u)<1e-6&&(Ee.u=0),G&&G.date1904&&(pe+=1462),Ee.u>.9999&&(Ee.u=0,++ae==86400&&(Ee.T=ae=0,++pe,++Ee.D)),pe===60)ie=ee?[1317,10,29]:[1900,2,29],Te=3;else if(pe===0)ie=ee?[1317,8,29]:[1900,1,0],Te=6;else{pe>60&&--pe;var je=new Date(1900,0,1);je.setDate(je.getDate()+pe-1),ie=[je.getFullYear(),je.getMonth()+1,je.getDate()],Te=je.getDay(),pe<60&&(Te=(Te+6)%7),ee&&(Te=E(je,ie))}return Ee.y=ie[0],Ee.m=ie[1],Ee.d=ie[2],Ee.S=ae%60,ae=Math.floor(ae/60),Ee.M=ae%60,ae=Math.floor(ae/60),Ee.H=ae,Ee.q=Te,Ee}n.parse_date_code=_;var T=new Date(1899,11,31,0,0,0),A=T.getTime(),R=new Date(1900,2,1,0,0,0);function I(K,G){var ee=K.getTime();return G?ee-=1461*24*60*60*1e3:K>=R&&(ee+=24*60*60*1e3),(ee-(A+(K.getTimezoneOffset()-T.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function F(K){return K.toString(10)}n._general_int=F;var z=function(){var G=/(?:\.0*|(\.\d*[1-9])0+)$/;function ee(Ce){return Ce.indexOf(".")==-1?Ce:Ce.replace(G,"$1")}var pe=/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,ae=/(E[+-])(\d)$/;function Te(Ce){return Ce.indexOf("E")==-1?Ce:Ce.replace(pe,"$1E").replace(ae,"$10$2")}function ie(Ce){var Le=Ce<0?12:11,Ge=ee(Ce.toFixed(12));return Ge.length<=Le||(Ge=Ce.toPrecision(10),Ge.length<=Le)?Ge:Ce.toExponential(5)}function Ee(Ce){var Le=ee(Ce.toFixed(11));return Le.length>(Ce<0?12:11)||Le==="0"||Le==="-0"?Ce.toPrecision(6):Le}function je(Ce){var Le=Math.floor(Math.log(Math.abs(Ce))*Math.LOG10E),Ge;return Le>=-4&&Le<=-1?Ge=Ce.toPrecision(10+Le):Math.abs(Le)<=9?Ge=ie(Ce):Le===10?Ge=Ce.toFixed(10).substr(0,12):Ge=Ee(Ce),ee(Te(Ge.toUpperCase()))}return je}();n._general_num=z;function M(K,G){switch(typeof K){case"string":return K;case"boolean":return K?"TRUE":"FALSE";case"number":return(K|0)===K?K.toString(10):z(K);case"undefined":return"";case"object":if(K==null)return"";if(K instanceof Date)return he(14,I(K,G&&G.date1904),G)}throw new Error("unsupported value in General format: "+K)}n._general=M;function E(K,G){G[0]-=581;var ee=K.getDay();return K<60&&(ee=(ee+6)%7),ee}var N="\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59".split("");function L(K,G,ee,pe){var ae="",Te=0,ie=0,Ee=ee.y,je,Ce=0;switch(K){case 98:Ee=ee.y+543;case 121:switch(G.length){case 1:case 2:je=Ee%100,Ce=2;break;default:je=Ee%1e4,Ce=4;break}break;case 109:switch(G.length){case 1:case 2:je=ee.m,Ce=G.length;break;case 3:return v[ee.m-1][1];case 5:return v[ee.m-1][0];default:return v[ee.m-1][2]}break;case 100:switch(G.length){case 1:case 2:je=ee.d,Ce=G.length;break;case 3:return y[ee.q][0];default:return y[ee.q][1]}break;case 104:switch(G.length){case 1:case 2:je=1+(ee.H+11)%12,Ce=G.length;break;default:throw"bad hour format: "+G}break;case 72:switch(G.length){case 1:case 2:je=ee.H,Ce=G.length;break;default:throw"bad hour format: "+G}break;case 77:switch(G.length){case 1:case 2:je=ee.M,Ce=G.length;break;default:throw"bad minute format: "+G}break;case 115:if(G!="s"&&G!="ss"&&G!=".0"&&G!=".00"&&G!=".000")throw"bad second format: "+G;return ee.u===0&&(G=="s"||G=="ss")?a(ee.S,G.length):(pe>=2?ie=pe===3?1e3:100:ie=pe===1?10:1,Te=Math.round(ie*(ee.S+ee.u)),Te>=60*ie&&(Te=0),G==="s"?Te===0?"0":""+Te/ie:(ae=a(Te,2+pe),G==="ss"?ae.substr(0,2):"."+ae.substr(2,G.length-1)));case 90:switch(G){case"[h]":case"[hh]":je=ee.D*24+ee.H;break;case"[m]":case"[mm]":je=(ee.D*24+ee.H)*60+ee.M;break;case"[s]":case"[ss]":je=((ee.D*24+ee.H)*60+ee.M)*60+Math.round(ee.S+ee.u);break;default:throw"bad abstime format: "+G}Ce=G.length===3?1:2;break;case 101:je=Ee,Ce=1;break}var Le=Ce>0?a(je,Ce):"";return Le}function O(K){var G=3;if(K.length<=G)return K;for(var ee=K.length%G,pe=K.substr(0,ee);ee!=K.length;ee+=G)pe+=(pe.length>0?",":"")+K.substr(ee,G);return pe}var V=function(){var G=/%/g;function ee(Fe,ye,be){var ht=ye.replace(G,""),De=ye.length-ht.length;return V(Fe,ht,be*Math.pow(10,2*De))+l("%",De)}function pe(Fe,ye,be){for(var ht=ye.length-1;ye.charCodeAt(ht-1)===44;)--ht;return V(Fe,ye.substr(0,ht),be/Math.pow(10,3*(ye.length-ht)))}function ae(Fe,ye){var be,ht=Fe.indexOf("E")-Fe.indexOf(".")-1;if(Fe.match(/^#+0.0E\+0$/)){if(ye==0)return"0.0E+0";if(ye<0)return"-"+ae(Fe,-ye);var De=Fe.indexOf(".");De===-1&&(De=Fe.indexOf("E"));var Pe=Math.floor(Math.log(ye)*Math.LOG10E)%De;if(Pe<0&&(Pe+=De),be=(ye/Math.pow(10,Pe)).toPrecision(ht+1+(De+Pe)%De),be.indexOf("e")===-1){var Dt=Math.floor(Math.log(ye)*Math.LOG10E);for(be.indexOf(".")===-1?be=be.charAt(0)+"."+be.substr(1)+"E+"+(Dt-be.length+Pe):be+="E+"+(Dt-Pe);be.substr(0,2)==="0.";)be=be.charAt(0)+be.substr(2,De)+"."+be.substr(2+De),be=be.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");be=be.replace(/\+-/,"-")}be=be.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(gt,ol,sl,Vt){return ol+sl+Vt.substr(0,(De+Pe)%De)+"."+Vt.substr(Pe)+"E"})}else be=ye.toExponential(ht);return Fe.match(/E\+00$/)&&be.match(/e[+-]\d$/)&&(be=be.substr(0,be.length-1)+"0"+be.charAt(be.length-1)),Fe.match(/E\-/)&&be.match(/e\+/)&&(be=be.replace(/e\+/,"e")),be.replace("e","E")}var Te=/# (\?+)( ?)\/( ?)(\d+)/;function ie(Fe,ye,be){var ht=parseInt(Fe[4],10),De=Math.round(ye*ht),Pe=Math.floor(De/ht),Dt=De-Pe*ht,gt=ht;return be+(Pe===0?"":""+Pe)+" "+(Dt===0?l(" ",Fe[1].length+1+Fe[4].length):o(Dt,Fe[1].length)+Fe[2]+"/"+Fe[3]+a(gt,Fe[4].length))}function Ee(Fe,ye,be){return be+(ye===0?"":""+ye)+l(" ",Fe[1].length+2+Fe[4].length)}var je=/^#*0*\.([0#]+)/,Ce=/\).*[0#]/,Le=/\(###\) ###\\?-####/;function Ge(Fe){for(var ye="",be,ht=0;ht!=Fe.length;++ht)switch(be=Fe.charCodeAt(ht)){case 35:break;case 63:ye+=" ";break;case 48:ye+="0";break;default:ye+=String.fromCharCode(be)}return ye}function Ne(Fe,ye){var be=Math.pow(10,ye);return""+Math.round(Fe*be)/be}function et(Fe,ye){var be=Fe-Math.floor(Fe),ht=Math.pow(10,ye);return ye<(""+Math.round(be*ht)).length?0:Math.round(be*ht)}function vt(Fe,ye){return ye<(""+Math.round((Fe-Math.floor(Fe))*Math.pow(10,ye))).length?1:0}function It(Fe){return Fe<2147483647&&Fe>-2147483648?""+(Fe>=0?Fe|0:Fe-1|0):""+Math.floor(Fe)}function ot(Fe,ye,be){if(Fe.charCodeAt(0)===40&&!ye.match(Ce)){var ht=ye.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return be>=0?ot("n",ht,be):"("+ot("n",ht,-be)+")"}if(ye.charCodeAt(ye.length-1)===44)return pe(Fe,ye,be);if(ye.indexOf("%")!==-1)return ee(Fe,ye,be);if(ye.indexOf("E")!==-1)return ae(ye,be);if(ye.charCodeAt(0)===36)return"$"+ot(Fe,ye.substr(ye.charAt(1)==" "?2:1),be);var De,Pe,Dt,gt,ol=Math.abs(be),sl=be<0?"-":"";if(ye.match(/^00+$/))return sl+m(ol,ye.length);if(ye.match(/^[#?]+$/))return De=m(be,0),De==="0"&&(De=""),De.length>ye.length?De:Ge(ye.substr(0,ye.length-De.length))+De;if(Pe=ye.match(Te))return ie(Pe,ol,sl);if(ye.match(/^#+0+$/))return sl+m(ol,ye.length-ye.indexOf("0"));if(Pe=ye.match(je))return De=Ne(be,Pe[1].length).replace(/^([^\.]+)$/,"$1."+Ge(Pe[1])).replace(/\.$/,"."+Ge(Pe[1])).replace(/\.(\d*)$/,function(Wl,Kn){return"."+Kn+l("0",Ge(Pe[1]).length-Kn.length)}),ye.indexOf("0.")!==-1?De:De.replace(/^0\./,".");if(ye=ye.replace(/^#+([0.])/,"$1"),Pe=ye.match(/^(0*)\.(#*)$/))return sl+Ne(ol,Pe[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,Pe[1].length?"0.":".");if(Pe=ye.match(/^#{1,3},##0(\.?)$/))return sl+O(m(ol,0));if(Pe=ye.match(/^#,##0\.([#0]*0)$/))return be<0?"-"+ot(Fe,ye,-be):O(""+(Math.floor(be)+vt(be,Pe[1].length)))+"."+a(et(be,Pe[1].length),Pe[1].length);if(Pe=ye.match(/^#,#*,#0/))return ot(Fe,ye.replace(/^#,#*,/,""),be);if(Pe=ye.match(/^([0#]+)(\\?-([0#]+))+$/))return De=t(ot(Fe,ye.replace(/[\\-]/g,""),be)),Dt=0,t(t(ye.replace(/\\/g,"")).replace(/[0#]/g,function(Wl){return Dt<De.length?De.charAt(Dt++):Wl==="0"?"0":""}));if(ye.match(Le))return De=ot(Fe,"##########",be),"("+De.substr(0,3)+") "+De.substr(3,3)+"-"+De.substr(6);var Vt="";if(Pe=ye.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return Dt=Math.min(Pe[4].length,7),gt=S(ol,Math.pow(10,Dt)-1,!1),De=""+sl,Vt=V("n",Pe[1],gt[1]),Vt.charAt(Vt.length-1)==" "&&(Vt=Vt.substr(0,Vt.length-1)+"0"),De+=Vt+Pe[2]+"/"+Pe[3],Vt=s(gt[2],Dt),Vt.length<Pe[4].length&&(Vt=Ge(Pe[4].substr(Pe[4].length-Vt.length))+Vt),De+=Vt,De;if(Pe=ye.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return Dt=Math.min(Math.max(Pe[1].length,Pe[4].length),7),gt=S(ol,Math.pow(10,Dt)-1,!0),sl+(gt[0]||(gt[1]?"":"0"))+" "+(gt[1]?o(gt[1],Dt)+Pe[2]+"/"+Pe[3]+s(gt[2],Dt):l(" ",2*Dt+1+Pe[2].length+Pe[3].length));if(Pe=ye.match(/^[#0?]+$/))return De=m(be,0),ye.length<=De.length?De:Ge(ye.substr(0,ye.length-De.length))+De;if(Pe=ye.match(/^([#0?]+)\.([#0]+)$/)){De=""+be.toFixed(Math.min(Pe[2].length,10)).replace(/([^0])0+$/,"$1"),Dt=De.indexOf(".");var Kr=ye.indexOf(".")-Dt,Xn=ye.length-De.length-Kr;return Ge(ye.substr(0,Kr)+De+ye.substr(ye.length-Xn))}if(Pe=ye.match(/^00,000\.([#0]*0)$/))return Dt=et(be,Pe[1].length),be<0?"-"+ot(Fe,ye,-be):O(It(be)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(Wl){return"00,"+(Wl.length<3?a(0,3-Wl.length):"")+Wl})+"."+a(Dt,Pe[1].length);switch(ye){case"###,##0.00":return ot(Fe,"#,##0.00",be);case"###,###":case"##,###":case"#,###":var Gl=O(m(ol,0));return Gl!=="0"?sl+Gl:"";case"###,###.00":return ot(Fe,"###,##0.00",be).replace(/^0\./,".");case"#,###.00":return ot(Fe,"#,##0.00",be).replace(/^0\./,".");default:}throw new Error("unsupported format |"+ye+"|")}function kt(Fe,ye,be){for(var ht=ye.length-1;ye.charCodeAt(ht-1)===44;)--ht;return V(Fe,ye.substr(0,ht),be/Math.pow(10,3*(ye.length-ht)))}function qe(Fe,ye,be){var ht=ye.replace(G,""),De=ye.length-ht.length;return V(Fe,ht,be*Math.pow(10,2*De))+l("%",De)}function Se(Fe,ye){var be,ht=Fe.indexOf("E")-Fe.indexOf(".")-1;if(Fe.match(/^#+0.0E\+0$/)){if(ye==0)return"0.0E+0";if(ye<0)return"-"+Se(Fe,-ye);var De=Fe.indexOf(".");De===-1&&(De=Fe.indexOf("E"));var Pe=Math.floor(Math.log(ye)*Math.LOG10E)%De;if(Pe<0&&(Pe+=De),be=(ye/Math.pow(10,Pe)).toPrecision(ht+1+(De+Pe)%De),!be.match(/[Ee]/)){var Dt=Math.floor(Math.log(ye)*Math.LOG10E);be.indexOf(".")===-1?be=be.charAt(0)+"."+be.substr(1)+"E+"+(Dt-be.length+Pe):be+="E+"+(Dt-Pe),be=be.replace(/\+-/,"-")}be=be.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(gt,ol,sl,Vt){return ol+sl+Vt.substr(0,(De+Pe)%De)+"."+Vt.substr(Pe)+"E"})}else be=ye.toExponential(ht);return Fe.match(/E\+00$/)&&be.match(/e[+-]\d$/)&&(be=be.substr(0,be.length-1)+"0"+be.charAt(be.length-1)),Fe.match(/E\-/)&&be.match(/e\+/)&&(be=be.replace(/e\+/,"e")),be.replace("e","E")}function Ke(Fe,ye,be){if(Fe.charCodeAt(0)===40&&!ye.match(Ce)){var ht=ye.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return be>=0?Ke("n",ht,be):"("+Ke("n",ht,-be)+")"}if(ye.charCodeAt(ye.length-1)===44)return kt(Fe,ye,be);if(ye.indexOf("%")!==-1)return qe(Fe,ye,be);if(ye.indexOf("E")!==-1)return Se(ye,be);if(ye.charCodeAt(0)===36)return"$"+Ke(Fe,ye.substr(ye.charAt(1)==" "?2:1),be);var De,Pe,Dt,gt,ol=Math.abs(be),sl=be<0?"-":"";if(ye.match(/^00+$/))return sl+a(ol,ye.length);if(ye.match(/^[#?]+$/))return De=""+be,be===0&&(De=""),De.length>ye.length?De:Ge(ye.substr(0,ye.length-De.length))+De;if(Pe=ye.match(Te))return Ee(Pe,ol,sl);if(ye.match(/^#+0+$/))return sl+a(ol,ye.length-ye.indexOf("0"));if(Pe=ye.match(je))return De=(""+be).replace(/^([^\.]+)$/,"$1."+Ge(Pe[1])).replace(/\.$/,"."+Ge(Pe[1])),De=De.replace(/\.(\d*)$/,function(Wl,Kn){return"."+Kn+l("0",Ge(Pe[1]).length-Kn.length)}),ye.indexOf("0.")!==-1?De:De.replace(/^0\./,".");if(ye=ye.replace(/^#+([0.])/,"$1"),Pe=ye.match(/^(0*)\.(#*)$/))return sl+(""+ol).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,Pe[1].length?"0.":".");if(Pe=ye.match(/^#{1,3},##0(\.?)$/))return sl+O(""+ol);if(Pe=ye.match(/^#,##0\.([#0]*0)$/))return be<0?"-"+Ke(Fe,ye,-be):O(""+be)+"."+l("0",Pe[1].length);if(Pe=ye.match(/^#,#*,#0/))return Ke(Fe,ye.replace(/^#,#*,/,""),be);if(Pe=ye.match(/^([0#]+)(\\?-([0#]+))+$/))return De=t(Ke(Fe,ye.replace(/[\\-]/g,""),be)),Dt=0,t(t(ye.replace(/\\/g,"")).replace(/[0#]/g,function(Wl){return Dt<De.length?De.charAt(Dt++):Wl==="0"?"0":""}));if(ye.match(Le))return De=Ke(Fe,"##########",be),"("+De.substr(0,3)+") "+De.substr(3,3)+"-"+De.substr(6);var Vt="";if(Pe=ye.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return Dt=Math.min(Pe[4].length,7),gt=S(ol,Math.pow(10,Dt)-1,!1),De=""+sl,Vt=V("n",Pe[1],gt[1]),Vt.charAt(Vt.length-1)==" "&&(Vt=Vt.substr(0,Vt.length-1)+"0"),De+=Vt+Pe[2]+"/"+Pe[3],Vt=s(gt[2],Dt),Vt.length<Pe[4].length&&(Vt=Ge(Pe[4].substr(Pe[4].length-Vt.length))+Vt),De+=Vt,De;if(Pe=ye.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return Dt=Math.min(Math.max(Pe[1].length,Pe[4].length),7),gt=S(ol,Math.pow(10,Dt)-1,!0),sl+(gt[0]||(gt[1]?"":"0"))+" "+(gt[1]?o(gt[1],Dt)+Pe[2]+"/"+Pe[3]+s(gt[2],Dt):l(" ",2*Dt+1+Pe[2].length+Pe[3].length));if(Pe=ye.match(/^[#0?]+$/))return De=""+be,ye.length<=De.length?De:Ge(ye.substr(0,ye.length-De.length))+De;if(Pe=ye.match(/^([#0]+)\.([#0]+)$/)){De=""+be.toFixed(Math.min(Pe[2].length,10)).replace(/([^0])0+$/,"$1"),Dt=De.indexOf(".");var Kr=ye.indexOf(".")-Dt,Xn=ye.length-De.length-Kr;return Ge(ye.substr(0,Kr)+De+ye.substr(ye.length-Xn))}if(Pe=ye.match(/^00,000\.([#0]*0)$/))return be<0?"-"+Ke(Fe,ye,-be):O(""+be).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(Wl){return"00,"+(Wl.length<3?a(0,3-Wl.length):"")+Wl})+"."+a(0,Pe[1].length);switch(ye){case"###,###":case"##,###":case"#,###":var Gl=O(""+ol);return Gl!=="0"?sl+Gl:"";default:if(ye.match(/\.[0#?]*$/))return Ke(Fe,ye.slice(0,ye.lastIndexOf(".")),be)+Ge(ye.slice(ye.lastIndexOf(".")))}throw new Error("unsupported format |"+ye+"|")}return function(ye,be,ht){return(ht|0)===ht?Ke(ye,be,ht):ot(ye,be,ht)}}();function q(K){for(var G=[],ee=!1,pe=0,ae=0;pe<K.length;++pe)switch(K.charCodeAt(pe)){case 34:ee=!ee;break;case 95:case 42:case 92:++pe;break;case 59:G[G.length]=K.substr(ae,pe-ae),ae=pe+1}if(G[G.length]=K.substr(ae),ee===!0)throw new Error("Format |"+K+"| unterminated string ");return G}n._split=q;var W=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function X(K){for(var G=0,ee="",pe="";G<K.length;)switch(ee=K.charAt(G)){case"G":g(K,G)&&(G+=6),G++;break;case'"':for(;K.charCodeAt(++G)!==34&&G<K.length;);++G;break;case"\\":G+=2;break;case"_":G+=2;break;case"@":++G;break;case"B":case"b":if(K.charAt(G+1)==="1"||K.charAt(G+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"\u4E0A":if(K.substr(G,3).toUpperCase()==="A/P"||K.substr(G,5).toUpperCase()==="AM/PM"||K.substr(G,5).toUpperCase()==="\u4E0A\u5348/\u4E0B\u5348")return!0;++G;break;case"[":for(pe=ee;K.charAt(G++)!=="]"&&G<K.length;)pe+=K.charAt(G);if(pe.match(W))return!0;break;case".":case"0":case"#":for(;G<K.length&&("0#?.,E+-%".indexOf(ee=K.charAt(++G))>-1||ee=="\\"&&K.charAt(G+1)=="-"&&"0#".indexOf(K.charAt(G+2))>-1););break;case"?":for(;K.charAt(++G)===ee;);break;case"*":++G,(K.charAt(G)==" "||K.charAt(G)=="*")&&++G;break;case"(":case")":++G;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;G<K.length&&"0123456789".indexOf(K.charAt(++G))>-1;);break;case" ":++G;break;default:++G;break}return!1}n.is_date=X;function te(K,G,ee,pe){for(var ae=[],Te="",ie=0,Ee="",je="t",Ce,Le,Ge,Ne="H";ie<K.length;)switch(Ee=K.charAt(ie)){case"G":if(!g(K,ie))throw new Error("unrecognized character "+Ee+" in "+K);ae[ae.length]={t:"G",v:"General"},ie+=7;break;case'"':for(Te="";(Ge=K.charCodeAt(++ie))!==34&&ie<K.length;)Te+=String.fromCharCode(Ge);ae[ae.length]={t:"t",v:Te},++ie;break;case"\\":var et=K.charAt(++ie),vt=et==="("||et===")"?et:"t";ae[ae.length]={t:vt,v:et},++ie;break;case"_":ae[ae.length]={t:"t",v:" "},ie+=2;break;case"@":ae[ae.length]={t:"T",v:G},++ie;break;case"B":case"b":if(K.charAt(ie+1)==="1"||K.charAt(ie+1)==="2"){if(Ce==null&&(Ce=_(G,ee,K.charAt(ie+1)==="2"),Ce==null))return"";ae[ae.length]={t:"X",v:K.substr(ie,2)},je=Ee,ie+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":Ee=Ee.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(G<0)return"";if(Ce==null&&(Ce=_(G,ee),Ce==null))return"#####";for(Te=Ee;++ie<K.length&&K.charAt(ie).toLowerCase()===Ee;)Te+=Ee;Ee==="m"&&je.toLowerCase()==="h"&&(Ee="M"),Ee==="h"&&(Ee=Ne),ae[ae.length]={t:Ee,v:Te},je=Ee;break;case"A":case"a":case"\u4E0A":var It={t:Ee,v:Ee};if(Ce==null&&(Ce=_(G,ee)),K.substr(ie,3).toUpperCase()==="A/P"?(Ce!=null&&(It.v=Ce.H>=12?"P":"A"),It.t="T",Ne="h",ie+=3):K.substr(ie,5).toUpperCase()==="AM/PM"?(Ce!=null&&(It.v=Ce.H>=12?"PM":"AM"),It.t="T",ie+=5,Ne="h"):K.substr(ie,5).toUpperCase()==="\u4E0A\u5348/\u4E0B\u5348"?(Ce!=null&&(It.v=Ce.H>=12?"\u4E0B\u5348":"\u4E0A\u5348"),It.t="T",ie+=5,Ne="h"):(It.t="t",++ie),Ce==null&&It.t==="T")return"";ae[ae.length]=It,je=Ee;break;case"[":for(Te=Ee;K.charAt(ie++)!=="]"&&ie<K.length;)Te+=K.charAt(ie);if(Te.slice(-1)!=="]")throw'unterminated "[" block: |'+Te+"|";if(Te.match(W)){if(Ce==null&&(Ce=_(G,ee),Ce==null))return"";ae[ae.length]={t:"Z",v:Te.toLowerCase()},je=Te.charAt(1)}else Te.indexOf("$")>-1&&(Te=(Te.match(/\$([^-\[\]]*)/)||[])[1]||"$",X(K)||(ae[ae.length]={t:"t",v:Te}));break;case".":if(Ce!=null){for(Te=Ee;++ie<K.length&&(Ee=K.charAt(ie))==="0";)Te+=Ee;ae[ae.length]={t:"s",v:Te};break}case"0":case"#":for(Te=Ee;++ie<K.length&&"0#?.,E+-%".indexOf(Ee=K.charAt(ie))>-1;)Te+=Ee;ae[ae.length]={t:"n",v:Te};break;case"?":for(Te=Ee;K.charAt(++ie)===Ee;)Te+=Ee;ae[ae.length]={t:Ee,v:Te},je=Ee;break;case"*":++ie,(K.charAt(ie)==" "||K.charAt(ie)=="*")&&++ie;break;case"(":case")":ae[ae.length]={t:pe===1?"t":Ee,v:Ee},++ie;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(Te=Ee;ie<K.length&&"0123456789".indexOf(K.charAt(++ie))>-1;)Te+=K.charAt(ie);ae[ae.length]={t:"D",v:Te};break;case" ":ae[ae.length]={t:Ee,v:Ee},++ie;break;case"$":ae[ae.length]={t:"t",v:"$"},++ie;break;default:if("\xA4\u0E3FBsBr\u20B5\u20A1\u20AB\u0192FtRs.\u20ADkr\xA3\u20A4Lm\u20A5\u20A6\u20B1PQRSkRp\u09F2\u09F3R$S/.\u3012\u20AE\u20A9\xA5NT\uFFE5z\u0142\u20B4\u20AA\u17DB\u0440\u0443\u0431\u20AC\uFF04,$-+/():!^&'~{}<>=\u20ACacfijklopqrtuvwxzP$\uFFE5LekdinAf$dhAflRial?\uFFE1BirrKzMOPPGKRsGsB/R$\u0440\u0440levkrKMzBsPNuFBuKPkrRD$NfkCFA?CVEGMDFrCDHTGNAfLFdjKGSFGGHSRielKCFknKshLSLL\uFFE1LtRFRONArRfMWKRMMURsMROS/KMDLMTnRC$kr\u20ACGELCHFSLLSCRDbSZLSDGSOSSomFCFPTShT$VUVQUGX\u0433\u0440\u043DsomWSTNT$FtDramRpZMWFCFA".indexOf(Ee)===-1)throw new Error("unrecognized character "+Ee+" in "+K);ae[ae.length]={t:"t",v:Ee},++ie;break}var ot=0,kt=0,qe;for(ie=ae.length-1,je="t";ie>=0;--ie)switch(ae[ie].t){case"h":case"H":ae[ie].t=Ne,je="h",ot<1&&(ot=1);break;case"s":(qe=ae[ie].v.match(/\.0+$/))&&(kt=Math.max(kt,qe[0].length-1)),ot<3&&(ot=3);case"d":case"y":case"M":case"e":je=ae[ie].t;break;case"m":je==="s"&&(ae[ie].t="M",ot<2&&(ot=2));break;case"X":break;case"Z":ot<1&&ae[ie].v.match(/[Hh]/)&&(ot=1),ot<2&&ae[ie].v.match(/[Mm]/)&&(ot=2),ot<3&&ae[ie].v.match(/[Ss]/)&&(ot=3)}switch(ot){case 0:break;case 1:Ce.u>=.5&&(Ce.u=0,++Ce.S),Ce.S>=60&&(Ce.S=0,++Ce.M),Ce.M>=60&&(Ce.M=0,++Ce.H);break;case 2:Ce.u>=.5&&(Ce.u=0,++Ce.S),Ce.S>=60&&(Ce.S=0,++Ce.M);break}var Se="",Ke;for(ie=0;ie<ae.length;++ie)switch(ae[ie].t){case"t":case"T":case" ":case"D":break;case"X":ae[ie].v="",ae[ie].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":ae[ie].v=L(ae[ie].t.charCodeAt(0),ae[ie].v,Ce,kt),ae[ie].t="t";break;case"n":case"?":for(Ke=ie+1;ae[Ke]!=null&&((Ee=ae[Ke].t)==="?"||Ee==="D"||(Ee===" "||Ee==="t")&&ae[Ke+1]!=null&&(ae[Ke+1].t==="?"||ae[Ke+1].t==="t"&&ae[Ke+1].v==="/")||ae[ie].t==="("&&(Ee===" "||Ee==="n"||Ee===")")||Ee==="t"&&(ae[Ke].v==="/"||ae[Ke].v===" "&&ae[Ke+1]!=null&&ae[Ke+1].t=="?"));)ae[ie].v+=ae[Ke].v,ae[Ke]={v:"",t:";"},++Ke;Se+=ae[ie].v,ie=Ke-1;break;case"G":ae[ie].t="t",ae[ie].v=M(G,ee);break}var Fe="",ye,be;if(Se.length>0){Se.charCodeAt(0)==40?(ye=G<0&&Se.charCodeAt(0)===45?-G:G,be=V("n",Se,ye)):(ye=G<0&&pe>1?-G:G,be=V("n",Se,ye),ye<0&&ae[0]&&ae[0].t=="t"&&(be=be.substr(1),ae[0].v="-"+ae[0].v)),Ke=be.length-1;var ht=ae.length;for(ie=0;ie<ae.length;++ie)if(ae[ie]!=null&&ae[ie].t!="t"&&ae[ie].v.indexOf(".")>-1){ht=ie;break}var De=ae.length;if(ht===ae.length&&be.indexOf("E")===-1){for(ie=ae.length-1;ie>=0;--ie)ae[ie]==null||"n?".indexOf(ae[ie].t)===-1||(Ke>=ae[ie].v.length-1?(Ke-=ae[ie].v.length,ae[ie].v=be.substr(Ke+1,ae[ie].v.length)):Ke<0?ae[ie].v="":(ae[ie].v=be.substr(0,Ke+1),Ke=-1),ae[ie].t="t",De=ie);Ke>=0&&De<ae.length&&(ae[De].v=be.substr(0,Ke+1)+ae[De].v)}else if(ht!==ae.length&&be.indexOf("E")===-1){for(Ke=be.indexOf(".")-1,ie=ht;ie>=0;--ie)if(!(ae[ie]==null||"n?".indexOf(ae[ie].t)===-1)){for(Le=ae[ie].v.indexOf(".")>-1&&ie===ht?ae[ie].v.indexOf(".")-1:ae[ie].v.length-1,Fe=ae[ie].v.substr(Le+1);Le>=0;--Le)Ke>=0&&(ae[ie].v.charAt(Le)==="0"||ae[ie].v.charAt(Le)==="#")&&(Fe=be.charAt(Ke--)+Fe);ae[ie].v=Fe,ae[ie].t="t",De=ie}for(Ke>=0&&De<ae.length&&(ae[De].v=be.substr(0,Ke+1)+ae[De].v),Ke=be.indexOf(".")+1,ie=ht;ie<ae.length;++ie)if(!(ae[ie]==null||"n?(".indexOf(ae[ie].t)===-1&&ie!==ht)){for(Le=ae[ie].v.indexOf(".")>-1&&ie===ht?ae[ie].v.indexOf(".")+1:0,Fe=ae[ie].v.substr(0,Le);Le<ae[ie].v.length;++Le)Ke<be.length&&(Fe+=be.charAt(Ke++));ae[ie].v=Fe,ae[ie].t="t",De=ie}}}for(ie=0;ie<ae.length;++ie)ae[ie]!=null&&"n?".indexOf(ae[ie].t)>-1&&(ye=pe>1&&G<0&&ie>0&&ae[ie-1].v==="-"?-G:G,ae[ie].v=V(ae[ie].t,ae[ie].v,ye),ae[ie].t="t");var Pe="";for(ie=0;ie!==ae.length;++ie)ae[ie]!=null&&(Pe+=ae[ie].v);return Pe}n._eval=te;var le=/\[[=<>]/,oe=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function se(K,G){if(G==null)return!1;var ee=parseFloat(G[2]);switch(G[1]){case"=":if(K==ee)return!0;break;case">":if(K>ee)return!0;break;case"<":if(K<ee)return!0;break;case"<>":if(K!=ee)return!0;break;case">=":if(K>=ee)return!0;break;case"<=":if(K<=ee)return!0;break}return!1}function ce(K,G){var ee=q(K),pe=ee.length,ae=ee[pe-1].indexOf("@");if(pe<4&&ae>-1&&--pe,ee.length>4)throw new Error("cannot find right format for |"+ee.join("|")+"|");if(typeof G!="number")return[4,ee.length===4||ae>-1?ee[ee.length-1]:"@"];switch(ee.length){case 1:ee=ae>-1?["General","General","General",ee[0]]:[ee[0],ee[0],ee[0],"@"];break;case 2:ee=ae>-1?[ee[0],ee[0],ee[0],ee[1]]:[ee[0],ee[1],ee[0],"@"];break;case 3:ee=ae>-1?[ee[0],ee[1],ee[0],ee[2]]:[ee[0],ee[1],ee[2],"@"];break;case 4:break}var Te=G>0?ee[0]:G<0?ee[1]:ee[2];if(ee[0].indexOf("[")===-1&&ee[1].indexOf("[")===-1)return[pe,Te];if(ee[0].match(le)!=null||ee[1].match(le)!=null){var ie=ee[0].match(oe),Ee=ee[1].match(oe);return se(G,ie)?[pe,ee[0]]:se(G,Ee)?[pe,ee[1]]:[pe,ee[ie!=null&&Ee!=null?2:1]]}return[pe,Te]}function he(K,G,ee){ee==null&&(ee={});var pe="";switch(typeof K){case"string":K=="m/d/yy"&&ee.dateNF?pe=ee.dateNF:pe=K;break;case"number":K==14&&ee.dateNF?pe=ee.dateNF:pe=(ee.table!=null?ee.table:k)[K],pe==null&&(pe=ee.table&&ee.table[w[K]]||k[w[K]]),pe==null&&(pe=C[K]||"General");break}var ae=/^(w|W)((0?)|(0\.0+))$/;if(pe.match(ae)){if(isNaN(G))return G;var Te=pe.slice(1),ie=!1;!isNaN(G)&&Number(G)<0&&(ie=!0,G=Math.abs(G));var Ee=parseInt(G),je=Ee.toString().length;if(je>4){if(je>8){var Ce=parseInt(G/1e8),Le=parseInt(parseFloat(G).subtract(Ce*1e8)/1e4),Ge=parseFloat(G).subtract(Ce*1e8+Le*1e4);Te!=""&&(Ge=(0,Br.default)(Ge).format(Te)),G=Ce+"\u4EBF"+Le+"\u4E07"+Ge}else{var Le=parseInt(G/1e4),Ge=parseFloat(G).subtract(Le*1e4);Te!=""&&(Ge=(0,Br.default)(Ge).format(Te)),G=Le+"\u4E07"+Ge}if(G.indexOf("\u4EBF0\u4E070")!=-1?G=G.replace("0\u4E070",""):G.indexOf("\u4EBF0\u4E07")!=-1?G=G.replace("0\u4E07",""):G.indexOf("\u4E070")!=-1&&(G=G.replace("\u4E070","\u4E07")),G.indexOf("\u4EBF")!=-1&&G.indexOf("\u4E07")==-1){var Ne=G.substring(G.indexOf("\u4EBF")+1);if(Ne.substring(0,1)!=="."&&Ne!=""){switch((parseInt(Ne)+"").length){case 1:Ne="000"+Ne;break;case 2:Ne="00"+Ne;break;case 3:Ne="0"+Ne;break}G=G.substring(0,G.indexOf("\u4EBF")+1)+Ne}}else if(G.indexOf("\u4EBF")==-1&&G.indexOf("\u4E07")!=-1){var et=G.substring(G.indexOf("\u4E07")+1);if(et.substring(0,1)!=="."&&et!=""){switch((parseInt(et)+"").length){case 1:et="000"+et;break;case 2:et="00"+et;break;case 3:et="0"+et;break}G=G.substring(0,G.indexOf("\u4E07")+1)+et}}else if(G.indexOf("\u4EBF")!=-1&&G.indexOf("\u4E07")!=-1){var Ne=G.substring(G.indexOf("\u4EBF")+1,G.indexOf("\u4E07")),et=G.substring(G.indexOf("\u4E07")+1);switch((parseInt(Ne)+"").length){case 1:Ne="000"+Ne;break;case 2:Ne="00"+Ne;break;case 3:Ne="0"+Ne;break}if(G=G.substring(0,G.indexOf("\u4EBF")+1)+Ne+G.substring(G.indexOf("\u4E07")),et.substring(0,1)!=="."&&et!=""){switch((parseInt(et)+"").length){case 1:et="000"+et;break;case 2:et="00"+et;break;case 3:et="0"+et;break}G=G.substring(0,G.indexOf("\u4E07")+1)+et}}}else Te!=""&&(G=(0,Br.default)(G).format(Te));return ie?"-"+G:G}if(g(pe,0))return M(G,ee);G instanceof Date&&(G=I(G,ee.date1904));var vt=ce(pe,G);if(g(vt[1]))return M(G,ee);if(G===!0)G="TRUE";else if(G===!1)G="FALSE";else if(G===""||G==null)return"";return te(vt[1],G,ee,vt[0])}function ue(K,G){if(typeof G!="number"){G=+G||-1;for(var ee=0;ee<392;++ee){if(k[ee]==null){G<0&&(G=ee);continue}if(k[ee]==K){G=ee;break}}G<0&&(G=391)}return k[G]=K,G}n.load=ue,n._table=k,n.get_table=function(){return k},n.load_table=function(G){for(var ee=0;ee!=392;++ee)G[ee]!==void 0&&ue(G[ee],ee)},n.init_table=b,n.format=he};zy(kl);O1={"General Number":"General","General Date":kl._table[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":kl._table[15],"Short Date":kl._table[14],"Long Time":kl._table[19],"Medium Time":kl._table[18],"Short Time":kl._table[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:kl._table[2],Standard:kl._table[4],Percent:kl._table[10],Scientific:kl._table[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'},B1=function(){var e=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/g,n=/_x([\da-fA-F]{4})_/g;return function t(l){var a=l+"",o=a.indexOf("<![CDATA[");if(o==-1)return a.replace(e,function(u,d){return encodings[u]||String.fromCharCode(parseInt(d,u.indexOf("x")>-1?16:10))||u}).replace(n,function(u,d){return String.fromCharCode(parseInt(d,16))});var s=a.indexOf("]]>");return t(a.slice(0,o))+a.slice(o+9,s)+t(a.slice(s+3))}}(),Oy=new Date(1899,11,31,0,0,0),H1=Oy.getTime(),By=new Date(1900,2,1,0,0,0);vo=new Date("2017-02-19T19:06:09.000Z");isNaN(vo.getFullYear())&&(vo=new Date("2/19/17"));Hy=vo.getFullYear()==2017});function Ht(e,n,t,l){t==null&&(t=h.flowdata);let a=t[e][n],o;if(P(l)=="object"?(a==null?a=l:(l.f!=null?a.f=l.f:a.hasOwnProperty("f")&&delete a.f,l.spl!=null&&(a.spl=l.spl),l.ct!=null&&(a.ct=l.ct)),P(l.v)=="object"?o=l.v.v:o=l.v):o=l,me(o)){P(a)=="object"?(delete a.m,delete a.v):a=null,t[e][n]=a;return}(me(a)||(P(a)==="string"||P(a)==="number")&&a===l)&&(a={});let s=o.toString();if(s.substr(0,1)=="'")a.m=s.substr(1),a.ct={fa:"@",t:"s"},a.v=s.substr(1),a.qp=1;else if(a.qp==1)a.m=s,a.ct={fa:"@",t:"s"},a.v=s;else if(s.toUpperCase()==="TRUE")a.m="TRUE",a.ct={fa:"General",t:"b"},a.v=!0;else if(s.toUpperCase()==="FALSE")a.m="FALSE",a.ct={fa:"General",t:"b"},a.v=!1;else if(s.substr(-1)==="%"&&B(s.substring(0,s.length-1)))a.ct={fa:"0%",t:"n"},a.v=s.substring(0,s.length-1)/100,a.m=o;else if(H(o))a.m=s,a.ct!=null?a.ct.t="e":a.ct={fa:"General",t:"e"},a.v=o;else if(a.f!=null&&B(o)&&!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(o))if(a.v=parseFloat(o),a.ct==null&&(a.ct={fa:"General",t:"n"}),a.v==Infinity||a.v==-Infinity)a.m=a.v.toString();else if(a.v.toString().indexOf("e")>-1){let u;a.v.toString().split(".").length==1?u=0:u=a.v.toString().split(".")[1].split("e")[0].length,u>5&&(u=5),a.m=a.v.toExponential(u).toString()}else{let u=Math.round(a.v*1e9)/1e9;if(a.ct==null){let d=at(u);a.m=d[0].toString()}else{let d=mt(a.ct.fa,u);a.m=d.toString()}}else if(a.ct!=null&&a.ct.fa=="@")a.m=s,a.v=o;else if(a.ct!=null&&a.ct.fa!=null&&a.ct.fa!="General"){B(o)&&(o=parseFloat(o));let u=mt(a.ct.fa,o);u===o?(u=at(o),a.m=u[0].toString(),a.ct=u[1],a.v=u[2]):(a.m=u.toString(),a.v=o)}else if(B(o)&&!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(o))if(typeof o=="string"&&o.split("").every(d=>d=="0"||d==".")&&(o=parseFloat(o)),a.v=o,a.ct={fa:"General",t:"n"},a.v==Infinity||a.v==-Infinity)a.m=a.v.toString();else{let u=at(a.v);a.m=u[0].toString()}else{let u=at(o);a.m=u[0].toString(),a.ct=u[1],a.v=u[2]}if(!ne.allowUpdate&&!fe.pointEdit&&a.ct!=null&&/^(w|W)((0?)|(0\.0+))$/.test(a.ct.fa)==!1&&a.ct.t=="n"&&a.v!=null&&parseInt(a.v).toString().length>4){let u=fe.autoFormatw.toString().toUpperCase(),d=fe.accuracy,f=jy(u,d);f!="General"&&(a.ct.fa=f,a.m=mt(f,a.v))}t[e][n]=a}function jy(e,n){let t="0.",l;if(e=="TRUE"){if(n==null)return"w";{let a=parseInt(n);if(a==0)return"w0";t="w0.";for(let o=0;o<a;o++)t+="0";l=t}}else{if(n==null)return"General";{let a=parseInt(n);if(a==0)return"0";for(let o=0;o<a;o++)t+="0";l=t}}return l.toString()}var $r=Ie(()=>{dt();Ft();Al();Qt();xl();Xe()});function wl(){if(h.luckysheet_select_save.length==0)return;let e=Infinity,n=-Infinity,t=0,l=0,a=0;for(let u=0;u<h.luckysheet_select_save.length;u++){let d=Od(h.luckysheet_select_save[u]);for(let f=0;f<d.length;f++)for(let m=0;m<d[0].length;m++){if(me(d[f][m])||(l++,d[f][m].ct!=null&&d[f][m].ct.t=="d"))continue;let g=d[f][m].v;!B(g)||(g=parseFloat(g),t+=g,g<e&&(e=g),g>n&&(n=g))}}let o=Q().formula,s="";s+="<span>"+o.count+":"+l+"</span>",(isFinite(n)||isFinite(e))&&(s+="<span>"+o.sum+":"+mt("w",t)+"</span>",s+="<span>"+o.average+":"+mt("w",Math.round(t/l*1e4)/1e4)+"</span>"),isFinite(n)&&(s+="<span>"+o.max+":"+mt("w",n)+"</span>"),isFinite(e)&&(s+="<span>"+o.min+":"+mt("w",e)+"</span>"),$("#luckysheet-sta-content").html(s)}var Pa=Ie(()=>{Xe();Kt();Ft();Al();bt()});function La(e,n,t,l,a){t==null&&(t=!0),e||(e="down"),n||(n="cell"),a==null&&(a=!1);let o=h.luckysheet_select_save[h.luckysheet_select_save.length-1],s=o.row==null?0:o.row[0],u=o.column==null?0:o.column[0],d=o.row==null?0:o.row[0],f=o.column==null?0:o.column[0],m=o.row==null?0:o.row[1],g=o.column==null?0:o.column[1];if(p.fucntionboxshow(s,u),n=="range"){var y=h.luckysheet_shiftpositon.row[0],v=h.luckysheet_shiftpositon.column[0];let S=h.luckysheet_shiftpositon.row[1],_=h.luckysheet_shiftpositon.column[1];e=="down"||e=="up"?S<m?s=o.row==null?0:o.row[1]:y>d?s=o.row==null?0:o.row[0]:S==m&&y==d&&(e=="down"?s=o.row==null?0:o.row[1]:s=o.row==null?0:o.row[0]):(e=="right"||e=="left")&&(_<g?u=o.column==null?0:o.column[1]:v>f?u=o.column==null?0:o.column[0]:_==g&&v==f&&(e=="right"?u=o.column==null?0:o.column[1]:u=o.column==null?0:o.column[0]))}let b=h.flowdata.length,k=h.flowdata[0].length,w=h.flowdata,x="",C=0;if(e=="up"){if(s==0)return;{let S=[],_=null,T=0,A=null;for(let R=f;R<=g;R++){S=[],T=0;for(let I=s-1;I>=0;I--){let F=w[I][R];if(P(F)=="object"&&me(F.v)||me(F)?S.push(!1):S.push(!0),S.length>1){if(S[T]==!0&&S[T-1]==!1){_=I;break}else if(S[T]==!1&&S[T-1]==!0){_=I+1;break}}T++}_==null&&(_=0),(A==null||_<A)&&(A=_)}x="down",C=A-s}}else if(e=="down"){if(s==b-1)return;{let S=[],_=null,T=0,A=null;for(let R=f;R<=g;R++){S=[],T=0;for(let I=s+1;I<w.length;I++){let F=w[I][R];if(P(F)=="object"&&me(F.v)||me(F)?S.push(!1):S.push(!0),S.length>1){if(S[T]==!0&&S[T-1]==!1){_=I;break}else if(S[T]==!1&&S[T-1]==!0){_=I-1;break}}T++}_==null&&(_=w.length-1),(A==null||_>A)&&(A=_)}x="down",C=A-s}}else if(e=="left"){if(u==0)return;{let S=[],_=null,T=0,A=null;for(let R=d;R<=m;R++){S=[],T=0;for(let I=u-1;I>=0;I--){let F=w[R][I];if(P(F)=="object"&&me(F.v)||me(F)?S.push(!1):S.push(!0),S.length>1){if(S[T]==!0&&S[T-1]==!1){_=I;break}else if(S[T]==!1&&S[T-1]==!0){_=I+1;break}}T++}_==null&&(_=0),(A==null||_<A)&&(A=_)}x="right",C=A-u}}else if(e=="right"){if(u==k-1)return;{let S=[],_=null,T=0,A=null;for(let R=d;R<=m;R++){S=[],T=0;for(let I=u+1;I<w[0].length;I++){let F=w[R][I];if(P(F)=="object"&&me(F.v)||me(F)?S.push(!1):S.push(!0),S.length>1){if(S[T]==!0&&S[T-1]==!1){_=I;break}else if(S[T]==!1&&S[T-1]==!0){_=I-1;break}}T++}_==null&&(_=w[0].length-1),(A==null||_>A)&&(A=_)}x="right",C=A-u}}if(n=="range"&&(e=="up"?p_endR<m&&C+s<p_endR&&(C=p_endR-s):e=="down"?y>d&&C+s>y&&(C=y-s):e=="left"?p_endC<g&&C+u<p_endC&&(C=p_endC-u):e=="right"&&v>f&&C+u>v&&(C=v-u),l!=null&&Math.abs(C)>Math.abs(l)&&(C=l)),!a)n=="cell"?jt(x,C,"rangeOfSelect",t):n=="range"&&Bn(x,C,"rangeOfSelect",t);else return C}function jt(e,n,t,l){l==null&&(l=!0),e||e=="down";let a=h.flowdata.length,o=h.flowdata[0].length,s,u,d,f,m,g,y,v;if(t=="rangeOfSelect"){let _=h.luckysheet_select_save[h.luckysheet_select_save.length-1],T;_.row_focus==null?T=_.row[0]:T=_.row_focus;let A;_.column_focus==null?A=_.column[0]:A=_.column_focus;let R=ke.mergeborer(h.flowdata,T,A);if(R){let M=R.row[2],E=R.row[3],N=R.column[2],L=R.column[3];n>0?e=="down"?(T=E,A=N):e=="right"&&(T=M,A=L):(T=M,A=N)}let I=_.moveXY==null?T:_.moveXY.x,F=_.moveXY==null?A:_.moveXY.y;e=="down"?(T+=n,I=T):e=="right"&&(A+=n,F=A),T>=a&&(T=a-1,I=T),T<0&&(T=0,I=T),A>=o&&(A=o-1,F=A),A<0&&(A=0,F=A);let z=ke.mergeborer(h.flowdata,T,A);z?(s=z.row[1],u=z.row[0],d=z.row[2],f=z.row[3],m=z.column[1],g=z.column[0],y=z.column[2],v=z.column[3]):(s=h.visibledatarow[I],u=I-1==-1?0:h.visibledatarow[I-1],m=h.visibledatacolumn[F],g=F-1==-1?0:h.visibledatacolumn[F-1],d=f=T,y=v=A),_.row=[d,f],_.column=[y,v],_.row_focus=d,_.column_focus=y,_.moveXY={x:I,y:F},lt(),Oe.pivotclick(d,y),p.fucntionboxshow(d,y)}else if(t=="rangeOfFormula"){let _=p.func_selectedrange,T;_.row_focus==null?T=_.row[0]:T=_.row_focus;let A;_.column_focus==null?A=_.column[0]:A=_.column_focus;let R=ke.mergeborer(h.flowdata,T,A);if(R){let M=R.row[2],E=R.row[3],N=R.column[2],L=R.column[3];n>0?e=="down"?(T=E,A=N):e=="right"&&(T=M,A=L):(T=M,A=N)}let I=_.moveXY==null?T:_.moveXY.x,F=_.moveXY==null?A:_.moveXY.y;e=="down"?(T+=n,I=T):e=="right"&&(A+=n,F=A),T>=a&&(T=a-1,I=T),T<0&&(T=0,I=T),A>=o&&(A=o-1,F=A),A<0&&(A=0,F=A);let z=ke.mergeborer(h.flowdata,T,A);z?(s=z.row[1],u=z.row[0],d=z.row[2],f=z.row[3],m=z.column[1],g=z.column[0],y=z.column[2],v=z.column[3]):(s=h.visibledatarow[I],u=I-1==-1?0:h.visibledatarow[I-1],d=I,f=I,m=h.visibledatacolumn[F],g=F-1==-1?0:h.visibledatacolumn[F-1],y=F,v=F),p.func_selectedrange={left:g,width:m-g-1,top:u,height:s-u-1,left_move:g,width_move:m-g-1,top_move:u,height_move:s-u-1,row:[d,f],column:[y,v],row_focus:d,column_focus:y,moveXY:{x:I,y:F}},$("#luckysheet-formula-functionrange-select").css({left:g,width:m-g-1,top:u,height:s-u-1}).show(),p.rangeSetValue({row:[d,f],column:[y,v]})}let b=$("#luckysheet-cell-main").scrollLeft(),k=$("#luckysheet-cell-main").scrollTop(),w=$("#luckysheet-cell-main").height(),x=$("#luckysheet-cell-main").width(),C=0,S=0;m-b-x+20>0?(C=m-x+20,l&&$("#luckysheet-scrollbar-x").scrollLeft(C)):g-b-20<0&&(C=g-20,l&&$("#luckysheet-scrollbar-x").scrollLeft(C)),s-k-w+20>0?(S=s-w+20,l&&$("#luckysheet-scrollbar-y").scrollTop(S)):u-k-20<0&&(S=u-20,l&&$("#luckysheet-scrollbar-y").scrollTop(S)),clearTimeout(h.countfuncTimeout),wl(),ne.saveParam("mv",h.currentSheetIndex,h.luckysheet_select_save)}function ca(e,n,t){t||(t=!0);let l,a,o,s;if(n=="rangeOfSelect"){let v=h.luckysheet_select_save[h.luckysheet_select_save.length-1],b=v.row_focus,k=v.column_focus,w=!1,x={};if(h.config.merge!=null&&b+"_"+k in h.config.merge&&(w=!0,x=h.config.merge[b+"_"+k]),e=="down"){if(b==h.flowdata.length-1)return;w?b=pt("down",k,x.r+x.rs-1,h.flowdata.length-1):b=pt("down",k,b,h.flowdata.length-1)}else if(e=="up"){if(b==0)return;w?b=pt("up",k,0,x.r):b=pt("up",k,0,b)}else if(e=="right"){if(k==h.flowdata[0].length-1)return;w?k=pt("right",b,x.c+x.cs-1,h.flowdata[0].length-1):k=pt("right",b,k,h.flowdata[0].length-1)}else if(e=="left"){if(k==0)return;w?k=pt("left",b,0,x.c):k=pt("left",b,0,k)}let C=[b,b],S=[k,k];l=h.visibledatarow[b],a=b-1==-1?0:h.visibledatarow[b-1],o=h.visibledatacolumn[k],s=k-1==-1?0:h.visibledatacolumn[k-1];let _=ke.mergeMoveMain(S,C,v,a,l-a-1,s,o-s-1);_!=null&&(S=_[0],C=_[1]),h.luckysheet_select_save=[{row:C,column:S}],lt(),Oe.pivotclick(b,k),p.fucntionboxshow(b,k)}else if(n=="rangeOfFormula"){let v=p.func_selectedrange,b=v.row_focus,k=v.column_focus,w=!1,x={};if(h.config.merge!=null&&b+"_"+k in h.config.merge&&(w=!0,x=h.config.merge[b+"_"+k]),e=="down"){if(b==h.flowdata.length-1)return;w?b=pt("down",k,x.r+x.rs-1,h.flowdata.length-1):b=pt("down",k,b,h.flowdata.length-1)}else if(e=="up"){if(b==0)return;w?b=pt("up",k,0,x.r):b=pt("up",k,0,b)}else if(e=="right"){if(k==h.flowdata[0].length-1)return;w?k=pt("right",b,x.c+x.cs-1,h.flowdata[0].length-1):k=pt("right",b,k,h.flowdata[0].length-1)}else if(e=="left"){if(k==0)return;w?k=pt("left",b,0,x.c):k=pt("left",b,0,k)}let C=[b,b],S=[k,k];l=h.visibledatarow[b],a=b-1==-1?0:h.visibledatarow[b-1],o=h.visibledatacolumn[k],s=k-1==-1?0:h.visibledatacolumn[k-1];let _=a,T=l-a-1,A=s,R=o-s-1,I=ke.mergeMoveMain(S,C,v,_,T,A,R);I!=null&&(S=I[0],C=I[1],_=I[2],T=I[3],A=I[4],R=I[5]),p.func_selectedrange={left:A,width:R,top:_,height:T,left_move:A,width_move:R,top_move:_,height_move:T,row:C,column:S,row_focus:b,column_focus:k},$("#luckysheet-formula-functionrange-select").css({left:A,width:R,top:_,height:T}).show(),p.rangeSetValue({row:C,column:S})}let u=$("#luckysheet-cell-main").scrollLeft(),d=$("#luckysheet-cell-main").scrollTop(),f=$("#luckysheet-cell-main").height(),m=$("#luckysheet-cell-main").width(),g=0,y=0;o-u-m+20>0?(g=o-m+20,t&&$("#luckysheet-scrollbar-x").scrollLeft(g)):s-u-20<0&&(g=s-20,t&&$("#luckysheet-scrollbar-x").scrollLeft(g)),l-d-f+20>0?(y=l-f+20,t&&$("#luckysheet-scrollbar-y").scrollTop(y)):a-d-20<0&&(y=a-20,t&&$("#luckysheet-scrollbar-y").scrollTop(y)),clearTimeout(h.countfuncTimeout),wl()}function Bn(e,n,t,l){l==null&&(l=!0),e||e=="down";let a,o,s,u;if(t=="rangeOfSelect"){let b=h.luckysheet_select_save[h.luckysheet_select_save.length-1],k=b.row[0],w=b.row[1],x=b.column[0],C=b.column[1],S=b.row_focus,_=b.column_focus,T=h.flowdata.length,A=h.flowdata[0].length;if(e=="down"){if(Bl(S,x,C)){let z=lr(S,x,C),M=z[0],E=z[1];M>k&&E==w?(n>0&&Bl(k,x,C)&&(k=lr(k,x,C)[1]),k+=n):E<w&&M==k?(n<0&&Bl(w,x,C)&&(w=lr(w,x,C)[0]),w+=n):n>0?w+=n:k+=n}else S>k&&S==w?(n>0&&Bl(k,x,C)&&(k=lr(k,x,C)[1]),k+=n):S<w&&S==k?(n<0&&Bl(w,x,C)&&(w=lr(w,x,C)[0]),w+=n):S==k&&S==w&&(n>0?w+=n:k+=n);w>=T&&(w=T-1),w<0&&(w=0),k>=T&&(k=T-1),k<0&&(k=0)}else{if(Hl(_,k,w)){let z=rr(_,k,w),M=z[0],E=z[1];M>x&&E==C?(n>0&&Hl(x,k,w)&&(x=rr(x,k,w)[1]),x+=n):E<C&&M==x?(n<0&&Hl(C,k,w)&&(C=rr(C,k,w)[0]),C+=n):n>0?C+=n:x+=n}else _>x&&_==C?(n>0&&Hl(x,k,w)&&(x=rr(x,k,w)[1]),x+=n):_<C&&_==x?(n<0&&Hl(C,k,w)&&(C=rr(C,k,w)[0]),C+=n):_==x&&_==C&&(n>0?C+=n:x+=n);C>=A&&(C=A-1),C<0&&(C=0),x>=A&&(x=A-1),x<0&&(x=0)}let R=[k,w],I=[x,C];a=h.visibledatarow[w],o=k-1==-1?0:h.visibledatarow[k-1],s=h.visibledatacolumn[C],u=x-1==-1?0:h.visibledatacolumn[x-1];let F=ke.mergeMoveMain(I,R,b,o,a-o-1,u,s-u-1);F!=null&&(I=F[0],R=F[1]),b.row=R,b.column=I,lt()}else if(t=="rangeOfFormula"){let b=p.func_selectedrange,k=b.row[0],w=b.row[1],x=b.column[0],C=b.column[1],S=b.row_focus,_=b.column_focus,T=h.flowdata.length,A=h.flowdata[0].length;if(e=="down"){if(Bl(S,x,C)){let L=lr(S,x,C),O=L[0],V=L[1];O>k&&V==w?(n>0&&Bl(k,x,C)&&(k=lr(k,x,C)[1]),k+=n):V<w&&O==k?(n<0&&Bl(w,x,C)&&(w=lr(w,x,C)[0]),w+=n):n>0?w+=n:k+=n}else S>k&&S==w?(n>0&&Bl(k,x,C)&&(k=lr(k,x,C)[1]),k+=n):S<w&&S==k?(n<0&&Bl(w,x,C)&&(w=lr(w,x,C)[0]),w+=n):S==k&&S==w&&(n>0?w+=n:k+=n);w>=T&&(w=T-1),w<0&&(w=0),k>=T&&(k=T-1),k<0&&(k=0)}else{if(Hl(_,k,w)){let L=rr(_,k,w),O=L[0],V=L[1];O>x&&V==C?(n>0&&Hl(x,k,w)&&(x=rr(x,k,w)[1]),x+=n):V<C&&O==x?(n<0&&Hl(C,k,w)&&(C=rr(C,k,w)[0]),C+=n):n>0?C+=n:x+=n}else _>x&&_==C?(n>0&&Hl(x,k,w)&&(x=rr(x,k,w)[1]),x+=n):_<C&&_==x?(n<0&&Hl(C,k,w)&&(C=rr(C,k,w)[0]),C+=n):_==x&&_==C&&(n>0?C+=n:x+=n);C>=A&&(C=A-1),C<0&&(C=0),x>=A&&(x=A-1),x<0&&(x=0)}let R=[k,w],I=[x,C];a=h.visibledatarow[w],o=k-1==-1?0:h.visibledatarow[k-1],s=h.visibledatacolumn[C],u=x-1==-1?0:h.visibledatacolumn[x-1];let F=o,z=a-o-1,M=u,E=s-u-1,N=ke.mergeMoveMain(I,R,b,F,z,M,E);N!=null&&(I=N[0],R=N[1],F=N[2],z=N[3],M=N[4],E=N[5]),p.func_selectedrange={left:M,width:E,top:F,height:z,left_move:M,width_move:E,top_move:F,height_move:z,row:R,column:I,row_focus:S,column_focus:_},$("#luckysheet-formula-functionrange-select").css({left:M,width:E,top:F,height:z}).show(),p.rangeSetValue({row:R,column:I})}let d=$("#luckysheet-cell-main").scrollLeft(),f=$("#luckysheet-cell-main").scrollTop(),m=$("#luckysheet-cell-main").height(),g=$("#luckysheet-cell-main").width(),y=0,v=0;s-d-g+20>0?(y=s-g+20,l&&$("#luckysheet-scrollbar-x").scrollLeft(y)):u-d-20<0&&(y=u-20,l&&$("#luckysheet-scrollbar-x").scrollLeft(y)),a-f-m+20>0?(v=a-m+20,l&&$("#luckysheet-scrollbar-y").scrollTop(v)):o-f-20<0&&(v=o-20,l&&$("#luckysheet-scrollbar-y").scrollTop(v)),clearTimeout(h.countfuncTimeout),wl()}function an(e,n,t){t||(t=!0);let l,a,o,s;if(n=="rangeOfSelect"){let v=h.luckysheet_select_save[h.luckysheet_select_save.length-1],b=v.row_focus,k=v.column_focus,w=v.row[0],x=v.row[1],C=v.column[0],S=v.column[1];if(e=="down"){if(x==h.flowdata.length-1)return;if(Bl(b,C,S)){let R=lr(b,C,S),I=R[0],F=R[1];I>w&&F==x?w=pt("down",k,w,x):x=pt("down",k,x,h.flowdata.length-1)}else b>w&&b==x?w=pt("down",k,w,x):x=pt("down",k,x,h.flowdata.length-1)}else if(e=="up"){if(w==0)return;if(Bl(b,C,S)){let R=lr(b,C,S),I=R[0];R[1]<x&&I==w?x=pt("up",k,w,x):w=pt("up",k,0,w)}else b<x&&b==w?x=pt("up",k,w,x):w=pt("up",k,0,w)}else if(e=="right"){if(S==h.flowdata[0].length-1)return;if(Hl(k,w,x)){let R=rr(k,w,x),I=R[0],F=R[1];I>C&&F==S?C=pt("right",b,C,S):S=pt("right",b,S,h.flowdata[0].length-1)}else k>C&&k==S?C=pt("right",b,C,S):S=pt("right",b,S,h.flowdata[0].length-1)}else if(e=="left"){if(C==0)return;if(Hl(k,w,x)){let R=rr(k,w,x),I=R[0];R[1]<S&&I==C?S=pt("left",b,C,S):C=pt("left",b,0,C)}else k<S&&k==C?S=pt("left",b,C,S):C=pt("left",b,0,C)}let _=[w,x],T=[C,S];l=h.visibledatarow[x],a=w-1==-1?0:h.visibledatarow[w-1],o=h.visibledatacolumn[S],s=C-1==-1?0:h.visibledatacolumn[C-1];let A=ke.mergeMoveMain(T,_,v,a,l-a-1,s,o-s-1);A!=null&&(T=A[0],_=A[1]),v.row=_,v.column=T,lt()}else if(n=="rangeOfFormula"){let v=p.func_selectedrange,b=v.row_focus,k=v.column_focus,w=v.row[0],x=v.row[1],C=v.column[0],S=v.column[1];if(e=="down"){if(x==h.flowdata.length-1)return;if(Bl(b,C,S)){let M=lr(b,C,S),E=M[0],N=M[1];E>w&&N==x?w=pt("down",k,w,x):x=pt("down",k,x,h.flowdata.length-1)}else b>w&&b==x?w=pt("down",k,w,x):x=pt("down",k,x,h.flowdata.length-1)}else if(e=="up"){if(w==0)return;if(Bl(b,C,S)){let M=lr(b,C,S),E=M[0];M[1]<x&&E==w?x=pt("up",k,w,x):w=pt("up",k,0,w)}else b<x&&b==w?x=pt("up",k,w,x):w=pt("up",k,0,w)}else if(e=="right"){if(S==h.flowdata[0].length-1)return;if(Hl(k,w,x)){let M=rr(k,w,x),E=M[0],N=M[1];E>C&&N==S?C=pt("right",b,C,S):S=pt("right",b,S,h.flowdata[0].length-1)}else k>C&&k==S?C=pt("right",b,C,S):S=pt("right",b,S,h.flowdata[0].length-1)}else if(e=="left"){if(C==0)return;if(Hl(k,w,x)){let M=rr(k,w,x),E=M[0];M[1]<S&&E==C?S=pt("left",b,C,S):C=pt("left",b,0,C)}else k<S&&k==C?S=pt("left",b,C,S):C=pt("left",b,0,C)}let _=[w,x],T=[C,S];l=h.visibledatarow[x],a=w-1==-1?0:h.visibledatarow[w-1],o=h.visibledatacolumn[S],s=C-1==-1?0:h.visibledatacolumn[C-1];let A=a,R=l-a-1,I=s,F=o-s-1,z=ke.mergeMoveMain(T,_,v,A,R,I,F);z!=null&&(T=z[0],_=z[1],A=z[2],R=z[3],I=z[4],F=z[5]),p.func_selectedrange={left:I,width:F,top:A,height:R,left_move:I,width_move:F,top_move:A,height_move:R,row:_,column:T,row_focus:b,column_focus:k},$("#luckysheet-formula-functionrange-select").css({left:I,width:F,top:A,height:R}).show(),p.rangeSetValue({row:_,column:T})}let u=$("#luckysheet-cell-main").scrollLeft(),d=$("#luckysheet-cell-main").scrollTop(),f=$("#luckysheet-cell-main").height(),m=$("#luckysheet-cell-main").width(),g=0,y=0;o-u-m+20>0?(g=o-m+20,t&&$("#luckysheet-scrollbar-x").scrollLeft(g)):s-u-20<0&&(g=s-20,t&&$("#luckysheet-scrollbar-x").scrollLeft(g)),l-d-f+20>0?(y=l-f+20,t&&$("#luckysheet-scrollbar-y").scrollTop(y)):a-d-20<0&&(y=a-20,t&&$("#luckysheet-scrollbar-y").scrollTop(y)),clearTimeout(h.countfuncTimeout),wl()}function Bl(e,n,t){let l=!1;for(let a=n;a<=t;a++){let o=h.flowdata[e][a];if(P(o)=="object"&&"mc"in o){l=!0;break}}return l}function Hl(e,n,t){let l=!1;for(let a=n;a<=t;a++){let o=h.flowdata[a][e];if(P(o)=="object"&&"mc"in o){l=!0;break}}return l}function lr(e,n,t){let l=0,a=h.flowdata.length-1,o=null;if(e>l)for(let u=e;u>=l;u--){for(let d=n;d<=t;d++){let f=h.flowdata[u][d];if(P(f)=="object"&&"mc"in f){let m=h.config.merge[f.mc.r+"_"+f.mc.c];(o==null||m.r<o)&&(o=m.r)}}if(Bl(o-1,n,t)&&o>l)u=o;else break}else o=l;let s=null;if(e<a)for(let u=e;u<=a;u++){for(let d=n;d<=t;d++){let f=h.flowdata[u][d];if(P(f)=="object"&&"mc"in f){let m=h.config.merge[f.mc.r+"_"+f.mc.c];(s==null||m.r+m.rs-1>s)&&(s=m.r+m.rs-1)}}if(Bl(s+1,n,t)&&s<a)u=s;else break}else s=a;return[o,s]}function rr(e,n,t){let l=0,a=h.flowdata[0].length-1,o=null;if(e>l)for(let u=e;u>=l;u--){for(let d=n;d<=t;d++){let f=h.flowdata[d][u];if(P(f)=="object"&&"mc"in f){let m=h.config.merge[f.mc.r+"_"+f.mc.c];(o==null||m.c<o)&&(o=m.c)}}if(Hl(o-1,n,t)&&o>l)u=o;else break}else o=l;let s=null;if(e<a)for(let u=e;u<=a;u++){for(let d=n;d<=t;d++){let f=h.flowdata[d][u];if(P(f)=="object"&&"mc"in f){let m=h.config.merge[f.mc.r+"_"+f.mc.c];(s==null||m.c+m.cs-1>s)&&(s=m.c+m.cs-1)}}if(Hl(s+1,n,t)&&s<a)u=s;else break}else s=a;return[o,s]}function pt(e,n,t,l){let a=null,o;if(e=="down"){let s=h.flowdata[t][n];P(s)=="object"&&me(s.v)||me(s)?o=!0:o=!1,console.log(o,"stNull");let u=[],d=0;for(let f=t+1;f<=l;f++){let m=h.flowdata[f][n];if(P(m)=="object"&&me(m.v)||me(m)?u.push(!0):u.push(!1),u.length==1&&o==!0&&u[d]==!1){a=t+d+1;break}else if(u.length>1){if(o&&u[d]==!1){a=t+d+1;break}else if(!o){if(u[d]==!1&&u[d-1]==!0){a=t+d+1;break}else if(u[d]==!0&&u[d-1]==!1){a=t+d;break}}}f==l&&(a=l),d++}}else if(e=="up"){let s=h.flowdata[l][n];P(s)=="object"&&me(s.v)||me(s)?o=!0:o=!1;let u=[],d=0;for(let f=l-1;f>=t;f--){let m=h.flowdata[f][n];if(P(m)=="object"&&me(m.v)||me(m)?u.push(!0):u.push(!1),u.length==1&&o&&u[d]==!1){a=l-(d+1);break}else if(u.length>1){if(o&&u[d]==!1){a=l-(d+1);break}else if(!o){if(u[d]==!1&&u[d-1]==!0){a=l-(d+1);break}else if(u[d]==!0&&u[d-1]==!1){a=l-d;break}}}f==t&&(a=t),d++}}else if(e=="right"){let s=h.flowdata[n][t];P(s)=="object"&&me(s.v)||me(s)?o=!0:o=!1;let u=[],d=0;for(let f=t+1;f<=l;f++){let m=h.flowdata[n][f];if(P(m)=="object"&&me(m.v)||me(m)?u.push(!0):u.push(!1),u.length==1&&o&&u[d]==!1){a=t+d+1;break}else if(u.length>1){if(o&&u[d]==!1){a=t+d+1;break}else if(!o){if(u[d]==!1&&u[d-1]==!0){a=t+d+1;break}else if(u[d]==!0&&u[d-1]==!1){a=t+d;break}}}f==l&&(a=l),d++}}else if(e=="left"){let s=h.flowdata[n][l];P(s)=="object"&&me(s.v)||me(s)?o=!0:o=!1;let u=[],d=0;for(let f=l-1;f>=t;f--){let m=h.flowdata[n][f];if(P(m)=="object"&&me(m.v)||me(m)?u.push(!0):u.push(!1),u.length==1&&o&&u[d]==!1){a=l-(d+1);break}else if(u.length>1){if(o&&u[d]==!1){a=l-(d+1);break}else if(!o){if(u[d]==!1&&u[d-1]==!0){a=l-(d+1);break}else if(u[d]==!0&&u[d-1]==!1){a=l-d;break}}}f==t&&(a=t),d++}}return a}var za=Ie(()=>{dt();Ut();Ft();Pa();il();Zt();on();Xe();Qt()});var Uy,el,Oa=Ie(()=>{Nt();dt();Ut();Ft();ll();Yt();Gt();pr();Qt();Zt();Xe();bt();Uy={rangefocus:!1,modelfocusIndex:null,FixedModelColor:[{head:{fc:"#000",bc:"#bfbdbe"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f8f3f7"},foot:{fc:"#000",bc:"#dde2de"}},{head:{fc:"#000",bc:"#4bd4e7"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#eaf7ff"},foot:{fc:"#000",bc:"#aae9f8"}},{head:{fc:"#000",bc:"#5ed593"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#e5fbee"},foot:{fc:"#000",bc:"#a5efcc"}},{head:{fc:"#000",bc:"#f6cb4b"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#fff9e7"},foot:{fc:"#000",bc:"#ffebac"}},{head:{fc:"#000",bc:"#f96420"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#ffe5d9"},foot:{fc:"#000",bc:"#ffcfba"}},{head:{fc:"#000",bc:"#5599fc"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#ecf2fe"},foot:{fc:"#000",bc:"#afcbfa"}},{head:{fc:"#000",bc:"#22a69b"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#dff2f8"},foot:{fc:"#000",bc:"#8dd4d0"}},{head:{fc:"#000",bc:"#7a939a"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f0eff7"},foot:{fc:"#000",bc:"#bdcad0"}},{head:{fc:"#000",bc:"#d7a270"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#fdf3f1"},foot:{fc:"#000",bc:"#ead2b6"}},{head:{fc:"#000",bc:"#89c54b"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f1f7e9"},foot:{fc:"#000",bc:"#c5e3a7"}},{head:{fc:"#000",bc:"#8f88f0"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f0e5ff"},foot:{fc:"#000",bc:"#c6c4f6"}},{head:{fc:"#000",bc:"#fd1664"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#feddee"},foot:{fc:"#000",bc:"#f98ab5"}},{head:{fc:"#000",bc:"#da96d3"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#fce8fb"},foot:{fc:"#000",bc:"#f2caee"}},{head:{fc:"#000",bc:"#b49191"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f5ebe8"},foot:{fc:"#000",bc:"#d8c3c3"}},{head:{fc:"#000",bc:"#91b493"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f0fbf0"},foot:{fc:"#000",bc:"#b4cfb6"}},{head:{fc:"#000",bc:"#b4a891"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f8f6f1"},foot:{fc:"#000",bc:"#d3cab8"}},{head:{fc:"#000",bc:"#91abb4"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#eff7fa"},foot:{fc:"#000",bc:"#b7cbd3"}},{head:{fc:"#000",bc:"#b7ba82"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#fafbeb"},foot:{fc:"#000",bc:"#dadcb4"}},{head:{fc:"#000",bc:"#df3e3e"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#fde9e9"},foot:{fc:"#000",bc:"#f89292"}},{head:{fc:"#000",bc:"#f2711c"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#fef0d7"},foot:{fc:"#000",bc:"#fbb335"}},{head:{fc:"#000",bc:"#b5cc18"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f9fbd4"},foot:{fc:"#000",bc:"#e2ed2a"}},{head:{fc:"#000",bc:"#00b5ad"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#ccfaf9"},foot:{fc:"#000",bc:"#00e4df"}},{head:{fc:"#000",bc:"#2185d0"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#d8f3fc"},foot:{fc:"#000",bc:"#3cc4f0"}},{head:{fc:"#000",bc:"#a5673f"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f6ede5"},foot:{fc:"#000",bc:"#d3a47c"}}],getModelBox:function(e,n){let t=this;$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelList").empty(),$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelCustom").empty();let l="";for(let o=0;o<t.FixedModelColor.length;o++){let s=t.FixedModelColor[o],u,d,f,m;e&&n?(u=s.head,d=s.one,f=s.two,m=s.foot):e?(u=s.head,d=s.one,f=s.two,m=s.one):n?(u=s.one,d=s.two,f=s.one,m=s.foot):(u=s.one,d=s.two,f=s.one,m=s.two),l+='<div class="modelbox"><div class="box"><span style="color:'+u.fc+";background-color:"+u.bc+'"> \u2014 </span><span style="color:'+d.fc+";background-color:"+d.bc+'"> \u2014 </span><span style="color:'+f.fc+";background-color:"+f.bc+'"> \u2014 </span><span style="color:'+m.fc+";background-color:"+m.bc+'"> \u2014 </span></div></div>'}$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelList").append(l);let a=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save_modelCustom;if(a!=null&&a.length>0){let o="";for(let s=0;s<a.length;s++){let u=a[s],d,f,m,g;e&&n?(d=u.head,f=u.one,m=u.two,g=u.foot):e?(d=u.head,f=u.one,m=u.two,g=u.one):n?(d=u.one,f=u.two,m=u.one,g=u.foot):(d=u.one,f=u.two,m=u.one,g=u.two),o+='<div class="modelbox"><div class="box"><span style="color:'+d.fc+";background-color:"+d.bc+'"> \u2014 </span><span style="color:'+f.fc+";background-color:"+f.bc+'"> \u2014 </span><span style="color:'+m.fc+";background-color:"+m.bc+'"> \u2014 </span><span style="color:'+g.fc+";background-color:"+g.bc+'"> \u2014 </span></div></div>'}$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelCustom").append(o)}},init:function(){let e=this;$("#luckysheet-modal-dialog-slider-alternateformat").remove(),$("body").append(Mu()),zt(),$("#luckysheet-modal-dialog-slider-alternateformat .luckysheet-model-close-btn").click(function(){$("#luckysheet-modal-dialog-slider-alternateformat").hide(),zt()}),$(document).off("focus.AFrangeInput").on("focus.AFrangeInput","#luckysheet-alternateformat-range input",function(){e.rangefocus=!0}),$(document).off("blur.AFrangeInput").on("blur.AFrangeInput","#luckysheet-alternateformat-range input",function(){e.rangefocus=!1}),$(document).off("keydown.AFrangeInput").on("keydown.AFrangeInput","#luckysheet-alternateformat-range input",function(n){let t=$(this).val().trim();n.keyCode==13&&e.update()}),$(document).off("click.AFrangeIcon").on("click.AFrangeIcon","#luckysheet-alternateformat-range .fa-table",function(){$("#luckysheet-modal-dialog-slider-alternateformat").hide(),zt();let n=$(this).parents("#luckysheet-alternateformat-range").find("input").val().trim();e.rangeDialog(n)}),$(document).off("click.AFrDCf").on("click.AFrDCf","#luckysheet-alternateformat-rangeDialog-confirm",function(){let n=$(this).parents("#luckysheet-alternateformat-rangeDialog").find("input").val().trim();$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-range input").val(n),$(this).parents("#luckysheet-alternateformat-rangeDialog").hide(),$("#luckysheet-modal-dialog-slider-alternateformat").show(),zt(),e.update()}),$(document).off("click.AFrDCl").on("click.AFrDCl","#luckysheet-alternateformat-rangeDialog-close",function(){$(this).parents("#luckysheet-alternateformat-rangeDialog").hide(),$("#luckysheet-modal-dialog-slider-alternateformat").show(),zt()}),$(document).off("click.AFrDTitle").on("click.AFrDTitle","#luckysheet-alternateformat-rangeDialog .luckysheet-modal-dialog-title-close",function(){$(this).parents("#luckysheet-alternateformat-rangeDialog").hide(),$("#luckysheet-modal-dialog-slider-alternateformat").show(),zt()}),$(document).off("change.AFrowHeader").on("change.AFrowHeader","#luckysheet-alternateformat-rowHeader",function(){let n;$(this).is(":checked")?n=!0:n=!1;let t;$("#luckysheet-alternateformat-rowFooter").is(":checked")?t=!0:t=!1,e.checkboxChange(n,t),e.modelboxOn(),e.update()}),$(document).off("change.AFrowFooter").on("change.AFrowFooter","#luckysheet-alternateformat-rowFooter",function(){let n;$("#luckysheet-alternateformat-rowHeader").is(":checked")?n=!0:n=!1;let t;$(this).is(":checked")?t=!0:t=!1,e.checkboxChange(n,t),e.modelboxOn(),e.update()}),$(document).off("click.AFmodelbox").on("click.AFmodelbox","#luckysheet-modal-dialog-slider-alternateformat .modelbox",function(){let n=$(this).index(),t=$(this).parents(".cf").attr("id");if(t=="luckysheet-alternateformat-modelList")e.modelfocusIndex=n;else if(t=="luckysheet-alternateformat-modelCustom"){let l=e.FixedModelColor.length;e.modelfocusIndex=n+l}e.modelboxOn(),e.update()}),$(document).off("click.AFselectColor").on("click.AFselectColor","#luckysheet-modal-dialog-slider-alternateformat .luckysheet-color-menu-button-indicator",function(){let n=$(this).closest(".toningbox"),t,l;$(this).find(".luckysheet-icon-img").hasClass("luckysheet-icon-text-color")?(t="fc",l=n.find(".toningShow").data("fc")):$(this).find(".luckysheet-icon-img").hasClass("luckysheet-icon-cell-color")&&(t="bc",l=n.find(".toningShow").data("bc"));let a;n.hasClass("header")?a="0":n.hasClass("ctOne")?a="1":n.hasClass("ctTwo")?a="2":n.hasClass("footer")&&(a="3"),e.colorSelectDialog(l,t,a)}),$(document).off("click.AFselectColorConfirm").on("click.AFselectColorConfirm","#luckysheet-alternateformat-colorSelect-dialog-confirm",function(){let n=$(this).parents("#luckysheet-alternateformat-colorSelect-dialog"),l=Q().alternatingColors;$("#luckysheet-modal-dialog-mask").hide(),n.hide();let a=n.find(".currenColor span").attr("title"),o;n.find(".luckysheet-modal-dialog-title-text").text()==l.selectionTextColor?o="fc":n.find(".luckysheet-modal-dialog-title-text").text()==l.selectionCellColor&&(o="bc");let s=n.find(".currenColor").attr("data-source");s=="0"?(o=="fc"&&($("#luckysheet-alternateformat-modelToning .header .toningShow").css("color",a),$("#luckysheet-alternateformat-modelToning .header .toningShow").data("fc",a),$("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a)),o=="bc"&&($("#luckysheet-alternateformat-modelToning .header .toningShow").css("background-color",a),$("#luckysheet-alternateformat-modelToning .header .toningShow").data("bc",a),$("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a))):s=="1"?(o=="fc"&&($("#luckysheet-alternateformat-modelToning .ctOne .toningShow").css("color",a),$("#luckysheet-alternateformat-modelToning .ctOne .toningShow").data("fc",a),$("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a)),o=="bc"&&($("#luckysheet-alternateformat-modelToning .ctOne .toningShow").css("background-color",a),$("#luckysheet-alternateformat-modelToning .ctOne .toningShow").data("bc",a),$("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a))):s=="2"?(o=="fc"&&($("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").css("color",a),$("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").data("fc",a),$("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a)),o=="bc"&&($("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").css("background-color",a),$("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").data("bc",a),$("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a))):s=="3"&&(o=="fc"&&($("#luckysheet-alternateformat-modelToning .footer .toningShow").css("color",a),$("#luckysheet-alternateformat-modelToning .footer .toningShow").data("fc",a),$("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a)),o=="bc"&&($("#luckysheet-alternateformat-modelToning .footer .toningShow").css("background-color",a),$("#luckysheet-alternateformat-modelToning .footer .toningShow").data("bc",a),$("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a)));let u;$("#luckysheet-alternateformat-rowHeader").is(":checked")?u=!0:u=!1;let d;$("#luckysheet-alternateformat-rowFooter").is(":checked")?d=!0:d=!1;let f=e.modelfocusIndex,m=e.FixedModelColor.length,g,y;if(f<m)g=$.extend(!0,{},e.getFormatByIndex());else{y=h.luckysheetfile[Z(h.currentSheetIndex)];let v=y.luckysheet_alternateformat_save_modelCustom;g=$.extend(!0,{},v[f-m])}s=="0"?o=="fc"?g.head.fc=a:o=="bc"&&(g.head.bc=a):s=="1"?o=="fc"?g.one.fc=a:o=="bc"&&(g.one.bc=a):s=="2"?o=="fc"?g.two.fc=a:o=="bc"&&(g.two.bc=a):s=="3"&&(o=="fc"&&(g.foot.fc=a),o=="bc"&&(g.foot.bc=a)),e.modelfocusIndex<m?(e.addCustomModel(g),e.modelfocusIndex=e.getIndexByFormat(g)):(y.luckysheet_alternateformat_save_modelCustom[f-m]=g,ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,y.luckysheet_alternateformat_save_modelCustom,{k:"luckysheet_alternateformat_save_modelCustom"})),e.getModelBox(u,d),e.modelboxOn(),e.update()}),$(document).off("click.AFremove").on("click.AFremove","#luckysheet-alternateformat-remove",function(){let n=$(this).data("index"),l=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save,a=$.extend(!0,[],l);l.length>1?l.splice(n,1):l=[];let o=$.extend(!0,[],l);e.ref(a,o),ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,l,{k:"luckysheet_alternateformat_save"}),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-modal-dialog-slider-alternateformat").hide(),zt()})},perfect:function(){let e=this,n=$.extend(!0,{},h.luckysheet_select_save[0]),t=e.rangeIsExists(n)[1],l=$.extend(!0,{},h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save[t]),a=l.cellrange;$("#luckysheet-alternateformat-range input").val(xt(h.currentSheetIndex,{row:a.row,column:a.column},h.currentSheetIndex)),h.luckysheet_select_save=[{row:a.row,column:a.column}],lt();let o=l.hasRowHeader,s=l.hasRowFooter,u=l.format;e.modelfocusIndex=e.getIndexByFormat(u),e.modelfocusIndex==null&&(e.addCustomModel(u),e.modelfocusIndex=e.getIndexByFormat(u)),e.checkboxChange(o,s),e.modelboxOn(),$("#luckysheet-alternateformat-remove").data("index",t)},checkboxChange:function(e,n){e?($("#luckysheet-alternateformat-rowHeader").prop("checked",!0),$("#luckysheet-alternateformat-modelToning .header").show()):($("#luckysheet-alternateformat-rowHeader").removeAttr("checked"),$("#luckysheet-alternateformat-modelToning .header").hide()),n?($("#luckysheet-alternateformat-rowFooter").prop("checked",!0),$("#luckysheet-alternateformat-modelToning .footer").show()):($("#luckysheet-alternateformat-rowFooter").removeAttr("checked"),$("#luckysheet-alternateformat-modelToning .footer").hide()),this.getModelBox(e,n)},modelboxOn:function(){let e=this;$("#luckysheet-modal-dialog-slider-alternateformat .modelbox").removeClass("on");let n=e.modelfocusIndex,t=e.FixedModelColor.length;n<t?$("#luckysheet-alternateformat-modelList .modelbox").eq(n).addClass("on"):$("#luckysheet-alternateformat-modelCustom .modelbox").eq(n-t).addClass("on"),e.modelToningColor()},modelToningColor:function(){let e=this.getFormatByIndex();$("#luckysheet-alternateformat-modelToning .header .toningShow").css({color:e.head.fc,"background-color":e.head.bc}),$("#luckysheet-alternateformat-modelToning .header .toningShow").data("fc",e.head.fc).data("bc",e.head.bc),$("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.head.fc),$("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.head.bc),$("#luckysheet-alternateformat-modelToning .ctOne .toningShow").css({color:e.one.fc,"background-color":e.one.bc}),$("#luckysheet-alternateformat-modelToning .ctOne .toningShow").data("fc",e.one.fc).data("bc",e.one.bc),$("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.one.fc),$("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.one.bc),$("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").css({color:e.two.fc,"background-color":e.two.bc}),$("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").data("fc",e.two.fc).data("bc",e.two.bc),$("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.two.fc),$("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.two.bc),$("#luckysheet-alternateformat-modelToning .footer .toningShow").css({color:e.foot.fc,"background-color":e.foot.bc}),$("#luckysheet-alternateformat-modelToning .footer .toningShow").data("fc",e.foot.fc).data("bc",e.foot.bc),$("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.foot.fc),$("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.foot.bc)},addCustomModel:function(e){let n=h.luckysheetfile[Z(h.currentSheetIndex)];n.luckysheet_alternateformat_save_modelCustom==null&&(n.luckysheet_alternateformat_save_modelCustom=[]),n.luckysheet_alternateformat_save_modelCustom.push(e),ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,n.luckysheet_alternateformat_save_modelCustom,{k:"luckysheet_alternateformat_save_modelCustom"})},colorSelectDialog:function(e,n,t){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-alternateformat-colorSelect-dialog").remove();let l=Q(),a=l.alternatingColors,o=l.button,s=l.toolbar,u;n=="fc"?u=a.selectionTextColor:n=="bc"&&(u=a.selectionCellColor),$("body").append(_e(ft,{id:"luckysheet-alternateformat-colorSelect-dialog",addclass:"luckysheet-alternateformat-colorSelect-dialog",title:u,content:"<div class='currenColor' data-source='"+t+"'>"+a.currentColor+"\uFF1A<span title='"+e+"' style='background-color:"+e+"'></span></div><div class='colorshowbox'></div>",botton:'<button id="luckysheet-alternateformat-colorSelect-dialog-confirm" class="btn btn-primary">'+o.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+o.cancel+"</button>",style:"z-index:100003"}));let d=$("#luckysheet-alternateformat-colorSelect-dialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),f=d.outerHeight(),m=d.outerWidth(),g=$(window).width(),y=$(window).height(),v=$(document).scrollLeft(),b=$(document).scrollTop();$("#luckysheet-alternateformat-colorSelect-dialog").css({left:(g+v-m)/2,top:(y+b-f)/3}).show(),$("#luckysheet-alternateformat-colorSelect-dialog").find(".colorshowbox").spectrum({showPalette:!0,showPaletteOnly:!0,preferredFormat:"hex",clickoutFiresChange:!1,showInitial:!0,showInput:!0,flat:!0,hideAfterPaletteSelect:!0,showSelectionPalette:!0,showButtons:!1,maxPaletteSize:8,maxSelectionSize:8,color:e,cancelText:o.cancel,chooseText:s.confirmColor,togglePaletteMoreText:s.customColor,togglePaletteLessText:s.collapse,togglePaletteOnly:!0,clearText:s.clearText,noColorSelectedText:s.noColorSelectedText,localStorageKey:"spectrum.textcolor"+ne.gridKey,palette:[["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]],move:function(k){k!=null?k=k.toHexString():k="#000",$("#luckysheet-alternateformat-colorSelect-dialog .currenColor span").css("background-color",k).attr("title",k)}})},rangeDialog:function(e){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-alternateformat-rangeDialog").remove();let n=Q(),t=n.alternatingColors,l=n.button;$("body").append(_e(ft,{id:"luckysheet-alternateformat-rangeDialog",addclass:"luckysheet-alternateformat-rangeDialog",title:t.selectRange,content:'<input readonly="readonly" placeholder="'+t.tipSelectRange+'" value="'+e+'"/>',botton:'<button id="luckysheet-alternateformat-rangeDialog-confirm" class="btn btn-primary">'+l.confirm+'</button><button id="luckysheet-alternateformat-rangeDialog-close" class="btn btn-default">'+l.cancel+"</button>",style:"z-index:100003"}));let a=$("#luckysheet-alternateformat-rangeDialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),d=$(window).height(),f=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-alternateformat-rangeDialog").css({left:(u+f-s)/2,top:(d+m-o)/3}).show()},rangeIsExists:function(e,n){let t=this,l=!1,a=null,o=$.extend(!0,[],h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save);if(n!=null&&n!=null&&(o.length>1?o.splice(n,1):o=[]),o.length>0){let s=[];for(let d=0;d<o.length;d++){let f={index:d,map:t.getRangeMap(o[d].cellrange.row,o[d].cellrange.column)};s.push(f)}let u=t.getRangeMap(e.row,e.column);for(let d in u){if(l)break;for(let f=0;f<s.length;f++)if(d in s[f].map){l=!0,a=s[f].index;break}}}return[l,a]},getRangeMap:function(e,n){let t={},l=e[0],a=e[1],o=n[0],s=n[1];for(let u=l;u<=a;u++)for(let d=o;d<=s;d++)t[u+"_"+d]=0;return t},getIndexByFormat:function(e){let n=this,t=null,l=n.FixedModelColor;for(let o=0;o<l.length;o++){let s=l[o];if(e.head.fc==s.head.fc&&e.head.bc==s.head.bc&&e.one.fc==s.one.fc&&e.one.bc==s.one.bc&&e.two.fc==s.two.fc&&e.two.bc==s.two.bc&&e.foot.fc==s.foot.fc&&e.foot.bc==s.foot.bc){t=o;break}}let a=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save_modelCustom;if(a!=null&&a.length>0)for(let o=0;o<a.length;o++){let s=a[o];if(e.head.fc==s.head.fc&&e.head.bc==s.head.bc&&e.one.fc==s.one.fc&&e.one.bc==s.one.bc&&e.two.fc==s.two.fc&&e.two.bc==s.two.bc&&e.foot.fc==s.foot.fc&&e.foot.bc==s.foot.bc){t=l.length+o;break}}return t},getFormatByIndex:function(){let e=this,n=e.modelfocusIndex,t=e.FixedModelColor.length,l={};return n<t?l=e.FixedModelColor[n]:l=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save_modelCustom[n-t],l},new:function(e){let n=this,t=n.getFormatByIndex(),a=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save;a==null&&(a=[]);let o=$.extend(!0,[],a),s={cellrange:{row:e.row,column:e.column},format:t,hasRowHeader:!0,hasRowFooter:!1};a.push(s);let u=$.extend(!0,[],a);n.ref(o,u),ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,a,{k:"luckysheet_alternateformat_save"})},update:function(){let e=this,t=Q().alternatingColors,l=$("#luckysheet-alternateformat-remove").data("index"),a=$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-range input").val().trim();if(!p.iscelldata(a)){de()?alert(t.errorNoRange):U.info(t.errorNoRange,"");return}let o=p.getcellrange(a);if(e.rangeIsExists(o,l)[0]){de()?alert(t.errorExistColors):U.info(t.errorExistColors,"");return}let u;$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-rowHeader").is(":checked")?u=!0:u=!1;let d;$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-rowFooter").is(":checked")?d=!0:d=!1;let f=e.getFormatByIndex(),g=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save;g==null&&(g=[]);let y=$.extend(!0,[],g),v={cellrange:{row:o.row,column:o.column},format:f,hasRowHeader:u,hasRowFooter:d};g[l]=v;let b=$.extend(!0,[],g);e.ref(y,b),ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,g,{k:"luckysheet_alternateformat_save"})},checksAF:function(e,n,t){return e+"_"+n in t?t[e+"_"+n]:null},getComputeMap:function(){let n=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save;return this.compute(n)},compute:function(e){let n={};if(e!=null&&e.length>0)for(let t=0;t<e.length;t++){let l=e[t].cellrange,a=e[t].format,o=e[t].hasRowHeader,s=e[t].hasRowFooter,u=l.row[0],d=l.row[1],f=l.column[0],m=l.column[1];if(o&&s){for(let g=f;g<=m;g++)n[u+"_"+g]=[a.head.fc,a.head.bc];if(d-u>1)for(let g=u+1;g<d;g++){let y,v;(g-u)%2!=0?(y=a.one.fc,v=a.one.bc):(y=a.two.fc,v=a.two.bc);for(let b=f;b<=m;b++)n[g+"_"+b]=[y,v]}if(d>u)for(let g=f;g<=m;g++)n[d+"_"+g]=[a.foot.fc,a.foot.bc]}else if(o){for(let g=f;g<=m;g++)n[u+"_"+g]=[a.head.fc,a.head.bc];if(d>u)for(let g=u+1;g<=d;g++){let y,v;(g-u)%2!=0?(y=a.one.fc,v=a.one.bc):(y=a.two.fc,v=a.two.bc);for(let b=f;b<=m;b++)n[g+"_"+b]=[y,v]}}else if(s){if(d>u)for(let g=u;g<d;g++){let y,v;(g-u)%2==0?(y=a.one.fc,v=a.one.bc):(y=a.two.fc,v=a.two.bc);for(let b=f;b<=m;b++)n[g+"_"+b]=[y,v]}for(let g=f;g<=m;g++)n[d+"_"+g]=[a.foot.fc,a.foot.bc]}else for(let g=u;g<=d;g++){let y,v;(g-u)%2==0?(y=a.one.fc,v=a.one.bc):(y=a.two.fc,v=a.two.bc);for(let b=f;b<=m;b++)n[g+"_"+b]=[y,v]}}return n},ref:function(e,n){if(h.clearjfundo){h.jfundo.length=0;let l={};l.type="updateAF",l.sheetIndex=h.currentSheetIndex,l.data={historyRules:e,currentRules:n},h.jfredo.push(l)}let t=Z(h.currentSheetIndex);h.luckysheetfile[t].luckysheet_alternateformat_save=n,setTimeout(function(){Be()},1)}},el=Uy});var Gy,Hn,Ba=Ie(()=>{dt();Gy={parseJsonParm:function(e){if(e==null)return{};if(P(e)=="string")try{return new Function("return "+e)()}catch(n){return{}}else return e},hasKey:function(e){let t=this.parseJsonParm(e);for(let l in t)return!0;return!1}},Hn=Gy});function Vn(e,n,t,l,a,o,s,u,d,f){if(n?(e.addClass("luckysheet-filter-options-active").data("rowhidden",JSON.stringify(t)).data("caljs",JSON.stringify(l)).html('<i class="fa fa-filter luckysheet-mousedown-cancel" aria-hidden="true"></i>'),l!=null&&(e.data("byconditionvalue",l.value).data("byconditiontype",l.type).data("byconditiontext",l.text),l.value1!=null&&e.data("byconditionvalue1",l.value1),l.value2!=null&&e.data("byconditionvalue2",l.value2))):(e.removeClass("luckysheet-filter-options-active").data("rowhidden","").data("caljs","").html('<i class="fa fa-caret-down luckysheet-mousedown-cancel" aria-hidden="true"></i>'),e.data("byconditionvalue","null").data("byconditiontype","0").data("byconditiontext","\u65E0").data("byconditionvalue1","").data("byconditionvalue2","")),a){let m=h.luckysheetfile[Z(h.currentSheetIndex)];if(m.filter==null&&(m.filter={}),n){let g={caljs:l,rowhidden:t,optionstate:n,str:o,edr:s,cindex:u,stc:d,edc:f};m.filter[u-d]=g}else delete m.filter[u-d];ne.saveParam("all",h.currentSheetIndex,m.filter,{k:"filter"})}}function Wd(e,n,t,l,a,o){let s=xe.deepCopyFlowData(h.flowdata);e=e+1;let u=!1,d=[];for(let m=e;m<=t;m++){let g=[];for(let y=n;y<=l;y++){if(s[m][y]!=null&&s[m][y].mc!=null){u=!0;break}g.push(s[m][y])}d.push(g)}if(u){let m=Q().filter;de()?alert(m.mergeError):U.info(m.mergeError,"");return}d=Hr(d,a-n,o);for(let m=e;m<=t;m++)for(let g=n;g<=l;g++)s[m][g]=d[m-e][g-n];let f={};if(h.config.rowlen!=null){let m=$.extend(!0,{},h.config);m=yl(s,e,t,m),f={cfg:m,RowlChange:!0}}Ze(s,[{row:[e,t],column:[n,l]}],f)}function Ri(){if(!$t(h.currentSheetIndex,"filter"))return;if(h.luckysheet_select_save.length>1){$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(),$("#"+h.container).attr("tabindex",0).focus();let n=Q().splitText;de()?alert(n.tipNoMulti):U.info(n.tipNoMulti,"");return}if(h.luckysheetfile[Z(h.currentSheetIndex)].isPivotTable)return;$("#luckysheet-filter-selected-sheet"+h.currentSheetIndex+", #luckysheet-filter-options-sheet"+h.currentSheetIndex).remove();let e=h.luckysheet_select_save[0];if(e.row[0]==e.row[1]&&e.column[0]==e.column[1]){let n,t,l=e.row[1];for(let a=0;a<h.flowdata[l].length;a++){let o=h.flowdata[l][a];if(o!=null&&!me(o.v))n==null&&(n=a);else if(n!=null){t=a-1;break}}t==null&&(t=h.flowdata[l].length-1),h.luckysheet_select_save=[{row:[l,l],column:[n,t]}],lt(),h.luckysheet_shiftpositon=$.extend(!0,{},e),La("down","range")}else e.row[1]-e.row[0]<2&&(h.luckysheet_shiftpositon=$.extend(!0,{},e),La("down","range"));h.luckysheet_filter_save=$.extend(!0,{},h.luckysheet_select_save[0]),Dl(h.luckysheet_filter_save),ne.saveParam("all",h.currentSheetIndex,h.luckysheet_filter_save,{k:"filter_select"}),h.filterchage&&h.jfredo.push({type:"filtershow",data:[],curdata:[],sheetIndex:h.currentSheetIndex,filter_save:h.luckysheet_filter_save})}function Dl(e,n){if($("#luckysheet-filter-selected-sheet"+h.currentSheetIndex).remove(),$("#luckysheet-filter-options-sheet"+h.currentSheetIndex).remove(),e==null||JSON.stringify(e)=="{}")return;let t=e.row[0],l=e.row[1],a=e.column[0],o=e.column[1],s=h.visibledatarow[l],u=t-1==-1?0:h.visibledatarow[t-1],d=h.visibledatacolumn[o],f=a-1==-1?0:h.visibledatacolumn[a-1],m='<div id="luckysheet-filter-selected-sheet'+h.currentSheetIndex+'" class="luckysheet-cell-selected luckysheet-filter-selected" style="left:'+f+"px;width:"+(d-f-1)+"px;top:"+u+"px;height:"+(s-u-1)+'px;display:block;border-color:#897BFF;z-index:20;background:none;"></div>';$("#luckysheet-cell-main").append(m);let g="";for(let v=a;v<=o;v++)if(n==null||n[v-a]==null)g+='<div data-rowhidden="" data-str="'+t+'" data-edr="'+l+'" data-cindex="'+v+'" data-stc="'+a+'" data-edc="'+o+'" class="luckysheet-filter-options" style="left:'+(h.visibledatacolumn[v]-20)+"px;top:"+u+'px;display:block;"><i class="fa fa-caret-down" aria-hidden="true"></i></div>';else{let b;if(n[v-a].caljs!=null){let k;n[v-a].caljs.value1!=null?k='data-byconditionvalue1="'+n[v-a].caljs.value1+'" ':k="";let w;n[v-a].caljs.value2!=null?w='data-byconditionvalue2="'+n[v-a].caljs.value2+'" ':w="",b='data-caljs="'+JSON.stringify(n[v-a].caljs)+'" data-byconditionvalue="'+n[v-a].caljs.value+'" data-byconditiontype="'+n[v-a].caljs.type+'" data-byconditiontext="'+n[v-a].caljs.text+'" '+k+w}else b="";g+='<div data-rowhidden="'+JSON.stringify(n[v-a].rowhidden).replace(/\"/g,"'")+'" '+b+' data-str="'+t+'" data-edr="'+l+'" data-cindex="'+v+'" data-stc="'+a+'" data-edc="'+o+'" class="luckysheet-filter-options luckysheet-filter-options-active" style="left:'+(h.visibledatacolumn[v]-20)+"px;top:"+u+'px;display:block;"><i class="fa fa-filter luckysheet-mousedown-cancel" aria-hidden="true"></i></div>'}$("#luckysheet-cell-main").append('<div id="luckysheet-filter-options-sheet'+h.currentSheetIndex+'" class="luckysheet-filter-options-c">'+g+"</div>"),$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(),$("#luckysheet-cell-main").scrollTop()>e.top_move&&$("#luckysheet-scrollbar-y").scrollTop(e.top_move);let y=h.luckysheetfile[Z(h.currentSheetIndex)];y.filter_select=e}function Yd(){let e=null,n=Q(),t=n.filter,l=n.button;$("#luckysheetfilter").click(Ri);let a=null,o=null;$(".luckysheet-cols-menu .luckysheet-cols-submenu").hover(function(){let s=$(this),u=s.attr("id"),d=$("#"+u+"_sub"),f=s.parent(),m=$(window).width(),g=$(window).height(),y=f.width(),v=d.height()+25,b=d.width()+5,k=s.offset(),w=k.top,x=k.left+y;x+b>m&&(x=k.left-b),w+v>g&&(w=g-v),d.css({top:w,left:x}).show(),o=s},function(){let s=$(this),u=s.attr("id"),d=$("#"+u+"_sub");a=setTimeout(function(){d.hide()},200)}),$(".luckysheet-rightgclick-menu-sub").hover(function(){o.addClass("luckysheet-cols-menuitem-hover"),clearTimeout(a)},function(){o.removeClass("luckysheet-cols-menuitem-hover"),$(this).hide()}),$("#luckysheet-filter-menu").mouseover(function(){clearTimeout(e),e=setTimeout(function(){$("#luckysheet-filter-submenu").hide()},500)}),$("#luckysheet-filter-submenu").mouseover(function(){clearTimeout(e)}).find(".luckysheet-cols-menuitem").click(function(s){$("#luckysheet-filter-selected span").html($(this).find(".luckysheet-cols-menuitem-content").text()).data("value",$(this).data("value")),$("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide();let u=$(this).data("type"),d=$(this).attr("data-value");u=="2"?($("#luckysheet-filter-selected span").data("type","2"),$("#luckysheet-filter-menu .luckysheet-filter-selected-input2").show(),$("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type","number")):u=="0"?$("#luckysheet-filter-selected span").data("type","0"):($("#luckysheet-filter-selected span").data("type","1"),$("#luckysheet-filter-menu .luckysheet-filter-selected-input").eq(0).show(),d=="dateequal"||d=="datelessthan"||d=="datemorethan"?$("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type","date"):d=="morethan"||d=="moreequalthan"||d=="lessthan"||d=="lessequalthan"||d=="equal"||d=="noequal"?$("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type","number"):$("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type","text")),$("#luckysheet-filter-byvalue").next().slideUp(),$("#luckysheet-filter-submenu").hide()}),$("#luckysheet-filter-bycondition, #luckysheet-filter-byvalue").click(function(){let s=$(this);s.next().slideToggle(200),setTimeout(function(){s.attr("id")=="luckysheet-filter-bycondition"&&$("#luckysheet-filter-bycondition").next().is(":visible")&&$("#luckysheet-filter-selected span").text()!=t.filiterInputNone&&$("#luckysheet-filter-byvalue").next().slideUp(200),s.is($("#luckysheet-filter-bycondition"))&&$("#luckysheet-filter-bycondition").next().is(":hidden")&&$("#luckysheet-filter-byvalue").next().is(":hidden")&&$("#luckysheet-filter-byvalue").next().slideDown(200)},300)}),$("#luckysheet-filter-selected").click(function(){let s=$(this),u=s.offset(),d=$("#luckysheet-filter-submenu");d.hide();let f=$(window).height(),m=$(window).width(),g=d.width(),y=d.height(),v=u.top,b=u.left,k=f-u.top-20;u.left+g>m&&(b=u.left-g),u.top>f/2&&(v=f-u.top,v<0&&(v=0),k=u.top-20),d.css({top:v,left:b,height:k}).show(),clearTimeout(e)}),$("#luckysheet-cell-main").on("click",".luckysheet-filter-options",function(s){if(!$t(h.currentSheetIndex,"filter"))return;let u=$(s.currentTarget),d=u.offset(),f=$("#luckysheet-filter-menu"),m=$(window).height(),g=$(window).width(),y=u.data("str"),v=u.data("edr"),b=u.data("cindex"),k=u.data("stc"),w=u.data("edc"),x=u.data("rowhidden")==""?{}:JSON.parse(u.data("rowhidden").replace(/\'/g,'"'));$("body .luckysheet-cols-menu").hide(),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(),$("#luckysheet-filter-byvalue-input").val(""),$("#luckysheet-filter-bycondition").next().hide(),$("#luckysheet-filter-byvalue").next().show(),f.data("str",y),f.data("edr",v),f.data("cindex",b),f.data("stc",k),f.data("edc",w),$("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide().find("input").val(),$("#luckysheet-filter-selected span").data("type","0").data("type",null).text(t.filiterInputNone);let C=u.data("byconditiontype");if($("#luckysheet-filter-selected span").data("value",u.data("byconditionvalue")).data("type",C).text(u.data("byconditiontext")),C=="2"){let A=$("#luckysheet-filter-menu .luckysheet-filter-selected-input2").show().find("input");A.eq(0).val(u.data("byconditionvalue1")),A.eq(1).val(u.data("byconditionvalue2"))}else C=="1"&&$("#luckysheet-filter-menu .luckysheet-filter-selected-input").eq(0).show().find("input").val(u.data("byconditionvalue1"));$("#luckysheet-filter-orderby-asc").off("click").on("click",function(){Wd(y,k,v,w,b,!0)}),$("#luckysheet-filter-orderby-desc").off("click").on("click",function(){Wd(y,k,v,w,b,!1)});let S=Er("#luckysheet-filter-byvalue-select",{text:t.filiterMoreDataTip});$("#luckysheet-filter-byvalue-select").empty().append(S.el);let _={};$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").not(this).each(function(){let A=$(this),R=A.data("rowhidden");if(R=="")return!0;R=JSON.parse(R.replace(/\'/g,'"'));for(let I in R)_[I]=0});let T=h.flowdata;return setTimeout(function(){let A={},R={},I={},F={};for(let E=y+1;E<=v;E++){if(E in _||h.flowdata[E]==null)continue;let N=h.flowdata[E][b];if(N!=null&&!me(N.v)&&N.ct!=null&&N.ct.t=="d"){let L=mt("YYYY-MM-DD",N.v),O=L.split("-")[0],V=L.split("-")[1],q=L.split("-")[2];O in A||(A[O]={}),V in A[O]||(A[O][V]={}),q in A[O][V]||(A[O][V][q]=0),A[O][V][q]++,E in x&&(R[O]=0,R[V]=0,R[q]=0)}else{let L,O;N==null||me(N.v)?(L=null,O=null):(L=N.v,O=N.m),L in I||(I[L]={}),O in I[L]||(I[L][O]=0),I[L][O]++,E in x&&(F[L+"#$$$#"+O]=0)}}let z=[];if(JSON.stringify(A).length>2)for(let E in A){let N=0,L="";for(let V in A[E]){let q=0,W="";for(let te in A[E][V]){let le=A[E][V][te];q+=le;let oe;Number(V)<10?oe="0"+Number(V):oe=V;let se;Number(te)<10?se="0"+Number(te):se=te,E in R&&V in R&&te in R?W+='<div class="day luckysheet-mousedown-cancel cf" data-check="false" title="'+E+"-"+oe+"-"+se+'"><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+te+'</label><span class="count luckysheet-mousedown-cancel">( '+le+" )</span></div>":W+='<div class="day luckysheet-mousedown-cancel cf" data-check="true" title="'+E+"-"+oe+"-"+se+'"><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+te+'</label><span class="count luckysheet-mousedown-cancel">( '+le+" )</span></div>"}N+=q;let X;Number(V)<10?X="0"+Number(V):X=V,E in R&&V in R?L+='<div class="monthBox luckysheet-mousedown-cancel"><div class="month luckysheet-mousedown-cancel cf" data-check="false" title="'+E+"-"+X+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+V+""+t.filiterMonthText+'</label><span class="count luckysheet-mousedown-cancel">( '+q+' )</span></div><div class="dayList luckysheet-mousedown-cancel">'+W+"</div></div>":L+='<div class="monthBox luckysheet-mousedown-cancel"><div class="month luckysheet-mousedown-cancel cf" data-check="true" title="'+E+"-"+X+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+V+""+t.filiterMonthText+'</label><span class="count luckysheet-mousedown-cancel">( '+q+' )</span></div><div class="dayList luckysheet-mousedown-cancel">'+W+"</div></div>"}let O;E in R?O='<div class="yearBox luckysheet-mousedown-cancel"><div class="year luckysheet-mousedown-cancel cf" data-check="false" title="'+E+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+E+""+t.filiterYearText+'</label><span class="count luckysheet-mousedown-cancel">( '+N+' )</span></div><div class="monthList luckysheet-mousedown-cancel">'+L+"</div></div>":O='<div class="yearBox luckysheet-mousedown-cancel"><div class="year luckysheet-mousedown-cancel cf" data-check="true" title="'+E+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+E+""+t.filiterYearText+'</label><span class="count luckysheet-mousedown-cancel">( '+N+' )</span></div><div class="monthList luckysheet-mousedown-cancel">'+L+"</div></div>",z.unshift(O)}if(JSON.stringify(I).length>2){let E=Object.keys(I);E=bo(E,!0);for(let N=0;N<E.length;N++){let L=E[N];for(let O in I[L]){let V;L+"#$$$#"+O=="null#$$$#null"?V=t.valueBlank:V=O;let q;L+"#$$$#"+O in F?q='<div class="textBox luckysheet-mousedown-cancel cf" data-check="false" data-filter="'+(L+"#$$$#"+O)+'" title="'+V+'"><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+V+'</label><span class="luckysheet-mousedown-cancel count">( '+I[L][O]+" )</span></div>":q='<div class="textBox luckysheet-mousedown-cancel cf" data-check="true" data-filter="'+(L+"#$$$#"+O)+'" title="'+V+'"><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+V+'</label><span class="luckysheet-mousedown-cancel count">( '+I[L][O]+" )</span></div>",z.push(q)}}}let M=m-d.top-350;M<0&&(M=100),$("#luckysheet-filter-byvalue-select").append("<div class='ListBox luckysheet-mousedown-cancel' style='min-height: 100px; max-height: "+M+"px; overflow-y: auto; overflow-x: hidden;'><table cellspacing='0' style='width:100%;' class='luckysheet-mousedown-cancel'>"+z.join("")+"</table></div>"),S.close()},1),sn(f,d.left,d.top+20),s.stopPropagation(),!1}),$("#luckysheet-filter-orderby-color").hover(function(){let s=$("#luckysheet-filter-menu"),u=s.data("str"),d=s.data("edr"),f=s.data("cindex"),m=s.data("stc"),g=s.data("edc"),y={},v={},b=el.getComputeMap(),k=$e.getComputeMap();for(let N=u+1;N<=d;N++){let L=h.flowdata[N][f],O=ke.checkstatus(h.flowdata,N,f,"bg");O==null&&(O="#ffffff");let V=el.checksAF(N,f,b);V!=null&&(O=V[1]);let q=$e.checksCF(N,f,k);q!=null&&q.cellColor!=null&&(O=q.cellColor),O.indexOf("rgb")>-1&&(O=zn(O)),O.length==4&&(O=O.substr(0,1)+O.substr(1,1).repeat(2)+O.substr(2,1).repeat(2)+O.substr(3,1).repeat(2));let W=ke.checkstatus(h.flowdata,N,f,"fc");V!=null&&(W=V[0]),q!=null&&q.textColor!=null&&(W=q.textColor),W.indexOf("rgb")>-1&&(W=zn(W)),W.length==4&&(W=W.substr(0,1)+W.substr(1,1).repeat(2)+W.substr(2,1).repeat(2)+W.substr(3,1).repeat(2)),h.config!=null&&h.config.rowhidden!=null&&N in h.config.rowhidden?(y[O]=1,L!=null&&!me(L.v)&&(v[W]=1)):(y[O]=0,L!=null&&!me(L.v)&&(v[W]=0))}let w="";if(JSON.stringify(y).length>2&&Object.keys(y).length>1){let N="";for(let L in y)y[L]==0?N+='<div class="item luckysheet-mousedown-cancel"><label class="luckysheet-mousedown-cancel" style="background-color: '+L+'" title="'+L+'"></label><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/></div>':N+='<div class="item luckysheet-mousedown-cancel"><label class="luckysheet-mousedown-cancel" style="background-color: '+L+'" title="'+L+'"></label><input class="luckysheet-mousedown-cancel" type="checkbox"/></div>';w='<div id="filterBgColor" class="box luckysheet-mousedown-cancel"><div class="title luckysheet-mousedown-cancel">'+t.filiterByColorTip+'</div><div style="max-height:128px;overflow:auto;" class="luckysheet-mousedown-cancel">'+N+"</div></div>"}let x="";if(JSON.stringify(v).length>2&&Object.keys(v).length>1){let N="";for(let L in v)v[L]==0?N+='<div class="item luckysheet-mousedown-cancel"><label class="luckysheet-mousedown-cancel" style="background-color: '+L+'" title="'+L+'"></label><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/></div>':N+='<div class="item luckysheet-mousedown-cancel"><label class="luckysheet-mousedown-cancel" style="background-color: '+L+'" title="'+L+'"></label><input class="luckysheet-mousedown-cancel" type="checkbox"/></div>';x='<div id="filterFcColor" class="box luckysheet-mousedown-cancel"><div class="title luckysheet-mousedown-cancel">'+t.filiterByTextColorTip+'</div><div style="max-height:128px;overflow:auto;" class="luckysheet-mousedown-cancel">'+N+"</div></div>"}let C;w==""&&x==""?C='<div class="luckysheet-mousedown-cancel" style="padding: 10px 30px;text-align: center;">'+t.filterContainerOneColorTip+"</div>":C=w+x+'<div class="luckysheet-mousedown-cancel"><button id="luckysheet-filter-orderby-color-confirm" class="btn btn-primary luckysheet-mousedown-cancel" style="margin: 5px 20px;width: 70px;">'+l.confirm+"</button></div>",$("#luckysheet-filter-orderby-color-submenu").remove(),$("body").append('<div id="luckysheet-filter-orderby-color-submenu" class="luckysheet-cols-menu luckysheet-mousedown-cancel">'+C+"</div>");let S=$("#luckysheet-filter-orderby-color-submenu").end(),_=$(this).parent(),T=$(window).width(),A=$(window).height(),R=_.width(),I=S.height()+25,F=S.width()+5,z=$(this).offset(),M=z.top,E=z.left+R;E+F>T&&(E=z.left-F),M+I>A&&(M=A-I),$("#luckysheet-filter-orderby-color-submenu").css({top:M,left:E}).show()},function(){a=setTimeout(function(){$("#luckysheet-filter-orderby-color-submenu").hide()},200)}),$(document).on("mouseover mouseleave","#luckysheet-filter-orderby-color-submenu",function(s){s.type==="mouseover"?clearTimeout(a):$(this).hide()}),$(document).on("click","#luckysheet-filter-orderby-color-submenu .item label",function(){$(this).siblings("input[type='checkbox']").click()}),$(document).off("click.orderbyColorConfirm").on("click.orderbyColorConfirm","#luckysheet-filter-orderby-color-submenu #luckysheet-filter-orderby-color-confirm",function(){let s={},u={};$("#luckysheet-filter-orderby-color-submenu .item").each(function(M,E){if($(E).find("input[type='checkbox']").is(":checked")){let N=$(this).find("label").attr("title"),L=$(this).closest(".box").attr("id");L=="filterBgColor"?s[N]=0:L=="filterFcColor"&&(u[N]=0)}});let d;$("#luckysheet-filter-orderby-color-submenu #filterBgColor").length>0?d=!0:d=!1;let f;$("#luckysheet-filter-orderby-color-submenu #filterFcColor").length>0?f=!0:f=!1;let m=$("#luckysheet-filter-menu"),g=m.data("str"),y=m.data("edr"),v=m.data("cindex"),b=m.data("stc"),k=m.data("edc"),w={};$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").not($("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").eq(v-b).get(0)).each(function(){let M=$(this),E=M.data("rowhidden");if(E=="")return!0;E=JSON.parse(E);for(let N in E)w[N]=0});let x={},C={},S={},_=el.getComputeMap(),T=$e.getComputeMap();for(let M=g+1;M<=y;M++){if(M in w||h.flowdata[M]==null)continue;let E=h.flowdata[M][v],N=ke.checkstatus(h.flowdata,M,v,"bg"),L=el.checksAF(M,v,_);L!=null&&(N=L[1]);let O=$e.checksCF(M,v,T);O!=null&&O.cellColor!=null&&(N=O.cellColor),N=N==null?"#ffffff":N,N.indexOf("rgb")>-1&&(N=zn(N)),N.length==4&&(N=N.substr(0,1)+N.substr(1,1).repeat(2)+N.substr(2,1).repeat(2)+N.substr(3,1).repeat(2));let V=ke.checkstatus(h.flowdata,M,v,"fc");L!=null&&(V=L[0]),O!=null&&O.textColor!=null&&(V=O.textColor),V.indexOf("rgb")>-1&&(V=zn(V)),V.length==4&&(V=V.substr(0,1)+V.substr(1,1).repeat(2)+V.substr(2,1).repeat(2)+V.substr(3,1).repeat(2)),d&&f?!(N in s)&&(!(V in u)||E==null||me(E.v))&&(C[M]=0):d?N in s||(C[M]=0):f&&(!(V in u)||E==null||me(E.v))&&(C[M]=0)}let A=$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").eq(v-b),R=Object.keys(C).length>0,I=$.extend(!0,w,C),F=Hn.parseJsonParm(A.data("rowhidden"));Vn(A,R,C,S,!0,g,y,v,b,k);let z=$.extend(!0,{},h.config);if(z.rowhidden=I,h.clearjfundo){let M={};M.type="datachangeAll_filter",M.sheetIndex=h.currentSheetIndex,M.config=$.extend(!0,{},h.config),M.curconfig=z,M.optionstate=R,M.optionsindex=v-b,M.rowhidden=$.extend(!0,{},C),M.rowhidenPre=$.extend(!0,{},F),S!=null&&(M.caljs=S),h.jfundo.length=0,h.jfredo.push(M)}h.config=z,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,z.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length),$("#luckysheet-filter-menu, #luckysheet-filter-submenu, #luckysheet-filter-orderby-color-submenu").hide(),rl()}),$(document).off("click.filterCheckbox1").on("click.filterCheckbox1","#luckysheet-filter-byvalue-select .textBox",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).find("input[type='checkbox']").prop("checked",!0))}),$(document).off("click.filterCheckbox2").on("click.filterCheckbox2","#luckysheet-filter-byvalue-select .year",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).parents(".yearBox").find(".month").attr("data-check","false"),$(this).parents(".yearBox").find(".day").attr("data-check","false"),$(this).parents(".yearBox").find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).parents(".yearBox").find(".month").attr("data-check","true"),$(this).parents(".yearBox").find(".day").attr("data-check","true"),$(this).parents(".yearBox").find("input[type='checkbox']").prop("checked",!0))}),$(document).off("click.filterCheckbox3").on("click.filterCheckbox3","#luckysheet-filter-byvalue-select .month",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).parents(".monthBox").find(".day").attr("data-check","false"),$(this).parents(".monthBox").find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).parents(".monthBox").find(".day").attr("data-check","true"),$(this).parents(".monthBox").find("input[type='checkbox']").prop("checked",!0));let s=!0;$(this).parents(".yearBox").find(".day").each(function(d,f){$(f).attr("data-check")=="true"||(s=!1)}),s?($(this).parents(".yearBox").find(".year").attr("data-check","true"),$(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked",!0)):($(this).parents(".yearBox").find(".year").attr("data-check","false"),$(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"))}),$(document).off("click.filterCheckbox4").on("click.filterCheckbox4","#luckysheet-filter-byvalue-select .day",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).find("input[type='checkbox']").prop("checked",!0));let s=!0;$(this).parents(".monthBox").find(".day").each(function(m,g){$(g).attr("data-check")=="true"||(s=!1)}),s?($(this).parents(".monthBox").find(".month").attr("data-check","true"),$(this).parents(".monthBox").find(".month input[type='checkbox']").prop("checked",!0)):($(this).parents(".monthBox").find(".month").attr("data-check","false"),$(this).parents(".monthBox").find(".month input[type='checkbox']").removeAttr("checked"));let d=!0;$(this).parents(".yearBox").find(".day").each(function(m,g){$(g).attr("data-check")=="true"||(d=!1)}),d?($(this).parents(".yearBox").find(".year").attr("data-check","true"),$(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked",!0)):($(this).parents(".yearBox").find(".year").attr("data-check","false"),$(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"))}),$(document).off("click.filterYearDropdown").on("click.filterYearDropdown","#luckysheet-filter-byvalue-select .yearBox .fa-caret-right",function(s){let u=$(this).parents(".luckysheet-mousedown-cancel");u.hasClass("year")&&$(this).parents(".yearBox").find(".monthList").slideToggle(),u.hasClass("month")&&$(this).parents(".monthBox").find(".dayList").slideToggle(),s.stopPropagation()}),$("#luckysheet-filter-byvalue-btn-all").click(function(){$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").prop("checked",!0),$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check","true")}),$("#luckysheet-filter-byvalue-btn-clear").click(function(){$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").removeAttr("checked"),$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check","false")}),$("#luckysheet-filter-byvalue-btn-contra").click(function(){$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").each(function(f,m){$(m).is(":checked")?($(m).removeAttr("checked"),$(m).parents(".luckysheet-mousedown-cancel").attr("data-check","false")):($(m).prop("checked",!0),$(m).parents(".luckysheet-mousedown-cancel").attr("data-check","true"))}),$("#luckysheet-filter-byvalue-select .ListBox .monthBox").each(function(f,m){let g=!0;$(m).find(".day input[type='checkbox']").each(function(v,b){$(b).is(":checked")||(g=!1)}),g?($(m).find(".month input[type='checkbox']").prop("checked",!0),$(m).attr("data-check","true")):($(m).find(".month input[type='checkbox']").removeAttr("checked"),$(m).attr("data-check","false"))}),$("#luckysheet-filter-byvalue-select .ListBox .yearBox").each(function(f,m){let g=!0;$(m).find(".day input[type='checkbox']").each(function(v,b){$(b).is(":checked")||(g=!1)}),g?($(m).find(".year input[type='checkbox']").prop("checked",!0),$(m).attr("data-check","true")):($(m).find(".year input[type='checkbox']").removeAttr("checked"),$(m).attr("data-check","false"))})}),$("#luckysheet-filter-initial").click(function(){if(!$t(h.currentSheetIndex,"filter"))return;$("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide().find("input").val(),$("#luckysheet-filter-selected span").data("type","0").data("type",null).text(t.conditionNone);let s={};s.type="datachangeAll_filter_clear",s.sheetIndex=h.currentSheetIndex,s.config=$.extend(!0,{},h.config),h.config.rowhidden={},s.curconfig=$.extend(!0,{},h.config),s.filter_save=$.extend(!0,{},h.luckysheet_filter_save);let u=[];$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").each(function(){let d=$(this),f=d.hasClass("luckysheet-filter-options-active"),m=Hn.parseJsonParm(d.data("rowhidden")),g=Hn.parseJsonParm(d.data("caljs"));u.push({optionstate:f,rowhidden:m,caljs:g,str:d.data("str"),edr:d.data("edr"),cindex:d.data("cindex"),stc:d.data("stc"),edc:d.data("edc")})}),s.optiongroups=u,h.jfundo.length=0,h.jfredo.push(s),$("#luckysheet-filter-selected-sheet"+h.currentSheetIndex+", #luckysheet-filter-options-sheet"+h.currentSheetIndex).remove(),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(),h.luckysheetfile[Z(h.currentSheetIndex)].filter=null,h.luckysheetfile[Z(h.currentSheetIndex)].filter_select=null,ne.saveParam("fsc",h.currentSheetIndex,null),h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,{},{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length)}),$("#luckysheet-filter-byvalue-input").on("input propertychange",function(){let s=$(this).val().toString();$("#luckysheet-filter-byvalue-select .ListBox .luckysheet-mousedown-cancel").show(),s!=""&&$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").each(function(u,d){if($(d).closest(".day").length>0){let f=$(d).siblings("label").text().toString(),m=$(d).closest(".monthBox").find(".month label").text().toString();($(d).closest(".yearBox").find(".year label").text().toString()+"-"+m+"-"+f).indexOf(s)==-1&&($(d).closest(".day").hide(),$(d).closest(".dayList").find(".day:visible").length==0&&$(d).closest(".monthBox").find(".month").hide(),$(d).closest(".monthList").find(".day:visible").length==0&&$(d).closest(".yearBox").find(".year").hide())}$(d).closest(".textBox").length>0&&$(d).siblings("label").text().toString().indexOf(s)==-1&&$(d).parents(".textBox").hide()})}),$("#luckysheet-filter-cancel").click(function(){$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide()}),$("#luckysheet-filter-confirm").click(function(){let s=$("#luckysheet-filter-menu"),u=s.data("str"),d=s.data("edr"),f=s.data("cindex"),m=s.data("stc"),g=s.data("edc"),y={};$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").not($("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").eq(f-m).get(0)).each(function(){let T=$(this),A=T.data("rowhidden");if(A=="")return!0;A=JSON.parse(A.replace(/\'/g,'"'));for(let R in A)y[R]=0});let v={},b={},k={};if($("#luckysheet-filter-bycondition").next().is(":visible")&&$("#luckysheet-filter-byvalue").next().is(":hidden")&&$("#luckysheet-filter-selected span").data("value")!="null"){let T=$("#luckysheet-filter-selected span"),A=T.data("type"),R=T.data("value");if(k.value=R,k.text=T.text(),A=="0")k.type="0";else if(A=="2"){let I=$("#luckysheet-filter-menu .luckysheet-filter-selected-input2 input");k.type="2",k.value1=I.eq(0).val(),k.value2=I.eq(1).val()}else k.type="1",k.value1=$("#luckysheet-filter-menu .luckysheet-filter-selected-input").eq(0).find("input").val();for(let I=u+1;I<=d;I++){if(I in y||h.flowdata[I]==null)continue;let F=h.flowdata[I][f];if(R=="cellnull")F!=null&&!me(F.v)&&(b[I]=0);else if(R=="cellnonull")(F==null||me(F.v))&&(b[I]=0);else if(R=="textinclude"){let z=k.value1;(F==null||me(F.v)||F.m.indexOf(z)==-1)&&(b[I]=0)}else if(R=="textnotinclude"){let z=k.value1;F==null||me(F.v)||F.m.indexOf(z)>-1&&(b[I]=0)}else if(R=="textstart"){let z=k.value1,M=z.length;(F==null||me(F.v)||F.m.substr(0,M)!=z)&&(b[I]=0)}else if(R=="textend"){let z=k.value1,M=z.length;(F==null||me(F.v)||M>F.m.length||F.m.substr(F.m.length-M,M)!=z)&&(b[I]=0)}else if(R=="textequal"){let z=k.value1;(F==null||me(F.v)||F.m!=z)&&(b[I]=0)}else if(R=="dateequal"){let z=at(k.value1)[2];F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="d"?parseInt(F.v)!=z&&(b[I]=0):b[I]=0}else if(R=="datelessthan"){let z=at(k.value1)[2];F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="d"?parseInt(F.v)>=z&&(b[I]=0):b[I]=0}else if(R=="datemorethan"){let z=at(k.value1)[2];F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="d"?parseInt(F.v)<=z&&(b[I]=0):b[I]=0}else if(R=="morethan"){let z=parseFloat(k.value1);F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?F.v<=z&&(b[I]=0):b[I]=0}else if(R=="moreequalthan"){let z=parseFloat(k.value1);F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?F.v<z&&(b[I]=0):b[I]=0}else if(R=="lessthan"){let z=parseFloat(k.value1);F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?F.v>=z&&(b[I]=0):b[I]=0}else if(R=="lessequalthan"){let z=parseFloat(k.value1);F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?F.v>z&&(b[I]=0):b[I]=0}else if(R=="equal"){let z=parseFloat(k.value1);F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?F.v!=z&&(b[I]=0):b[I]=0}else if(R=="noequal"){let z=parseFloat(k.value1);F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?F.v==z&&(b[I]=0):b[I]=0}else if(R=="include"){let z=parseFloat(k.value1),M=parseFloat(k.value2),E,N;z<M?(E=z,N=M):(N=z,E=M),F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?(F.v<E||F.v>N)&&(b[I]=0):b[I]=0}else if(R=="noinclude"){let z=parseFloat(k.value1),M=parseFloat(k.value2),E,N;z<M?(E=z,N=M):(N=z,E=M),F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?F.v>=E&&F.v<=N&&(b[I]=0):b[I]=0}}}else{$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").each(function(T,A){if($(A).is(":visible")&&$(A).is(":checked"))return!0;if($(A).closest(".day").length>0){let R=$(A).siblings("label").text();Number(R)<10&&(R="0"+Number(R));let I=$(A).closest(".monthBox").find(".month label").text().replace(t.filiterMonthText,"");Number(I)<10&&(I="0"+Number(I));let F=$(A).closest(".yearBox").find(".year label").text().replace(t.filiterYearText,""),z=t.filterDateFormatTip+"#$$$#"+F+"-"+I+"-"+R;v[z]="1"}if($(A).closest(".textBox").length>0){let R=$(A).closest(".textBox").data("filter");v[R]="1"}});for(let T=u+1;T<=d;T++){if(T in y||h.flowdata[T]==null)continue;let A=h.flowdata[T][f],R;if(A==null||me(A.v))R="null#$$$#null";else if(A.ct!=null&&A.ct.t=="d"){let I=mt("YYYY-MM-DD",A.v);R=t.filterDateFormatTip+"#$$$#"+I}else R=A.v+"#$$$#"+A.m;R in v&&(b[T]=0)}}let w=$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").eq(f-m),x=$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']:visible:checked").length<$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']:visible").length||$("#luckysheet-filter-byvalue-input").val().length>0||$("#luckysheet-filter-bycondition").next().is(":visible")&&$("#luckysheet-filter-byvalue").next().is(":hidden")&&$("#luckysheet-filter-selected span").data("value")!="null",C=$.extend(!0,y,b),S=Hn.parseJsonParm(w.data("rowhidden"));Vn(w,x,b,k,!0,u,d,f,m,g);let _=$.extend(!0,{},h.config);if(_.rowhidden=C,h.clearjfundo){let T={};T.type="datachangeAll_filter",T.sheetIndex=h.currentSheetIndex,T.config=$.extend(!0,{},h.config),T.curconfig=_,T.optionstate=x,T.optionsindex=f-m,T.rowhidden=$.extend(!0,{},b),T.rowhidenPre=$.extend(!0,{},S),k!=null&&(T.caljs=k),h.jfundo.length=0,h.jfredo.push(T)}h.config=_,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,_.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(),rl()})}var kn=Ie(()=>{Nt();Jt();Ft();ll();mr();Zt();za();Gt();Qt();bt();Xe();il();gr();Oa();Ml();dt();Vr();Yt();ua();Ba();Al()});var Gs,Re,qr=Ie(()=>{Ol();Qt();pr();Gt();Ml();Nt();An();dt();Xe();bt();ll();Ll();Gs={imgItem:{type:"3",src:"",originWidth:null,originHeight:null,default:{width:null,height:null,left:null,top:null},crop:{width:null,height:null,offsetLeft:0,offsetTop:0},isFixedPos:!1,fixedLeft:null,fixedTop:null,border:{width:0,radius:0,style:"solid",color:"#000"}},images:null,currentImgId:null,currentWinW:null,currentWinH:null,resize:null,resizeXY:null,move:!1,moveXY:null,cropChange:null,cropChangeXY:null,cropChangeObj:null,copyImgItemObj:null,insertImg:function(e){let n=h.toJsonOptions&&h.toJsonOptions.uploadImage;if(typeof n=="function")n(e).then(t=>{Gs._insertImg(t)}).catch(t=>{U.info('<i class="fa fa-exclamation-triangle"></i>',"\u56FE\u7247\u4E0A\u4F20\u5931\u8D25")});else{let t=new FileReader;t.readAsDataURL(e),t.onload=function(l){let a=l.target.result;Gs._insertImg(a),$("#luckysheet-imgUpload").val("")}}},_insertImg:function(e){let n=this,t=h.luckysheet_select_save[h.luckysheet_select_save.length-1],l=t.row_focus||0,a=t.column_focus||0,o=a==0?0:h.visibledatacolumn[a-1],s=l==0?0:h.visibledatarow[l-1],u=new Image;u.onload=function(){let f=u.width,m=u.height,g={src:e,left:o,top:s,originWidth:f,originHeight:m};n.addImgItem(g)};let d=h.toJsonOptions&&h.toJsonOptions.imageUrlHandle;u.src=typeof d=="function"?d(e):e},generateRandomId:function(e){e==null&&(e="img");let n=window.navigator.userAgent.replace(/[^a-zA-Z0-9]/g,"").split(""),t="";for(let a=0;a<12;a++)t+=n[Math.round(Math.random()*(n.length-1))];let l=new Date().getTime();return e+"_"+t+"_"+l},modelHtml:function(e,n){let t=this,l=h.toJsonOptions&&h.toJsonOptions.imageUrlHandle,a=typeof l=="function"?l(n.src):n.src,o=t.getImgItemParam(n),s=o.width*h.zoomRatio,u=o.height*h.zoomRatio,d=o.left*h.zoomRatio,f=o.top*h.zoomRatio,m=o.position,g=n.border.width;return`<div id="${e}" class="luckysheet-modal-dialog luckysheet-modal-dialog-image" style="width:${s}px;height:${u}px;padding:0;position:${m};left:${d}px;top:${f}px;z-index:200;"> |
| | | `+v+"</span>",u.id=="luckysheet-rich-text-editor"){$(m).replaceWith(x);let S=a.find("span");w=S.length-1,d=S.get(w).innerHTML.length-1}else $(m).html(x),w=0}Df(a.find("span").get(w),d+1)}else o.length>0}function Pf(e,n,t){if(e.ct==null)return;let l=e.ct.s;if(l!=null)for(let a=0;a<l.length;a++){let o=l[a];o[n]=t}}function Lf(e){let n=[],t,l=null;for(let a=0;a<e.length;a++){let o=e.get(a),s=Os(o.style.cssText),u=JSON.stringify(s),f=o.innerText;f=f.replace(/\n/g,`\r |
| | | `),u==l?t.v+=f:(s.v=f,n.push(s),l=u,t=s)}return n}function Os(e){if(e==null||e.length==0)return{};let n=e.split(";"),t=Q(),l=t.fontarray,a=t.fontjson,o={ff:l[0],fc:"#000000",fs:10,cl:0,un:0,bl:0,it:0};return n.forEach(s=>{s=s.toLowerCase();let u=Pl(s.substr(0,s.indexOf(":"))),f=Pl(s.substr(s.indexOf(":")+1));if(u=="font-weight"&&(f=="bold"?o.bl=1:o.bl=0),u=="font-style"&&(f=="italic"?o.it=1:o.it=0),u=="font-family"){let d=a[f];d==null?o.ff=f:o.ff=d}u=="font-size"&&(o.fs=parseInt(f)),u=="color"&&(o.fc=f),u=="text-decoration"&&(o.cl=1),u=="border-bottom"&&(o.un=1),u=="lucky-strike"&&(o.cl=f),u=="lucky-underline"&&(o.un=f)}),o}function Of(e,n){let t=e.split(";");if(n==null||n.length==0)return e;if(e.indexOf(n)>-1)for(let l=0;l<t.length;l++){let a=t[l];a=a.toLowerCase();let o=Pl(a.substr(0,a.indexOf(":"))),s=Pl(a.substr(a.indexOf(":")+1));if(o==n)return s}return""}function Ay(e,n,t){let l=e.split(";"),a="";if(n==null||n.length==0)return e;if(e.indexOf(n)>-1)for(let o=0;o<l.length;o++){let s=l[o];s=s.toLowerCase();let u=Pl(s.substr(0,s.indexOf(":"))),f=Pl(s.substr(s.indexOf(":")+1));u==n?a+=u+":"+t+";":u.length>0&&(a+=u+":"+f+";")}else n.length>0&&(e+=n+":"+t+";",a=e);return a}function Dy(e,n){let t=e.split(";"),l="",a=n;if(n==null||n.length==0)return e;if(n in zf&&(n=zf[n]),e.indexOf(n)>-1)for(let o=0;o<t.length;o++){let s=t[o];s=s.toLowerCase();let u=Pl(s.substr(0,s.indexOf(":"))),f=Pl(s.substr(s.indexOf(":")+1));u==n||a=="cl"&&u=="lucky-strike"||a=="un"&&u=="lucky-underline"||u.length>0&&(l+=u+":"+f+";")}else l=e;return l}function po(e,n,t){let l={};if(l[n]=t,n=="un"){let u=Of(e,"color");u==""&&(u="#000000");let f=Of(e,"font-size");f==""&&(f=11),f=parseInt(f),l._fontSize=f,l._color=u}let a=Ti(l,void 0,void 0,!1),o=Pl(a.substr(0,a.indexOf(":"))),s=Pl(a.substr(a.indexOf(":")+1));return s=s.substr(0,s.length-1),e=Dy(e,n),e=Ay(e,o,s),e}function Bs(e,n,t=!0){let l=e.split(";"),a=n.split(";"),o="",s={};for(let u=0;u<l.length;u++){let f=l[u],d=!0;f=f.toLowerCase();let m=Pl(f.substr(0,f.indexOf(":")));if(m=="font-size")continue;let g=Pl(f.substr(f.indexOf(":")+1));if(!(t&&!(m in Ff))){for(let y=0;y<a.length;y++){let v=a[y];v=v.toLowerCase();let b=Pl(v.substr(0,v.indexOf(":"))),k=Pl(v.substr(v.indexOf(":")+1));if(m==b){o+=b+":"+k+";",d=!1;continue}}d&&(o+=m+":"+g+";"),s[m]=1}}for(let u=0;u<a.length;u++){let f=a[u];f=f.toLowerCase();let d=Pl(f.substr(0,f.indexOf(":"))),m=Pl(f.substr(f.indexOf(":")+1));t&&!(d in Ff)||d in s||(o+=d+":"+m+";")}return o}var Mf,Ff,zf,gn=Ie(()=>{Kt();pn();bt();Xe();Mf={bl:1,it:1,ff:1,cl:1,un:1,fs:1,fc:1},Ff={"font-weight":1,"font-style":1,"font-family":1,"text-decoration":1,"border-bottom":1,"font-size":1,color:1};zf={bl:"font-weight",it:"font-style",ff:"font-family",fs:"font-size",fc:"color",cl:"text-decoration",un:"border-bottom"}});function Pt(e,n){if(e==null&&(e=h.luckysheet_select_save[0]),e.row==null||e.row.length==0)return[];let t,l;n!=null&&n!=h.currentSheetIndex?(t=h.luckysheetfile[Z(n)].data,l=h.luckysheetfile[Z(n)].config):(t=xe.deepCopyFlowData(h.flowdata),l=h.config);let a=[];for(let o=e.row[0];o<=e.row[1];o++){if(t[o]==null||l.rowhidden!=null&&l.rowhidden[o]!=null)continue;let s=[];for(let u=e.column[0];u<=e.column[1];u++)s.push(t[o][u]);a.push(s)}return a}function Si(e,n){if(n==null||n.row==null||n.row.length==0)return[];let t=Ci(h.luckysheetfile[Z(h.currentSheetIndex)].dynamicArray),l=[];if(e==null)return l;for(let a=n.row[0];a<=n.row[1];a++){if(e[a]==null)continue;let o=[];for(let s=n.column[0];s<=n.column[1];s++){let u;a+"_"+s in t?u=t[a+"_"+s]:u=e[a][s],o.push(u)}l.push(o)}return l}function Bf(e){if(e==null||e.row==null||e.row.length==0)return[];let n=[];for(let t=e.row[0];t<=e.row[1];t++){let l=[];if(!(h.config.rowhidden!=null&&h.config.rowhidden[t]!=null)){for(let a=e.column[0];a<=e.column[1];a++){let o="";h.flowdata[t]!=null&&h.flowdata[t][a]!=null&&(o=h.flowdata[t][a]),l.push(o)}n.push(l)}}return n}function ze(e,n,t,l){l==null&&(l="v"),t==null&&(t=h.flowdata);let a;if(e!=null&&n!=null)a=t[e][n];else if(e!=null)a=t[e];else if(n!=null)a=t[0].map(function(u,f){return t.map(function(d){return d[f]})})[n];else return t;let o=a;return P(a)=="object"&&(o=a[l],l=="f"&&o!=null?o=p.functionHTMLGenerate(o):l=="f"?o=a.v:a&&a.ct&&a.ct.t=="d"&&(o=a.m)),o==null&&(o=null),o}function cl(e,n,t,l){if(n<=0&&t<=0)return e;n<=0&&(n=0),t<=0&&(t=0);let a=0;e.length==0?(e=[],a=0):a=e[0].length;let o=[];for(let u=0;u<t;u++)o.push(null);let s=[];for(let u=0;u<a+t;u++)s.push(null);for(let u=0;u<e.length;u++)e[u]=[].concat(e[u].concat(o));for(let u=0;u<n;u++)e.push([].concat(s));return l&&(ne.saveParam("all",h.currentSheetIndex,e.length,{k:"row"}),ne.saveParam("all",h.currentSheetIndex,e[0].length,{k:"column"})),e}function zl(e,n,t,l){let a;return l!=null?a=l[e][n]:a=My(e,n,t),a==null?null:a.f}function My(e,n,t){if(e==null||n==null)return;let l;if(t==null?l=h.flowdata:l=ve.getSheetByIndex(t).data,!(!l||!l[e]||!l[e][n]))return l[e][n]}function Hs(e,n){let t=ze(e,n,null,"m");if(t==null&&(t=ze(e,n),t==null)){let l=ze(e,n,null,"ct");Na(l)&&(t=l.s)}return t}function Hf(e,n){let t=ze(e,n,null,"ct");if(Na(t)){let l=t.s,a="";for(let o=0;o<l.length;o++){let s=l[o];s.v!=null&&(a+=s.v)}return a}return""}function Vf(e,n,t){let l=ze(e,n,t,"ct");t==null&&(t=h.flowdata);let a=t[e][n];if(Na(l)){let o=l.s,s="";for(let u=0;u<o.length;u++){let f=o[u];if(f.v!=null){let d=Ti(f);s+="<span index='"+u+"' style='"+d+"'>"+f.v+"</span>"}}return s}return""}function Ti(e,n,t,l=!0){if(e==null)return;let a="",s=Q().fontarray;for(let u in e){let f=e[u];if(l&&(f=Tr(e,u)),u=="bl"&&f!="0"&&(a+="font-weight: bold;"),u=="it"&&f!="0"&&(a+="font-style:italic;"),u=="ff"){let d=f;isNaN(parseInt(f))?d=f:d=s[parseInt(f)],a+="font-family: "+d+";"}u=="fs"&&(a+="font-size: "+f+"pt;"),(u=="fc"&&f!="#000000"||n!=null||t!=null&&t.textColor!=null)&&(t!=null&&t.textColor!=null?a+="color: "+t.textColor+";":n!=null?a+="color: "+n[0]+";":a+="color: "+f+";"),u=="cl"&&f!="0"&&(a+="text-decoration: line-through;")}return a}function Tr(e,n){let t=e;return n in{bl:1,it:1,ff:1,cl:1,un:1}||n=="fs"&&_l(e)?t==null?t="0":(t=t[n],t==null&&(t="0")):n=="fc"?t==null?t="#000000":(t=t[n],t==null&&(t="#000000"),t.indexOf("rgba")>-1&&(t=zn(t))):n=="bg"?t==null?t=null:(t=t[n],t==null?t=null:t.toString().indexOf("rgba")>-1&&(t=zn(t))):n.substr(0,2)=="bs"?t==null?t="none":(t=t[n],t==null&&(t="none")):n.substr(0,2)=="bc"?t==null?t="#000000":(t=t[n],t==null&&(t="#000000")):n=="ht"?(t==null?t="1":(t=t[n],t==null&&(t="1")),["0","1","2"].indexOf(t.toString())==-1&&(t="1")):n=="vt"?(t==null?t="0":(t=t[n],t==null&&(t="0")),["0","1","2"].indexOf(t.toString())==-1&&(t="0")):n=="ct"?t==null?t=null:(t=t[n],t==null&&(t=null)):n=="fs"?t==null?t=String(h.defaultFontSize):(t=t[n],t==null&&(t=String(h.defaultFontSize))):n=="tb"||n=="tr"?t==null?t="0":(t=t[n],t==null&&(t="0")):n=="rt"&&(t==null?t=null:(t=t[n],t==null&&(t=null))),t}function Pl(e){return e==null||e.length==0?e:e.replace(/^\s+|\s+$/gm,"")}var Kt=Ie(()=>{ft();Nt();Qt();Ut();Jt();fo();dl();gn();bt();Xe()});function Fy(e,n){let t=0,l=e.length-1;for(;t<=l;){let a=parseInt((l+t)/2);if(n<e[a]&&(a==0||n>=e[a-1]))return a;if(n>=e[a])t=a+1;else if(n<e[a])l=a-1;else return-1}}function Ey(e,n){let t=0,l=0,a=0,o=-1,s=e.length-1;for(;t<e.length&&s>=0&&s>=t;){if(l=e[s],s==0?a=0:a=e[s-1],n>=a&&n<l){o=s;break}if(l=e[t],t==0?a=0:a=e[t-1],n>=a&&n<l){o=t;break}t++,s--}return o}function st(e,n){let t=e.length-1;return e.length<40||n<=e[20]||n>=e[t-20]?t=Ey(e,n):t=Fy(e,n),t}var Lr=Ie(()=>{});function tl(e){let n=0,t=0;return n=h.visibledatarow[e],e==0?t=0:t=h.visibledatarow[e-1],[t,n,e]}function _t(e){let n=st(h.visibledatarow,e);return n==-1&&e>0?n=h.visibledatarow.length-1:n==-1&&e<=0&&(n=0),tl(n)}function At(e){let n=0,t=0;return n=h.visibledatacolumn[e],e==0?t=0:t=h.visibledatacolumn[e-1],[t,n,e]}function qf(e,n){let t=0,l=0;return t=h.visibledatacolumn[e+n-1],e==0?l=0:l=h.visibledatacolumn[e-1],[l,t,e]}function wt(e){let n=st(h.visibledatacolumn,e);return n==-1&&e>0?n=h.visibledatacolumn.length-1:n==-1&&e<=0&&(n=0),At(n)}function nt(e,n){let t=$("#"+h.container).offset(),l=e-t.left-h.rowHeaderWidth,a=n-t.top-h.infobarHeight-h.toolbarHeight-h.calculatebarHeight-h.columnHeaderHeight;return[l,a]}var Ol=Ie(()=>{Lr();Xe()});function yl(e,n,t,l){var s;let a=$.extend(!0,{},l);a.rowlen==null&&(a.rowlen={}),a.customHeight==null&&(a.customHeight={});let o=$("#luckysheetTableContent").get(0).getContext("2d");o.textBaseline="top";for(let u=n;u<=t;u++){if(a.rowhidden!=null&&a.rowhidden[u]!=null)continue;let f=h.defaultrowlen;if(a.customHeight[u]!=1){delete a.rowlen[u];for(let d=0;d<e[u].length;d++){let m=e[u][d];if(m!=null&&m!=null&&(m.v!=null||_l(m))){let g;if(m.mc)if(d===m.mc.c){let b=At(d)[0];g=At(m.mc.c+m.mc.cs-1)[1]-b-2}else continue;else g=At(d)[1]-At(d)[0]-2;let y=Sr(m,o,{r:u,c:d,cellWidth:g}),v=0;y!=null&&(v=y.textHeightAll+2),v>f&&(f=v)}}f=f/h.zoomRatio,f!=h.defaultrowlen?a.rowlen[u]=f:((s=l.rowlen)==null?void 0:s[u])&&(a.rowlen[u]=l.rowlen[u])}}return a}function jf(e,n){let t=0,l=$("#luckysheetTableContent").get(0).getContext("2d");l.textBaseline="top";for(let a=0;a<e[n].length;a++){let o=e[n][a];if(o!=null&&!(o.mc!=null&&o.mc.rs!==1)&&!(h.config.colhidden!=null&&h.config.colhidden[a]!=null)&&o!=null&&(o.v!=null||_l(o))){let s=Ny(o,a),u=Sr(o,l,{r:n,c:a,cellWidth:s}),f=0;u!=null&&(f=u.textHeightAll+2),f>t&&(t=f)}}return t}function Ny(e,n){let t=At(n);return e.mc&&e.mc.cs!==1&&(t=qf(n,e.mc.cs)),t[1]-t[0]-2}function Uf(e,n,t){let l=0,a=go(t,n),o=$("#luckysheetTableContent").get(0).getContext("2d");o.textBaseline="top";for(var s=0;s<e.length;s++){var u=e[s][n];if(u!=null&&(u.v!=null||_l(u))){let f=a[n],d=Sr(u,o,{r:s,c:n,cellHeight:f}),m=0;d!=null&&(m=d.textWidthAll+2),m>l&&(l=m)}}return l}function go(e,n){let t=[],l=0;for(let a=0;a<e;a++){let o=h.defaultrowlen;if(n.rowlen!=null&&n.rowlen[a]!=null&&(o=n.rowlen[a]),n.rowhidden!=null&&n.rowhidden[a]!=null){o=n.rowhidden[a],t.push(l);continue}else l+=o+1;t.push(l)}return t}function zr(e,n,t){let l=h.measureTextCache[e+"_"+n.font];if(t!=null&&(l=h.measureTextCache[e+"_"+t]),l!=null)return l;{if(t!=null){let s=n.font;n.font=t}let a=n.measureText(e),o={};if(o.width=a.width,t!=null&&(n.font=t),o.actualBoundingBoxDescent=a.actualBoundingBoxDescent,o.actualBoundingBoxAscent=a.actualBoundingBoxAscent,o.actualBoundingBoxDescent==null||o.actualBoundingBoxAscent==null||isNaN(o.actualBoundingBoxDescent)||isNaN(o.actualBoundingBoxAscent)){let s="M";In(e)&&(s="\u7530");let u=ke.getTextSize(s,n.font)[1]*.8;n.textBaseline=="top"?(o.actualBoundingBoxDescent=u,o.actualBoundingBoxAscent=0):n.textBaseline=="middle"?(o.actualBoundingBoxDescent=u/2,o.actualBoundingBoxAscent=u/2):(o.actualBoundingBoxDescent=0,o.actualBoundingBoxAscent=u)}if(n.textBaseline=="alphabetic"){let s="gjpqy",u="abcdABCD",f=h.measureTextCache[s+"_"+n.font];t!=null&&(f=h.measureTextCache[s+"_"+t]);let d=h.measureTextCache[u+"_"+n.font];t!=null&&(d=h.measureTextCache[u+"_"+t]),f==null&&(f=n.measureText(s)),d==null&&(d=n.measureText(u)),o.actualBoundingBoxDescent<=d.actualBoundingBoxDescent&&(o.actualBoundingBoxDescent=f.actualBoundingBoxDescent,o.actualBoundingBoxDescent==null&&(o.actualBoundingBoxDescent=0))}return o.width*=h.zoomRatio,o.actualBoundingBoxDescent*=h.zoomRatio,o.actualBoundingBoxAscent*=h.zoomRatio,h.measureTextCache[e+"_"+h.zoomRatio+"_"+n.font]=o,o}}function Py(e){return e.measureText("\u7530").actualBoundingBoxAscent!=null}function Sr(e,n,t){let l=t.cellWidth,a=t.cellHeight,o="",s="";l==null&&(o="onlyWidth",s="_");let u=h.measureTextCellInfoCache[t.r+"_"+t.c+s+o];if(u!=null)return u;let f=t.space_width,d=t.space_height;f==null&&(f=2),d==null&&(d=2);let m=Tr(e,"ht"),g=Tr(e,"vt"),y=Tr(e,"tb"),v=Tr(e,"tr"),b=Tr(e,"rt"),k=1,w=0;b==null&&(v=="0"?b=0:v=="1"?b=45:v=="4"?b=90:v=="2"?b=135:v=="5"&&(b=180),b==null&&(b=0)),(b>180||b<0)&&(b=0),b=parseInt(b),b>90&&(b=90-b,k=0,w=1),n.textAlign="start";let x={};x.values=[];let C,S="0",_="0",T=11,A=!1,R,I=[];if(_l(e)){let F=e.ct.s,z=0;for(let M=0;M<F.length;M++){let E=F[M],N=oa(E),L=E.fc,O=E.cl,V=E.un,q=E.v,W=E.fs;q=q.replace(/\r\n/g,"_x000D_").replace(/ /g,"_x000D_").replace(/\r/g,"_x000D_").replace(/\n/g,"_x000D_");let X=q.split("_x000D_");for(let te=0;te<X.length;te++){let le=X[te];if(le==""&&te!=X.length-1)I.push({fontset:N,fc:L==null?"#000":L,cl:O==null?0:O,un:V==null?0:V,wrap:!0,fs:W==null?11:W}),z++;else{let oe=le.split("");for(let se=0;se<oe.length;se++){let ce=oe[se];I.push({fontset:N,fc:L==null?"#000":L,cl:O==null?0:O,un:V==null?0:V,v:ce,si:z,fs:W==null?11:W})}te!=X.length-1&&(I.push({fontset:N,fc:L==null?"#000":L,cl:O==null?0:O,un:V==null?0:V,wrap:!0,fs:W==null?11:W}),z++)}}z++}A=!0}else if(C=oa(e),n.font=C,S=Tr(e,"cl"),_=Tr(e,"un"),T=Tr(e,"fs"),e instanceof Object?(R=e.m,R==null&&(R=e.v)):R=e,me(R))return null;if(v=="3"){n.textBaseline="top";let F=0,z=0,M=0,E=0,N={},L=[];if(A){let q=null;for(let W=0;W<I.length;W++){let X=I[W],te=X.v,le=X.v;if(X.wrap===!0&&(te="M",le="",q!=null&&q.wrap!==!0&&W<I.length-1)){L.push(E),E=0,M+=1,q=X;continue}let oe=zr(te,n,X.fontset),se=oe.width+f,ce=oe.actualBoundingBoxAscent+oe.actualBoundingBoxDescent+d;E+=ce,y=="2"&&!X.wrap&&E>a&&N[M]!=null&&(L.push(E-ce),E=ce,M+=1),W==I.length-1&&L.push(E),N[M]==null&&(N[M]=[]);let he={content:le,style:X,width:se,height:ce,left:0,top:0,colIndex:M,asc:oe.actualBoundingBoxAscent,desc:oe.actualBoundingBoxDescent,inline:!0};X.wrap===!0&&(he.wrap=!0),N[M].push(he),console.log("normal",W,M,X,q,N),q=X}}else{let q=zr(R,n),W=q.actualBoundingBoxDescent+q.actualBoundingBoxAscent;R=R.toString();let X=[];R.length>1?X=R.split(""):X.push(R);let te=zr(X[0],n).width;for(let le=0;le<X.length;le++){let oe=te+f,se=W+d;E+=se,y=="2"&&E>a&&N[M]!=null&&(L.push(E-se),E=se,M+=1),le==X.length-1&&L.push(E),N[M]==null&&(N[M]=[]),N[M].push({content:X[le],style:C,width:oe,height:se,left:0,top:0,colIndex:M,asc:q.actualBoundingBoxAscent,desc:q.actualBoundingBoxDescent})}}let O=[];for(let q=0;q<L.length;q++){let W=L[q],X=N[q],te=0;for(let le=0;le<X.length;le++){let oe=X[le];te=Math.max(te,oe.width)}O.push(te),F+=te,z=Math.max(z,W)}if(x.type="verticalWrap",x.textWidthAll=F,x.textHeightAll=z,o=="onlyWidth")return x;let V=0;for(let q=0;q<L.length;q++){let W=L[q],X=O[q],te=N[q],le=0;for(let oe=0;oe<te.length;oe++){let se=te[oe],ce=f+V;m=="0"?ce=l/2+V-F/2+f*L.length:m=="2"&&(ce=l+V-F+f);let he=a-d+le-W;g=="0"?he=a/2+le-W/2:g=="1"&&(he=d+le),le+=se.height,se.left=ce,se.top=he,$i(se,S,_,{width:X,height:se.height,left:ce,top:he+se.height-d,asc:se.height,desc:0,fs:T}),x.values.push(se)}V+=X}}else{let F=Py(n);if(F?n.textBaseline="alphabetic":n.textBaseline="bottom",y=="2"||A){let z=0,M=0,E=0,N=0,L=0,O={},V=[];x.rotate=b,b=Math.abs(b);let q=0,W=0,X=0,te,le,oe,se,ce=1,he={},ue=null,K=null;if(A)for(;ce<=I.length;){let Ne=I.slice(q,ce);if(Ne[Ne.length-1].wrap===!0){if(q=ce,Ne.length>1)for(let qe=0;qe<Ne.length-1;qe++){let Se=Ne[qe],Ke={content:Se.v,style:Se,width:Se.measureText.width,height:Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.measureText.actualBoundingBoxAscent,desc:Se.measureText.actualBoundingBoxDescent,inline:!0,fs:Se.fs};O[N].push(Ke)}if(Ne.length==1||ce==I.length){let qe=Ne[0],Se=zr("M",n,qe.fontset);O[N]==null&&(O[N]=[]),O[N].push({content:"",style:qe,width:Se.width,height:Se.actualBoundingBoxAscent+Se.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.actualBoundingBoxAscent,desc:Se.actualBoundingBoxDescent,inline:!0,wrap:!0,fs:qe.fs})}N+=1,ce++;continue}let et=0,vt=0;for(let qe=0;qe<Ne.length;qe++){let Se=Ne[qe];Se.measureText==null&&(Se.measureText=zr(Se.v,n,Se.fontset)),et+=Se.measureText.width,vt=Math.max(Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent)}let It=et*Math.cos(b*Math.PI/180)+vt*Math.sin(b*Math.PI/180),ot=et*Math.sin(b*Math.PI/180)+vt*Math.cos(b*Math.PI/180),kt=Ne[Ne.length-1];if((kt.v==" "||es(kt.v)==2)&&(K=ce),b!=0)if(console.log(ot,d,a,Ne,ot+d>a),ot+d>a&&O[N]!=null&&y=="2"&&ce!=I.length)if(K!=null&&K<ce){for(let qe=0;qe<K-q;qe++){let Se=Ne[qe];O[N].push({content:Se.v,style:Se,width:Se.measureText.width,height:Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.measureText.actualBoundingBoxAscent,desc:Se.measureText.actualBoundingBoxDescent,inline:!0,fs:Se.fs})}q=K,ce=K+1,N+=1,K=null}else{q=ce-1;for(let qe=0;qe<Ne.length-1;qe++){let Se=Ne[qe];O[N].push({content:Se.v,style:Se,width:Se.measureText.width,height:Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.measureText.actualBoundingBoxAscent,desc:Se.measureText.actualBoundingBoxDescent,inline:!0,fs:Se.fs})}N+=1}else if(ce==I.length){O[N]==null&&(O[N]=[]);for(let qe=0;qe<Ne.length;qe++){let Se=Ne[qe];O[N].push({content:Se.v,style:Se,width:Se.measureText.width,height:Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.measureText.actualBoundingBoxAscent,desc:Se.measureText.actualBoundingBoxDescent,inline:!0,fs:Se.fs})}break}else O[N]==null&&(O[N]=[]),ce++;else if(It+f>l&&O[N]!=null&&y=="2"&&ce!=I.length)if(K!=null&&K<ce){for(let qe=0;qe<K-q;qe++){let Se=Ne[qe];O[N].push({content:Se.v,style:Se,width:Se.measureText.width,height:Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.measureText.actualBoundingBoxAscent,desc:Se.measureText.actualBoundingBoxDescent,inline:!0,fs:Se.fs})}q=K,ce=K+1,N+=1,K=null}else{q=ce-1;for(let qe=0;qe<Ne.length-1;qe++){let Se=Ne[qe];O[N].push({content:Se.v,style:Se,width:Se.measureText.width,height:Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.measureText.actualBoundingBoxAscent,desc:Se.measureText.actualBoundingBoxDescent,inline:!0,fs:Se.fs})}N+=1}else if(ce==I.length){O[N]==null&&(O[N]=[]);for(let qe=0;qe<Ne.length;qe++){let Se=Ne[qe];O[N].push({content:Se.v,style:Se,width:Se.measureText.width,height:Se.measureText.actualBoundingBoxAscent+Se.measureText.actualBoundingBoxDescent,left:0,top:0,splitIndex:N,asc:Se.measureText.actualBoundingBoxAscent,desc:Se.measureText.actualBoundingBoxDescent,inline:!0,fs:Se.fs})}break}else O[N]==null&&(O[N]=[]),ce++}else for(R=R.toString();ce<=R.length;){let Ne=R.substring(q,ce),et=zr(Ne,n),vt=et.width,It=et.actualBoundingBoxAscent+et.actualBoundingBoxDescent,ot=vt*Math.cos(b*Math.PI/180)+It*Math.sin(b*Math.PI/180),kt=vt*Math.sin(b*Math.PI/180)+It*Math.cos(b*Math.PI/180),qe=Ne.substr(Ne.length-1,1);if((qe==" "||es(qe)==2)&&se!=null&&(ue={index:ce,str:te+qe,width:oe,height:le,asc:se.actualBoundingBoxAscent,desc:se.actualBoundingBoxDescent}),b!=0)if(kt+d>a&&O[N]!=null&&ce!=R.length)ue!=null&&ue.index<ce?(q=ue.index,ce=ue.index+1,O[N].push({content:ue.str,style:C,width:ue.width,height:ue.height,left:0,top:0,splitIndex:N,asc:ue.asc,desc:ue.desc,fs:T}),N+=1,ue=null):(q=ce-1,O[N].push({content:te,style:C,left:0,top:0,splitIndex:N,height:le,width:oe,asc:et.actualBoundingBoxAscent,desc:et.actualBoundingBoxDescent,fs:T}),N+=1);else if(ce==R.length){O[N]==null&&(O[N]=[]),O[N].push({content:Ne,style:C,left:0,top:0,splitIndex:N,height:It,width:vt,asc:et.actualBoundingBoxAscent,desc:et.actualBoundingBoxDescent,fs:T});break}else O[N]==null&&(O[N]=[]),ce++;else if(ot+f>l&&O[N]!=null&&ce!=R.length)ue!=null&&ue.index<ce?(q=ue.index,ce=ue.index+1,O[N].push({content:ue.str,style:C,width:ue.width,height:ue.height,left:0,top:0,splitIndex:N,asc:ue.asc,desc:ue.desc,fs:T}),N+=1,ue=null):(ue=null,q=ce-1,O[N].push({content:te,style:C,width:oe,height:le,left:0,top:0,splitIndex:N,asc:et.actualBoundingBoxAscent,desc:et.actualBoundingBoxDescent,fs:T}),N+=1);else if(ce==R.length){O[N]==null&&(O[N]=[]),O[N].push({content:Ne,style:C,width:vt,height:It,left:0,top:0,splitIndex:N,asc:et.actualBoundingBoxAscent,desc:et.actualBoundingBoxDescent,fs:T});break}else O[N]==null&&(O[N]=[]),ce++;te=Ne,le=It,oe=vt,se=et}let G=[],ee=0,pe=Object.keys(O).length;for(let Ne=0;Ne<pe;Ne++){let et=O[Ne];if(et==null)continue;let vt=0,It=0,ot=0,kt=0,qe=0,Se=0;for(let Ke=0;Ke<et.length;Ke++){let Fe=et[Ke];b!=0,vt+=Fe.width,It=Math.max(It,Fe.height-(F?Fe.desc:0)),ot=Math.max(ot,F?Fe.desc:0),kt=Math.max(kt,Fe.asc),Se++}qe=It/2,ee=Math.max(ee,Se),b!=0?(It+=qe,E=Math.max(E,vt),M+=It):(It+=qe,z=Math.max(z,vt),M+=It),G.push({width:vt,height:It,desc:ot,asc:kt,lineHeight:qe,wordCount:Se})}let ae=0,Te=0,ie=b*Math.PI/180,Ee=G[pe-1],je=Ee.lineHeight;M=M-je+Ee.desc;let Ce=M/Math.sin(ie)+E*Math.cos(ie),Le=E*Math.sin(ie),Ge=0;if(b!=0?(pe==1?(z=E+2*(M/Math.tan(ie)),Ge=M/Math.tan(ie)):z=E+M/Math.tan(ie),x.textWidthAll=Ce,x.textHeightAll=Le):(x.textWidthAll=z,x.textHeightAll=M),o=="onlyWidth")return x;if(b!=0&&k=="1"){n.textAlign="end";for(let Ne=0;Ne<pe;Ne++){let et=O[Ne];if(et==null)continue;let vt=G[Ne];Te=0;for(let It=et.length-1;It>=0;It--){let ot=et[It],kt,qe;if(b!=0){let Se,Ke=ae+vt.asc;if(Se=ae/Math.tan(ie)-Te+E,m=="0"){let Fe=M/Math.sin(ie);g=="0"?(kt=Se+l/2-z/2+je*Math.cos(ie)/2,qe=Ke+a/2-M/2-je*Math.cos(ie)/2):g=="1"?(kt=Se+l/2-z/2,qe=Ke-(M/2-Le/2)):g=="2"&&(kt=Se+l/2-z/2+je*Math.cos(ie),qe=Ke+a-Le/2-M/2-je*Math.cos(ie))}else m=="1"?g=="0"?(kt=Se-Le*Math.sin(ie)/2+je*Math.cos(ie)/2,qe=Ke+a/2+Le*Math.cos(ie)/2-je*Math.cos(ie)/2):g=="1"?(kt=Se-Le*Math.sin(ie),qe=Ke+Le*Math.cos(ie)):g=="2"&&(kt=Se+je*Math.cos(ie),qe=Ke+a-je*Math.cos(ie)):m=="2"&&(g=="0"?(kt=Se+l-Ce/2-(E/2+M/2/Math.tan(ie))+je*Math.cos(ie)/2,qe=Ke+a/2-M/2-je*Math.cos(ie)/2):g=="1"?(kt=Se+l-z+Ge,qe=Ke-M):g=="2"&&(kt=Se+l-Ce*Math.cos(ie)+je*Math.cos(ie),qe=Ke+a-Ce*Math.sin(ie)-je*Math.cos(ie)))}ot.left=kt,ot.top=qe,$i(ot,S,_,{width:ot.width,height:ot.height,left:kt-ot.width,top:qe,asc:vt.asc,desc:vt.desc,fs:ot.fs}),x.values.push(ot),Te+=ot.width}ae+=vt.height}}else for(let Ne=0;Ne<pe;Ne++){let et=O[Ne];if(et==null)continue;let vt=G[Ne];Te=0;for(let It=0;It<et.length;It++){let ot=et[It],kt,qe;if(b!=0){let Se,Ke=ae+vt.asc;if(Se=(M-ae)/Math.tan(ie)+Te,m=="0"){let Fe=M/Math.sin(ie);g=="0"?(kt=Se+l/2-z/2-je*Math.cos(ie)/2,qe=Ke+a/2-M/2+je*Math.cos(ie)/2):g=="1"?(kt=Se+l/2-z/2-je*Math.cos(ie)/2,qe=Ke-(M/2-Le/2)+je*Math.cos(ie)/2):g=="2"&&(kt=Se+l/2-z/2-je*Math.cos(ie),qe=Ke+a-Le/2-M/2-je*Math.cos(ie))}else m=="1"?g=="0"?(kt=Se-Le*Math.sin(ie)/2-je*Math.cos(ie)/2,qe=Ke-M+a/2-Le*Math.cos(ie)/2-je*Math.cos(ie)/2):g=="1"?(kt=Se,qe=Ke-M):g=="2"&&(kt=Se-Le*Math.sin(ie)-je*Math.cos(ie),qe=Ke-M+a-Le*Math.cos(ie)-je*Math.cos(ie)):m=="2"&&(g=="0"?(kt=Se+l-Ce/2-z/2-je*Math.cos(ie)/2,qe=Ke+a/2-M/2-je*Math.cos(ie)/2):g=="1"?(kt=Se+l-Ce*Math.cos(ie),qe=Ke+Le*Math.cos(ie)):g=="2"&&(kt=Se+l-z-je*Math.cos(ie)+Ge,qe=Ke+a-je*Math.cos(ie)));$i(ot,S,_,{width:ot.width,height:ot.height,left:kt,top:qe,asc:vt.asc,desc:vt.desc,fs:ot.fs})}else kt=f+Te,m=="0"?kt=l/2+Te-vt.width/2:m=="2"&&(kt=l+Te-vt.width),qe=a-d+ae+vt.asc-M,g=="0"?qe=a/2+ae-M/2+vt.asc:g=="1"&&(qe=d+ae+vt.asc),$i(ot,S,_,{width:ot.width,height:ot.height,left:kt,top:qe,asc:vt.asc,desc:vt.desc,fs:ot.fs});ot.left=kt,ot.top=qe,x.values.push(ot),Te+=ot.width}ae+=vt.height}x.type="plainWrap",b!=0&&(m=="0"?g=="0"?(x.textLeftAll=l/2,x.textTopAll=a/2):g=="1"?(x.textLeftAll=l/2,x.textTopAll=Le/2):g=="2"&&(x.textLeftAll=l/2,x.textTopAll=a-Le/2):m=="1"?g=="0"?(x.textLeftAll=0,x.textTopAll=a/2):g=="1"?(x.textLeftAll=0,x.textTopAll=0):g=="2"&&(x.textLeftAll=0,x.textTopAll=a):m=="2"&&(g=="0"?(x.textLeftAll=l-Ce/2,x.textTopAll=a/2):g=="1"?(x.textLeftAll=l,x.textTopAll=0):g=="2"&&(x.textLeftAll=l,x.textTopAll=a)))}else{let z=zr(R,n),M=z.width,E=z.actualBoundingBoxDescent+z.actualBoundingBoxAscent;x.rotate=b,b=Math.abs(b);let N=b*Math.PI/180,L=M*Math.cos(N)+E*Math.sin(N),O=M*Math.sin(N)+E*Math.cos(N);if(b!=0?x.textHeightAll=O:x.textHeightAll=O+E/2-z.actualBoundingBoxDescent-d,x.textWidthAll=L,o=="onlyWidth")return x;let V=L,q=O,W=f+E*Math.sin(N)*k;m=="0"?W=l/2-V/2+E*Math.sin(N)*k:m=="2"&&(W=l-f-V+E*Math.sin(N)*k);let X=a-d-q+z.actualBoundingBoxAscent*Math.cos(N)+M*Math.sin(N)*k;g=="0"?X=a/2-q/2+z.actualBoundingBoxAscent*Math.cos(N)+M*Math.sin(N)*k:g=="1"&&(X=d+z.actualBoundingBoxAscent*Math.cos(N)+M*Math.sin(N)*k),x.type="plain";let te={content:R,style:C,width:V,height:q,left:W,top:X};$i(te,S,_,{width:M,height:E,left:W,top:X,asc:z.actualBoundingBoxAscent,desc:z.actualBoundingBoxDescent,fs:T}),x.values.push(te),x.textLeftAll=W,x.textTopAll=X,x.asc=z.actualBoundingBoxAscent,x.desc=z.actualBoundingBoxDescent}}return x}function $i(e,n,t,l){let a=l.left,o=l.top,s=l.width,u=l.height,f=l.asc,d=l.desc,m=l.fs;if(e.wrap!==!0&&(e.inline==!0&&e.style!=null&&(n=e.style.cl,t=e.style.un),n!="0"&&(e.cancelLine={},e.cancelLine.startX=a,e.cancelLine.startY=o-f/2+1,e.cancelLine.endX=a+s,e.cancelLine.endY=o-f/2+1,e.cancelLine.fs=m),t!="0")){if(e.underLine=[],t=="1"||t=="2"){let g={};g.startX=a,g.startY=o+3,g.endX=a+s,g.endY=o+3,g.fs=m,e.underLine.push(g)}if(t=="2"){let g={};g.startX=a,g.startY=o+d,g.endX=a+s,g.endY=o+d,g.fs=m,e.underLine.push(g)}if(t=="3"||t=="4"){let g={};g.startX=a,g.startY=o+d,g.endX=a+s,g.endY=o+d,g.fs=m,e.underLine.push(g)}if(t=="4"){let g={};g.startX=a,g.startY=o+d+2,g.endX=a+s,g.endY=o+d+2,g.fs=m,e.underLine.push(g)}}}var mr=Ie(()=>{ft();il();Kt();Ol();Ft();gn();Xe()});function yn(e,n){if(Ly(),e!=null){h.visibledatarow=[],h.rh_height=0;for(let t=0;t<e;t++){let l=h.defaultrowlen;if(h.config.rowlen!=null&&h.config.rowlen[t]!=null&&(l=h.config.rowlen[t]),h.config.rowhidden!=null&&h.config.rowhidden[t]!=null){h.visibledatarow.push(h.rh_height);continue}l==="auto"&&(l=jf(h.flowdata,t)),h.rh_height+=Math.round((l+1)*h.zoomRatio),h.visibledatarow.push(h.rh_height)}!de.enableAddRow&&!de.enableAddBackTop?h.rh_height+=29:h.rh_height+=80}if(n!=null){h.visibledatacolumn=[],h.ch_width=0;let t=120;for(let l=0;l<n;l++){let a=h.defaultcollen;if(h.config.columnlen!=null&&h.config.columnlen[l]!=null?a=h.config.columnlen[l]:h.flowdata[0]!=null&&h.flowdata[0][l]!=null&&(a>300?a=300:a<h.defaultcollen&&(a=h.defaultcollen),a!=h.defaultcollen&&(h.config.columnlen==null&&(h.config.columnlen={}),h.config.columnlen[l]=a)),h.config.colhidden!=null&&h.config.colhidden[l]!=null){h.visibledatacolumn.push(h.ch_width);continue}a==="auto"&&(a=Uf(h.flowdata,l,e)),h.ch_width+=Math.round((a+1)*h.zoomRatio),h.visibledatacolumn.push(h.ch_width)}h.ch_width+=t}}function Ly(){h.rowHeaderWidth=de.rowHeaderWidth*h.zoomRatio,h.columnHeaderHeight=de.columnHeaderHeight*h.zoomRatio,$("#luckysheet-rows-h").width(h.rowHeaderWidth-1.5),$("#luckysheet-cols-h-c").height(h.columnHeaderHeight-1.5),$("#luckysheet-left-top").css({width:h.rowHeaderWidth-1.5,height:h.columnHeaderHeight-1.5})}var Ii=Ie(()=>{Xe();mr();xl()});var vn=vl((Vs,qs)=>{(function(e,n){typeof Vs=="object"&&typeof qs!="undefined"?qs.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis!="undefined"?globalThis:e||self).dayjs=n()})(Vs,function(){"use strict";var e=1e3,n=6e4,t=36e5,l="millisecond",a="second",o="minute",s="hour",u="day",f="week",d="month",m="quarter",g="year",y="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var N=["th","st","nd","rd"],L=E%100;return"["+E+(N[(L-20)%10]||N[L]||N[0])+"]"}},x=function(E,N,L){var O=String(E);return!O||O.length>=N?E:""+Array(N+1-O.length).join(L)+E},C={s:x,z:function(E){var N=-E.utcOffset(),L=Math.abs(N),O=Math.floor(L/60),V=L%60;return(N<=0?"+":"-")+x(O,2,"0")+":"+x(V,2,"0")},m:function E(N,L){if(N.date()<L.date())return-E(L,N);var O=12*(L.year()-N.year())+(L.month()-N.month()),V=N.clone().add(O,d),q=L-V<0,W=N.clone().add(O+(q?-1:1),d);return+(-(O+(L-V)/(q?V-W:W-V))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:d,y:g,w:f,d:u,D:y,h:s,m:o,s:a,ms:l,Q:m}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},S="en",_={};_[S]=w;var T="$isDayjsObject",A=function(E){return E instanceof z||!(!E||!E[T])},R=function E(N,L,O){var V;if(!N)return S;if(typeof N=="string"){var q=N.toLowerCase();_[q]&&(V=q),L&&(_[q]=L,V=q);var W=N.split("-");if(!V&&W.length>1)return E(W[0])}else{var X=N.name;_[X]=N,V=X}return!O&&V&&(S=V),V||!O&&S},I=function(E,N){if(A(E))return E.clone();var L=typeof N=="object"?N:{};return L.date=E,L.args=arguments,new z(L)},F=C;F.l=R,F.i=A,F.w=function(E,N){return I(E,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var z=function(){function E(L){this.$L=R(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[T]=!0}var N=E.prototype;return N.parse=function(L){this.$d=function(O){var V=O.date,q=O.utc;if(V===null)return new Date(NaN);if(F.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var W=V.match(b);if(W){var X=W[2]-1||0,te=(W[7]||"0").substring(0,3);return q?new Date(Date.UTC(W[1],X,W[3]||1,W[4]||0,W[5]||0,W[6]||0,te)):new Date(W[1],X,W[3]||1,W[4]||0,W[5]||0,W[6]||0,te)}}return new Date(V)}(L),this.init()},N.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},N.$utils=function(){return F},N.isValid=function(){return this.$d.toString()!==v},N.isSame=function(L,O){var V=I(L);return this.startOf(O)<=V&&V<=this.endOf(O)},N.isAfter=function(L,O){return I(L)<this.startOf(O)},N.isBefore=function(L,O){return this.endOf(O)<I(L)},N.$g=function(L,O,V){return F.u(L)?this[O]:this.set(V,L)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(L,O){var V=this,q=!!F.u(O)||O,W=F.p(L),X=function(K,G){var ee=F.w(V.$u?Date.UTC(V.$y,G,K):new Date(V.$y,G,K),V);return q?ee:ee.endOf(u)},te=function(K,G){return F.w(V.toDate()[K].apply(V.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(G)),V)},le=this.$W,oe=this.$M,se=this.$D,ce="set"+(this.$u?"UTC":"");switch(W){case g:return q?X(1,0):X(31,11);case d:return q?X(1,oe):X(0,oe+1);case f:var he=this.$locale().weekStart||0,ue=(le<he?le+7:le)-he;return X(q?se-ue:se+(6-ue),oe);case u:case y:return te(ce+"Hours",0);case s:return te(ce+"Minutes",1);case o:return te(ce+"Seconds",2);case a:return te(ce+"Milliseconds",3);default:return this.clone()}},N.endOf=function(L){return this.startOf(L,!1)},N.$set=function(L,O){var V,q=F.p(L),W="set"+(this.$u?"UTC":""),X=(V={},V[u]=W+"Date",V[y]=W+"Date",V[d]=W+"Month",V[g]=W+"FullYear",V[s]=W+"Hours",V[o]=W+"Minutes",V[a]=W+"Seconds",V[l]=W+"Milliseconds",V)[q],te=q===u?this.$D+(O-this.$W):O;if(q===d||q===g){var le=this.clone().set(y,1);le.$d[X](te),le.init(),this.$d=le.set(y,Math.min(this.$D,le.daysInMonth())).$d}else X&&this.$d[X](te);return this.init(),this},N.set=function(L,O){return this.clone().$set(L,O)},N.get=function(L){return this[F.p(L)]()},N.add=function(L,O){var V,q=this;L=Number(L);var W=F.p(O),X=function(oe){var se=I(q);return F.w(se.date(se.date()+Math.round(oe*L)),q)};if(W===d)return this.set(d,this.$M+L);if(W===g)return this.set(g,this.$y+L);if(W===u)return X(1);if(W===f)return X(7);var te=(V={},V[o]=n,V[s]=t,V[a]=e,V)[W]||1,le=this.$d.getTime()+L*te;return F.w(le,this)},N.subtract=function(L,O){return this.add(-1*L,O)},N.format=function(L){var O=this,V=this.$locale();if(!this.isValid())return V.invalidDate||v;var q=L||"YYYY-MM-DDTHH:mm:ssZ",W=F.z(this),X=this.$H,te=this.$m,le=this.$M,oe=V.weekdays,se=V.months,ce=V.meridiem,he=function(G,ee,pe,ae){return G&&(G[ee]||G(O,q))||pe[ee].slice(0,ae)},ue=function(G){return F.s(X%12||12,G,"0")},K=ce||function(G,ee,pe){var ae=G<12?"AM":"PM";return pe?ae.toLowerCase():ae};return q.replace(k,function(G,ee){return ee||function(pe){switch(pe){case"YY":return String(O.$y).slice(-2);case"YYYY":return F.s(O.$y,4,"0");case"M":return le+1;case"MM":return F.s(le+1,2,"0");case"MMM":return he(V.monthsShort,le,se,3);case"MMMM":return he(se,le);case"D":return O.$D;case"DD":return F.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return he(V.weekdaysMin,O.$W,oe,2);case"ddd":return he(V.weekdaysShort,O.$W,oe,3);case"dddd":return oe[O.$W];case"H":return String(X);case"HH":return F.s(X,2,"0");case"h":return ue(1);case"hh":return ue(2);case"a":return K(X,te,!0);case"A":return K(X,te,!1);case"m":return String(te);case"mm":return F.s(te,2,"0");case"s":return String(O.$s);case"ss":return F.s(O.$s,2,"0");case"SSS":return F.s(O.$ms,3,"0");case"Z":return W}return null}(G)||W.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(L,O,V){var q,W=this,X=F.p(O),te=I(L),le=(te.utcOffset()-this.utcOffset())*n,oe=this-te,se=function(){return F.m(W,te)};switch(X){case g:q=se()/12;break;case d:q=se();break;case m:q=se()/3;break;case f:q=(oe-le)/6048e5;break;case u:q=(oe-le)/864e5;break;case s:q=oe/t;break;case o:q=oe/n;break;case a:q=oe/e;break;default:q=oe}return V?q:F.a(q)},N.daysInMonth=function(){return this.endOf(d).$D},N.$locale=function(){return _[this.$L]},N.locale=function(L,O){if(!L)return this.$L;var V=this.clone(),q=R(L,O,!0);return q&&(V.$L=q),V},N.clone=function(){return F.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},E}(),M=z.prototype;return I.prototype=M,[["$ms",l],["$s",a],["$m",o],["$H",s],["$W",u],["$M",d],["$y",g],["$D",y]].forEach(function(E){M[E[1]]=function(N){return this.$g(N,E[0],E[1])}}),I.extend=function(E,N){return E.$i||(E(N,z,I),E.$i=!0),I},I.locale=R,I.isDayjs=A,I.unix=function(E){return I(1e3*E)},I.en=_[S],I.Ls=_,I.p={},I})});function Lt(e){if(e==null||e.toString().length<5)return!1;return!!n(e);function n(t){var l=/^(\d{4})-(\d{1,2})-(\d{1,2})(\s(\d{1,2}):(\d{1,2})(:(\d{1,2}))?)?$/,a=/^(\d{4})\/(\d{1,2})\/(\d{1,2})(\s(\d{1,2}):(\d{1,2})(:(\d{1,2}))?)?$/;if(!l.test(t)&&!a.test(t))return!1;var o=RegExp.$1,s=RegExp.$2,u=RegExp.$3;if(o<1900||s>12||u>31)return!1;if(s==2){if(new Date(o,1,29).getDate()==29&&u>29)return!1;if(new Date(o,1,29).getDate()!=29&&u>28)return!1}return!0}}function ul(e,n){return(0,js.default)(e).diff((0,js.default)(n))}function On(e){let n={};return Lt(e)&&(n.date=!0),!isNaN(parseFloat(e))&&!In(e)&&(n.num=!0),n}function tr(e){let n="string";return Lt(e)?n="date":!isNaN(parseFloat(e))&&!In(e)&&(n="num"),n}var js,Or=Ie(()=>{Ft();js=Fl(vn())});var sa=vl((Gf,yo)=>{(function(e,n){typeof define=="function"&&define.amd?define(n):typeof yo=="object"&&yo.exports?yo.exports=n():e.numeral=n()})(Gf,function(){var e,n,t="2.0.6",l={},a={},o={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},s={currentLocale:o.currentLocale,zeroFormat:o.zeroFormat,nullFormat:o.nullFormat,defaultFormat:o.defaultFormat,scalePercentBy100:o.scalePercentBy100};function u(f,d){this._input=f,this._value=d}return e=function(f){var d,m,g,y;if(e.isNumeral(f))d=f.value();else if(f===0||typeof f=="undefined")d=0;else if(f===null||n.isNaN(f))d=null;else if(typeof f=="string")if(s.zeroFormat&&f===s.zeroFormat)d=0;else if(s.nullFormat&&f===s.nullFormat||!f.replace(/[^0-9]+/g,"").length)d=null;else{for(m in l)if(y=typeof l[m].regexps.unformat=="function"?l[m].regexps.unformat():l[m].regexps.unformat,y&&f.match(y)){g=l[m].unformat;break}g=g||e._.stringToNumber,d=g(f)}else d=Number(f)||null;return new u(f,d)},e.version=t,e.isNumeral=function(f){return f instanceof u},e._=n={numberToFormat:function(f,d,m){var g=a[e.options.currentLocale],y=!1,v=!1,b=0,k="",w=1e12,x=1e9,C=1e6,S=1e3,_="",T=!1,A,R,I,F,z,M,E,N,L,O;if(f=f||0,R=Math.abs(f),e._.includes(d,"(")?(y=!0,d=d.replace(/[\(|\)]/g,"")):(e._.includes(d,"+")||e._.includes(d,"-"))&&(N=e._.includes(d,"+")?d.indexOf("+"):f<0?d.indexOf("-"):-1,d=d.replace(/[\+|\-]/g,"")),e._.includes(d,"a")&&(A=d.match(/a(k|m|b|t)?/),A=A?A[1]:!1,e._.includes(d," a")&&(k=" "),d=d.replace(new RegExp(k+"a[kmbt]?"),""),R>=w&&!A||A==="t"?(k+=g.abbreviations.trillion,f=f/w):R<w&&R>=x&&!A||A==="b"?(k+=g.abbreviations.billion,f=f/x):R<x&&R>=C&&!A||A==="m"?(k+=g.abbreviations.million,f=f/C):(R<C&&R>=S&&!A||A==="k")&&(k+=g.abbreviations.thousand,f=f/S)),e._.includes(d,"[.]")&&(v=!0,d=d.replace("[.]",".")),M=f.toString().split(".")[0],E=d.split(".")[1],L=d.indexOf(","),b=(d.split(".")[0].split(",")[0].match(/0/g)||[]).length,E?(e._.includes(E,"[")?(E=E.replace("]",""),E=E.split("["),_=e._.toFixed(f,E[0].length+E[1].length,m,E[1].length)):_=e._.toFixed(f,E.length,m),M=_.split(".")[0],e._.includes(_,".")?_=g.delimiters.decimal+_.split(".")[1]:_="",v&&Number(_.slice(1))===0&&(_="")):M=e._.toFixed(f,0,m),k&&!A&&Number(M)>=1e3&&k!==g.abbreviations.trillion)switch(M=String(Number(M)/1e3),k){case g.abbreviations.thousand:k=g.abbreviations.million;break;case g.abbreviations.million:k=g.abbreviations.billion;break;case g.abbreviations.billion:k=g.abbreviations.trillion;break}if(e._.includes(M,"-")&&(M=M.slice(1),T=!0),M.length<b)for(var V=b-M.length;V>0;V--)M="0"+M;return L>-1&&(M=M.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+g.delimiters.thousands)),d.indexOf(".")===0&&(M=""),O=M+_+(k||""),y?O=(y&&T?"(":"")+O+(y&&T?")":""):N>=0?O=N===0?(T?"-":"+")+O:O+(T?"-":"+"):T&&(O="-"+O),O},stringToNumber:function(f){var d=a[s.currentLocale],m=f,g={thousand:3,million:6,billion:9,trillion:12},y,v,b,k;if(s.zeroFormat&&f===s.zeroFormat)v=0;else if(s.nullFormat&&f===s.nullFormat||!f.replace(/[^0-9]+/g,"").length)v=null;else{v=1,d.delimiters.decimal!=="."&&(f=f.replace(/\./g,"").replace(d.delimiters.decimal,"."));for(y in g)if(k=new RegExp("[^a-zA-Z]"+d.abbreviations[y]+"(?:\\)|(\\"+d.currency.symbol+")?(?:\\))?)?$"),m.match(k)){v*=Math.pow(10,g[y]);break}v*=(f.split("-").length+Math.min(f.split("(").length-1,f.split(")").length-1))%2?1:-1,f=f.replace(/[^0-9\.]+/g,""),v*=Number(f)}return v},isNaN:function(f){return typeof f=="number"&&isNaN(f)},includes:function(f,d){return f.indexOf(d)!==-1},insert:function(f,d,m){return f.slice(0,m)+d+f.slice(m)},reduce:function(f,d){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof d!="function")throw new TypeError(d+" is not a function");var m=Object(f),g=m.length>>>0,y=0,v;if(arguments.length===3)v=arguments[2];else{for(;y<g&&!(y in m);)y++;if(y>=g)throw new TypeError("Reduce of empty array with no initial value");v=m[y++]}for(;y<g;y++)y in m&&(v=d(v,m[y],y,m));return v},multiplier:function(f){var d=f.toString().split(".");return d.length<2?1:Math.pow(10,d[1].length)},correctionFactor:function(){var f=Array.prototype.slice.call(arguments);return f.reduce(function(d,m){var g=n.multiplier(m);return d>g?d:g},1)},toFixed:function(f,d,m,g){var y=f.toString().split("."),v=d-(g||0),b,k,w,x;return y.length===2?b=Math.min(Math.max(y[1].length,v),d):b=v,w=Math.pow(10,b),x=(m(f+"e+"+b)/w).toFixed(b),g>d-b&&(k=new RegExp("\\.?0{1,"+(g-(d-b))+"}$"),x=x.replace(k,"")),x}},e.options=s,e.formats=l,e.locales=a,e.locale=function(f){return f&&(s.currentLocale=f.toLowerCase()),s.currentLocale},e.localeData=function(f){if(!f)return a[s.currentLocale];if(f=f.toLowerCase(),!a[f])throw new Error("Unknown locale : "+f);return a[f]},e.reset=function(){for(var f in o)s[f]=o[f]},e.zeroFormat=function(f){s.zeroFormat=typeof f=="string"?f:null},e.nullFormat=function(f){s.nullFormat=typeof f=="string"?f:null},e.defaultFormat=function(f){s.defaultFormat=typeof f=="string"?f:"0.0"},e.register=function(f,d,m){if(d=d.toLowerCase(),this[f+"s"][d])throw new TypeError(d+" "+f+" already registered.");return this[f+"s"][d]=m,m},e.validate=function(f,d){var m,g,y,v,b,k,w,x;if(typeof f!="string"&&(f+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",f)),f=f.trim(),f.match(/^\d+$/))return!0;if(f==="")return!1;try{w=e.localeData(d)}catch(C){w=e.localeData(e.locale())}return y=w.currency.symbol,b=w.abbreviations,m=w.delimiters.decimal,w.delimiters.thousands==="."?g="\\.":g=w.delimiters.thousands,x=f.match(/^[^\d]+/),x!==null&&(f=f.substr(1),x[0]!==y)||(x=f.match(/[^\d]+$/),x!==null&&(f=f.slice(0,-1),x[0]!==b.thousand&&x[0]!==b.million&&x[0]!==b.billion&&x[0]!==b.trillion))?!1:(k=new RegExp(g+"{2}"),f.match(/[^\d.,]/g)?!1:(v=f.split(m),v.length>2?!1:v.length<2?!!v[0].match(/^\d+.*\d$/)&&!v[0].match(k):v[0].length===1?!!v[0].match(/^\d+$/)&&!v[0].match(k)&&!!v[1].match(/^\d+$/):!!v[0].match(/^\d+.*\d$/)&&!v[0].match(k)&&!!v[1].match(/^\d+$/)))},e.fn=u.prototype={clone:function(){return e(this)},format:function(f,d){var m=this._value,g=f||s.defaultFormat,y,v,b;if(d=d||Math.round,m===0&&s.zeroFormat!==null)v=s.zeroFormat;else if(m===null&&s.nullFormat!==null)v=s.nullFormat;else{for(y in l)if(g.match(l[y].regexps.format)){b=l[y].format;break}b=b||e._.numberToFormat,v=b(m,g,d)}return v},value:function(){return this._value},input:function(){return this._input},set:function(f){return this._value=Number(f),this},add:function(f){var d=n.correctionFactor.call(null,this._value,f);function m(g,y,v,b){return g+Math.round(d*y)}return this._value=n.reduce([this._value,f],m,0)/d,this},subtract:function(f){var d=n.correctionFactor.call(null,this._value,f);function m(g,y,v,b){return g-Math.round(d*y)}return this._value=n.reduce([f],m,Math.round(this._value*d))/d,this},multiply:function(f){function d(m,g,y,v){var b=n.correctionFactor(m,g);return Math.round(m*b)*Math.round(g*b)/Math.round(b*b)}return this._value=n.reduce([this._value,f],d,1),this},divide:function(f){function d(m,g,y,v){var b=n.correctionFactor(m,g);return Math.round(m*b)/Math.round(g*b)}return this._value=n.reduce([this._value,f],d),this},difference:function(f){return Math.abs(e(this._value).subtract(f).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(f){var d=f%10;return~~(f%100/10)==1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th"},currency:{symbol:"$"}}),function(){e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(f,d,m){var g=e._.includes(d," BPS")?" ":"",y;return f=f*1e4,d=d.replace(/\s?BPS/,""),y=e._.numberToFormat(f,d,m),e._.includes(y,")")?(y=y.split(""),y.splice(-1,0,g+"BPS"),y=y.join("")):y=y+g+"BPS",y},unformat:function(f){return+(e._.stringToNumber(f)*1e-4).toFixed(15)}})}(),function(){var f={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},d={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},m=f.suffixes.concat(d.suffixes.filter(function(y){return f.suffixes.indexOf(y)<0})),g=m.join("|");g="("+g.replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(g)},format:function(y,v,b){var k,w=e._.includes(v,"ib")?d:f,x=e._.includes(v," b")||e._.includes(v," ib")?" ":"",C,S,_;for(v=v.replace(/\s?i?b/,""),C=0;C<=w.suffixes.length;C++)if(S=Math.pow(w.base,C),_=Math.pow(w.base,C+1),y===null||y===0||y>=S&&y<_){x+=w.suffixes[C],S>0&&(y=y/S);break}return k=e._.numberToFormat(y,v,b),k+x},unformat:function(y){var v=e._.stringToNumber(y),b,k;if(v){for(b=f.suffixes.length-1;b>=0;b--){if(e._.includes(y,f.suffixes[b])){k=Math.pow(f.base,b);break}if(e._.includes(y,d.suffixes[b])){k=Math.pow(d.base,b);break}}v*=k||1}return v}})}(),function(){e.register("format","currency",{regexps:{format:/(\$)/},format:function(f,d,m){var g=e.locales[e.options.currentLocale],y={before:d.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:d.match(/([\+|\-|\)|\s|\$]*)$/)[0]},v,b,k;for(d=d.replace(/\s?\$\s?/,""),v=e._.numberToFormat(f,d,m),f>=0?(y.before=y.before.replace(/[\-\(]/,""),y.after=y.after.replace(/[\-\)]/,"")):f<0&&!e._.includes(y.before,"-")&&!e._.includes(y.before,"(")&&(y.before="-"+y.before),k=0;k<y.before.length;k++)switch(b=y.before[k],b){case"$":v=e._.insert(v,g.currency.symbol,k);break;case" ":v=e._.insert(v," ",k+g.currency.symbol.length-1);break}for(k=y.after.length-1;k>=0;k--)switch(b=y.after[k],b){case"$":v=k===y.after.length-1?v+g.currency.symbol:e._.insert(v,g.currency.symbol,-(y.after.length-(1+k)));break;case" ":v=k===y.after.length-1?v+" ":e._.insert(v," ",-(y.after.length-(1+k)+g.currency.symbol.length-1));break}return v}})}(),function(){e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(f,d,m){var g,y=typeof f=="number"&&!e._.isNaN(f)?f.toExponential():"0e+0",v=y.split("e");return d=d.replace(/e[\+|\-]{1}0/,""),g=e._.numberToFormat(Number(v[0]),d,m),g+"e"+v[1]},unformat:function(f){var d=e._.includes(f,"e+")?f.split("e+"):f.split("e-"),m=Number(d[0]),g=Number(d[1]);g=e._.includes(f,"e-")?g*=-1:g;function y(v,b,k,w){var x=e._.correctionFactor(v,b),C=v*x*(b*x)/(x*x);return C}return e._.reduce([m,Math.pow(10,g)],y,1)}})}(),function(){e.register("format","ordinal",{regexps:{format:/(o)/},format:function(f,d,m){var g=e.locales[e.options.currentLocale],y,v=e._.includes(d," o")?" ":"";return d=d.replace(/\s?o/,""),v+=g.ordinal(f),y=e._.numberToFormat(f,d,m),y+v}})}(),function(){e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(f,d,m){var g=e._.includes(d," %")?" ":"",y;return e.options.scalePercentBy100&&(f=f*100),d=d.replace(/\s?\%/,""),y=e._.numberToFormat(f,d,m),e._.includes(y,")")?(y=y.split(""),y.splice(-1,0,g+"%"),y=y.join("")):y=y+g+"%",y},unformat:function(f){var d=e._.stringToNumber(f);return e.options.scalePercentBy100?d*.01:d}})}(),function(){e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(f,d,m){var g=Math.floor(f/60/60),y=Math.floor((f-g*60*60)/60),v=Math.round(f-g*60*60-y*60);return g+":"+(y<10?"0"+y:y)+":"+(v<10?"0"+v:v)},unformat:function(f){var d=f.split(":"),m=0;return d.length===3?(m=m+Number(d[0])*60*60,m=m+Number(d[1])*60,m=m+Number(d[2])):d.length===2&&(m=m+Number(d[0])*60,m=m+Number(d[1])),Number(m)}})}(),e})});function Us(e,n){var t=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()),l=Date.UTC(1899,11,31,0,0,0);return n?t-=1461*24*60*60*1e3:e>=By&&(t+=24*60*60*1e3),(t-l)/(24*60*60*1e3)}function Vy(e,n){var t=new Date(e);if(Hy)return n>0?t.setTime(t.getTime()+t.getTimezoneOffset()*60*1e3):n<0&&t.setTime(t.getTime()-t.getTimezoneOffset()*60*1e3),t;if(e instanceof Date)return e;if(vo.getFullYear()==1917&&!isNaN(t.getFullYear())){var l=t.getFullYear();return e.indexOf(""+l)>-1||t.setFullYear(t.getFullYear()+100),t}var a=e.match(/\d+/g)||["2017","2","19","0","0","0"],o=new Date(+a[0],+a[1]-1,+a[2],+a[3]||0,+a[4]||0,+a[5]||0);return e.indexOf("Z")>-1&&(o=new Date(o.getTime()-o.getTimezoneOffset()*60*1e3)),o}function qy(e){var n=Number(e);if(typeof e=="number")return e;if(!isNaN(n))return n;var t=1,l=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return t*=100,""});return!isNaN(n=Number(l))||(l=l.replace(/[(](.*)[)]/,function(a,o){return t=-t,o}),!isNaN(n=Number(l)))?n/t:n}function at(e){var n=[],t=null,l={},a=e;if(e==null)return null;if(/^-?[0-9]{1,}[,][0-9]{3}(.[0-9]{1,2})?$/.test(e)){t=e,a=Number(e.split(".")[0].replace(",",""));let x="#,##0";if(e.split(".")[1]){x="#,##0.";for(let C=0;C<e.split(".")[1].length;C++)x+=0}l={fa:x,t:"n"}}else if(e.toString().substr(0,1)==="'")t=e.toString().substr(1),l={fa:"@",t:"s"};else if(e.toString().toUpperCase()==="TRUE")t="TRUE",l={fa:"General",t:"b"},a=!0;else if(e.toString().toUpperCase()==="FALSE")t="FALSE",l={fa:"General",t:"b"},a=!1;else if(H(e))t=e.toString(),l={fa:"General",t:"e"};else if(/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(e))t=e.toString(),l={fa:"@",t:"s"};else if(B(e)&&Math.abs(parseFloat(e))>0&&(Math.abs(parseFloat(e))>=1e11||Math.abs(parseFloat(e))<1e-9)){a=(0,Br.default)(e).value();var o=a.toExponential();if(o.indexOf(".")>-1){var s=o.split(".")[1].split("e")[0].length;s>5&&(s=5),l={fa:"#0."+new Array(s+1).join("0")+"E+00",t:"n"}}else l={fa:"#0.E+00",t:"n"};t=kl.format(l.fa,a)}else if(e.toString().indexOf("%")>-1){var u=e.toString().indexOf("%"),f=e.toString().substr(0,u),d=f.replace(/,/g,"");if(u==e.toString().length-1&&B(d))if(f.indexOf(".")>-1)if(f.indexOf(".")==f.lastIndexOf(".")){var m=f.split(".")[0],g=f.split(".")[1],y=g.length;if(y>9&&(y=9),m.indexOf(",")>-1){for(var v=!0,b=m.split(","),k=1;k<b.length;k++)if(b[k].length<3){v=!1;break}v?(l={fa:"#,##0."+new Array(y+1).join("0")+"%",t:"n"},a=(0,Br.default)(e).value(),t=kl.format(l.fa,a)):(t=e.toString(),l={fa:"@",t:"s"})}else l={fa:"0."+new Array(y+1).join("0")+"%",t:"n"},a=(0,Br.default)(e).value(),t=kl.format(l.fa,a)}else t=e.toString(),l={fa:"@",t:"s"};else if(f.indexOf(",")>-1){for(var v=!0,b=f.split(","),k=1;k<b.length;k++)if(b[k].length<3){v=!1;break}v?(l={fa:"#,##0%",t:"n"},a=(0,Br.default)(e).value(),t=kl.format(l.fa,a)):(t=e.toString(),l={fa:"@",t:"s"})}else l={fa:"0%",t:"n"},a=(0,Br.default)(e).value(),t=kl.format(l.fa,a);else t=e.toString(),l={fa:"@",t:"s"}}else if(e.toString().indexOf(".")>-1)if(e.toString().indexOf(".")==e.toString().lastIndexOf(".")){var w=e.toString().split(".")[0],f=e.toString().split(".")[1],y=f.length;if(y>9&&(y=9),w.indexOf(",")>-1){for(var v=!0,b=w.split(","),k=1;k<b.length;k++)if(!B(b[k])||b[k].length<3){v=!1;break}v?(l={fa:"#,##0."+new Array(y+1).join("0"),t:"n"},a=(0,Br.default)(e).value(),t=kl.format(l.fa,a)):(t=e.toString(),l={fa:"@",t:"s"})}else B(w)&&B(f)?(l={fa:"0."+new Array(y+1).join("0"),t:"n"},a=(0,Br.default)(e).value(),t=kl.format(l.fa,a)):(t=e.toString(),l={fa:"@",t:"s"})}else t=e.toString(),l={fa:"@",t:"s"};else B(e)?(t=e.toString(),l={fa:"General",t:"n"},a=parseFloat(e)):Lt(e)&&(e.toString().indexOf(".")>-1||e.toString().indexOf(":")>-1||e.toString().length<16)?(a=Us(Vy(e.toString().replace(/-/g,"/"))),a.toString().indexOf(".")>-1?e.toString().length>18?l.fa="yyyy-MM-dd hh:mm:ss":e.toString().length>11?l.fa="yyyy-MM-dd hh:mm":l.fa="yyyy-MM-dd":l.fa="yyyy-MM-dd",l.t="d",t=kl.format(l.fa,a)):(t=e,l.fa="General",l.t="g");return[t,l,a]}function mt(e,n){return kl.format(e,n)}function Wf(e,n){return kl.is_date(e,n)}function bn(e,n,t){var l=ze(e,n,t,"m");return l==null?l=ze(e,n,t,"v"):isNaN(qy(l))?t[e][n].ct!=null&&t[e][n].ct.t=="d"||t[e][n].ct!=null&&t[e][n].ct.t=="b"||(l=ze(e,n,t,"v")):typeof l=="string"&&l.indexOf("%")>-1||(l=ze(e,n,t,"v")),l}var Br,kl,zy,O1,B1,Oy,H1,By,vo,Hy,Al=Ie(()=>{Ft();Or();Kt();Br=Fl(sa()),kl={},zy=function(n){n.version="0.11.2";function t(K){for(var G="",ee=K.length-1;ee>=0;)G+=K.charAt(ee--);return G}function l(K,G){for(var ee="";ee.length<G;)ee+=K;return ee}function a(K,G){var ee=""+K;return ee.length>=G?ee:l("0",G-ee.length)+ee}function o(K,G){var ee=""+K;return ee.length>=G?ee:l(" ",G-ee.length)+ee}function s(K,G){var ee=""+K;return ee.length>=G?ee:ee+l(" ",G-ee.length)}function u(K,G){var ee=""+Math.round(K);return ee.length>=G?ee:l("0",G-ee.length)+ee}function f(K,G){var ee=""+K;return ee.length>=G?ee:l("0",G-ee.length)+ee}var d=Math.pow(2,32);function m(K,G){if(K>d||K<-d)return u(K,G);var ee=Math.round(K);return f(ee,G)}function g(K,G){return G=G||0,K.length>=7+G&&(K.charCodeAt(G)|32)==103&&(K.charCodeAt(G+1)|32)==101&&(K.charCodeAt(G+2)|32)==110&&(K.charCodeAt(G+3)|32)==101&&(K.charCodeAt(G+4)|32)==114&&(K.charCodeAt(G+5)|32)==97&&(K.charCodeAt(G+6)|32)==108}var y=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],v=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function b(K){K[0]="General",K[1]="0",K[2]="0.00",K[3]="#,##0",K[4]="#,##0.00",K[9]="0%",K[10]="0.00%",K[11]="0.00E+00",K[12]="# ?/?",K[13]="# ??/??",K[14]="m/d/yy",K[15]="d-mmm-yy",K[16]="d-mmm",K[17]="mmm-yy",K[18]="h:mm AM/PM",K[19]="h:mm:ss AM/PM",K[20]="h:mm",K[21]="h:mm:ss",K[22]="m/d/yy h:mm",K[37]="#,##0 ;(#,##0)",K[38]="#,##0 ;[Red](#,##0)",K[39]="#,##0.00;(#,##0.00)",K[40]="#,##0.00;[Red](#,##0.00)",K[45]="mm:ss",K[46]="[h]:mm:ss",K[47]="mmss.0",K[48]="##0.0E+0",K[49]="@",K[56]='"\u4E0A\u5348/\u4E0B\u5348 "hh"\u6642"mm"\u5206"ss"\u79D2 "',K[65535]="General"}var k={};b(k);var w=[],x=0;for(x=5;x<=8;++x)w[x]=32+x;for(x=23;x<=26;++x)w[x]=0;for(x=27;x<=31;++x)w[x]=14;for(x=50;x<=58;++x)w[x]=14;for(x=59;x<=62;++x)w[x]=x-58;for(x=67;x<=68;++x)w[x]=x-58;for(x=72;x<=75;++x)w[x]=x-58;for(x=67;x<=68;++x)w[x]=x-57;for(x=76;x<=78;++x)w[x]=x-56;for(x=79;x<=81;++x)w[x]=x-34;var C=[];C[5]=C[63]='"$"#,##0_);\\("$"#,##0\\)',C[6]=C[64]='"$"#,##0_);[Red]\\("$"#,##0\\)',C[7]=C[65]='"$"#,##0.00_);\\("$"#,##0.00\\)',C[8]=C[66]='"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',C[41]='_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',C[42]='_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',C[43]='_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',C[44]='_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)';function S(K,G,ee){for(var pe=K<0?-1:1,ae=K*pe,Te=0,ie=1,Ee=0,je=1,Ce=0,Le=0,Ge=Math.floor(ae);Ce<G&&(Ge=Math.floor(ae),Ee=Ge*ie+Te,Le=Ge*Ce+je,!(ae-Ge<5e-8));)ae=1/(ae-Ge),Te=ie,ie=Ee,je=Ce,Ce=Le;if(Le>G&&(Ce>G?(Le=je,Ee=Te):(Le=Ce,Ee=ie)),!ee)return[0,pe*Ee,Le];var Ne=Math.floor(pe*Ee/Le);return[Ne,pe*Ee-Ne*Le,Le]}function _(K,G,ee){if(K>2958465||K<0)return null;var pe=K|0,ae=Math.floor(86400*(K-pe)),Te=0,ie=[],Ee={D:pe,T:ae,u:86400*(K-pe)-ae,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(Ee.u)<1e-6&&(Ee.u=0),G&&G.date1904&&(pe+=1462),Ee.u>.9999&&(Ee.u=0,++ae==86400&&(Ee.T=ae=0,++pe,++Ee.D)),pe===60)ie=ee?[1317,10,29]:[1900,2,29],Te=3;else if(pe===0)ie=ee?[1317,8,29]:[1900,1,0],Te=6;else{pe>60&&--pe;var je=new Date(1900,0,1);je.setDate(je.getDate()+pe-1),ie=[je.getFullYear(),je.getMonth()+1,je.getDate()],Te=je.getDay(),pe<60&&(Te=(Te+6)%7),ee&&(Te=E(je,ie))}return Ee.y=ie[0],Ee.m=ie[1],Ee.d=ie[2],Ee.S=ae%60,ae=Math.floor(ae/60),Ee.M=ae%60,ae=Math.floor(ae/60),Ee.H=ae,Ee.q=Te,Ee}n.parse_date_code=_;var T=new Date(1899,11,31,0,0,0),A=T.getTime(),R=new Date(1900,2,1,0,0,0);function I(K,G){var ee=K.getTime();return G?ee-=1461*24*60*60*1e3:K>=R&&(ee+=24*60*60*1e3),(ee-(A+(K.getTimezoneOffset()-T.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function F(K){return K.toString(10)}n._general_int=F;var z=function(){var G=/(?:\.0*|(\.\d*[1-9])0+)$/;function ee(Ce){return Ce.indexOf(".")==-1?Ce:Ce.replace(G,"$1")}var pe=/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,ae=/(E[+-])(\d)$/;function Te(Ce){return Ce.indexOf("E")==-1?Ce:Ce.replace(pe,"$1E").replace(ae,"$10$2")}function ie(Ce){var Le=Ce<0?12:11,Ge=ee(Ce.toFixed(12));return Ge.length<=Le||(Ge=Ce.toPrecision(10),Ge.length<=Le)?Ge:Ce.toExponential(5)}function Ee(Ce){var Le=ee(Ce.toFixed(11));return Le.length>(Ce<0?12:11)||Le==="0"||Le==="-0"?Ce.toPrecision(6):Le}function je(Ce){var Le=Math.floor(Math.log(Math.abs(Ce))*Math.LOG10E),Ge;return Le>=-4&&Le<=-1?Ge=Ce.toPrecision(10+Le):Math.abs(Le)<=9?Ge=ie(Ce):Le===10?Ge=Ce.toFixed(10).substr(0,12):Ge=Ee(Ce),ee(Te(Ge.toUpperCase()))}return je}();n._general_num=z;function M(K,G){switch(typeof K){case"string":return K;case"boolean":return K?"TRUE":"FALSE";case"number":return(K|0)===K?K.toString(10):z(K);case"undefined":return"";case"object":if(K==null)return"";if(K instanceof Date)return he(14,I(K,G&&G.date1904),G)}throw new Error("unsupported value in General format: "+K)}n._general=M;function E(K,G){G[0]-=581;var ee=K.getDay();return K<60&&(ee=(ee+6)%7),ee}var N="\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59".split("");function L(K,G,ee,pe){var ae="",Te=0,ie=0,Ee=ee.y,je,Ce=0;switch(K){case 98:Ee=ee.y+543;case 121:switch(G.length){case 1:case 2:je=Ee%100,Ce=2;break;default:je=Ee%1e4,Ce=4;break}break;case 109:switch(G.length){case 1:case 2:je=ee.m,Ce=G.length;break;case 3:return v[ee.m-1][1];case 5:return v[ee.m-1][0];default:return v[ee.m-1][2]}break;case 100:switch(G.length){case 1:case 2:je=ee.d,Ce=G.length;break;case 3:return y[ee.q][0];default:return y[ee.q][1]}break;case 104:switch(G.length){case 1:case 2:je=1+(ee.H+11)%12,Ce=G.length;break;default:throw"bad hour format: "+G}break;case 72:switch(G.length){case 1:case 2:je=ee.H,Ce=G.length;break;default:throw"bad hour format: "+G}break;case 77:switch(G.length){case 1:case 2:je=ee.M,Ce=G.length;break;default:throw"bad minute format: "+G}break;case 115:if(G!="s"&&G!="ss"&&G!=".0"&&G!=".00"&&G!=".000")throw"bad second format: "+G;return ee.u===0&&(G=="s"||G=="ss")?a(ee.S,G.length):(pe>=2?ie=pe===3?1e3:100:ie=pe===1?10:1,Te=Math.round(ie*(ee.S+ee.u)),Te>=60*ie&&(Te=0),G==="s"?Te===0?"0":""+Te/ie:(ae=a(Te,2+pe),G==="ss"?ae.substr(0,2):"."+ae.substr(2,G.length-1)));case 90:switch(G){case"[h]":case"[hh]":je=ee.D*24+ee.H;break;case"[m]":case"[mm]":je=(ee.D*24+ee.H)*60+ee.M;break;case"[s]":case"[ss]":je=((ee.D*24+ee.H)*60+ee.M)*60+Math.round(ee.S+ee.u);break;default:throw"bad abstime format: "+G}Ce=G.length===3?1:2;break;case 101:je=Ee,Ce=1;break}var Le=Ce>0?a(je,Ce):"";return Le}function O(K){var G=3;if(K.length<=G)return K;for(var ee=K.length%G,pe=K.substr(0,ee);ee!=K.length;ee+=G)pe+=(pe.length>0?",":"")+K.substr(ee,G);return pe}var V=function(){var G=/%/g;function ee(Fe,ye,be){var ht=ye.replace(G,""),De=ye.length-ht.length;return V(Fe,ht,be*Math.pow(10,2*De))+l("%",De)}function pe(Fe,ye,be){for(var ht=ye.length-1;ye.charCodeAt(ht-1)===44;)--ht;return V(Fe,ye.substr(0,ht),be/Math.pow(10,3*(ye.length-ht)))}function ae(Fe,ye){var be,ht=Fe.indexOf("E")-Fe.indexOf(".")-1;if(Fe.match(/^#+0.0E\+0$/)){if(ye==0)return"0.0E+0";if(ye<0)return"-"+ae(Fe,-ye);var De=Fe.indexOf(".");De===-1&&(De=Fe.indexOf("E"));var Pe=Math.floor(Math.log(ye)*Math.LOG10E)%De;if(Pe<0&&(Pe+=De),be=(ye/Math.pow(10,Pe)).toPrecision(ht+1+(De+Pe)%De),be.indexOf("e")===-1){var Dt=Math.floor(Math.log(ye)*Math.LOG10E);for(be.indexOf(".")===-1?be=be.charAt(0)+"."+be.substr(1)+"E+"+(Dt-be.length+Pe):be+="E+"+(Dt-Pe);be.substr(0,2)==="0.";)be=be.charAt(0)+be.substr(2,De)+"."+be.substr(2+De),be=be.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");be=be.replace(/\+-/,"-")}be=be.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(gt,ol,sl,Vt){return ol+sl+Vt.substr(0,(De+Pe)%De)+"."+Vt.substr(Pe)+"E"})}else be=ye.toExponential(ht);return Fe.match(/E\+00$/)&&be.match(/e[+-]\d$/)&&(be=be.substr(0,be.length-1)+"0"+be.charAt(be.length-1)),Fe.match(/E\-/)&&be.match(/e\+/)&&(be=be.replace(/e\+/,"e")),be.replace("e","E")}var Te=/# (\?+)( ?)\/( ?)(\d+)/;function ie(Fe,ye,be){var ht=parseInt(Fe[4],10),De=Math.round(ye*ht),Pe=Math.floor(De/ht),Dt=De-Pe*ht,gt=ht;return be+(Pe===0?"":""+Pe)+" "+(Dt===0?l(" ",Fe[1].length+1+Fe[4].length):o(Dt,Fe[1].length)+Fe[2]+"/"+Fe[3]+a(gt,Fe[4].length))}function Ee(Fe,ye,be){return be+(ye===0?"":""+ye)+l(" ",Fe[1].length+2+Fe[4].length)}var je=/^#*0*\.([0#]+)/,Ce=/\).*[0#]/,Le=/\(###\) ###\\?-####/;function Ge(Fe){for(var ye="",be,ht=0;ht!=Fe.length;++ht)switch(be=Fe.charCodeAt(ht)){case 35:break;case 63:ye+=" ";break;case 48:ye+="0";break;default:ye+=String.fromCharCode(be)}return ye}function Ne(Fe,ye){var be=Math.pow(10,ye);return""+Math.round(Fe*be)/be}function et(Fe,ye){var be=Fe-Math.floor(Fe),ht=Math.pow(10,ye);return ye<(""+Math.round(be*ht)).length?0:Math.round(be*ht)}function vt(Fe,ye){return ye<(""+Math.round((Fe-Math.floor(Fe))*Math.pow(10,ye))).length?1:0}function It(Fe){return Fe<2147483647&&Fe>-2147483648?""+(Fe>=0?Fe|0:Fe-1|0):""+Math.floor(Fe)}function ot(Fe,ye,be){if(Fe.charCodeAt(0)===40&&!ye.match(Ce)){var ht=ye.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return be>=0?ot("n",ht,be):"("+ot("n",ht,-be)+")"}if(ye.charCodeAt(ye.length-1)===44)return pe(Fe,ye,be);if(ye.indexOf("%")!==-1)return ee(Fe,ye,be);if(ye.indexOf("E")!==-1)return ae(ye,be);if(ye.charCodeAt(0)===36)return"$"+ot(Fe,ye.substr(ye.charAt(1)==" "?2:1),be);var De,Pe,Dt,gt,ol=Math.abs(be),sl=be<0?"-":"";if(ye.match(/^00+$/))return sl+m(ol,ye.length);if(ye.match(/^[#?]+$/))return De=m(be,0),De==="0"&&(De=""),De.length>ye.length?De:Ge(ye.substr(0,ye.length-De.length))+De;if(Pe=ye.match(Te))return ie(Pe,ol,sl);if(ye.match(/^#+0+$/))return sl+m(ol,ye.length-ye.indexOf("0"));if(Pe=ye.match(je))return De=Ne(be,Pe[1].length).replace(/^([^\.]+)$/,"$1."+Ge(Pe[1])).replace(/\.$/,"."+Ge(Pe[1])).replace(/\.(\d*)$/,function(Wl,Kn){return"."+Kn+l("0",Ge(Pe[1]).length-Kn.length)}),ye.indexOf("0.")!==-1?De:De.replace(/^0\./,".");if(ye=ye.replace(/^#+([0.])/,"$1"),Pe=ye.match(/^(0*)\.(#*)$/))return sl+Ne(ol,Pe[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,Pe[1].length?"0.":".");if(Pe=ye.match(/^#{1,3},##0(\.?)$/))return sl+O(m(ol,0));if(Pe=ye.match(/^#,##0\.([#0]*0)$/))return be<0?"-"+ot(Fe,ye,-be):O(""+(Math.floor(be)+vt(be,Pe[1].length)))+"."+a(et(be,Pe[1].length),Pe[1].length);if(Pe=ye.match(/^#,#*,#0/))return ot(Fe,ye.replace(/^#,#*,/,""),be);if(Pe=ye.match(/^([0#]+)(\\?-([0#]+))+$/))return De=t(ot(Fe,ye.replace(/[\\-]/g,""),be)),Dt=0,t(t(ye.replace(/\\/g,"")).replace(/[0#]/g,function(Wl){return Dt<De.length?De.charAt(Dt++):Wl==="0"?"0":""}));if(ye.match(Le))return De=ot(Fe,"##########",be),"("+De.substr(0,3)+") "+De.substr(3,3)+"-"+De.substr(6);var Vt="";if(Pe=ye.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return Dt=Math.min(Pe[4].length,7),gt=S(ol,Math.pow(10,Dt)-1,!1),De=""+sl,Vt=V("n",Pe[1],gt[1]),Vt.charAt(Vt.length-1)==" "&&(Vt=Vt.substr(0,Vt.length-1)+"0"),De+=Vt+Pe[2]+"/"+Pe[3],Vt=s(gt[2],Dt),Vt.length<Pe[4].length&&(Vt=Ge(Pe[4].substr(Pe[4].length-Vt.length))+Vt),De+=Vt,De;if(Pe=ye.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return Dt=Math.min(Math.max(Pe[1].length,Pe[4].length),7),gt=S(ol,Math.pow(10,Dt)-1,!0),sl+(gt[0]||(gt[1]?"":"0"))+" "+(gt[1]?o(gt[1],Dt)+Pe[2]+"/"+Pe[3]+s(gt[2],Dt):l(" ",2*Dt+1+Pe[2].length+Pe[3].length));if(Pe=ye.match(/^[#0?]+$/))return De=m(be,0),ye.length<=De.length?De:Ge(ye.substr(0,ye.length-De.length))+De;if(Pe=ye.match(/^([#0?]+)\.([#0]+)$/)){De=""+be.toFixed(Math.min(Pe[2].length,10)).replace(/([^0])0+$/,"$1"),Dt=De.indexOf(".");var Kr=ye.indexOf(".")-Dt,Xn=ye.length-De.length-Kr;return Ge(ye.substr(0,Kr)+De+ye.substr(ye.length-Xn))}if(Pe=ye.match(/^00,000\.([#0]*0)$/))return Dt=et(be,Pe[1].length),be<0?"-"+ot(Fe,ye,-be):O(It(be)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(Wl){return"00,"+(Wl.length<3?a(0,3-Wl.length):"")+Wl})+"."+a(Dt,Pe[1].length);switch(ye){case"###,##0.00":return ot(Fe,"#,##0.00",be);case"###,###":case"##,###":case"#,###":var Gl=O(m(ol,0));return Gl!=="0"?sl+Gl:"";case"###,###.00":return ot(Fe,"###,##0.00",be).replace(/^0\./,".");case"#,###.00":return ot(Fe,"#,##0.00",be).replace(/^0\./,".");default:}throw new Error("unsupported format |"+ye+"|")}function kt(Fe,ye,be){for(var ht=ye.length-1;ye.charCodeAt(ht-1)===44;)--ht;return V(Fe,ye.substr(0,ht),be/Math.pow(10,3*(ye.length-ht)))}function qe(Fe,ye,be){var ht=ye.replace(G,""),De=ye.length-ht.length;return V(Fe,ht,be*Math.pow(10,2*De))+l("%",De)}function Se(Fe,ye){var be,ht=Fe.indexOf("E")-Fe.indexOf(".")-1;if(Fe.match(/^#+0.0E\+0$/)){if(ye==0)return"0.0E+0";if(ye<0)return"-"+Se(Fe,-ye);var De=Fe.indexOf(".");De===-1&&(De=Fe.indexOf("E"));var Pe=Math.floor(Math.log(ye)*Math.LOG10E)%De;if(Pe<0&&(Pe+=De),be=(ye/Math.pow(10,Pe)).toPrecision(ht+1+(De+Pe)%De),!be.match(/[Ee]/)){var Dt=Math.floor(Math.log(ye)*Math.LOG10E);be.indexOf(".")===-1?be=be.charAt(0)+"."+be.substr(1)+"E+"+(Dt-be.length+Pe):be+="E+"+(Dt-Pe),be=be.replace(/\+-/,"-")}be=be.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(gt,ol,sl,Vt){return ol+sl+Vt.substr(0,(De+Pe)%De)+"."+Vt.substr(Pe)+"E"})}else be=ye.toExponential(ht);return Fe.match(/E\+00$/)&&be.match(/e[+-]\d$/)&&(be=be.substr(0,be.length-1)+"0"+be.charAt(be.length-1)),Fe.match(/E\-/)&&be.match(/e\+/)&&(be=be.replace(/e\+/,"e")),be.replace("e","E")}function Ke(Fe,ye,be){if(Fe.charCodeAt(0)===40&&!ye.match(Ce)){var ht=ye.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return be>=0?Ke("n",ht,be):"("+Ke("n",ht,-be)+")"}if(ye.charCodeAt(ye.length-1)===44)return kt(Fe,ye,be);if(ye.indexOf("%")!==-1)return qe(Fe,ye,be);if(ye.indexOf("E")!==-1)return Se(ye,be);if(ye.charCodeAt(0)===36)return"$"+Ke(Fe,ye.substr(ye.charAt(1)==" "?2:1),be);var De,Pe,Dt,gt,ol=Math.abs(be),sl=be<0?"-":"";if(ye.match(/^00+$/))return sl+a(ol,ye.length);if(ye.match(/^[#?]+$/))return De=""+be,be===0&&(De=""),De.length>ye.length?De:Ge(ye.substr(0,ye.length-De.length))+De;if(Pe=ye.match(Te))return Ee(Pe,ol,sl);if(ye.match(/^#+0+$/))return sl+a(ol,ye.length-ye.indexOf("0"));if(Pe=ye.match(je))return De=(""+be).replace(/^([^\.]+)$/,"$1."+Ge(Pe[1])).replace(/\.$/,"."+Ge(Pe[1])),De=De.replace(/\.(\d*)$/,function(Wl,Kn){return"."+Kn+l("0",Ge(Pe[1]).length-Kn.length)}),ye.indexOf("0.")!==-1?De:De.replace(/^0\./,".");if(ye=ye.replace(/^#+([0.])/,"$1"),Pe=ye.match(/^(0*)\.(#*)$/))return sl+(""+ol).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,Pe[1].length?"0.":".");if(Pe=ye.match(/^#{1,3},##0(\.?)$/))return sl+O(""+ol);if(Pe=ye.match(/^#,##0\.([#0]*0)$/))return be<0?"-"+Ke(Fe,ye,-be):O(""+be)+"."+l("0",Pe[1].length);if(Pe=ye.match(/^#,#*,#0/))return Ke(Fe,ye.replace(/^#,#*,/,""),be);if(Pe=ye.match(/^([0#]+)(\\?-([0#]+))+$/))return De=t(Ke(Fe,ye.replace(/[\\-]/g,""),be)),Dt=0,t(t(ye.replace(/\\/g,"")).replace(/[0#]/g,function(Wl){return Dt<De.length?De.charAt(Dt++):Wl==="0"?"0":""}));if(ye.match(Le))return De=Ke(Fe,"##########",be),"("+De.substr(0,3)+") "+De.substr(3,3)+"-"+De.substr(6);var Vt="";if(Pe=ye.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return Dt=Math.min(Pe[4].length,7),gt=S(ol,Math.pow(10,Dt)-1,!1),De=""+sl,Vt=V("n",Pe[1],gt[1]),Vt.charAt(Vt.length-1)==" "&&(Vt=Vt.substr(0,Vt.length-1)+"0"),De+=Vt+Pe[2]+"/"+Pe[3],Vt=s(gt[2],Dt),Vt.length<Pe[4].length&&(Vt=Ge(Pe[4].substr(Pe[4].length-Vt.length))+Vt),De+=Vt,De;if(Pe=ye.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return Dt=Math.min(Math.max(Pe[1].length,Pe[4].length),7),gt=S(ol,Math.pow(10,Dt)-1,!0),sl+(gt[0]||(gt[1]?"":"0"))+" "+(gt[1]?o(gt[1],Dt)+Pe[2]+"/"+Pe[3]+s(gt[2],Dt):l(" ",2*Dt+1+Pe[2].length+Pe[3].length));if(Pe=ye.match(/^[#0?]+$/))return De=""+be,ye.length<=De.length?De:Ge(ye.substr(0,ye.length-De.length))+De;if(Pe=ye.match(/^([#0]+)\.([#0]+)$/)){De=""+be.toFixed(Math.min(Pe[2].length,10)).replace(/([^0])0+$/,"$1"),Dt=De.indexOf(".");var Kr=ye.indexOf(".")-Dt,Xn=ye.length-De.length-Kr;return Ge(ye.substr(0,Kr)+De+ye.substr(ye.length-Xn))}if(Pe=ye.match(/^00,000\.([#0]*0)$/))return be<0?"-"+Ke(Fe,ye,-be):O(""+be).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(Wl){return"00,"+(Wl.length<3?a(0,3-Wl.length):"")+Wl})+"."+a(0,Pe[1].length);switch(ye){case"###,###":case"##,###":case"#,###":var Gl=O(""+ol);return Gl!=="0"?sl+Gl:"";default:if(ye.match(/\.[0#?]*$/))return Ke(Fe,ye.slice(0,ye.lastIndexOf(".")),be)+Ge(ye.slice(ye.lastIndexOf(".")))}throw new Error("unsupported format |"+ye+"|")}return function(ye,be,ht){return(ht|0)===ht?Ke(ye,be,ht):ot(ye,be,ht)}}();function q(K){for(var G=[],ee=!1,pe=0,ae=0;pe<K.length;++pe)switch(K.charCodeAt(pe)){case 34:ee=!ee;break;case 95:case 42:case 92:++pe;break;case 59:G[G.length]=K.substr(ae,pe-ae),ae=pe+1}if(G[G.length]=K.substr(ae),ee===!0)throw new Error("Format |"+K+"| unterminated string ");return G}n._split=q;var W=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function X(K){for(var G=0,ee="",pe="";G<K.length;)switch(ee=K.charAt(G)){case"G":g(K,G)&&(G+=6),G++;break;case'"':for(;K.charCodeAt(++G)!==34&&G<K.length;);++G;break;case"\\":G+=2;break;case"_":G+=2;break;case"@":++G;break;case"B":case"b":if(K.charAt(G+1)==="1"||K.charAt(G+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"\u4E0A":if(K.substr(G,3).toUpperCase()==="A/P"||K.substr(G,5).toUpperCase()==="AM/PM"||K.substr(G,5).toUpperCase()==="\u4E0A\u5348/\u4E0B\u5348")return!0;++G;break;case"[":for(pe=ee;K.charAt(G++)!=="]"&&G<K.length;)pe+=K.charAt(G);if(pe.match(W))return!0;break;case".":case"0":case"#":for(;G<K.length&&("0#?.,E+-%".indexOf(ee=K.charAt(++G))>-1||ee=="\\"&&K.charAt(G+1)=="-"&&"0#".indexOf(K.charAt(G+2))>-1););break;case"?":for(;K.charAt(++G)===ee;);break;case"*":++G,(K.charAt(G)==" "||K.charAt(G)=="*")&&++G;break;case"(":case")":++G;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;G<K.length&&"0123456789".indexOf(K.charAt(++G))>-1;);break;case" ":++G;break;default:++G;break}return!1}n.is_date=X;function te(K,G,ee,pe){for(var ae=[],Te="",ie=0,Ee="",je="t",Ce,Le,Ge,Ne="H";ie<K.length;)switch(Ee=K.charAt(ie)){case"G":if(!g(K,ie))throw new Error("unrecognized character "+Ee+" in "+K);ae[ae.length]={t:"G",v:"General"},ie+=7;break;case'"':for(Te="";(Ge=K.charCodeAt(++ie))!==34&&ie<K.length;)Te+=String.fromCharCode(Ge);ae[ae.length]={t:"t",v:Te},++ie;break;case"\\":var et=K.charAt(++ie),vt=et==="("||et===")"?et:"t";ae[ae.length]={t:vt,v:et},++ie;break;case"_":ae[ae.length]={t:"t",v:" "},ie+=2;break;case"@":ae[ae.length]={t:"T",v:G},++ie;break;case"B":case"b":if(K.charAt(ie+1)==="1"||K.charAt(ie+1)==="2"){if(Ce==null&&(Ce=_(G,ee,K.charAt(ie+1)==="2"),Ce==null))return"";ae[ae.length]={t:"X",v:K.substr(ie,2)},je=Ee,ie+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":Ee=Ee.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(G<0)return"";if(Ce==null&&(Ce=_(G,ee),Ce==null))return"#####";for(Te=Ee;++ie<K.length&&K.charAt(ie).toLowerCase()===Ee;)Te+=Ee;Ee==="m"&&je.toLowerCase()==="h"&&(Ee="M"),Ee==="h"&&(Ee=Ne),ae[ae.length]={t:Ee,v:Te},je=Ee;break;case"A":case"a":case"\u4E0A":var It={t:Ee,v:Ee};if(Ce==null&&(Ce=_(G,ee)),K.substr(ie,3).toUpperCase()==="A/P"?(Ce!=null&&(It.v=Ce.H>=12?"P":"A"),It.t="T",Ne="h",ie+=3):K.substr(ie,5).toUpperCase()==="AM/PM"?(Ce!=null&&(It.v=Ce.H>=12?"PM":"AM"),It.t="T",ie+=5,Ne="h"):K.substr(ie,5).toUpperCase()==="\u4E0A\u5348/\u4E0B\u5348"?(Ce!=null&&(It.v=Ce.H>=12?"\u4E0B\u5348":"\u4E0A\u5348"),It.t="T",ie+=5,Ne="h"):(It.t="t",++ie),Ce==null&&It.t==="T")return"";ae[ae.length]=It,je=Ee;break;case"[":for(Te=Ee;K.charAt(ie++)!=="]"&&ie<K.length;)Te+=K.charAt(ie);if(Te.slice(-1)!=="]")throw'unterminated "[" block: |'+Te+"|";if(Te.match(W)){if(Ce==null&&(Ce=_(G,ee),Ce==null))return"";ae[ae.length]={t:"Z",v:Te.toLowerCase()},je=Te.charAt(1)}else Te.indexOf("$")>-1&&(Te=(Te.match(/\$([^-\[\]]*)/)||[])[1]||"$",X(K)||(ae[ae.length]={t:"t",v:Te}));break;case".":if(Ce!=null){for(Te=Ee;++ie<K.length&&(Ee=K.charAt(ie))==="0";)Te+=Ee;ae[ae.length]={t:"s",v:Te};break}case"0":case"#":for(Te=Ee;++ie<K.length&&"0#?.,E+-%".indexOf(Ee=K.charAt(ie))>-1;)Te+=Ee;ae[ae.length]={t:"n",v:Te};break;case"?":for(Te=Ee;K.charAt(++ie)===Ee;)Te+=Ee;ae[ae.length]={t:Ee,v:Te},je=Ee;break;case"*":++ie,(K.charAt(ie)==" "||K.charAt(ie)=="*")&&++ie;break;case"(":case")":ae[ae.length]={t:pe===1?"t":Ee,v:Ee},++ie;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(Te=Ee;ie<K.length&&"0123456789".indexOf(K.charAt(++ie))>-1;)Te+=K.charAt(ie);ae[ae.length]={t:"D",v:Te};break;case" ":ae[ae.length]={t:Ee,v:Ee},++ie;break;case"$":ae[ae.length]={t:"t",v:"$"},++ie;break;default:if("\xA4\u0E3FBsBr\u20B5\u20A1\u20AB\u0192FtRs.\u20ADkr\xA3\u20A4Lm\u20A5\u20A6\u20B1PQRSkRp\u09F2\u09F3R$S/.\u3012\u20AE\u20A9\xA5NT\uFFE5z\u0142\u20B4\u20AA\u17DB\u0440\u0443\u0431\u20AC\uFF04,$-+/():!^&'~{}<>=\u20ACacfijklopqrtuvwxzP$\uFFE5LekdinAf$dhAflRial?\uFFE1BirrKzMOPPGKRsGsB/R$\u0440\u0440levkrKMzBsPNuFBuKPkrRD$NfkCFA?CVEGMDFrCDHTGNAfLFdjKGSFGGHSRielKCFknKshLSLL\uFFE1LtRFRONArRfMWKRMMURsMROS/KMDLMTnRC$kr\u20ACGELCHFSLLSCRDbSZLSDGSOSSomFCFPTShT$VUVQUGX\u0433\u0440\u043DsomWSTNT$FtDramRpZMWFCFA".indexOf(Ee)===-1)throw new Error("unrecognized character "+Ee+" in "+K);ae[ae.length]={t:"t",v:Ee},++ie;break}var ot=0,kt=0,qe;for(ie=ae.length-1,je="t";ie>=0;--ie)switch(ae[ie].t){case"h":case"H":ae[ie].t=Ne,je="h",ot<1&&(ot=1);break;case"s":(qe=ae[ie].v.match(/\.0+$/))&&(kt=Math.max(kt,qe[0].length-1)),ot<3&&(ot=3);case"d":case"y":case"M":case"e":je=ae[ie].t;break;case"m":je==="s"&&(ae[ie].t="M",ot<2&&(ot=2));break;case"X":break;case"Z":ot<1&&ae[ie].v.match(/[Hh]/)&&(ot=1),ot<2&&ae[ie].v.match(/[Mm]/)&&(ot=2),ot<3&&ae[ie].v.match(/[Ss]/)&&(ot=3)}switch(ot){case 0:break;case 1:Ce.u>=.5&&(Ce.u=0,++Ce.S),Ce.S>=60&&(Ce.S=0,++Ce.M),Ce.M>=60&&(Ce.M=0,++Ce.H);break;case 2:Ce.u>=.5&&(Ce.u=0,++Ce.S),Ce.S>=60&&(Ce.S=0,++Ce.M);break}var Se="",Ke;for(ie=0;ie<ae.length;++ie)switch(ae[ie].t){case"t":case"T":case" ":case"D":break;case"X":ae[ie].v="",ae[ie].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":ae[ie].v=L(ae[ie].t.charCodeAt(0),ae[ie].v,Ce,kt),ae[ie].t="t";break;case"n":case"?":for(Ke=ie+1;ae[Ke]!=null&&((Ee=ae[Ke].t)==="?"||Ee==="D"||(Ee===" "||Ee==="t")&&ae[Ke+1]!=null&&(ae[Ke+1].t==="?"||ae[Ke+1].t==="t"&&ae[Ke+1].v==="/")||ae[ie].t==="("&&(Ee===" "||Ee==="n"||Ee===")")||Ee==="t"&&(ae[Ke].v==="/"||ae[Ke].v===" "&&ae[Ke+1]!=null&&ae[Ke+1].t=="?"));)ae[ie].v+=ae[Ke].v,ae[Ke]={v:"",t:";"},++Ke;Se+=ae[ie].v,ie=Ke-1;break;case"G":ae[ie].t="t",ae[ie].v=M(G,ee);break}var Fe="",ye,be;if(Se.length>0){Se.charCodeAt(0)==40?(ye=G<0&&Se.charCodeAt(0)===45?-G:G,be=V("n",Se,ye)):(ye=G<0&&pe>1?-G:G,be=V("n",Se,ye),ye<0&&ae[0]&&ae[0].t=="t"&&(be=be.substr(1),ae[0].v="-"+ae[0].v)),Ke=be.length-1;var ht=ae.length;for(ie=0;ie<ae.length;++ie)if(ae[ie]!=null&&ae[ie].t!="t"&&ae[ie].v.indexOf(".")>-1){ht=ie;break}var De=ae.length;if(ht===ae.length&&be.indexOf("E")===-1){for(ie=ae.length-1;ie>=0;--ie)ae[ie]==null||"n?".indexOf(ae[ie].t)===-1||(Ke>=ae[ie].v.length-1?(Ke-=ae[ie].v.length,ae[ie].v=be.substr(Ke+1,ae[ie].v.length)):Ke<0?ae[ie].v="":(ae[ie].v=be.substr(0,Ke+1),Ke=-1),ae[ie].t="t",De=ie);Ke>=0&&De<ae.length&&(ae[De].v=be.substr(0,Ke+1)+ae[De].v)}else if(ht!==ae.length&&be.indexOf("E")===-1){for(Ke=be.indexOf(".")-1,ie=ht;ie>=0;--ie)if(!(ae[ie]==null||"n?".indexOf(ae[ie].t)===-1)){for(Le=ae[ie].v.indexOf(".")>-1&&ie===ht?ae[ie].v.indexOf(".")-1:ae[ie].v.length-1,Fe=ae[ie].v.substr(Le+1);Le>=0;--Le)Ke>=0&&(ae[ie].v.charAt(Le)==="0"||ae[ie].v.charAt(Le)==="#")&&(Fe=be.charAt(Ke--)+Fe);ae[ie].v=Fe,ae[ie].t="t",De=ie}for(Ke>=0&&De<ae.length&&(ae[De].v=be.substr(0,Ke+1)+ae[De].v),Ke=be.indexOf(".")+1,ie=ht;ie<ae.length;++ie)if(!(ae[ie]==null||"n?(".indexOf(ae[ie].t)===-1&&ie!==ht)){for(Le=ae[ie].v.indexOf(".")>-1&&ie===ht?ae[ie].v.indexOf(".")+1:0,Fe=ae[ie].v.substr(0,Le);Le<ae[ie].v.length;++Le)Ke<be.length&&(Fe+=be.charAt(Ke++));ae[ie].v=Fe,ae[ie].t="t",De=ie}}}for(ie=0;ie<ae.length;++ie)ae[ie]!=null&&"n?".indexOf(ae[ie].t)>-1&&(ye=pe>1&&G<0&&ie>0&&ae[ie-1].v==="-"?-G:G,ae[ie].v=V(ae[ie].t,ae[ie].v,ye),ae[ie].t="t");var Pe="";for(ie=0;ie!==ae.length;++ie)ae[ie]!=null&&(Pe+=ae[ie].v);return Pe}n._eval=te;var le=/\[[=<>]/,oe=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function se(K,G){if(G==null)return!1;var ee=parseFloat(G[2]);switch(G[1]){case"=":if(K==ee)return!0;break;case">":if(K>ee)return!0;break;case"<":if(K<ee)return!0;break;case"<>":if(K!=ee)return!0;break;case">=":if(K>=ee)return!0;break;case"<=":if(K<=ee)return!0;break}return!1}function ce(K,G){var ee=q(K),pe=ee.length,ae=ee[pe-1].indexOf("@");if(pe<4&&ae>-1&&--pe,ee.length>4)throw new Error("cannot find right format for |"+ee.join("|")+"|");if(typeof G!="number")return[4,ee.length===4||ae>-1?ee[ee.length-1]:"@"];switch(ee.length){case 1:ee=ae>-1?["General","General","General",ee[0]]:[ee[0],ee[0],ee[0],"@"];break;case 2:ee=ae>-1?[ee[0],ee[0],ee[0],ee[1]]:[ee[0],ee[1],ee[0],"@"];break;case 3:ee=ae>-1?[ee[0],ee[1],ee[0],ee[2]]:[ee[0],ee[1],ee[2],"@"];break;case 4:break}var Te=G>0?ee[0]:G<0?ee[1]:ee[2];if(ee[0].indexOf("[")===-1&&ee[1].indexOf("[")===-1)return[pe,Te];if(ee[0].match(le)!=null||ee[1].match(le)!=null){var ie=ee[0].match(oe),Ee=ee[1].match(oe);return se(G,ie)?[pe,ee[0]]:se(G,Ee)?[pe,ee[1]]:[pe,ee[ie!=null&&Ee!=null?2:1]]}return[pe,Te]}function he(K,G,ee){ee==null&&(ee={});var pe="";switch(typeof K){case"string":K=="m/d/yy"&&ee.dateNF?pe=ee.dateNF:pe=K;break;case"number":K==14&&ee.dateNF?pe=ee.dateNF:pe=(ee.table!=null?ee.table:k)[K],pe==null&&(pe=ee.table&&ee.table[w[K]]||k[w[K]]),pe==null&&(pe=C[K]||"General");break}var ae=/^(w|W)((0?)|(0\.0+))$/;if(pe.match(ae)){if(isNaN(G))return G;var Te=pe.slice(1),ie=!1;!isNaN(G)&&Number(G)<0&&(ie=!0,G=Math.abs(G));var Ee=parseInt(G),je=Ee.toString().length;if(je>4){if(je>8){var Ce=parseInt(G/1e8),Le=parseInt(parseFloat(G).subtract(Ce*1e8)/1e4),Ge=parseFloat(G).subtract(Ce*1e8+Le*1e4);Te!=""&&(Ge=(0,Br.default)(Ge).format(Te)),G=Ce+"\u4EBF"+Le+"\u4E07"+Ge}else{var Le=parseInt(G/1e4),Ge=parseFloat(G).subtract(Le*1e4);Te!=""&&(Ge=(0,Br.default)(Ge).format(Te)),G=Le+"\u4E07"+Ge}if(G.indexOf("\u4EBF0\u4E070")!=-1?G=G.replace("0\u4E070",""):G.indexOf("\u4EBF0\u4E07")!=-1?G=G.replace("0\u4E07",""):G.indexOf("\u4E070")!=-1&&(G=G.replace("\u4E070","\u4E07")),G.indexOf("\u4EBF")!=-1&&G.indexOf("\u4E07")==-1){var Ne=G.substring(G.indexOf("\u4EBF")+1);if(Ne.substring(0,1)!=="."&&Ne!=""){switch((parseInt(Ne)+"").length){case 1:Ne="000"+Ne;break;case 2:Ne="00"+Ne;break;case 3:Ne="0"+Ne;break}G=G.substring(0,G.indexOf("\u4EBF")+1)+Ne}}else if(G.indexOf("\u4EBF")==-1&&G.indexOf("\u4E07")!=-1){var et=G.substring(G.indexOf("\u4E07")+1);if(et.substring(0,1)!=="."&&et!=""){switch((parseInt(et)+"").length){case 1:et="000"+et;break;case 2:et="00"+et;break;case 3:et="0"+et;break}G=G.substring(0,G.indexOf("\u4E07")+1)+et}}else if(G.indexOf("\u4EBF")!=-1&&G.indexOf("\u4E07")!=-1){var Ne=G.substring(G.indexOf("\u4EBF")+1,G.indexOf("\u4E07")),et=G.substring(G.indexOf("\u4E07")+1);switch((parseInt(Ne)+"").length){case 1:Ne="000"+Ne;break;case 2:Ne="00"+Ne;break;case 3:Ne="0"+Ne;break}if(G=G.substring(0,G.indexOf("\u4EBF")+1)+Ne+G.substring(G.indexOf("\u4E07")),et.substring(0,1)!=="."&&et!=""){switch((parseInt(et)+"").length){case 1:et="000"+et;break;case 2:et="00"+et;break;case 3:et="0"+et;break}G=G.substring(0,G.indexOf("\u4E07")+1)+et}}}else Te!=""&&(G=(0,Br.default)(G).format(Te));return ie?"-"+G:G}if(g(pe,0))return M(G,ee);G instanceof Date&&(G=I(G,ee.date1904));var vt=ce(pe,G);if(g(vt[1]))return M(G,ee);if(G===!0)G="TRUE";else if(G===!1)G="FALSE";else if(G===""||G==null)return"";return te(vt[1],G,ee,vt[0])}function ue(K,G){if(typeof G!="number"){G=+G||-1;for(var ee=0;ee<392;++ee){if(k[ee]==null){G<0&&(G=ee);continue}if(k[ee]==K){G=ee;break}}G<0&&(G=391)}return k[G]=K,G}n.load=ue,n._table=k,n.get_table=function(){return k},n.load_table=function(G){for(var ee=0;ee!=392;++ee)G[ee]!==void 0&&ue(G[ee],ee)},n.init_table=b,n.format=he};zy(kl);O1={"General Number":"General","General Date":kl._table[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":kl._table[15],"Short Date":kl._table[14],"Long Time":kl._table[19],"Medium Time":kl._table[18],"Short Time":kl._table[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:kl._table[2],Standard:kl._table[4],Percent:kl._table[10],Scientific:kl._table[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'},B1=function(){var e=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/g,n=/_x([\da-fA-F]{4})_/g;return function t(l){var a=l+"",o=a.indexOf("<![CDATA[");if(o==-1)return a.replace(e,function(u,f){return encodings[u]||String.fromCharCode(parseInt(f,u.indexOf("x")>-1?16:10))||u}).replace(n,function(u,f){return String.fromCharCode(parseInt(f,16))});var s=a.indexOf("]]>");return t(a.slice(0,o))+a.slice(o+9,s)+t(a.slice(s+3))}}(),Oy=new Date(1899,11,31,0,0,0),H1=Oy.getTime(),By=new Date(1900,2,1,0,0,0);vo=new Date("2017-02-19T19:06:09.000Z");isNaN(vo.getFullYear())&&(vo=new Date("2/19/17"));Hy=vo.getFullYear()==2017});function Ht(e,n,t,l){t==null&&(t=h.flowdata);let a=t[e][n],o;if(P(l)=="object"?(a==null?a=l:(l.f!=null?a.f=l.f:a.hasOwnProperty("f")&&delete a.f,l.spl!=null&&(a.spl=l.spl),l.ct!=null&&(a.ct=l.ct)),P(l.v)=="object"?o=l.v.v:o=l.v):o=l,me(o)){P(a)=="object"?(delete a.m,delete a.v):a=null,t[e][n]=a;return}(me(a)||(P(a)==="string"||P(a)==="number")&&a===l)&&(a={});let s=o.toString();if(s.substr(0,1)=="'")a.m=s.substr(1),a.ct={fa:"@",t:"s"},a.v=s.substr(1),a.qp=1;else if(a.qp==1)a.m=s,a.ct={fa:"@",t:"s"},a.v=s;else if(s.toUpperCase()==="TRUE")a.m="TRUE",a.ct={fa:"General",t:"b"},a.v=!0;else if(s.toUpperCase()==="FALSE")a.m="FALSE",a.ct={fa:"General",t:"b"},a.v=!1;else if(s.substr(-1)==="%"&&B(s.substring(0,s.length-1)))a.ct={fa:"0%",t:"n"},a.v=s.substring(0,s.length-1)/100,a.m=o;else if(H(o))a.m=s,a.ct!=null?a.ct.t="e":a.ct={fa:"General",t:"e"},a.v=o;else if(a.f!=null&&B(o)&&!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(o))if(a.v=parseFloat(o),a.ct==null&&(a.ct={fa:"General",t:"n"}),a.v==Infinity||a.v==-Infinity)a.m=a.v.toString();else if(a.v.toString().indexOf("e")>-1){let u;a.v.toString().split(".").length==1?u=0:u=a.v.toString().split(".")[1].split("e")[0].length,u>5&&(u=5),a.m=a.v.toExponential(u).toString()}else{let u=Math.round(a.v*1e9)/1e9;if(a.ct==null){let f=at(u);a.m=f[0].toString()}else{let f=mt(a.ct.fa,u);a.m=f.toString()}}else if(a.ct!=null&&a.ct.fa=="@")a.m=s,a.v=o;else if(a.ct!=null&&a.ct.fa!=null&&a.ct.fa!="General"){B(o)&&(o=parseFloat(o));let u=mt(a.ct.fa,o);u===o?(u=at(o),a.m=u[0].toString(),a.ct=u[1],a.v=u[2]):(a.m=u.toString(),a.v=o)}else if(B(o)&&!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(o))if(typeof o=="string"&&o.split("").every(f=>f=="0"||f==".")&&(o=parseFloat(o)),a.v=o,a.ct={fa:"General",t:"n"},a.v==Infinity||a.v==-Infinity)a.m=a.v.toString();else{let u=at(a.v);a.m=u[0].toString()}else{let u=at(o);a.m=u[0].toString(),a.ct=u[1],a.v=u[2]}if(!ne.allowUpdate&&!de.pointEdit&&a.ct!=null&&/^(w|W)((0?)|(0\.0+))$/.test(a.ct.fa)==!1&&a.ct.t=="n"&&a.v!=null&&parseInt(a.v).toString().length>4){let u=de.autoFormatw.toString().toUpperCase(),f=de.accuracy,d=jy(u,f);d!="General"&&(a.ct.fa=d,a.m=mt(d,a.v))}t[e][n]=a}function jy(e,n){let t="0.",l;if(e=="TRUE"){if(n==null)return"w";{let a=parseInt(n);if(a==0)return"w0";t="w0.";for(let o=0;o<a;o++)t+="0";l=t}}else{if(n==null)return"General";{let a=parseInt(n);if(a==0)return"0";for(let o=0;o<a;o++)t+="0";l=t}}return l.toString()}var $r=Ie(()=>{ft();Ft();Al();Qt();xl();Xe()});function wl(){if(h.luckysheet_select_save.length==0)return;let e=Infinity,n=-Infinity,t=0,l=0,a=0;for(let u=0;u<h.luckysheet_select_save.length;u++){let f=Bf(h.luckysheet_select_save[u]);for(let d=0;d<f.length;d++)for(let m=0;m<f[0].length;m++){if(me(f[d][m])||(l++,f[d][m].ct!=null&&f[d][m].ct.t=="d"))continue;let g=f[d][m].v;!B(g)||(g=parseFloat(g),t+=g,g<e&&(e=g),g>n&&(n=g))}}let o=Q().formula,s="";s+="<span>"+o.count+":"+l+"</span>",(isFinite(n)||isFinite(e))&&(s+="<span>"+o.sum+":"+mt("w",t)+"</span>",s+="<span>"+o.average+":"+mt("w",Math.round(t/l*1e4)/1e4)+"</span>"),isFinite(n)&&(s+="<span>"+o.max+":"+mt("w",n)+"</span>"),isFinite(e)&&(s+="<span>"+o.min+":"+mt("w",e)+"</span>"),$("#luckysheet-sta-content").html(s)}var Pa=Ie(()=>{Xe();Kt();Ft();Al();bt()});function La(e,n,t,l,a){t==null&&(t=!0),e||(e="down"),n||(n="cell"),a==null&&(a=!1);let o=h.luckysheet_select_save[h.luckysheet_select_save.length-1],s=o.row==null?0:o.row[0],u=o.column==null?0:o.column[0],f=o.row==null?0:o.row[0],d=o.column==null?0:o.column[0],m=o.row==null?0:o.row[1],g=o.column==null?0:o.column[1];if(p.fucntionboxshow(s,u),n=="range"){var y=h.luckysheet_shiftpositon.row[0],v=h.luckysheet_shiftpositon.column[0];let S=h.luckysheet_shiftpositon.row[1],_=h.luckysheet_shiftpositon.column[1];e=="down"||e=="up"?S<m?s=o.row==null?0:o.row[1]:y>f?s=o.row==null?0:o.row[0]:S==m&&y==f&&(e=="down"?s=o.row==null?0:o.row[1]:s=o.row==null?0:o.row[0]):(e=="right"||e=="left")&&(_<g?u=o.column==null?0:o.column[1]:v>d?u=o.column==null?0:o.column[0]:_==g&&v==d&&(e=="right"?u=o.column==null?0:o.column[1]:u=o.column==null?0:o.column[0]))}let b=h.flowdata.length,k=h.flowdata[0].length,w=h.flowdata,x="",C=0;if(e=="up"){if(s==0)return;{let S=[],_=null,T=0,A=null;for(let R=d;R<=g;R++){S=[],T=0;for(let I=s-1;I>=0;I--){let F=w[I][R];if(P(F)=="object"&&me(F.v)||me(F)?S.push(!1):S.push(!0),S.length>1){if(S[T]==!0&&S[T-1]==!1){_=I;break}else if(S[T]==!1&&S[T-1]==!0){_=I+1;break}}T++}_==null&&(_=0),(A==null||_<A)&&(A=_)}x="down",C=A-s}}else if(e=="down"){if(s==b-1)return;{let S=[],_=null,T=0,A=null;for(let R=d;R<=g;R++){S=[],T=0;for(let I=s+1;I<w.length;I++){let F=w[I][R];if(P(F)=="object"&&me(F.v)||me(F)?S.push(!1):S.push(!0),S.length>1){if(S[T]==!0&&S[T-1]==!1){_=I;break}else if(S[T]==!1&&S[T-1]==!0){_=I-1;break}}T++}_==null&&(_=w.length-1),(A==null||_>A)&&(A=_)}x="down",C=A-s}}else if(e=="left"){if(u==0)return;{let S=[],_=null,T=0,A=null;for(let R=f;R<=m;R++){S=[],T=0;for(let I=u-1;I>=0;I--){let F=w[R][I];if(P(F)=="object"&&me(F.v)||me(F)?S.push(!1):S.push(!0),S.length>1){if(S[T]==!0&&S[T-1]==!1){_=I;break}else if(S[T]==!1&&S[T-1]==!0){_=I+1;break}}T++}_==null&&(_=0),(A==null||_<A)&&(A=_)}x="right",C=A-u}}else if(e=="right"){if(u==k-1)return;{let S=[],_=null,T=0,A=null;for(let R=f;R<=m;R++){S=[],T=0;for(let I=u+1;I<w[0].length;I++){let F=w[R][I];if(P(F)=="object"&&me(F.v)||me(F)?S.push(!1):S.push(!0),S.length>1){if(S[T]==!0&&S[T-1]==!1){_=I;break}else if(S[T]==!1&&S[T-1]==!0){_=I-1;break}}T++}_==null&&(_=w[0].length-1),(A==null||_>A)&&(A=_)}x="right",C=A-u}}if(n=="range"&&(e=="up"?p_endR<m&&C+s<p_endR&&(C=p_endR-s):e=="down"?y>f&&C+s>y&&(C=y-s):e=="left"?p_endC<g&&C+u<p_endC&&(C=p_endC-u):e=="right"&&v>d&&C+u>v&&(C=v-u),l!=null&&Math.abs(C)>Math.abs(l)&&(C=l)),!a)n=="cell"?jt(x,C,"rangeOfSelect",t):n=="range"&&Bn(x,C,"rangeOfSelect",t);else return C}function jt(e,n,t,l){l==null&&(l=!0),e||e=="down";let a=h.flowdata.length,o=h.flowdata[0].length,s,u,f,d,m,g,y,v;if(t=="rangeOfSelect"){let _=h.luckysheet_select_save[h.luckysheet_select_save.length-1],T;_.row_focus==null?T=_.row[0]:T=_.row_focus;let A;_.column_focus==null?A=_.column[0]:A=_.column_focus;let R=ke.mergeborer(h.flowdata,T,A);if(R){let M=R.row[2],E=R.row[3],N=R.column[2],L=R.column[3];n>0?e=="down"?(T=E,A=N):e=="right"&&(T=M,A=L):(T=M,A=N)}let I=_.moveXY==null?T:_.moveXY.x,F=_.moveXY==null?A:_.moveXY.y;e=="down"?(T+=n,I=T):e=="right"&&(A+=n,F=A),T>=a&&(T=a-1,I=T),T<0&&(T=0,I=T),A>=o&&(A=o-1,F=A),A<0&&(A=0,F=A);let z=ke.mergeborer(h.flowdata,T,A);z?(s=z.row[1],u=z.row[0],f=z.row[2],d=z.row[3],m=z.column[1],g=z.column[0],y=z.column[2],v=z.column[3]):(s=h.visibledatarow[I],u=I-1==-1?0:h.visibledatarow[I-1],m=h.visibledatacolumn[F],g=F-1==-1?0:h.visibledatacolumn[F-1],f=d=T,y=v=A),_.row=[f,d],_.column=[y,v],_.row_focus=f,_.column_focus=y,_.moveXY={x:I,y:F},lt(),Oe.pivotclick(f,y),p.fucntionboxshow(f,y)}else if(t=="rangeOfFormula"){let _=p.func_selectedrange,T;_.row_focus==null?T=_.row[0]:T=_.row_focus;let A;_.column_focus==null?A=_.column[0]:A=_.column_focus;let R=ke.mergeborer(h.flowdata,T,A);if(R){let M=R.row[2],E=R.row[3],N=R.column[2],L=R.column[3];n>0?e=="down"?(T=E,A=N):e=="right"&&(T=M,A=L):(T=M,A=N)}let I=_.moveXY==null?T:_.moveXY.x,F=_.moveXY==null?A:_.moveXY.y;e=="down"?(T+=n,I=T):e=="right"&&(A+=n,F=A),T>=a&&(T=a-1,I=T),T<0&&(T=0,I=T),A>=o&&(A=o-1,F=A),A<0&&(A=0,F=A);let z=ke.mergeborer(h.flowdata,T,A);z?(s=z.row[1],u=z.row[0],f=z.row[2],d=z.row[3],m=z.column[1],g=z.column[0],y=z.column[2],v=z.column[3]):(s=h.visibledatarow[I],u=I-1==-1?0:h.visibledatarow[I-1],f=I,d=I,m=h.visibledatacolumn[F],g=F-1==-1?0:h.visibledatacolumn[F-1],y=F,v=F),p.func_selectedrange={left:g,width:m-g-1,top:u,height:s-u-1,left_move:g,width_move:m-g-1,top_move:u,height_move:s-u-1,row:[f,d],column:[y,v],row_focus:f,column_focus:y,moveXY:{x:I,y:F}},$("#luckysheet-formula-functionrange-select").css({left:g,width:m-g-1,top:u,height:s-u-1}).show(),p.rangeSetValue({row:[f,d],column:[y,v]})}let b=$("#luckysheet-cell-main").scrollLeft(),k=$("#luckysheet-cell-main").scrollTop(),w=$("#luckysheet-cell-main").height(),x=$("#luckysheet-cell-main").width(),C=0,S=0;m-b-x+20>0?(C=m-x+20,l&&$("#luckysheet-scrollbar-x").scrollLeft(C)):g-b-20<0&&(C=g-20,l&&$("#luckysheet-scrollbar-x").scrollLeft(C)),s-k-w+20>0?(S=s-w+20,l&&$("#luckysheet-scrollbar-y").scrollTop(S)):u-k-20<0&&(S=u-20,l&&$("#luckysheet-scrollbar-y").scrollTop(S)),clearTimeout(h.countfuncTimeout),wl(),ne.saveParam("mv",h.currentSheetIndex,h.luckysheet_select_save)}function ca(e,n,t){t||(t=!0);let l,a,o,s;if(n=="rangeOfSelect"){let v=h.luckysheet_select_save[h.luckysheet_select_save.length-1],b=v.row_focus,k=v.column_focus,w=!1,x={};if(h.config.merge!=null&&b+"_"+k in h.config.merge&&(w=!0,x=h.config.merge[b+"_"+k]),e=="down"){if(b==h.flowdata.length-1)return;w?b=pt("down",k,x.r+x.rs-1,h.flowdata.length-1):b=pt("down",k,b,h.flowdata.length-1)}else if(e=="up"){if(b==0)return;w?b=pt("up",k,0,x.r):b=pt("up",k,0,b)}else if(e=="right"){if(k==h.flowdata[0].length-1)return;w?k=pt("right",b,x.c+x.cs-1,h.flowdata[0].length-1):k=pt("right",b,k,h.flowdata[0].length-1)}else if(e=="left"){if(k==0)return;w?k=pt("left",b,0,x.c):k=pt("left",b,0,k)}let C=[b,b],S=[k,k];l=h.visibledatarow[b],a=b-1==-1?0:h.visibledatarow[b-1],o=h.visibledatacolumn[k],s=k-1==-1?0:h.visibledatacolumn[k-1];let _=ke.mergeMoveMain(S,C,v,a,l-a-1,s,o-s-1);_!=null&&(S=_[0],C=_[1]),h.luckysheet_select_save=[{row:C,column:S}],lt(),Oe.pivotclick(b,k),p.fucntionboxshow(b,k)}else if(n=="rangeOfFormula"){let v=p.func_selectedrange,b=v.row_focus,k=v.column_focus,w=!1,x={};if(h.config.merge!=null&&b+"_"+k in h.config.merge&&(w=!0,x=h.config.merge[b+"_"+k]),e=="down"){if(b==h.flowdata.length-1)return;w?b=pt("down",k,x.r+x.rs-1,h.flowdata.length-1):b=pt("down",k,b,h.flowdata.length-1)}else if(e=="up"){if(b==0)return;w?b=pt("up",k,0,x.r):b=pt("up",k,0,b)}else if(e=="right"){if(k==h.flowdata[0].length-1)return;w?k=pt("right",b,x.c+x.cs-1,h.flowdata[0].length-1):k=pt("right",b,k,h.flowdata[0].length-1)}else if(e=="left"){if(k==0)return;w?k=pt("left",b,0,x.c):k=pt("left",b,0,k)}let C=[b,b],S=[k,k];l=h.visibledatarow[b],a=b-1==-1?0:h.visibledatarow[b-1],o=h.visibledatacolumn[k],s=k-1==-1?0:h.visibledatacolumn[k-1];let _=a,T=l-a-1,A=s,R=o-s-1,I=ke.mergeMoveMain(S,C,v,_,T,A,R);I!=null&&(S=I[0],C=I[1],_=I[2],T=I[3],A=I[4],R=I[5]),p.func_selectedrange={left:A,width:R,top:_,height:T,left_move:A,width_move:R,top_move:_,height_move:T,row:C,column:S,row_focus:b,column_focus:k},$("#luckysheet-formula-functionrange-select").css({left:A,width:R,top:_,height:T}).show(),p.rangeSetValue({row:C,column:S})}let u=$("#luckysheet-cell-main").scrollLeft(),f=$("#luckysheet-cell-main").scrollTop(),d=$("#luckysheet-cell-main").height(),m=$("#luckysheet-cell-main").width(),g=0,y=0;o-u-m+20>0?(g=o-m+20,t&&$("#luckysheet-scrollbar-x").scrollLeft(g)):s-u-20<0&&(g=s-20,t&&$("#luckysheet-scrollbar-x").scrollLeft(g)),l-f-d+20>0?(y=l-d+20,t&&$("#luckysheet-scrollbar-y").scrollTop(y)):a-f-20<0&&(y=a-20,t&&$("#luckysheet-scrollbar-y").scrollTop(y)),clearTimeout(h.countfuncTimeout),wl()}function Bn(e,n,t,l){l==null&&(l=!0),e||e=="down";let a,o,s,u;if(t=="rangeOfSelect"){let b=h.luckysheet_select_save[h.luckysheet_select_save.length-1],k=b.row[0],w=b.row[1],x=b.column[0],C=b.column[1],S=b.row_focus,_=b.column_focus,T=h.flowdata.length,A=h.flowdata[0].length;if(e=="down"){if(Bl(S,x,C)){let z=lr(S,x,C),M=z[0],E=z[1];M>k&&E==w?(n>0&&Bl(k,x,C)&&(k=lr(k,x,C)[1]),k+=n):E<w&&M==k?(n<0&&Bl(w,x,C)&&(w=lr(w,x,C)[0]),w+=n):n>0?w+=n:k+=n}else S>k&&S==w?(n>0&&Bl(k,x,C)&&(k=lr(k,x,C)[1]),k+=n):S<w&&S==k?(n<0&&Bl(w,x,C)&&(w=lr(w,x,C)[0]),w+=n):S==k&&S==w&&(n>0?w+=n:k+=n);w>=T&&(w=T-1),w<0&&(w=0),k>=T&&(k=T-1),k<0&&(k=0)}else{if(Hl(_,k,w)){let z=rr(_,k,w),M=z[0],E=z[1];M>x&&E==C?(n>0&&Hl(x,k,w)&&(x=rr(x,k,w)[1]),x+=n):E<C&&M==x?(n<0&&Hl(C,k,w)&&(C=rr(C,k,w)[0]),C+=n):n>0?C+=n:x+=n}else _>x&&_==C?(n>0&&Hl(x,k,w)&&(x=rr(x,k,w)[1]),x+=n):_<C&&_==x?(n<0&&Hl(C,k,w)&&(C=rr(C,k,w)[0]),C+=n):_==x&&_==C&&(n>0?C+=n:x+=n);C>=A&&(C=A-1),C<0&&(C=0),x>=A&&(x=A-1),x<0&&(x=0)}let R=[k,w],I=[x,C];a=h.visibledatarow[w],o=k-1==-1?0:h.visibledatarow[k-1],s=h.visibledatacolumn[C],u=x-1==-1?0:h.visibledatacolumn[x-1];let F=ke.mergeMoveMain(I,R,b,o,a-o-1,u,s-u-1);F!=null&&(I=F[0],R=F[1]),b.row=R,b.column=I,lt()}else if(t=="rangeOfFormula"){let b=p.func_selectedrange,k=b.row[0],w=b.row[1],x=b.column[0],C=b.column[1],S=b.row_focus,_=b.column_focus,T=h.flowdata.length,A=h.flowdata[0].length;if(e=="down"){if(Bl(S,x,C)){let L=lr(S,x,C),O=L[0],V=L[1];O>k&&V==w?(n>0&&Bl(k,x,C)&&(k=lr(k,x,C)[1]),k+=n):V<w&&O==k?(n<0&&Bl(w,x,C)&&(w=lr(w,x,C)[0]),w+=n):n>0?w+=n:k+=n}else S>k&&S==w?(n>0&&Bl(k,x,C)&&(k=lr(k,x,C)[1]),k+=n):S<w&&S==k?(n<0&&Bl(w,x,C)&&(w=lr(w,x,C)[0]),w+=n):S==k&&S==w&&(n>0?w+=n:k+=n);w>=T&&(w=T-1),w<0&&(w=0),k>=T&&(k=T-1),k<0&&(k=0)}else{if(Hl(_,k,w)){let L=rr(_,k,w),O=L[0],V=L[1];O>x&&V==C?(n>0&&Hl(x,k,w)&&(x=rr(x,k,w)[1]),x+=n):V<C&&O==x?(n<0&&Hl(C,k,w)&&(C=rr(C,k,w)[0]),C+=n):n>0?C+=n:x+=n}else _>x&&_==C?(n>0&&Hl(x,k,w)&&(x=rr(x,k,w)[1]),x+=n):_<C&&_==x?(n<0&&Hl(C,k,w)&&(C=rr(C,k,w)[0]),C+=n):_==x&&_==C&&(n>0?C+=n:x+=n);C>=A&&(C=A-1),C<0&&(C=0),x>=A&&(x=A-1),x<0&&(x=0)}let R=[k,w],I=[x,C];a=h.visibledatarow[w],o=k-1==-1?0:h.visibledatarow[k-1],s=h.visibledatacolumn[C],u=x-1==-1?0:h.visibledatacolumn[x-1];let F=o,z=a-o-1,M=u,E=s-u-1,N=ke.mergeMoveMain(I,R,b,F,z,M,E);N!=null&&(I=N[0],R=N[1],F=N[2],z=N[3],M=N[4],E=N[5]),p.func_selectedrange={left:M,width:E,top:F,height:z,left_move:M,width_move:E,top_move:F,height_move:z,row:R,column:I,row_focus:S,column_focus:_},$("#luckysheet-formula-functionrange-select").css({left:M,width:E,top:F,height:z}).show(),p.rangeSetValue({row:R,column:I})}let f=$("#luckysheet-cell-main").scrollLeft(),d=$("#luckysheet-cell-main").scrollTop(),m=$("#luckysheet-cell-main").height(),g=$("#luckysheet-cell-main").width(),y=0,v=0;s-f-g+20>0?(y=s-g+20,l&&$("#luckysheet-scrollbar-x").scrollLeft(y)):u-f-20<0&&(y=u-20,l&&$("#luckysheet-scrollbar-x").scrollLeft(y)),a-d-m+20>0?(v=a-m+20,l&&$("#luckysheet-scrollbar-y").scrollTop(v)):o-d-20<0&&(v=o-20,l&&$("#luckysheet-scrollbar-y").scrollTop(v)),clearTimeout(h.countfuncTimeout),wl()}function an(e,n,t){t||(t=!0);let l,a,o,s;if(n=="rangeOfSelect"){let v=h.luckysheet_select_save[h.luckysheet_select_save.length-1],b=v.row_focus,k=v.column_focus,w=v.row[0],x=v.row[1],C=v.column[0],S=v.column[1];if(e=="down"){if(x==h.flowdata.length-1)return;if(Bl(b,C,S)){let R=lr(b,C,S),I=R[0],F=R[1];I>w&&F==x?w=pt("down",k,w,x):x=pt("down",k,x,h.flowdata.length-1)}else b>w&&b==x?w=pt("down",k,w,x):x=pt("down",k,x,h.flowdata.length-1)}else if(e=="up"){if(w==0)return;if(Bl(b,C,S)){let R=lr(b,C,S),I=R[0];R[1]<x&&I==w?x=pt("up",k,w,x):w=pt("up",k,0,w)}else b<x&&b==w?x=pt("up",k,w,x):w=pt("up",k,0,w)}else if(e=="right"){if(S==h.flowdata[0].length-1)return;if(Hl(k,w,x)){let R=rr(k,w,x),I=R[0],F=R[1];I>C&&F==S?C=pt("right",b,C,S):S=pt("right",b,S,h.flowdata[0].length-1)}else k>C&&k==S?C=pt("right",b,C,S):S=pt("right",b,S,h.flowdata[0].length-1)}else if(e=="left"){if(C==0)return;if(Hl(k,w,x)){let R=rr(k,w,x),I=R[0];R[1]<S&&I==C?S=pt("left",b,C,S):C=pt("left",b,0,C)}else k<S&&k==C?S=pt("left",b,C,S):C=pt("left",b,0,C)}let _=[w,x],T=[C,S];l=h.visibledatarow[x],a=w-1==-1?0:h.visibledatarow[w-1],o=h.visibledatacolumn[S],s=C-1==-1?0:h.visibledatacolumn[C-1];let A=ke.mergeMoveMain(T,_,v,a,l-a-1,s,o-s-1);A!=null&&(T=A[0],_=A[1]),v.row=_,v.column=T,lt()}else if(n=="rangeOfFormula"){let v=p.func_selectedrange,b=v.row_focus,k=v.column_focus,w=v.row[0],x=v.row[1],C=v.column[0],S=v.column[1];if(e=="down"){if(x==h.flowdata.length-1)return;if(Bl(b,C,S)){let M=lr(b,C,S),E=M[0],N=M[1];E>w&&N==x?w=pt("down",k,w,x):x=pt("down",k,x,h.flowdata.length-1)}else b>w&&b==x?w=pt("down",k,w,x):x=pt("down",k,x,h.flowdata.length-1)}else if(e=="up"){if(w==0)return;if(Bl(b,C,S)){let M=lr(b,C,S),E=M[0];M[1]<x&&E==w?x=pt("up",k,w,x):w=pt("up",k,0,w)}else b<x&&b==w?x=pt("up",k,w,x):w=pt("up",k,0,w)}else if(e=="right"){if(S==h.flowdata[0].length-1)return;if(Hl(k,w,x)){let M=rr(k,w,x),E=M[0],N=M[1];E>C&&N==S?C=pt("right",b,C,S):S=pt("right",b,S,h.flowdata[0].length-1)}else k>C&&k==S?C=pt("right",b,C,S):S=pt("right",b,S,h.flowdata[0].length-1)}else if(e=="left"){if(C==0)return;if(Hl(k,w,x)){let M=rr(k,w,x),E=M[0];M[1]<S&&E==C?S=pt("left",b,C,S):C=pt("left",b,0,C)}else k<S&&k==C?S=pt("left",b,C,S):C=pt("left",b,0,C)}let _=[w,x],T=[C,S];l=h.visibledatarow[x],a=w-1==-1?0:h.visibledatarow[w-1],o=h.visibledatacolumn[S],s=C-1==-1?0:h.visibledatacolumn[C-1];let A=a,R=l-a-1,I=s,F=o-s-1,z=ke.mergeMoveMain(T,_,v,A,R,I,F);z!=null&&(T=z[0],_=z[1],A=z[2],R=z[3],I=z[4],F=z[5]),p.func_selectedrange={left:I,width:F,top:A,height:R,left_move:I,width_move:F,top_move:A,height_move:R,row:_,column:T,row_focus:b,column_focus:k},$("#luckysheet-formula-functionrange-select").css({left:I,width:F,top:A,height:R}).show(),p.rangeSetValue({row:_,column:T})}let u=$("#luckysheet-cell-main").scrollLeft(),f=$("#luckysheet-cell-main").scrollTop(),d=$("#luckysheet-cell-main").height(),m=$("#luckysheet-cell-main").width(),g=0,y=0;o-u-m+20>0?(g=o-m+20,t&&$("#luckysheet-scrollbar-x").scrollLeft(g)):s-u-20<0&&(g=s-20,t&&$("#luckysheet-scrollbar-x").scrollLeft(g)),l-f-d+20>0?(y=l-d+20,t&&$("#luckysheet-scrollbar-y").scrollTop(y)):a-f-20<0&&(y=a-20,t&&$("#luckysheet-scrollbar-y").scrollTop(y)),clearTimeout(h.countfuncTimeout),wl()}function Bl(e,n,t){let l=!1;for(let a=n;a<=t;a++){let o=h.flowdata[e][a];if(P(o)=="object"&&"mc"in o){l=!0;break}}return l}function Hl(e,n,t){let l=!1;for(let a=n;a<=t;a++){let o=h.flowdata[a][e];if(P(o)=="object"&&"mc"in o){l=!0;break}}return l}function lr(e,n,t){let l=0,a=h.flowdata.length-1,o=null;if(e>l)for(let u=e;u>=l;u--){for(let f=n;f<=t;f++){let d=h.flowdata[u][f];if(P(d)=="object"&&"mc"in d){let m=h.config.merge[d.mc.r+"_"+d.mc.c];(o==null||m.r<o)&&(o=m.r)}}if(Bl(o-1,n,t)&&o>l)u=o;else break}else o=l;let s=null;if(e<a)for(let u=e;u<=a;u++){for(let f=n;f<=t;f++){let d=h.flowdata[u][f];if(P(d)=="object"&&"mc"in d){let m=h.config.merge[d.mc.r+"_"+d.mc.c];(s==null||m.r+m.rs-1>s)&&(s=m.r+m.rs-1)}}if(Bl(s+1,n,t)&&s<a)u=s;else break}else s=a;return[o,s]}function rr(e,n,t){let l=0,a=h.flowdata[0].length-1,o=null;if(e>l)for(let u=e;u>=l;u--){for(let f=n;f<=t;f++){let d=h.flowdata[f][u];if(P(d)=="object"&&"mc"in d){let m=h.config.merge[d.mc.r+"_"+d.mc.c];(o==null||m.c<o)&&(o=m.c)}}if(Hl(o-1,n,t)&&o>l)u=o;else break}else o=l;let s=null;if(e<a)for(let u=e;u<=a;u++){for(let f=n;f<=t;f++){let d=h.flowdata[f][u];if(P(d)=="object"&&"mc"in d){let m=h.config.merge[d.mc.r+"_"+d.mc.c];(s==null||m.c+m.cs-1>s)&&(s=m.c+m.cs-1)}}if(Hl(s+1,n,t)&&s<a)u=s;else break}else s=a;return[o,s]}function pt(e,n,t,l){let a=null,o;if(e=="down"){let s=h.flowdata[t][n];P(s)=="object"&&me(s.v)||me(s)?o=!0:o=!1,console.log(o,"stNull");let u=[],f=0;for(let d=t+1;d<=l;d++){let m=h.flowdata[d][n];if(P(m)=="object"&&me(m.v)||me(m)?u.push(!0):u.push(!1),u.length==1&&o==!0&&u[f]==!1){a=t+f+1;break}else if(u.length>1){if(o&&u[f]==!1){a=t+f+1;break}else if(!o){if(u[f]==!1&&u[f-1]==!0){a=t+f+1;break}else if(u[f]==!0&&u[f-1]==!1){a=t+f;break}}}d==l&&(a=l),f++}}else if(e=="up"){let s=h.flowdata[l][n];P(s)=="object"&&me(s.v)||me(s)?o=!0:o=!1;let u=[],f=0;for(let d=l-1;d>=t;d--){let m=h.flowdata[d][n];if(P(m)=="object"&&me(m.v)||me(m)?u.push(!0):u.push(!1),u.length==1&&o&&u[f]==!1){a=l-(f+1);break}else if(u.length>1){if(o&&u[f]==!1){a=l-(f+1);break}else if(!o){if(u[f]==!1&&u[f-1]==!0){a=l-(f+1);break}else if(u[f]==!0&&u[f-1]==!1){a=l-f;break}}}d==t&&(a=t),f++}}else if(e=="right"){let s=h.flowdata[n][t];P(s)=="object"&&me(s.v)||me(s)?o=!0:o=!1;let u=[],f=0;for(let d=t+1;d<=l;d++){let m=h.flowdata[n][d];if(P(m)=="object"&&me(m.v)||me(m)?u.push(!0):u.push(!1),u.length==1&&o&&u[f]==!1){a=t+f+1;break}else if(u.length>1){if(o&&u[f]==!1){a=t+f+1;break}else if(!o){if(u[f]==!1&&u[f-1]==!0){a=t+f+1;break}else if(u[f]==!0&&u[f-1]==!1){a=t+f;break}}}d==l&&(a=l),f++}}else if(e=="left"){let s=h.flowdata[n][l];P(s)=="object"&&me(s.v)||me(s)?o=!0:o=!1;let u=[],f=0;for(let d=l-1;d>=t;d--){let m=h.flowdata[n][d];if(P(m)=="object"&&me(m.v)||me(m)?u.push(!0):u.push(!1),u.length==1&&o&&u[f]==!1){a=l-(f+1);break}else if(u.length>1){if(o&&u[f]==!1){a=l-(f+1);break}else if(!o){if(u[f]==!1&&u[f-1]==!0){a=l-(f+1);break}else if(u[f]==!0&&u[f-1]==!1){a=l-f;break}}}d==t&&(a=t),f++}}return a}var za=Ie(()=>{ft();Ut();Ft();Pa();il();Zt();on();Xe();Qt()});var Uy,el,Oa=Ie(()=>{Nt();ft();Ut();Ft();ll();Yt();Gt();pr();Qt();Zt();Xe();bt();Uy={rangefocus:!1,modelfocusIndex:null,FixedModelColor:[{head:{fc:"#000",bc:"#bfbdbe"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f8f3f7"},foot:{fc:"#000",bc:"#dde2de"}},{head:{fc:"#000",bc:"#4bd4e7"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#eaf7ff"},foot:{fc:"#000",bc:"#aae9f8"}},{head:{fc:"#000",bc:"#5ed593"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#e5fbee"},foot:{fc:"#000",bc:"#a5efcc"}},{head:{fc:"#000",bc:"#f6cb4b"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#fff9e7"},foot:{fc:"#000",bc:"#ffebac"}},{head:{fc:"#000",bc:"#f96420"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#ffe5d9"},foot:{fc:"#000",bc:"#ffcfba"}},{head:{fc:"#000",bc:"#5599fc"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#ecf2fe"},foot:{fc:"#000",bc:"#afcbfa"}},{head:{fc:"#000",bc:"#22a69b"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#dff2f8"},foot:{fc:"#000",bc:"#8dd4d0"}},{head:{fc:"#000",bc:"#7a939a"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f0eff7"},foot:{fc:"#000",bc:"#bdcad0"}},{head:{fc:"#000",bc:"#d7a270"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#fdf3f1"},foot:{fc:"#000",bc:"#ead2b6"}},{head:{fc:"#000",bc:"#89c54b"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f1f7e9"},foot:{fc:"#000",bc:"#c5e3a7"}},{head:{fc:"#000",bc:"#8f88f0"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f0e5ff"},foot:{fc:"#000",bc:"#c6c4f6"}},{head:{fc:"#000",bc:"#fd1664"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#feddee"},foot:{fc:"#000",bc:"#f98ab5"}},{head:{fc:"#000",bc:"#da96d3"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#fce8fb"},foot:{fc:"#000",bc:"#f2caee"}},{head:{fc:"#000",bc:"#b49191"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f5ebe8"},foot:{fc:"#000",bc:"#d8c3c3"}},{head:{fc:"#000",bc:"#91b493"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f0fbf0"},foot:{fc:"#000",bc:"#b4cfb6"}},{head:{fc:"#000",bc:"#b4a891"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f8f6f1"},foot:{fc:"#000",bc:"#d3cab8"}},{head:{fc:"#000",bc:"#91abb4"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#eff7fa"},foot:{fc:"#000",bc:"#b7cbd3"}},{head:{fc:"#000",bc:"#b7ba82"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#fafbeb"},foot:{fc:"#000",bc:"#dadcb4"}},{head:{fc:"#000",bc:"#df3e3e"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#fde9e9"},foot:{fc:"#000",bc:"#f89292"}},{head:{fc:"#000",bc:"#f2711c"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#fef0d7"},foot:{fc:"#000",bc:"#fbb335"}},{head:{fc:"#000",bc:"#b5cc18"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f9fbd4"},foot:{fc:"#000",bc:"#e2ed2a"}},{head:{fc:"#000",bc:"#00b5ad"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#ccfaf9"},foot:{fc:"#000",bc:"#00e4df"}},{head:{fc:"#000",bc:"#2185d0"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#d8f3fc"},foot:{fc:"#000",bc:"#3cc4f0"}},{head:{fc:"#000",bc:"#a5673f"},one:{fc:"#000",bc:"#ffffff"},two:{fc:"#000",bc:"#f6ede5"},foot:{fc:"#000",bc:"#d3a47c"}}],getModelBox:function(e,n){let t=this;$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelList").empty(),$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelCustom").empty();let l="";for(let o=0;o<t.FixedModelColor.length;o++){let s=t.FixedModelColor[o],u,f,d,m;e&&n?(u=s.head,f=s.one,d=s.two,m=s.foot):e?(u=s.head,f=s.one,d=s.two,m=s.one):n?(u=s.one,f=s.two,d=s.one,m=s.foot):(u=s.one,f=s.two,d=s.one,m=s.two),l+='<div class="modelbox"><div class="box"><span style="color:'+u.fc+";background-color:"+u.bc+'"> \u2014 </span><span style="color:'+f.fc+";background-color:"+f.bc+'"> \u2014 </span><span style="color:'+d.fc+";background-color:"+d.bc+'"> \u2014 </span><span style="color:'+m.fc+";background-color:"+m.bc+'"> \u2014 </span></div></div>'}$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelList").append(l);let a=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save_modelCustom;if(a!=null&&a.length>0){let o="";for(let s=0;s<a.length;s++){let u=a[s],f,d,m,g;e&&n?(f=u.head,d=u.one,m=u.two,g=u.foot):e?(f=u.head,d=u.one,m=u.two,g=u.one):n?(f=u.one,d=u.two,m=u.one,g=u.foot):(f=u.one,d=u.two,m=u.one,g=u.two),o+='<div class="modelbox"><div class="box"><span style="color:'+f.fc+";background-color:"+f.bc+'"> \u2014 </span><span style="color:'+d.fc+";background-color:"+d.bc+'"> \u2014 </span><span style="color:'+m.fc+";background-color:"+m.bc+'"> \u2014 </span><span style="color:'+g.fc+";background-color:"+g.bc+'"> \u2014 </span></div></div>'}$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelCustom").append(o)}},init:function(){let e=this;$("#luckysheet-modal-dialog-slider-alternateformat").remove(),$("body").append(Mu()),zt(),$("#luckysheet-modal-dialog-slider-alternateformat .luckysheet-model-close-btn").click(function(){$("#luckysheet-modal-dialog-slider-alternateformat").hide(),zt()}),$(document).off("focus.AFrangeInput").on("focus.AFrangeInput","#luckysheet-alternateformat-range input",function(){e.rangefocus=!0}),$(document).off("blur.AFrangeInput").on("blur.AFrangeInput","#luckysheet-alternateformat-range input",function(){e.rangefocus=!1}),$(document).off("keydown.AFrangeInput").on("keydown.AFrangeInput","#luckysheet-alternateformat-range input",function(n){let t=$(this).val().trim();n.keyCode==13&&e.update()}),$(document).off("click.AFrangeIcon").on("click.AFrangeIcon","#luckysheet-alternateformat-range .fa-table",function(){$("#luckysheet-modal-dialog-slider-alternateformat").hide(),zt();let n=$(this).parents("#luckysheet-alternateformat-range").find("input").val().trim();e.rangeDialog(n)}),$(document).off("click.AFrDCf").on("click.AFrDCf","#luckysheet-alternateformat-rangeDialog-confirm",function(){let n=$(this).parents("#luckysheet-alternateformat-rangeDialog").find("input").val().trim();$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-range input").val(n),$(this).parents("#luckysheet-alternateformat-rangeDialog").hide(),$("#luckysheet-modal-dialog-slider-alternateformat").show(),zt(),e.update()}),$(document).off("click.AFrDCl").on("click.AFrDCl","#luckysheet-alternateformat-rangeDialog-close",function(){$(this).parents("#luckysheet-alternateformat-rangeDialog").hide(),$("#luckysheet-modal-dialog-slider-alternateformat").show(),zt()}),$(document).off("click.AFrDTitle").on("click.AFrDTitle","#luckysheet-alternateformat-rangeDialog .luckysheet-modal-dialog-title-close",function(){$(this).parents("#luckysheet-alternateformat-rangeDialog").hide(),$("#luckysheet-modal-dialog-slider-alternateformat").show(),zt()}),$(document).off("change.AFrowHeader").on("change.AFrowHeader","#luckysheet-alternateformat-rowHeader",function(){let n;$(this).is(":checked")?n=!0:n=!1;let t;$("#luckysheet-alternateformat-rowFooter").is(":checked")?t=!0:t=!1,e.checkboxChange(n,t),e.modelboxOn(),e.update()}),$(document).off("change.AFrowFooter").on("change.AFrowFooter","#luckysheet-alternateformat-rowFooter",function(){let n;$("#luckysheet-alternateformat-rowHeader").is(":checked")?n=!0:n=!1;let t;$(this).is(":checked")?t=!0:t=!1,e.checkboxChange(n,t),e.modelboxOn(),e.update()}),$(document).off("click.AFmodelbox").on("click.AFmodelbox","#luckysheet-modal-dialog-slider-alternateformat .modelbox",function(){let n=$(this).index(),t=$(this).parents(".cf").attr("id");if(t=="luckysheet-alternateformat-modelList")e.modelfocusIndex=n;else if(t=="luckysheet-alternateformat-modelCustom"){let l=e.FixedModelColor.length;e.modelfocusIndex=n+l}e.modelboxOn(),e.update()}),$(document).off("click.AFselectColor").on("click.AFselectColor","#luckysheet-modal-dialog-slider-alternateformat .luckysheet-color-menu-button-indicator",function(){let n=$(this).closest(".toningbox"),t,l;$(this).find(".luckysheet-icon-img").hasClass("luckysheet-icon-text-color")?(t="fc",l=n.find(".toningShow").data("fc")):$(this).find(".luckysheet-icon-img").hasClass("luckysheet-icon-cell-color")&&(t="bc",l=n.find(".toningShow").data("bc"));let a;n.hasClass("header")?a="0":n.hasClass("ctOne")?a="1":n.hasClass("ctTwo")?a="2":n.hasClass("footer")&&(a="3"),e.colorSelectDialog(l,t,a)}),$(document).off("click.AFselectColorConfirm").on("click.AFselectColorConfirm","#luckysheet-alternateformat-colorSelect-dialog-confirm",function(){let n=$(this).parents("#luckysheet-alternateformat-colorSelect-dialog"),l=Q().alternatingColors;$("#luckysheet-modal-dialog-mask").hide(),n.hide();let a=n.find(".currenColor span").attr("title"),o;n.find(".luckysheet-modal-dialog-title-text").text()==l.selectionTextColor?o="fc":n.find(".luckysheet-modal-dialog-title-text").text()==l.selectionCellColor&&(o="bc");let s=n.find(".currenColor").attr("data-source");s=="0"?(o=="fc"&&($("#luckysheet-alternateformat-modelToning .header .toningShow").css("color",a),$("#luckysheet-alternateformat-modelToning .header .toningShow").data("fc",a),$("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a)),o=="bc"&&($("#luckysheet-alternateformat-modelToning .header .toningShow").css("background-color",a),$("#luckysheet-alternateformat-modelToning .header .toningShow").data("bc",a),$("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a))):s=="1"?(o=="fc"&&($("#luckysheet-alternateformat-modelToning .ctOne .toningShow").css("color",a),$("#luckysheet-alternateformat-modelToning .ctOne .toningShow").data("fc",a),$("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a)),o=="bc"&&($("#luckysheet-alternateformat-modelToning .ctOne .toningShow").css("background-color",a),$("#luckysheet-alternateformat-modelToning .ctOne .toningShow").data("bc",a),$("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a))):s=="2"?(o=="fc"&&($("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").css("color",a),$("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").data("fc",a),$("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a)),o=="bc"&&($("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").css("background-color",a),$("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").data("bc",a),$("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a))):s=="3"&&(o=="fc"&&($("#luckysheet-alternateformat-modelToning .footer .toningShow").css("color",a),$("#luckysheet-alternateformat-modelToning .footer .toningShow").data("fc",a),$("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a)),o=="bc"&&($("#luckysheet-alternateformat-modelToning .footer .toningShow").css("background-color",a),$("#luckysheet-alternateformat-modelToning .footer .toningShow").data("bc",a),$("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",a)));let u;$("#luckysheet-alternateformat-rowHeader").is(":checked")?u=!0:u=!1;let f;$("#luckysheet-alternateformat-rowFooter").is(":checked")?f=!0:f=!1;let d=e.modelfocusIndex,m=e.FixedModelColor.length,g,y;if(d<m)g=$.extend(!0,{},e.getFormatByIndex());else{y=h.luckysheetfile[Z(h.currentSheetIndex)];let v=y.luckysheet_alternateformat_save_modelCustom;g=$.extend(!0,{},v[d-m])}s=="0"?o=="fc"?g.head.fc=a:o=="bc"&&(g.head.bc=a):s=="1"?o=="fc"?g.one.fc=a:o=="bc"&&(g.one.bc=a):s=="2"?o=="fc"?g.two.fc=a:o=="bc"&&(g.two.bc=a):s=="3"&&(o=="fc"&&(g.foot.fc=a),o=="bc"&&(g.foot.bc=a)),e.modelfocusIndex<m?(e.addCustomModel(g),e.modelfocusIndex=e.getIndexByFormat(g)):(y.luckysheet_alternateformat_save_modelCustom[d-m]=g,ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,y.luckysheet_alternateformat_save_modelCustom,{k:"luckysheet_alternateformat_save_modelCustom"})),e.getModelBox(u,f),e.modelboxOn(),e.update()}),$(document).off("click.AFremove").on("click.AFremove","#luckysheet-alternateformat-remove",function(){let n=$(this).data("index"),l=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save,a=$.extend(!0,[],l);l.length>1?l.splice(n,1):l=[];let o=$.extend(!0,[],l);e.ref(a,o),ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,l,{k:"luckysheet_alternateformat_save"}),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-modal-dialog-slider-alternateformat").hide(),zt()})},perfect:function(){let e=this,n=$.extend(!0,{},h.luckysheet_select_save[0]),t=e.rangeIsExists(n)[1],l=$.extend(!0,{},h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save[t]),a=l.cellrange;$("#luckysheet-alternateformat-range input").val(xt(h.currentSheetIndex,{row:a.row,column:a.column},h.currentSheetIndex)),h.luckysheet_select_save=[{row:a.row,column:a.column}],lt();let o=l.hasRowHeader,s=l.hasRowFooter,u=l.format;e.modelfocusIndex=e.getIndexByFormat(u),e.modelfocusIndex==null&&(e.addCustomModel(u),e.modelfocusIndex=e.getIndexByFormat(u)),e.checkboxChange(o,s),e.modelboxOn(),$("#luckysheet-alternateformat-remove").data("index",t)},checkboxChange:function(e,n){e?($("#luckysheet-alternateformat-rowHeader").prop("checked",!0),$("#luckysheet-alternateformat-modelToning .header").show()):($("#luckysheet-alternateformat-rowHeader").removeAttr("checked"),$("#luckysheet-alternateformat-modelToning .header").hide()),n?($("#luckysheet-alternateformat-rowFooter").prop("checked",!0),$("#luckysheet-alternateformat-modelToning .footer").show()):($("#luckysheet-alternateformat-rowFooter").removeAttr("checked"),$("#luckysheet-alternateformat-modelToning .footer").hide()),this.getModelBox(e,n)},modelboxOn:function(){let e=this;$("#luckysheet-modal-dialog-slider-alternateformat .modelbox").removeClass("on");let n=e.modelfocusIndex,t=e.FixedModelColor.length;n<t?$("#luckysheet-alternateformat-modelList .modelbox").eq(n).addClass("on"):$("#luckysheet-alternateformat-modelCustom .modelbox").eq(n-t).addClass("on"),e.modelToningColor()},modelToningColor:function(){let e=this.getFormatByIndex();$("#luckysheet-alternateformat-modelToning .header .toningShow").css({color:e.head.fc,"background-color":e.head.bc}),$("#luckysheet-alternateformat-modelToning .header .toningShow").data("fc",e.head.fc).data("bc",e.head.bc),$("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.head.fc),$("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.head.bc),$("#luckysheet-alternateformat-modelToning .ctOne .toningShow").css({color:e.one.fc,"background-color":e.one.bc}),$("#luckysheet-alternateformat-modelToning .ctOne .toningShow").data("fc",e.one.fc).data("bc",e.one.bc),$("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.one.fc),$("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.one.bc),$("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").css({color:e.two.fc,"background-color":e.two.bc}),$("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").data("fc",e.two.fc).data("bc",e.two.bc),$("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.two.fc),$("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.two.bc),$("#luckysheet-alternateformat-modelToning .footer .toningShow").css({color:e.foot.fc,"background-color":e.foot.bc}),$("#luckysheet-alternateformat-modelToning .footer .toningShow").data("fc",e.foot.fc).data("bc",e.foot.bc),$("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.foot.fc),$("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color",e.foot.bc)},addCustomModel:function(e){let n=h.luckysheetfile[Z(h.currentSheetIndex)];n.luckysheet_alternateformat_save_modelCustom==null&&(n.luckysheet_alternateformat_save_modelCustom=[]),n.luckysheet_alternateformat_save_modelCustom.push(e),ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,n.luckysheet_alternateformat_save_modelCustom,{k:"luckysheet_alternateformat_save_modelCustom"})},colorSelectDialog:function(e,n,t){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-alternateformat-colorSelect-dialog").remove();let l=Q(),a=l.alternatingColors,o=l.button,s=l.toolbar,u;n=="fc"?u=a.selectionTextColor:n=="bc"&&(u=a.selectionCellColor),$("body").append(_e(dt,{id:"luckysheet-alternateformat-colorSelect-dialog",addclass:"luckysheet-alternateformat-colorSelect-dialog",title:u,content:"<div class='currenColor' data-source='"+t+"'>"+a.currentColor+"\uFF1A<span title='"+e+"' style='background-color:"+e+"'></span></div><div class='colorshowbox'></div>",botton:'<button id="luckysheet-alternateformat-colorSelect-dialog-confirm" class="btn btn-primary">'+o.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+o.cancel+"</button>",style:"z-index:100003"}));let f=$("#luckysheet-alternateformat-colorSelect-dialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),d=f.outerHeight(),m=f.outerWidth(),g=$(window).width(),y=$(window).height(),v=$(document).scrollLeft(),b=$(document).scrollTop();$("#luckysheet-alternateformat-colorSelect-dialog").css({left:(g+v-m)/2,top:(y+b-d)/3}).show(),$("#luckysheet-alternateformat-colorSelect-dialog").find(".colorshowbox").spectrum({showPalette:!0,showPaletteOnly:!0,preferredFormat:"hex",clickoutFiresChange:!1,showInitial:!0,showInput:!0,flat:!0,hideAfterPaletteSelect:!0,showSelectionPalette:!0,showButtons:!1,maxPaletteSize:8,maxSelectionSize:8,color:e,cancelText:o.cancel,chooseText:s.confirmColor,togglePaletteMoreText:s.customColor,togglePaletteLessText:s.collapse,togglePaletteOnly:!0,clearText:s.clearText,noColorSelectedText:s.noColorSelectedText,localStorageKey:"spectrum.textcolor"+ne.gridKey,palette:[["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]],move:function(k){k!=null?k=k.toHexString():k="#000",$("#luckysheet-alternateformat-colorSelect-dialog .currenColor span").css("background-color",k).attr("title",k)}})},rangeDialog:function(e){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-alternateformat-rangeDialog").remove();let n=Q(),t=n.alternatingColors,l=n.button;$("body").append(_e(dt,{id:"luckysheet-alternateformat-rangeDialog",addclass:"luckysheet-alternateformat-rangeDialog",title:t.selectRange,content:'<input readonly="readonly" placeholder="'+t.tipSelectRange+'" value="'+e+'"/>',botton:'<button id="luckysheet-alternateformat-rangeDialog-confirm" class="btn btn-primary">'+l.confirm+'</button><button id="luckysheet-alternateformat-rangeDialog-close" class="btn btn-default">'+l.cancel+"</button>",style:"z-index:100003"}));let a=$("#luckysheet-alternateformat-rangeDialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),f=$(window).height(),d=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-alternateformat-rangeDialog").css({left:(u+d-s)/2,top:(f+m-o)/3}).show()},rangeIsExists:function(e,n){let t=this,l=!1,a=null,o=$.extend(!0,[],h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save);if(n!=null&&n!=null&&(o.length>1?o.splice(n,1):o=[]),o.length>0){let s=[];for(let f=0;f<o.length;f++){let d={index:f,map:t.getRangeMap(o[f].cellrange.row,o[f].cellrange.column)};s.push(d)}let u=t.getRangeMap(e.row,e.column);for(let f in u){if(l)break;for(let d=0;d<s.length;d++)if(f in s[d].map){l=!0,a=s[d].index;break}}}return[l,a]},getRangeMap:function(e,n){let t={},l=e[0],a=e[1],o=n[0],s=n[1];for(let u=l;u<=a;u++)for(let f=o;f<=s;f++)t[u+"_"+f]=0;return t},getIndexByFormat:function(e){let n=this,t=null,l=n.FixedModelColor;for(let o=0;o<l.length;o++){let s=l[o];if(e.head.fc==s.head.fc&&e.head.bc==s.head.bc&&e.one.fc==s.one.fc&&e.one.bc==s.one.bc&&e.two.fc==s.two.fc&&e.two.bc==s.two.bc&&e.foot.fc==s.foot.fc&&e.foot.bc==s.foot.bc){t=o;break}}let a=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save_modelCustom;if(a!=null&&a.length>0)for(let o=0;o<a.length;o++){let s=a[o];if(e.head.fc==s.head.fc&&e.head.bc==s.head.bc&&e.one.fc==s.one.fc&&e.one.bc==s.one.bc&&e.two.fc==s.two.fc&&e.two.bc==s.two.bc&&e.foot.fc==s.foot.fc&&e.foot.bc==s.foot.bc){t=l.length+o;break}}return t},getFormatByIndex:function(){let e=this,n=e.modelfocusIndex,t=e.FixedModelColor.length,l={};return n<t?l=e.FixedModelColor[n]:l=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save_modelCustom[n-t],l},new:function(e){let n=this,t=n.getFormatByIndex(),a=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save;a==null&&(a=[]);let o=$.extend(!0,[],a),s={cellrange:{row:e.row,column:e.column},format:t,hasRowHeader:!0,hasRowFooter:!1};a.push(s);let u=$.extend(!0,[],a);n.ref(o,u),ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,a,{k:"luckysheet_alternateformat_save"})},update:function(){let e=this,t=Q().alternatingColors,l=$("#luckysheet-alternateformat-remove").data("index"),a=$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-range input").val().trim();if(!p.iscelldata(a)){fe()?alert(t.errorNoRange):U.info(t.errorNoRange,"");return}let o=p.getcellrange(a);if(e.rangeIsExists(o,l)[0]){fe()?alert(t.errorExistColors):U.info(t.errorExistColors,"");return}let u;$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-rowHeader").is(":checked")?u=!0:u=!1;let f;$("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-rowFooter").is(":checked")?f=!0:f=!1;let d=e.getFormatByIndex(),g=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save;g==null&&(g=[]);let y=$.extend(!0,[],g),v={cellrange:{row:o.row,column:o.column},format:d,hasRowHeader:u,hasRowFooter:f};g[l]=v;let b=$.extend(!0,[],g);e.ref(y,b),ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,g,{k:"luckysheet_alternateformat_save"})},checksAF:function(e,n,t){return e+"_"+n in t?t[e+"_"+n]:null},getComputeMap:function(){let n=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_alternateformat_save;return this.compute(n)},compute:function(e){let n={};if(e!=null&&e.length>0)for(let t=0;t<e.length;t++){let l=e[t].cellrange,a=e[t].format,o=e[t].hasRowHeader,s=e[t].hasRowFooter,u=l.row[0],f=l.row[1],d=l.column[0],m=l.column[1];if(o&&s){for(let g=d;g<=m;g++)n[u+"_"+g]=[a.head.fc,a.head.bc];if(f-u>1)for(let g=u+1;g<f;g++){let y,v;(g-u)%2!=0?(y=a.one.fc,v=a.one.bc):(y=a.two.fc,v=a.two.bc);for(let b=d;b<=m;b++)n[g+"_"+b]=[y,v]}if(f>u)for(let g=d;g<=m;g++)n[f+"_"+g]=[a.foot.fc,a.foot.bc]}else if(o){for(let g=d;g<=m;g++)n[u+"_"+g]=[a.head.fc,a.head.bc];if(f>u)for(let g=u+1;g<=f;g++){let y,v;(g-u)%2!=0?(y=a.one.fc,v=a.one.bc):(y=a.two.fc,v=a.two.bc);for(let b=d;b<=m;b++)n[g+"_"+b]=[y,v]}}else if(s){if(f>u)for(let g=u;g<f;g++){let y,v;(g-u)%2==0?(y=a.one.fc,v=a.one.bc):(y=a.two.fc,v=a.two.bc);for(let b=d;b<=m;b++)n[g+"_"+b]=[y,v]}for(let g=d;g<=m;g++)n[f+"_"+g]=[a.foot.fc,a.foot.bc]}else for(let g=u;g<=f;g++){let y,v;(g-u)%2==0?(y=a.one.fc,v=a.one.bc):(y=a.two.fc,v=a.two.bc);for(let b=d;b<=m;b++)n[g+"_"+b]=[y,v]}}return n},ref:function(e,n){if(h.clearjfundo){h.jfundo.length=0;let l={};l.type="updateAF",l.sheetIndex=h.currentSheetIndex,l.data={historyRules:e,currentRules:n},h.jfredo.push(l)}let t=Z(h.currentSheetIndex);h.luckysheetfile[t].luckysheet_alternateformat_save=n,setTimeout(function(){Be()},1)}},el=Uy});var Gy,Hn,Ba=Ie(()=>{ft();Gy={parseJsonParm:function(e){if(e==null)return{};if(P(e)=="string")try{return new Function("return "+e)()}catch(n){return{}}else return e},hasKey:function(e){let t=this.parseJsonParm(e);for(let l in t)return!0;return!1}},Hn=Gy});function Vn(e,n,t,l,a,o,s,u,f,d){if(n?(e.addClass("luckysheet-filter-options-active").data("rowhidden",JSON.stringify(t)).data("caljs",JSON.stringify(l)).html('<i class="fa fa-filter luckysheet-mousedown-cancel" aria-hidden="true"></i>'),l!=null&&(e.data("byconditionvalue",l.value).data("byconditiontype",l.type).data("byconditiontext",l.text),l.value1!=null&&e.data("byconditionvalue1",l.value1),l.value2!=null&&e.data("byconditionvalue2",l.value2))):(e.removeClass("luckysheet-filter-options-active").data("rowhidden","").data("caljs","").html('<i class="fa fa-caret-down luckysheet-mousedown-cancel" aria-hidden="true"></i>'),e.data("byconditionvalue","null").data("byconditiontype","0").data("byconditiontext","\u65E0").data("byconditionvalue1","").data("byconditionvalue2","")),a){let m=h.luckysheetfile[Z(h.currentSheetIndex)];if(m.filter==null&&(m.filter={}),n){let g={caljs:l,rowhidden:t,optionstate:n,str:o,edr:s,cindex:u,stc:f,edc:d};m.filter[u-f]=g}else delete m.filter[u-f];ne.saveParam("all",h.currentSheetIndex,m.filter,{k:"filter"})}}function Yf(e,n,t,l,a,o){let s=xe.deepCopyFlowData(h.flowdata);e=e+1;let u=!1,f=[];for(let m=e;m<=t;m++){let g=[];for(let y=n;y<=l;y++){if(s[m][y]!=null&&s[m][y].mc!=null){u=!0;break}g.push(s[m][y])}f.push(g)}if(u){let m=Q().filter;fe()?alert(m.mergeError):U.info(m.mergeError,"");return}f=Hr(f,a-n,o);for(let m=e;m<=t;m++)for(let g=n;g<=l;g++)s[m][g]=f[m-e][g-n];let d={};if(h.config.rowlen!=null){let m=$.extend(!0,{},h.config);m=yl(s,e,t,m),d={cfg:m,RowlChange:!0}}Ze(s,[{row:[e,t],column:[n,l]}],d)}function Ri(){if(!$t(h.currentSheetIndex,"filter"))return;if(h.luckysheet_select_save.length>1){$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(),$("#"+h.container).attr("tabindex",0).focus();let n=Q().splitText;fe()?alert(n.tipNoMulti):U.info(n.tipNoMulti,"");return}if(h.luckysheetfile[Z(h.currentSheetIndex)].isPivotTable)return;$("#luckysheet-filter-selected-sheet"+h.currentSheetIndex+", #luckysheet-filter-options-sheet"+h.currentSheetIndex).remove();let e=h.luckysheet_select_save[0];if(e.row[0]==e.row[1]&&e.column[0]==e.column[1]){let n,t,l=e.row[1];for(let a=0;a<h.flowdata[l].length;a++){let o=h.flowdata[l][a];if(o!=null&&!me(o.v))n==null&&(n=a);else if(n!=null){t=a-1;break}}t==null&&(t=h.flowdata[l].length-1),h.luckysheet_select_save=[{row:[l,l],column:[n,t]}],lt(),h.luckysheet_shiftpositon=$.extend(!0,{},e),La("down","range")}else e.row[1]-e.row[0]<2&&(h.luckysheet_shiftpositon=$.extend(!0,{},e),La("down","range"));h.luckysheet_filter_save=$.extend(!0,{},h.luckysheet_select_save[0]),Dl(h.luckysheet_filter_save),ne.saveParam("all",h.currentSheetIndex,h.luckysheet_filter_save,{k:"filter_select"}),h.filterchage&&h.jfredo.push({type:"filtershow",data:[],curdata:[],sheetIndex:h.currentSheetIndex,filter_save:h.luckysheet_filter_save})}function Dl(e,n){if($("#luckysheet-filter-selected-sheet"+h.currentSheetIndex).remove(),$("#luckysheet-filter-options-sheet"+h.currentSheetIndex).remove(),e==null||JSON.stringify(e)=="{}")return;let t=e.row[0],l=e.row[1],a=e.column[0],o=e.column[1],s=h.visibledatarow[l],u=t-1==-1?0:h.visibledatarow[t-1],f=h.visibledatacolumn[o],d=a-1==-1?0:h.visibledatacolumn[a-1],m='<div id="luckysheet-filter-selected-sheet'+h.currentSheetIndex+'" class="luckysheet-cell-selected luckysheet-filter-selected" style="left:'+d+"px;width:"+(f-d-1)+"px;top:"+u+"px;height:"+(s-u-1)+'px;display:block;border-color:#897BFF;z-index:20;background:none;"></div>';$("#luckysheet-cell-main").append(m);let g="";for(let v=a;v<=o;v++)if(n==null||n[v-a]==null)g+='<div data-rowhidden="" data-str="'+t+'" data-edr="'+l+'" data-cindex="'+v+'" data-stc="'+a+'" data-edc="'+o+'" class="luckysheet-filter-options" style="left:'+(h.visibledatacolumn[v]-20)+"px;top:"+u+'px;display:block;"><i class="fa fa-caret-down" aria-hidden="true"></i></div>';else{let b;if(n[v-a].caljs!=null){let k;n[v-a].caljs.value1!=null?k='data-byconditionvalue1="'+n[v-a].caljs.value1+'" ':k="";let w;n[v-a].caljs.value2!=null?w='data-byconditionvalue2="'+n[v-a].caljs.value2+'" ':w="",b='data-caljs="'+JSON.stringify(n[v-a].caljs)+'" data-byconditionvalue="'+n[v-a].caljs.value+'" data-byconditiontype="'+n[v-a].caljs.type+'" data-byconditiontext="'+n[v-a].caljs.text+'" '+k+w}else b="";g+='<div data-rowhidden="'+JSON.stringify(n[v-a].rowhidden).replace(/\"/g,"'")+'" '+b+' data-str="'+t+'" data-edr="'+l+'" data-cindex="'+v+'" data-stc="'+a+'" data-edc="'+o+'" class="luckysheet-filter-options luckysheet-filter-options-active" style="left:'+(h.visibledatacolumn[v]-20)+"px;top:"+u+'px;display:block;"><i class="fa fa-filter luckysheet-mousedown-cancel" aria-hidden="true"></i></div>'}$("#luckysheet-cell-main").append('<div id="luckysheet-filter-options-sheet'+h.currentSheetIndex+'" class="luckysheet-filter-options-c">'+g+"</div>"),$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(),$("#luckysheet-cell-main").scrollTop()>e.top_move&&$("#luckysheet-scrollbar-y").scrollTop(e.top_move);let y=h.luckysheetfile[Z(h.currentSheetIndex)];y.filter_select=e}function Xf(){let e=null,n=Q(),t=n.filter,l=n.button;$("#luckysheetfilter").click(Ri);let a=null,o=null;$(".luckysheet-cols-menu .luckysheet-cols-submenu").hover(function(){let s=$(this),u=s.attr("id"),f=$("#"+u+"_sub"),d=s.parent(),m=$(window).width(),g=$(window).height(),y=d.width(),v=f.height()+25,b=f.width()+5,k=s.offset(),w=k.top,x=k.left+y;x+b>m&&(x=k.left-b),w+v>g&&(w=g-v),f.css({top:w,left:x}).show(),o=s},function(){let s=$(this),u=s.attr("id"),f=$("#"+u+"_sub");a=setTimeout(function(){f.hide()},200)}),$(".luckysheet-rightgclick-menu-sub").hover(function(){o.addClass("luckysheet-cols-menuitem-hover"),clearTimeout(a)},function(){o.removeClass("luckysheet-cols-menuitem-hover"),$(this).hide()}),$("#luckysheet-filter-menu").mouseover(function(){clearTimeout(e),e=setTimeout(function(){$("#luckysheet-filter-submenu").hide()},500)}),$("#luckysheet-filter-submenu").mouseover(function(){clearTimeout(e)}).find(".luckysheet-cols-menuitem").click(function(s){$("#luckysheet-filter-selected span").html($(this).find(".luckysheet-cols-menuitem-content").text()).data("value",$(this).data("value")),$("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide();let u=$(this).data("type"),f=$(this).attr("data-value");u=="2"?($("#luckysheet-filter-selected span").data("type","2"),$("#luckysheet-filter-menu .luckysheet-filter-selected-input2").show(),$("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type","number")):u=="0"?$("#luckysheet-filter-selected span").data("type","0"):($("#luckysheet-filter-selected span").data("type","1"),$("#luckysheet-filter-menu .luckysheet-filter-selected-input").eq(0).show(),f=="dateequal"||f=="datelessthan"||f=="datemorethan"?$("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type","date"):f=="morethan"||f=="moreequalthan"||f=="lessthan"||f=="lessequalthan"||f=="equal"||f=="noequal"?$("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type","number"):$("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type","text")),$("#luckysheet-filter-byvalue").next().slideUp(),$("#luckysheet-filter-submenu").hide()}),$("#luckysheet-filter-bycondition, #luckysheet-filter-byvalue").click(function(){let s=$(this);s.next().slideToggle(200),setTimeout(function(){s.attr("id")=="luckysheet-filter-bycondition"&&$("#luckysheet-filter-bycondition").next().is(":visible")&&$("#luckysheet-filter-selected span").text()!=t.filiterInputNone&&$("#luckysheet-filter-byvalue").next().slideUp(200),s.is($("#luckysheet-filter-bycondition"))&&$("#luckysheet-filter-bycondition").next().is(":hidden")&&$("#luckysheet-filter-byvalue").next().is(":hidden")&&$("#luckysheet-filter-byvalue").next().slideDown(200)},300)}),$("#luckysheet-filter-selected").click(function(){let s=$(this),u=s.offset(),f=$("#luckysheet-filter-submenu");f.hide();let d=$(window).height(),m=$(window).width(),g=f.width(),y=f.height(),v=u.top,b=u.left,k=d-u.top-20;u.left+g>m&&(b=u.left-g),u.top>d/2&&(v=d-u.top,v<0&&(v=0),k=u.top-20),f.css({top:v,left:b,height:k}).show(),clearTimeout(e)}),$("#luckysheet-cell-main").on("click",".luckysheet-filter-options",function(s){if(!$t(h.currentSheetIndex,"filter"))return;let u=$(s.currentTarget),f=u.offset(),d=$("#luckysheet-filter-menu"),m=$(window).height(),g=$(window).width(),y=u.data("str"),v=u.data("edr"),b=u.data("cindex"),k=u.data("stc"),w=u.data("edc"),x=u.data("rowhidden")==""?{}:JSON.parse(u.data("rowhidden").replace(/\'/g,'"'));$("body .luckysheet-cols-menu").hide(),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(),$("#luckysheet-filter-byvalue-input").val(""),$("#luckysheet-filter-bycondition").next().hide(),$("#luckysheet-filter-byvalue").next().show(),d.data("str",y),d.data("edr",v),d.data("cindex",b),d.data("stc",k),d.data("edc",w),$("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide().find("input").val(),$("#luckysheet-filter-selected span").data("type","0").data("type",null).text(t.filiterInputNone);let C=u.data("byconditiontype");if($("#luckysheet-filter-selected span").data("value",u.data("byconditionvalue")).data("type",C).text(u.data("byconditiontext")),C=="2"){let A=$("#luckysheet-filter-menu .luckysheet-filter-selected-input2").show().find("input");A.eq(0).val(u.data("byconditionvalue1")),A.eq(1).val(u.data("byconditionvalue2"))}else C=="1"&&$("#luckysheet-filter-menu .luckysheet-filter-selected-input").eq(0).show().find("input").val(u.data("byconditionvalue1"));$("#luckysheet-filter-orderby-asc").off("click").on("click",function(){Yf(y,k,v,w,b,!0)}),$("#luckysheet-filter-orderby-desc").off("click").on("click",function(){Yf(y,k,v,w,b,!1)});let S=Er("#luckysheet-filter-byvalue-select",{text:t.filiterMoreDataTip});$("#luckysheet-filter-byvalue-select").empty().append(S.el);let _={};$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").not(this).each(function(){let A=$(this),R=A.data("rowhidden");if(R=="")return!0;R=JSON.parse(R.replace(/\'/g,'"'));for(let I in R)_[I]=0});let T=h.flowdata;return setTimeout(function(){let A={},R={},I={},F={};for(let E=y+1;E<=v;E++){if(E in _||h.flowdata[E]==null)continue;let N=h.flowdata[E][b];if(N!=null&&!me(N.v)&&N.ct!=null&&N.ct.t=="d"){let L=mt("YYYY-MM-DD",N.v),O=L.split("-")[0],V=L.split("-")[1],q=L.split("-")[2];O in A||(A[O]={}),V in A[O]||(A[O][V]={}),q in A[O][V]||(A[O][V][q]=0),A[O][V][q]++,E in x&&(R[O]=0,R[V]=0,R[q]=0)}else{let L,O;N==null||me(N.v)?(L=null,O=null):(L=N.v,O=N.m),L in I||(I[L]={}),O in I[L]||(I[L][O]=0),I[L][O]++,E in x&&(F[L+"#$$$#"+O]=0)}}let z=[];if(JSON.stringify(A).length>2)for(let E in A){let N=0,L="";for(let V in A[E]){let q=0,W="";for(let te in A[E][V]){let le=A[E][V][te];q+=le;let oe;Number(V)<10?oe="0"+Number(V):oe=V;let se;Number(te)<10?se="0"+Number(te):se=te,E in R&&V in R&&te in R?W+='<div class="day luckysheet-mousedown-cancel cf" data-check="false" title="'+E+"-"+oe+"-"+se+'"><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+te+'</label><span class="count luckysheet-mousedown-cancel">( '+le+" )</span></div>":W+='<div class="day luckysheet-mousedown-cancel cf" data-check="true" title="'+E+"-"+oe+"-"+se+'"><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+te+'</label><span class="count luckysheet-mousedown-cancel">( '+le+" )</span></div>"}N+=q;let X;Number(V)<10?X="0"+Number(V):X=V,E in R&&V in R?L+='<div class="monthBox luckysheet-mousedown-cancel"><div class="month luckysheet-mousedown-cancel cf" data-check="false" title="'+E+"-"+X+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+V+""+t.filiterMonthText+'</label><span class="count luckysheet-mousedown-cancel">( '+q+' )</span></div><div class="dayList luckysheet-mousedown-cancel">'+W+"</div></div>":L+='<div class="monthBox luckysheet-mousedown-cancel"><div class="month luckysheet-mousedown-cancel cf" data-check="true" title="'+E+"-"+X+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+V+""+t.filiterMonthText+'</label><span class="count luckysheet-mousedown-cancel">( '+q+' )</span></div><div class="dayList luckysheet-mousedown-cancel">'+W+"</div></div>"}let O;E in R?O='<div class="yearBox luckysheet-mousedown-cancel"><div class="year luckysheet-mousedown-cancel cf" data-check="false" title="'+E+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+E+""+t.filiterYearText+'</label><span class="count luckysheet-mousedown-cancel">( '+N+' )</span></div><div class="monthList luckysheet-mousedown-cancel">'+L+"</div></div>":O='<div class="yearBox luckysheet-mousedown-cancel"><div class="year luckysheet-mousedown-cancel cf" data-check="true" title="'+E+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+E+""+t.filiterYearText+'</label><span class="count luckysheet-mousedown-cancel">( '+N+' )</span></div><div class="monthList luckysheet-mousedown-cancel">'+L+"</div></div>",z.unshift(O)}if(JSON.stringify(I).length>2){let E=Object.keys(I);E=bo(E,!0);for(let N=0;N<E.length;N++){let L=E[N];for(let O in I[L]){let V;L+"#$$$#"+O=="null#$$$#null"?V=t.valueBlank:V=O;let q;L+"#$$$#"+O in F?q='<div class="textBox luckysheet-mousedown-cancel cf" data-check="false" data-filter="'+(L+"#$$$#"+O)+'" title="'+V+'"><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+V+'</label><span class="luckysheet-mousedown-cancel count">( '+I[L][O]+" )</span></div>":q='<div class="textBox luckysheet-mousedown-cancel cf" data-check="true" data-filter="'+(L+"#$$$#"+O)+'" title="'+V+'"><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+V+'</label><span class="luckysheet-mousedown-cancel count">( '+I[L][O]+" )</span></div>",z.push(q)}}}let M=m-f.top-350;M<0&&(M=100),$("#luckysheet-filter-byvalue-select").append("<div class='ListBox luckysheet-mousedown-cancel' style='min-height: 100px; max-height: "+M+"px; overflow-y: auto; overflow-x: hidden;'><table cellspacing='0' style='width:100%;' class='luckysheet-mousedown-cancel'>"+z.join("")+"</table></div>"),S.close()},1),sn(d,f.left,f.top+20),s.stopPropagation(),!1}),$("#luckysheet-filter-orderby-color").hover(function(){let s=$("#luckysheet-filter-menu"),u=s.data("str"),f=s.data("edr"),d=s.data("cindex"),m=s.data("stc"),g=s.data("edc"),y={},v={},b=el.getComputeMap(),k=$e.getComputeMap();for(let N=u+1;N<=f;N++){let L=h.flowdata[N][d],O=ke.checkstatus(h.flowdata,N,d,"bg");O==null&&(O="#ffffff");let V=el.checksAF(N,d,b);V!=null&&(O=V[1]);let q=$e.checksCF(N,d,k);q!=null&&q.cellColor!=null&&(O=q.cellColor),O.indexOf("rgb")>-1&&(O=zn(O)),O.length==4&&(O=O.substr(0,1)+O.substr(1,1).repeat(2)+O.substr(2,1).repeat(2)+O.substr(3,1).repeat(2));let W=ke.checkstatus(h.flowdata,N,d,"fc");V!=null&&(W=V[0]),q!=null&&q.textColor!=null&&(W=q.textColor),W.indexOf("rgb")>-1&&(W=zn(W)),W.length==4&&(W=W.substr(0,1)+W.substr(1,1).repeat(2)+W.substr(2,1).repeat(2)+W.substr(3,1).repeat(2)),h.config!=null&&h.config.rowhidden!=null&&N in h.config.rowhidden?(y[O]=1,L!=null&&!me(L.v)&&(v[W]=1)):(y[O]=0,L!=null&&!me(L.v)&&(v[W]=0))}let w="";if(JSON.stringify(y).length>2&&Object.keys(y).length>1){let N="";for(let L in y)y[L]==0?N+='<div class="item luckysheet-mousedown-cancel"><label class="luckysheet-mousedown-cancel" style="background-color: '+L+'" title="'+L+'"></label><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/></div>':N+='<div class="item luckysheet-mousedown-cancel"><label class="luckysheet-mousedown-cancel" style="background-color: '+L+'" title="'+L+'"></label><input class="luckysheet-mousedown-cancel" type="checkbox"/></div>';w='<div id="filterBgColor" class="box luckysheet-mousedown-cancel"><div class="title luckysheet-mousedown-cancel">'+t.filiterByColorTip+'</div><div style="max-height:128px;overflow:auto;" class="luckysheet-mousedown-cancel">'+N+"</div></div>"}let x="";if(JSON.stringify(v).length>2&&Object.keys(v).length>1){let N="";for(let L in v)v[L]==0?N+='<div class="item luckysheet-mousedown-cancel"><label class="luckysheet-mousedown-cancel" style="background-color: '+L+'" title="'+L+'"></label><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/></div>':N+='<div class="item luckysheet-mousedown-cancel"><label class="luckysheet-mousedown-cancel" style="background-color: '+L+'" title="'+L+'"></label><input class="luckysheet-mousedown-cancel" type="checkbox"/></div>';x='<div id="filterFcColor" class="box luckysheet-mousedown-cancel"><div class="title luckysheet-mousedown-cancel">'+t.filiterByTextColorTip+'</div><div style="max-height:128px;overflow:auto;" class="luckysheet-mousedown-cancel">'+N+"</div></div>"}let C;w==""&&x==""?C='<div class="luckysheet-mousedown-cancel" style="padding: 10px 30px;text-align: center;">'+t.filterContainerOneColorTip+"</div>":C=w+x+'<div class="luckysheet-mousedown-cancel"><button id="luckysheet-filter-orderby-color-confirm" class="btn btn-primary luckysheet-mousedown-cancel" style="margin: 5px 20px;width: 70px;">'+l.confirm+"</button></div>",$("#luckysheet-filter-orderby-color-submenu").remove(),$("body").append('<div id="luckysheet-filter-orderby-color-submenu" class="luckysheet-cols-menu luckysheet-mousedown-cancel">'+C+"</div>");let S=$("#luckysheet-filter-orderby-color-submenu").end(),_=$(this).parent(),T=$(window).width(),A=$(window).height(),R=_.width(),I=S.height()+25,F=S.width()+5,z=$(this).offset(),M=z.top,E=z.left+R;E+F>T&&(E=z.left-F),M+I>A&&(M=A-I),$("#luckysheet-filter-orderby-color-submenu").css({top:M,left:E}).show()},function(){a=setTimeout(function(){$("#luckysheet-filter-orderby-color-submenu").hide()},200)}),$(document).on("mouseover mouseleave","#luckysheet-filter-orderby-color-submenu",function(s){s.type==="mouseover"?clearTimeout(a):$(this).hide()}),$(document).on("click","#luckysheet-filter-orderby-color-submenu .item label",function(){$(this).siblings("input[type='checkbox']").click()}),$(document).off("click.orderbyColorConfirm").on("click.orderbyColorConfirm","#luckysheet-filter-orderby-color-submenu #luckysheet-filter-orderby-color-confirm",function(){let s={},u={};$("#luckysheet-filter-orderby-color-submenu .item").each(function(M,E){if($(E).find("input[type='checkbox']").is(":checked")){let N=$(this).find("label").attr("title"),L=$(this).closest(".box").attr("id");L=="filterBgColor"?s[N]=0:L=="filterFcColor"&&(u[N]=0)}});let f;$("#luckysheet-filter-orderby-color-submenu #filterBgColor").length>0?f=!0:f=!1;let d;$("#luckysheet-filter-orderby-color-submenu #filterFcColor").length>0?d=!0:d=!1;let m=$("#luckysheet-filter-menu"),g=m.data("str"),y=m.data("edr"),v=m.data("cindex"),b=m.data("stc"),k=m.data("edc"),w={};$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").not($("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").eq(v-b).get(0)).each(function(){let M=$(this),E=M.data("rowhidden");if(E=="")return!0;E=JSON.parse(E);for(let N in E)w[N]=0});let x={},C={},S={},_=el.getComputeMap(),T=$e.getComputeMap();for(let M=g+1;M<=y;M++){if(M in w||h.flowdata[M]==null)continue;let E=h.flowdata[M][v],N=ke.checkstatus(h.flowdata,M,v,"bg"),L=el.checksAF(M,v,_);L!=null&&(N=L[1]);let O=$e.checksCF(M,v,T);O!=null&&O.cellColor!=null&&(N=O.cellColor),N=N==null?"#ffffff":N,N.indexOf("rgb")>-1&&(N=zn(N)),N.length==4&&(N=N.substr(0,1)+N.substr(1,1).repeat(2)+N.substr(2,1).repeat(2)+N.substr(3,1).repeat(2));let V=ke.checkstatus(h.flowdata,M,v,"fc");L!=null&&(V=L[0]),O!=null&&O.textColor!=null&&(V=O.textColor),V.indexOf("rgb")>-1&&(V=zn(V)),V.length==4&&(V=V.substr(0,1)+V.substr(1,1).repeat(2)+V.substr(2,1).repeat(2)+V.substr(3,1).repeat(2)),f&&d?!(N in s)&&(!(V in u)||E==null||me(E.v))&&(C[M]=0):f?N in s||(C[M]=0):d&&(!(V in u)||E==null||me(E.v))&&(C[M]=0)}let A=$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").eq(v-b),R=Object.keys(C).length>0,I=$.extend(!0,w,C),F=Hn.parseJsonParm(A.data("rowhidden"));Vn(A,R,C,S,!0,g,y,v,b,k);let z=$.extend(!0,{},h.config);if(z.rowhidden=I,h.clearjfundo){let M={};M.type="datachangeAll_filter",M.sheetIndex=h.currentSheetIndex,M.config=$.extend(!0,{},h.config),M.curconfig=z,M.optionstate=R,M.optionsindex=v-b,M.rowhidden=$.extend(!0,{},C),M.rowhidenPre=$.extend(!0,{},F),S!=null&&(M.caljs=S),h.jfundo.length=0,h.jfredo.push(M)}h.config=z,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,z.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length),$("#luckysheet-filter-menu, #luckysheet-filter-submenu, #luckysheet-filter-orderby-color-submenu").hide(),rl()}),$(document).off("click.filterCheckbox1").on("click.filterCheckbox1","#luckysheet-filter-byvalue-select .textBox",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).find("input[type='checkbox']").prop("checked",!0))}),$(document).off("click.filterCheckbox2").on("click.filterCheckbox2","#luckysheet-filter-byvalue-select .year",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).parents(".yearBox").find(".month").attr("data-check","false"),$(this).parents(".yearBox").find(".day").attr("data-check","false"),$(this).parents(".yearBox").find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).parents(".yearBox").find(".month").attr("data-check","true"),$(this).parents(".yearBox").find(".day").attr("data-check","true"),$(this).parents(".yearBox").find("input[type='checkbox']").prop("checked",!0))}),$(document).off("click.filterCheckbox3").on("click.filterCheckbox3","#luckysheet-filter-byvalue-select .month",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).parents(".monthBox").find(".day").attr("data-check","false"),$(this).parents(".monthBox").find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).parents(".monthBox").find(".day").attr("data-check","true"),$(this).parents(".monthBox").find("input[type='checkbox']").prop("checked",!0));let s=!0;$(this).parents(".yearBox").find(".day").each(function(f,d){$(d).attr("data-check")=="true"||(s=!1)}),s?($(this).parents(".yearBox").find(".year").attr("data-check","true"),$(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked",!0)):($(this).parents(".yearBox").find(".year").attr("data-check","false"),$(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"))}),$(document).off("click.filterCheckbox4").on("click.filterCheckbox4","#luckysheet-filter-byvalue-select .day",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).find("input[type='checkbox']").prop("checked",!0));let s=!0;$(this).parents(".monthBox").find(".day").each(function(m,g){$(g).attr("data-check")=="true"||(s=!1)}),s?($(this).parents(".monthBox").find(".month").attr("data-check","true"),$(this).parents(".monthBox").find(".month input[type='checkbox']").prop("checked",!0)):($(this).parents(".monthBox").find(".month").attr("data-check","false"),$(this).parents(".monthBox").find(".month input[type='checkbox']").removeAttr("checked"));let f=!0;$(this).parents(".yearBox").find(".day").each(function(m,g){$(g).attr("data-check")=="true"||(f=!1)}),f?($(this).parents(".yearBox").find(".year").attr("data-check","true"),$(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked",!0)):($(this).parents(".yearBox").find(".year").attr("data-check","false"),$(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"))}),$(document).off("click.filterYearDropdown").on("click.filterYearDropdown","#luckysheet-filter-byvalue-select .yearBox .fa-caret-right",function(s){let u=$(this).parents(".luckysheet-mousedown-cancel");u.hasClass("year")&&$(this).parents(".yearBox").find(".monthList").slideToggle(),u.hasClass("month")&&$(this).parents(".monthBox").find(".dayList").slideToggle(),s.stopPropagation()}),$("#luckysheet-filter-byvalue-btn-all").click(function(){$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").prop("checked",!0),$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check","true")}),$("#luckysheet-filter-byvalue-btn-clear").click(function(){$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").removeAttr("checked"),$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check","false")}),$("#luckysheet-filter-byvalue-btn-contra").click(function(){$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").each(function(d,m){$(m).is(":checked")?($(m).removeAttr("checked"),$(m).parents(".luckysheet-mousedown-cancel").attr("data-check","false")):($(m).prop("checked",!0),$(m).parents(".luckysheet-mousedown-cancel").attr("data-check","true"))}),$("#luckysheet-filter-byvalue-select .ListBox .monthBox").each(function(d,m){let g=!0;$(m).find(".day input[type='checkbox']").each(function(v,b){$(b).is(":checked")||(g=!1)}),g?($(m).find(".month input[type='checkbox']").prop("checked",!0),$(m).attr("data-check","true")):($(m).find(".month input[type='checkbox']").removeAttr("checked"),$(m).attr("data-check","false"))}),$("#luckysheet-filter-byvalue-select .ListBox .yearBox").each(function(d,m){let g=!0;$(m).find(".day input[type='checkbox']").each(function(v,b){$(b).is(":checked")||(g=!1)}),g?($(m).find(".year input[type='checkbox']").prop("checked",!0),$(m).attr("data-check","true")):($(m).find(".year input[type='checkbox']").removeAttr("checked"),$(m).attr("data-check","false"))})}),$("#luckysheet-filter-initial").click(function(){if(!$t(h.currentSheetIndex,"filter"))return;$("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide().find("input").val(),$("#luckysheet-filter-selected span").data("type","0").data("type",null).text(t.conditionNone);let s={};s.type="datachangeAll_filter_clear",s.sheetIndex=h.currentSheetIndex,s.config=$.extend(!0,{},h.config),h.config.rowhidden={},s.curconfig=$.extend(!0,{},h.config),s.filter_save=$.extend(!0,{},h.luckysheet_filter_save);let u=[];$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").each(function(){let f=$(this),d=f.hasClass("luckysheet-filter-options-active"),m=Hn.parseJsonParm(f.data("rowhidden")),g=Hn.parseJsonParm(f.data("caljs"));u.push({optionstate:d,rowhidden:m,caljs:g,str:f.data("str"),edr:f.data("edr"),cindex:f.data("cindex"),stc:f.data("stc"),edc:f.data("edc")})}),s.optiongroups=u,h.jfundo.length=0,h.jfredo.push(s),$("#luckysheet-filter-selected-sheet"+h.currentSheetIndex+", #luckysheet-filter-options-sheet"+h.currentSheetIndex).remove(),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(),h.luckysheetfile[Z(h.currentSheetIndex)].filter=null,h.luckysheetfile[Z(h.currentSheetIndex)].filter_select=null,ne.saveParam("fsc",h.currentSheetIndex,null),h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,{},{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length)}),$("#luckysheet-filter-byvalue-input").on("input propertychange",function(){let s=$(this).val().toString();$("#luckysheet-filter-byvalue-select .ListBox .luckysheet-mousedown-cancel").show(),s!=""&&$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").each(function(u,f){if($(f).closest(".day").length>0){let d=$(f).siblings("label").text().toString(),m=$(f).closest(".monthBox").find(".month label").text().toString();($(f).closest(".yearBox").find(".year label").text().toString()+"-"+m+"-"+d).indexOf(s)==-1&&($(f).closest(".day").hide(),$(f).closest(".dayList").find(".day:visible").length==0&&$(f).closest(".monthBox").find(".month").hide(),$(f).closest(".monthList").find(".day:visible").length==0&&$(f).closest(".yearBox").find(".year").hide())}$(f).closest(".textBox").length>0&&$(f).siblings("label").text().toString().indexOf(s)==-1&&$(f).parents(".textBox").hide()})}),$("#luckysheet-filter-cancel").click(function(){$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide()}),$("#luckysheet-filter-confirm").click(function(){let s=$("#luckysheet-filter-menu"),u=s.data("str"),f=s.data("edr"),d=s.data("cindex"),m=s.data("stc"),g=s.data("edc"),y={};$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").not($("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").eq(d-m).get(0)).each(function(){let T=$(this),A=T.data("rowhidden");if(A=="")return!0;A=JSON.parse(A.replace(/\'/g,'"'));for(let R in A)y[R]=0});let v={},b={},k={};if($("#luckysheet-filter-bycondition").next().is(":visible")&&$("#luckysheet-filter-byvalue").next().is(":hidden")&&$("#luckysheet-filter-selected span").data("value")!="null"){let T=$("#luckysheet-filter-selected span"),A=T.data("type"),R=T.data("value");if(k.value=R,k.text=T.text(),A=="0")k.type="0";else if(A=="2"){let I=$("#luckysheet-filter-menu .luckysheet-filter-selected-input2 input");k.type="2",k.value1=I.eq(0).val(),k.value2=I.eq(1).val()}else k.type="1",k.value1=$("#luckysheet-filter-menu .luckysheet-filter-selected-input").eq(0).find("input").val();for(let I=u+1;I<=f;I++){if(I in y||h.flowdata[I]==null)continue;let F=h.flowdata[I][d];if(R=="cellnull")F!=null&&!me(F.v)&&(b[I]=0);else if(R=="cellnonull")(F==null||me(F.v))&&(b[I]=0);else if(R=="textinclude"){let z=k.value1;(F==null||me(F.v)||F.m.indexOf(z)==-1)&&(b[I]=0)}else if(R=="textnotinclude"){let z=k.value1;F==null||me(F.v)||F.m.indexOf(z)>-1&&(b[I]=0)}else if(R=="textstart"){let z=k.value1,M=z.length;(F==null||me(F.v)||F.m.substr(0,M)!=z)&&(b[I]=0)}else if(R=="textend"){let z=k.value1,M=z.length;(F==null||me(F.v)||M>F.m.length||F.m.substr(F.m.length-M,M)!=z)&&(b[I]=0)}else if(R=="textequal"){let z=k.value1;(F==null||me(F.v)||F.m!=z)&&(b[I]=0)}else if(R=="dateequal"){let z=at(k.value1)[2];F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="d"?parseInt(F.v)!=z&&(b[I]=0):b[I]=0}else if(R=="datelessthan"){let z=at(k.value1)[2];F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="d"?parseInt(F.v)>=z&&(b[I]=0):b[I]=0}else if(R=="datemorethan"){let z=at(k.value1)[2];F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="d"?parseInt(F.v)<=z&&(b[I]=0):b[I]=0}else if(R=="morethan"){let z=parseFloat(k.value1);F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?F.v<=z&&(b[I]=0):b[I]=0}else if(R=="moreequalthan"){let z=parseFloat(k.value1);F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?F.v<z&&(b[I]=0):b[I]=0}else if(R=="lessthan"){let z=parseFloat(k.value1);F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?F.v>=z&&(b[I]=0):b[I]=0}else if(R=="lessequalthan"){let z=parseFloat(k.value1);F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?F.v>z&&(b[I]=0):b[I]=0}else if(R=="equal"){let z=parseFloat(k.value1);F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?F.v!=z&&(b[I]=0):b[I]=0}else if(R=="noequal"){let z=parseFloat(k.value1);F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?F.v==z&&(b[I]=0):b[I]=0}else if(R=="include"){let z=parseFloat(k.value1),M=parseFloat(k.value2),E,N;z<M?(E=z,N=M):(N=z,E=M),F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?(F.v<E||F.v>N)&&(b[I]=0):b[I]=0}else if(R=="noinclude"){let z=parseFloat(k.value1),M=parseFloat(k.value2),E,N;z<M?(E=z,N=M):(N=z,E=M),F==null||me(F.v)?b[I]=0:F.ct!=null&&F.ct.t=="n"?F.v>=E&&F.v<=N&&(b[I]=0):b[I]=0}}}else{$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").each(function(T,A){if($(A).is(":visible")&&$(A).is(":checked"))return!0;if($(A).closest(".day").length>0){let R=$(A).siblings("label").text();Number(R)<10&&(R="0"+Number(R));let I=$(A).closest(".monthBox").find(".month label").text().replace(t.filiterMonthText,"");Number(I)<10&&(I="0"+Number(I));let F=$(A).closest(".yearBox").find(".year label").text().replace(t.filiterYearText,""),z=t.filterDateFormatTip+"#$$$#"+F+"-"+I+"-"+R;v[z]="1"}if($(A).closest(".textBox").length>0){let R=$(A).closest(".textBox").data("filter");v[R]="1"}});for(let T=u+1;T<=f;T++){if(T in y||h.flowdata[T]==null)continue;let A=h.flowdata[T][d],R;if(A==null||me(A.v))R="null#$$$#null";else if(A.ct!=null&&A.ct.t=="d"){let I=mt("YYYY-MM-DD",A.v);R=t.filterDateFormatTip+"#$$$#"+I}else R=A.v+"#$$$#"+A.m;R in v&&(b[T]=0)}}let w=$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").eq(d-m),x=$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']:visible:checked").length<$("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']:visible").length||$("#luckysheet-filter-byvalue-input").val().length>0||$("#luckysheet-filter-bycondition").next().is(":visible")&&$("#luckysheet-filter-byvalue").next().is(":hidden")&&$("#luckysheet-filter-selected span").data("value")!="null",C=$.extend(!0,y,b),S=Hn.parseJsonParm(w.data("rowhidden"));Vn(w,x,b,k,!0,u,f,d,m,g);let _=$.extend(!0,{},h.config);if(_.rowhidden=C,h.clearjfundo){let T={};T.type="datachangeAll_filter",T.sheetIndex=h.currentSheetIndex,T.config=$.extend(!0,{},h.config),T.curconfig=_,T.optionstate=x,T.optionsindex=d-m,T.rowhidden=$.extend(!0,{},b),T.rowhidenPre=$.extend(!0,{},S),k!=null&&(T.caljs=k),h.jfundo.length=0,h.jfredo.push(T)}h.config=_,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,_.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(),rl()})}var kn=Ie(()=>{Nt();Jt();Ft();ll();mr();Zt();za();Gt();Qt();bt();Xe();il();gr();Oa();Ml();ft();Vr();Yt();ua();Ba();Al()});var Gs,Re,qr=Ie(()=>{Ol();Qt();pr();Gt();Ml();Nt();An();ft();Xe();bt();ll();Ll();Gs={imgItem:{type:"3",src:"",originWidth:null,originHeight:null,default:{width:null,height:null,left:null,top:null},crop:{width:null,height:null,offsetLeft:0,offsetTop:0},isFixedPos:!1,fixedLeft:null,fixedTop:null,border:{width:0,radius:0,style:"solid",color:"#000"}},images:null,currentImgId:null,currentWinW:null,currentWinH:null,resize:null,resizeXY:null,move:!1,moveXY:null,cropChange:null,cropChangeXY:null,cropChangeObj:null,copyImgItemObj:null,insertImg:function(e){let n=h.toJsonOptions&&h.toJsonOptions.uploadImage;if(typeof n=="function")n(e).then(t=>{Gs._insertImg(t)}).catch(t=>{U.info('<i class="fa fa-exclamation-triangle"></i>',"\u56FE\u7247\u4E0A\u4F20\u5931\u8D25")});else{let t=new FileReader;t.readAsDataURL(e),t.onload=function(l){let a=l.target.result;Gs._insertImg(a),$("#luckysheet-imgUpload").val("")}}},_insertImg:function(e){let n=this,t=h.luckysheet_select_save[h.luckysheet_select_save.length-1],l=t.row_focus||0,a=t.column_focus||0,o=a==0?0:h.visibledatacolumn[a-1],s=l==0?0:h.visibledatarow[l-1],u=new Image;u.onload=function(){let d=u.width,m=u.height,g={src:e,left:o,top:s,originWidth:d,originHeight:m};n.addImgItem(g)};let f=h.toJsonOptions&&h.toJsonOptions.imageUrlHandle;u.src=typeof f=="function"?f(e):e},generateRandomId:function(e){e==null&&(e="img");let n=window.navigator.userAgent.replace(/[^a-zA-Z0-9]/g,"").split(""),t="";for(let a=0;a<12;a++)t+=n[Math.round(Math.random()*(n.length-1))];let l=new Date().getTime();return e+"_"+t+"_"+l},modelHtml:function(e,n){let t=this,l=h.toJsonOptions&&h.toJsonOptions.imageUrlHandle,a=typeof l=="function"?l(n.src):n.src,o=t.getImgItemParam(n),s=o.width*h.zoomRatio,u=o.height*h.zoomRatio,f=o.left*h.zoomRatio,d=o.top*h.zoomRatio,m=o.position,g=n.border.width;return`<div id="${e}" class="luckysheet-modal-dialog luckysheet-modal-dialog-image" style="width:${s}px;height:${u}px;padding:0;position:${m};left:${f}px;top:${d}px;z-index:200;"> |
| | | <div class="luckysheet-modal-dialog-content" style="width:100%;height:100%;overflow:hidden;position:relative;"> |
| | | <img src="${a}" style="position:absolute;width:${n.default.width*h.zoomRatio}px;height:${n.default.height*h.zoomRatio}px;left:${-n.crop.offsetLeft*h.zoomRatio}px;top:${-n.crop.offsetTop*h.zoomRatio}px;" /> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div>`},sliderHtmlShow:function(){let e=this;$("#luckysheet-modal-dialog-slider-imageCtrl").remove();let n=e.getSliderHtml();$("body").append(n),zt();let t=e.images[e.currentImgId],l=t.type;$("#luckysheet-modal-dialog-slider-imageCtrl #imgItemType"+l).prop("checked",!0);let a=t.isFixedPos;$("#luckysheet-modal-dialog-slider-imageCtrl #imgItemIsFixedPos").prop("checked",a);let o=t.border;$("#luckysheet-modal-dialog-slider-imageCtrl #imgItemBorderWidth").val(o.width),$("#luckysheet-modal-dialog-slider-imageCtrl #imgItemBorderRadius").val(o.radius),$("#luckysheet-modal-dialog-slider-imageCtrl #imgItemBorderStyle").val(o.style),$("#luckysheet-modal-dialog-slider-imageCtrl #imgItemBorderColor span").css("background-color",o.color).attr("title",o.color),e.init()},colorSelectDialog:function(e){let n=Q(),t=n.button,l=n.toolbar,a=n.imageCtrl;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-imageCtrl-colorSelect-dialog").remove(),$("body").append(_e(ft,{id:"luckysheet-imageCtrl-colorSelect-dialog",addclass:"luckysheet-imageCtrl-colorSelect-dialog",title:a.borderTile,content:`<div class="currenColor"> |
| | | </div>`},sliderHtmlShow:function(){let e=this;$("#luckysheet-modal-dialog-slider-imageCtrl").remove();let n=e.getSliderHtml();$("body").append(n),zt();let t=e.images[e.currentImgId],l=t.type;$("#luckysheet-modal-dialog-slider-imageCtrl #imgItemType"+l).prop("checked",!0);let a=t.isFixedPos;$("#luckysheet-modal-dialog-slider-imageCtrl #imgItemIsFixedPos").prop("checked",a);let o=t.border;$("#luckysheet-modal-dialog-slider-imageCtrl #imgItemBorderWidth").val(o.width),$("#luckysheet-modal-dialog-slider-imageCtrl #imgItemBorderRadius").val(o.radius),$("#luckysheet-modal-dialog-slider-imageCtrl #imgItemBorderStyle").val(o.style),$("#luckysheet-modal-dialog-slider-imageCtrl #imgItemBorderColor span").css("background-color",o.color).attr("title",o.color),e.init()},colorSelectDialog:function(e){let n=Q(),t=n.button,l=n.toolbar,a=n.imageCtrl;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-imageCtrl-colorSelect-dialog").remove(),$("body").append(_e(dt,{id:"luckysheet-imageCtrl-colorSelect-dialog",addclass:"luckysheet-imageCtrl-colorSelect-dialog",title:a.borderTile,content:`<div class="currenColor"> |
| | | ${a.borderCur}:<span title="${e}" style="background-color:${e}"></span> |
| | | </div> |
| | | <div class="colorshowbox"></div>`,botton:`<button id="luckysheet-imageCtrl-colorSelect-dialog-confirm" class="btn btn-primary">${t.confirm}</button> |
| | | <button class="btn btn-default luckysheet-model-close-btn">${t.cancel}</button>`,style:"z-index:100003"}));let o=$("#luckysheet-imageCtrl-colorSelect-dialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),s=o.outerHeight(),u=o.outerWidth(),d=$(window).width(),f=$(window).height(),m=$(document).scrollLeft(),g=$(document).scrollTop();$("#luckysheet-imageCtrl-colorSelect-dialog").css({left:(d+m-u)/2,top:(f+g-s)/3}).show(),$("#luckysheet-imageCtrl-colorSelect-dialog").find(".colorshowbox").spectrum({showPalette:!0,showPaletteOnly:!0,preferredFormat:"hex",clickoutFiresChange:!1,showInitial:!0,showInput:!0,flat:!0,hideAfterPaletteSelect:!0,showSelectionPalette:!0,showButtons:!1,maxPaletteSize:8,maxSelectionSize:8,color:e,cancelText:t.cancel,chooseText:l.confirmColor,togglePaletteMoreText:l.customColor,togglePaletteLessText:l.collapse,togglePaletteOnly:!0,clearText:l.clearText,noColorSelectedText:l.noColorSelectedText,localStorageKey:"spectrum.textcolor"+ne.gridKey,palette:[["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]],move:function(y){y!=null?y=y.toHexString():y="#000",$("#luckysheet-imageCtrl-colorSelect-dialog .currenColor span").css("background-color",y).attr("title",y)}})},init:function(){let e=this;$("#luckysheet-modal-dialog-slider-imageCtrl .luckysheet-model-close-btn").click(function(){$("#luckysheet-modal-dialog-slider-imageCtrl").hide(),zt()}),$("#luckysheet-modal-dialog-slider-imageCtrl").off("change.radio").on("change.radio",".radio-item input[type=radio][name=imgItemType]",function(){e.configChange("type",this.value)}),$("#luckysheet-modal-dialog-slider-imageCtrl").off("change.checkbox").on("change.checkbox",".slider-box-checkbox input[type=checkbox]",function(){e.configChange("fixedPos",this.checked)}),$("#luckysheet-modal-dialog-slider-imageCtrl").off("change.borderWidth").on("change.borderWidth","#imgItemBorderWidth",function(){e.configChange("border-width",this.valueAsNumber)}),$("#luckysheet-modal-dialog-slider-imageCtrl").off("change.borderRadius").on("change.borderRadius","#imgItemBorderRadius",function(){e.configChange("border-radius",this.valueAsNumber)}),$("#luckysheet-modal-dialog-slider-imageCtrl").off("change.borderStyle").on("change.borderStyle","#imgItemBorderStyle",function(){e.configChange("border-style",this.value)}),$("#luckysheet-modal-dialog-slider-imageCtrl").off("click.color").on("click.color","#imgItemBorderColor",function(){let n=$(this).find("span").attr("title");e.colorSelectDialog(n)}),$(document).off("click.selectColorConfirm").on("click.selectColorConfirm","#luckysheet-imageCtrl-colorSelect-dialog-confirm",function(){let n=$(this).parents("#luckysheet-imageCtrl-colorSelect-dialog");$("#luckysheet-modal-dialog-mask").hide(),n.hide();let t=n.find(".currenColor span").attr("title");$("#luckysheet-modal-dialog-slider-imageCtrl #imgItemBorderColor span").css("background-color",t).attr("title",t),e.configChange("border-color",t)}),$("#luckysheet-image-showBoxs").off("mousedown.active").on("mousedown.active",".luckysheet-modal-dialog-image",function(n){if(!$t(h.currentSheetIndex,"editObjects",!1))return;$(this).hide();let t=$(this).attr("id");e.currentImgId!=null&&e.currentImgId!=t&&e.cancelActiveImgItem(),e.currentImgId=t;let l=e.images[t],a=e.getImgItemParam(l),o=a.width*h.zoomRatio,s=a.height*h.zoomRatio,u=a.left*h.zoomRatio,d=a.top*h.zoomRatio,f=a.position;$("#luckysheet-modal-dialog-activeImage").show().css({width:o,height:s,left:u,top:d,position:f});let m=h.toJsonOptions&&h.toJsonOptions.imageUrlHandle,g=typeof m=="function"?m(l.src):l.src;$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-content").css({"background-image":"url("+g+")","background-size":l.default.width*h.zoomRatio+"px "+l.default.height*h.zoomRatio+"px","background-position":-l.crop.offsetLeft*h.zoomRatio+"px "+-l.crop.offsetTop*h.zoomRatio+"px"}),$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-border").css({"border-width":l.border.width*h.zoomRatio,"border-style":l.border.style,"border-color":l.border.color,"border-radius":l.border.radius*h.zoomRatio,left:-l.border.width*h.zoomRatio,right:-l.border.width*h.zoomRatio,top:-l.border.width*h.zoomRatio,bottom:-l.border.width*h.zoomRatio}),e.sliderHtmlShow(),n.stopPropagation()}),$("#luckysheet-modal-dialog-activeImage").off("mousedown.move").on("mousedown.move",".luckysheet-modal-dialog-content",function(n){if(!$t(h.currentSheetIndex,"editObjects",!1))return;$("#luckysheet-modal-dialog-slider-imageCtrl").is(":visible")||e.sliderHtmlShow(),e.move=!0,e.currentWinW=$("#luckysheet-cell-main")[0].scrollWidth,e.currentWinH=$("#luckysheet-cell-main")[0].scrollHeight;let t=$("#luckysheet-modal-dialog-activeImage").offset();e.moveXY=[n.pageX-t.left,n.pageY-t.top],Qr(!0),n.stopPropagation()}),$("#luckysheet-modal-dialog-activeImage").off("mousedown.resize").on("mousedown.resize",".luckysheet-modal-dialog-resize-item",function(n){if(!$t(h.currentSheetIndex,"editObjects",!1))return;e.currentWinW=$("#luckysheet-cell-main")[0].scrollWidth,e.currentWinH=$("#luckysheet-cell-main")[0].scrollHeight,e.resize=$(this).data("type");let t=$("#luckysheet-cell-main").scrollTop(),l=$("#luckysheet-cell-main").scrollLeft(),a=nt(n.pageX,n.pageY),o=a[0]+l,s=a[1]+t,u=$("#luckysheet-modal-dialog-activeImage").position(),d=$("#luckysheet-modal-dialog-activeImage").width(),f=$("#luckysheet-modal-dialog-activeImage").height();e.resizeXY=[o,s,d,f,u.left+l,u.top+t,l,t],Qr(!0),n.stopPropagation()}),$("#luckysheet-modal-dialog-activeImage").off("mousedown.croppingEnter").on("mousedown.croppingEnter",".luckysheet-modal-controll-crop",function(n){e.croppingEnter(),n.stopPropagation()}),$("#luckysheet-modal-dialog-cropping").off("mousedown.croppingExit").on("mousedown.croppingExit",".luckysheet-modal-controll-crop",function(n){e.croppingExit(),n.stopPropagation()}),$("#luckysheet-modal-dialog-cropping").off("mousedown.cropChange").on("mousedown.cropChange",".resize-item",function(n){e.cropChange=$(this).data("type");let t=$("#luckysheet-cell-main").scrollTop(),l=$("#luckysheet-cell-main").scrollLeft(),a=nt(n.pageX,n.pageY),o=a[0]+l,s=a[1]+t;e.cropChangeXY=[o,s],Qr(!0),n.stopPropagation()}),$("#luckysheet-image-showBoxs").off("mousedown.restore").on("mousedown.restore",".luckysheet-modal-controll-restore",function(n){e.restoreImgItem(),n.stopPropagation()}),$("#luckysheet-image-showBoxs").off("mousedown.delete").on("mousedown.delete",".luckysheet-modal-controll-del",function(n){e.removeImgItem(),n.stopPropagation()})},configChange:function(e,n){let t=this,l=t.images[t.currentImgId];switch(e){case"type":l.type=n;break;case"fixedPos":l.isFixedPos=n;let a=t.getImgItemParam(l),o=a.width,s=a.height,u=a.left,d=a.top,f=a.position;$("#luckysheet-modal-dialog-activeImage").show().css({width:o,height:s,left:u,top:d,position:f});break;case"border-width":l.border.width=n,$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-border").css({"border-width":n,left:-n,right:-n,top:-n,bottom:-n});break;case"border-radius":l.border.radius=n,$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-border").css("border-radius",n);break;case"border-style":l.border.style=n,$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-border").css("border-style",n);break;case"border-color":l.border.color=n,$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-border").css("border-color",n);break}t.ref()},getImgItemParam(e){let n=e.isFixedPos,t=e.default.width,l=e.default.height,a=e.default.left,o=e.default.top;(e.crop.width!=t||e.crop.height!=l)&&(t=e.crop.width,l=e.crop.height,a+=e.crop.offsetLeft,o+=e.crop.offsetTop);let s="absolute";return n&&(s="fixed",a=e.fixedLeft+e.crop.offsetLeft,o=e.fixedTop+e.crop.offsetTop),{width:t,height:l,left:a,top:o,position:s}},cancelActiveImgItem:function(){let e=this;$("#luckysheet-modal-dialog-activeImage").hide(),$("#luckysheet-modal-dialog-cropping").hide(),$("#luckysheet-modal-dialog-slider-imageCtrl").hide();let n=e.images[e.currentImgId],t=e.getImgItemParam(n),l=t.width*h.zoomRatio,a=t.height*h.zoomRatio,o=t.left*h.zoomRatio,s=t.top*h.zoomRatio,u=t.position;$("#"+e.currentImgId).show().css({width:l,height:a,left:o,top:s,position:u}),$("#"+e.currentImgId+" img").css({width:n.default.width*h.zoomRatio,height:n.default.height*h.zoomRatio,left:-n.crop.offsetLeft*h.zoomRatio,top:-n.crop.offsetTop*h.zoomRatio}),$("#"+e.currentImgId+" .luckysheet-modal-dialog-border").css({"border-width":n.border.width*h.zoomRatio,"border-style":n.border.style,"border-color":n.border.color,"border-radius":n.border.radius*h.zoomRatio,left:-n.border.width*h.zoomRatio,right:-n.border.width*h.zoomRatio,top:-n.border.width*h.zoomRatio,bottom:-n.border.width*h.zoomRatio}),e.currentImgId=null},addImgItem:function(e){let n=this,t,l,a=400;e.originHeight<e.originWidth?(l=Math.round(e.originHeight*(a/e.originWidth)),t=a):(t=Math.round(e.originWidth*(a/e.originHeight)),l=a),n.images==null&&(n.images={});let o=$.extend(!0,{},n.imgItem);o.src=e.src,o.originWidth=e.originWidth,o.originHeight=e.originHeight,o.default.width=t,o.default.height=l,o.default.left=e.left,o.default.top=e.top,o.crop.width=t,o.crop.height=l;let s=$("#luckysheet-cell-main").scrollTop(),u=$("#luckysheet-cell-main").scrollLeft();o.fixedLeft=e.left-u+h.rowHeaderWidth,o.fixedTop=e.top-s+h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight;let d=n.generateRandomId(),f=n.modelHtml(d,o);$("#luckysheet-image-showBoxs .img-list").append(f),n.images[d]=o,n.ref(),n.init()},moveImgItem:function(){let e=this;e.move=!1;let n=$("#luckysheet-modal-dialog-activeImage")[0],t=e.images[e.currentImgId];t.isFixedPos?(t.fixedLeft=n.offsetLeft-t.crop.offsetLeft,t.fixedTop=n.offsetTop-t.crop.offsetTop):(t.default.left=n.offsetLeft-t.crop.offsetLeft,t.default.top=n.offsetTop-t.crop.offsetTop),e.ref()},resizeImgItem:function(){let e=this;e.resize=null;let n=$("#luckysheet-modal-dialog-activeImage")[0],t=e.images[e.currentImgId],l=n.clientWidth/t.crop.width,a=n.clientHeight/t.crop.height;t.default.width=Math.round(t.default.width*l),t.default.height=Math.round(t.default.height*a),t.crop.width=Math.round(t.crop.width*l),t.crop.height=Math.round(t.crop.height*a),t.crop.offsetLeft=Math.round(t.crop.offsetLeft*l),t.crop.offsetTop=Math.round(t.crop.offsetTop*a),t.isFixedPos?(t.fixedLeft=n.offsetLeft,t.fixedTop=n.offsetTop):(t.default.left=n.offsetLeft-t.crop.offsetLeft,t.default.top=n.offsetTop-t.crop.offsetTop),e.ref()},croppingEnter:function(){let e=this;if(e.cropping=!0,!$t(h.currentSheetIndex,"editObjects",!1))return;$("#luckysheet-modal-dialog-activeImage").hide(),$("#luckysheet-modal-dialog-slider-imageCtrl").hide();let n=e.images[e.currentImgId],t=e.getImgItemParam(n),l=t.width,a=t.height,o=t.left,s=t.top,u=t.position;$("#luckysheet-modal-dialog-cropping").show().css({width:l,height:a,left:o,top:s,position:u});let d=h.toJsonOptions&&h.toJsonOptions.imageUrlHandle,f=typeof d=="function"?d(n.src):n.src;$("#luckysheet-modal-dialog-cropping .cropping-mask").css({width:n.default.width,height:n.default.height,"background-image":"url("+f+")",left:-n.crop.offsetLeft,top:-n.crop.offsetTop}),$("#luckysheet-modal-dialog-cropping .cropping-content").css({"background-image":"url("+f+")","background-size":n.default.width+"px "+n.default.height+"px","background-position":-n.crop.offsetLeft+"px "+-n.crop.offsetTop+"px"}),$("#luckysheet-modal-dialog-cropping .luckysheet-modal-dialog-border").css({"border-width":n.border.width,"border-style":n.border.style,"border-color":n.border.color,"border-radius":n.border.radius,left:-n.border.width,right:-n.border.width,top:-n.border.width,bottom:-n.border.width})},croppingExit:function(){let e=this;e.cropping=!1,$("#luckysheet-modal-dialog-cropping").hide();let n=e.images[e.currentImgId],t=e.getImgItemParam(n),l=t.width,a=t.height,o=t.left,s=t.top,u=t.position;$("#luckysheet-modal-dialog-activeImage").show().css({width:l,height:a,left:o,top:s,position:u});let d=h.toJsonOptions&&h.toJsonOptions.imageUrlHandle,f=typeof d=="function"?d(n.src):n.src;$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-content").css({"background-image":"url("+f+")","background-size":n.default.width+"px "+n.default.height+"px","background-position":-n.crop.offsetLeft+"px "+-n.crop.offsetTop+"px"})},cropChangeImgItem:function(){let e=this;e.cropChange=null;let n=e.images[e.currentImgId];n.crop.width=e.cropChangeObj.width,n.crop.height=e.cropChangeObj.height,n.crop.offsetLeft=e.cropChangeObj.offsetLeft,n.crop.offsetTop=e.cropChangeObj.offsetTop,e.ref()},restoreImgItem:function(){let e=this,n=e.images[e.currentImgId];n.default.width=n.originWidth,n.default.height=n.originHeight,n.crop.width=n.originWidth,n.crop.height=n.originHeight,n.crop.offsetLeft=0,n.crop.offsetTop=0;let t=e.getImgItemParam(n),l=t.width,a=t.height,o=t.left,s=t.top,u=t.position;$("#luckysheet-modal-dialog-activeImage").show().css({width:l,height:a,left:o,top:s,position:u});let d=h.toJsonOptions&&h.toJsonOptions.imageUrlHandle,f=typeof d=="function"?d(n.src):n.src;$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-content").css({"background-image":"url("+f+")","background-size":n.default.width+"px "+n.default.height+"px","background-position":-n.crop.offsetLeft+"px "+-n.crop.offsetTop+"px"}),e.ref()},removeImgItem:function(){let e=this,n=e.images[e.currentImgId];!Je.createHookFunction("imageDeleteBefore",n)||($("#luckysheet-modal-dialog-activeImage").hide(),$("#luckysheet-modal-dialog-cropping").hide(),$("#luckysheet-modal-dialog-slider-imageCtrl").hide(),$("#"+e.currentImgId).remove(),delete e.images[e.currentImgId],e.currentImgId=null,Je.createHookFunction("imageDeleteAfter",n),e.ref())},copyImgItem:function(e){let n=this;n.copyImgItemObj=$.extend(!0,{},n.images[n.currentImgId]);let t=window.clipboardData;t||(t=e.originalEvent.clipboardData);let l='<table data-type="luckysheet_copy_action_image"><tr><td><td></tr></table>';if(t)return t.setData("Text",l),!1;{let a=$("#luckysheet-copy-content");a.html(l),a.focus(),a.select(),document.execCommand("selectAll"),document.execCommand("Copy"),setTimeout(function(){$("#luckysheet-copy-content").blur()},10)}},pasteImgItem:function(){let e=this;e.images==null&&(e.images={});let n=h.luckysheet_select_save[0].row_focus||0,t=h.luckysheet_select_save[0].column_focus||0,l=t==0?0:h.visibledatacolumn[t-1],a=n==0?0:h.visibledatarow[n-1],o=$.extend(!0,{},e.copyImgItemObj);o.default.left=l-o.crop.offsetLeft,o.default.top=a-o.crop.offsetTop;let s=$("#luckysheet-cell-main").scrollTop(),u=$("#luckysheet-cell-main").scrollLeft();o.fixedLeft=o.default.left-u+h.rowHeaderWidth,o.fixedTop=o.default.top-s+h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight;let d=e.generateRandomId(),f=e.modelHtml(d,o);$("#luckysheet-image-showBoxs .img-list").append(f),e.images[d]=o,e.ref(),e.init()},allImagesShow:function(){let e=this;if($("#luckysheet-modal-dialog-activeImage").hide(),$("#luckysheet-modal-dialog-cropping").hide(),$("#luckysheet-modal-dialog-slider-imageCtrl").hide(),$("#luckysheet-image-showBoxs .img-list").empty(),e.images!=null)for(let n in e.images){let t=e.images[n],l=e.modelHtml(n,t);$("#luckysheet-image-showBoxs .img-list").append(l)}},moveChangeSize:function(e,n,t){let l=this,a=$.extend(!0,{},l.images);if(e=="row"){let o=h.visibledatarow[n],s=n-1==-1?0:h.visibledatarow[n-1],u=t-(o-s-1);for(let d in a){let f=a[d],m=l.getImgItemParam(f),g=f.type;if(g=="1"){if(m.top>=o)f.default.top=m.top+u-f.crop.offsetTop;else if(m.top+m.height>=o-2)if(m.top<o+u){let y=(m.height+u)/m.height;f.default.height=Math.round(f.default.height*y),f.crop.height=Math.round(f.crop.height*y),f.crop.offsetTop=Math.round(f.crop.offsetTop*y)}else{let y=(m.top+m.height-o)/m.height;f.default.height=Math.round(f.default.height*y),f.crop.height=Math.round(f.crop.height*y),f.crop.offsetTop=Math.round(f.crop.offsetTop*y),f.default.top=o+u-f.crop.offsetTop}else if(m.top>o+u){let y=1/m.height;f.default.height=Math.round(f.default.height*y),f.crop.height=Math.round(f.crop.height*y),f.crop.offsetTop=Math.round(f.crop.offsetTop*y),f.default.top=o+u-f.crop.offsetTop}else if(m.top+m.height>o+u){let y=(o+u-m.top)/m.height;f.default.height=Math.round(f.default.height*y),f.crop.height=Math.round(f.crop.height*y),f.crop.offsetTop=Math.round(f.crop.offsetTop*y)}}else g=="2"&&(m.top>=o?f.default.top=m.top+u-f.crop.offsetTop:m.top>o+u&&(f.default.top=o+u-f.crop.offsetTop))}}else if(e=="column"){let o=h.visibledatacolumn[n],s=n-1==-1?0:h.visibledatacolumn[n-1],u=t-(o-s-1);for(let d in a){let f=a[d],m=l.getImgItemParam(f),g=f.type;if(g=="1"){if(m.left>=o)f.default.left=m.left+u-f.crop.offsetLeft;else if(m.left+m.width>=o-2)if(m.left<o+u){let y=(m.width+u)/m.width;f.default.width=Math.round(f.default.width*y),f.crop.width=Math.round(f.crop.width*y),f.crop.offsetLeft=Math.round(f.crop.offsetLeft*y)}else{let y=(m.left+m.width-o)/m.width;f.default.width=Math.round(f.default.width*y),f.crop.width=Math.round(f.crop.width*y),f.crop.offsetLeft=Math.round(f.crop.offsetLeft*y),f.default.left=o+u-f.crop.offsetLeft}else if(m.left>o+u){let y=1/m.width;f.default.width=Math.round(f.default.width*y),f.crop.width=Math.round(f.crop.width*y),f.crop.offsetLeft=Math.round(f.crop.offsetLeft*y),f.default.left=o+u-f.crop.offsetLeft}else if(m.left+m.width>o+u){let y=(o+u-m.left)/m.width;f.default.width=Math.round(f.default.width*y),f.crop.width=Math.round(f.crop.width*y),f.crop.offsetLeft=Math.round(f.crop.offsetLeft*y)}}else g=="2"&&(m.left>=o?f.default.left=m.left+u-f.crop.offsetLeft:m.left>o+u&&(f.default.left=o+u-f.crop.offsetLeft))}}return a},ref:function(){let e=this,n=h.luckysheetfile[Z(h.currentSheetIndex)],t=e.images;h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"imageCtrl",sheetIndex:h.currentSheetIndex,images:n.images==null?null:$.extend(!0,{},n.images),curImages:t})),n.images=$.extend(!0,{},t),ne.saveParam("all",h.currentSheetIndex,n.images,{k:"images"})}},Re=Gs});function Yy(e){var n=/^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/;if(n.test(e)){if(e.length==18){for(var t=new Array(7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2),l=new Array(1,0,10,9,8,7,6,5,4,3,2),a=0,o=0;o<17;o++)a+=e.substring(o,o+1)*t[o];var s=a%11,u=e.substring(17);return s==2?u=="X"||u=="x":u==l[s]}}else return!1}var Wy,Ye,yr=Ie(()=>{dt();Ut();Ft();Or();Yt();ll();$r();Kt();Jt();Gt();Zt();Qt();il();fl();Nt();bt();Xe();Wy={defaultItem:{type:"dropdown",type2:null,value1:"",value2:"",checked:!1,remote:!1,prohibitInput:!1,hintShow:!1,hintText:""},curItem:null,dataVerification:null,selectRange:[],selectStatus:!1,optionLabel:{number:"\u6570\u503C",number_integer:"\u6574\u6570",number_decimal:"\u5C0F\u6570",bw:"\u4ECB\u4E8E",nb:"\u4E0D\u4ECB\u4E8E",eq:"\u7B49\u4E8E",ne:"\u4E0D\u7B49\u4E8E",gt:"\u5927\u4E8E",lt:"\u5C0F\u4E8E",gte:"\u5927\u4E8E\u7B49\u4E8E",lte:"\u5C0F\u4E8E\u7B49\u4E8E",include:"\u5305\u62EC",exclude:"\u4E0D\u5305\u62EC",equal:"\u7B49\u4E8E",bf:"\u65E9\u4E8E",nbf:"\u4E0D\u65E9\u4E8E",af:"\u665A\u4E8E",naf:"\u4E0D\u665A\u4E8E",card:"\u8EAB\u4EFD\u8BC1\u53F7\u7801",phone:"\u624B\u673A\u53F7"},optionLabel_en:{number:"numeric",number_integer:"integer",number_decimal:"decimal",bw:"between",nb:"not between",eq:"equal to",ne:"not equal to",gt:"greater",lt:"less than",gte:"greater or equal to",lte:"less than or equal to",include:"include",exclude:"not include",equal:"equal to",bf:"earlier than",nbf:"not earlier than",af:"later than",naf:"not later than",card:"identification number",phone:"phone number"},createDialog:function(){let e=this,n=Q(),t=n.dataVerification,l=n.toolbar,a=n.button;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-dataVerification-dialog").remove();let o=`<div class="box"> |
| | | <button class="btn btn-default luckysheet-model-close-btn">${t.cancel}</button>`,style:"z-index:100003"}));let o=$("#luckysheet-imageCtrl-colorSelect-dialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),s=o.outerHeight(),u=o.outerWidth(),f=$(window).width(),d=$(window).height(),m=$(document).scrollLeft(),g=$(document).scrollTop();$("#luckysheet-imageCtrl-colorSelect-dialog").css({left:(f+m-u)/2,top:(d+g-s)/3}).show(),$("#luckysheet-imageCtrl-colorSelect-dialog").find(".colorshowbox").spectrum({showPalette:!0,showPaletteOnly:!0,preferredFormat:"hex",clickoutFiresChange:!1,showInitial:!0,showInput:!0,flat:!0,hideAfterPaletteSelect:!0,showSelectionPalette:!0,showButtons:!1,maxPaletteSize:8,maxSelectionSize:8,color:e,cancelText:t.cancel,chooseText:l.confirmColor,togglePaletteMoreText:l.customColor,togglePaletteLessText:l.collapse,togglePaletteOnly:!0,clearText:l.clearText,noColorSelectedText:l.noColorSelectedText,localStorageKey:"spectrum.textcolor"+ne.gridKey,palette:[["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]],move:function(y){y!=null?y=y.toHexString():y="#000",$("#luckysheet-imageCtrl-colorSelect-dialog .currenColor span").css("background-color",y).attr("title",y)}})},init:function(){let e=this;$("#luckysheet-modal-dialog-slider-imageCtrl .luckysheet-model-close-btn").click(function(){$("#luckysheet-modal-dialog-slider-imageCtrl").hide(),zt()}),$("#luckysheet-modal-dialog-slider-imageCtrl").off("change.radio").on("change.radio",".radio-item input[type=radio][name=imgItemType]",function(){e.configChange("type",this.value)}),$("#luckysheet-modal-dialog-slider-imageCtrl").off("change.checkbox").on("change.checkbox",".slider-box-checkbox input[type=checkbox]",function(){e.configChange("fixedPos",this.checked)}),$("#luckysheet-modal-dialog-slider-imageCtrl").off("change.borderWidth").on("change.borderWidth","#imgItemBorderWidth",function(){e.configChange("border-width",this.valueAsNumber)}),$("#luckysheet-modal-dialog-slider-imageCtrl").off("change.borderRadius").on("change.borderRadius","#imgItemBorderRadius",function(){e.configChange("border-radius",this.valueAsNumber)}),$("#luckysheet-modal-dialog-slider-imageCtrl").off("change.borderStyle").on("change.borderStyle","#imgItemBorderStyle",function(){e.configChange("border-style",this.value)}),$("#luckysheet-modal-dialog-slider-imageCtrl").off("click.color").on("click.color","#imgItemBorderColor",function(){let n=$(this).find("span").attr("title");e.colorSelectDialog(n)}),$(document).off("click.selectColorConfirm").on("click.selectColorConfirm","#luckysheet-imageCtrl-colorSelect-dialog-confirm",function(){let n=$(this).parents("#luckysheet-imageCtrl-colorSelect-dialog");$("#luckysheet-modal-dialog-mask").hide(),n.hide();let t=n.find(".currenColor span").attr("title");$("#luckysheet-modal-dialog-slider-imageCtrl #imgItemBorderColor span").css("background-color",t).attr("title",t),e.configChange("border-color",t)}),$("#luckysheet-image-showBoxs").off("mousedown.active").on("mousedown.active",".luckysheet-modal-dialog-image",function(n){if(!$t(h.currentSheetIndex,"editObjects",!1))return;$(this).hide();let t=$(this).attr("id");e.currentImgId!=null&&e.currentImgId!=t&&e.cancelActiveImgItem(),e.currentImgId=t;let l=e.images[t],a=e.getImgItemParam(l),o=a.width*h.zoomRatio,s=a.height*h.zoomRatio,u=a.left*h.zoomRatio,f=a.top*h.zoomRatio,d=a.position;$("#luckysheet-modal-dialog-activeImage").show().css({width:o,height:s,left:u,top:f,position:d});let m=h.toJsonOptions&&h.toJsonOptions.imageUrlHandle,g=typeof m=="function"?m(l.src):l.src;$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-content").css({"background-image":"url("+g+")","background-size":l.default.width*h.zoomRatio+"px "+l.default.height*h.zoomRatio+"px","background-position":-l.crop.offsetLeft*h.zoomRatio+"px "+-l.crop.offsetTop*h.zoomRatio+"px"}),$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-border").css({"border-width":l.border.width*h.zoomRatio,"border-style":l.border.style,"border-color":l.border.color,"border-radius":l.border.radius*h.zoomRatio,left:-l.border.width*h.zoomRatio,right:-l.border.width*h.zoomRatio,top:-l.border.width*h.zoomRatio,bottom:-l.border.width*h.zoomRatio}),e.sliderHtmlShow(),n.stopPropagation()}),$("#luckysheet-modal-dialog-activeImage").off("mousedown.move").on("mousedown.move",".luckysheet-modal-dialog-content",function(n){if(!$t(h.currentSheetIndex,"editObjects",!1))return;$("#luckysheet-modal-dialog-slider-imageCtrl").is(":visible")||e.sliderHtmlShow(),e.move=!0,e.currentWinW=$("#luckysheet-cell-main")[0].scrollWidth,e.currentWinH=$("#luckysheet-cell-main")[0].scrollHeight;let t=$("#luckysheet-modal-dialog-activeImage").offset();e.moveXY=[n.pageX-t.left,n.pageY-t.top],Qr(!0),n.stopPropagation()}),$("#luckysheet-modal-dialog-activeImage").off("mousedown.resize").on("mousedown.resize",".luckysheet-modal-dialog-resize-item",function(n){if(!$t(h.currentSheetIndex,"editObjects",!1))return;e.currentWinW=$("#luckysheet-cell-main")[0].scrollWidth,e.currentWinH=$("#luckysheet-cell-main")[0].scrollHeight,e.resize=$(this).data("type");let t=$("#luckysheet-cell-main").scrollTop(),l=$("#luckysheet-cell-main").scrollLeft(),a=nt(n.pageX,n.pageY),o=a[0]+l,s=a[1]+t,u=$("#luckysheet-modal-dialog-activeImage").position(),f=$("#luckysheet-modal-dialog-activeImage").width(),d=$("#luckysheet-modal-dialog-activeImage").height();e.resizeXY=[o,s,f,d,u.left+l,u.top+t,l,t],Qr(!0),n.stopPropagation()}),$("#luckysheet-modal-dialog-activeImage").off("mousedown.croppingEnter").on("mousedown.croppingEnter",".luckysheet-modal-controll-crop",function(n){e.croppingEnter(),n.stopPropagation()}),$("#luckysheet-modal-dialog-cropping").off("mousedown.croppingExit").on("mousedown.croppingExit",".luckysheet-modal-controll-crop",function(n){e.croppingExit(),n.stopPropagation()}),$("#luckysheet-modal-dialog-cropping").off("mousedown.cropChange").on("mousedown.cropChange",".resize-item",function(n){e.cropChange=$(this).data("type");let t=$("#luckysheet-cell-main").scrollTop(),l=$("#luckysheet-cell-main").scrollLeft(),a=nt(n.pageX,n.pageY),o=a[0]+l,s=a[1]+t;e.cropChangeXY=[o,s],Qr(!0),n.stopPropagation()}),$("#luckysheet-image-showBoxs").off("mousedown.restore").on("mousedown.restore",".luckysheet-modal-controll-restore",function(n){e.restoreImgItem(),n.stopPropagation()}),$("#luckysheet-image-showBoxs").off("mousedown.delete").on("mousedown.delete",".luckysheet-modal-controll-del",function(n){e.removeImgItem(),n.stopPropagation()})},configChange:function(e,n){let t=this,l=t.images[t.currentImgId];switch(e){case"type":l.type=n;break;case"fixedPos":l.isFixedPos=n;let a=t.getImgItemParam(l),o=a.width,s=a.height,u=a.left,f=a.top,d=a.position;$("#luckysheet-modal-dialog-activeImage").show().css({width:o,height:s,left:u,top:f,position:d});break;case"border-width":l.border.width=n,$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-border").css({"border-width":n,left:-n,right:-n,top:-n,bottom:-n});break;case"border-radius":l.border.radius=n,$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-border").css("border-radius",n);break;case"border-style":l.border.style=n,$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-border").css("border-style",n);break;case"border-color":l.border.color=n,$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-border").css("border-color",n);break}t.ref()},getImgItemParam(e){let n=e.isFixedPos,t=e.default.width,l=e.default.height,a=e.default.left,o=e.default.top;(e.crop.width!=t||e.crop.height!=l)&&(t=e.crop.width,l=e.crop.height,a+=e.crop.offsetLeft,o+=e.crop.offsetTop);let s="absolute";return n&&(s="fixed",a=e.fixedLeft+e.crop.offsetLeft,o=e.fixedTop+e.crop.offsetTop),{width:t,height:l,left:a,top:o,position:s}},cancelActiveImgItem:function(){let e=this;$("#luckysheet-modal-dialog-activeImage").hide(),$("#luckysheet-modal-dialog-cropping").hide(),$("#luckysheet-modal-dialog-slider-imageCtrl").hide();let n=e.images[e.currentImgId],t=e.getImgItemParam(n),l=t.width*h.zoomRatio,a=t.height*h.zoomRatio,o=t.left*h.zoomRatio,s=t.top*h.zoomRatio,u=t.position;$("#"+e.currentImgId).show().css({width:l,height:a,left:o,top:s,position:u}),$("#"+e.currentImgId+" img").css({width:n.default.width*h.zoomRatio,height:n.default.height*h.zoomRatio,left:-n.crop.offsetLeft*h.zoomRatio,top:-n.crop.offsetTop*h.zoomRatio}),$("#"+e.currentImgId+" .luckysheet-modal-dialog-border").css({"border-width":n.border.width*h.zoomRatio,"border-style":n.border.style,"border-color":n.border.color,"border-radius":n.border.radius*h.zoomRatio,left:-n.border.width*h.zoomRatio,right:-n.border.width*h.zoomRatio,top:-n.border.width*h.zoomRatio,bottom:-n.border.width*h.zoomRatio}),e.currentImgId=null},addImgItem:function(e){let n=this,t,l,a=400;e.originHeight<e.originWidth?(l=Math.round(e.originHeight*(a/e.originWidth)),t=a):(t=Math.round(e.originWidth*(a/e.originHeight)),l=a),n.images==null&&(n.images={});let o=$.extend(!0,{},n.imgItem);o.src=e.src,o.originWidth=e.originWidth,o.originHeight=e.originHeight,o.default.width=t,o.default.height=l,o.default.left=e.left,o.default.top=e.top,o.crop.width=t,o.crop.height=l;let s=$("#luckysheet-cell-main").scrollTop(),u=$("#luckysheet-cell-main").scrollLeft();o.fixedLeft=e.left-u+h.rowHeaderWidth,o.fixedTop=e.top-s+h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight;let f=n.generateRandomId(),d=n.modelHtml(f,o);$("#luckysheet-image-showBoxs .img-list").append(d),n.images[f]=o,n.ref(),n.init()},moveImgItem:function(){let e=this;e.move=!1;let n=$("#luckysheet-modal-dialog-activeImage")[0],t=e.images[e.currentImgId];t.isFixedPos?(t.fixedLeft=n.offsetLeft-t.crop.offsetLeft,t.fixedTop=n.offsetTop-t.crop.offsetTop):(t.default.left=n.offsetLeft-t.crop.offsetLeft,t.default.top=n.offsetTop-t.crop.offsetTop),e.ref()},resizeImgItem:function(){let e=this;e.resize=null;let n=$("#luckysheet-modal-dialog-activeImage")[0],t=e.images[e.currentImgId],l=n.clientWidth/t.crop.width,a=n.clientHeight/t.crop.height;t.default.width=Math.round(t.default.width*l),t.default.height=Math.round(t.default.height*a),t.crop.width=Math.round(t.crop.width*l),t.crop.height=Math.round(t.crop.height*a),t.crop.offsetLeft=Math.round(t.crop.offsetLeft*l),t.crop.offsetTop=Math.round(t.crop.offsetTop*a),t.isFixedPos?(t.fixedLeft=n.offsetLeft,t.fixedTop=n.offsetTop):(t.default.left=n.offsetLeft-t.crop.offsetLeft,t.default.top=n.offsetTop-t.crop.offsetTop),e.ref()},croppingEnter:function(){let e=this;if(e.cropping=!0,!$t(h.currentSheetIndex,"editObjects",!1))return;$("#luckysheet-modal-dialog-activeImage").hide(),$("#luckysheet-modal-dialog-slider-imageCtrl").hide();let n=e.images[e.currentImgId],t=e.getImgItemParam(n),l=t.width,a=t.height,o=t.left,s=t.top,u=t.position;$("#luckysheet-modal-dialog-cropping").show().css({width:l,height:a,left:o,top:s,position:u});let f=h.toJsonOptions&&h.toJsonOptions.imageUrlHandle,d=typeof f=="function"?f(n.src):n.src;$("#luckysheet-modal-dialog-cropping .cropping-mask").css({width:n.default.width,height:n.default.height,"background-image":"url("+d+")",left:-n.crop.offsetLeft,top:-n.crop.offsetTop}),$("#luckysheet-modal-dialog-cropping .cropping-content").css({"background-image":"url("+d+")","background-size":n.default.width+"px "+n.default.height+"px","background-position":-n.crop.offsetLeft+"px "+-n.crop.offsetTop+"px"}),$("#luckysheet-modal-dialog-cropping .luckysheet-modal-dialog-border").css({"border-width":n.border.width,"border-style":n.border.style,"border-color":n.border.color,"border-radius":n.border.radius,left:-n.border.width,right:-n.border.width,top:-n.border.width,bottom:-n.border.width})},croppingExit:function(){let e=this;e.cropping=!1,$("#luckysheet-modal-dialog-cropping").hide();let n=e.images[e.currentImgId],t=e.getImgItemParam(n),l=t.width,a=t.height,o=t.left,s=t.top,u=t.position;$("#luckysheet-modal-dialog-activeImage").show().css({width:l,height:a,left:o,top:s,position:u});let f=h.toJsonOptions&&h.toJsonOptions.imageUrlHandle,d=typeof f=="function"?f(n.src):n.src;$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-content").css({"background-image":"url("+d+")","background-size":n.default.width+"px "+n.default.height+"px","background-position":-n.crop.offsetLeft+"px "+-n.crop.offsetTop+"px"})},cropChangeImgItem:function(){let e=this;e.cropChange=null;let n=e.images[e.currentImgId];n.crop.width=e.cropChangeObj.width,n.crop.height=e.cropChangeObj.height,n.crop.offsetLeft=e.cropChangeObj.offsetLeft,n.crop.offsetTop=e.cropChangeObj.offsetTop,e.ref()},restoreImgItem:function(){let e=this,n=e.images[e.currentImgId];n.default.width=n.originWidth,n.default.height=n.originHeight,n.crop.width=n.originWidth,n.crop.height=n.originHeight,n.crop.offsetLeft=0,n.crop.offsetTop=0;let t=e.getImgItemParam(n),l=t.width,a=t.height,o=t.left,s=t.top,u=t.position;$("#luckysheet-modal-dialog-activeImage").show().css({width:l,height:a,left:o,top:s,position:u});let f=h.toJsonOptions&&h.toJsonOptions.imageUrlHandle,d=typeof f=="function"?f(n.src):n.src;$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-content").css({"background-image":"url("+d+")","background-size":n.default.width+"px "+n.default.height+"px","background-position":-n.crop.offsetLeft+"px "+-n.crop.offsetTop+"px"}),e.ref()},removeImgItem:function(){let e=this,n=e.images[e.currentImgId];!Je.createHookFunction("imageDeleteBefore",n)||($("#luckysheet-modal-dialog-activeImage").hide(),$("#luckysheet-modal-dialog-cropping").hide(),$("#luckysheet-modal-dialog-slider-imageCtrl").hide(),$("#"+e.currentImgId).remove(),delete e.images[e.currentImgId],e.currentImgId=null,Je.createHookFunction("imageDeleteAfter",n),e.ref())},copyImgItem:function(e){let n=this;n.copyImgItemObj=$.extend(!0,{},n.images[n.currentImgId]);let t=window.clipboardData;t||(t=e.originalEvent.clipboardData);let l='<table data-type="luckysheet_copy_action_image"><tr><td><td></tr></table>';if(t)return t.setData("Text",l),!1;{let a=$("#luckysheet-copy-content");a.html(l),a.focus(),a.select(),document.execCommand("selectAll"),document.execCommand("Copy"),setTimeout(function(){$("#luckysheet-copy-content").blur()},10)}},pasteImgItem:function(){let e=this;e.images==null&&(e.images={});let n=h.luckysheet_select_save[0].row_focus||0,t=h.luckysheet_select_save[0].column_focus||0,l=t==0?0:h.visibledatacolumn[t-1],a=n==0?0:h.visibledatarow[n-1],o=$.extend(!0,{},e.copyImgItemObj);o.default.left=l-o.crop.offsetLeft,o.default.top=a-o.crop.offsetTop;let s=$("#luckysheet-cell-main").scrollTop(),u=$("#luckysheet-cell-main").scrollLeft();o.fixedLeft=o.default.left-u+h.rowHeaderWidth,o.fixedTop=o.default.top-s+h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight;let f=e.generateRandomId(),d=e.modelHtml(f,o);$("#luckysheet-image-showBoxs .img-list").append(d),e.images[f]=o,e.ref(),e.init()},allImagesShow:function(){let e=this;if($("#luckysheet-modal-dialog-activeImage").hide(),$("#luckysheet-modal-dialog-cropping").hide(),$("#luckysheet-modal-dialog-slider-imageCtrl").hide(),$("#luckysheet-image-showBoxs .img-list").empty(),e.images!=null)for(let n in e.images){let t=e.images[n],l=e.modelHtml(n,t);$("#luckysheet-image-showBoxs .img-list").append(l)}},moveChangeSize:function(e,n,t){let l=this,a=$.extend(!0,{},l.images);if(e=="row"){let o=h.visibledatarow[n],s=n-1==-1?0:h.visibledatarow[n-1],u=t-(o-s-1);for(let f in a){let d=a[f],m=l.getImgItemParam(d),g=d.type;if(g=="1"){if(m.top>=o)d.default.top=m.top+u-d.crop.offsetTop;else if(m.top+m.height>=o-2)if(m.top<o+u){let y=(m.height+u)/m.height;d.default.height=Math.round(d.default.height*y),d.crop.height=Math.round(d.crop.height*y),d.crop.offsetTop=Math.round(d.crop.offsetTop*y)}else{let y=(m.top+m.height-o)/m.height;d.default.height=Math.round(d.default.height*y),d.crop.height=Math.round(d.crop.height*y),d.crop.offsetTop=Math.round(d.crop.offsetTop*y),d.default.top=o+u-d.crop.offsetTop}else if(m.top>o+u){let y=1/m.height;d.default.height=Math.round(d.default.height*y),d.crop.height=Math.round(d.crop.height*y),d.crop.offsetTop=Math.round(d.crop.offsetTop*y),d.default.top=o+u-d.crop.offsetTop}else if(m.top+m.height>o+u){let y=(o+u-m.top)/m.height;d.default.height=Math.round(d.default.height*y),d.crop.height=Math.round(d.crop.height*y),d.crop.offsetTop=Math.round(d.crop.offsetTop*y)}}else g=="2"&&(m.top>=o?d.default.top=m.top+u-d.crop.offsetTop:m.top>o+u&&(d.default.top=o+u-d.crop.offsetTop))}}else if(e=="column"){let o=h.visibledatacolumn[n],s=n-1==-1?0:h.visibledatacolumn[n-1],u=t-(o-s-1);for(let f in a){let d=a[f],m=l.getImgItemParam(d),g=d.type;if(g=="1"){if(m.left>=o)d.default.left=m.left+u-d.crop.offsetLeft;else if(m.left+m.width>=o-2)if(m.left<o+u){let y=(m.width+u)/m.width;d.default.width=Math.round(d.default.width*y),d.crop.width=Math.round(d.crop.width*y),d.crop.offsetLeft=Math.round(d.crop.offsetLeft*y)}else{let y=(m.left+m.width-o)/m.width;d.default.width=Math.round(d.default.width*y),d.crop.width=Math.round(d.crop.width*y),d.crop.offsetLeft=Math.round(d.crop.offsetLeft*y),d.default.left=o+u-d.crop.offsetLeft}else if(m.left>o+u){let y=1/m.width;d.default.width=Math.round(d.default.width*y),d.crop.width=Math.round(d.crop.width*y),d.crop.offsetLeft=Math.round(d.crop.offsetLeft*y),d.default.left=o+u-d.crop.offsetLeft}else if(m.left+m.width>o+u){let y=(o+u-m.left)/m.width;d.default.width=Math.round(d.default.width*y),d.crop.width=Math.round(d.crop.width*y),d.crop.offsetLeft=Math.round(d.crop.offsetLeft*y)}}else g=="2"&&(m.left>=o?d.default.left=m.left+u-d.crop.offsetLeft:m.left>o+u&&(d.default.left=o+u-d.crop.offsetLeft))}}return a},ref:function(){let e=this,n=h.luckysheetfile[Z(h.currentSheetIndex)],t=e.images;h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"imageCtrl",sheetIndex:h.currentSheetIndex,images:n.images==null?null:$.extend(!0,{},n.images),curImages:t})),n.images=$.extend(!0,{},t),ne.saveParam("all",h.currentSheetIndex,n.images,{k:"images"})}},Re=Gs});function Yy(e){var n=/^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/;if(n.test(e)){if(e.length==18){for(var t=new Array(7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2),l=new Array(1,0,10,9,8,7,6,5,4,3,2),a=0,o=0;o<17;o++)a+=e.substring(o,o+1)*t[o];var s=a%11,u=e.substring(17);return s==2?u=="X"||u=="x":u==l[s]}}else return!1}var Wy,Ye,yr=Ie(()=>{ft();Ut();Ft();Or();Yt();ll();$r();Kt();Jt();Gt();Zt();Qt();il();dl();Nt();bt();Xe();Wy={defaultItem:{type:"dropdown",type2:null,value1:"",value2:"",checked:!1,remote:!1,prohibitInput:!1,hintShow:!1,hintText:""},curItem:null,dataVerification:null,selectRange:[],selectStatus:!1,optionLabel:{number:"\u6570\u503C",number_integer:"\u6574\u6570",number_decimal:"\u5C0F\u6570",bw:"\u4ECB\u4E8E",nb:"\u4E0D\u4ECB\u4E8E",eq:"\u7B49\u4E8E",ne:"\u4E0D\u7B49\u4E8E",gt:"\u5927\u4E8E",lt:"\u5C0F\u4E8E",gte:"\u5927\u4E8E\u7B49\u4E8E",lte:"\u5C0F\u4E8E\u7B49\u4E8E",include:"\u5305\u62EC",exclude:"\u4E0D\u5305\u62EC",equal:"\u7B49\u4E8E",bf:"\u65E9\u4E8E",nbf:"\u4E0D\u65E9\u4E8E",af:"\u665A\u4E8E",naf:"\u4E0D\u665A\u4E8E",card:"\u8EAB\u4EFD\u8BC1\u53F7\u7801",phone:"\u624B\u673A\u53F7"},optionLabel_en:{number:"numeric",number_integer:"integer",number_decimal:"decimal",bw:"between",nb:"not between",eq:"equal to",ne:"not equal to",gt:"greater",lt:"less than",gte:"greater or equal to",lte:"less than or equal to",include:"include",exclude:"not include",equal:"equal to",bf:"earlier than",nbf:"not earlier than",af:"later than",naf:"not later than",card:"identification number",phone:"phone number"},createDialog:function(){let e=this,n=Q(),t=n.dataVerification,l=n.toolbar,a=n.button;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-dataVerification-dialog").remove();let o=`<div class="box"> |
| | | <div class="box-item" style="border-top:1px solid #E1E4E8;"> |
| | | <div class="box-item-title">${t.cellRange}</div> |
| | | <div id="data-verification-range" class="range"> |
| | |
| | | <input type="text" placeholder="${t.placeholder5}"> |
| | | </div> |
| | | </div> |
| | | </div>`;$("body").append(_e(ft,{id:"luckysheet-dataVerification-dialog",addclass:"luckysheet-dataVerification-dialog",title:l.dataVerification,content:o,botton:`<button id="luckysheet-dataVerification-dialog-confirm" class="btn btn-primary">${a.confirm}</button> |
| | | </div>`;$("body").append(_e(dt,{id:"luckysheet-dataVerification-dialog",addclass:"luckysheet-dataVerification-dialog",title:l.dataVerification,content:o,botton:`<button id="luckysheet-dataVerification-dialog-confirm" class="btn btn-primary">${a.confirm}</button> |
| | | <button id="luckysheet-dataVerification-dialog-delete" class="btn btn-default">${t.deleteVerification}</button> |
| | | <button class="btn btn-default luckysheet-model-close-btn">${a.cancel}</button>`,style:"z-index:100003"}));let s=$("#luckysheet-dataVerification-dialog").find(".luckysheet-modal-dialog-content").css("min-width",350).end(),u=s.outerHeight(),d=s.outerWidth(),f=$(window).width(),m=$(window).height(),g=$(document).scrollLeft(),y=$(document).scrollTop();$("#luckysheet-dataVerification-dialog").css({left:(f+g-d)/2,top:(m+y-u)/3}).show(),e.dataAllocation()},init:function(){let e=this,n=Q().dataVerification;$(document).off("click.dropdownBtn").on("click.dropdownBtn","#luckysheet-dataVerification-dropdown-btn",function(t){e.dropdownListShow(),t.stopPropagation()}),$(document).off("click.dropdownListItem").on("click.dropdownListItem","#luckysheet-dataVerification-dropdown-List .dropdown-List-item",function(t){var l=$(this);let a=t.target.innerText;l.hasClass("multi")?(l.toggleClass("checked"),a=$.map($("#luckysheet-dataVerification-dropdown-List").children().filter(".checked"),function(d){return d.innerText}).join(",")):$("#luckysheet-dataVerification-dropdown-List").hide();let o=h.luckysheet_select_save[h.luckysheet_select_save.length-1],s=o.row_focus,u=o.column_focus;$("#luckysheet-rich-text-editor").text(a),p.updatecell(s,u),t.stopPropagation()}),$(document).off("click.dvRange").on("click.dvRange","#data-verification-range .fa-table",function(t){$("#luckysheet-dataVerification-dialog").hide();let l="0",a=$(this).siblings("input").val().trim();e.rangeDialog(l,a),e.selectRange=[];let o=e.getRangeByTxt(a);if(p.rangetosheet=h.currentSheetIndex,o[0].sheetIndex!=h.currentSheetIndex&&ve.changeSheetExec(o[0].sheetIndex),o.length>0)for(let s=0;s<o.length;s++){let u=o[s].row[0],d=o[s].row[1],f=o[s].column[0],m=o[s].column[1],g=h.visibledatarow[d],y=u-1==-1?0:h.visibledatarow[u-1],v=h.visibledatacolumn[m],b=f-1==-1?0:h.visibledatacolumn[f-1];e.selectRange.push({left:b,width:v-b-1,top:y,height:g-y-1,left_move:b,width_move:v-b-1,top_move:y,height_move:g-y-1,row:[u,d],column:[f,m],row_focus:u,column_focus:f})}Ot(e.selectRange)}),$(document).off("click.dvRange2").on("click.dvRange2","#luckysheet-dataVerification-dialog .show-box-item-dropdown .range .fa-table",function(t){$("#luckysheet-dataVerification-dialog").hide();let l="1",a=$(this).siblings("input").val().trim();e.rangeDialog(l,a),e.selectRange=[];let o=e.getRangeByTxt(a);if(p.rangetosheet=h.currentSheetIndex,o[0].sheetIndex!=h.currentSheetIndex&&ve.changeSheetExec(o[0].sheetIndex),o.length>0)for(let s=0;s<o.length;s++){let u=o[s].row[0],d=o[s].row[1],f=o[s].column[0],m=o[s].column[1],g=h.visibledatarow[d],y=u-1==-1?0:h.visibledatarow[u-1],v=h.visibledatacolumn[m],b=f-1==-1?0:h.visibledatacolumn[f-1];e.selectRange.push({left:b,width:v-b-1,top:y,height:g-y-1,left_move:b,width_move:v-b-1,top_move:y,height_move:g-y-1,row:[u,d],column:[f,m],row_focus:u,column_focus:f})}Ot(e.selectRange)}),$(document).off("click.dvRangeConfirm").on("click.dvRangeConfirm","#luckysheet-dataVerificationRange-dialog-confirm",function(t){let l=$(this).attr("data-source"),a=$(this).parents("#luckysheet-dataVerificationRange-dialog").find("input").val();if(e.getRangeByTxt(a).length>1){U.info('<i class="fa fa-exclamation-triangle"></i>',"\u4E0D\u80FD\u5BF9\u591A\u91CD\u9009\u62E9\u533A\u57DF\u6267\u884C\u6B64\u64CD\u4F5C\uFF0C\u8BF7\u9009\u62E9\u5355\u4E2A\u533A\u57DF\uFF0C\u7136\u540E\u518D\u8BD5");return}l=="0"?$("#luckysheet-dataVerification-dialog #data-verification-range input").val(a):l=="1"&&$("#luckysheet-dataVerification-dialog .show-box-item-dropdown .range input").val(a),$("#luckysheet-dataVerificationRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-dataVerification-dialog").show(),p.rangetosheet!=null&&p.rangetosheet!=h.currentSheetIndex&&(ve.changeSheetExec(p.rangetosheet),p.rangetosheet=null),Ot([])}),$(document).off("click.dvRangeClose").on("click.dvRangeClose","#luckysheet-dataVerificationRange-dialog-close",function(t){$("#luckysheet-dataVerificationRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-dataVerification-dialog").show(),p.rangetosheet!=null&&p.rangetosheet!=h.currentSheetIndex&&(ve.changeSheetExec(p.rangetosheet),p.rangetosheet=null),Ot([])}),$(document).on("click","#luckysheet-dataVerificationRange-dialog .luckysheet-modal-dialog-title-close",function(t){$("#luckysheet-dataVerificationRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-dataVerification-dialog").show(),p.rangetosheet!=null&&p.rangetosheet!=h.currentSheetIndex&&(ve.changeSheetExec(p.rangetosheet),p.rangetosheet=null),Ot([])}),$(document).off("change.typeSelect").on("change.typeSelect","#data-verification-type-select",function(t){$("#luckysheet-dataVerification-dialog .show-box .show-box-item").hide();let l=this.value,a=e.curItem;if(l=="dropdown"){$("#luckysheet-dataVerification-dialog .show-box .show-box-item-dropdown").show();let o="";l==a.type&&(o=a.value1),$("#luckysheet-dataVerification-dialog .show-box-item-dropdown .data-verification-value1").val(o),$("#luckysheet-dataVerification-dialog #data-verification-multi").prop("checked",!!a.type2)}else if(l=="checkbox"){$("#luckysheet-dataVerification-dialog .show-box .show-box-item-checkbox").show();let o="",s="";l==a.type&&(o=a.value1,s=a.value2),$("#luckysheet-dataVerification-dialog .show-box-item-checkbox .data-verification-value1").val(o),$("#luckysheet-dataVerification-dialog .show-box-item-checkbox .data-verification-value2").val(s)}else if(l=="number"||l=="number_integer"||l=="number_decimal"){$("#luckysheet-dataVerification-dialog .show-box-item-number").show(),$("#luckysheet-dataVerification-dialog .show-box-item-number .input").hide();let o="bw",s="",u="";(a.type=="number"||a.type=="number_integer"||a.type=="number_decimal")&&(o=a.type2,s=a.value1,u=a.value2),$("#luckysheet-dataVerification-dialog #data-verification-number-select").val(o),o=="bw"||o=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-number .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-number .input2").show(),$("#luckysheet-dataVerification-dialog .show-box-item-number .data-verification-value1").val(s),$("#luckysheet-dataVerification-dialog .show-box-item-number .data-verification-value2").val(u)}else if(l=="text_content"){$("#luckysheet-dataVerification-dialog .show-box-item-text").show();let o="include",s="";l==a.type&&(o=a.type2,s=a.value1),$("#luckysheet-dataVerification-dialog #data-verification-text-select").val(o),$("#luckysheet-dataVerification-dialog .show-box-item-text .data-verification-value1").val(s)}else if(l=="text_length"){$("#luckysheet-dataVerification-dialog .show-box-item-textLength").show(),$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input").hide();let o="bw",s="",u="";l==a.type&&(o=a.type2,s=a.value1,u=a.value2),$("#luckysheet-dataVerification-dialog #data-verification-textLength-select").val(o),o=="bw"||o=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input2").show(),$("#luckysheet-dataVerification-dialog .show-box-item-textLength .data-verification-value1").val(s),$("#luckysheet-dataVerification-dialog .show-box-item-textLength .data-verification-value2").val(u)}else if(l=="date"){$("#luckysheet-dataVerification-dialog .show-box-item-date").show(),$("#luckysheet-dataVerification-dialog .show-box-item-date .input").hide();let o="bw",s="",u="";l==a.type&&(o=a.type2,s=a.value1,u=a.value2),$("#luckysheet-dataVerification-dialog #data-verification-date-select").val(o),o=="bw"||o=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-date .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-date .input2").show(),$("#luckysheet-dataVerification-dialog .show-box-item-date .data-verification-value1").val(s),$("#luckysheet-dataVerification-dialog .show-box-item-date .data-verification-value2").val(u)}else if(l=="validity"){$("#luckysheet-dataVerification-dialog .show-box .show-box-item-validity").show();let o="card";l==a.type&&(o=a.type2),$("#luckysheet-dataVerification-dialog #data-verification-validity-select").val(o)}}),$(document).off("change.numberSelect").on("change.numberSelect","#data-verification-number-select",function(t){$("#luckysheet-dataVerification-dialog .show-box-item-number .input").hide();let l=this.value;l=="bw"||l=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-number .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-number .input2").show()}),$(document).off("change.textLengthSelect").on("change.textLengthSelect","#data-verification-textLength-select",function(t){$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input").hide();let l=this.value;l=="bw"||l=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input2").show()}),$(document).off("change.dateSelect").on("change.dateSelect","#data-verification-date-select",function(t){$("#luckysheet-dataVerification-dialog .show-box-item-date .input").hide();let l=this.value;l=="bw"||l=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-date .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-date .input2").show()}),$(document).off("change.hintShow").on("change.hintShow","#data-verification-hint-show",function(t){this.checked?$("#luckysheet-dataVerification-dialog .data-verification-hint-text").show():$("#luckysheet-dataVerification-dialog .data-verification-hint-text").hide()}),$(document).off("click.dvSaveConfirm").on("click.dvSaveConfirm","#luckysheet-dataVerification-dialog-confirm",function(t){let l=$("#luckysheet-dataVerification-dialog #data-verification-range input").val().trim(),a=e.getRangeByTxt(l);if(a.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.selectCellRange2);return}let o=a[a.length-1].row[0],s=a[a.length-1].row[1],u=a[a.length-1].column[0],d=a[a.length-1].column[1],f=xe.deepCopyFlowData(h.flowdata);o<0&&(o=0),s>f.length-1&&(s=f.length-1),u<0&&(u=0),d>f[0].length-1&&(d=f[0].length-1);let m=$("#luckysheet-dataVerification-dialog #data-verification-type-select").val(),g=null,y="",v="";if(m=="dropdown"){if(y=$("#luckysheet-dataVerification-dialog .show-box-item-dropdown .data-verification-value1").val().trim(),y.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo1);return}g=$("#luckysheet-dataVerification-dialog #data-verification-multi").is(":checked")}else if(m=="checkbox"){if(y=$("#luckysheet-dataVerification-dialog .show-box-item-checkbox .data-verification-value1").val().trim(),v=$("#luckysheet-dataVerification-dialog .show-box-item-checkbox .data-verification-value2").val().trim(),y.length==0||v.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo2);return}}else if(m=="number"||m=="number_integer"||m=="number_decimal"){if(g=$("#luckysheet-dataVerification-dialog #data-verification-number-select").val(),y=$("#luckysheet-dataVerification-dialog .show-box-item-number .input:visible .data-verification-value1").val().trim(),!B(y)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo3);return}if(g=="bw"||g=="nb"){if(v=$("#luckysheet-dataVerification-dialog .show-box-item-number .input:visible .data-verification-value2").val().trim(),!B(v)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo3);return}if(Number(v)<Number(y)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo4);return}}}else if(m=="text_content"){if(g=$("#luckysheet-dataVerification-dialog #data-verification-text-select").val(),y=$("#luckysheet-dataVerification-dialog .show-box-item-text .data-verification-value1").val().trim(),y.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo5);return}}else if(m=="text_length"){if(g=$("#luckysheet-dataVerification-dialog #data-verification-textLength-select").val(),y=$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input:visible .data-verification-value1").val().trim(),!B(y)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo3);return}if(!Number.isInteger(Number(y))||Number(y)<0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.textlengthInteger);return}if(g=="bw"||g=="nb"){if(v=$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input:visible .data-verification-value2").val().trim(),!B(v)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo3);return}if(!Number.isInteger(Number(v))||Number(v)<0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.textlengthInteger);return}if(Number(v)<Number(y)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo4);return}}}else if(m=="date"){if(g=$("#luckysheet-dataVerification-dialog #data-verification-date-select").val(),y=$("#luckysheet-dataVerification-dialog .show-box-item-date .input:visible .data-verification-value1").val().trim(),!Lt(y)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo6);return}if(g=="bw"||g=="nb"){if(v=$("#luckysheet-dataVerification-dialog .show-box-item-date .input:visible .data-verification-value2").val().trim(),!Lt(v)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo6);return}if(ul(y,v)>0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo7);return}}}else m=="validity"&&(g=$("#luckysheet-dataVerification-dialog #data-verification-validity-select").val());let b=$("#luckysheet-dataVerification-dialog #data-verification-remote").is(":checked"),k=$("#luckysheet-dataVerification-dialog #data-verification-prohibitInput").is(":checked"),w=$("#luckysheet-dataVerification-dialog #data-verification-hint-show").is(":checked"),x="";w&&(x=$("#luckysheet-dataVerification-dialog .data-verification-hint-text input").val().trim());let C={type:m,type2:g,value1:y,value2:v,checked:!1,remote:b,prohibitInput:k,hintShow:w,hintText:x},S=$.extend(!0,{},e.dataVerification),_=$.extend(!0,{},e.dataVerification);for(let T=o;T<=s;T++)for(let A=u;A<=d;A++)_[T+"_"+A]=C,m=="checkbox"&&Ht(T,A,f,C.value2);m=="checkbox"?e.refOfCheckbox(S,_,h.currentSheetIndex,f,a[a.length-1]):e.ref(S,_,h.currentSheetIndex),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-dataVerification-dialog").hide()}),$(document).off("click.delete").on("click.delete","#luckysheet-dataVerification-dialog-delete",function(t){let l=$("#luckysheet-dataVerification-dialog #data-verification-range input").val().trim(),a=e.getRangeByTxt(l);if(a.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.selectCellRange2);return}let o=$.extend(!0,{},e.dataVerification),s=$.extend(!0,{},e.dataVerification),u=a[a.length-1].row[0],d=a[a.length-1].row[1],f=a[a.length-1].column[0],m=a[a.length-1].column[1];for(let g=u;g<=d;g++)for(let y=f;y<=m;y++)delete s[g+"_"+y];e.ref(o,s,h.currentSheetIndex),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-dataVerification-dialog").hide()}),$(document).on("click","#luckysheet-info .luckysheet-modal-dialog-title-close, #luckysheet-info .luckysheet-model-close-btn",function(t){$(this).parents("#luckysheet-info").hide(),$("#luckysheet-dataVerification-dialog").is(":visible")&&$("#luckysheet-modal-dialog-mask").show(),t.stopPropagation()})},dataAllocation:function(){let e=this,n=h.luckysheet_select_save[h.luckysheet_select_save.length-1],t=xt(h.currentSheetIndex,n,h.currentSheetIndex);$("#luckysheet-dataVerification-dialog #data-verification-range input").val(t);let l=n.row_focus||n.row[0],a=n.column_focus||n.column[0],s=$.extend(!0,{},e.dataVerification)[l+"_"+a];s==null&&(s=$.extend(!0,{},e.defaultItem)),e.curItem=s,$("#luckysheet-dataVerification-dialog #data-verification-type-select").val(s.type),$("#luckysheet-dataVerification-dialog .show-box .show-box-item").hide(),s.type=="dropdown"?($("#luckysheet-dataVerification-dialog .show-box .show-box-item-dropdown").show(),$("#luckysheet-dataVerification-dialog .show-box-item-dropdown .data-verification-value1").val(s.value1),$("#luckysheet-dataVerification-dialog #data-verification-multi").prop("checked",!!s.type2)):s.type=="checkbox"?($("#luckysheet-dataVerification-dialog .show-box .show-box-item-checkbox").show(),$("#luckysheet-dataVerification-dialog .show-box-item-checkbox .data-verification-value1").val(s.value1),$("#luckysheet-dataVerification-dialog .show-box-item-checkbox .data-verification-value2").val(s.value2)):s.type=="number"||s.type=="number_integer"||s.type=="number_decimal"?($("#luckysheet-dataVerification-dialog .show-box-item-number").show(),$("#luckysheet-dataVerification-dialog #data-verification-number-select").val(s.type2),$("#luckysheet-dataVerification-dialog .show-box-item-number .input").hide(),s.type2=="bw"||s.type2=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-number .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-number .input2").show(),$("#luckysheet-dataVerification-dialog .show-box-item-number .data-verification-value1").val(s.value1),$("#luckysheet-dataVerification-dialog .show-box-item-number .data-verification-value2").val(s.value2)):s.type=="text_content"?($("#luckysheet-dataVerification-dialog .show-box-item-text").show(),$("#luckysheet-dataVerification-dialog #data-verification-text-select").val(s.type2),$("#luckysheet-dataVerification-dialog .show-box-item-text .data-verification-value1").val(s.value1)):s.type=="text_length"?($("#luckysheet-dataVerification-dialog .show-box-item-textLength").show(),$("#luckysheet-dataVerification-dialog #data-verification-textLength-select").val(s.type2),$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input").hide(),s.type2=="bw"||s.type2=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input2").show(),$("#luckysheet-dataVerification-dialog .show-box-item-textLength .data-verification-value1").val(s.value1),$("#luckysheet-dataVerification-dialog .show-box-item-textLength .data-verification-value2").val(s.value2)):s.type=="date"?($("#luckysheet-dataVerification-dialog .show-box-item-date").show(),$("#luckysheet-dataVerification-dialog #data-verification-date-select").val(s.type2),$("#luckysheet-dataVerification-dialog .show-box-item-date .input").hide(),s.type2=="bw"||s.type2=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-date .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-date .input2").show(),$("#luckysheet-dataVerification-dialog .show-box-item-date .data-verification-value1").val(s.value1),$("#luckysheet-dataVerification-dialog .show-box-item-date .data-verification-value2").val(s.value2)):s.type=="validity"&&($("#luckysheet-dataVerification-dialog .show-box .show-box-item-validity").show(),$("#luckysheet-dataVerification-dialog #data-verification-validity-select").val(s.type2)),$("#luckysheet-dataVerification-dialog #data-verification-remote").prop("checked",s.remote),$("#luckysheet-dataVerification-dialog #data-verification-prohibitInput").prop("checked",s.prohibitInput),$("#luckysheet-dataVerification-dialog #data-verification-hint-show").prop("checked",s.hintShow),s.hintShow?$("#luckysheet-dataVerification-dialog .data-verification-hint-text").show():$("#luckysheet-dataVerification-dialog .data-verification-hint-text").hide(),$("#luckysheet-dataVerification-dialog .data-verification-hint-text input").val(s.hintText)},rangeDialog:function(e,n){let t=this,l=Q(),a=l.dataVerification,o=l.button;$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-dataVerificationRange-dialog").remove(),$("body").append(_e(ft,{id:"luckysheet-dataVerificationRange-dialog",addclass:"luckysheet-dataVerificationRange-dialog",title:a.selectCellRange,content:`<input readonly="readonly" placeholder="${a.selectCellRange2}" value="${n}"/>`,botton:`<button id="luckysheet-dataVerificationRange-dialog-confirm" class="btn btn-primary" data-source="${e}">${o.confirm}</button> |
| | | <button id="luckysheet-dataVerificationRange-dialog-close" class="btn btn-default">${o.close}</button>`,style:"z-index:100003"}));let s=$("#luckysheet-dataVerificationRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),u=s.outerHeight(),d=s.outerWidth(),f=$(window).width(),m=$(window).height(),g=$(document).scrollLeft(),y=$(document).scrollTop();$("#luckysheet-dataVerificationRange-dialog").css({left:(f+g-d)/2,top:(m+y-u)/3}).show()},getTxtByRange:function(e){if(e.length>0){let n=[];for(let t=0;t<e.length;t++){let l=e[t].row[0],a=e[t].row[1],o=e[t].column[0],s=e[t].column[1];n.push(xt(h.currentSheetIndex,{row:[l,a],column:[o,s]},h.currentSheetIndex))}return n.join(",")}},getRangeByTxt:function(e){let n=[];if(e.indexOf(",")!=-1){let t=e.split(",");for(let l=0;l<t.length;l++)if(p.iscelldata(t[l]))n.push(p.getcellrange(t[l]));else{n=[];break}}else p.iscelldata(e)&&n.push(p.getcellrange(e));return n},cellFocus:function(e,n,t){$("#luckysheet-dataVerification-dropdown-btn").hide(),$("#luckysheet-dataVerification-showHintBox").hide();let l=this;if(l.dataVerification==null||l.dataVerification[e+"_"+n]==null){$("#luckysheet-dataVerification-dropdown-List").hide();return}let a=h.visibledatarow[e],o=e==0?0:h.visibledatarow[e-1],s=h.visibledatacolumn[n],u=n==0?0:h.visibledatacolumn[n-1],d=ke.mergeborer(h.flowdata,e,n);d&&(a=d.row[1],o=d.row[0],s=d.column[1],u=d.column[0]);let f=l.dataVerification[e+"_"+n];if(t&&f.type=="checkbox"){l.checkboxChange(e,n);return}if(f.type=="dropdown"?($("#luckysheet-dataVerification-dropdown-btn").show().css({"max-width":s-u,"max-height":a-o,left:s-20,top:o+(a-o-20)/2}),$("#luckysheet-dataVerification-dropdown-List").is(":visible")&&$("#luckysheet-dataVerification-dropdown-List").prop("data-index")!=e+"_"+n&&$("#luckysheet-dataVerification-dropdown-List").hide()):$("#luckysheet-dataVerification-dropdown-List").hide(),f.hintShow){let y;h.lang=="en"?y='<span style="color:#f5a623;">Hint: </span>':y='<span style="color:#f5a623;">\u63D0\u793A\uFF1A</span>',y+=l.getHintText(f),$("#luckysheet-dataVerification-showHintBox").html(y).show().css({left:u,top:a});return}let m=ze(e,n,null);if(me(m))return;if(!l.validateCellData(m,f)){let y;h.lang=="en"?y='<span style="color:#f72626;">Failure: </span>':y='<span style="color:#f72626;">\u5931\u6548\uFF1A</span>',y+=l.getFailureText(f),$("#luckysheet-dataVerification-showHintBox").html(y).show().css({left:u,top:a})}},getHintText:function(e){let n=this,t=e.hintText||"";return t.length==0&&(h.lang=="en"?e.type=="dropdown"?t+="please select an option in the drop-down list":e.type=="checkbox"||(e.type=="number"||e.type=="number_integer"||e.type=="number_decimal"?(t+="please enter a "+n.optionLabel_en[e.type]+" "+n.optionLabel_en[e.type2]+" "+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+=" and "+e.value2)):e.type=="text_content"?t+="please enter text "+n.optionLabel_en[e.type2]+" "+e.value1:e.type=="text_length"?(t+="please enter text with length "+n.optionLabel_en[e.type2]+" "+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+=" and "+e.value2)):e.type=="date"?(t+="please enter a date "+n.optionLabel_en[e.type2]+" "+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+=" and "+e.value2)):e.type=="validity"&&(t+="please enter the correct "+n.optionLabel_en[e.type2])):e.type=="dropdown"?t+="\u8BF7\u9009\u62E9\u4E0B\u62C9\u5217\u8868\u4E2D\u7684\u9009\u9879":e.type=="checkbox"||(e.type=="number"||e.type=="number_integer"||e.type=="number_decimal"?(t+="\u8BF7\u8F93\u5165"+n.optionLabel[e.type2]+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+="\u548C"+e.value2+"\u4E4B\u95F4"),t+="\u7684"+n.optionLabel[e.type]):e.type=="text_content"?t+="\u8BF7\u8F93\u5165\u5185\u5BB9"+n.optionLabel[e.type2]+e.value1+"\u7684\u6587\u672C":e.type=="text_length"?(t+="\u8BF7\u8F93\u5165\u957F\u5EA6"+n.optionLabel[e.type2]+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+="\u548C"+e.value2+"\u4E4B\u95F4"),t+="\u7684\u6587\u672C"):e.type=="date"?(t+="\u8BF7\u8F93\u5165"+n.optionLabel[e.type2]+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+="\u548C"+e.value2+"\u4E4B\u95F4"),t+="\u7684\u65E5\u671F"):e.type=="validity"&&(t+="\u8BF7\u8F93\u5165\u6B63\u786E\u7684"+n.optionLabel[e.type2]))),t},getFailureText:function(e){let n=this,t="";return h.lang=="en"?e.type=="dropdown"?t+="what you selected is not an option in the drop-down list":e.type=="checkbox"||(e.type=="number"||e.type=="number_integer"||e.type=="number_decimal"?(t+="what you entered is not a "+n.optionLabel_en[e.type]+" "+n.optionLabel_en[e.type2]+" "+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+=" and "+e.value2)):e.type=="text_content"?t+="what you entered is not text that "+n.optionLabel_en[e.type2]+" "+e.value1:e.type=="text_length"?(t+="the text you entered is not length "+n.optionLabel_en[e.type2]+" "+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+=" and "+e.value2)):e.type=="date"?(t+="the date you entered is not "+n.optionLabel_en[e.type2]+" "+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+=" and "+e.value2)):e.type=="validity"&&(t+="what you entered is not a correct "+n.optionLabel_en[e.type2])):e.type=="dropdown"?t+="\u4F60\u9009\u62E9\u7684\u4E0D\u662F\u4E0B\u62C9\u5217\u8868\u4E2D\u7684\u9009\u9879":e.type=="checkbox"||(e.type=="number"||e.type=="number_integer"||e.type=="number_decimal"?(t+="\u4F60\u8F93\u5165\u7684\u4E0D\u662F"+n.optionLabel[e.type2]+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+="\u548C"+e.value2+"\u4E4B\u95F4"),t+="\u7684"+n.optionLabel[e.type]):e.type=="text_content"?t+="\u4F60\u8F93\u5165\u7684\u4E0D\u662F\u5185\u5BB9"+n.optionLabel[e.type2]+e.value1+"\u7684\u6587\u672C":e.type=="text_length"?(t+="\u4F60\u8F93\u5165\u7684\u4E0D\u662F\u957F\u5EA6"+n.optionLabel[e.type2]+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+="\u548C"+e.value2+"\u4E4B\u95F4"),t+="\u7684\u6587\u672C"):e.type=="date"?(t+="\u4F60\u8F93\u5165\u7684\u4E0D\u662F"+n.optionLabel[e.type2]+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+="\u548C"+e.value2+"\u4E4B\u95F4"),t+="\u7684\u65E5\u671F"):e.type=="validity"&&(t+="\u4F60\u8F93\u5165\u7684\u4E0D\u662F\u4E00\u4E2A\u6B63\u786E\u7684"+n.optionLabel[e.type2])),t},validateCellData:function(e,n){let t=this,l=n.type,a=n.type2,o=n.value1,s=n.value2;if(l=="dropdown"){let u=t.getDropdownList(o);if(a&&e)return e.split(",").every(function(f){return u.indexOf(f)!==-1});let d=!1;for(let f=0;f<u.length;f++)if(u[f]==e){d=!0;break}return d}else if(l!="checkbox"){if(l=="number"||l=="number_integer"||l=="number_decimal"){if(!B(e)||(e=Number(e),l=="number_integer"&&e%1!=0)||l=="number_decimal"&&e%1==0||(o=Number(o),s=Number(s),a=="bw"&&(e<o||e>s))||a=="nb"&&e>=o&&e<=s||a=="eq"&&e!=o||a=="ne"&&e==o||a=="gt"&&e<=o||a=="lt"&&e>=o||a=="gte"&&e<o||a=="lte"&&e>o)return!1}else if(l=="text_content"){if(e=e.toString(),o=o.toString(),a=="include"&&e.indexOf(o)==-1||a=="exclude"&&e.indexOf(o)>-1||a=="equal"&&e!=o)return!1}else if(l=="text_length"){if(e=e.toString().length,o=Number(o),s=Number(s),a=="bw"&&(e<o||e>s)||a=="nb"&&e>=o&&e<=s||a=="eq"&&e!=o||a=="ne"&&e==o||a=="gt"&&e<=o||a=="lt"&&e>=o||a=="gte"&&e<o||a=="lte"&&e>o)return!1}else if(l=="date"){if(!Lt(e)||a=="bw"&&(ul(e,o)<0||ul(e,s)>0)||a=="nb"&&ul(e,o)>=0&&ul(e,s)<=0||a=="eq"&&ul(e,o)!=0||a=="ne"&&ul(e,o)==0||a=="bf"&&ul(e,o)>=0||a=="nbf"&&ul(e,o)<0||a=="af"&&ul(e,o)<=0||a=="naf"&&ul(e,o)>0)return!1}else if(l=="validity"&&(a=="card"&&!Yy(e)||a=="phone"&&!/^1[3456789]\d{9}$/.test(e)))return!1}return!0},dropdownListShow:function(){$("#luckysheet-dataVerification-showHintBox").hide();let e=this,n=h.luckysheet_select_save[h.luckysheet_select_save.length-1],t=n.row_focus,l=n.column_focus,a=h.visibledatarow[t],o=t==0?0:h.visibledatarow[t-1],s=h.visibledatacolumn[l],u=l==0?0:h.visibledatacolumn[l-1],d=ke.mergeborer(h.flowdata,t,l);d&&(a=d.row[1],o=d.row[0],s=d.column[1],u=d.column[0]);let f=e.dataVerification[t+"_"+l],m=e.getDropdownList(f.value1),g="";if(f.type==="dropdown"&&f.type2){let b=ze(t,l,null),k=me(b)?[]:b.split(",");m.forEach(w=>{g+=`<div class="dropdown-List-item luckysheet-mousedown-cancel multi${k.indexOf(w)!==-1?" checked":""}">${w}</div>`})}else m.forEach(b=>{g+=`<div class="dropdown-List-item luckysheet-mousedown-cancel">${b}</div>`});$("#luckysheet-dataVerification-dropdown-List").html(g).prop("data-index",t+"_"+l).show().css({width:s-u-1,left:u,top:a});let y=$("#luckysheet-dataVerification-dropdown-List").outerHeight(),v=$("#luckysheet-cell-main")[0].scrollHeight;a+y>v-42-6&&$("#luckysheet-dataVerification-dropdown-List").css({top:o-y})},getDropdownList:function(e){let n=[];if(p.iscelldata(e)){let t=p.getcellrange(e),l=h.luckysheetfile[Z(t.sheetIndex)].data;for(let a=t.row[0];a<=t.row[1];a++)for(let o=t.column[0];o<=t.column[1];o++){if(l[a]==null)continue;let s=l[a][o];if(s==null||s.v==null)continue;let u=s.m||s.v;n.includes(u)||n.push(u)}}else{let t=e.split(",");for(let l=0;l<t.length;l++){let a=t[l];a.length!=0&&(n.includes(a)||n.push(a))}}return n},checkboxChange:function(e,n){let t=this,l=$.extend(!0,{},t.dataVerification),a=$.extend(!0,{},t.dataVerification),o=a[e+"_"+n];o.checked=!o.checked;let s=o.value2;o.checked&&(s=o.value1);let u=xe.deepCopyFlowData(h.flowdata);Ht(e,n,u,s),t.refOfCheckbox(l,a,h.currentSheetIndex,u,{row:[e,e],column:[n,n]})},ref:function(e,n,t){let l=this;if(h.clearjfundo){h.jfundo.length=0;let a={};a.type="updateDataVerification",a.sheetIndex=t,a.historyDataVerification=e,a.currentDataVerification=n,h.jfredo.push(a)}l.dataVerification=n,h.luckysheetfile[Z(t)].dataVerification=n,ne.allowUpdate&&ne.saveParam("all",t,n,{k:"dataVerification"}),setTimeout(function(){Be()},1)},refOfCheckbox:function(e,n,t,l,a){let o=this;if(h.clearjfundo){h.jfundo.length=0;let s={};s.type="updateDataVerificationOfCheckbox",s.sheetIndex=t,s.historyDataVerification=e,s.currentDataVerification=n,s.data=h.flowdata,s.curData=l,s.range=a,h.jfredo.push(s)}o.dataVerification=n,h.luckysheetfile[Z(t)].dataVerification=n,h.flowdata=l,xe.webWorkerFlowDataCache(h.flowdata),h.luckysheetfile[Z(t)].data=h.flowdata,ne.allowUpdate&&(ne.saveParam("all",t,n,{k:"dataVerification"}),ne.historyParam(h.flowdata,t,a)),setTimeout(function(){Be()},1)}};Ye=Wy});function Ir(e,n,t,l,a){if(a=a||h.currentSheetIndex,e=="row"&&!$t(a,"insertRows"))return;if(e=="column"&&!$t(a,"insertColumns"))return;let o=Z(a),s=h.luckysheetfile[o],u=$.extend(!0,[],s.data);t=Math.floor(t);let d=$.extend(!0,{},s.config);d.merge==null&&(d.merge={});let f={};for(let E in d.merge){let N=d.merge[E],L=N.r,O=N.c,V=N.rs,q=N.cs;e=="row"?n<L?f[L+t+"_"+O]={r:L+t,c:O,rs:V,cs:q}:n==L&&V!=1?l=="lefttop"?f[L+t+"_"+O]={r:L+t,c:O,rs:V,cs:q}:f[L+"_"+O]={r:L,c:O,rs:V+t,cs:q}:n<L+V-1?f[L+"_"+O]={r:L,c:O,rs:V+t,cs:q}:n==L+V-1?l=="lefttop"?V==1?f[L+t+"_"+O]={r:L+t,c:O,rs:V,cs:q}:f[L+"_"+O]={r:L,c:O,rs:V+t,cs:q}:f[L+"_"+O]={r:L,c:O,rs:V,cs:q}:f[L+"_"+O]={r:L,c:O,rs:V,cs:q}:e=="column"&&(n<O?f[L+"_"+(O+t)]={r:L,c:O+t,rs:V,cs:q}:n==O&&q!=1?l=="lefttop"?f[L+"_"+(O+t)]={r:L,c:O+t,rs:V,cs:q}:f[L+"_"+O]={r:L,c:O,rs:V,cs:q+t}:n<O+q-1?f[L+"_"+O]={r:L,c:O,rs:V,cs:q+t}:n==O+q-1?l=="lefttop"?q==1?f[L+"_"+(O+t)]={r:L,c:O+t,rs:V,cs:q}:f[L+"_"+O]={r:L,c:O,rs:V,cs:q+t}:f[L+"_"+O]={r:L,c:O,rs:V,cs:q}:f[L+"_"+O]={r:L,c:O,rs:V,cs:q})}d.merge=f;let m=s.calcChain,g=[];if(m!=null&&m.length>0)for(let E=0;E<m.length;E++){let N=$.extend(!0,{},m[E]),L=N.r,O=N.c,V=N.index,q=zl(L,O,V);if(e=="row"){let W="="+p.functionStrChange(q,"add","row",l,n,t);u[L][O]&&u[L][O].f==q&&(u[L][O].f=W),l=="lefttop"?L>=n&&(N.r+=t):l=="rightbottom"&&L>n&&(N.r+=t),g.push(N)}else if(e=="column"){let W="="+p.functionStrChange(q,"add","col",l,n,t);u[L][O]&&u[L][O].f==q&&(u[L][O].f=W),l=="lefttop"?O>=n&&(N.c+=t):l=="rightbottom"&&O>n&&(N.c+=t),g.push(N)}}let y=s.filter_select,v=s.filter,b=null;if(y!=null&&JSON.stringify(y)!="{}"){b={filter_select:null,filter:null};let E=y.row[0],N=y.row[1],L=y.column[0],O=y.column[1];if(e=="row"){if(E<n?(N==n&&l=="lefttop"||N>n)&&(N+=t):E==n?l=="lefttop"?(E+=t,N+=t):l=="rightbottom"&&N>n&&(N+=t):(E+=t,N+=t),v!=null){b.filter={};for(let V in v){let q=v[V].rowhidden,W={};for(let X in q)X=parseFloat(X),X<n?W[X]=0:X==n?l=="lefttop"?W[X+t]=0:l=="rightbottom"&&(W[X]=0):W[X+t]=0;b.filter[V]=$.extend(!0,{},v[V]),b.filter[V].rowhidden=W,b.filter[V].str=E,b.filter[V].edr=N}}}else if(e=="column"&&(L<n?(O==n&&l=="lefttop"||O>n)&&(O+=t):L==n?l=="lefttop"?(L+=t,O+=t):l=="rightbottom"&&O>n&&(O+=t):(L+=t,O+=t),v!=null)){b.filter={};for(let V in v){let q=v[V].cindex;(q==n&&l=="lefttop"||q>n)&&(q+=t),b.filter[q-L]=$.extend(!0,{},v[V]),b.filter[q-L].cindex=q,b.filter[q-L].stc=L,b.filter[q-L].edc=O}}b.filter_select={row:[E,N],column:[L,O]}}if(b!=null&&b.filter!=null){d.rowhidden==null&&(d.rowhidden={});for(let E in b.filter){let N=b.filter[E].rowhidden;for(let L in N)d.rowhidden[L]=0}}let k=s.luckysheet_conditionformat_save,w=[];if(k!=null&&k.length>0)for(let E=0;E<k.length;E++){let N=k[E].cellrange,L=[];for(let V=0;V<N.length;V++){let q=N[V].row[0],W=N[V].row[1],X=N[V].column[0],te=N[V].column[1];e=="row"?q<n?(W==n&&l=="lefttop"||W>n)&&(W+=t):q==n?l=="lefttop"?(q+=t,W+=t):l=="rightbottom"&&W>n&&(W+=t):(q+=t,W+=t):e=="column"&&(X<n?(te==n&&l=="lefttop"||te>n)&&(te+=t):X==n?l=="lefttop"?(X+=t,te+=t):l=="rightbottom"&&te>n&&(te+=t):(X+=t,te+=t)),L.push({row:[q,W],column:[X,te]})}let O=$.extend(!0,{},k[E]);O.cellrange=L,w.push(O)}let x=s.luckysheet_alternateformat_save,C=[];if(x!=null&&x.length>0)for(let E=0;E<x.length;E++){let N=x[E].cellrange.row[0],L=x[E].cellrange.row[1],O=x[E].cellrange.column[0],V=x[E].cellrange.column[1],q=$.extend(!0,{},x[E]);e=="row"?N<n?(L==n&&l=="lefttop"||L>n)&&(L+=t):N==n?l=="lefttop"?(N+=t,L+=t):l=="rightbottom"&&L>n&&(L+=t):(N+=t,L+=t):e=="column"&&(O<n?(V==n&&l=="lefttop"||V>n)&&(V+=t):O==n?l=="lefttop"?(O+=t,V+=t):l=="rightbottom"&&V>n&&(V+=t):(O+=t,V+=t)),q.cellrange={row:[N,L],column:[O,V]},C.push(q)}let S={freezenhorizontaldata:null,freezenverticaldata:null};if(Y.freezenhorizontaldata!=null&&e=="row"){let E=Y.freezenhorizontaldata[2],N=Y.freezenhorizontaldata[1]-1;(N==n&&l=="lefttop"||N>n)&&(N+=t);let L=h.visibledatarow[N]-2-E+h.columnHeaderHeight;S.freezenhorizontaldata=[h.visibledatarow[N],N+1,E,Y.cutVolumn(h.visibledatarow,N+1),L]}else S.freezenhorizontaldata=Y.freezenhorizontaldata;if(Y.freezenverticaldata!=null&&e=="column"){let E=Y.freezenverticaldata[2],N=Y.freezenverticaldata[1]-1;(N==n&&l=="lefttop"||N>n)&&(N+=t);let L=h.visibledatacolumn[N]-2-E+h.rowHeaderWidth;S.freezenverticaldata=[h.visibledatacolumn[N],N+1,E,Y.cutVolumn(h.visibledatacolumn,N+1),L]}else S.freezenverticaldata=Y.freezenverticaldata;let _=s.dataVerification,T={};if(_!=null)for(let E in _){let N=Number(E.split("_")[0]),L=Number(E.split("_")[1]),O=_[E];if(e=="row")if(n<N)T[N+t+"_"+L]=O;else if(n==N)if(l=="lefttop"){T[N+t+"_"+L]=O;for(let V=0;V<t;V++)T[N+V+"_"+L]=O}else{T[N+"_"+L]=O;for(let V=0;V<t;V++)T[N+V+1+"_"+L]=O}else T[N+"_"+L]=O;else if(e=="column")if(n<L)T[N+"_"+(L+t)]=O;else if(n==L)if(l=="lefttop"){T[N+"_"+(L+t)]=O;for(let V=0;V<t;V++)T[N+"_"+(L+V)]=O}else{T[N+"_"+L]=O;for(let V=0;V<t;V++)T[N+"_"+(L+V+1)]=O}else T[N+"_"+L]=O}let A=s.hyperlink,R={};if(A!=null)for(let E in A){let N=Number(E.split("_")[0]),L=Number(E.split("_")[1]),O=A[E];e=="row"?n<N||n==N&&l=="lefttop"?R[N+t+"_"+L]=O:R[N+"_"+L]=O:e=="column"&&(n<L||n==L&&l=="lefttop"?R[N+"_"+(L+t)]=O:R[N+"_"+L]=O)}let I;if(e=="row"){if(I="r",d.rowlen!=null){let L={};for(let O in d.rowlen)O=parseFloat(O),O<n?L[O]=d.rowlen[O]:O==n?l=="lefttop"?L[O+t]=d.rowlen[O]:l=="rightbottom"&&(L[O]=d.rowlen[O]):L[O+t]=d.rowlen[O];d.rowlen=L}if(d.rowhidden!=null){let L={};for(let O in d.rowhidden)O=parseFloat(O),O<n?L[O]=d.rowhidden[O]:O==n?l=="lefttop"?L[O+t]=d.rowhidden[O]:l=="rightbottom"&&(L[O]=d.rowhidden[O]):L[O+t]=d.rowhidden[O];d.rowhidden=L}let E=[];for(let L=0;L<u[0].length;L++)E.push(null);var F=[];if(d.borderInfo&&d.borderInfo.length>0){let L=[];for(let O=0;O<d.borderInfo.length;O++){let V=d.borderInfo[O].rangeType;if(V=="range"){let q=d.borderInfo[O].range,W=[];for(let X=0;X<q.length;X++){let te=q[X].row[0],le=q[X].row[1];l=="lefttop"?n<=te?(te+=t,le+=t):n<=le&&(le+=t):n<te?(te+=t,le+=t):n<le&&(le+=t),le>=te&&W.push({row:[te,le],column:q[X].column})}if(W.length>0){let X={rangeType:"range",borderType:d.borderInfo[O].borderType,style:d.borderInfo[O].style,color:d.borderInfo[O].color,range:W};L.push(X)}}else if(V=="cell"){let q=d.borderInfo[O].value.row_index;q===n&&F.push(JSON.parse(JSON.stringify(d.borderInfo[O]))),l=="lefttop"?n<=q&&(q+=t):n<q&&(q+=t),d.borderInfo[O].value.row_index=q,L.push(d.borderInfo[O])}}d.borderInfo=L}let N=[];for(let L=0;L<t;L++)if(N.push(JSON.stringify(E)),F.length){var z=JSON.parse(JSON.stringify(F));z.forEach(O=>{l==="rightbottom"?O.value.row_index+=L+1:l==="lefttop"&&(O.value.row_index+=L)}),d.borderInfo.push(...z)}l=="lefttop"?n==0?new Function("d","return d.unshift("+N.join(",")+")")(u):new Function("d","return d.splice("+n+", 0, "+N.join(",")+")")(u):new Function("d","return d.splice("+(n+1)+", 0, "+N.join(",")+")")(u)}else{if(I="c",d.columnlen!=null){let L={};for(let O in d.columnlen)O=parseFloat(O),O<n?L[O]=d.columnlen[O]:O==n?l=="lefttop"?L[O+t]=d.columnlen[O]:l=="rightbottom"&&(L[O]=d.columnlen[O]):L[O+t]=d.columnlen[O];d.columnlen=L}if(d.colhidden!=null){let L={};for(let O in d.colhidden)O=parseFloat(O),O<n?L[O]=d.colhidden[O]:O==n?l=="lefttop"?L[O+t]=d.colhidden[O]:l=="rightbottom"&&(L[O]=d.colhidden[O]):L[O+t]=d.colhidden[O];d.colhidden=L}let E=[];for(let L=0;L<u.length;L++)E.push(null);var F=[];if(d.borderInfo&&d.borderInfo.length>0){let L=[];for(let O=0;O<d.borderInfo.length;O++){let V=d.borderInfo[O].rangeType;if(V=="range"){let q=d.borderInfo[O].range,W=[];for(let X=0;X<q.length;X++){let te=q[X].column[0],le=q[X].column[1];l=="lefttop"?n<=te?(te+=t,le+=t):n<=le&&(le+=t):n<te?(te+=t,le+=t):n<le&&(le+=t),le>=te&&W.push({row:q[X].row,column:[te,le]})}if(W.length>0){let X={rangeType:"range",borderType:d.borderInfo[O].borderType,style:d.borderInfo[O].style,color:d.borderInfo[O].color,range:W};L.push(X)}}else if(V=="cell"){let q=d.borderInfo[O].value.col_index;q===n&&F.push(JSON.parse(JSON.stringify(d.borderInfo[O]))),l=="lefttop"?n<=q&&(q+=t):n<q&&(q+=t),d.borderInfo[O].value.col_index=q,L.push(d.borderInfo[O])}}d.borderInfo=L}if(F.length)for(let L=0;L<t;L++){var z=JSON.parse(JSON.stringify(F));z.forEach(V=>{l==="rightbottom"?V.value.col_index+=L+1:l==="lefttop"&&(V.value.col_index+=L)}),d.borderInfo.push(...z)}for(let L=0;L<u.length;L++){let O=u[L];for(let V=0;V<t;V++){let q=JSON.parse(JSON.stringify(E[L]));l=="lefttop"?n==0?O.unshift(q):O.splice(n,0,q):O.splice(n+1,0,q)}}}s.index==h.currentSheetIndex?jn(u,d,"addRC",{index:n,len:t,direction:l,rc:I,restore:!1},g,b,w,C,S,T,R):(s.data=u,s.config=d,s.calcChain=g,s.filter=b.filter,s.filter_select=b.filter_select,s.luckysheet_conditionformat_save=w,s.luckysheet_alternateformat_save=C,s.dataVerification=T,s.hyperlink=R);let M=null;if(e=="row"?l=="lefttop"?M=[{row:[n,n+t-1],column:[0,u[0].length-1]}]:M=[{row:[n+1,n+t],column:[0,u[0].length-1]}]:l=="lefttop"?M=[{row:[0,u.length-1],column:[n,n+t-1]}]:M=[{row:[0,u.length-1],column:[n+1,n+t]}],s.luckysheet_select_save=M,s.index==h.currentSheetIndex&&(h.luckysheet_select_save=M,lt()),e=="row"){let E=$("#luckysheet-cell-main").scrollLeft(),N=$("#luckysheet-cell-main").scrollTop(),L=$("#luckysheet-cell-main").height(),O=$("#luckysheet-cell-main").width(),V=h.visibledatarow[M[0].row[1]],q=M[0].row[0]-1==-1?0:h.visibledatarow[M[0].row[0]-1];V-N-L+20>0?$("#luckysheet-scrollbar-y").scrollTop(V-L+20):q-N-20<0&&$("#luckysheet-scrollbar-y").scrollTop(q-20),t>30&&($("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide())}}function ko(e,n){let t=xe.deepCopyFlowData(h.flowdata),l=$.extend(!0,{},h.config);l.merge==null&&(l.merge={});let a=t[0].length,o=cl([],e,a);t=t.concat(o);for(let s=0;s<n.length;s++){let u=n[s].r,d=n[s].c,f=n[s].v;Ht(u,d,t,f),f!=null&&f.mc!=null&&f.mc.rs!=null&&(l.merge[f.mc.r+"_"+f.mc.c]=$.extend(!0,{},f.mc))}h.flowdata=t,xe.webWorkerFlowDataCache(h.flowdata),h.luckysheetfile[Z(h.currentSheetIndex)].data=t,h.config=l,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,St(h.flowdata.length,h.flowdata[0].length)}function qn(e,n,t,l){if(l=l||h.currentSheetIndex,e=="row"&&!$t(l,"deleteRows"))return;if(e=="column"&&!$t(l,"deleteColumns"))return;let a=Z(l),o=h.luckysheetfile[a],s=$.extend(!0,[],o.data);if(n<0&&(n=0),t<0&&(t=0),e=="row"?(n>s.length-1&&(n=s.length-1),t>s.length-1&&(t=s.length-1)):(n>s[0].length-1&&(n=s[0].length-1),t>s[0].length-1&&(t=s[0].length-1)),n>t)return;let u=t-n+1,d=$.extend(!0,{},o.config);d.merge==null&&(d.merge={});let f={};for(let F in d.merge){let z=d.merge[F],M=z.r,E=z.c,N=z.rs,L=z.cs;e=="row"?M<n?M+N-1<n?f[M+"_"+E]={r:M,c:E,rs:N,cs:L}:M+N-1>=n&&M+N-1<t?f[M+"_"+E]={r:M,c:E,rs:n-M,cs:L}:M+N-1>=t&&(f[M+"_"+E]={r:M,c:E,rs:N-u,cs:L}):M>=n&&M<=t?M+N-1>t&&(f[n+"_"+E]={r:n,c:E,rs:M+N-1-t,cs:L}):M>t&&(f[M-u+"_"+E]={r:M-u,c:E,rs:N,cs:L}):e=="column"&&(E<n?E+L-1<n?f[M+"_"+E]={r:M,c:E,rs:N,cs:L}:E+L-1>=n&&E+L-1<t?f[M+"_"+E]={r:M,c:E,rs:N,cs:n-E}:E+L-1>=t&&(f[M+"_"+E]={r:M,c:E,rs:N,cs:L-u}):E>=n&&E<=t?E+L-1>t&&(f[M+"_"+n]={r:M,c:n,rs:N,cs:E+L-1-t}):E>t&&(f[M+"_"+(E-u)]={r:M,c:E-u,rs:N,cs:L}))}d.merge=f;let m=o.calcChain,g=[];if(m!=null&&m.length>0)for(let F=0;F<m.length;F++){let z=$.extend(!0,{},m[F]),M=z.r,E=z.c,N=z.index,L=zl(M,E,N);if(e=="row"){if(M<n||M>t){let O="="+p.functionStrChange(L,"del","row",null,n,u);s[M][E]&&s[M][E].f==L&&(s[M][E].f=O),M>t&&(z.r=M-u),g.push(z)}}else if(e=="column"&&(E<n||E>t)){let O="="+p.functionStrChange(L,"del","col",null,n,u);s[M][E]&&s[M][E].f==L&&(s[M][E].f=O),E>t&&(z.c=E-u),g.push(z)}}let y=o.filter_select,v=o.filter,b=null;if(y!=null&&JSON.stringify(y)!="{}"){b={filter_select:null,filter:null};let F=y.row[0],z=y.row[1],M=y.column[0],E=y.column[1];if(e=="row"){if(F>t?(F-=u,z-=u,b.filter_select={row:[F,z],column:[M,E]}):F<n&&(z<n||(z<=t?z=n-1:z-=u),b.filter_select={row:[F,z],column:[M,E]}),b.filter_select!=null&&v!=null)for(let N in v){let L=v[N].rowhidden,O={};for(let V in L)V<n?O[V]=0:V>t&&(O[V-u]=0);JSON.stringify(O)!="{}"&&(b.filter==null&&(b.filter={}),b.filter[N]=$.extend(!0,{},v[N]),b.filter[N].rowhidden=O,b.filter[N].str=F,b.filter[N].edr=z)}}else if(e=="column"&&(M>t?(M-=u,E-=u,b.filter_select={row:[F,z],column:[M,E]}):M<n?(E<n||(E<=t?E=n-1:E-=u),b.filter_select={row:[F,z],column:[M,E]}):E>t&&(M=n,E-=u,b.filter_select={row:[F,z],column:[M,E]}),b.filter_select!=null&&v!=null))for(let N in v){let L=v[N].cindex;L<n?(b.filter==null&&(b.filter={}),b.filter[L-M]=$.extend(!0,{},v[N]),b.filter[L-M].edc=E):L>t&&(L-=u,b.filter==null&&(b.filter={}),b.filter[L-M]=$.extend(!0,{},v[N]),b.filter[L-M].cindex=L,b.filter[L-M].stc=M,b.filter[L-M].edc=E)}}if(b!=null&&b.filter!=null){d.rowhidden==null&&(d.rowhidden={});for(let F in b.filter){let z=b.filter[F].rowhidden;for(let M in z)d.rowhidden[M]=0}}let k=o.luckysheet_conditionformat_save,w=[];if(k!=null&&k.length>0)for(let F=0;F<k.length;F++){let z=k[F].cellrange,M=[];for(let E=0;E<z.length;E++){let N=z[E].row[0],L=z[E].row[1],O=z[E].column[0],V=z[E].column[1];e=="row"?N>=n&&L<=t||(N>t?(N-=u,L-=u):N<n?L<n||(L<=t?L=n-1:L-=u):L>t&&(N=n,L-=u),M.push({row:[N,L],column:[O,V]})):e=="column"&&(O>=n&&V<=t||(O>t?(O-=u,V-=u):O<n?V<n||(V<=t?V=n-1:V-=u):V>t&&(O=n,V-=u),M.push({row:[N,L],column:[O,V]})))}if(M.length>0){let E=$.extend(!0,{},k[F]);E.cellrange=M,w.push(E)}}let x=o.luckysheet_alternateformat_save,C=[];if(x!=null&&x.length>0)for(let F=0;F<x.length;F++){let z=x[F].cellrange.row[0],M=x[F].cellrange.row[1],E=x[F].cellrange.column[0],N=x[F].cellrange.column[1];if(e=="row"){if(!(z>=n&&M<=t)){let L=$.extend(!0,{},x[F]);z>t?(z-=u,M-=u):z<n?M<n||(M<=t?M=n-1:M-=u):M>t&&(z=n,M-=u),L.cellrange={row:[z,M],column:[E,N]},C.push(L)}}else if(e=="column"&&!(E>=n&&N<=t)){let L=$.extend(!0,{},x[F]);E>t?(E-=u,N-=u):E<n?N<n||(N<=t?N=n-1:N-=u):N>t&&(E=n,N-=u),L.cellrange={row:[z,M],column:[E,N]},C.push(L)}}let S={freezenhorizontaldata:null,freezenverticaldata:null};if(Y.freezenhorizontaldata!=null&&e=="row"){let F=Y.freezenhorizontaldata[2],z=st(h.visibledatarow,F);z==-1&&(z=0);let M=Y.freezenhorizontaldata[1]-1;M>=n&&(M<t?M=n-1:M-=u),M<z&&(M=z);let E=h.visibledatarow[M]-2-F+h.columnHeaderHeight;S.freezenhorizontaldata=[h.visibledatarow[M],M+1,F,Y.cutVolumn(h.visibledatarow,M+1),E]}else S.freezenhorizontaldata=Y.freezenhorizontaldata;if(Y.freezenverticaldata!=null&&e=="column"){let F=Y.freezenverticaldata[2],z=st(h.visibledatacolumn,F);z==-1&&(z=0);let M=Y.freezenverticaldata[1]-1;M>=n&&(M<t?M=n-1:M-=u),M<z&&(M=z);let E=h.visibledatacolumn[M]-2-F+h.rowHeaderWidth;S.freezenverticaldata=[h.visibledatacolumn[M],M+1,F,Y.cutVolumn(h.visibledatacolumn,M+1),E]}else S.freezenverticaldata=Y.freezenverticaldata;let _=o.dataVerification,T={};if(_!=null)for(let F in _){let z=Number(F.split("_")[0]),M=Number(F.split("_")[1]),E=_[F];e=="row"?z<n?T[z+"_"+M]=E:z>t&&(T[z-u+"_"+M]=E):e=="column"&&(M<n?T[z+"_"+M]=E:M>t&&(T[z+"_"+(M-u)]=E))}let A=o.hyperlink,R={};if(A!=null)for(let F in A){let z=Number(F.split("_")[0]),M=Number(F.split("_")[1]),E=A[F];e=="row"?z<n?R[z+"_"+M]=E:z>t&&(R[z-u+"_"+M]=E):e=="column"&&(M<n?R[z+"_"+M]=E:M>t&&(R[z+"_"+(M-u)]=E))}let I;if(e=="row"){I="r",d.rowlen==null&&(d.rowlen={});let F={};for(let M in d.rowlen)M<n?F[M]=d.rowlen[M]:M>t&&(F[M-u]=d.rowlen[M]);d.rowlen=F,d.rowhidden==null&&(d.rowhidden={});let z={};for(let M in d.rowhidden)M<n?z[M]=d.rowhidden[M]:M>t&&(z[M-u]=d.rowhidden[M]);if(d.rowhidden=z,d.borderInfo&&d.borderInfo.length>0){let M=[];for(let E=0;E<d.borderInfo.length;E++){let N=d.borderInfo[E].rangeType;if(N=="range"){let L=d.borderInfo[E].range,O=[];for(let V=0;V<L.length;V++){let q=L[V].row[0],W=L[V].row[1];for(let X=n;X<=t;X++)X<L[V].row[0]?(q-=1,W-=1):X<=L[V].row[1]&&(W-=1);W>=q&&O.push({row:[q,W],column:L[V].column})}if(O.length>0){let V={rangeType:"range",borderType:d.borderInfo[E].borderType,style:d.borderInfo[E].style,color:d.borderInfo[E].color,range:O};M.push(V)}}else if(N=="cell"){let L=d.borderInfo[E].value.row_index;L<n?M.push(d.borderInfo[E]):L>t&&(d.borderInfo[E].value.row_index=L-(t-n+1),M.push(d.borderInfo[E]))}}d.borderInfo=M}s.splice(n,u);for(let M=0;M<u;M++){let E=[];for(let N=0;N<s[0].length;N++)E.push(null);s.push(E)}}else{I="c",d.columnlen==null&&(d.columnlen={});let F={};for(let E in d.columnlen)E<n?F[E]=d.columnlen[E]:E>t&&(F[E-u]=d.columnlen[E]);d.columnlen=F,d.colhidden==null&&(d.colhidden={});let z={};for(let E in d.colhidden)E<n?z[E]=d.colhidden[E]:E>t&&(z[E-u]=d.colhidden[E]);if(d.colhidden=z,d.borderInfo&&d.borderInfo.length>0){let E=[];for(let N=0;N<d.borderInfo.length;N++){let L=d.borderInfo[N].rangeType;if(L=="range"){let O=d.borderInfo[N].range,V=[];for(let q=0;q<O.length;q++){let W=O[q].column[0],X=O[q].column[1];for(let te=n;te<=t;te++)te<O[q].column[0]?(W-=1,X-=1):te<=O[q].column[1]&&(X-=1);X>=W&&V.push({row:O[q].row,column:[W,X]})}if(V.length>0){let q={rangeType:"range",borderType:d.borderInfo[N].borderType,style:d.borderInfo[N].style,color:d.borderInfo[N].color,range:V};E.push(q)}}else if(L=="cell"){let O=d.borderInfo[N].value.col_index;O<n?E.push(d.borderInfo[N]):O>t&&(d.borderInfo[N].value.col_index=O-(t-n+1),E.push(d.borderInfo[N]))}}d.borderInfo=E}let M=[];for(let E=0;E<u;E++)M.push(null);for(let E=0;E<s.length;E++){let N=[].concat(s[E]);N.splice(n,u),s[E]=N.concat(M)}}o.index==h.currentSheetIndex?jn(s,d,"delRC",{index:n,len:t-n+1,rc:I},g,b,w,C,S,T,R):(o.data=s,o.config=d,o.calcChain=g,o.filter=b.filter,o.filter_select=b.filter_select,o.luckysheet_conditionformat_save=w,o.luckysheet_alternateformat_save=C,o.dataVerification=T,o.hyperlink=R)}function ha(e,n,t,l,a,o){if(o=o||h.currentSheetIndex,!jr(o))return;let s=Z(o),u=h.luckysheetfile[s],d=$.extend(!0,[],u.data),f=t-n+1,m=a-l+1,g=$.extend(!0,{},h.config);g.merge==null&&(g.merge={});let y={};for(let F in g.merge){let z=g.merge[F],M=z.r,E=z.c,N=z.rs,L=z.cs;if(e=="moveLeft")if(n>M+N-1||t<M||l>E+L-1)y[M+"_"+E]={r:M,c:E,rs:N,cs:L};else if(n<=M&&t>=M+N-1&&a<E)y[M+"_"+(E-m)]={r:M,c:E-m,rs:N,cs:L};else for(let O=M;O<=M+N-1;O++)for(let V=E;V<=E+L-1;V++)delete d[O][V].mc;else if(e=="moveUp")if(l>E+L-1||a<E||n>M+N-1)y[M+"_"+E]={r:M,c:E,rs:N,cs:L};else if(l<=E&&a>=E+L-1&&t<M)y[M-f+"_"+E]={r:M-f,c:E,rs:N,cs:L};else for(let O=M;O<=M+N-1;O++)for(let V=E;V<=E+L-1;V++)delete d[O][V].mc}g.merge=y;let v=u.calcChain,b=[];if(v!=null&&v.length>0)for(let F=0;F<v.length;F++){let z=$.extend(!0,{},v[F]),M=z.r,E=z.c,N=z.index,L=zl(M,E,N);if(M<n||M>t||E<l||E>a){let O;e=="moveLeft"?(O="="+p.functionStrChange(L,"del","col",null,l,m),E>a&&M>=n&&M<=t&&(z.c=E-m)):e=="moveUp"&&(O="="+p.functionStrChange(L,"del","row",null,n,f),M>t&&E>=l&&E<=a&&(z.r=M-f)),d[M][E]&&d[M][E].f==L&&(d[M][E].f=O),b.push(z)}}let k=u.filter_select,w=u.filter,x=null;if(k!=null&&JSON.stringify(k)!="{}"){x={filter_select:null,filter:null};let F=k.row[0],z=k.row[1],M=k.column[0],E=k.column[1];if(e=="moveUp")if(M>=l&&E<=a){if(F>t?x.filter_select={row:[F-f,z-f],column:[M,E]}:z<n?x.filter_select={row:[F,z],column:[M,E]}:F<n&&(z>t?x.filter_select={row:[F,z-f],column:[M,E]}:x.filter_select={row:[F,n-1],column:[M,E]}),x.filter_select!=null&&w!=null)for(let N in w){let L=w[N].rowhidden,O={};for(let V in L)V<n?O[V]=0:V>t&&(O[V-slen]=0);x.filter==null&&(x.filter={}),x.filter[N]=$.extend(!0,{},w[N]),JSON.stringify(O)!="{}"&&(x.filter[N].rowhidden=O),x.filter[N].str=x.filter_select.row[0],x.filter[N].edr=x.filter_select.row[1]}}else if(F>=n&&z<=t){if(M>a?x.filter_select={row:[F,z],column:[M,E]}:M>=l?E>a&&(x.filter_select={row:[F,z],column:[l,E-m]}):E<l?x.filter_select={row:[F,z],column:[M,E]}:E<=a?x.filter_select={row:[F,z],column:[M,l-1]}:x.filter_select={row:[F,z],column:[M,E-m]},x.filter_select!=null&&w!=null)for(let N in w){let L=x.filter_select.column[0],O=x.filter_select.column[1],V=w[N].cindex;if(V<l||V>a){x.filter==null&&(x.filter={}),V>a&&(V-=m);let q=V-L;x.filter[q]=$.extend(!0,{},w[N]),x.filter[q].cindex=V,x.filter[q].stc=L,x.filter[q].edc=O}}}else x.filter_select={row:[F,z],column:[M,E]},w!=null&&(x.filter=w);else if(e=="moveLeft")if(F>=n&&z<=t){if(M>a?x.filter_select={row:[F,z],column:[M-m,E-m]}:E<l?x.filter_select={row:[F,z],column:[M,E]}:M<l&&(E>a?x.filter_select={row:[F,z],column:[M,E-m]}:x.filter_select={row:[F,z],column:[M,l-1]}),x.filter_select!=null&&w!=null)for(let N in w){let L=x.filter_select.column[0],O=x.filter_select.column[1],V=w[N].cindex;if(V<l||V>a){x.filter==null&&(x.filter={}),V>a&&(V-=m);let q=V-L;x.filter[q]=$.extend(!0,{},w[N]),x.filter[q].cindex=V,x.filter[q].stc=L,x.filter[q].edc=O}}}else M>=l&&E<=a?(F<n||F>t)&&(x.filter_select={row:[F,z],column:[M,E]},w!=null&&(x.filter=w)):(x.filter_select={row:[F,z],column:[M,E]},w!=null&&(x.filter=w))}if(x!=null&&x.filter!=null){g.rowhidden==null&&(g.rowhidden={});for(let F in x.filter){let z=x.filter[F].rowhidden;for(let M in z)g.rowhidden[M]=0}}let C=u.luckysheet_conditionformat_save,S=[];if(C!=null&&C.length>0)for(let F=0;F<C.length;F++){let z=C[F].cellrange,M=[];for(let E=0;E<z.length;E++){let N=z[E].row[0],L=z[E].row[1],O=z[E].column[0],V=z[E].column[1];n<=N&&t>=L&&l<=O&&a>=V||(M=Xd(e,n,t,l,a,N,L,O,V,f,m))}if(M.length>0){let E=$.extend(!0,{},C[F]);E.cellrange=M,S.push(E)}}let _=u.dataVerification,T={};if(_!=null)for(let F in _){let z=Number(F.split("_")[0]),M=Number(F.split("_")[1]),E=_[F];(z<n||z>t||M<l||M>a)&&(e=="moveLeft"?M>a&&z>=n&&z<=t?T[z+"_"+(M-m)]=E:T[z+"_"+M]=E:e=="moveUp"&&(z>t&&M>=l&&M<=a?T[z-f+"_"+M]=E:T[z+"_"+M]=E))}let A=u.hyperlink,R={};if(A!=null)for(let F in A){let z=Number(F.split("_")[0]),M=Number(F.split("_")[1]),E=A[F];(z<n||z>t||M<l||M>a)&&(e=="moveLeft"?M>a&&z>=n&&z<=t?R[z+"_"+(M-m)]=E:R[z+"_"+M]=E:e=="moveUp"&&(z>t&&M>=l&&M<=a?R[z-f+"_"+M]=E:R[z+"_"+M]=E))}if(g.borderInfo&&g.borderInfo.length>0){let F=[];for(let z=0;z<g.borderInfo.length;z++){let M=g.borderInfo[z].rangeType;if(M=="range"){let E=g.borderInfo[z].range,N=[];for(let L=0;L<E.length;L++){let O=E[L].row[0],V=E[L].row[1],q=E[L].column[0],W=E[L].column[1];n<=O&&t>=V&&l<=q&&a>=W||(N=Xd(e,n,t,l,a,O,V,q,W,f,m))}if(N.length>0){let L={rangeType:"range",borderType:g.borderInfo[z].borderType,style:g.borderInfo[z].style,color:g.borderInfo[z].color,range:N};F.push(L)}}else if(M=="cell"){let E=g.borderInfo[z].value.row_index,N=g.borderInfo[z].value.col_index;(E<n||E>t||N<l||N>a)&&(e=="moveLeft"?N>a&&E>=n&&E<=t&&(N-=m,g.borderInfo[z].value.col_index=N):e=="moveUp"&&E>t&&N>=l&&N<=a&&(E-=f,g.borderInfo[z].value.row_index=E),F.push(g.borderInfo[z]))}}g.borderInfo=F}let I=[];for(let F=l;F<=a;F++)I.push(null);if(e=="moveUp"){let F=[];for(let M=n;M<=d.length-1;M++){let E=[];for(let N=l;N<=a;N++)E.push(d[M][N]);F.push(E)}F.splice(0,f);let z=[];for(let M=n;M<=t;M++)z.push(I);F=F.concat(z);for(let M=n;M<=d.length-1;M++)for(let E=l;E<=a;E++)d[M][E]=F[M-n][E-l]}else if(e=="moveLeft")for(let F=n;F<=t;F++)d[F].splice(l,m),d[F]=d[F].concat(I);u.index==h.currentSheetIndex?Ai(d,g,{type:e,str:n,edr:t,stc:l,edc:a},b,x,S,T,R):(u.data=d,u.config=g,u.calcChain=b,u.filter=x.filter,u.filter_select=x.filter_select,u.luckysheet_conditionformat_save=S,u.dataVerification=T,u.hyperlink=R)}function Xd(e,n,t,l,a,o,s,u,d,f,m){let g=[];if(e=="moveLeft"){if(n>s||t<o||l>d)g.push({row:[o,s],column:[u,d]});else if(a<u){if(n<=o&&t>=s)g.push({row:[o,s],column:[u-m,d-m]});else if(n>o&&t<s){let y=[{row:[o,n-1],column:[u,d]},{row:[t+1,s],column:[u,d]},{row:[n,t],column:[u-m,d-m]}];g=g.concat(y)}else if(n>o){let y=[{row:[o,n-1],column:[u,d]},{row:[n,s],column:[u-m,d-m]}];g=g.concat(y)}else if(t<s){let y=[{row:[o,t],column:[u-m,d-m]},{row:[t+1,s],column:[u,d]}];g=g.concat(y)}}else if(a>=u){if(l<=u&&a>=d){if(n>o&&t<s){let y=[{row:[o,n-1],column:[u,d]},{row:[t+1,s],column:[u,d]}];g=g.concat(y)}else if(n>o){let y=[{row:[o,n-1],column:[u,d]}];g=g.concat(y)}else if(t<s){let y=[{row:[t+1,s],column:[u,d]}];g=g.concat(y)}}else if(l>u&&a<d){if(n<=o&&t>=s)g.push({row:[o,s],column:[u,d-m]});else if(n>o&&t<s){let y=[{row:[o,n-1],column:[u,d]},{row:[t+1,s],column:[u,d]},{row:[n,t],column:[u,d-m]}];g=g.concat(y)}else if(n>o){let y=[{row:[o,n-1],column:[u,d]},{row:[n,s],column:[u,d-m]}];g=g.concat(y)}else if(t<s){let y=[{row:[o,t],column:[u,d-m]},{row:[t+1,s],column:[u,d]}];g=g.concat(y)}}else if(l>u){if(n<=o&&t>=s)g.push({row:[o,s],column:[u,l-1]});else if(n>o&&t<s){let y=[{row:[o,n-1],column:[u,d]},{row:[t+1,s],column:[u,d]},{row:[n,t],column:[u,l-1]}];g=g.concat(y)}else if(n>o){let y=[{row:[o,n-1],column:[u,d]},{row:[n,s],column:[u,l-1]}];g=g.concat(y)}else if(t<s){let y=[{row:[o,t],column:[u,l-1]},{row:[t+1,s],column:[u,d]}];g=g.concat(y)}}else if(a<d){if(n<=o&&t>=s)g.push({row:[o,s],column:[u-m,d-m]});else if(n>o&&t<s){let y=[{row:[o,n-1],column:[u,d]},{row:[t+1,s],column:[u,d]},{row:[n,t],column:[u-m,d-m]}];g=g.concat(y)}else if(n>o){let y=[{row:[o,n-1],column:[u,d]},{row:[n,s],column:[u-m,d-m]}];g=g.concat(y)}else if(t<s){let y=[{row:[o,t],column:[u-m,d-m]},{row:[t+1,s],column:[u,d]}];g=g.concat(y)}}}}else if(e=="moveUp"){if(l>d||a<u||n>s)g.push({row:[o,s],column:[u,d]});else if(t<o){if(l<=u&&a>=d)g.push({row:[o-f,s-f],column:[u,d]});else if(l>u&&a<d){let y=[{row:[o,s],column:[u,l-1]},{row:[o,s],column:[a+1,d]},{row:[o-f,s-f],column:[l,a]}];g=g.concat(y)}else if(l>u){let y=[{row:[o,s],column:[u,l-1]},{row:[o-f,s-f],column:[l,d]}];g=g.concat(y)}else if(a<d){let y=[{row:[o-f,s-f],column:[u,a]},{row:[o,s],column:[a+1,d]}];g=g.concat(y)}}else if(t>=o){if(n<=o&&t>=s){if(l>u&&a<d){let y=[{row:[o,s],column:[u,l-1]},{row:[o,s],column:[a+1,d]}];g=g.concat(y)}else if(l>u){let y=[{row:[o,s],column:[u,l-1]}];g=g.concat(y)}else if(a<d){let y=[{row:[o,s],column:[a+1,d]}];g=g.concat(y)}}else if(n>o&&t<s){if(l<=u&&a>=d)g.push({row:[o,s-f],column:[u,d]});else if(l>u&&a<d){let y=[{row:[o,s],column:[u,l-1]},{row:[o,s],column:[a+1,d]},{row:[o,s-f],column:[l,a]}];g=g.concat(y)}else if(l>u){let y=[{row:[o,s],column:[u,l-1]},{row:[o,s-f],column:[l,d]}];g=g.concat(y)}else if(a<d){let y=[{row:[o,s-f],column:[u,a]},{row:[o,s],column:[a+1,d]}];g=g.concat(y)}}else if(n>o){if(l<=u&&a>=d)g.push({row:[o,n-1],column:[u,d]});else if(l>u&&a<d){let y=[{row:[o,s],column:[u,l-1]},{row:[o,s],column:[a+1,d]},{row:[o,n-1],column:[l,a]}];g=g.concat(y)}else if(l>u){let y=[{row:[o,s],column:[u,l-1]},{row:[o,n-1],column:[l,d]}];g=g.concat(y)}else if(a<d){let y=[{row:[o,n-1],column:[u,a]},{row:[o,s],column:[a+1,d]}];g=g.concat(y)}}else if(t<s){if(l<=u&&a>=d)g.push({row:[o-f,s-f],column:[u,d]});else if(l>u&&a<d){let y=[{row:[o,s],column:[u,l-1]},{row:[o,s],column:[a+1,d]},{row:[o-f,s-f],column:[l,a]}];g=g.concat(y)}else if(l>u){let y=[{row:[o,s],column:[u,l-1]},{row:[o-f,s-f],column:[l,d]}];g=g.concat(y)}else if(a<d){let y=[{row:[o-f,s-f],column:[u,a]},{row:[o,s],column:[a+1,d]}];g=g.concat(y)}}}}return g}var da=Ie(()=>{Jt();Ut();Yt();Kt();$r();gr();Vl();Zt();Lr();Ml();Nt();Xe()});function Ws(e,n,t,l,a){a==null&&(a=!0),h.visibledatarow=[],h.visibledatacolumn=[],h.ch_width=0,h.rh_height=0,h.zoomRatio=1,l!=null?h.config=l:h.config={},t.length==0?h.flowdata=cl(t,n,e):t.length<n&&t[0].length<e?h.flowdata=cl(t,n-t.length,e-t[0].length):t.length<n?h.flowdata=cl(t,n-t.length,0):t[0].length<e?h.flowdata=cl(t,0,e-t[0].length):h.flowdata=t,xe.webWorkerFlowDataCache(h.flowdata),yn(n,e),a&&(ve.showSheet(),setTimeout(function(){ve.restoreCache(),p.execFunctionGroup(),ve.restoreSheetAll(h.currentSheetIndex),Be()},1))}var Kd=Ie(()=>{Kt();Jt();Ii();Ut();Yt();fl();Xe()});var Ha,Xy,Je,Ll=Ie(()=>{Qt();Gt();fl();Ut();qr();yr();on();Vl();Nt();da();xl();Jt();Kd();Xe();Ha={defaultStore:{container:null,luckysheetfile:null,defaultcolumnNum:60,defaultrowNum:84,fullscreenmode:!0,devicePixelRatio:1,currentSheetIndex:0,calculateSheetIndex:0,flowdata:[],config:{},visibledatarow:[],visibledatacolumn:[],ch_width:0,rh_height:0,cellmainWidth:0,cellmainHeight:0,toolbarHeight:0,infobarHeight:0,calculatebarHeight:0,rowHeaderWidth:46,columnHeaderHeight:20,cellMainSrollBarSize:12,sheetBarHeight:31,statisticBarHeight:23,luckysheetTableContentHW:[0,0],defaultcollen:73,defaultrowlen:19,jfcountfuncTimeout:null,jfautoscrollTimeout:null,luckysheet_select_status:!1,luckysheet_select_save:[{row:[0,0],column:[0,0]}],luckysheet_selection_range:[],luckysheet_copy_save:{},luckysheet_paste_iscut:!1,filterchage:!0,luckysheet_filter_save:{row:[],column:[]},luckysheet_sheet_move_status:!1,luckysheet_sheet_move_data:[],luckysheet_scroll_status:!1,luckysheetisrefreshdetail:!0,luckysheetisrefreshtheme:!0,luckysheetcurrentisPivotTable:!1,luckysheet_rows_selected_status:!1,luckysheet_cols_selected_status:!1,luckysheet_rows_change_size:!1,luckysheet_rows_change_size_start:[],luckysheet_cols_change_size:!1,luckysheet_cols_change_size_start:[],luckysheet_cols_dbclick_timeout:null,luckysheet_cols_dbclick_times:0,luckysheetCellUpdate:[],luckysheet_shiftpositon:null,iscopyself:!0,orderbyindex:0,luckysheet_model_move_state:!1,luckysheet_model_xy:[0,0],luckysheet_model_move_obj:null,luckysheet_cell_selected_move:!1,luckysheet_cell_selected_move_index:[],luckysheet_cell_selected_extend:!1,luckysheet_cell_selected_extend_index:[],luckysheet_cell_selected_extend_time:null,clearjfundo:!0,jfredo:[],jfundo:[],lang:"en",createChart:"",highlightChart:"",zIndex:15,chartparam:{luckysheetCurrentChart:null,luckysheetCurrentChartActive:!1,luckysheetCurrentChartMove:null,luckysheetCurrentChartMoveTimeout:null,luckysheetCurrentChartMoveObj:null,luckysheetCurrentChartMoveXy:null,luckysheetCurrentChartMoveWinH:null,luckysheetCurrentChartMoveWinW:null,luckysheetCurrentChartResize:null,luckysheetCurrentChartResizeObj:null,luckysheetCurrentChartResizeXy:null,luckysheetCurrentChartResizeWinH:null,luckysheetCurrentChartResizeWinW:null,luckysheetInsertChartTosheetChange:!0,luckysheetCurrentChartZIndexRank:100,luckysheet_chart_redo_click:!1,luckysheetCurrentChartMaxState:!1,jfrefreshchartall:"",changeChartCellData:"",renderChart:"",getChartJson:""},functionList:null,luckysheet_function:null,chart_selection:{},currentChart:"",scrollRefreshSwitch:!0,measureTextCache:{},measureTextCellInfoCache:{},measureTextCacheTimeOut:null,cellOverflowMapCache:{},zoomRatio:1,visibledatacolumn_unique:null,visibledatarow_unique:null,showGridLines:!0,toobarObject:{},inlineStringEditCache:null,inlineStringEditRange:null,fontList:[],currentSheetView:"viewNormal"},defaultFormula:{searchFunctionCell:null,functionlistPosition:{},rangechangeindex:null,rangestart:!1,rangetosheet:null,rangeSetValueTo:null,func_selectedrange:{},rangedrag_column_start:!1,rangedrag_row_start:!1,rangeResizeObj:null,rangeResize:null,rangeResizeIndex:null,rangeResizexy:null,rangeResizeWinH:null,rangeResizeWinW:null,rangeResizeTo:null,rangeMovexy:null,rangeMove:!1,rangeMoveObj:null,rangeMoveIndex:null,rangeMoveRangedata:null,functionHTMLIndex:0,functionRangeIndex:null,execvertex:{},execFunctionGroupData:null,execFunctionExist:null,formulaContainSheetList:{},cellTextToIndexList:{},isFunctionRangeSave:!1,formulaContainCellList:{},execFunctionGlobalData:{},groupValuesRefreshData:[],functionResizeData:{},functionResizeStatus:!1,functionResizeTimeout:null,data_parm_index:0},defaultSheet:{sheetMaxIndex:0,nulldata:null,mergeCalculationSheet:{},checkLoadSheetIndexToDataIndex:{},CacheNotLoadControll:[]},defaultPivotTable:{pivotDatas:null,pivotSheetIndex:0,pivotDataSheetIndex:0,celldata:null,origindata:null,pivot_data_type:{},pivot_select_save:null,column:null,row:null,values:null,filter:null,showType:null,rowhidden:null,selected:null,caljs:null,initial:!0,filterparm:null,luckysheet_pivotTable_select_state:!1,jgridCurrentPivotInput:null,movestate:!1,moveitemposition:[],movesave:{},drawPivotTable:!0,pivotTableBoundary:[12,6]},defaultImage:{imgItem:{type:"3",src:"",originWidth:null,originHeight:null,default:{width:null,height:null,left:null,top:null},crop:{width:null,height:null,offsetLeft:0,offsetTop:0},isFixedPos:!1,fixedLeft:null,fixedTop:null,border:{width:0,radius:0,style:"solid",color:"#000"}},images:null,currentImgId:null,currentWinW:null,currentWinH:null,resize:null,resizeXY:null,move:!1,moveXY:null,cropChange:null,cropChangeXY:null,cropChangeObj:null,copyImgItemObj:null},defaultDataVerification:{defaultItem:{type:"dropdown",type2:null,value1:"",value2:"",checked:!1,remote:!1,prohibitInput:!1,hintShow:!1,hintText:""},curItem:null,dataVerification:null,selectRange:[],selectStatus:!1}},Xy={addDataAjax:function(e,n,t,l){let a=this;n==null&&(n=h.currentSheetIndex),t==null&&(t=ne.loadSheetUrl),$("#luckysheet-grid-window-1").append(Er()),e.currentPage++;let o="application/json;charset=UTF-8",s=sessionStorage.getItem("x-auth-token");$.ajax({method:"POST",url:t,headers:{"x-auth-token":s},data:JSON.stringify(e),contentType:o,success:function(u){typeof u=="string"&&(u=JSON.parse(u));let d=u.data,f=d.celldata;ko(d.row,f),setTimeout(function(){h.loadingObj.close()},500),l&&typeof l=="function"&&l(d)}})},reload:function(e,n,t,l){let a=this;n==null&&(n=h.currentSheetIndex),t==null&&(t=ne.loadSheetUrl),$("#luckysheet-grid-window-1").append(Er());let o={gridKey:ne.gridKey,index:n};e=$.extend(!0,e,o);let s=h.luckysheetfile[Z(n)];$.post(t,e,function(u){let d=new Function("return "+u)();s.celldata=d[n.toString()];let f=ve.buildGridData(s);setTimeout(function(){h.loadingObj.close()},500),s.data=f,h.flowdata=f,xe.webWorkerFlowDataCache(f),Ws(f[0].length,f.length,f,null,!1),s.load="1",h.luckysheet_select_save.length=0,h.luckysheet_selection_range=[],ne.saveParam("shs",null,h.currentSheetIndex),ve.changeSheet(n),l&&typeof l=="function"&&l()})},clearSheetByIndex:function(e){let n=Z(e),t=h.luckysheetfile[n];t.isPivotTable?delete h.luckysheetfile[n]:(t.data=[],t.row=h.defaultrowNum,t.column=h.defaultcolumnNum,t.chart=[],t.config=null,t.filter=null,t.filter_select=null,t.celldata=[],t.pivotTable={},t.calcChain=[],t.status=0,t.load=0,h.flowdata=[],xe.webWorkerFlowDataCache(h.flowdata),$("#"+h.container+" .luckysheet-data-visualization-chart").remove(),$("#"+h.container+" .luckysheet-datavisual-selection-set").remove(),$("#luckysheet-row-count-show, #luckysheet-formula-functionrange-select, #luckysheet-row-count-show, #luckysheet-column-count-show, #luckysheet-change-size-line, #luckysheet-cell-selected-focus, #luckysheet-selection-copy, #luckysheet-cell-selected-extend, #luckysheet-cell-selected-move, #luckysheet-cell-selected").hide(),delete t.load)},clear:function(e){let n=this;if(e=="all")for(let t=0;t<h.luckysheetfile.length;t++){let l=h.luckysheetfile[t];n.clearSheetByIndex(l.index)}else e==null&&(e=h.currentSheetIndex),n.clearSheetByIndex(e);ve.changeSheet(h.luckysheetfile[0].index)},destroy:function(){$("#"+h.container).empty(),$("body > .luckysheet-cols-menu").remove(),$("#luckysheet-modal-dialog-mask, #luckysheetTextSizeTest, #luckysheet-icon-morebtn-div").remove(),$("#luckysheet-input-box").parent().remove(),$("#luckysheet-formula-help-c").remove(),$(".chartSetting, .luckysheet-modal-dialog-slider").remove(),$(document).off(".luckysheetEvent"),$(document).off(".luckysheetProtection"),Y.initialHorizontal=!0,Y.initialVertical=!0;let e=$.extend(!0,{},Ha.defaultStore);for(let s in e)s in h&&(h[s]=e[s]);let n=$.extend(!0,{},Ha.defaultFormula);for(let s in n)s in p&&(p[s]=n[s]);let t=$.extend(!0,{},Ha.defaultSheet);for(let s in t)s in ve&&(ve[s]=t[s]);let l=$.extend(!0,{},Ha.defaultPivotTable);for(let s in l)s in Oe&&(Oe[s]=l[s]);let a=$.extend(!0,{},Ha.defaultImage);for(let s in a)s in Re&&(Re[s]=a[s]);let o=$.extend(!0,{},Ha.defaultDataVerification);for(let s in o)s in Ye&&(Ye[s]=o[s]);h.asyncLoad=["core"]},editorChart:function(e){let n=Yl[0],t="luckysheetEditMode-datav-chart",l=t+"_selection";e.chart_id=t;let a=e.chartTheme;a=a==null?"default0000":a,luckysheet.insertChartTosheet(e.sheetIndex,e.dataSheetIndex,e.option,e.chartType,e.selfOption,e.defaultOption,e.row,e.column,n,t,l,e.chartStyle,e.rangeConfigCheck,e.rangeRowCheck,e.rangeColCheck,e.chartMarkConfig,e.chartTitleConfig,e.winWidth,e.winHeight,e.scrollLeft,e.scrollTop,a,e.myWidth,e.myHeight,e.myLeft!=null?parseFloat(e.myLeft):null,e.myTop!=null?parseFloat(e.myTop):null,e.myindexrank,!0),$("#"+t).find(".luckysheet-modal-controll-update").click()},createHookFunction:function(){let e=arguments[0];if(fe.hook&&fe.hook[e]!=null&&typeof fe.hook[e]=="function"){var n=Array.prototype.slice.apply(arguments);return n.shift(),fe.hook[e].apply(this,n)!==!1}return!0}},Je=Xy});var Ky,He,Ur=Ie(()=>{Ol();Jt();Ut();pn();Yt();An();Nt();dt();Vl();il();Ml();Qt();Xe();Ll();Ky={defaultWidth:144,defaultHeight:84,currentObj:null,currentWinW:null,currentWinH:null,resize:null,resizeXY:null,move:!1,moveXY:null,init:function(){let e=this;$("#luckysheet-postil-showBoxs").off("mousedown.showPs").on("mousedown.showPs",".luckysheet-postil-show",function(n){if(!!$t(h.currentSheetIndex,"editObjects",!1)){if(e.currentObj=$(this).find(".luckysheet-postil-show-main"),$(this).hasClass("luckysheet-postil-show-active")){n.stopPropagation();return}e.removeActivePs(),$(this).addClass("luckysheet-postil-show-active"),$(this).find(".luckysheet-postil-dialog-resize").show(),$(this).find(".arrowCanvas").css("z-index",200),$(this).find(".luckysheet-postil-show-main").css("z-index",200),n.stopPropagation()}}),$("#luckysheet-postil-showBoxs").off("mouseup.showPs").on("mouseup.showPs",".luckysheet-postil-show",function(n){n.which=="3"&&n.stopPropagation()}),$("#luckysheet-postil-showBoxs").off("mousedown.resize").on("mousedown.resize",".luckysheet-postil-show .luckysheet-postil-dialog-resize .luckysheet-postil-dialog-resize-item",function(n){if(!$t(h.currentSheetIndex,"editObjects",!1))return;e.currentObj=$(this).closest(".luckysheet-postil-show-main"),e.currentWinW=$("#luckysheet-cell-main")[0].scrollWidth,e.currentWinH=$("#luckysheet-cell-main")[0].scrollHeight,e.resize=$(this).data("type");let t=$("#luckysheet-cell-main").scrollTop(),l=$("#luckysheet-cell-main").scrollLeft(),a=nt(n.pageX,n.pageY),o=a[0]+l,s=a[1]+t,u=e.currentObj.position(),d=e.currentObj.width(),f=e.currentObj.height();if(e.resizeXY=[o,s,d,f,u.left+l,u.top+t,l,t],Qr(!0),$(this).closest(".luckysheet-postil-show").hasClass("luckysheet-postil-show-active")){n.stopPropagation();return}e.removeActivePs(),$(this).closest(".luckysheet-postil-show").addClass("luckysheet-postil-show-active"),$(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-dialog-resize").show(),$(this).closest(".luckysheet-postil-show").find(".arrowCanvas").css("z-index",200),$(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-show-main").css("z-index",200),n.stopPropagation()}),$("#luckysheet-postil-showBoxs").off("mousedown.move").on("mousedown.move",".luckysheet-postil-show .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item",function(n){if(!$t(h.currentSheetIndex,"editObjects",!1))return;e.currentObj=$(this).closest(".luckysheet-postil-show-main"),e.currentWinW=$("#luckysheet-cell-main")[0].scrollWidth,e.currentWinH=$("#luckysheet-cell-main")[0].scrollHeight,e.move=!0;let t=$("#luckysheet-cell-main").scrollTop(),l=$("#luckysheet-cell-main").scrollLeft(),a=e.currentObj.offset(),o=e.currentObj.position();if(e.moveXY=[n.pageX-a.left,n.pageY-a.top,o.left,o.top,l,t],Qr(!0),$(this).closest(".luckysheet-postil-show").hasClass("luckysheet-postil-show-active")){n.stopPropagation();return}e.removeActivePs(),$(this).closest(".luckysheet-postil-show").addClass("luckysheet-postil-show-active"),$(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-dialog-resize").show(),$(this).closest(".luckysheet-postil-show").find(".arrowCanvas").css("z-index",200),$(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-show-main").css("z-index",200),n.stopPropagation()})},overshow:function(e){let n=this;if($("#luckysheet-postil-overshow").remove(),$(e.target).closest("#luckysheet-cell-main").length==0)return;let t=nt(e.pageX,e.pageY),l=$("#luckysheet-cell-main").scrollLeft(),a=$("#luckysheet-cell-main").scrollTop(),o=t[0],s=t[1],u=0,d=0;Y.freezenverticaldata!=null&&t[0]<Y.freezenverticaldata[0]-Y.freezenverticaldata[2]?u=l:o+=l,Y.freezenhorizontaldata!=null&&t[1]<Y.freezenhorizontaldata[0]-Y.freezenhorizontaldata[2]?d=a:s+=a;let f=_t(s)[2],m=wt(o)[2],g=ke.mergeborer(h.flowdata,f,m);if(g&&(f=g.row[2],m=g.column[2]),h.flowdata[f]==null||h.flowdata[f][m]==null||h.flowdata[f][m].ps==null)return;let y=h.flowdata[f][m].ps;if(y.isshow||$("#luckysheet-postil-show_"+f+"_"+m).length>0)return;let v=y.value==null?"":y.value,b=h.visibledatarow[f],k=f-1==-1?0:h.visibledatarow[f-1],w=h.visibledatacolumn[m],x=m-1==-1?0:h.visibledatacolumn[m-1];g&&(b=g.row[1],k=g.row[0],w=g.column[1],x=g.column[0]);let C=w+u,S=k+d,_=C+18*h.zoomRatio,T=S-18*h.zoomRatio;T<0&&(T=2);let A=y.width==null?n.defaultWidth*h.zoomRatio:y.width*h.zoomRatio,R=y.height==null?n.defaultHeight*h.zoomRatio:y.height*h.zoomRatio,I=n.getArrowCanvasSize(_,T,C,S),F="",z=v.split(` |
| | | `);for(let N of z)F+="<div>"+n.htmlEscape(N)+"</div>";let M='<div id="luckysheet-postil-overshow"><canvas class="arrowCanvas" width="'+I[2]+'" height="'+I[3]+'" style="position:absolute;left:'+I[0]+"px;top:"+I[1]+'px;z-index:100;pointer-events:none;"></canvas><div style="width:'+(A-12)+"px;min-height:"+(R-12)+"px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:"+_+"px;top:"+T+'px;z-index:100;">'+F+"</div></div>";$(M).appendTo($("#luckysheet-cell-main"));let E=$("#luckysheet-postil-overshow .arrowCanvas").get(0).getContext("2d");n.drawArrow(E,I[4],I[5],I[6],I[7])},getArrowCanvasSize:function(e,n,t,l){let a=t-5;e<t&&(a=e-5);let o=l-5;n<l&&(o=n-5);let s=Math.abs(e-t)+10,u=Math.abs(n-l)+10,d=s-5,f=5;e<t&&(d=5,f=s-5);let m=u-5,g=5;return n<l&&(m=5,g=u-5),[a,o,s,u,d,m,f,g]},drawArrow:function(e,n,t,l,a,o,s,u,d){o=P(o)=="undefined"?30:o,s=P(s)=="undefined"?6:s,u=P(u)=="undefined"?1:u,d=P(d)=="undefined"?"#000":d;let f=Math.atan2(t-a,n-l)*180/Math.PI,m=(f+o)*Math.PI/180,g=(f-o)*Math.PI/180,y=s*Math.cos(m),v=s*Math.sin(m),b=s*Math.cos(g),k=s*Math.sin(g);e.save(),e.beginPath();let w=n-y,x=t-v;e.moveTo(w,x),e.moveTo(n,t),e.lineTo(l,a),e.lineWidth=u,e.strokeStyle=d,e.stroke(),w=l+y,x=a+v,e.moveTo(w,x),e.lineTo(l,a),w=l+b,x=a+k,e.lineTo(w,x),e.fillStyle=d,e.fill(),e.restore()},buildAllPs:function(e){let n=this;$("#luckysheet-cell-main #luckysheet-postil-showBoxs").empty();for(let t=0;t<e.length;t++)for(let l=0;l<e[0].length;l++)if(e[t][l]!=null&&e[t][l].ps!=null){let a=e[t][l].ps;n.buildPs(t,l,a)}n.init()},buildPs:function(e,n,t){if($("#luckysheet-postil-show_"+e+"_"+n).length>0&&$("#luckysheet-postil-show_"+e+"_"+n).remove(),t==null)return;let l=this;if(t.isshow==null?!1:t.isshow){let o=h.visibledatarow[e],s=e-1==-1?0:h.visibledatarow[e-1],u=h.visibledatacolumn[n],d=n-1==-1?0:h.visibledatacolumn[n-1],f=ke.mergeborer(h.flowdata,e,n);f&&(o=f.row[1],s=f.row[0],u=f.column[1],d=f.column[0]);let m=u,g=s,y=t.left==null?m+18*h.zoomRatio:t.left*h.zoomRatio,v=t.top==null?g-18*h.zoomRatio:t.top*h.zoomRatio,b=t.width==null?l.defaultWidth*h.zoomRatio:t.width*h.zoomRatio,k=t.height==null?l.defaultHeight*h.zoomRatio:t.height*h.zoomRatio,w=t.value==null?"":t.value;v<0&&(v=2);let x=l.getArrowCanvasSize(y,v,m,g),C="",S=w.split(` |
| | | `);for(let A of S)C+="<div>"+l.htmlEscape(A)+"</div>";let _='<div id="luckysheet-postil-show_'+e+"_"+n+'" class="luckysheet-postil-show"><canvas class="arrowCanvas" width="'+x[2]+'" height="'+x[3]+'" style="position:absolute;left:'+x[0]+"px;top:"+x[1]+'px;z-index:100;pointer-events:none;"></canvas><div class="luckysheet-postil-show-main" style="width:'+b+"px;height:"+k+"px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:"+y+"px;top:"+v+'px;box-sizing:border-box;z-index:100;"><div class="luckysheet-postil-dialog-move"><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-t" data-type="t"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-r" data-type="r"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-b" data-type="b"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-l" data-type="l"></div></div><div class="luckysheet-postil-dialog-resize" style="display:none;"><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lt" data-type="lt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mt" data-type="mt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lm" data-type="lm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rm" data-type="rm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rt" data-type="rt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lb" data-type="lb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mb" data-type="mb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rb" data-type="rb"></div></div><div style="width:100%;height:100%;overflow:hidden;"><div class="formulaInputFocus" style="width:'+(b-12)+"px;height:"+(k-12)+'px;line-height:20px;box-sizing:border-box;text-align: center;;word-break:break-all;" spellcheck="false" contenteditable="true">'+C+"</div></div></div></div>";$(_).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs"));let T=$("#luckysheet-postil-show_"+e+"_"+n+" .arrowCanvas").get(0).getContext("2d");l.drawArrow(T,x[4],x[5],x[6],x[7])}},newPs:function(e,n){if(!$t(h.currentSheetIndex,"editObjects")||!Je.createHookFunction("commentInsertBefore",e,n))return;let t=this,l=h.visibledatarow[e],a=e-1==-1?0:h.visibledatarow[e-1],o=h.visibledatacolumn[n],s=n-1==-1?0:h.visibledatacolumn[n-1],u=ke.mergeborer(h.flowdata,e,n);u&&(l=u.row[1],a=u.row[0],o=u.column[1],s=u.column[0]);let d=o,f=a,m=d+18*h.zoomRatio,g=f-18*h.zoomRatio;g<0&&(g=2);let y=t.defaultWidth*h.zoomRatio,v=t.defaultHeight*h.zoomRatio,b=t.getArrowCanvasSize(m,g,d,f),k='<div id="luckysheet-postil-show_'+e+"_"+n+'" class="luckysheet-postil-show luckysheet-postil-show-active"><canvas class="arrowCanvas" width="'+b[2]+'" height="'+b[3]+'" style="position:absolute;left:'+b[0]+"px;top:"+b[1]+'px;z-index:100;pointer-events:none;"></canvas><div class="luckysheet-postil-show-main" style="width:'+y+"px;height:"+v+"px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:"+m+"px;top:"+g+'px;box-sizing:border-box;z-index:100;"><div class="luckysheet-postil-dialog-move"><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-t" data-type="t"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-r" data-type="r"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-b" data-type="b"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-l" data-type="l"></div></div><div class="luckysheet-postil-dialog-resize"><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lt" data-type="lt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mt" data-type="mt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lm" data-type="lm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rm" data-type="rm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rt" data-type="rt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lb" data-type="lb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mb" data-type="mb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rb" data-type="rb"></div></div><div style="width:100%;height:100%;overflow:hidden;"><div class="formulaInputFocus" style="width:132px;height:72px;line-height:20px;box-sizing:border-box;text-align: center;word-break:break-all;" spellcheck="false" contenteditable="true"></div></div></div></div>';$(k).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs"));let w=$("#luckysheet-postil-show_"+e+"_"+n+" .arrowCanvas").get(0).getContext("2d");t.drawArrow(w,b[4],b[5],b[6],b[7]),$("#luckysheet-postil-show_"+e+"_"+n+" .formulaInputFocus").focus(),t.init();let x=xe.deepCopyFlowData(h.flowdata),C=[];x[e][n]==null&&(x[e][n]={}),x[e][n].ps={left:null,top:null,width:null,height:null,value:"",isshow:!1},C.push(e+"_"+n),t.ref(x,C),setTimeout(()=>{Je.createHookFunction("commentInsertAfter",e,n,x[e][n])},0)},editPs:function(e,n){let t=this;if(!!$t(h.currentSheetIndex,"editObjects")){if($("#luckysheet-postil-show_"+e+"_"+n).length>0)$("#luckysheet-postil-show_"+e+"_"+n).show(),$("#luckysheet-postil-show_"+e+"_"+n).addClass("luckysheet-postil-show-active"),$("#luckysheet-postil-show_"+e+"_"+n).find(".luckysheet-postil-dialog-resize").show();else{let l=h.flowdata[e][n].ps,a=h.visibledatarow[e],o=e-1==-1?0:h.visibledatarow[e-1],s=h.visibledatacolumn[n],u=n-1==-1?0:h.visibledatacolumn[n-1],d=ke.mergeborer(h.flowdata,e,n);d&&(a=d.row[1],o=d.row[0],s=d.column[1],u=d.column[0]);let f=s,m=o,g=l.left==null?f+18*h.zoomRatio:l.left*h.zoomRatio,y=l.top==null?m-18*h.zoomRatio:l.top*h.zoomRatio,v=l.width==null?t.defaultWidth*h.zoomRatio:l.width*h.zoomRatio,b=l.height==null?t.defaultHeight*h.zoomRatio:l.height*h.zoomRatio,k=l.value==null?"":l.value;y<0&&(y=2);let w=t.getArrowCanvasSize(g,y,f,m),x="",C=k.split(` |
| | | `);for(let T of C)x+="<div>"+t.htmlEscape(T)+"</div>";let S='<div id="luckysheet-postil-show_'+e+"_"+n+'" class="luckysheet-postil-show luckysheet-postil-show-active"><canvas class="arrowCanvas" width="'+w[2]+'" height="'+w[3]+'" style="position:absolute;left:'+w[0]+"px;top:"+w[1]+'px;z-index:100;pointer-events:none;"></canvas><div class="luckysheet-postil-show-main" style="width:'+v+"px;height:"+b+"px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:"+g+"px;top:"+y+'px;box-sizing:border-box;z-index:100;"><div class="luckysheet-postil-dialog-move"><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-t" data-type="t"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-r" data-type="r"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-b" data-type="b"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-l" data-type="l"></div></div><div class="luckysheet-postil-dialog-resize"><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lt" data-type="lt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mt" data-type="mt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lm" data-type="lm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rm" data-type="rm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rt" data-type="rt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lb" data-type="lb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mb" data-type="mb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rb" data-type="rb"></div></div><div style="width:100%;height:100%;overflow:hidden;"><div class="formulaInputFocus" style="width:'+(v-12)+"px;height:"+(b-12)+'px;line-height:20px;box-sizing:border-box;text-align: center;;word-break:break-all;" spellcheck="false" contenteditable="true">'+x+"</div></div></div></div>";$(S).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs"));let _=$("#luckysheet-postil-show_"+e+"_"+n+" .arrowCanvas").get(0).getContext("2d");t.drawArrow(_,w[4],w[5],w[6],w[7])}$("#luckysheet-postil-show_"+e+"_"+n+" .formulaInputFocus").focus(),_r($("#luckysheet-postil-show_"+e+"_"+n+" .formulaInputFocus").get(0)),t.init()}},delPs:function(e,n){if(!$t(h.currentSheetIndex,"editObjects")||!Je.createHookFunction("commentDeleteBefore",e,n,h.flowdata[e][n]))return;$("#luckysheet-postil-show_"+e+"_"+n).length>0&&$("#luckysheet-postil-show_"+e+"_"+n).remove();let t=xe.deepCopyFlowData(h.flowdata),l=[];delete t[e][n].ps,l.push(e+"_"+n),this.ref(t,l),setTimeout(()=>{Je.createHookFunction("commentDeleteAfter",e,n,h.flowdata[e][n])},0)},showHidePs:function(e,n){let t=this,l=h.flowdata[e][n].ps,a=l.isshow,o=xe.deepCopyFlowData(h.flowdata),s=[];if(a)o[e][n].ps.isshow=!1,$("#luckysheet-postil-show_"+e+"_"+n).remove();else{o[e][n].ps.isshow=!0;let u=h.visibledatarow[e],d=e-1==-1?0:h.visibledatarow[e-1],f=h.visibledatacolumn[n],m=n-1==-1?0:h.visibledatacolumn[n-1],g=ke.mergeborer(h.flowdata,e,n);g&&(u=g.row[1],d=g.row[0],f=g.column[1],m=g.column[0]);let y=$("#luckysheet-cell-main").scrollLeft(),v=$("#luckysheet-cell-main").scrollTop(),b=f,k=d;Y.freezenverticaldata!=null&&b<Y.freezenverticaldata[0]-Y.freezenverticaldata[2]&&(b+=y),Y.freezenhorizontaldata!=null&&k<Y.freezenhorizontaldata[0]-Y.freezenhorizontaldata[2]&&(k+=v);let w=l.left==null?b+18*h.zoomRatio:l.left*h.zoomRatio,x=l.top==null?k-18*h.zoomRatio:l.top*h.zoomRatio,C=l.width==null?t.defaultWidth*h.zoomRatio:l.width*h.zoomRatio,S=l.height==null?t.defaultHeight*h.zoomRatio:l.height*h.zoomRatio,_=l.value==null?"":l.value;x<0&&(x=2);let T=t.getArrowCanvasSize(w,x,b,k),A="",R=_.split(` |
| | | `);for(let z of R)A+="<div>"+t.htmlEscape(z)+"</div>";let I='<div id="luckysheet-postil-show_'+e+"_"+n+'" class="luckysheet-postil-show"><canvas class="arrowCanvas" width="'+T[2]+'" height="'+T[3]+'" style="position:absolute;left:'+T[0]+"px;top:"+T[1]+'px;z-index:100;pointer-events:none;"></canvas><div class="luckysheet-postil-show-main" style="width:'+C+"px;height:"+S+"px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:"+w+"px;top:"+x+'px;box-sizing:border-box;z-index:100;"><div class="luckysheet-postil-dialog-move"><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-t" data-type="t"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-r" data-type="r"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-b" data-type="b"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-l" data-type="l"></div></div><div class="luckysheet-postil-dialog-resize" style="display:none;"><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lt" data-type="lt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mt" data-type="mt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lm" data-type="lm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rm" data-type="rm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rt" data-type="rt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lb" data-type="lb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mb" data-type="mb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rb" data-type="rb"></div></div><div style="width:100%;height:100%;overflow:hidden;"><div class="formulaInputFocus" style="width:'+(C-12)+"px;height:"+(S-12)+'px;line-height:20px;box-sizing:border-box;text-align: center;;word-break:break-all;" spellcheck="false" contenteditable="true">'+A+"</div></div></div></div>";$(I).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs"));let F=$("#luckysheet-postil-show_"+e+"_"+n+" .arrowCanvas").get(0).getContext("2d");t.drawArrow(F,T[4],T[5],T[6],T[7]),t.init()}s.push(e+"_"+n),t.ref(o,s)},showHideAllPs:function(){let e=this,n=xe.deepCopyFlowData(h.flowdata),t=!0,l=[];for(let o=0;o<n.length;o++)for(let s=0;s<n[0].length;s++)n[o]!=null&&n[o][s]!=null&&n[o][s].ps!=null&&(l.push(o+"_"+s),n[o][s].ps.isshow||(t=!1));let a=[];if(l.length>0)if(t){$("#luckysheet-cell-main #luckysheet-postil-showBoxs").empty();for(let o=0;o<l.length;o++){let s=l[o].split("_")[0],u=l[o].split("_")[1];n[s][u].ps.isshow&&(n[s][u].ps.isshow=!1,a.push(l[o]))}}else for(let o=0;o<l.length;o++){let s=l[o].split("_")[0],u=l[o].split("_")[1],d=n[s][u].ps;if(!d.isshow){let f=h.visibledatarow[s],m=s-1==-1?0:h.visibledatarow[s-1],g=h.visibledatacolumn[u],y=u-1==-1?0:h.visibledatacolumn[u-1],v=ke.mergeborer(h.flowdata,s,u);v&&(f=v.row[1],m=v.row[0],g=v.column[1],y=v.column[0]);let b=$("#luckysheet-cell-main").scrollLeft(),k=$("#luckysheet-cell-main").scrollTop(),w=g,x=m;Y.freezenverticaldata!=null&&w<Y.freezenverticaldata[0]-Y.freezenverticaldata[2]&&(w+=b),Y.freezenhorizontaldata!=null&&x<Y.freezenhorizontaldata[0]-Y.freezenhorizontaldata[2]&&(x+=k);let C=d.left==null?w+18*h.zoomRatio:d.left*h.zoomRatio,S=d.top==null?x-18*h.zoomRatio:d.top*h.zoomRatio,_=d.width==null?e.defaultWidth*h.zoomRatio:d.width*h.zoomRatio,T=d.height==null?e.defaultHeight*h.zoomRatio:d.height*h.zoomRatio,A=d.value==null?"":d.value;S<0&&(S=2);let R=e.getArrowCanvasSize(C,S,w,x),I="",F=A.split(` |
| | | <button class="btn btn-default luckysheet-model-close-btn">${a.cancel}</button>`,style:"z-index:100003"}));let s=$("#luckysheet-dataVerification-dialog").find(".luckysheet-modal-dialog-content").css("min-width",350).end(),u=s.outerHeight(),f=s.outerWidth(),d=$(window).width(),m=$(window).height(),g=$(document).scrollLeft(),y=$(document).scrollTop();$("#luckysheet-dataVerification-dialog").css({left:(d+g-f)/2,top:(m+y-u)/3}).show(),e.dataAllocation()},init:function(){let e=this,n=Q().dataVerification;$(document).off("click.dropdownBtn").on("click.dropdownBtn","#luckysheet-dataVerification-dropdown-btn",function(t){e.dropdownListShow(),t.stopPropagation()}),$(document).off("click.dropdownListItem").on("click.dropdownListItem","#luckysheet-dataVerification-dropdown-List .dropdown-List-item",function(t){var l=$(this);let a=t.target.innerText;l.hasClass("multi")?(l.toggleClass("checked"),a=$.map($("#luckysheet-dataVerification-dropdown-List").children().filter(".checked"),function(f){return f.innerText}).join(",")):$("#luckysheet-dataVerification-dropdown-List").hide();let o=h.luckysheet_select_save[h.luckysheet_select_save.length-1],s=o.row_focus,u=o.column_focus;$("#luckysheet-rich-text-editor").text(a),p.updatecell(s,u),t.stopPropagation()}),$(document).off("click.dvRange").on("click.dvRange","#data-verification-range .fa-table",function(t){$("#luckysheet-dataVerification-dialog").hide();let l="0",a=$(this).siblings("input").val().trim();e.rangeDialog(l,a),e.selectRange=[];let o=e.getRangeByTxt(a);if(p.rangetosheet=h.currentSheetIndex,o[0].sheetIndex!=h.currentSheetIndex&&ve.changeSheetExec(o[0].sheetIndex),o.length>0)for(let s=0;s<o.length;s++){let u=o[s].row[0],f=o[s].row[1],d=o[s].column[0],m=o[s].column[1],g=h.visibledatarow[f],y=u-1==-1?0:h.visibledatarow[u-1],v=h.visibledatacolumn[m],b=d-1==-1?0:h.visibledatacolumn[d-1];e.selectRange.push({left:b,width:v-b-1,top:y,height:g-y-1,left_move:b,width_move:v-b-1,top_move:y,height_move:g-y-1,row:[u,f],column:[d,m],row_focus:u,column_focus:d})}Ot(e.selectRange)}),$(document).off("click.dvRange2").on("click.dvRange2","#luckysheet-dataVerification-dialog .show-box-item-dropdown .range .fa-table",function(t){$("#luckysheet-dataVerification-dialog").hide();let l="1",a=$(this).siblings("input").val().trim();e.rangeDialog(l,a),e.selectRange=[];let o=e.getRangeByTxt(a);if(p.rangetosheet=h.currentSheetIndex,o[0].sheetIndex!=h.currentSheetIndex&&ve.changeSheetExec(o[0].sheetIndex),o.length>0)for(let s=0;s<o.length;s++){let u=o[s].row[0],f=o[s].row[1],d=o[s].column[0],m=o[s].column[1],g=h.visibledatarow[f],y=u-1==-1?0:h.visibledatarow[u-1],v=h.visibledatacolumn[m],b=d-1==-1?0:h.visibledatacolumn[d-1];e.selectRange.push({left:b,width:v-b-1,top:y,height:g-y-1,left_move:b,width_move:v-b-1,top_move:y,height_move:g-y-1,row:[u,f],column:[d,m],row_focus:u,column_focus:d})}Ot(e.selectRange)}),$(document).off("click.dvRangeConfirm").on("click.dvRangeConfirm","#luckysheet-dataVerificationRange-dialog-confirm",function(t){let l=$(this).attr("data-source"),a=$(this).parents("#luckysheet-dataVerificationRange-dialog").find("input").val();if(e.getRangeByTxt(a).length>1){U.info('<i class="fa fa-exclamation-triangle"></i>',"\u4E0D\u80FD\u5BF9\u591A\u91CD\u9009\u62E9\u533A\u57DF\u6267\u884C\u6B64\u64CD\u4F5C\uFF0C\u8BF7\u9009\u62E9\u5355\u4E2A\u533A\u57DF\uFF0C\u7136\u540E\u518D\u8BD5");return}l=="0"?$("#luckysheet-dataVerification-dialog #data-verification-range input").val(a):l=="1"&&$("#luckysheet-dataVerification-dialog .show-box-item-dropdown .range input").val(a),$("#luckysheet-dataVerificationRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-dataVerification-dialog").show(),p.rangetosheet!=null&&p.rangetosheet!=h.currentSheetIndex&&(ve.changeSheetExec(p.rangetosheet),p.rangetosheet=null),Ot([])}),$(document).off("click.dvRangeClose").on("click.dvRangeClose","#luckysheet-dataVerificationRange-dialog-close",function(t){$("#luckysheet-dataVerificationRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-dataVerification-dialog").show(),p.rangetosheet!=null&&p.rangetosheet!=h.currentSheetIndex&&(ve.changeSheetExec(p.rangetosheet),p.rangetosheet=null),Ot([])}),$(document).on("click","#luckysheet-dataVerificationRange-dialog .luckysheet-modal-dialog-title-close",function(t){$("#luckysheet-dataVerificationRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-dataVerification-dialog").show(),p.rangetosheet!=null&&p.rangetosheet!=h.currentSheetIndex&&(ve.changeSheetExec(p.rangetosheet),p.rangetosheet=null),Ot([])}),$(document).off("change.typeSelect").on("change.typeSelect","#data-verification-type-select",function(t){$("#luckysheet-dataVerification-dialog .show-box .show-box-item").hide();let l=this.value,a=e.curItem;if(l=="dropdown"){$("#luckysheet-dataVerification-dialog .show-box .show-box-item-dropdown").show();let o="";l==a.type&&(o=a.value1),$("#luckysheet-dataVerification-dialog .show-box-item-dropdown .data-verification-value1").val(o),$("#luckysheet-dataVerification-dialog #data-verification-multi").prop("checked",!!a.type2)}else if(l=="checkbox"){$("#luckysheet-dataVerification-dialog .show-box .show-box-item-checkbox").show();let o="",s="";l==a.type&&(o=a.value1,s=a.value2),$("#luckysheet-dataVerification-dialog .show-box-item-checkbox .data-verification-value1").val(o),$("#luckysheet-dataVerification-dialog .show-box-item-checkbox .data-verification-value2").val(s)}else if(l=="number"||l=="number_integer"||l=="number_decimal"){$("#luckysheet-dataVerification-dialog .show-box-item-number").show(),$("#luckysheet-dataVerification-dialog .show-box-item-number .input").hide();let o="bw",s="",u="";(a.type=="number"||a.type=="number_integer"||a.type=="number_decimal")&&(o=a.type2,s=a.value1,u=a.value2),$("#luckysheet-dataVerification-dialog #data-verification-number-select").val(o),o=="bw"||o=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-number .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-number .input2").show(),$("#luckysheet-dataVerification-dialog .show-box-item-number .data-verification-value1").val(s),$("#luckysheet-dataVerification-dialog .show-box-item-number .data-verification-value2").val(u)}else if(l=="text_content"){$("#luckysheet-dataVerification-dialog .show-box-item-text").show();let o="include",s="";l==a.type&&(o=a.type2,s=a.value1),$("#luckysheet-dataVerification-dialog #data-verification-text-select").val(o),$("#luckysheet-dataVerification-dialog .show-box-item-text .data-verification-value1").val(s)}else if(l=="text_length"){$("#luckysheet-dataVerification-dialog .show-box-item-textLength").show(),$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input").hide();let o="bw",s="",u="";l==a.type&&(o=a.type2,s=a.value1,u=a.value2),$("#luckysheet-dataVerification-dialog #data-verification-textLength-select").val(o),o=="bw"||o=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input2").show(),$("#luckysheet-dataVerification-dialog .show-box-item-textLength .data-verification-value1").val(s),$("#luckysheet-dataVerification-dialog .show-box-item-textLength .data-verification-value2").val(u)}else if(l=="date"){$("#luckysheet-dataVerification-dialog .show-box-item-date").show(),$("#luckysheet-dataVerification-dialog .show-box-item-date .input").hide();let o="bw",s="",u="";l==a.type&&(o=a.type2,s=a.value1,u=a.value2),$("#luckysheet-dataVerification-dialog #data-verification-date-select").val(o),o=="bw"||o=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-date .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-date .input2").show(),$("#luckysheet-dataVerification-dialog .show-box-item-date .data-verification-value1").val(s),$("#luckysheet-dataVerification-dialog .show-box-item-date .data-verification-value2").val(u)}else if(l=="validity"){$("#luckysheet-dataVerification-dialog .show-box .show-box-item-validity").show();let o="card";l==a.type&&(o=a.type2),$("#luckysheet-dataVerification-dialog #data-verification-validity-select").val(o)}}),$(document).off("change.numberSelect").on("change.numberSelect","#data-verification-number-select",function(t){$("#luckysheet-dataVerification-dialog .show-box-item-number .input").hide();let l=this.value;l=="bw"||l=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-number .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-number .input2").show()}),$(document).off("change.textLengthSelect").on("change.textLengthSelect","#data-verification-textLength-select",function(t){$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input").hide();let l=this.value;l=="bw"||l=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input2").show()}),$(document).off("change.dateSelect").on("change.dateSelect","#data-verification-date-select",function(t){$("#luckysheet-dataVerification-dialog .show-box-item-date .input").hide();let l=this.value;l=="bw"||l=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-date .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-date .input2").show()}),$(document).off("change.hintShow").on("change.hintShow","#data-verification-hint-show",function(t){this.checked?$("#luckysheet-dataVerification-dialog .data-verification-hint-text").show():$("#luckysheet-dataVerification-dialog .data-verification-hint-text").hide()}),$(document).off("click.dvSaveConfirm").on("click.dvSaveConfirm","#luckysheet-dataVerification-dialog-confirm",function(t){let l=$("#luckysheet-dataVerification-dialog #data-verification-range input").val().trim(),a=e.getRangeByTxt(l);if(a.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.selectCellRange2);return}let o=a[a.length-1].row[0],s=a[a.length-1].row[1],u=a[a.length-1].column[0],f=a[a.length-1].column[1],d=xe.deepCopyFlowData(h.flowdata);o<0&&(o=0),s>d.length-1&&(s=d.length-1),u<0&&(u=0),f>d[0].length-1&&(f=d[0].length-1);let m=$("#luckysheet-dataVerification-dialog #data-verification-type-select").val(),g=null,y="",v="";if(m=="dropdown"){if(y=$("#luckysheet-dataVerification-dialog .show-box-item-dropdown .data-verification-value1").val().trim(),y.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo1);return}g=$("#luckysheet-dataVerification-dialog #data-verification-multi").is(":checked")}else if(m=="checkbox"){if(y=$("#luckysheet-dataVerification-dialog .show-box-item-checkbox .data-verification-value1").val().trim(),v=$("#luckysheet-dataVerification-dialog .show-box-item-checkbox .data-verification-value2").val().trim(),y.length==0||v.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo2);return}}else if(m=="number"||m=="number_integer"||m=="number_decimal"){if(g=$("#luckysheet-dataVerification-dialog #data-verification-number-select").val(),y=$("#luckysheet-dataVerification-dialog .show-box-item-number .input:visible .data-verification-value1").val().trim(),!B(y)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo3);return}if(g=="bw"||g=="nb"){if(v=$("#luckysheet-dataVerification-dialog .show-box-item-number .input:visible .data-verification-value2").val().trim(),!B(v)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo3);return}if(Number(v)<Number(y)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo4);return}}}else if(m=="text_content"){if(g=$("#luckysheet-dataVerification-dialog #data-verification-text-select").val(),y=$("#luckysheet-dataVerification-dialog .show-box-item-text .data-verification-value1").val().trim(),y.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo5);return}}else if(m=="text_length"){if(g=$("#luckysheet-dataVerification-dialog #data-verification-textLength-select").val(),y=$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input:visible .data-verification-value1").val().trim(),!B(y)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo3);return}if(!Number.isInteger(Number(y))||Number(y)<0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.textlengthInteger);return}if(g=="bw"||g=="nb"){if(v=$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input:visible .data-verification-value2").val().trim(),!B(v)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo3);return}if(!Number.isInteger(Number(v))||Number(v)<0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.textlengthInteger);return}if(Number(v)<Number(y)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo4);return}}}else if(m=="date"){if(g=$("#luckysheet-dataVerification-dialog #data-verification-date-select").val(),y=$("#luckysheet-dataVerification-dialog .show-box-item-date .input:visible .data-verification-value1").val().trim(),!Lt(y)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo6);return}if(g=="bw"||g=="nb"){if(v=$("#luckysheet-dataVerification-dialog .show-box-item-date .input:visible .data-verification-value2").val().trim(),!Lt(v)){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo6);return}if(ul(y,v)>0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.tooltipInfo7);return}}}else m=="validity"&&(g=$("#luckysheet-dataVerification-dialog #data-verification-validity-select").val());let b=$("#luckysheet-dataVerification-dialog #data-verification-remote").is(":checked"),k=$("#luckysheet-dataVerification-dialog #data-verification-prohibitInput").is(":checked"),w=$("#luckysheet-dataVerification-dialog #data-verification-hint-show").is(":checked"),x="";w&&(x=$("#luckysheet-dataVerification-dialog .data-verification-hint-text input").val().trim());let C={type:m,type2:g,value1:y,value2:v,checked:!1,remote:b,prohibitInput:k,hintShow:w,hintText:x},S=$.extend(!0,{},e.dataVerification),_=$.extend(!0,{},e.dataVerification);for(let T=o;T<=s;T++)for(let A=u;A<=f;A++)_[T+"_"+A]=C,m=="checkbox"&&Ht(T,A,d,C.value2);m=="checkbox"?e.refOfCheckbox(S,_,h.currentSheetIndex,d,a[a.length-1]):e.ref(S,_,h.currentSheetIndex),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-dataVerification-dialog").hide()}),$(document).off("click.delete").on("click.delete","#luckysheet-dataVerification-dialog-delete",function(t){let l=$("#luckysheet-dataVerification-dialog #data-verification-range input").val().trim(),a=e.getRangeByTxt(l);if(a.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',n.selectCellRange2);return}let o=$.extend(!0,{},e.dataVerification),s=$.extend(!0,{},e.dataVerification),u=a[a.length-1].row[0],f=a[a.length-1].row[1],d=a[a.length-1].column[0],m=a[a.length-1].column[1];for(let g=u;g<=f;g++)for(let y=d;y<=m;y++)delete s[g+"_"+y];e.ref(o,s,h.currentSheetIndex),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-dataVerification-dialog").hide()}),$(document).on("click","#luckysheet-info .luckysheet-modal-dialog-title-close, #luckysheet-info .luckysheet-model-close-btn",function(t){$(this).parents("#luckysheet-info").hide(),$("#luckysheet-dataVerification-dialog").is(":visible")&&$("#luckysheet-modal-dialog-mask").show(),t.stopPropagation()})},dataAllocation:function(){let e=this,n=h.luckysheet_select_save[h.luckysheet_select_save.length-1],t=xt(h.currentSheetIndex,n,h.currentSheetIndex);$("#luckysheet-dataVerification-dialog #data-verification-range input").val(t);let l=n.row_focus||n.row[0],a=n.column_focus||n.column[0],s=$.extend(!0,{},e.dataVerification)[l+"_"+a];s==null&&(s=$.extend(!0,{},e.defaultItem)),e.curItem=s,$("#luckysheet-dataVerification-dialog #data-verification-type-select").val(s.type),$("#luckysheet-dataVerification-dialog .show-box .show-box-item").hide(),s.type=="dropdown"?($("#luckysheet-dataVerification-dialog .show-box .show-box-item-dropdown").show(),$("#luckysheet-dataVerification-dialog .show-box-item-dropdown .data-verification-value1").val(s.value1),$("#luckysheet-dataVerification-dialog #data-verification-multi").prop("checked",!!s.type2)):s.type=="checkbox"?($("#luckysheet-dataVerification-dialog .show-box .show-box-item-checkbox").show(),$("#luckysheet-dataVerification-dialog .show-box-item-checkbox .data-verification-value1").val(s.value1),$("#luckysheet-dataVerification-dialog .show-box-item-checkbox .data-verification-value2").val(s.value2)):s.type=="number"||s.type=="number_integer"||s.type=="number_decimal"?($("#luckysheet-dataVerification-dialog .show-box-item-number").show(),$("#luckysheet-dataVerification-dialog #data-verification-number-select").val(s.type2),$("#luckysheet-dataVerification-dialog .show-box-item-number .input").hide(),s.type2=="bw"||s.type2=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-number .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-number .input2").show(),$("#luckysheet-dataVerification-dialog .show-box-item-number .data-verification-value1").val(s.value1),$("#luckysheet-dataVerification-dialog .show-box-item-number .data-verification-value2").val(s.value2)):s.type=="text_content"?($("#luckysheet-dataVerification-dialog .show-box-item-text").show(),$("#luckysheet-dataVerification-dialog #data-verification-text-select").val(s.type2),$("#luckysheet-dataVerification-dialog .show-box-item-text .data-verification-value1").val(s.value1)):s.type=="text_length"?($("#luckysheet-dataVerification-dialog .show-box-item-textLength").show(),$("#luckysheet-dataVerification-dialog #data-verification-textLength-select").val(s.type2),$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input").hide(),s.type2=="bw"||s.type2=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-textLength .input2").show(),$("#luckysheet-dataVerification-dialog .show-box-item-textLength .data-verification-value1").val(s.value1),$("#luckysheet-dataVerification-dialog .show-box-item-textLength .data-verification-value2").val(s.value2)):s.type=="date"?($("#luckysheet-dataVerification-dialog .show-box-item-date").show(),$("#luckysheet-dataVerification-dialog #data-verification-date-select").val(s.type2),$("#luckysheet-dataVerification-dialog .show-box-item-date .input").hide(),s.type2=="bw"||s.type2=="nb"?$("#luckysheet-dataVerification-dialog .show-box-item-date .input1").show():$("#luckysheet-dataVerification-dialog .show-box-item-date .input2").show(),$("#luckysheet-dataVerification-dialog .show-box-item-date .data-verification-value1").val(s.value1),$("#luckysheet-dataVerification-dialog .show-box-item-date .data-verification-value2").val(s.value2)):s.type=="validity"&&($("#luckysheet-dataVerification-dialog .show-box .show-box-item-validity").show(),$("#luckysheet-dataVerification-dialog #data-verification-validity-select").val(s.type2)),$("#luckysheet-dataVerification-dialog #data-verification-remote").prop("checked",s.remote),$("#luckysheet-dataVerification-dialog #data-verification-prohibitInput").prop("checked",s.prohibitInput),$("#luckysheet-dataVerification-dialog #data-verification-hint-show").prop("checked",s.hintShow),s.hintShow?$("#luckysheet-dataVerification-dialog .data-verification-hint-text").show():$("#luckysheet-dataVerification-dialog .data-verification-hint-text").hide(),$("#luckysheet-dataVerification-dialog .data-verification-hint-text input").val(s.hintText)},rangeDialog:function(e,n){let t=this,l=Q(),a=l.dataVerification,o=l.button;$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-dataVerificationRange-dialog").remove(),$("body").append(_e(dt,{id:"luckysheet-dataVerificationRange-dialog",addclass:"luckysheet-dataVerificationRange-dialog",title:a.selectCellRange,content:`<input readonly="readonly" placeholder="${a.selectCellRange2}" value="${n}"/>`,botton:`<button id="luckysheet-dataVerificationRange-dialog-confirm" class="btn btn-primary" data-source="${e}">${o.confirm}</button> |
| | | <button id="luckysheet-dataVerificationRange-dialog-close" class="btn btn-default">${o.close}</button>`,style:"z-index:100003"}));let s=$("#luckysheet-dataVerificationRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),u=s.outerHeight(),f=s.outerWidth(),d=$(window).width(),m=$(window).height(),g=$(document).scrollLeft(),y=$(document).scrollTop();$("#luckysheet-dataVerificationRange-dialog").css({left:(d+g-f)/2,top:(m+y-u)/3}).show()},getTxtByRange:function(e){if(e.length>0){let n=[];for(let t=0;t<e.length;t++){let l=e[t].row[0],a=e[t].row[1],o=e[t].column[0],s=e[t].column[1];n.push(xt(h.currentSheetIndex,{row:[l,a],column:[o,s]},h.currentSheetIndex))}return n.join(",")}},getRangeByTxt:function(e){let n=[];if(e.indexOf(",")!=-1){let t=e.split(",");for(let l=0;l<t.length;l++)if(p.iscelldata(t[l]))n.push(p.getcellrange(t[l]));else{n=[];break}}else p.iscelldata(e)&&n.push(p.getcellrange(e));return n},cellFocus:function(e,n,t){$("#luckysheet-dataVerification-dropdown-btn").hide(),$("#luckysheet-dataVerification-showHintBox").hide();let l=this;if(l.dataVerification==null||l.dataVerification[e+"_"+n]==null){$("#luckysheet-dataVerification-dropdown-List").hide();return}let a=h.visibledatarow[e],o=e==0?0:h.visibledatarow[e-1],s=h.visibledatacolumn[n],u=n==0?0:h.visibledatacolumn[n-1],f=ke.mergeborer(h.flowdata,e,n);f&&(a=f.row[1],o=f.row[0],s=f.column[1],u=f.column[0]);let d=l.dataVerification[e+"_"+n];if(t&&d.type=="checkbox"){l.checkboxChange(e,n);return}if(d.type=="dropdown"?($("#luckysheet-dataVerification-dropdown-btn").show().css({"max-width":s-u,"max-height":a-o,left:s-20,top:o+(a-o-20)/2}),$("#luckysheet-dataVerification-dropdown-List").is(":visible")&&$("#luckysheet-dataVerification-dropdown-List").prop("data-index")!=e+"_"+n&&$("#luckysheet-dataVerification-dropdown-List").hide()):$("#luckysheet-dataVerification-dropdown-List").hide(),d.hintShow){let y;h.lang=="en"?y='<span style="color:#f5a623;">Hint: </span>':y='<span style="color:#f5a623;">\u63D0\u793A\uFF1A</span>',y+=l.getHintText(d),$("#luckysheet-dataVerification-showHintBox").html(y).show().css({left:u,top:a});return}let m=ze(e,n,null);if(me(m))return;if(!l.validateCellData(m,d)){let y;h.lang=="en"?y='<span style="color:#f72626;">Failure: </span>':y='<span style="color:#f72626;">\u5931\u6548\uFF1A</span>',y+=l.getFailureText(d),$("#luckysheet-dataVerification-showHintBox").html(y).show().css({left:u,top:a})}},getHintText:function(e){let n=this,t=e.hintText||"";return t.length==0&&(h.lang=="en"?e.type=="dropdown"?t+="please select an option in the drop-down list":e.type=="checkbox"||(e.type=="number"||e.type=="number_integer"||e.type=="number_decimal"?(t+="please enter a "+n.optionLabel_en[e.type]+" "+n.optionLabel_en[e.type2]+" "+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+=" and "+e.value2)):e.type=="text_content"?t+="please enter text "+n.optionLabel_en[e.type2]+" "+e.value1:e.type=="text_length"?(t+="please enter text with length "+n.optionLabel_en[e.type2]+" "+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+=" and "+e.value2)):e.type=="date"?(t+="please enter a date "+n.optionLabel_en[e.type2]+" "+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+=" and "+e.value2)):e.type=="validity"&&(t+="please enter the correct "+n.optionLabel_en[e.type2])):e.type=="dropdown"?t+="\u8BF7\u9009\u62E9\u4E0B\u62C9\u5217\u8868\u4E2D\u7684\u9009\u9879":e.type=="checkbox"||(e.type=="number"||e.type=="number_integer"||e.type=="number_decimal"?(t+="\u8BF7\u8F93\u5165"+n.optionLabel[e.type2]+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+="\u548C"+e.value2+"\u4E4B\u95F4"),t+="\u7684"+n.optionLabel[e.type]):e.type=="text_content"?t+="\u8BF7\u8F93\u5165\u5185\u5BB9"+n.optionLabel[e.type2]+e.value1+"\u7684\u6587\u672C":e.type=="text_length"?(t+="\u8BF7\u8F93\u5165\u957F\u5EA6"+n.optionLabel[e.type2]+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+="\u548C"+e.value2+"\u4E4B\u95F4"),t+="\u7684\u6587\u672C"):e.type=="date"?(t+="\u8BF7\u8F93\u5165"+n.optionLabel[e.type2]+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+="\u548C"+e.value2+"\u4E4B\u95F4"),t+="\u7684\u65E5\u671F"):e.type=="validity"&&(t+="\u8BF7\u8F93\u5165\u6B63\u786E\u7684"+n.optionLabel[e.type2]))),t},getFailureText:function(e){let n=this,t="";return h.lang=="en"?e.type=="dropdown"?t+="what you selected is not an option in the drop-down list":e.type=="checkbox"||(e.type=="number"||e.type=="number_integer"||e.type=="number_decimal"?(t+="what you entered is not a "+n.optionLabel_en[e.type]+" "+n.optionLabel_en[e.type2]+" "+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+=" and "+e.value2)):e.type=="text_content"?t+="what you entered is not text that "+n.optionLabel_en[e.type2]+" "+e.value1:e.type=="text_length"?(t+="the text you entered is not length "+n.optionLabel_en[e.type2]+" "+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+=" and "+e.value2)):e.type=="date"?(t+="the date you entered is not "+n.optionLabel_en[e.type2]+" "+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+=" and "+e.value2)):e.type=="validity"&&(t+="what you entered is not a correct "+n.optionLabel_en[e.type2])):e.type=="dropdown"?t+="\u4F60\u9009\u62E9\u7684\u4E0D\u662F\u4E0B\u62C9\u5217\u8868\u4E2D\u7684\u9009\u9879":e.type=="checkbox"||(e.type=="number"||e.type=="number_integer"||e.type=="number_decimal"?(t+="\u4F60\u8F93\u5165\u7684\u4E0D\u662F"+n.optionLabel[e.type2]+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+="\u548C"+e.value2+"\u4E4B\u95F4"),t+="\u7684"+n.optionLabel[e.type]):e.type=="text_content"?t+="\u4F60\u8F93\u5165\u7684\u4E0D\u662F\u5185\u5BB9"+n.optionLabel[e.type2]+e.value1+"\u7684\u6587\u672C":e.type=="text_length"?(t+="\u4F60\u8F93\u5165\u7684\u4E0D\u662F\u957F\u5EA6"+n.optionLabel[e.type2]+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+="\u548C"+e.value2+"\u4E4B\u95F4"),t+="\u7684\u6587\u672C"):e.type=="date"?(t+="\u4F60\u8F93\u5165\u7684\u4E0D\u662F"+n.optionLabel[e.type2]+e.value1,(e.type2=="bw"||e.type2=="nb")&&(t+="\u548C"+e.value2+"\u4E4B\u95F4"),t+="\u7684\u65E5\u671F"):e.type=="validity"&&(t+="\u4F60\u8F93\u5165\u7684\u4E0D\u662F\u4E00\u4E2A\u6B63\u786E\u7684"+n.optionLabel[e.type2])),t},validateCellData:function(e,n){let t=this,l=n.type,a=n.type2,o=n.value1,s=n.value2;if(l=="dropdown"){let u=t.getDropdownList(o);if(a&&e)return e.split(",").every(function(d){return u.indexOf(d)!==-1});let f=!1;for(let d=0;d<u.length;d++)if(u[d]==e){f=!0;break}return f}else if(l!="checkbox"){if(l=="number"||l=="number_integer"||l=="number_decimal"){if(!B(e)||(e=Number(e),l=="number_integer"&&e%1!=0)||l=="number_decimal"&&e%1==0||(o=Number(o),s=Number(s),a=="bw"&&(e<o||e>s))||a=="nb"&&e>=o&&e<=s||a=="eq"&&e!=o||a=="ne"&&e==o||a=="gt"&&e<=o||a=="lt"&&e>=o||a=="gte"&&e<o||a=="lte"&&e>o)return!1}else if(l=="text_content"){if(e=e.toString(),o=o.toString(),a=="include"&&e.indexOf(o)==-1||a=="exclude"&&e.indexOf(o)>-1||a=="equal"&&e!=o)return!1}else if(l=="text_length"){if(e=e.toString().length,o=Number(o),s=Number(s),a=="bw"&&(e<o||e>s)||a=="nb"&&e>=o&&e<=s||a=="eq"&&e!=o||a=="ne"&&e==o||a=="gt"&&e<=o||a=="lt"&&e>=o||a=="gte"&&e<o||a=="lte"&&e>o)return!1}else if(l=="date"){if(!Lt(e)||a=="bw"&&(ul(e,o)<0||ul(e,s)>0)||a=="nb"&&ul(e,o)>=0&&ul(e,s)<=0||a=="eq"&&ul(e,o)!=0||a=="ne"&&ul(e,o)==0||a=="bf"&&ul(e,o)>=0||a=="nbf"&&ul(e,o)<0||a=="af"&&ul(e,o)<=0||a=="naf"&&ul(e,o)>0)return!1}else if(l=="validity"&&(a=="card"&&!Yy(e)||a=="phone"&&!/^1[3456789]\d{9}$/.test(e)))return!1}return!0},dropdownListShow:function(){$("#luckysheet-dataVerification-showHintBox").hide();let e=this,n=h.luckysheet_select_save[h.luckysheet_select_save.length-1],t=n.row_focus,l=n.column_focus,a=h.visibledatarow[t],o=t==0?0:h.visibledatarow[t-1],s=h.visibledatacolumn[l],u=l==0?0:h.visibledatacolumn[l-1],f=ke.mergeborer(h.flowdata,t,l);f&&(a=f.row[1],o=f.row[0],s=f.column[1],u=f.column[0]);let d=e.dataVerification[t+"_"+l],m=e.getDropdownList(d.value1),g="";if(d.type==="dropdown"&&d.type2){let b=ze(t,l,null),k=me(b)?[]:b.split(",");m.forEach(w=>{g+=`<div class="dropdown-List-item luckysheet-mousedown-cancel multi${k.indexOf(w)!==-1?" checked":""}">${w}</div>`})}else m.forEach(b=>{g+=`<div class="dropdown-List-item luckysheet-mousedown-cancel">${b}</div>`});$("#luckysheet-dataVerification-dropdown-List").html(g).prop("data-index",t+"_"+l).show().css({width:s-u-1,left:u,top:a});let y=$("#luckysheet-dataVerification-dropdown-List").outerHeight(),v=$("#luckysheet-cell-main")[0].scrollHeight;a+y>v-42-6&&$("#luckysheet-dataVerification-dropdown-List").css({top:o-y})},getDropdownList:function(e){let n=[];if(p.iscelldata(e)){let t=p.getcellrange(e),l=h.luckysheetfile[Z(t.sheetIndex)].data;for(let a=t.row[0];a<=t.row[1];a++)for(let o=t.column[0];o<=t.column[1];o++){if(l[a]==null)continue;let s=l[a][o];if(s==null||s.v==null)continue;let u=s.m||s.v;n.includes(u)||n.push(u)}}else{let t=e.split(",");for(let l=0;l<t.length;l++){let a=t[l];a.length!=0&&(n.includes(a)||n.push(a))}}return n},checkboxChange:function(e,n){let t=this,l=$.extend(!0,{},t.dataVerification),a=$.extend(!0,{},t.dataVerification),o=a[e+"_"+n];o.checked=!o.checked;let s=o.value2;o.checked&&(s=o.value1);let u=xe.deepCopyFlowData(h.flowdata);Ht(e,n,u,s),t.refOfCheckbox(l,a,h.currentSheetIndex,u,{row:[e,e],column:[n,n]})},ref:function(e,n,t){let l=this;if(h.clearjfundo){h.jfundo.length=0;let a={};a.type="updateDataVerification",a.sheetIndex=t,a.historyDataVerification=e,a.currentDataVerification=n,h.jfredo.push(a)}l.dataVerification=n,h.luckysheetfile[Z(t)].dataVerification=n,ne.allowUpdate&&ne.saveParam("all",t,n,{k:"dataVerification"}),setTimeout(function(){Be()},1)},refOfCheckbox:function(e,n,t,l,a){let o=this;if(h.clearjfundo){h.jfundo.length=0;let s={};s.type="updateDataVerificationOfCheckbox",s.sheetIndex=t,s.historyDataVerification=e,s.currentDataVerification=n,s.data=h.flowdata,s.curData=l,s.range=a,h.jfredo.push(s)}o.dataVerification=n,h.luckysheetfile[Z(t)].dataVerification=n,h.flowdata=l,xe.webWorkerFlowDataCache(h.flowdata),h.luckysheetfile[Z(t)].data=h.flowdata,ne.allowUpdate&&(ne.saveParam("all",t,n,{k:"dataVerification"}),ne.historyParam(h.flowdata,t,a)),setTimeout(function(){Be()},1)}};Ye=Wy});function Ir(e,n,t,l,a){if(a=a||h.currentSheetIndex,e=="row"&&!$t(a,"insertRows"))return;if(e=="column"&&!$t(a,"insertColumns"))return;let o=Z(a),s=h.luckysheetfile[o],u=$.extend(!0,[],s.data);t=Math.floor(t);let f=$.extend(!0,{},s.config);f.merge==null&&(f.merge={});let d={};for(let E in f.merge){let N=f.merge[E],L=N.r,O=N.c,V=N.rs,q=N.cs;e=="row"?n<L?d[L+t+"_"+O]={r:L+t,c:O,rs:V,cs:q}:n==L&&V!=1?l=="lefttop"?d[L+t+"_"+O]={r:L+t,c:O,rs:V,cs:q}:d[L+"_"+O]={r:L,c:O,rs:V+t,cs:q}:n<L+V-1?d[L+"_"+O]={r:L,c:O,rs:V+t,cs:q}:n==L+V-1?l=="lefttop"?V==1?d[L+t+"_"+O]={r:L+t,c:O,rs:V,cs:q}:d[L+"_"+O]={r:L,c:O,rs:V+t,cs:q}:d[L+"_"+O]={r:L,c:O,rs:V,cs:q}:d[L+"_"+O]={r:L,c:O,rs:V,cs:q}:e=="column"&&(n<O?d[L+"_"+(O+t)]={r:L,c:O+t,rs:V,cs:q}:n==O&&q!=1?l=="lefttop"?d[L+"_"+(O+t)]={r:L,c:O+t,rs:V,cs:q}:d[L+"_"+O]={r:L,c:O,rs:V,cs:q+t}:n<O+q-1?d[L+"_"+O]={r:L,c:O,rs:V,cs:q+t}:n==O+q-1?l=="lefttop"?q==1?d[L+"_"+(O+t)]={r:L,c:O+t,rs:V,cs:q}:d[L+"_"+O]={r:L,c:O,rs:V,cs:q+t}:d[L+"_"+O]={r:L,c:O,rs:V,cs:q}:d[L+"_"+O]={r:L,c:O,rs:V,cs:q})}f.merge=d;let m=s.calcChain,g=[];if(m!=null&&m.length>0)for(let E=0;E<m.length;E++){let N=$.extend(!0,{},m[E]),L=N.r,O=N.c,V=N.index,q=zl(L,O,V);if(e=="row"){let W="="+p.functionStrChange(q,"add","row",l,n,t);u[L][O]&&u[L][O].f==q&&(u[L][O].f=W),l=="lefttop"?L>=n&&(N.r+=t):l=="rightbottom"&&L>n&&(N.r+=t),g.push(N)}else if(e=="column"){let W="="+p.functionStrChange(q,"add","col",l,n,t);u[L][O]&&u[L][O].f==q&&(u[L][O].f=W),l=="lefttop"?O>=n&&(N.c+=t):l=="rightbottom"&&O>n&&(N.c+=t),g.push(N)}}let y=s.filter_select,v=s.filter,b=null;if(y!=null&&JSON.stringify(y)!="{}"){b={filter_select:null,filter:null};let E=y.row[0],N=y.row[1],L=y.column[0],O=y.column[1];if(e=="row"){if(E<n?(N==n&&l=="lefttop"||N>n)&&(N+=t):E==n?l=="lefttop"?(E+=t,N+=t):l=="rightbottom"&&N>n&&(N+=t):(E+=t,N+=t),v!=null){b.filter={};for(let V in v){let q=v[V].rowhidden,W={};for(let X in q)X=parseFloat(X),X<n?W[X]=0:X==n?l=="lefttop"?W[X+t]=0:l=="rightbottom"&&(W[X]=0):W[X+t]=0;b.filter[V]=$.extend(!0,{},v[V]),b.filter[V].rowhidden=W,b.filter[V].str=E,b.filter[V].edr=N}}}else if(e=="column"&&(L<n?(O==n&&l=="lefttop"||O>n)&&(O+=t):L==n?l=="lefttop"?(L+=t,O+=t):l=="rightbottom"&&O>n&&(O+=t):(L+=t,O+=t),v!=null)){b.filter={};for(let V in v){let q=v[V].cindex;(q==n&&l=="lefttop"||q>n)&&(q+=t),b.filter[q-L]=$.extend(!0,{},v[V]),b.filter[q-L].cindex=q,b.filter[q-L].stc=L,b.filter[q-L].edc=O}}b.filter_select={row:[E,N],column:[L,O]}}if(b!=null&&b.filter!=null){f.rowhidden==null&&(f.rowhidden={});for(let E in b.filter){let N=b.filter[E].rowhidden;for(let L in N)f.rowhidden[L]=0}}let k=s.luckysheet_conditionformat_save,w=[];if(k!=null&&k.length>0)for(let E=0;E<k.length;E++){let N=k[E].cellrange,L=[];for(let V=0;V<N.length;V++){let q=N[V].row[0],W=N[V].row[1],X=N[V].column[0],te=N[V].column[1];e=="row"?q<n?(W==n&&l=="lefttop"||W>n)&&(W+=t):q==n?l=="lefttop"?(q+=t,W+=t):l=="rightbottom"&&W>n&&(W+=t):(q+=t,W+=t):e=="column"&&(X<n?(te==n&&l=="lefttop"||te>n)&&(te+=t):X==n?l=="lefttop"?(X+=t,te+=t):l=="rightbottom"&&te>n&&(te+=t):(X+=t,te+=t)),L.push({row:[q,W],column:[X,te]})}let O=$.extend(!0,{},k[E]);O.cellrange=L,w.push(O)}let x=s.luckysheet_alternateformat_save,C=[];if(x!=null&&x.length>0)for(let E=0;E<x.length;E++){let N=x[E].cellrange.row[0],L=x[E].cellrange.row[1],O=x[E].cellrange.column[0],V=x[E].cellrange.column[1],q=$.extend(!0,{},x[E]);e=="row"?N<n?(L==n&&l=="lefttop"||L>n)&&(L+=t):N==n?l=="lefttop"?(N+=t,L+=t):l=="rightbottom"&&L>n&&(L+=t):(N+=t,L+=t):e=="column"&&(O<n?(V==n&&l=="lefttop"||V>n)&&(V+=t):O==n?l=="lefttop"?(O+=t,V+=t):l=="rightbottom"&&V>n&&(V+=t):(O+=t,V+=t)),q.cellrange={row:[N,L],column:[O,V]},C.push(q)}let S={freezenhorizontaldata:null,freezenverticaldata:null};if(Y.freezenhorizontaldata!=null&&e=="row"){let E=Y.freezenhorizontaldata[2],N=Y.freezenhorizontaldata[1]-1;(N==n&&l=="lefttop"||N>n)&&(N+=t);let L=h.visibledatarow[N]-2-E+h.columnHeaderHeight;S.freezenhorizontaldata=[h.visibledatarow[N],N+1,E,Y.cutVolumn(h.visibledatarow,N+1),L]}else S.freezenhorizontaldata=Y.freezenhorizontaldata;if(Y.freezenverticaldata!=null&&e=="column"){let E=Y.freezenverticaldata[2],N=Y.freezenverticaldata[1]-1;(N==n&&l=="lefttop"||N>n)&&(N+=t);let L=h.visibledatacolumn[N]-2-E+h.rowHeaderWidth;S.freezenverticaldata=[h.visibledatacolumn[N],N+1,E,Y.cutVolumn(h.visibledatacolumn,N+1),L]}else S.freezenverticaldata=Y.freezenverticaldata;let _=s.dataVerification,T={};if(_!=null)for(let E in _){let N=Number(E.split("_")[0]),L=Number(E.split("_")[1]),O=_[E];if(e=="row")if(n<N)T[N+t+"_"+L]=O;else if(n==N)if(l=="lefttop"){T[N+t+"_"+L]=O;for(let V=0;V<t;V++)T[N+V+"_"+L]=O}else{T[N+"_"+L]=O;for(let V=0;V<t;V++)T[N+V+1+"_"+L]=O}else T[N+"_"+L]=O;else if(e=="column")if(n<L)T[N+"_"+(L+t)]=O;else if(n==L)if(l=="lefttop"){T[N+"_"+(L+t)]=O;for(let V=0;V<t;V++)T[N+"_"+(L+V)]=O}else{T[N+"_"+L]=O;for(let V=0;V<t;V++)T[N+"_"+(L+V+1)]=O}else T[N+"_"+L]=O}let A=s.hyperlink,R={};if(A!=null)for(let E in A){let N=Number(E.split("_")[0]),L=Number(E.split("_")[1]),O=A[E];e=="row"?n<N||n==N&&l=="lefttop"?R[N+t+"_"+L]=O:R[N+"_"+L]=O:e=="column"&&(n<L||n==L&&l=="lefttop"?R[N+"_"+(L+t)]=O:R[N+"_"+L]=O)}let I;if(e=="row"){if(I="r",f.rowlen!=null){let L={};for(let O in f.rowlen)O=parseFloat(O),O<n?L[O]=f.rowlen[O]:O==n?l=="lefttop"?L[O+t]=f.rowlen[O]:l=="rightbottom"&&(L[O]=f.rowlen[O]):L[O+t]=f.rowlen[O];f.rowlen=L}if(f.rowhidden!=null){let L={};for(let O in f.rowhidden)O=parseFloat(O),O<n?L[O]=f.rowhidden[O]:O==n?l=="lefttop"?L[O+t]=f.rowhidden[O]:l=="rightbottom"&&(L[O]=f.rowhidden[O]):L[O+t]=f.rowhidden[O];f.rowhidden=L}let E=[];for(let L=0;L<u[0].length;L++)E.push(null);var F=[];if(f.borderInfo&&f.borderInfo.length>0){let L=[];for(let O=0;O<f.borderInfo.length;O++){let V=f.borderInfo[O].rangeType;if(V=="range"){let q=f.borderInfo[O].range,W=[];for(let X=0;X<q.length;X++){let te=q[X].row[0],le=q[X].row[1];l=="lefttop"?n<=te?(te+=t,le+=t):n<=le&&(le+=t):n<te?(te+=t,le+=t):n<le&&(le+=t),le>=te&&W.push({row:[te,le],column:q[X].column})}if(W.length>0){let X={rangeType:"range",borderType:f.borderInfo[O].borderType,style:f.borderInfo[O].style,color:f.borderInfo[O].color,range:W};L.push(X)}}else if(V=="cell"){let q=f.borderInfo[O].value.row_index;q===n&&F.push(JSON.parse(JSON.stringify(f.borderInfo[O]))),l=="lefttop"?n<=q&&(q+=t):n<q&&(q+=t),f.borderInfo[O].value.row_index=q,L.push(f.borderInfo[O])}}f.borderInfo=L}let N=[];for(let L=0;L<t;L++)if(N.push(JSON.stringify(E)),F.length){var z=JSON.parse(JSON.stringify(F));z.forEach(O=>{l==="rightbottom"?O.value.row_index+=L+1:l==="lefttop"&&(O.value.row_index+=L)}),f.borderInfo.push(...z)}l=="lefttop"?n==0?new Function("d","return d.unshift("+N.join(",")+")")(u):new Function("d","return d.splice("+n+", 0, "+N.join(",")+")")(u):new Function("d","return d.splice("+(n+1)+", 0, "+N.join(",")+")")(u)}else{if(I="c",f.columnlen!=null){let L={};for(let O in f.columnlen)O=parseFloat(O),O<n?L[O]=f.columnlen[O]:O==n?l=="lefttop"?L[O+t]=f.columnlen[O]:l=="rightbottom"&&(L[O]=f.columnlen[O]):L[O+t]=f.columnlen[O];f.columnlen=L}if(f.colhidden!=null){let L={};for(let O in f.colhidden)O=parseFloat(O),O<n?L[O]=f.colhidden[O]:O==n?l=="lefttop"?L[O+t]=f.colhidden[O]:l=="rightbottom"&&(L[O]=f.colhidden[O]):L[O+t]=f.colhidden[O];f.colhidden=L}let E=[];for(let L=0;L<u.length;L++)E.push(null);var F=[];if(f.borderInfo&&f.borderInfo.length>0){let L=[];for(let O=0;O<f.borderInfo.length;O++){let V=f.borderInfo[O].rangeType;if(V=="range"){let q=f.borderInfo[O].range,W=[];for(let X=0;X<q.length;X++){let te=q[X].column[0],le=q[X].column[1];l=="lefttop"?n<=te?(te+=t,le+=t):n<=le&&(le+=t):n<te?(te+=t,le+=t):n<le&&(le+=t),le>=te&&W.push({row:q[X].row,column:[te,le]})}if(W.length>0){let X={rangeType:"range",borderType:f.borderInfo[O].borderType,style:f.borderInfo[O].style,color:f.borderInfo[O].color,range:W};L.push(X)}}else if(V=="cell"){let q=f.borderInfo[O].value.col_index;q===n&&F.push(JSON.parse(JSON.stringify(f.borderInfo[O]))),l=="lefttop"?n<=q&&(q+=t):n<q&&(q+=t),f.borderInfo[O].value.col_index=q,L.push(f.borderInfo[O])}}f.borderInfo=L}if(F.length)for(let L=0;L<t;L++){var z=JSON.parse(JSON.stringify(F));z.forEach(V=>{l==="rightbottom"?V.value.col_index+=L+1:l==="lefttop"&&(V.value.col_index+=L)}),f.borderInfo.push(...z)}for(let L=0;L<u.length;L++){let O=u[L];for(let V=0;V<t;V++){let q=JSON.parse(JSON.stringify(E[L]));l=="lefttop"?n==0?O.unshift(q):O.splice(n,0,q):O.splice(n+1,0,q)}}}s.index==h.currentSheetIndex?jn(u,f,"addRC",{index:n,len:t,direction:l,rc:I,restore:!1},g,b,w,C,S,T,R):(s.data=u,s.config=f,s.calcChain=g,s.filter=b.filter,s.filter_select=b.filter_select,s.luckysheet_conditionformat_save=w,s.luckysheet_alternateformat_save=C,s.dataVerification=T,s.hyperlink=R);let M=null;if(e=="row"?l=="lefttop"?M=[{row:[n,n+t-1],column:[0,u[0].length-1]}]:M=[{row:[n+1,n+t],column:[0,u[0].length-1]}]:l=="lefttop"?M=[{row:[0,u.length-1],column:[n,n+t-1]}]:M=[{row:[0,u.length-1],column:[n+1,n+t]}],s.luckysheet_select_save=M,s.index==h.currentSheetIndex&&(h.luckysheet_select_save=M,lt()),e=="row"){let E=$("#luckysheet-cell-main").scrollLeft(),N=$("#luckysheet-cell-main").scrollTop(),L=$("#luckysheet-cell-main").height(),O=$("#luckysheet-cell-main").width(),V=h.visibledatarow[M[0].row[1]],q=M[0].row[0]-1==-1?0:h.visibledatarow[M[0].row[0]-1];V-N-L+20>0?$("#luckysheet-scrollbar-y").scrollTop(V-L+20):q-N-20<0&&$("#luckysheet-scrollbar-y").scrollTop(q-20),t>30&&($("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide())}}function ko(e,n){let t=xe.deepCopyFlowData(h.flowdata),l=$.extend(!0,{},h.config);l.merge==null&&(l.merge={});let a=t[0].length,o=cl([],e,a);t=t.concat(o);for(let s=0;s<n.length;s++){let u=n[s].r,f=n[s].c,d=n[s].v;Ht(u,f,t,d),d!=null&&d.mc!=null&&d.mc.rs!=null&&(l.merge[d.mc.r+"_"+d.mc.c]=$.extend(!0,{},d.mc))}h.flowdata=t,xe.webWorkerFlowDataCache(h.flowdata),h.luckysheetfile[Z(h.currentSheetIndex)].data=t,h.config=l,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,St(h.flowdata.length,h.flowdata[0].length)}function qn(e,n,t,l){if(l=l||h.currentSheetIndex,e=="row"&&!$t(l,"deleteRows"))return;if(e=="column"&&!$t(l,"deleteColumns"))return;let a=Z(l),o=h.luckysheetfile[a],s=$.extend(!0,[],o.data);if(n<0&&(n=0),t<0&&(t=0),e=="row"?(n>s.length-1&&(n=s.length-1),t>s.length-1&&(t=s.length-1)):(n>s[0].length-1&&(n=s[0].length-1),t>s[0].length-1&&(t=s[0].length-1)),n>t)return;let u=t-n+1,f=$.extend(!0,{},o.config);f.merge==null&&(f.merge={});let d={};for(let F in f.merge){let z=f.merge[F],M=z.r,E=z.c,N=z.rs,L=z.cs;e=="row"?M<n?M+N-1<n?d[M+"_"+E]={r:M,c:E,rs:N,cs:L}:M+N-1>=n&&M+N-1<t?d[M+"_"+E]={r:M,c:E,rs:n-M,cs:L}:M+N-1>=t&&(d[M+"_"+E]={r:M,c:E,rs:N-u,cs:L}):M>=n&&M<=t?M+N-1>t&&(d[n+"_"+E]={r:n,c:E,rs:M+N-1-t,cs:L}):M>t&&(d[M-u+"_"+E]={r:M-u,c:E,rs:N,cs:L}):e=="column"&&(E<n?E+L-1<n?d[M+"_"+E]={r:M,c:E,rs:N,cs:L}:E+L-1>=n&&E+L-1<t?d[M+"_"+E]={r:M,c:E,rs:N,cs:n-E}:E+L-1>=t&&(d[M+"_"+E]={r:M,c:E,rs:N,cs:L-u}):E>=n&&E<=t?E+L-1>t&&(d[M+"_"+n]={r:M,c:n,rs:N,cs:E+L-1-t}):E>t&&(d[M+"_"+(E-u)]={r:M,c:E-u,rs:N,cs:L}))}f.merge=d;let m=o.calcChain,g=[];if(m!=null&&m.length>0)for(let F=0;F<m.length;F++){let z=$.extend(!0,{},m[F]),M=z.r,E=z.c,N=z.index,L=zl(M,E,N);if(e=="row"){if(M<n||M>t){let O="="+p.functionStrChange(L,"del","row",null,n,u);s[M][E]&&s[M][E].f==L&&(s[M][E].f=O),M>t&&(z.r=M-u),g.push(z)}}else if(e=="column"&&(E<n||E>t)){let O="="+p.functionStrChange(L,"del","col",null,n,u);s[M][E]&&s[M][E].f==L&&(s[M][E].f=O),E>t&&(z.c=E-u),g.push(z)}}let y=o.filter_select,v=o.filter,b=null;if(y!=null&&JSON.stringify(y)!="{}"){b={filter_select:null,filter:null};let F=y.row[0],z=y.row[1],M=y.column[0],E=y.column[1];if(e=="row"){if(F>t?(F-=u,z-=u,b.filter_select={row:[F,z],column:[M,E]}):F<n&&(z<n||(z<=t?z=n-1:z-=u),b.filter_select={row:[F,z],column:[M,E]}),b.filter_select!=null&&v!=null)for(let N in v){let L=v[N].rowhidden,O={};for(let V in L)V<n?O[V]=0:V>t&&(O[V-u]=0);JSON.stringify(O)!="{}"&&(b.filter==null&&(b.filter={}),b.filter[N]=$.extend(!0,{},v[N]),b.filter[N].rowhidden=O,b.filter[N].str=F,b.filter[N].edr=z)}}else if(e=="column"&&(M>t?(M-=u,E-=u,b.filter_select={row:[F,z],column:[M,E]}):M<n?(E<n||(E<=t?E=n-1:E-=u),b.filter_select={row:[F,z],column:[M,E]}):E>t&&(M=n,E-=u,b.filter_select={row:[F,z],column:[M,E]}),b.filter_select!=null&&v!=null))for(let N in v){let L=v[N].cindex;L<n?(b.filter==null&&(b.filter={}),b.filter[L-M]=$.extend(!0,{},v[N]),b.filter[L-M].edc=E):L>t&&(L-=u,b.filter==null&&(b.filter={}),b.filter[L-M]=$.extend(!0,{},v[N]),b.filter[L-M].cindex=L,b.filter[L-M].stc=M,b.filter[L-M].edc=E)}}if(b!=null&&b.filter!=null){f.rowhidden==null&&(f.rowhidden={});for(let F in b.filter){let z=b.filter[F].rowhidden;for(let M in z)f.rowhidden[M]=0}}let k=o.luckysheet_conditionformat_save,w=[];if(k!=null&&k.length>0)for(let F=0;F<k.length;F++){let z=k[F].cellrange,M=[];for(let E=0;E<z.length;E++){let N=z[E].row[0],L=z[E].row[1],O=z[E].column[0],V=z[E].column[1];e=="row"?N>=n&&L<=t||(N>t?(N-=u,L-=u):N<n?L<n||(L<=t?L=n-1:L-=u):L>t&&(N=n,L-=u),M.push({row:[N,L],column:[O,V]})):e=="column"&&(O>=n&&V<=t||(O>t?(O-=u,V-=u):O<n?V<n||(V<=t?V=n-1:V-=u):V>t&&(O=n,V-=u),M.push({row:[N,L],column:[O,V]})))}if(M.length>0){let E=$.extend(!0,{},k[F]);E.cellrange=M,w.push(E)}}let x=o.luckysheet_alternateformat_save,C=[];if(x!=null&&x.length>0)for(let F=0;F<x.length;F++){let z=x[F].cellrange.row[0],M=x[F].cellrange.row[1],E=x[F].cellrange.column[0],N=x[F].cellrange.column[1];if(e=="row"){if(!(z>=n&&M<=t)){let L=$.extend(!0,{},x[F]);z>t?(z-=u,M-=u):z<n?M<n||(M<=t?M=n-1:M-=u):M>t&&(z=n,M-=u),L.cellrange={row:[z,M],column:[E,N]},C.push(L)}}else if(e=="column"&&!(E>=n&&N<=t)){let L=$.extend(!0,{},x[F]);E>t?(E-=u,N-=u):E<n?N<n||(N<=t?N=n-1:N-=u):N>t&&(E=n,N-=u),L.cellrange={row:[z,M],column:[E,N]},C.push(L)}}let S={freezenhorizontaldata:null,freezenverticaldata:null};if(Y.freezenhorizontaldata!=null&&e=="row"){let F=Y.freezenhorizontaldata[2],z=st(h.visibledatarow,F);z==-1&&(z=0);let M=Y.freezenhorizontaldata[1]-1;M>=n&&(M<t?M=n-1:M-=u),M<z&&(M=z);let E=h.visibledatarow[M]-2-F+h.columnHeaderHeight;S.freezenhorizontaldata=[h.visibledatarow[M],M+1,F,Y.cutVolumn(h.visibledatarow,M+1),E]}else S.freezenhorizontaldata=Y.freezenhorizontaldata;if(Y.freezenverticaldata!=null&&e=="column"){let F=Y.freezenverticaldata[2],z=st(h.visibledatacolumn,F);z==-1&&(z=0);let M=Y.freezenverticaldata[1]-1;M>=n&&(M<t?M=n-1:M-=u),M<z&&(M=z);let E=h.visibledatacolumn[M]-2-F+h.rowHeaderWidth;S.freezenverticaldata=[h.visibledatacolumn[M],M+1,F,Y.cutVolumn(h.visibledatacolumn,M+1),E]}else S.freezenverticaldata=Y.freezenverticaldata;let _=o.dataVerification,T={};if(_!=null)for(let F in _){let z=Number(F.split("_")[0]),M=Number(F.split("_")[1]),E=_[F];e=="row"?z<n?T[z+"_"+M]=E:z>t&&(T[z-u+"_"+M]=E):e=="column"&&(M<n?T[z+"_"+M]=E:M>t&&(T[z+"_"+(M-u)]=E))}let A=o.hyperlink,R={};if(A!=null)for(let F in A){let z=Number(F.split("_")[0]),M=Number(F.split("_")[1]),E=A[F];e=="row"?z<n?R[z+"_"+M]=E:z>t&&(R[z-u+"_"+M]=E):e=="column"&&(M<n?R[z+"_"+M]=E:M>t&&(R[z+"_"+(M-u)]=E))}let I;if(e=="row"){I="r",f.rowlen==null&&(f.rowlen={});let F={};for(let M in f.rowlen)M<n?F[M]=f.rowlen[M]:M>t&&(F[M-u]=f.rowlen[M]);f.rowlen=F,f.rowhidden==null&&(f.rowhidden={});let z={};for(let M in f.rowhidden)M<n?z[M]=f.rowhidden[M]:M>t&&(z[M-u]=f.rowhidden[M]);if(f.rowhidden=z,f.borderInfo&&f.borderInfo.length>0){let M=[];for(let E=0;E<f.borderInfo.length;E++){let N=f.borderInfo[E].rangeType;if(N=="range"){let L=f.borderInfo[E].range,O=[];for(let V=0;V<L.length;V++){let q=L[V].row[0],W=L[V].row[1];for(let X=n;X<=t;X++)X<L[V].row[0]?(q-=1,W-=1):X<=L[V].row[1]&&(W-=1);W>=q&&O.push({row:[q,W],column:L[V].column})}if(O.length>0){let V={rangeType:"range",borderType:f.borderInfo[E].borderType,style:f.borderInfo[E].style,color:f.borderInfo[E].color,range:O};M.push(V)}}else if(N=="cell"){let L=f.borderInfo[E].value.row_index;L<n?M.push(f.borderInfo[E]):L>t&&(f.borderInfo[E].value.row_index=L-(t-n+1),M.push(f.borderInfo[E]))}}f.borderInfo=M}s.splice(n,u);for(let M=0;M<u;M++){let E=[];for(let N=0;N<s[0].length;N++)E.push(null);s.push(E)}}else{I="c",f.columnlen==null&&(f.columnlen={});let F={};for(let E in f.columnlen)E<n?F[E]=f.columnlen[E]:E>t&&(F[E-u]=f.columnlen[E]);f.columnlen=F,f.colhidden==null&&(f.colhidden={});let z={};for(let E in f.colhidden)E<n?z[E]=f.colhidden[E]:E>t&&(z[E-u]=f.colhidden[E]);if(f.colhidden=z,f.borderInfo&&f.borderInfo.length>0){let E=[];for(let N=0;N<f.borderInfo.length;N++){let L=f.borderInfo[N].rangeType;if(L=="range"){let O=f.borderInfo[N].range,V=[];for(let q=0;q<O.length;q++){let W=O[q].column[0],X=O[q].column[1];for(let te=n;te<=t;te++)te<O[q].column[0]?(W-=1,X-=1):te<=O[q].column[1]&&(X-=1);X>=W&&V.push({row:O[q].row,column:[W,X]})}if(V.length>0){let q={rangeType:"range",borderType:f.borderInfo[N].borderType,style:f.borderInfo[N].style,color:f.borderInfo[N].color,range:V};E.push(q)}}else if(L=="cell"){let O=f.borderInfo[N].value.col_index;O<n?E.push(f.borderInfo[N]):O>t&&(f.borderInfo[N].value.col_index=O-(t-n+1),E.push(f.borderInfo[N]))}}f.borderInfo=E}let M=[];for(let E=0;E<u;E++)M.push(null);for(let E=0;E<s.length;E++){let N=[].concat(s[E]);N.splice(n,u),s[E]=N.concat(M)}}o.index==h.currentSheetIndex?jn(s,f,"delRC",{index:n,len:t-n+1,rc:I},g,b,w,C,S,T,R):(o.data=s,o.config=f,o.calcChain=g,o.filter=b.filter,o.filter_select=b.filter_select,o.luckysheet_conditionformat_save=w,o.luckysheet_alternateformat_save=C,o.dataVerification=T,o.hyperlink=R)}function ha(e,n,t,l,a,o){if(o=o||h.currentSheetIndex,!jr(o))return;let s=Z(o),u=h.luckysheetfile[s],f=$.extend(!0,[],u.data),d=t-n+1,m=a-l+1,g=$.extend(!0,{},h.config);g.merge==null&&(g.merge={});let y={};for(let F in g.merge){let z=g.merge[F],M=z.r,E=z.c,N=z.rs,L=z.cs;if(e=="moveLeft")if(n>M+N-1||t<M||l>E+L-1)y[M+"_"+E]={r:M,c:E,rs:N,cs:L};else if(n<=M&&t>=M+N-1&&a<E)y[M+"_"+(E-m)]={r:M,c:E-m,rs:N,cs:L};else for(let O=M;O<=M+N-1;O++)for(let V=E;V<=E+L-1;V++)delete f[O][V].mc;else if(e=="moveUp")if(l>E+L-1||a<E||n>M+N-1)y[M+"_"+E]={r:M,c:E,rs:N,cs:L};else if(l<=E&&a>=E+L-1&&t<M)y[M-d+"_"+E]={r:M-d,c:E,rs:N,cs:L};else for(let O=M;O<=M+N-1;O++)for(let V=E;V<=E+L-1;V++)delete f[O][V].mc}g.merge=y;let v=u.calcChain,b=[];if(v!=null&&v.length>0)for(let F=0;F<v.length;F++){let z=$.extend(!0,{},v[F]),M=z.r,E=z.c,N=z.index,L=zl(M,E,N);if(M<n||M>t||E<l||E>a){let O;e=="moveLeft"?(O="="+p.functionStrChange(L,"del","col",null,l,m),E>a&&M>=n&&M<=t&&(z.c=E-m)):e=="moveUp"&&(O="="+p.functionStrChange(L,"del","row",null,n,d),M>t&&E>=l&&E<=a&&(z.r=M-d)),f[M][E]&&f[M][E].f==L&&(f[M][E].f=O),b.push(z)}}let k=u.filter_select,w=u.filter,x=null;if(k!=null&&JSON.stringify(k)!="{}"){x={filter_select:null,filter:null};let F=k.row[0],z=k.row[1],M=k.column[0],E=k.column[1];if(e=="moveUp")if(M>=l&&E<=a){if(F>t?x.filter_select={row:[F-d,z-d],column:[M,E]}:z<n?x.filter_select={row:[F,z],column:[M,E]}:F<n&&(z>t?x.filter_select={row:[F,z-d],column:[M,E]}:x.filter_select={row:[F,n-1],column:[M,E]}),x.filter_select!=null&&w!=null)for(let N in w){let L=w[N].rowhidden,O={};for(let V in L)V<n?O[V]=0:V>t&&(O[V-slen]=0);x.filter==null&&(x.filter={}),x.filter[N]=$.extend(!0,{},w[N]),JSON.stringify(O)!="{}"&&(x.filter[N].rowhidden=O),x.filter[N].str=x.filter_select.row[0],x.filter[N].edr=x.filter_select.row[1]}}else if(F>=n&&z<=t){if(M>a?x.filter_select={row:[F,z],column:[M,E]}:M>=l?E>a&&(x.filter_select={row:[F,z],column:[l,E-m]}):E<l?x.filter_select={row:[F,z],column:[M,E]}:E<=a?x.filter_select={row:[F,z],column:[M,l-1]}:x.filter_select={row:[F,z],column:[M,E-m]},x.filter_select!=null&&w!=null)for(let N in w){let L=x.filter_select.column[0],O=x.filter_select.column[1],V=w[N].cindex;if(V<l||V>a){x.filter==null&&(x.filter={}),V>a&&(V-=m);let q=V-L;x.filter[q]=$.extend(!0,{},w[N]),x.filter[q].cindex=V,x.filter[q].stc=L,x.filter[q].edc=O}}}else x.filter_select={row:[F,z],column:[M,E]},w!=null&&(x.filter=w);else if(e=="moveLeft")if(F>=n&&z<=t){if(M>a?x.filter_select={row:[F,z],column:[M-m,E-m]}:E<l?x.filter_select={row:[F,z],column:[M,E]}:M<l&&(E>a?x.filter_select={row:[F,z],column:[M,E-m]}:x.filter_select={row:[F,z],column:[M,l-1]}),x.filter_select!=null&&w!=null)for(let N in w){let L=x.filter_select.column[0],O=x.filter_select.column[1],V=w[N].cindex;if(V<l||V>a){x.filter==null&&(x.filter={}),V>a&&(V-=m);let q=V-L;x.filter[q]=$.extend(!0,{},w[N]),x.filter[q].cindex=V,x.filter[q].stc=L,x.filter[q].edc=O}}}else M>=l&&E<=a?(F<n||F>t)&&(x.filter_select={row:[F,z],column:[M,E]},w!=null&&(x.filter=w)):(x.filter_select={row:[F,z],column:[M,E]},w!=null&&(x.filter=w))}if(x!=null&&x.filter!=null){g.rowhidden==null&&(g.rowhidden={});for(let F in x.filter){let z=x.filter[F].rowhidden;for(let M in z)g.rowhidden[M]=0}}let C=u.luckysheet_conditionformat_save,S=[];if(C!=null&&C.length>0)for(let F=0;F<C.length;F++){let z=C[F].cellrange,M=[];for(let E=0;E<z.length;E++){let N=z[E].row[0],L=z[E].row[1],O=z[E].column[0],V=z[E].column[1];n<=N&&t>=L&&l<=O&&a>=V||(M=Kf(e,n,t,l,a,N,L,O,V,d,m))}if(M.length>0){let E=$.extend(!0,{},C[F]);E.cellrange=M,S.push(E)}}let _=u.dataVerification,T={};if(_!=null)for(let F in _){let z=Number(F.split("_")[0]),M=Number(F.split("_")[1]),E=_[F];(z<n||z>t||M<l||M>a)&&(e=="moveLeft"?M>a&&z>=n&&z<=t?T[z+"_"+(M-m)]=E:T[z+"_"+M]=E:e=="moveUp"&&(z>t&&M>=l&&M<=a?T[z-d+"_"+M]=E:T[z+"_"+M]=E))}let A=u.hyperlink,R={};if(A!=null)for(let F in A){let z=Number(F.split("_")[0]),M=Number(F.split("_")[1]),E=A[F];(z<n||z>t||M<l||M>a)&&(e=="moveLeft"?M>a&&z>=n&&z<=t?R[z+"_"+(M-m)]=E:R[z+"_"+M]=E:e=="moveUp"&&(z>t&&M>=l&&M<=a?R[z-d+"_"+M]=E:R[z+"_"+M]=E))}if(g.borderInfo&&g.borderInfo.length>0){let F=[];for(let z=0;z<g.borderInfo.length;z++){let M=g.borderInfo[z].rangeType;if(M=="range"){let E=g.borderInfo[z].range,N=[];for(let L=0;L<E.length;L++){let O=E[L].row[0],V=E[L].row[1],q=E[L].column[0],W=E[L].column[1];n<=O&&t>=V&&l<=q&&a>=W||(N=Kf(e,n,t,l,a,O,V,q,W,d,m))}if(N.length>0){let L={rangeType:"range",borderType:g.borderInfo[z].borderType,style:g.borderInfo[z].style,color:g.borderInfo[z].color,range:N};F.push(L)}}else if(M=="cell"){let E=g.borderInfo[z].value.row_index,N=g.borderInfo[z].value.col_index;(E<n||E>t||N<l||N>a)&&(e=="moveLeft"?N>a&&E>=n&&E<=t&&(N-=m,g.borderInfo[z].value.col_index=N):e=="moveUp"&&E>t&&N>=l&&N<=a&&(E-=d,g.borderInfo[z].value.row_index=E),F.push(g.borderInfo[z]))}}g.borderInfo=F}let I=[];for(let F=l;F<=a;F++)I.push(null);if(e=="moveUp"){let F=[];for(let M=n;M<=f.length-1;M++){let E=[];for(let N=l;N<=a;N++)E.push(f[M][N]);F.push(E)}F.splice(0,d);let z=[];for(let M=n;M<=t;M++)z.push(I);F=F.concat(z);for(let M=n;M<=f.length-1;M++)for(let E=l;E<=a;E++)f[M][E]=F[M-n][E-l]}else if(e=="moveLeft")for(let F=n;F<=t;F++)f[F].splice(l,m),f[F]=f[F].concat(I);u.index==h.currentSheetIndex?Ai(f,g,{type:e,str:n,edr:t,stc:l,edc:a},b,x,S,T,R):(u.data=f,u.config=g,u.calcChain=b,u.filter=x.filter,u.filter_select=x.filter_select,u.luckysheet_conditionformat_save=S,u.dataVerification=T,u.hyperlink=R)}function Kf(e,n,t,l,a,o,s,u,f,d,m){let g=[];if(e=="moveLeft"){if(n>s||t<o||l>f)g.push({row:[o,s],column:[u,f]});else if(a<u){if(n<=o&&t>=s)g.push({row:[o,s],column:[u-m,f-m]});else if(n>o&&t<s){let y=[{row:[o,n-1],column:[u,f]},{row:[t+1,s],column:[u,f]},{row:[n,t],column:[u-m,f-m]}];g=g.concat(y)}else if(n>o){let y=[{row:[o,n-1],column:[u,f]},{row:[n,s],column:[u-m,f-m]}];g=g.concat(y)}else if(t<s){let y=[{row:[o,t],column:[u-m,f-m]},{row:[t+1,s],column:[u,f]}];g=g.concat(y)}}else if(a>=u){if(l<=u&&a>=f){if(n>o&&t<s){let y=[{row:[o,n-1],column:[u,f]},{row:[t+1,s],column:[u,f]}];g=g.concat(y)}else if(n>o){let y=[{row:[o,n-1],column:[u,f]}];g=g.concat(y)}else if(t<s){let y=[{row:[t+1,s],column:[u,f]}];g=g.concat(y)}}else if(l>u&&a<f){if(n<=o&&t>=s)g.push({row:[o,s],column:[u,f-m]});else if(n>o&&t<s){let y=[{row:[o,n-1],column:[u,f]},{row:[t+1,s],column:[u,f]},{row:[n,t],column:[u,f-m]}];g=g.concat(y)}else if(n>o){let y=[{row:[o,n-1],column:[u,f]},{row:[n,s],column:[u,f-m]}];g=g.concat(y)}else if(t<s){let y=[{row:[o,t],column:[u,f-m]},{row:[t+1,s],column:[u,f]}];g=g.concat(y)}}else if(l>u){if(n<=o&&t>=s)g.push({row:[o,s],column:[u,l-1]});else if(n>o&&t<s){let y=[{row:[o,n-1],column:[u,f]},{row:[t+1,s],column:[u,f]},{row:[n,t],column:[u,l-1]}];g=g.concat(y)}else if(n>o){let y=[{row:[o,n-1],column:[u,f]},{row:[n,s],column:[u,l-1]}];g=g.concat(y)}else if(t<s){let y=[{row:[o,t],column:[u,l-1]},{row:[t+1,s],column:[u,f]}];g=g.concat(y)}}else if(a<f){if(n<=o&&t>=s)g.push({row:[o,s],column:[u-m,f-m]});else if(n>o&&t<s){let y=[{row:[o,n-1],column:[u,f]},{row:[t+1,s],column:[u,f]},{row:[n,t],column:[u-m,f-m]}];g=g.concat(y)}else if(n>o){let y=[{row:[o,n-1],column:[u,f]},{row:[n,s],column:[u-m,f-m]}];g=g.concat(y)}else if(t<s){let y=[{row:[o,t],column:[u-m,f-m]},{row:[t+1,s],column:[u,f]}];g=g.concat(y)}}}}else if(e=="moveUp"){if(l>f||a<u||n>s)g.push({row:[o,s],column:[u,f]});else if(t<o){if(l<=u&&a>=f)g.push({row:[o-d,s-d],column:[u,f]});else if(l>u&&a<f){let y=[{row:[o,s],column:[u,l-1]},{row:[o,s],column:[a+1,f]},{row:[o-d,s-d],column:[l,a]}];g=g.concat(y)}else if(l>u){let y=[{row:[o,s],column:[u,l-1]},{row:[o-d,s-d],column:[l,f]}];g=g.concat(y)}else if(a<f){let y=[{row:[o-d,s-d],column:[u,a]},{row:[o,s],column:[a+1,f]}];g=g.concat(y)}}else if(t>=o){if(n<=o&&t>=s){if(l>u&&a<f){let y=[{row:[o,s],column:[u,l-1]},{row:[o,s],column:[a+1,f]}];g=g.concat(y)}else if(l>u){let y=[{row:[o,s],column:[u,l-1]}];g=g.concat(y)}else if(a<f){let y=[{row:[o,s],column:[a+1,f]}];g=g.concat(y)}}else if(n>o&&t<s){if(l<=u&&a>=f)g.push({row:[o,s-d],column:[u,f]});else if(l>u&&a<f){let y=[{row:[o,s],column:[u,l-1]},{row:[o,s],column:[a+1,f]},{row:[o,s-d],column:[l,a]}];g=g.concat(y)}else if(l>u){let y=[{row:[o,s],column:[u,l-1]},{row:[o,s-d],column:[l,f]}];g=g.concat(y)}else if(a<f){let y=[{row:[o,s-d],column:[u,a]},{row:[o,s],column:[a+1,f]}];g=g.concat(y)}}else if(n>o){if(l<=u&&a>=f)g.push({row:[o,n-1],column:[u,f]});else if(l>u&&a<f){let y=[{row:[o,s],column:[u,l-1]},{row:[o,s],column:[a+1,f]},{row:[o,n-1],column:[l,a]}];g=g.concat(y)}else if(l>u){let y=[{row:[o,s],column:[u,l-1]},{row:[o,n-1],column:[l,f]}];g=g.concat(y)}else if(a<f){let y=[{row:[o,n-1],column:[u,a]},{row:[o,s],column:[a+1,f]}];g=g.concat(y)}}else if(t<s){if(l<=u&&a>=f)g.push({row:[o-d,s-d],column:[u,f]});else if(l>u&&a<f){let y=[{row:[o,s],column:[u,l-1]},{row:[o,s],column:[a+1,f]},{row:[o-d,s-d],column:[l,a]}];g=g.concat(y)}else if(l>u){let y=[{row:[o,s],column:[u,l-1]},{row:[o-d,s-d],column:[l,f]}];g=g.concat(y)}else if(a<f){let y=[{row:[o-d,s-d],column:[u,a]},{row:[o,s],column:[a+1,f]}];g=g.concat(y)}}}}return g}var fa=Ie(()=>{Jt();Ut();Yt();Kt();$r();gr();Vl();Zt();Lr();Ml();Nt();Xe()});function Ws(e,n,t,l,a){a==null&&(a=!0),h.visibledatarow=[],h.visibledatacolumn=[],h.ch_width=0,h.rh_height=0,h.zoomRatio=1,l!=null?h.config=l:h.config={},t.length==0?h.flowdata=cl(t,n,e):t.length<n&&t[0].length<e?h.flowdata=cl(t,n-t.length,e-t[0].length):t.length<n?h.flowdata=cl(t,n-t.length,0):t[0].length<e?h.flowdata=cl(t,0,e-t[0].length):h.flowdata=t,xe.webWorkerFlowDataCache(h.flowdata),yn(n,e),a&&(ve.showSheet(),setTimeout(function(){ve.restoreCache(),p.execFunctionGroup(),ve.restoreSheetAll(h.currentSheetIndex),Be()},1))}var Zf=Ie(()=>{Kt();Jt();Ii();Ut();Yt();dl();Xe()});var Ha,Xy,Je,Ll=Ie(()=>{Qt();Gt();dl();Ut();qr();yr();on();Vl();Nt();fa();xl();Jt();Zf();Xe();Ha={defaultStore:{container:null,luckysheetfile:null,defaultcolumnNum:60,defaultrowNum:84,fullscreenmode:!0,devicePixelRatio:1,currentSheetIndex:0,calculateSheetIndex:0,flowdata:[],config:{},visibledatarow:[],visibledatacolumn:[],ch_width:0,rh_height:0,cellmainWidth:0,cellmainHeight:0,toolbarHeight:0,infobarHeight:0,calculatebarHeight:0,rowHeaderWidth:46,columnHeaderHeight:20,cellMainSrollBarSize:12,sheetBarHeight:31,statisticBarHeight:23,luckysheetTableContentHW:[0,0],defaultcollen:73,defaultrowlen:19,jfcountfuncTimeout:null,jfautoscrollTimeout:null,luckysheet_select_status:!1,luckysheet_select_save:[{row:[0,0],column:[0,0]}],luckysheet_selection_range:[],luckysheet_copy_save:{},luckysheet_paste_iscut:!1,filterchage:!0,luckysheet_filter_save:{row:[],column:[]},luckysheet_sheet_move_status:!1,luckysheet_sheet_move_data:[],luckysheet_scroll_status:!1,luckysheetisrefreshdetail:!0,luckysheetisrefreshtheme:!0,luckysheetcurrentisPivotTable:!1,luckysheet_rows_selected_status:!1,luckysheet_cols_selected_status:!1,luckysheet_rows_change_size:!1,luckysheet_rows_change_size_start:[],luckysheet_cols_change_size:!1,luckysheet_cols_change_size_start:[],luckysheet_cols_dbclick_timeout:null,luckysheet_cols_dbclick_times:0,luckysheetCellUpdate:[],luckysheet_shiftpositon:null,iscopyself:!0,orderbyindex:0,luckysheet_model_move_state:!1,luckysheet_model_xy:[0,0],luckysheet_model_move_obj:null,luckysheet_cell_selected_move:!1,luckysheet_cell_selected_move_index:[],luckysheet_cell_selected_extend:!1,luckysheet_cell_selected_extend_index:[],luckysheet_cell_selected_extend_time:null,clearjfundo:!0,jfredo:[],jfundo:[],lang:"en",createChart:"",highlightChart:"",zIndex:15,chartparam:{luckysheetCurrentChart:null,luckysheetCurrentChartActive:!1,luckysheetCurrentChartMove:null,luckysheetCurrentChartMoveTimeout:null,luckysheetCurrentChartMoveObj:null,luckysheetCurrentChartMoveXy:null,luckysheetCurrentChartMoveWinH:null,luckysheetCurrentChartMoveWinW:null,luckysheetCurrentChartResize:null,luckysheetCurrentChartResizeObj:null,luckysheetCurrentChartResizeXy:null,luckysheetCurrentChartResizeWinH:null,luckysheetCurrentChartResizeWinW:null,luckysheetInsertChartTosheetChange:!0,luckysheetCurrentChartZIndexRank:100,luckysheet_chart_redo_click:!1,luckysheetCurrentChartMaxState:!1,jfrefreshchartall:"",changeChartCellData:"",renderChart:"",getChartJson:""},functionList:null,luckysheet_function:null,chart_selection:{},currentChart:"",scrollRefreshSwitch:!0,measureTextCache:{},measureTextCellInfoCache:{},measureTextCacheTimeOut:null,cellOverflowMapCache:{},zoomRatio:1,visibledatacolumn_unique:null,visibledatarow_unique:null,showGridLines:!0,toobarObject:{},inlineStringEditCache:null,inlineStringEditRange:null,fontList:[],currentSheetView:"viewNormal"},defaultFormula:{searchFunctionCell:null,functionlistPosition:{},rangechangeindex:null,rangestart:!1,rangetosheet:null,rangeSetValueTo:null,func_selectedrange:{},rangedrag_column_start:!1,rangedrag_row_start:!1,rangeResizeObj:null,rangeResize:null,rangeResizeIndex:null,rangeResizexy:null,rangeResizeWinH:null,rangeResizeWinW:null,rangeResizeTo:null,rangeMovexy:null,rangeMove:!1,rangeMoveObj:null,rangeMoveIndex:null,rangeMoveRangedata:null,functionHTMLIndex:0,functionRangeIndex:null,execvertex:{},execFunctionGroupData:null,execFunctionExist:null,formulaContainSheetList:{},cellTextToIndexList:{},isFunctionRangeSave:!1,formulaContainCellList:{},execFunctionGlobalData:{},groupValuesRefreshData:[],functionResizeData:{},functionResizeStatus:!1,functionResizeTimeout:null,data_parm_index:0},defaultSheet:{sheetMaxIndex:0,nulldata:null,mergeCalculationSheet:{},checkLoadSheetIndexToDataIndex:{},CacheNotLoadControll:[]},defaultPivotTable:{pivotDatas:null,pivotSheetIndex:0,pivotDataSheetIndex:0,celldata:null,origindata:null,pivot_data_type:{},pivot_select_save:null,column:null,row:null,values:null,filter:null,showType:null,rowhidden:null,selected:null,caljs:null,initial:!0,filterparm:null,luckysheet_pivotTable_select_state:!1,jgridCurrentPivotInput:null,movestate:!1,moveitemposition:[],movesave:{},drawPivotTable:!0,pivotTableBoundary:[12,6]},defaultImage:{imgItem:{type:"3",src:"",originWidth:null,originHeight:null,default:{width:null,height:null,left:null,top:null},crop:{width:null,height:null,offsetLeft:0,offsetTop:0},isFixedPos:!1,fixedLeft:null,fixedTop:null,border:{width:0,radius:0,style:"solid",color:"#000"}},images:null,currentImgId:null,currentWinW:null,currentWinH:null,resize:null,resizeXY:null,move:!1,moveXY:null,cropChange:null,cropChangeXY:null,cropChangeObj:null,copyImgItemObj:null},defaultDataVerification:{defaultItem:{type:"dropdown",type2:null,value1:"",value2:"",checked:!1,remote:!1,prohibitInput:!1,hintShow:!1,hintText:""},curItem:null,dataVerification:null,selectRange:[],selectStatus:!1}},Xy={addDataAjax:function(e,n,t,l){let a=this;n==null&&(n=h.currentSheetIndex),t==null&&(t=ne.loadSheetUrl),$("#luckysheet-grid-window-1").append(Er()),e.currentPage++;let o="application/json;charset=UTF-8",s=sessionStorage.getItem("x-auth-token");$.ajax({method:"POST",url:t,headers:{"x-auth-token":s},data:JSON.stringify(e),contentType:o,success:function(u){typeof u=="string"&&(u=JSON.parse(u));let f=u.data,d=f.celldata;ko(f.row,d),setTimeout(function(){h.loadingObj.close()},500),l&&typeof l=="function"&&l(f)}})},reload:function(e,n,t,l){let a=this;n==null&&(n=h.currentSheetIndex),t==null&&(t=ne.loadSheetUrl),$("#luckysheet-grid-window-1").append(Er());let o={gridKey:ne.gridKey,index:n};e=$.extend(!0,e,o);let s=h.luckysheetfile[Z(n)];$.post(t,e,function(u){let f=new Function("return "+u)();s.celldata=f[n.toString()];let d=ve.buildGridData(s);setTimeout(function(){h.loadingObj.close()},500),s.data=d,h.flowdata=d,xe.webWorkerFlowDataCache(d),Ws(d[0].length,d.length,d,null,!1),s.load="1",h.luckysheet_select_save.length=0,h.luckysheet_selection_range=[],ne.saveParam("shs",null,h.currentSheetIndex),ve.changeSheet(n),l&&typeof l=="function"&&l()})},clearSheetByIndex:function(e){let n=Z(e),t=h.luckysheetfile[n];t.isPivotTable?delete h.luckysheetfile[n]:(t.data=[],t.row=h.defaultrowNum,t.column=h.defaultcolumnNum,t.chart=[],t.config=null,t.filter=null,t.filter_select=null,t.celldata=[],t.pivotTable={},t.calcChain=[],t.status=0,t.load=0,h.flowdata=[],xe.webWorkerFlowDataCache(h.flowdata),$("#"+h.container+" .luckysheet-data-visualization-chart").remove(),$("#"+h.container+" .luckysheet-datavisual-selection-set").remove(),$("#luckysheet-row-count-show, #luckysheet-formula-functionrange-select, #luckysheet-row-count-show, #luckysheet-column-count-show, #luckysheet-change-size-line, #luckysheet-cell-selected-focus, #luckysheet-selection-copy, #luckysheet-cell-selected-extend, #luckysheet-cell-selected-move, #luckysheet-cell-selected").hide(),delete t.load)},clear:function(e){let n=this;if(e=="all")for(let t=0;t<h.luckysheetfile.length;t++){let l=h.luckysheetfile[t];n.clearSheetByIndex(l.index)}else e==null&&(e=h.currentSheetIndex),n.clearSheetByIndex(e);ve.changeSheet(h.luckysheetfile[0].index)},destroy:function(){$("#"+h.container).empty(),$("body > .luckysheet-cols-menu").remove(),$("#luckysheet-modal-dialog-mask, #luckysheetTextSizeTest, #luckysheet-icon-morebtn-div").remove(),$("#luckysheet-input-box").parent().remove(),$("#luckysheet-formula-help-c").remove(),$(".chartSetting, .luckysheet-modal-dialog-slider").remove(),$(document).off(".luckysheetEvent"),$(document).off(".luckysheetProtection"),Y.initialHorizontal=!0,Y.initialVertical=!0;let e=$.extend(!0,{},Ha.defaultStore);for(let s in e)s in h&&(h[s]=e[s]);let n=$.extend(!0,{},Ha.defaultFormula);for(let s in n)s in p&&(p[s]=n[s]);let t=$.extend(!0,{},Ha.defaultSheet);for(let s in t)s in ve&&(ve[s]=t[s]);let l=$.extend(!0,{},Ha.defaultPivotTable);for(let s in l)s in Oe&&(Oe[s]=l[s]);let a=$.extend(!0,{},Ha.defaultImage);for(let s in a)s in Re&&(Re[s]=a[s]);let o=$.extend(!0,{},Ha.defaultDataVerification);for(let s in o)s in Ye&&(Ye[s]=o[s]);h.asyncLoad=["core"]},editorChart:function(e){let n=Yl[0],t="luckysheetEditMode-datav-chart",l=t+"_selection";e.chart_id=t;let a=e.chartTheme;a=a==null?"default0000":a,luckysheet.insertChartTosheet(e.sheetIndex,e.dataSheetIndex,e.option,e.chartType,e.selfOption,e.defaultOption,e.row,e.column,n,t,l,e.chartStyle,e.rangeConfigCheck,e.rangeRowCheck,e.rangeColCheck,e.chartMarkConfig,e.chartTitleConfig,e.winWidth,e.winHeight,e.scrollLeft,e.scrollTop,a,e.myWidth,e.myHeight,e.myLeft!=null?parseFloat(e.myLeft):null,e.myTop!=null?parseFloat(e.myTop):null,e.myindexrank,!0),$("#"+t).find(".luckysheet-modal-controll-update").click()},createHookFunction:function(){let e=arguments[0];if(de.hook&&de.hook[e]!=null&&typeof de.hook[e]=="function"){var n=Array.prototype.slice.apply(arguments);return n.shift(),de.hook[e].apply(this,n)!==!1}return!0}},Je=Xy});var Ky,He,Ur=Ie(()=>{Ol();Jt();Ut();pn();Yt();An();Nt();ft();Vl();il();Ml();Qt();Xe();Ll();Ky={defaultWidth:144,defaultHeight:84,currentObj:null,currentWinW:null,currentWinH:null,resize:null,resizeXY:null,move:!1,moveXY:null,init:function(){let e=this;$("#luckysheet-postil-showBoxs").off("mousedown.showPs").on("mousedown.showPs",".luckysheet-postil-show",function(n){if(!!$t(h.currentSheetIndex,"editObjects",!1)){if(e.currentObj=$(this).find(".luckysheet-postil-show-main"),$(this).hasClass("luckysheet-postil-show-active")){n.stopPropagation();return}e.removeActivePs(),$(this).addClass("luckysheet-postil-show-active"),$(this).find(".luckysheet-postil-dialog-resize").show(),$(this).find(".arrowCanvas").css("z-index",200),$(this).find(".luckysheet-postil-show-main").css("z-index",200),n.stopPropagation()}}),$("#luckysheet-postil-showBoxs").off("mouseup.showPs").on("mouseup.showPs",".luckysheet-postil-show",function(n){n.which=="3"&&n.stopPropagation()}),$("#luckysheet-postil-showBoxs").off("mousedown.resize").on("mousedown.resize",".luckysheet-postil-show .luckysheet-postil-dialog-resize .luckysheet-postil-dialog-resize-item",function(n){if(!$t(h.currentSheetIndex,"editObjects",!1))return;e.currentObj=$(this).closest(".luckysheet-postil-show-main"),e.currentWinW=$("#luckysheet-cell-main")[0].scrollWidth,e.currentWinH=$("#luckysheet-cell-main")[0].scrollHeight,e.resize=$(this).data("type");let t=$("#luckysheet-cell-main").scrollTop(),l=$("#luckysheet-cell-main").scrollLeft(),a=nt(n.pageX,n.pageY),o=a[0]+l,s=a[1]+t,u=e.currentObj.position(),f=e.currentObj.width(),d=e.currentObj.height();if(e.resizeXY=[o,s,f,d,u.left+l,u.top+t,l,t],Qr(!0),$(this).closest(".luckysheet-postil-show").hasClass("luckysheet-postil-show-active")){n.stopPropagation();return}e.removeActivePs(),$(this).closest(".luckysheet-postil-show").addClass("luckysheet-postil-show-active"),$(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-dialog-resize").show(),$(this).closest(".luckysheet-postil-show").find(".arrowCanvas").css("z-index",200),$(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-show-main").css("z-index",200),n.stopPropagation()}),$("#luckysheet-postil-showBoxs").off("mousedown.move").on("mousedown.move",".luckysheet-postil-show .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item",function(n){if(!$t(h.currentSheetIndex,"editObjects",!1))return;e.currentObj=$(this).closest(".luckysheet-postil-show-main"),e.currentWinW=$("#luckysheet-cell-main")[0].scrollWidth,e.currentWinH=$("#luckysheet-cell-main")[0].scrollHeight,e.move=!0;let t=$("#luckysheet-cell-main").scrollTop(),l=$("#luckysheet-cell-main").scrollLeft(),a=e.currentObj.offset(),o=e.currentObj.position();if(e.moveXY=[n.pageX-a.left,n.pageY-a.top,o.left,o.top,l,t],Qr(!0),$(this).closest(".luckysheet-postil-show").hasClass("luckysheet-postil-show-active")){n.stopPropagation();return}e.removeActivePs(),$(this).closest(".luckysheet-postil-show").addClass("luckysheet-postil-show-active"),$(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-dialog-resize").show(),$(this).closest(".luckysheet-postil-show").find(".arrowCanvas").css("z-index",200),$(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-show-main").css("z-index",200),n.stopPropagation()})},overshow:function(e){let n=this;if($("#luckysheet-postil-overshow").remove(),$(e.target).closest("#luckysheet-cell-main").length==0)return;let t=nt(e.pageX,e.pageY),l=$("#luckysheet-cell-main").scrollLeft(),a=$("#luckysheet-cell-main").scrollTop(),o=t[0],s=t[1],u=0,f=0;Y.freezenverticaldata!=null&&t[0]<Y.freezenverticaldata[0]-Y.freezenverticaldata[2]?u=l:o+=l,Y.freezenhorizontaldata!=null&&t[1]<Y.freezenhorizontaldata[0]-Y.freezenhorizontaldata[2]?f=a:s+=a;let d=_t(s)[2],m=wt(o)[2],g=ke.mergeborer(h.flowdata,d,m);if(g&&(d=g.row[2],m=g.column[2]),h.flowdata[d]==null||h.flowdata[d][m]==null||h.flowdata[d][m].ps==null)return;let y=h.flowdata[d][m].ps;if(y.isshow||$("#luckysheet-postil-show_"+d+"_"+m).length>0)return;let v=y.value==null?"":y.value,b=h.visibledatarow[d],k=d-1==-1?0:h.visibledatarow[d-1],w=h.visibledatacolumn[m],x=m-1==-1?0:h.visibledatacolumn[m-1];g&&(b=g.row[1],k=g.row[0],w=g.column[1],x=g.column[0]);let C=w+u,S=k+f,_=C+18*h.zoomRatio,T=S-18*h.zoomRatio;T<0&&(T=2);let A=y.width==null?n.defaultWidth*h.zoomRatio:y.width*h.zoomRatio,R=y.height==null?n.defaultHeight*h.zoomRatio:y.height*h.zoomRatio,I=n.getArrowCanvasSize(_,T,C,S),F="",z=v.split(` |
| | | `);for(let N of z)F+="<div>"+n.htmlEscape(N)+"</div>";let M='<div id="luckysheet-postil-overshow"><canvas class="arrowCanvas" width="'+I[2]+'" height="'+I[3]+'" style="position:absolute;left:'+I[0]+"px;top:"+I[1]+'px;z-index:100;pointer-events:none;"></canvas><div style="width:'+(A-12)+"px;min-height:"+(R-12)+"px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:"+_+"px;top:"+T+'px;z-index:100;">'+F+"</div></div>";$(M).appendTo($("#luckysheet-cell-main"));let E=$("#luckysheet-postil-overshow .arrowCanvas").get(0).getContext("2d");n.drawArrow(E,I[4],I[5],I[6],I[7])},getArrowCanvasSize:function(e,n,t,l){let a=t-5;e<t&&(a=e-5);let o=l-5;n<l&&(o=n-5);let s=Math.abs(e-t)+10,u=Math.abs(n-l)+10,f=s-5,d=5;e<t&&(f=5,d=s-5);let m=u-5,g=5;return n<l&&(m=5,g=u-5),[a,o,s,u,f,m,d,g]},drawArrow:function(e,n,t,l,a,o,s,u,f){o=P(o)=="undefined"?30:o,s=P(s)=="undefined"?6:s,u=P(u)=="undefined"?1:u,f=P(f)=="undefined"?"#000":f;let d=Math.atan2(t-a,n-l)*180/Math.PI,m=(d+o)*Math.PI/180,g=(d-o)*Math.PI/180,y=s*Math.cos(m),v=s*Math.sin(m),b=s*Math.cos(g),k=s*Math.sin(g);e.save(),e.beginPath();let w=n-y,x=t-v;e.moveTo(w,x),e.moveTo(n,t),e.lineTo(l,a),e.lineWidth=u,e.strokeStyle=f,e.stroke(),w=l+y,x=a+v,e.moveTo(w,x),e.lineTo(l,a),w=l+b,x=a+k,e.lineTo(w,x),e.fillStyle=f,e.fill(),e.restore()},buildAllPs:function(e){let n=this;$("#luckysheet-cell-main #luckysheet-postil-showBoxs").empty();for(let t=0;t<e.length;t++)for(let l=0;l<e[0].length;l++)if(e[t][l]!=null&&e[t][l].ps!=null){let a=e[t][l].ps;n.buildPs(t,l,a)}n.init()},buildPs:function(e,n,t){if($("#luckysheet-postil-show_"+e+"_"+n).length>0&&$("#luckysheet-postil-show_"+e+"_"+n).remove(),t==null)return;let l=this;if(t.isshow==null?!1:t.isshow){let o=h.visibledatarow[e],s=e-1==-1?0:h.visibledatarow[e-1],u=h.visibledatacolumn[n],f=n-1==-1?0:h.visibledatacolumn[n-1],d=ke.mergeborer(h.flowdata,e,n);d&&(o=d.row[1],s=d.row[0],u=d.column[1],f=d.column[0]);let m=u,g=s,y=t.left==null?m+18*h.zoomRatio:t.left*h.zoomRatio,v=t.top==null?g-18*h.zoomRatio:t.top*h.zoomRatio,b=t.width==null?l.defaultWidth*h.zoomRatio:t.width*h.zoomRatio,k=t.height==null?l.defaultHeight*h.zoomRatio:t.height*h.zoomRatio,w=t.value==null?"":t.value;v<0&&(v=2);let x=l.getArrowCanvasSize(y,v,m,g),C="",S=w.split(` |
| | | `);for(let A of S)C+="<div>"+l.htmlEscape(A)+"</div>";let _='<div id="luckysheet-postil-show_'+e+"_"+n+'" class="luckysheet-postil-show"><canvas class="arrowCanvas" width="'+x[2]+'" height="'+x[3]+'" style="position:absolute;left:'+x[0]+"px;top:"+x[1]+'px;z-index:100;pointer-events:none;"></canvas><div class="luckysheet-postil-show-main" style="width:'+b+"px;height:"+k+"px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:"+y+"px;top:"+v+'px;box-sizing:border-box;z-index:100;"><div class="luckysheet-postil-dialog-move"><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-t" data-type="t"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-r" data-type="r"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-b" data-type="b"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-l" data-type="l"></div></div><div class="luckysheet-postil-dialog-resize" style="display:none;"><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lt" data-type="lt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mt" data-type="mt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lm" data-type="lm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rm" data-type="rm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rt" data-type="rt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lb" data-type="lb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mb" data-type="mb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rb" data-type="rb"></div></div><div style="width:100%;height:100%;overflow:hidden;"><div class="formulaInputFocus" style="width:'+(b-12)+"px;height:"+(k-12)+'px;line-height:20px;box-sizing:border-box;text-align: center;;word-break:break-all;" spellcheck="false" contenteditable="true">'+C+"</div></div></div></div>";$(_).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs"));let T=$("#luckysheet-postil-show_"+e+"_"+n+" .arrowCanvas").get(0).getContext("2d");l.drawArrow(T,x[4],x[5],x[6],x[7])}},newPs:function(e,n){if(!$t(h.currentSheetIndex,"editObjects")||!Je.createHookFunction("commentInsertBefore",e,n))return;let t=this,l=h.visibledatarow[e],a=e-1==-1?0:h.visibledatarow[e-1],o=h.visibledatacolumn[n],s=n-1==-1?0:h.visibledatacolumn[n-1],u=ke.mergeborer(h.flowdata,e,n);u&&(l=u.row[1],a=u.row[0],o=u.column[1],s=u.column[0]);let f=o,d=a,m=f+18*h.zoomRatio,g=d-18*h.zoomRatio;g<0&&(g=2);let y=t.defaultWidth*h.zoomRatio,v=t.defaultHeight*h.zoomRatio,b=t.getArrowCanvasSize(m,g,f,d),k='<div id="luckysheet-postil-show_'+e+"_"+n+'" class="luckysheet-postil-show luckysheet-postil-show-active"><canvas class="arrowCanvas" width="'+b[2]+'" height="'+b[3]+'" style="position:absolute;left:'+b[0]+"px;top:"+b[1]+'px;z-index:100;pointer-events:none;"></canvas><div class="luckysheet-postil-show-main" style="width:'+y+"px;height:"+v+"px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:"+m+"px;top:"+g+'px;box-sizing:border-box;z-index:100;"><div class="luckysheet-postil-dialog-move"><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-t" data-type="t"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-r" data-type="r"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-b" data-type="b"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-l" data-type="l"></div></div><div class="luckysheet-postil-dialog-resize"><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lt" data-type="lt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mt" data-type="mt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lm" data-type="lm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rm" data-type="rm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rt" data-type="rt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lb" data-type="lb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mb" data-type="mb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rb" data-type="rb"></div></div><div style="width:100%;height:100%;overflow:hidden;"><div class="formulaInputFocus" style="width:132px;height:72px;line-height:20px;box-sizing:border-box;text-align: center;word-break:break-all;" spellcheck="false" contenteditable="true"></div></div></div></div>';$(k).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs"));let w=$("#luckysheet-postil-show_"+e+"_"+n+" .arrowCanvas").get(0).getContext("2d");t.drawArrow(w,b[4],b[5],b[6],b[7]),$("#luckysheet-postil-show_"+e+"_"+n+" .formulaInputFocus").focus(),t.init();let x=xe.deepCopyFlowData(h.flowdata),C=[];x[e][n]==null&&(x[e][n]={}),x[e][n].ps={left:null,top:null,width:null,height:null,value:"",isshow:!1},C.push(e+"_"+n),t.ref(x,C),setTimeout(()=>{Je.createHookFunction("commentInsertAfter",e,n,x[e][n])},0)},editPs:function(e,n){let t=this;if(!!$t(h.currentSheetIndex,"editObjects")){if($("#luckysheet-postil-show_"+e+"_"+n).length>0)$("#luckysheet-postil-show_"+e+"_"+n).show(),$("#luckysheet-postil-show_"+e+"_"+n).addClass("luckysheet-postil-show-active"),$("#luckysheet-postil-show_"+e+"_"+n).find(".luckysheet-postil-dialog-resize").show();else{let l=h.flowdata[e][n].ps,a=h.visibledatarow[e],o=e-1==-1?0:h.visibledatarow[e-1],s=h.visibledatacolumn[n],u=n-1==-1?0:h.visibledatacolumn[n-1],f=ke.mergeborer(h.flowdata,e,n);f&&(a=f.row[1],o=f.row[0],s=f.column[1],u=f.column[0]);let d=s,m=o,g=l.left==null?d+18*h.zoomRatio:l.left*h.zoomRatio,y=l.top==null?m-18*h.zoomRatio:l.top*h.zoomRatio,v=l.width==null?t.defaultWidth*h.zoomRatio:l.width*h.zoomRatio,b=l.height==null?t.defaultHeight*h.zoomRatio:l.height*h.zoomRatio,k=l.value==null?"":l.value;y<0&&(y=2);let w=t.getArrowCanvasSize(g,y,d,m),x="",C=k.split(` |
| | | `);for(let T of C)x+="<div>"+t.htmlEscape(T)+"</div>";let S='<div id="luckysheet-postil-show_'+e+"_"+n+'" class="luckysheet-postil-show luckysheet-postil-show-active"><canvas class="arrowCanvas" width="'+w[2]+'" height="'+w[3]+'" style="position:absolute;left:'+w[0]+"px;top:"+w[1]+'px;z-index:100;pointer-events:none;"></canvas><div class="luckysheet-postil-show-main" style="width:'+v+"px;height:"+b+"px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:"+g+"px;top:"+y+'px;box-sizing:border-box;z-index:100;"><div class="luckysheet-postil-dialog-move"><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-t" data-type="t"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-r" data-type="r"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-b" data-type="b"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-l" data-type="l"></div></div><div class="luckysheet-postil-dialog-resize"><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lt" data-type="lt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mt" data-type="mt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lm" data-type="lm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rm" data-type="rm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rt" data-type="rt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lb" data-type="lb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mb" data-type="mb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rb" data-type="rb"></div></div><div style="width:100%;height:100%;overflow:hidden;"><div class="formulaInputFocus" style="width:'+(v-12)+"px;height:"+(b-12)+'px;line-height:20px;box-sizing:border-box;text-align: center;;word-break:break-all;" spellcheck="false" contenteditable="true">'+x+"</div></div></div></div>";$(S).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs"));let _=$("#luckysheet-postil-show_"+e+"_"+n+" .arrowCanvas").get(0).getContext("2d");t.drawArrow(_,w[4],w[5],w[6],w[7])}$("#luckysheet-postil-show_"+e+"_"+n+" .formulaInputFocus").focus(),_r($("#luckysheet-postil-show_"+e+"_"+n+" .formulaInputFocus").get(0)),t.init()}},delPs:function(e,n){if(!$t(h.currentSheetIndex,"editObjects")||!Je.createHookFunction("commentDeleteBefore",e,n,h.flowdata[e][n]))return;$("#luckysheet-postil-show_"+e+"_"+n).length>0&&$("#luckysheet-postil-show_"+e+"_"+n).remove();let t=xe.deepCopyFlowData(h.flowdata),l=[];delete t[e][n].ps,l.push(e+"_"+n),this.ref(t,l),setTimeout(()=>{Je.createHookFunction("commentDeleteAfter",e,n,h.flowdata[e][n])},0)},showHidePs:function(e,n){let t=this,l=h.flowdata[e][n].ps,a=l.isshow,o=xe.deepCopyFlowData(h.flowdata),s=[];if(a)o[e][n].ps.isshow=!1,$("#luckysheet-postil-show_"+e+"_"+n).remove();else{o[e][n].ps.isshow=!0;let u=h.visibledatarow[e],f=e-1==-1?0:h.visibledatarow[e-1],d=h.visibledatacolumn[n],m=n-1==-1?0:h.visibledatacolumn[n-1],g=ke.mergeborer(h.flowdata,e,n);g&&(u=g.row[1],f=g.row[0],d=g.column[1],m=g.column[0]);let y=$("#luckysheet-cell-main").scrollLeft(),v=$("#luckysheet-cell-main").scrollTop(),b=d,k=f;Y.freezenverticaldata!=null&&b<Y.freezenverticaldata[0]-Y.freezenverticaldata[2]&&(b+=y),Y.freezenhorizontaldata!=null&&k<Y.freezenhorizontaldata[0]-Y.freezenhorizontaldata[2]&&(k+=v);let w=l.left==null?b+18*h.zoomRatio:l.left*h.zoomRatio,x=l.top==null?k-18*h.zoomRatio:l.top*h.zoomRatio,C=l.width==null?t.defaultWidth*h.zoomRatio:l.width*h.zoomRatio,S=l.height==null?t.defaultHeight*h.zoomRatio:l.height*h.zoomRatio,_=l.value==null?"":l.value;x<0&&(x=2);let T=t.getArrowCanvasSize(w,x,b,k),A="",R=_.split(` |
| | | `);for(let z of R)A+="<div>"+t.htmlEscape(z)+"</div>";let I='<div id="luckysheet-postil-show_'+e+"_"+n+'" class="luckysheet-postil-show"><canvas class="arrowCanvas" width="'+T[2]+'" height="'+T[3]+'" style="position:absolute;left:'+T[0]+"px;top:"+T[1]+'px;z-index:100;pointer-events:none;"></canvas><div class="luckysheet-postil-show-main" style="width:'+C+"px;height:"+S+"px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:"+w+"px;top:"+x+'px;box-sizing:border-box;z-index:100;"><div class="luckysheet-postil-dialog-move"><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-t" data-type="t"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-r" data-type="r"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-b" data-type="b"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-l" data-type="l"></div></div><div class="luckysheet-postil-dialog-resize" style="display:none;"><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lt" data-type="lt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mt" data-type="mt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lm" data-type="lm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rm" data-type="rm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rt" data-type="rt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lb" data-type="lb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mb" data-type="mb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rb" data-type="rb"></div></div><div style="width:100%;height:100%;overflow:hidden;"><div class="formulaInputFocus" style="width:'+(C-12)+"px;height:"+(S-12)+'px;line-height:20px;box-sizing:border-box;text-align: center;;word-break:break-all;" spellcheck="false" contenteditable="true">'+A+"</div></div></div></div>";$(I).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs"));let F=$("#luckysheet-postil-show_"+e+"_"+n+" .arrowCanvas").get(0).getContext("2d");t.drawArrow(F,T[4],T[5],T[6],T[7]),t.init()}s.push(e+"_"+n),t.ref(o,s)},showHideAllPs:function(){let e=this,n=xe.deepCopyFlowData(h.flowdata),t=!0,l=[];for(let o=0;o<n.length;o++)for(let s=0;s<n[0].length;s++)n[o]!=null&&n[o][s]!=null&&n[o][s].ps!=null&&(l.push(o+"_"+s),n[o][s].ps.isshow||(t=!1));let a=[];if(l.length>0)if(t){$("#luckysheet-cell-main #luckysheet-postil-showBoxs").empty();for(let o=0;o<l.length;o++){let s=l[o].split("_")[0],u=l[o].split("_")[1];n[s][u].ps.isshow&&(n[s][u].ps.isshow=!1,a.push(l[o]))}}else for(let o=0;o<l.length;o++){let s=l[o].split("_")[0],u=l[o].split("_")[1],f=n[s][u].ps;if(!f.isshow){let d=h.visibledatarow[s],m=s-1==-1?0:h.visibledatarow[s-1],g=h.visibledatacolumn[u],y=u-1==-1?0:h.visibledatacolumn[u-1],v=ke.mergeborer(h.flowdata,s,u);v&&(d=v.row[1],m=v.row[0],g=v.column[1],y=v.column[0]);let b=$("#luckysheet-cell-main").scrollLeft(),k=$("#luckysheet-cell-main").scrollTop(),w=g,x=m;Y.freezenverticaldata!=null&&w<Y.freezenverticaldata[0]-Y.freezenverticaldata[2]&&(w+=b),Y.freezenhorizontaldata!=null&&x<Y.freezenhorizontaldata[0]-Y.freezenhorizontaldata[2]&&(x+=k);let C=f.left==null?w+18*h.zoomRatio:f.left*h.zoomRatio,S=f.top==null?x-18*h.zoomRatio:f.top*h.zoomRatio,_=f.width==null?e.defaultWidth*h.zoomRatio:f.width*h.zoomRatio,T=f.height==null?e.defaultHeight*h.zoomRatio:f.height*h.zoomRatio,A=f.value==null?"":f.value;S<0&&(S=2);let R=e.getArrowCanvasSize(C,S,w,x),I="",F=A.split(` |
| | | `);for(let E of F)I+="<div>"+e.htmlEscape(E)+"</div>";let z='<div id="luckysheet-postil-show_'+s+"_"+u+'" class="luckysheet-postil-show"><canvas class="arrowCanvas" width="'+R[2]+'" height="'+R[3]+'" style="position:absolute;left:'+R[0]+"px;top:"+R[1]+'px;z-index:100;pointer-events:none;"></canvas><div class="luckysheet-postil-show-main" style="width:'+_+"px;height:"+T+"px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:"+C+"px;top:"+S+'px;box-sizing:border-box;z-index:100;"><div class="luckysheet-postil-dialog-move"><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-t" data-type="t"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-r" data-type="r"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-b" data-type="b"></div><div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-l" data-type="l"></div></div><div class="luckysheet-postil-dialog-resize" style="display:none;"><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lt" data-type="lt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mt" data-type="mt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lm" data-type="lm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rm" data-type="rm"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rt" data-type="rt"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lb" data-type="lb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mb" data-type="mb"></div><div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rb" data-type="rb"></div></div><div style="width:100%;height:100%;overflow:hidden;"><div class="formulaInputFocus" style="width:'+(_-12)+"px;height:"+(T-12)+'px;line-height:20px;box-sizing:border-box;text-align: center;;word-break:break-all;" spellcheck="false" contenteditable="true">'+I+"</div></div></div></div>";$(z).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs"));let M=$("#luckysheet-postil-show_"+s+"_"+u+" .arrowCanvas").get(0).getContext("2d");e.drawArrow(M,R[4],R[5],R[6],R[7]),n[s][u].ps.isshow=!0,a.push(l[o])}}e.ref(n,a),e.init()},removeActivePs:function(){if($("#luckysheet-postil-showBoxs .luckysheet-postil-show-active").length>0){let e=$("#luckysheet-postil-showBoxs .luckysheet-postil-show-active").attr("id"),n=e.split("luckysheet-postil-show_")[1].split("_")[0],t=e.split("luckysheet-postil-show_")[1].split("_")[1],l=$("#"+e).find(".formulaInputFocus").html().replaceAll("<div>",` |
| | | `).replaceAll(/<(.*)>.*?|<(.*) \/>/g,"").trim();if(!Je.createHookFunction("commentUpdateBefore",n,t,l)){h.flowdata[n][t].ps.isshow||$("#"+e).remove();return}let a=$.extend(!0,{},h.flowdata[n][t]);$("#"+e).removeClass("luckysheet-postil-show-active"),$("#"+e).find(".luckysheet-postil-dialog-resize").hide(),$("#"+e).find(".arrowCanvas").css("z-index",100),$("#"+e).find(".luckysheet-postil-show-main").css("z-index",100);let o=xe.deepCopyFlowData(h.flowdata),s=[];o[n][t].ps.value=l,s.push(n+"_"+t),this.ref(o,s),o[n][t].ps.isshow||$("#"+e).remove(),setTimeout(()=>{Je.createHookFunction("commentUpdateAfter",n,t,a,o[n][t])},0)}},ref:function(e,n){if(h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"postil",data:h.flowdata,curdata:e,sheetIndex:h.currentSheetIndex,rc:n})),h.flowdata=e,xe.webWorkerFlowDataCache(h.flowdata),h.luckysheetfile[Z(h.currentSheetIndex)].data=h.flowdata,ne.allowUpdate)for(let t=0;t<n.length;t++){let l=n[t].split("_")[0],a=n[t].split("_")[1];ne.saveParam("v",h.currentSheetIndex,h.flowdata[l][a],{r:l,c:a})}setTimeout(function(){Be()},1)},positionSync:function(){let e=this;$("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(n,t){let l=$(t).attr("id"),a=l.split("luckysheet-postil-show_")[1].split("_")[0],o=l.split("luckysheet-postil-show_")[1].split("_")[1],s=h.flowdata[a][o];s!=null&&s.ps!=null?e.buildPs(a,o,s.ps):$("#"+l).hide()})},htmlEscape:function(e){return e.replace(/[<>"&]/g,function(n,t,l){switch(console.log(n,t,l),n){case"<":return"<";case">":return">";case"&":return"&";case'"':return"""}})}},He=Ky});function Ys(e,n,t,l,a){let o={},s,u;a==null?(s=h.config,u=h.flowdata):(s=h.luckysheetfile[Z(a)].config,u=h.luckysheetfile[Z(a)].data);let d=s.borderInfo;if(d!=null&&d.length>0)for(let f=0;f<d.length;f++){let m=d[f].rangeType;if(m=="range"){let g=d[f].borderType,y=d[f].color,v=d[f].style,b=d[f].range;for(let k=0;k<b.length;k++){let w=b[k].row[0],x=b[k].row[1],C=b[k].column[0],S=b[k].column[1];if(w<e&&(w=e),x>n&&(x=n),C<t&&(C=t),S>l&&(S=l),g=="border-left")for(let _=w;_<=x;_++){if(s.rowhidden!=null&&s.rowhidden[_]!=null)continue;o[_+"_"+C]==null&&(o[_+"_"+C]={}),o[_+"_"+C].l={color:y,style:v};let T=C-1;if(T>=0&&o[_+"_"+T])if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let R=u[_][T],I=s.merge[R.mc.r+"_"+R.mc.c];I.c+I.cs-1==T&&(o[_+"_"+T].r={color:y,style:v})}else o[_+"_"+T].r={color:y,style:v};let A=s.merge||{};for(let R in A){let{c:I,r:F,cs:z,rs:M}=A[R];C<=I+z-1&&C>I&&_>=F&&_<=F+M-1&&(o[_+"_"+C].l=null)}}else if(g=="border-right")for(let _=w;_<=x;_++){if(s.rowhidden!=null&&s.rowhidden[_]!=null)continue;o[_+"_"+S]==null&&(o[_+"_"+S]={}),o[_+"_"+S].r={color:y,style:v};let T=S+1;if(T<u[0].length&&o[_+"_"+T])if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let R=u[_][T];s.merge[R.mc.r+"_"+R.mc.c].c==T&&(o[_+"_"+T].l={color:y,style:v})}else o[_+"_"+T].l={color:y,style:v};let A=s.merge||{};for(let R in A){let{c:I,r:F,cs:z,rs:M}=A[R];S<I+z-1&&S>=I&&_>=F&&_<=F+M-1&&(o[_+"_"+S].r=null)}}else if(g=="border-top"){if(s.rowhidden!=null&&s.rowhidden[w]!=null)continue;for(let _=C;_<=S;_++){o[w+"_"+_]==null&&(o[w+"_"+_]={}),o[w+"_"+_].t={color:y,style:v};let T=w-1;if(T>=0&&o[T+"_"+_])if(u[T]!=null&&P(u[T][_])=="object"&&u[T][_].mc!=null){let R=u[T][_],I=s.merge[R.mc.r+"_"+R.mc.c];I.r+I.rs-1==T&&(o[T+"_"+_].b={color:y,style:v})}else o[T+"_"+_].b={color:y,style:v};let A=s.merge||{};for(let R in A){let{c:I,r:F,cs:z,rs:M}=A[R];w<=F+M-1&&w>F&&_>=I&&_<=I+z-1&&(o[w+"_"+_].t=null)}}}else if(g=="border-bottom"){if(s.rowhidden!=null&&s.rowhidden[x]!=null)continue;for(let _=C;_<=S;_++){o[x+"_"+_]==null&&(o[x+"_"+_]={}),o[x+"_"+_].b={color:y,style:v};let T=x+1;if(T<u.length&&o[T+"_"+_])if(u[T]!=null&&P(u[T][_])=="object"&&u[T][_].mc!=null){let R=u[T][_];s.merge[R.mc.r+"_"+R.mc.c].r==T&&(o[T+"_"+_].t={color:y,style:v})}else o[T+"_"+_].t={color:y,style:v};let A=s.merge||{};for(let R in A){let{c:I,r:F,cs:z,rs:M}=A[R];x<F+M-1&&x>=F&&_>=I&&_<=I+z-1&&(o[x+"_"+_].b=null)}}}else if(g=="border-all"){for(let _=w;_<=x;_++)if(!(s.rowhidden!=null&&s.rowhidden[_]!=null))for(let T=C;T<=S;T++){if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c];R.r==_&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v}),R.r+R.rs-1==_&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].b={color:y,style:v}),R.c==T&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v}),R.c+R.cs-1==T&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].r={color:y,style:v},o[_+"_"+T].t={color:y,style:v},o[_+"_"+T].b={color:y,style:v};if(_==w){let A=w-1;if(A>=0&&o[A+"_"+T])if(u[A]!=null&&P(u[A][T])=="object"&&u[A][T].mc!=null){let R=u[A][T],I=s.merge[R.mc.r+"_"+R.mc.c];I.r+I.rs-1==A&&(o[A+"_"+T].b={color:y,style:v})}else o[A+"_"+T].b={color:y,style:v}}if(_==x){let A=x+1;if(A<u.length&&o[A+"_"+T])if(u[A]!=null&&P(u[A][T])=="object"&&u[A][T].mc!=null){let R=u[A][T];s.merge[R.mc.r+"_"+R.mc.c].r==A&&(o[A+"_"+T].t={color:y,style:v})}else o[A+"_"+T].t={color:y,style:v}}if(T==C){let A=C-1;if(A>=0&&o[_+"_"+A])if(u[_]!=null&&P(u[_][A])=="object"&&u[_][A].mc!=null){let R=u[_][A],I=s.merge[R.mc.r+"_"+R.mc.c];I.c+I.cs-1==A&&(o[_+"_"+A].r={color:y,style:v})}else o[_+"_"+A].r={color:y,style:v}}if(T==S){let A=S+1;if(A<u[0].length&&o[_+"_"+A])if(u[_]!=null&&P(u[_][A])=="object"&&u[_][A].mc!=null){let R=u[_][A];s.merge[R.mc.r+"_"+R.mc.c].c==A&&(o[_+"_"+A].l={color:y,style:v})}else o[_+"_"+A].l={color:y,style:v}}}}else if(g=="border-outside"){for(let _=w;_<=x;_++)if(!(s.rowhidden!=null&&s.rowhidden[_]!=null)){for(let T=C;T<=S;T++)if(_==w||_==x||T==C||T==S){if(_==w){o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v};let A=w-1;if(A>=0&&o[A+"_"+T])if(u[A]!=null&&P(u[A][T])=="object"&&u[A][T].mc!=null){let R=u[A][T],I=s.merge[R.mc.r+"_"+R.mc.c];I.r+I.rs-1==A&&(o[A+"_"+T].b={color:y,style:v})}else o[A+"_"+T].b={color:y,style:v}}if(_==x){o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].b={color:y,style:v};let A=x+1;if(A<u.length&&o[A+"_"+T])if(u[A]!=null&&P(u[A][T])=="object"&&u[A][T].mc!=null){let R=u[A][T];s.merge[R.mc.r+"_"+R.mc.c].r==A&&(o[A+"_"+T].t={color:y,style:v})}else o[A+"_"+T].t={color:y,style:v}}if(T==C){o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v};let A=C-1;if(A>=0&&o[_+"_"+A])if(u[_]!=null&&P(u[_][A])=="object"&&u[_][A].mc!=null){let R=u[_][A],I=s.merge[R.mc.r+"_"+R.mc.c];I.c+I.cs-1==A&&(o[_+"_"+A].r={color:y,style:v})}else o[_+"_"+A].r={color:y,style:v}}if(T==S){o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v};let A=S+1;if(A<u[0].length&&o[_+"_"+A])if(u[_]!=null&&P(u[_][A])=="object"&&u[_][A].mc!=null){let R=u[_][A];s.merge[R.mc.r+"_"+R.mc.c].c==A&&(o[_+"_"+A].l={color:y,style:v})}else o[_+"_"+A].l={color:y,style:v}}}}}else if(g=="border-inside"){for(let _=w;_<=x;_++)if(!(s.rowhidden!=null&&s.rowhidden[_]!=null))for(let T=C;T<=S;T++)if(_==w&&T==C)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v},o[_+"_"+T].b={color:y,style:v});else if(_==x&&T==C)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v},o[_+"_"+T].t={color:y,style:v});else if(_==w&&T==S)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].b={color:y,style:v});else if(_==x&&T==S)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].t={color:y,style:v});else if(_==w)if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c];R.c==T?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v}):R.c+R.cs-1==T&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].r={color:y,style:v},o[_+"_"+T].b={color:y,style:v};else if(_==x)if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c];R.c==T?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v}):R.c+R.cs-1==T&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].r={color:y,style:v},o[_+"_"+T].t={color:y,style:v};else if(T==C)if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c];R.r==_?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v}):R.r+R.rs-1==_&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].b={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v},o[_+"_"+T].t={color:y,style:v},o[_+"_"+T].b={color:y,style:v};else if(T==S)if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c];R.r==_?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v}):R.r+R.rs-1==_&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].b={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].t={color:y,style:v},o[_+"_"+T].b={color:y,style:v};else if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c];R.r==_?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v}):R.r+R.rs-1==_&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].b={color:y,style:v}),R.c==T?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v}):R.c+R.cs-1==T&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].r={color:y,style:v},o[_+"_"+T].t={color:y,style:v},o[_+"_"+T].b={color:y,style:v}}else if(g=="border-horizontal"){for(let _=w;_<=x;_++)if(!(s.rowhidden!=null&&s.rowhidden[_]!=null))for(let T=C;T<=S;T++)if(_==w)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].b={color:y,style:v});else if(_==x)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v});else if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c];R.r==_?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v}):R.r+R.rs-1==_&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].b={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v},o[_+"_"+T].b={color:y,style:v}}else if(g=="border-vertical"){for(let _=w;_<=x;_++)if(!(s.rowhidden!=null&&s.rowhidden[_]!=null))for(let T=C;T<=S;T++)if(T==C)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v});else if(T==S)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v});else if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c]||{};R.c==T?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v}):R.c+R.cs-1==T&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].r={color:y,style:v}}else if(g=="border-none"){for(let _=w;_<=x;_++)if(!(s.rowhidden!=null&&s.rowhidden[_]!=null))for(let T=C;T<=S;T++){if(o[_+"_"+T]!=null&&delete o[_+"_"+T],_==w){let A=w-1;A>=0&&o[A+"_"+T]&&delete o[A+"_"+T].b}if(_==x){let A=x+1;A<u.length&&o[A+"_"+T]&&delete o[A+"_"+T].t}if(T==C){let A=C-1;A>=0&&o[_+"_"+A]&&delete o[_+"_"+A].r}if(T==S){let A=S+1;A<u[0].length&&o[_+"_"+A]&&delete o[_+"_"+A].l}}}}}else if(m=="cell"){let g=d[f].value,y=g.row_index,v=g.col_index;if(y<e||y>n||v<t||v>l||s.rowhidden!=null&&s.rowhidden[y]!=null)continue;if(g.l!=null||g.r!=null||g.t!=null||g.b!=null)if(o[y+"_"+v]==null&&(o[y+"_"+v]={}),u[y]!=null&&P(u[y][v])=="object"&&u[y][v].mc!=null){let b=u[y][v],k=s.merge[b.mc.r+"_"+b.mc.c]||{};if(g.l!=null&&v==k.c){o[y+"_"+v].l={color:g.l.color,style:g.l.style};let w=v-1;if(w>=0&&o[y+"_"+w])if(u[y]!=null&&P(u[y][w])=="object"&&u[y][w].mc!=null){let x=u[y][w],C=s.merge[x.mc.r+"_"+x.mc.c];C.c+C.cs-1==w&&(o[y+"_"+w].r={color:g.l.color,style:g.l.style})}else o[y+"_"+w].r={color:g.l.color,style:g.l.style}}else o[y+"_"+v].l=null;if(g.r!=null&&v==k.c+k.cs-1){o[y+"_"+v].r={color:g.r.color,style:g.r.style};let w=v+1;if(w<u[0].length&&o[y+"_"+w])if(u[y]!=null&&P(u[y][w])=="object"&&u[y][w].mc!=null){let x=u[y][w];s.merge[x.mc.r+"_"+x.mc.c].c==w&&(o[y+"_"+w].l={color:g.r.color,style:g.r.style})}else o[y+"_"+w].l={color:g.r.color,style:g.r.style}}else o[y+"_"+v].r=null;if(g.t!=null&&y==k.r){o[y+"_"+v].t={color:g.t.color,style:g.t.style};let w=y-1;if(w>=0&&o[w+"_"+v])if(u[w]!=null&&P(u[w][v])=="object"&&u[w][v].mc!=null){let x=u[w][v],C=s.merge[x.mc.r+"_"+x.mc.c];C.r+C.rs-1==w&&(o[w+"_"+v].b={color:g.t.color,style:g.t.style})}else o[w+"_"+v].b={color:g.t.color,style:g.t.style}}else o[y+"_"+v].t=null;if(g.b!=null&&y==k.r+k.rs-1){o[y+"_"+v].b={color:g.b.color,style:g.b.style};let w=y+1;if(w<u.length&&o[w+"_"+v])if(u[w]!=null&&P(u[w][v])=="object"&&u[w][v].mc!=null){let x=u[w][v];s.merge[x.mc.r+"_"+x.mc.c].r==w&&(o[w+"_"+v].t={color:g.b.color,style:g.b.style})}else o[w+"_"+v].t={color:g.b.color,style:g.b.style}}else o[y+"_"+v].b=null}else{if(g.l!=null){o[y+"_"+v].l={color:g.l.color,style:g.l.style};let b=v-1;if(b>=0&&o[y+"_"+b])if(u[y]!=null&&P(u[y][b])=="object"&&u[y][b].mc!=null){let k=u[y][b],w=s.merge[k.mc.r+"_"+k.mc.c];w.c+w.cs-1==b&&(o[y+"_"+b].r={color:g.l.color,style:g.l.style})}else o[y+"_"+b].r={color:g.l.color,style:g.l.style}}else o[y+"_"+v].l=null;if(g.r!=null){o[y+"_"+v].r={color:g.r.color,style:g.r.style};let b=v+1;if(b<u[0].length&&o[y+"_"+b])if(u[y]!=null&&P(u[y][b])=="object"&&u[y][b].mc!=null){let k=u[y][b];s.merge[k.mc.r+"_"+k.mc.c].c==b&&(o[y+"_"+b].l={color:g.r.color,style:g.r.style})}else o[y+"_"+b].l={color:g.r.color,style:g.r.style}}else o[y+"_"+v].r=null;if(g.t!=null){o[y+"_"+v].t={color:g.t.color,style:g.t.style};let b=y-1;if(b>=0&&o[b+"_"+v])if(u[b]!=null&&P(u[b][v])=="object"&&u[b][v].mc!=null){let k=u[b][v],w=s.merge[k.mc.r+"_"+k.mc.c];w.r+w.rs-1==b&&(o[b+"_"+v].b={color:g.t.color,style:g.t.style})}else o[b+"_"+v].b={color:g.t.color,style:g.t.style}}else o[y+"_"+v].t=null;if(g.b!=null){o[y+"_"+v].b={color:g.b.color,style:g.b.style};let b=y+1;if(b<u.length&&o[b+"_"+v])if(u[b]!=null&&P(u[b][v])=="object"&&u[b][v].mc!=null){let k=u[b][v];s.merge[k.mc.r+"_"+k.mc.c].r==b&&(o[b+"_"+v].t={color:g.b.color,style:g.b.style})}else o[b+"_"+v].t={color:g.b.color,style:g.b.style}}else o[y+"_"+v].b=null}else delete o[y+"_"+v]}}return o}function Gr(e){let n={},t,l;return e==null?(t=h.config,l=h.flowdata):(t=h.luckysheetfile[Z(e)].config,l=h.luckysheetfile[Z(e)].data),n=Ys(0,l.length,0,l[0].length,e),n}var Va=Ie(()=>{Nt();dt();Xe()});var Ae,Zy,nl,Xs=Ie(()=>{Ol();Pa();Va();Ft();Al();Yt();Jt();Ut();gr();Ml();Zt();Nt();dt();Xe();bt();Ae=Fl(vn()),Zy={iconHtml:'<div id="luckysheet-dropCell-icon" style="position: absolute;padding: 2px;background-color: #f1f1f1;z-index: 990;cursor: pointer;"><div id="icon_dropCell"></div></div>',typeListHtml:'<div id="luckysheet-dropCell-typeList" class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-mousedown-cancel"><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="0"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${copyCell}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="1"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${sequence}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="2"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${onlyFormat}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="3"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${noFormat}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="4"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${day}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="5"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${workDay}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="6"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${month}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="7"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${year}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="8"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${chineseNumber}</div></div></div>',copyRange:{},applyRange:{},applyType:null,direction:null,chnNumChar:{\u96F6:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9},chnNameValue:{\u5341:{value:10,secUnit:!1},\u767E:{value:100,secUnit:!1},\u5343:{value:1e3,secUnit:!1},\u4E07:{value:1e4,secUnit:!0},\u4EBF:{value:1e8,secUnit:!0}},ChineseToNumber:function(e){let n=this,t=0,l=0,a=0,o=!1,s=e.split("");for(let u=0;u<s.length;u++){let d=n.chnNumChar[s[u]];if(typeof d!="undefined")a=d,u==s.length-1&&(l+=a);else{let f=n.chnNameValue[s[u]].value;o=n.chnNameValue[s[u]].secUnit,o?(l=(l+a)*f,t+=l,l=0):l+=a*f,a=0}}return t+l},chnNumChar2:["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],chnUnitSection:["","\u4E07","\u4EBF","\u4E07\u4EBF","\u4EBF\u4EBF"],chnUnitChar:["","\u5341","\u767E","\u5343"],SectionToChinese:function(e){let n=this,t="",l="",a=0,o=!0;for(;e>0;){let s=e%10;s==0?o||(o=!0,l=n.chnNumChar2[s]+l):(o=!1,t=n.chnNumChar2[s],t+=n.chnUnitChar[a],l=t+l),a++,e=Math.floor(e/10)}return l},NumberToChinese:function(e){let n=this,t=0,l="",a="",o=!1;if(e==0)return n.chnNumChar2[0];for(;e>0;){let s=e%1e4;o&&(a=n.chnNumChar2[0]+a),l=n.SectionToChinese(s),l+=s!=0?n.chnUnitSection[t]:n.chnUnitSection[0],a=l+a,o=s<1e3&&s>0,e=Math.floor(e/1e4),t++}return a},isChnNumber:function(e){let n=this,t=!0;if(e.length==1)e=="\u65E5"||e in n.chnNumChar?t=!0:t=!1;else{let l=e.split("");for(let a=0;a<l.length;a++)if(!(l[a]in n.chnNumChar||l[a]in n.chnNameValue)){t=!1;break}}return t},isExtendNumber:function(e){let n=/0|([1-9]+[0-9]*)/g,t=n.test(e);if(t){let l=e.match(n),a=l[l.length-1],o=e.lastIndexOf(a),s=e.substr(0,o),u=e.substr(o+a.length);return[t,Number(a),s,u]}else return[t]},isChnWeek1:function(e){let n=this,t;return e.length==1&&(e=="\u65E5"||n.ChineseToNumber(e)<7)?t=!0:t=!1,t},isChnWeek2:function(e){let n;return e.length==2&&(e=="\u5468\u4E00"||e=="\u5468\u4E8C"||e=="\u5468\u4E09"||e=="\u5468\u56DB"||e=="\u5468\u4E94"||e=="\u5468\u516D"||e=="\u5468\u65E5")?n=!0:n=!1,n},isChnWeek3:function(e){let n;return e.length==3&&(e=="\u661F\u671F\u4E00"||e=="\u661F\u671F\u4E8C"||e=="\u661F\u671F\u4E09"||e=="\u661F\u671F\u56DB"||e=="\u661F\u671F\u4E94"||e=="\u661F\u671F\u516D"||e=="\u661F\u671F\u65E5")?n=!0:n=!1,n},createIcon:function(){let e=this,n=e.copyRange.row[1],t=e.copyRange.column[1],l=e.applyRange.row[1],a=e.applyRange.column[1],o,s;l>=n&&a>=t?(o=l,s=a):(o=n,s=t);let u=tl(o)[1],d=tl(o)[0],f=At(s)[1],m=At(s)[0];$("#luckysheet-dropCell-icon").remove(),$("#luckysheet-cell-main").append(e.iconHtml),$("#luckysheet-dropCell-icon").css({left:f,top:u}),$("#luckysheet-dropCell-icon").mouseover(function(){$(this).css("background-color","#ffe8e8")}).mouseleave(function(){$(this).css("background-color","#f1f1f1")}).mousedown(function(g){$("#luckysheet-dropCell-typeList").remove();let v=Q().dropCell;$("body").append(_e(e.typeListHtml,{copyCell:v.copyCell,sequence:v.sequence,onlyFormat:v.onlyFormat,noFormat:v.noFormat,day:v.day,workDay:v.workDay,month:v.month,year:v.year,chineseNumber:v.chineseNumber}));let b=e.typeItemHide();!b[0]&&!b[1]&&!b[2]&&!b[3]&&!b[4]&&!b[5]&&!b[6]&&($("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=1]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=4]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=5]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=6]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=7]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=8]").hide()),b[2]||($("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=4]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=5]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=6]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=7]").hide()),b[3]||$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=8]").hide();let k=$(this).offset().left,w=$(this).offset().top+25,x=$(window).height(),C=$(window).width(),S=$("#luckysheet-dropCell-typeList").width(),_=$("#luckysheet-dropCell-typeList").height();k+S>C&&(k=k-S),w+_>x&&(w=w-_-38),w<0&&(w=0),$("#luckysheet-dropCell-typeList").css({left:k,top:w}).show(),$("#luckysheet-dropCell-icon").mouseleave(function(){$(this).css("backgroundColor","#ffe8e8")});let T=e.applyType;$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type="+T+"]").find("span").append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>'),g.stopPropagation()}),$(document).off("click.dCtypeList").on("click.dCtypeList","#luckysheet-dropCell-typeList .luckysheet-cols-menuitem",function(){$("#luckysheet-dropCell-typeList .fa-check").remove(),$(this).find("span").append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>');let g=$(this).attr("data-type");e.applyType=g,e.update(),$("#luckysheet-dropCell-typeList").hide(),$("#luckysheet-dropCell-icon").css("backgroundColor","#f1f1f1"),$("#luckysheet-dropCell-icon").mouseleave(function(){$(this).css("backgroundColor","#f1f1f1")}),wl()})},typeItemHide:function(){let e=this,n=e.copyRange,t=n.row[0],l=n.row[1],a=n.column[0],o=n.column[1],s=!1,u=!1,d=!1,f=!1,m=!1,g=!1,y=!1;for(let v=t;v<=l;v++)for(let b=a;b<=o;b++)if(h.flowdata[v][b]){let k=h.flowdata[v][b];P(k)=="object"&&k.v!=null&&k.f==null&&(k.ct!=null&&k.ct.t=="n"?s=!0:k.ct!=null&&k.ct.t=="d"?d=!0:e.isExtendNumber(k.m)[0]?u=!0:e.isChnNumber(k.m)&&k.m!="\u65E5"?f=!0:k.m=="\u65E5"?m=!0:e.isChnWeek2(k.m)?g=!0:e.isChnWeek3(k.m)&&(y=!0))}return[s,u,d,f,m,g,y]},update:function(){let e=this;if(!vr([e.applyRange],h.currentSheetIndex)||h.allowEdit===!1)return;let n=xe.deepCopyFlowData(h.flowdata),t=h.luckysheetfile[Z(h.currentSheetIndex)],l=$.extend(!0,{},h.config),a=Gr(),o=$.extend(!0,{},t.dataVerification),s=e.direction,u=e.applyType,d=e.copyRange,f=d.row[0],m=d.row[1],g=d.column[0],y=d.column[1],v=e.getCopyData(n,f,m,g,y,s),b;s=="down"||s=="up"?b=m-f+1:(s=="right"||s=="left")&&(b=y-g+1);let k=e.applyRange,w=k.row[0],x=k.row[1],C=k.column[0],S=k.column[1];if(s=="down"||s=="up"){let A=x-w+1;for(let R=C;R<=S;R++){let I=v[R-C],F=e.getApplyData(I,b,A);if(s=="down")for(let z=w;z<=x;z++){let M=F[z-w];if(M.f!=null){let L="="+p.functionCopy(M.f,"down",z-w+1),O=p.execfunction(L,z,R);if(p.execFunctionGroup(z,R,O[1],void 0,n),M.f=O[2],M.v=O[1],M.spl!=null)M.spl=O[3].data;else if(B(M.v)&&!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(M.v)){if(M.v==Infinity||M.v==-Infinity)M.m=M.v.toString();else if(M.v.toString().indexOf("e")>-1){let V=M.v.toString().split(".")[1].split("e")[0].length;V>5&&(V=5),M.m=M.v.toExponential(V).toString()}else{let V;M.ct.fa==="##0.00"?(V=at(Math.round(M.v*1e9)/1e9+".00"),M.m=V[0].toString()):(V=at(Math.round(M.v*1e9)/1e9),M.m=V[0].toString())}M.ct=M.ct||{fa:"General",t:"n"}}else{let V=at(M.v);M.m=V[0].toString(),M.ct=V[1]}}n[z][R]=M;let E=f+(z-w)%b,N=R;if(a[E+"_"+N]){let L={rangeType:"cell",value:{row_index:z,col_index:R,l:a[E+"_"+N].l,r:a[E+"_"+N].r,t:a[E+"_"+N].t,b:a[E+"_"+N].b}};l.borderInfo.push(L)}else if(a[z+"_"+R]){let L={rangeType:"cell",value:{row_index:z,col_index:R,l:null,r:null,t:null,b:null}};l.borderInfo.push(L)}o[E+"_"+N]&&(o[z+"_"+R]=o[E+"_"+N])}if(s=="up")for(let z=x;z>=w;z--){let M=F[x-z];if(M.f!=null){let L="="+p.functionCopy(M.f,"up",x-z+1),O=p.execfunction(L,z,R);if(p.execFunctionGroup(z,R,O[1],void 0,n),M.f=O[2],M.v=O[1],M.spl!=null)M.spl=O[3].data;else if(B(M.v)&&!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(M.v)){if(M.v==Infinity||M.v==-Infinity)M.m=M.v.toString();else if(M.v.toString().indexOf("e")>-1){let V=M.v.toString().split(".")[1].split("e")[0].length;V>5&&(V=5),M.m=M.v.toExponential(V).toString()}else{let V=at(Math.round(M.v*1e9)/1e9);M.m=V[0].toString()}M.ct={fa:"General",t:"n"}}else{let V=at(M.v);M.m=V[0].toString(),M.ct=V[1]}}n[z][R]=M;let E=m-(x-z)%b,N=R;if(a[E+"_"+N]){let L={rangeType:"cell",value:{row_index:z,col_index:R,l:a[E+"_"+N].l,r:a[E+"_"+N].r,t:a[E+"_"+N].t,b:a[E+"_"+N].b}};l.borderInfo.push(L)}else if(a[z+"_"+R]){let L={rangeType:"cell",value:{row_index:z,col_index:R,l:null,r:null,t:null,b:null}};l.borderInfo.push(L)}o[E+"_"+N]&&(o[z+"_"+R]=o[E+"_"+N])}}}else if(s=="right"||s=="left"){let A=S-C+1;for(let R=w;R<=x;R++){let I=v[R-w],F=e.getApplyData(I,b,A);if(s=="right")for(let z=C;z<=S;z++){let M=F[z-C];if(M.f!=null){let L="="+p.functionCopy(M.f,"right",z-C+1),O=p.execfunction(L,R,z);if(p.execFunctionGroup(R,z,O[1],void 0,n),M.f=O[2],M.v=O[1],M.spl!=null)M.spl=O[3].data;else if(B(M.v)&&!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(M.v)){if(M.v==Infinity||M.v==-Infinity)M.m=M.v.toString();else if(M.v.toString().indexOf("e")>-1){let V=M.v.toString().split(".")[1].split("e")[0].length;V>5&&(V=5),M.m=M.v.toExponential(V).toString()}else{let V=at(Math.round(M.v*1e9)/1e9);M.m=V[0].toString()}M.ct={fa:"General",t:"n"}}else{let V=at(M.v);M.m=V[0].toString(),M.ct=V[1]}}n[R][z]=M;let E=R,N=g+(z-C)%b;if(a[E+"_"+N]){let L={rangeType:"cell",value:{row_index:R,col_index:z,l:a[E+"_"+N].l,r:a[E+"_"+N].r,t:a[E+"_"+N].t,b:a[E+"_"+N].b}};l.borderInfo.push(L)}else if(a[R+"_"+z]){let L={rangeType:"cell",value:{row_index:R,col_index:z,l:null,r:null,t:null,b:null}};l.borderInfo.push(L)}o[E+"_"+N]&&(o[R+"_"+z]=o[E+"_"+N])}if(s=="left")for(let z=S;z>=C;z--){let M=F[S-z];if(M.f!=null){let L="="+p.functionCopy(M.f,"left",S-z+1),O=p.execfunction(L,R,z);if(p.execFunctionGroup(R,z,O[1],void 0,n),M.f=O[2],M.v=O[1],M.spl!=null)M.spl=O[3].data;else if(B(M.v)&&!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(M.v)){if(M.v==Infinity||M.v==-Infinity)M.m=M.v.toString();else if(M.v.toString().indexOf("e")>-1){let V=M.v.toString().split(".")[1].split("e")[0].length;V>5&&(V=5),M.m=M.v.toExponential(V).toString()}else{let V=at(Math.round(M.v*1e9)/1e9);M.m=V[0].toString()}M.ct={fa:"General",t:"n"}}else{let V=at(M.v);M.m=V[0].toString(),M.ct=V[1]}}n[R][z]=M;let E=R,N=y-(S-z)%b;if(a[E+"_"+N]){let L={rangeType:"cell",value:{row_index:R,col_index:z,l:a[E+"_"+N].l,r:a[E+"_"+N].r,t:a[E+"_"+N].t,b:a[E+"_"+N].b}};l.borderInfo.push(L)}else if(a[R+"_"+z]){let L={rangeType:"cell",value:{row_index:R,col_index:z,l:null,r:null,t:null,b:null}};l.borderInfo.push(L)}o[E+"_"+N]&&(o[R+"_"+z]=o[E+"_"+N])}}}let _=$.extend(!0,[],t.luckysheet_conditionformat_save);if(_!=null&&_.length>0)for(let A=0;A<_.length;A++){let R=_[A].cellrange,I=[];for(let F=0;F<R.length;F++){let z=$e.CFSplitRange(R[F],{row:d.row,column:d.column},{row:k.row,column:k.column},"operatePart");z.length>0&&(I=I.concat(z))}I.length>0&&_[A].cellrange.push(k)}let T={cfg:l,cdformat:_,dataVerification:o};Ze(n,h.luckysheet_select_save,T),lt()},getCopyData:function(e,n,t,l,a,o){let s=this,u=[],d,f,m,g;o=="down"||o=="up"?(d=l,f=a,m=n,g=t):(o=="right"||o=="left")&&(d=n,f=t,m=l,g=a);for(let y=d;y<=f;y++){let v={},b=[],k=[],w="",x=null,C=null,S=!0;for(let _=m;_<=g;_++){let T;o=="down"||o=="up"?T=e[_][y]:(o=="right"||o=="left")&&(T=e[y][_]);let A;if(!!T&&!!T.v&&T.f==null)if(!!T.ct&&T.ct.t=="n")A="number",x=null,C=null;else if(!!T.ct&&T.ct.t=="d")A="date",x=null,C=null;else if(s.isExtendNumber(T.m)[0]){A="extendNumber";let R=s.isExtendNumber(T.m);x==null||C==null?(S=!0,x=R[2],C=R[3]):R[2]!=x||R[3]!=C?(S=!1,x=R[2],C=R[3]):S=!0}else s.isChnNumber(T.m)?(A="chnNumber",x=null,C=null):s.isChnWeek2(T.m)?(A="chnWeek2",x=null,C=null):s.isChnWeek3(T.m)?(A="chnWeek3",x=null,C=null):(A="other",x=null,C=null);else A="other",x=null,C=null;A=="extendNumber"?_==m?m==g?(w=A,b.push(T),k.push(_-m+1),v[w]=[],v[w].push({data:b,index:k})):(w=A,b.push(T),k.push(_-m+1)):_==g?w==A&&S?(b.push(T),k.push(_-m+1),w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k}))):(w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k})),w=A,b=[],b.push(T),k=[],k.push(_-m+1),w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k}))):w==A&&S?(b.push(T),k.push(_-m+1)):(w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k})),w=A,b=[],b.push(T),k=[],k.push(_-m+1)):_==m?m==g?(w=A,b.push(T),k.push(_-m+1),v[w]=[],v[w].push({data:b,index:k})):(w=A,b.push(T),k.push(_-m+1)):_==g?w==A?(b.push(T),k.push(_-m+1),w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k}))):(w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k})),w=A,b=[],b.push(T),k=[],k.push(_-m+1),w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k}))):w==A?(b.push(T),k.push(_-m+1)):(w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k})),w=A,b=[],b.push(T),k=[],k.push(_-m+1))}u.push(v)}return u},getApplyData:function(e,n,t){let l=this,a=[],o=l.direction,s=l.applyType,u=Math.floor(t/n),d=t%n,f=e.number,m=[];if(f)for(let R=0;R<f.length;R++){let I=l.getLenS(f[R].index,d),F=f[R].index.length*u+I,z;s=="1"||s=="3"?z=l.getDataByType(f[R].data,F,o,s,"number"):s=="2"?z=l.getDataByType(f[R].data,F,o,s):z=l.getDataByType(f[R].data,F,o,"0");let M=l.getDataIndex(n,t,f[R].index);m.push({data:z,index:M})}let g=e.extendNumber,y=[];if(g)for(let R=0;R<g.length;R++){let I=l.getLenS(g[R].index,d),F=g[R].index.length*u+I,z;s=="1"||s=="3"?z=l.getDataByType(g[R].data,F,o,s,"extendNumber"):s=="2"?z=l.getDataByType(g[R].data,F,o,s):z=l.getDataByType(g[R].data,F,o,"0");let M=l.getDataIndex(n,t,g[R].index);y.push({data:z,index:M})}let v=e.date,b=[];if(v)for(let R=0;R<v.length;R++){let I=l.getLenS(v[R].index,d),F=v[R].index.length*u+I,z;s=="1"||s=="3"?z=l.getDataByType(v[R].data,F,o,s,"date"):s=="8"?z=l.getDataByType(v[R].data,F,o,"0"):z=l.getDataByType(v[R].data,F,o,s);let M=l.getDataIndex(n,t,v[R].index);b.push({data:z,index:M})}let k=e.chnNumber,w=[];if(k)for(let R=0;R<k.length;R++){let I=l.getLenS(k[R].index,d),F=k[R].index.length*u+I,z;s=="1"||s=="3"?z=l.getDataByType(k[R].data,F,o,s,"chnNumber"):s=="2"||s=="8"?z=l.getDataByType(k[R].data,F,o,s):z=l.getDataByType(k[R].data,F,o,"0");let M=l.getDataIndex(n,t,k[R].index);w.push({data:z,index:M})}let x=e.chnWeek2,C=[];if(x)for(let R=0;R<x.length;R++){let I=l.getLenS(x[R].index,d),F=x[R].index.length*u+I,z;s=="1"||s=="3"?z=l.getDataByType(x[R].data,F,o,s,"chnWeek2"):s=="2"?z=l.getDataByType(x[R].data,F,o,s):z=l.getDataByType(x[R].data,F,o,"0");let M=l.getDataIndex(n,t,x[R].index);C.push({data:z,index:M})}let S=e.chnWeek3,_=[];if(S)for(let R=0;R<S.length;R++){let I=l.getLenS(S[R].index,d),F=S[R].index.length*u+I,z;s=="1"||s=="3"?z=l.getDataByType(S[R].data,F,o,s,"chnWeek3"):s=="2"?z=l.getDataByType(S[R].data,F,o,s):z=l.getDataByType(S[R].data,F,o,"0");let M=l.getDataIndex(n,t,S[R].index);_.push({data:z,index:M})}let T=e.other,A=[];if(T)for(let R=0;R<T.length;R++){let I=l.getLenS(T[R].index,d),F=T[R].index.length*u+I,z;s=="2"||s=="3"?z=l.getDataByType(T[R].data,F,o,s):z=l.getDataByType(T[R].data,F,o,"0");let M=l.getDataIndex(n,t,T[R].index);A.push({data:z,index:M})}for(let R=1;R<=t;R++){if(m.length>0)for(let I=0;I<m.length;I++)R in m[I].index&&a.push(m[I].data[m[I].index[R]]);if(y.length>0)for(let I=0;I<y.length;I++)R in y[I].index&&a.push(y[I].data[y[I].index[R]]);if(b.length>0)for(let I=0;I<b.length;I++)R in b[I].index&&a.push(b[I].data[b[I].index[R]]);if(w.length>0)for(let I=0;I<w.length;I++)R in w[I].index&&a.push(w[I].data[w[I].index[R]]);if(C.length>0)for(let I=0;I<C.length;I++)R in C[I].index&&a.push(C[I].data[C[I].index[R]]);if(_.length>0)for(let I=0;I<_.length;I++)R in _[I].index&&a.push(_[I].data[_[I].index[R]]);if(A.length>0)for(let I=0;I<A.length;I++)R in A[I].index&&a.push(A[I].data[A[I].index[R]])}return a},getLenS:function(e,n){let t=0;for(let l=0;l<e.length&&e[l]<=n;l++)t++;return t},getDataIndex:function(e,n,t){let l={},a=Math.floor(n/e),o=n%e,s=0;if(a>0){for(let u=1;u<=a;u++)for(let d=0;d<t.length;d++)l[t[d]+(u-1)*e]=s,s++;for(let u=0;u<t.length&&t[u]<=o;u++)l[t[u]+e*a]=s,s++}else for(let u=0;u<t.length&&t[u]<=o;u++)l[t[u]]=s,s++;return l},getDataByType:function(e,n,t,l,a){let o=this,s=[];if(l=="0")(t=="up"||t=="left")&&e.reverse(),s=o.FillCopy(e,n);else if(l=="1")if(a=="number")s=o.FillSeries(e,n,t);else if(a=="extendNumber")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillExtendNumber(e,n,u)}else{let u=[];for(let d=0;d<e.length;d++){let f=e[d].m;u.push(Number(o.isExtendNumber(f)[1]))}if((t=="up"||t=="left")&&(e.reverse(),u.reverse()),o.isEqualDiff(u)){let d=u[1]-u[0];s=o.FillExtendNumber(e,n,d)}else s=o.FillCopy(e,n)}else if(a=="date")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillDays(e,n,u)}else{(t=="up"||t=="left")&&e.reverse();let u=o.judgeDate(e);if(u[0]&&u[3]){let d=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months");s=o.FillMonths(e,n,d)}else if(!u[0]&&u[2]){let d=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"days");s=o.FillDays(e,n,d)}else s=o.FillCopy(e,n)}else if(a=="chnNumber")if(e.length==1)if(e[0].m=="\u65E5"||o.ChineseToNumber(e[0].m)<7){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillChnWeek(e,n,u)}else{let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillChnNumber(e,n,u)}else{let u=!1;for(let m=0;m<e.length;m++)if(e[m].m=="\u65E5"){u=!0;break}let d=[],f=0;for(let m=0;m<e.length;m++)e[m].m=="\u65E5"?m==0?d.push(0):(f++,d.push(f*7)):u&&o.ChineseToNumber(e[m].m)>0&&o.ChineseToNumber(e[m].m)<7?d.push(o.ChineseToNumber(e[m].m)+f*7):d.push(o.ChineseToNumber(e[m].m));if((t=="up"||t=="left")&&(e.reverse(),d.reverse()),o.isEqualDiff(d))if(u||d[d.length-1]<6&&d[0]>0||d[0]<6&&d[d.length-1]>0){let m=d[1]-d[0];s=o.FillChnWeek(e,n,m)}else{let m=d[1]-d[0];s=o.FillChnNumber(e,n,m)}else s=o.FillCopy(e,n)}else if(a=="chnWeek2")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillChnWeek2(e,n,u)}else{let u=[],d=0;for(let f=0;f<e.length;f++){let m=e[f].m.substr(e[f].m.length-1,1);e[f].m=="\u5468\u65E5"?f==0?u.push(0):(d++,u.push(d*7)):u.push(o.ChineseToNumber(m)+d*7)}if((t=="up"||t=="left")&&(e.reverse(),u.reverse()),o.isEqualDiff(u)){let f=u[1]-u[0];s=o.FillChnWeek2(e,n,f)}else s=o.FillCopy(e,n)}else if(a=="chnWeek3")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillChnWeek3(e,n,u)}else{let u=[],d=0;for(let f=0;f<e.length;f++){let m=e[f].m.substr(e[f].m.length-1,1);e[f].m=="\u661F\u671F\u65E5"?f==0?u.push(0):(d++,u.push(d*7)):u.push(o.ChineseToNumber(m)+d*7)}if((t=="up"||t=="left")&&(e.reverse(),u.reverse()),o.isEqualDiff(u)){let f=u[1]-u[0];s=o.FillChnWeek3(e,n,f)}else s=o.FillCopy(e,n)}else(t=="up"||t=="left")&&e.reverse(),s=o.FillCopy(e,n);else if(l=="2")(t=="up"||t=="left")&&e.reverse(),s=o.FillOnlyFormat(e,n);else if(l=="3"){let u=o.getDataByType(e,n,t,"1",a);s=o.FillWithoutFormat(u)}else if(l=="4")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillDays(e,n,u)}else if(e.length==2){(t=="up"||t=="left")&&e.reverse();let u=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"days");s=o.FillDays(e,n,u)}else{(t=="up"||t=="left")&&e.reverse();let u=o.judgeDate(e);if(u[0]&&u[3]){let d=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months");s=o.FillMonths(e,n,d)}else if(!u[0]&&u[2]){let d=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"days");s=o.FillDays(e,n,d)}else s=o.FillCopy(e,n)}else if(l=="5")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1);let d=Math.round(n*1.5);for(let f=1;f<=d;f++){let m=$.extend(!0,{},e[0]),g=(0,Ae.default)(m.m).add(f,"days").day();if(g==0||g==6)continue;let y=(0,Ae.default)(m.m).add(u*f,"days").format("YYYY-MM-DD");if(m.m=y,m.v=at(y)[2],s.push(m),s.length==n)break}}else if(e.length==2)if((0,Ae.default)(e[1].m).date()==(0,Ae.default)(e[0].m).date()&&(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months")!=0){(t=="up"||t=="left")&&e.reverse();let u=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months");for(let d=1;d<=n;d++){let f=(d-1)%e.length,m=$.extend(!0,{},e[f]),g=(0,Ae.default)(e[e.length-1]).add(u*d,"months").day(),y;g==0?y=(0,Ae.default)(e[e.length-1]).add(u*d,"months").subtract(2,"days").format("YYYY-MM-DD"):g==6?y=(0,Ae.default)(e[e.length-1]).add(u*d,"months").subtract(1,"days").format("YYYY-MM-DD"):y=(0,Ae.default)(e[e.length-1]).add(u*d,"months").format("YYYY-MM-DD"),m.m=y,m.v=at(y)[2],s.push(m)}}else if(Math.abs((0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m)))>7){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1,e.reverse());let d;for(let f=1;f<=n;f++){let m=(f-1)%e.length,g=$.extend(!0,{},e[m]),y=Math.ceil(f/e.length);m==0&&(d=(0,Ae.default)(g.m).add(u*y,"months").diff((0,Ae.default)(g.m),"days"));let v=(0,Ae.default)(g.m).add(d,"days").day(),b;v==0?b=(0,Ae.default)(g.m).add(d,"days").subtract(2,"days").format("YYYY-MM-DD"):v==6?b=(0,Ae.default)(g.m).add(d,"days").subtract(1,"days").format("YYYY-MM-DD"):b=(0,Ae.default)(g.m).add(d,"days").format("YYYY-MM-DD"),g.m=b,g.v=at(b)[2],s.push(g)}}else{let u;t=="down"||t=="right"?u=7:(t=="up"||t=="left")&&(u=-7,e.reverse());let d;for(let f=1;f<=n;f++){let m=(f-1)%e.length,g=$.extend(!0,{},e[m]),y=Math.ceil(f/e.length);m==0&&(d=(0,Ae.default)(g.m).add(u*y,"days").diff((0,Ae.default)(g.m),"days"));let v=(0,Ae.default)(g.m).add(d,"days").day(),b;v==0?b=(0,Ae.default)(g.m).add(d,"days").subtract(2,"days").format("YYYY-MM-DD"):v==6?b=(0,Ae.default)(g.m).add(d,"days").subtract(1,"days").format("YYYY-MM-DD"):b=(0,Ae.default)(g.m).add(d,"days").format("YYYY-MM-DD"),g.m=b,g.v=at(b)[2],s.push(g)}}else{let u=o.judgeDate(e);if(u[0]&&u[3]){(t=="up"||t=="left")&&e.reverse();let d=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months");for(let f=1;f<=n;f++){let m=(f-1)%e.length,g=$.extend(!0,{},e[m]),y=(0,Ae.default)(e[e.length-1].m).add(d*f,"months").day(),v;y==0?v=(0,Ae.default)(e[e.length-1].m).add(d*f,"months").subtract(2,"days").format("YYYY-MM-DD"):y==6?v=(0,Ae.default)(e[e.length-1].m).add(d*f,"months").subtract(1,"days").format("YYYY-MM-DD"):v=(0,Ae.default)(e[e.length-1].m).add(d*f,"months").format("YYYY-MM-DD"),g.m=v,g.v=at(v)[2],s.push(g)}}else if(!u[0]&&u[2])if(Math.abs((0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m)))>7){let d;t=="down"||t=="right"?d=1:(t=="up"||t=="left")&&(d=-1,e.reverse());let f;for(let m=1;m<=n;m++){let g=(m-1)%e.length,y=$.extend(!0,{},e[g]),v=Math.ceil(m/e.length);g==0&&(f=(0,Ae.default)(y.m).add(d*v,"months").diff((0,Ae.default)(y.m),"days"));let b=(0,Ae.default)(y.m).add(f,"days").day(),k;b==0?k=(0,Ae.default)(y.m).add(f,"days").subtract(2,"days").format("YYYY-MM-DD"):b==6?k=(0,Ae.default)(y.m).add(f,"days").subtract(1,"days").format("YYYY-MM-DD"):k=(0,Ae.default)(y.m).add(f,"days").format("YYYY-MM-DD"),y.m=k,y.v=at(k)[2],s.push(y)}}else{let d;t=="down"||t=="right"?d=7:(t=="up"||t=="left")&&(d=-7,e.reverse());let f;for(let m=1;m<=n;m++){let g=(m-1)%e.length,y=$.extend(!0,{},e[g]),v=Math.ceil(m/e.length);g==0&&(f=(0,Ae.default)(y.m).add(d*v,"days").diff((0,Ae.default)(y.m),"days"));let b=(0,Ae.default)(y.m).add(f,"days").day(),k;b==0?k=(0,Ae.default)(y.m).add(f,"days").subtract(2,"days").format("YYYY-MM-DD"):b==6?k=(0,Ae.default)(y.m).add(f,"days").subtract(1,"days").format("YYYY-MM-DD"):k=(0,Ae.default)(y.m).add(f,"days").format("YYYY-MM-DD"),y.m=k,y.v=at(k)[2],s.push(y)}}else(t=="up"||t=="left")&&e.reverse(),s=o.FillCopy(e,n)}else if(l=="6")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillMonths(e,n,u)}else if(e.length==2)if((0,Ae.default)(e[1].m).date()==(0,Ae.default)(e[0].m).date()&&(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months")!=0){(t=="up"||t=="left")&&e.reverse();let u=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months");s=o.FillMonths(e,n,u)}else{let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1,e.reverse());let d;for(let f=1;f<=n;f++){let m=(f-1)%e.length,g=$.extend(!0,{},e[m]),y=Math.ceil(f/e.length);m==0&&(d=(0,Ae.default)(g.m).add(u*y,"months").diff((0,Ae.default)(g.m),"days"));let v=(0,Ae.default)(g.m).add(d,"days").format("YYYY-MM-DD");g.m=v,g.v=at(v)[2],s.push(g)}}else{let u=o.judgeDate(e);if(u[0]&&u[3]){(t=="up"||t=="left")&&e.reverse();let d=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months");s=o.FillMonths(e,n,d)}else if(!u[0]&&u[2]){let d;t=="down"||t=="right"?d=1:(t=="up"||t=="left")&&(d=-1,e.reverse());let f;for(let m=1;m<=n;m++){let g=(m-1)%e.length,y=$.extend(!0,{},e[g]),v=Math.ceil(m/e.length);g==0&&(f=(0,Ae.default)(y.m).add(d*v,"months").diff((0,Ae.default)(y.m),"days"));let b=(0,Ae.default)(y.m).add(f,"days").format("YYYY-MM-DD");y.m=b,y.v=at(b)[2],s.push(y)}}else(t=="up"||t=="left")&&e.reverse(),s=o.FillCopy(e,n)}else if(l=="7")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillYears(e,n,u)}else if(e.length==2)if((0,Ae.default)(e[1].m).date()==(0,Ae.default)(e[0].m).date()&&(0,Ae.default)(e[1].m).month()==(0,Ae.default)(e[0].m).month()&&(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"years")!=0){(t=="up"||t=="left")&&e.reverse();let u=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"years");s=o.FillYears(e,n,u)}else{let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1,e.reverse());let d;for(let f=1;f<=n;f++){let m=(f-1)%e.length,g=$.extend(!0,{},e[m]),y=Math.ceil(f/e.length);m==0&&(d=(0,Ae.default)(g.m).add(u*y,"years").diff((0,Ae.default)(g.m),"days"));let v=(0,Ae.default)(g.m).add(d,"days").format("YYYY-MM-DD");g.m=v,g.v=at(v)[2],s.push(g)}}else{let u=o.judgeDate(e);if(u[0]&&u[1]&&u[4]){(t=="up"||t=="left")&&e.reverse();let d=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"years");s=o.FillYears(e,n,d)}else if(u[0]&&u[3]||u[2]){let d;t=="down"||t=="right"?d=1:(t=="up"||t=="left")&&(d=-1,e.reverse());let f;for(let m=1;m<=n;m++){let g=(m-1)%e.length,y=$.extend(!0,{},e[g]),v=Math.ceil(m/e.length);g==0&&(f=(0,Ae.default)(y.m).add(d*v,"years").diff((0,Ae.default)(y.m),"days"));let b=(0,Ae.default)(y.m).add(f,"days").format("YYYY-MM-DD");y.m=b,y.v=at(b)[2],s.push(y)}}else(t=="up"||t=="left")&&e.reverse(),s=o.FillCopy(e,n)}else if(l=="8")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillChnNumber(e,n,u)}else{let u=[];for(let d=0;d<e.length;d++)u.push(o.ChineseToNumber(e[d].m));if((t=="up"||t=="left")&&(e.reverse(),u.reverse()),o.isEqualDiff(u)){let d=u[1]-u[0];s=o.FillChnNumber(e,n,d)}else s=o.FillCopy(e,n)}return s},FillCopy:function(e,n){let t=[];for(let l=1;l<=n;l++){let a=(l-1)%e.length,o=$.extend(!0,{},e[a]);t.push(o)}return t},FillSeries:function(e,n,t){let l=this,a=[],o=[];for(let s=0;s<e.length;s++)o.push(Number(e[s].v));if(e.length>2&&l.isEqualRatio(o))for(let s=1;s<=n;s++){let u=(s-1)%e.length,d=$.extend(!0,{},e[u]),f;t=="down"||t=="right"?f=Number(e[e.length-1].v)*Math.pow(Number(e[1].v)/Number(e[0].v),s):(t=="up"||t=="left")&&(f=Number(e[0].v)/Math.pow(Number(e[1].v)/Number(e[0].v),s)),d.v=f,d.m=mt(d.ct.fa,f),a.push(d)}else{let s=l.getXArr(e.length);for(let u=1;u<=n;u++){let d=(u-1)%e.length,f=$.extend(!0,{},e[d]),m;t=="down"||t=="right"?m=l.forecast(e.length+u,o,s):(t=="up"||t=="left")&&(m=l.forecast(1-u,o,s)),f.v=m,f.m=mt(f.ct.fa,m),a.push(f)}}return a},FillExtendNumber:function(e,n,t){let l=this,a=[],o=/0|([1-9]+[0-9]*)/g;for(let s=1;s<=n;s++){let u=(s-1)%e.length,d=$.extend(!0,{},e[u]),f=e[e.length-1].m,m=f.match(o),g=m[m.length-1],y=Math.abs(Number(g)+t*s),v=f.lastIndexOf(g),b=f.substr(0,v)+y.toString()+f.substr(v+g.length);d.v=b,d.m=b,a.push(d)}return a},FillOnlyFormat:function(e,n){let t=[];for(let l=1;l<=n;l++){let a=(l-1)%e.length,o=$.extend(!0,{},e[a]);delete o.f,delete o.m,delete o.v,t.push(o)}return t},FillWithoutFormat:function(e){let n=[];for(let t=0;t<e.length;t++){let l=$.extend(!0,{},e[t]),a;l.f==null?a={m:l.v.toString(),v:l.v}:a={f:l.f,m:l.v.toString(),v:l.v},n.push(a)}return n},FillDays:function(e,n,t){let l=[];for(let a=1;a<=n;a++){let o=(a-1)%e.length,s=$.extend(!0,{},e[o]),u=mt("yyyy-MM-dd",s.v);u=(0,Ae.default)(u).add(t*a,"days").format("YYYY-MM-DD"),s.v=at(u)[2],s.m=mt(s.ct.fa,s.v),l.push(s)}return l},FillMonths:function(e,n,t){let l=[];for(let a=1;a<=n;a++){let o=(a-1)%e.length,s=$.extend(!0,{},e[o]),u=mt("yyyy-MM-dd",s.v);u=(0,Ae.default)(u).add(t*a,"months").format("YYYY-MM-DD"),s.v=at(u)[2],s.m=mt(s.ct.fa,s.v),l.push(s)}return l},FillYears:function(e,n,t){let l=[];for(let a=1;a<=n;a++){let o=(a-1)%e.length,s=$.extend(!0,{},e[o]),u=mt("yyyy-MM-dd",s.v);u=(0,Ae.default)(u).add(t*a,"years").format("YYYY-MM-DD"),s.v=at(u)[2],s.m=mt(s.ct.fa,s.v),l.push(s)}return l},FillChnWeek:function(e,n,t){let l=this,a=[];for(let o=1;o<=n;o++){let s=(o-1)%e.length,u=$.extend(!0,{},e[s]),d;e[e.length-1].m=="\u65E5"?d=7+t*o:d=l.ChineseToNumber(e[e.length-1].m)+t*o,d<0&&(d=Math.ceil(Math.abs(d)/7)*7+d);let f=d%7;f==0?(u.m="\u65E5",u.v="\u65E5"):f==1?(u.m="\u4E00",u.v="\u4E00"):f==2?(u.m="\u4E8C",u.v="\u4E8C"):f==3?(u.m="\u4E09",u.v="\u4E09"):f==4?(u.m="\u56DB",u.v="\u56DB"):f==5?(u.m="\u4E94",u.v="\u4E94"):f==6&&(u.m="\u516D",u.v="\u516D"),a.push(u)}return a},FillChnWeek2:function(e,n,t){let l=this,a=[];for(let o=1;o<=n;o++){let s=(o-1)%e.length,u=$.extend(!0,{},e[s]),d;if(e[e.length-1].m=="\u5468\u65E5")d=7+t*o;else{let m=e[e.length-1].m,g=m.substr(m.length-1,1);d=l.ChineseToNumber(g)+t*o}d<0&&(d=Math.ceil(Math.abs(d)/7)*7+d);let f=d%7;f==0?(u.m="\u5468\u65E5",u.v="\u5468\u65E5"):f==1?(u.m="\u5468\u4E00",u.v="\u5468\u4E00"):f==2?(u.m="\u5468\u4E8C",u.v="\u5468\u4E8C"):f==3?(u.m="\u5468\u4E09",u.v="\u5468\u4E09"):f==4?(u.m="\u5468\u56DB",u.v="\u5468\u56DB"):f==5?(u.m="\u5468\u4E94",u.v="\u5468\u4E94"):f==6&&(u.m="\u5468\u516D",u.v="\u5468\u516D"),a.push(u)}return a},FillChnWeek3:function(e,n,t){let l=this,a=[];for(let o=1;o<=n;o++){let s=(o-1)%e.length,u=$.extend(!0,{},e[s]),d;if(e[e.length-1].m=="\u661F\u671F\u65E5")d=7+t*o;else{let m=e[e.length-1].m,g=m.substr(m.length-1,1);d=l.ChineseToNumber(g)+t*o}d<0&&(d=Math.ceil(Math.abs(d)/7)*7+d);let f=d%7;f==0?(u.m="\u661F\u671F\u65E5",u.v="\u661F\u671F\u65E5"):f==1?(u.m="\u661F\u671F\u4E00",u.v="\u661F\u671F\u4E00"):f==2?(u.m="\u661F\u671F\u4E8C",u.v="\u661F\u671F\u4E8C"):f==3?(u.m="\u661F\u671F\u4E09",u.v="\u661F\u671F\u4E09"):f==4?(u.m="\u661F\u671F\u56DB",u.v="\u661F\u671F\u56DB"):f==5?(u.m="\u661F\u671F\u4E94",u.v="\u661F\u671F\u4E94"):f==6&&(u.m="\u661F\u671F\u516D",u.v="\u661F\u671F\u516D"),a.push(u)}return a},FillChnNumber:function(e,n,t){let l=this,a=[];for(let o=1;o<=n;o++){let s=(o-1)%e.length,u=$.extend(!0,{},e[s]),d=l.ChineseToNumber(e[e.length-1].m)+t*o,f;d<=0?f="\u96F6":f=l.NumberToChinese(d),u.v=f,u.m=f.toString(),a.push(u)}return a},isEqualDiff:function(e){let n=!0,t=e[1]-e[0];for(let l=1;l<e.length;l++)if(e[l]-e[l-1]!=t){n=!1;break}return n},isEqualRatio:function(e){let n=!0,t=e[1]/e[0];for(let l=1;l<e.length;l++)if(e[l]/e[l-1]!=t){n=!1;break}return n},getXArr:function(e){let n=[];for(let t=1;t<=e;t++)n.push(t);return n},forecast:function(e,n,t){function l(m){let g=0;for(let y=0;y<m.length;y++)g+=m[y];return g/m.length}let a=l(t),o=l(n),s=0,u=0;for(let m=0;m<t.length;m++)s+=(t[m]-a)*(n[m]-o),u+=(t[m]-a)*(t[m]-a);let d;u==0?d=1:d=s/u;let f=o-d*a;return Math.round((f+d*e)*1e5)/1e5},judgeDate:function(e){let n=!0,t=!0,l=!0,a=!0,o=!0,s=(0,Ae.default)(e[0].m).date(),u=(0,Ae.default)(e[0].m).month(),d=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"days"),f=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months"),m=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"years");for(let g=1;g<e.length;g++)(0,Ae.default)(e[g].m).date()!=s&&(n=!1),(0,Ae.default)(e[g].m).month()!=u&&(t=!1),(0,Ae.default)(e[g].m).diff((0,Ae.default)(e[g-1].m),"days")!=d&&(l=!1),(0,Ae.default)(e[g].m).diff((0,Ae.default)(e[g-1].m),"months")!=f&&(a=!1),(0,Ae.default)(e[g].m).diff((0,Ae.default)(e[g-1].m),"years")!=m&&(o=!1);return d==0&&(l=!1),f==0&&(a=!1),m==0&&(o=!1),[n,t,l,a,o]}},nl=Zy});var cn,Y,Vl=Ie(()=>{Nt();Lr();Zt();kn();Qt();il();Ur();Xs();Ol();Xe();bt();Yt();cn={freezenHorizontalHTML:'<div id="luckysheet-freezebar-horizontal" class="luckysheet-freezebar" tabindex="0"><div class="luckysheet-freezebar-handle luckysheet-freezebar-horizontal-handle" ><div class="luckysheet-freezebar-handle-bar luckysheet-freezebar-horizontal-handle-title" ></div><div class="luckysheet-freezebar-handle-bar luckysheet-freezebar-horizontal-handle-bar" ></div></div><div class="luckysheet-freezebar-drop luckysheet-freezebar-horizontal-drop" ><div class="luckysheet-freezebar-drop-bar luckysheet-freezebar-horizontal-drop-title" ></div><div class="luckysheet-freezebar-drop-bar luckysheet-freezebar-horizontal-drop-bar" > </div></div></div>',freezenVerticalHTML:'<div id="luckysheet-freezebar-vertical" class="luckysheet-freezebar" tabindex="0"><div class="luckysheet-freezebar-handle luckysheet-freezebar-vertical-handle" ><div class="luckysheet-freezebar-handle-bar luckysheet-freezebar-vertical-handle-title" ></div><div class="luckysheet-freezebar-handle-bar luckysheet-freezebar-vertical-handle-bar" ></div></div><div class="luckysheet-freezebar-drop luckysheet-freezebar-vertical-drop" ><div class="luckysheet-freezebar-drop-bar luckysheet-freezebar-vertical-drop-title" ></div><div class="luckysheet-freezebar-drop-bar luckysheet-freezebar-vertical-drop-bar" > </div></div></div>',initialHorizontal:!0,initialVertical:!0,horizontalmovestate:!1,horizontalmoveposition:null,verticalmovestate:!1,verticalmoveposition:null,windowHeight:null,windowWidth:null,freezenhorizontaldata:null,freezenverticaldata:null,freezenRealFirstRowColumn:!0,cutVolumn:function(e,n){if(n<=0)return e;let t=e.slice(0,n),l=t[t.length-1];return e.slice(n)},cancelFreezenVertical:function(e){let n=this,l=Q().freezen,a=` |
| | | `).replaceAll(/<(.*)>.*?|<(.*) \/>/g,"").trim();if(!Je.createHookFunction("commentUpdateBefore",n,t,l)){h.flowdata[n][t].ps.isshow||$("#"+e).remove();return}let a=$.extend(!0,{},h.flowdata[n][t]);$("#"+e).removeClass("luckysheet-postil-show-active"),$("#"+e).find(".luckysheet-postil-dialog-resize").hide(),$("#"+e).find(".arrowCanvas").css("z-index",100),$("#"+e).find(".luckysheet-postil-show-main").css("z-index",100);let o=xe.deepCopyFlowData(h.flowdata),s=[];o[n][t].ps.value=l,s.push(n+"_"+t),this.ref(o,s),o[n][t].ps.isshow||$("#"+e).remove(),setTimeout(()=>{Je.createHookFunction("commentUpdateAfter",n,t,a,o[n][t])},0)}},ref:function(e,n){if(h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"postil",data:h.flowdata,curdata:e,sheetIndex:h.currentSheetIndex,rc:n})),h.flowdata=e,xe.webWorkerFlowDataCache(h.flowdata),h.luckysheetfile[Z(h.currentSheetIndex)].data=h.flowdata,ne.allowUpdate)for(let t=0;t<n.length;t++){let l=n[t].split("_")[0],a=n[t].split("_")[1];ne.saveParam("v",h.currentSheetIndex,h.flowdata[l][a],{r:l,c:a})}setTimeout(function(){Be()},1)},positionSync:function(){let e=this;$("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(n,t){let l=$(t).attr("id"),a=l.split("luckysheet-postil-show_")[1].split("_")[0],o=l.split("luckysheet-postil-show_")[1].split("_")[1],s=h.flowdata[a][o];s!=null&&s.ps!=null?e.buildPs(a,o,s.ps):$("#"+l).hide()})},htmlEscape:function(e){return e.replace(/[<>"&]/g,function(n,t,l){switch(console.log(n,t,l),n){case"<":return"<";case">":return">";case"&":return"&";case'"':return"""}})}},He=Ky});function Ys(e,n,t,l,a){let o={},s,u;a==null?(s=h.config,u=h.flowdata):(s=h.luckysheetfile[Z(a)].config,u=h.luckysheetfile[Z(a)].data);let f=s.borderInfo;if(f!=null&&f.length>0)for(let d=0;d<f.length;d++){let m=f[d].rangeType;if(m=="range"){let g=f[d].borderType,y=f[d].color,v=f[d].style,b=f[d].range;for(let k=0;k<b.length;k++){let w=b[k].row[0],x=b[k].row[1],C=b[k].column[0],S=b[k].column[1];if(w<e&&(w=e),x>n&&(x=n),C<t&&(C=t),S>l&&(S=l),g=="border-left")for(let _=w;_<=x;_++){if(s.rowhidden!=null&&s.rowhidden[_]!=null)continue;o[_+"_"+C]==null&&(o[_+"_"+C]={}),o[_+"_"+C].l={color:y,style:v};let T=C-1;if(T>=0&&o[_+"_"+T])if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let R=u[_][T],I=s.merge[R.mc.r+"_"+R.mc.c];I.c+I.cs-1==T&&(o[_+"_"+T].r={color:y,style:v})}else o[_+"_"+T].r={color:y,style:v};let A=s.merge||{};for(let R in A){let{c:I,r:F,cs:z,rs:M}=A[R];C<=I+z-1&&C>I&&_>=F&&_<=F+M-1&&(o[_+"_"+C].l=null)}}else if(g=="border-right")for(let _=w;_<=x;_++){if(s.rowhidden!=null&&s.rowhidden[_]!=null)continue;o[_+"_"+S]==null&&(o[_+"_"+S]={}),o[_+"_"+S].r={color:y,style:v};let T=S+1;if(T<u[0].length&&o[_+"_"+T])if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let R=u[_][T];s.merge[R.mc.r+"_"+R.mc.c].c==T&&(o[_+"_"+T].l={color:y,style:v})}else o[_+"_"+T].l={color:y,style:v};let A=s.merge||{};for(let R in A){let{c:I,r:F,cs:z,rs:M}=A[R];S<I+z-1&&S>=I&&_>=F&&_<=F+M-1&&(o[_+"_"+S].r=null)}}else if(g=="border-top"){if(s.rowhidden!=null&&s.rowhidden[w]!=null)continue;for(let _=C;_<=S;_++){o[w+"_"+_]==null&&(o[w+"_"+_]={}),o[w+"_"+_].t={color:y,style:v};let T=w-1;if(T>=0&&o[T+"_"+_])if(u[T]!=null&&P(u[T][_])=="object"&&u[T][_].mc!=null){let R=u[T][_],I=s.merge[R.mc.r+"_"+R.mc.c];I.r+I.rs-1==T&&(o[T+"_"+_].b={color:y,style:v})}else o[T+"_"+_].b={color:y,style:v};let A=s.merge||{};for(let R in A){let{c:I,r:F,cs:z,rs:M}=A[R];w<=F+M-1&&w>F&&_>=I&&_<=I+z-1&&(o[w+"_"+_].t=null)}}}else if(g=="border-bottom"){if(s.rowhidden!=null&&s.rowhidden[x]!=null)continue;for(let _=C;_<=S;_++){o[x+"_"+_]==null&&(o[x+"_"+_]={}),o[x+"_"+_].b={color:y,style:v};let T=x+1;if(T<u.length&&o[T+"_"+_])if(u[T]!=null&&P(u[T][_])=="object"&&u[T][_].mc!=null){let R=u[T][_];s.merge[R.mc.r+"_"+R.mc.c].r==T&&(o[T+"_"+_].t={color:y,style:v})}else o[T+"_"+_].t={color:y,style:v};let A=s.merge||{};for(let R in A){let{c:I,r:F,cs:z,rs:M}=A[R];x<F+M-1&&x>=F&&_>=I&&_<=I+z-1&&(o[x+"_"+_].b=null)}}}else if(g=="border-all"){for(let _=w;_<=x;_++)if(!(s.rowhidden!=null&&s.rowhidden[_]!=null))for(let T=C;T<=S;T++){if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c];R.r==_&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v}),R.r+R.rs-1==_&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].b={color:y,style:v}),R.c==T&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v}),R.c+R.cs-1==T&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].r={color:y,style:v},o[_+"_"+T].t={color:y,style:v},o[_+"_"+T].b={color:y,style:v};if(_==w){let A=w-1;if(A>=0&&o[A+"_"+T])if(u[A]!=null&&P(u[A][T])=="object"&&u[A][T].mc!=null){let R=u[A][T],I=s.merge[R.mc.r+"_"+R.mc.c];I.r+I.rs-1==A&&(o[A+"_"+T].b={color:y,style:v})}else o[A+"_"+T].b={color:y,style:v}}if(_==x){let A=x+1;if(A<u.length&&o[A+"_"+T])if(u[A]!=null&&P(u[A][T])=="object"&&u[A][T].mc!=null){let R=u[A][T];s.merge[R.mc.r+"_"+R.mc.c].r==A&&(o[A+"_"+T].t={color:y,style:v})}else o[A+"_"+T].t={color:y,style:v}}if(T==C){let A=C-1;if(A>=0&&o[_+"_"+A])if(u[_]!=null&&P(u[_][A])=="object"&&u[_][A].mc!=null){let R=u[_][A],I=s.merge[R.mc.r+"_"+R.mc.c];I.c+I.cs-1==A&&(o[_+"_"+A].r={color:y,style:v})}else o[_+"_"+A].r={color:y,style:v}}if(T==S){let A=S+1;if(A<u[0].length&&o[_+"_"+A])if(u[_]!=null&&P(u[_][A])=="object"&&u[_][A].mc!=null){let R=u[_][A];s.merge[R.mc.r+"_"+R.mc.c].c==A&&(o[_+"_"+A].l={color:y,style:v})}else o[_+"_"+A].l={color:y,style:v}}}}else if(g=="border-outside"){for(let _=w;_<=x;_++)if(!(s.rowhidden!=null&&s.rowhidden[_]!=null)){for(let T=C;T<=S;T++)if(_==w||_==x||T==C||T==S){if(_==w){o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v};let A=w-1;if(A>=0&&o[A+"_"+T])if(u[A]!=null&&P(u[A][T])=="object"&&u[A][T].mc!=null){let R=u[A][T],I=s.merge[R.mc.r+"_"+R.mc.c];I.r+I.rs-1==A&&(o[A+"_"+T].b={color:y,style:v})}else o[A+"_"+T].b={color:y,style:v}}if(_==x){o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].b={color:y,style:v};let A=x+1;if(A<u.length&&o[A+"_"+T])if(u[A]!=null&&P(u[A][T])=="object"&&u[A][T].mc!=null){let R=u[A][T];s.merge[R.mc.r+"_"+R.mc.c].r==A&&(o[A+"_"+T].t={color:y,style:v})}else o[A+"_"+T].t={color:y,style:v}}if(T==C){o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v};let A=C-1;if(A>=0&&o[_+"_"+A])if(u[_]!=null&&P(u[_][A])=="object"&&u[_][A].mc!=null){let R=u[_][A],I=s.merge[R.mc.r+"_"+R.mc.c];I.c+I.cs-1==A&&(o[_+"_"+A].r={color:y,style:v})}else o[_+"_"+A].r={color:y,style:v}}if(T==S){o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v};let A=S+1;if(A<u[0].length&&o[_+"_"+A])if(u[_]!=null&&P(u[_][A])=="object"&&u[_][A].mc!=null){let R=u[_][A];s.merge[R.mc.r+"_"+R.mc.c].c==A&&(o[_+"_"+A].l={color:y,style:v})}else o[_+"_"+A].l={color:y,style:v}}}}}else if(g=="border-inside"){for(let _=w;_<=x;_++)if(!(s.rowhidden!=null&&s.rowhidden[_]!=null))for(let T=C;T<=S;T++)if(_==w&&T==C)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v},o[_+"_"+T].b={color:y,style:v});else if(_==x&&T==C)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v},o[_+"_"+T].t={color:y,style:v});else if(_==w&&T==S)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].b={color:y,style:v});else if(_==x&&T==S)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].t={color:y,style:v});else if(_==w)if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c];R.c==T?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v}):R.c+R.cs-1==T&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].r={color:y,style:v},o[_+"_"+T].b={color:y,style:v};else if(_==x)if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c];R.c==T?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v}):R.c+R.cs-1==T&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].r={color:y,style:v},o[_+"_"+T].t={color:y,style:v};else if(T==C)if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c];R.r==_?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v}):R.r+R.rs-1==_&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].b={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v},o[_+"_"+T].t={color:y,style:v},o[_+"_"+T].b={color:y,style:v};else if(T==S)if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c];R.r==_?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v}):R.r+R.rs-1==_&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].b={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].t={color:y,style:v},o[_+"_"+T].b={color:y,style:v};else if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c];R.r==_?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v}):R.r+R.rs-1==_&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].b={color:y,style:v}),R.c==T?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v}):R.c+R.cs-1==T&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].r={color:y,style:v},o[_+"_"+T].t={color:y,style:v},o[_+"_"+T].b={color:y,style:v}}else if(g=="border-horizontal"){for(let _=w;_<=x;_++)if(!(s.rowhidden!=null&&s.rowhidden[_]!=null))for(let T=C;T<=S;T++)if(_==w)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].b={color:y,style:v});else if(_==x)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v});else if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c];R.r==_?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v}):R.r+R.rs-1==_&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].b={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].t={color:y,style:v},o[_+"_"+T].b={color:y,style:v}}else if(g=="border-vertical"){for(let _=w;_<=x;_++)if(!(s.rowhidden!=null&&s.rowhidden[_]!=null))for(let T=C;T<=S;T++)if(T==C)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v});else if(T==S)u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null||(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v});else if(u[_]!=null&&P(u[_][T])=="object"&&u[_][T].mc!=null){let A=u[_][T],R=s.merge[A.mc.r+"_"+A.mc.c]||{};R.c==T?(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v}):R.c+R.cs-1==T&&(o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].r={color:y,style:v})}else o[_+"_"+T]==null&&(o[_+"_"+T]={}),o[_+"_"+T].l={color:y,style:v},o[_+"_"+T].r={color:y,style:v}}else if(g=="border-none"){for(let _=w;_<=x;_++)if(!(s.rowhidden!=null&&s.rowhidden[_]!=null))for(let T=C;T<=S;T++){if(o[_+"_"+T]!=null&&delete o[_+"_"+T],_==w){let A=w-1;A>=0&&o[A+"_"+T]&&delete o[A+"_"+T].b}if(_==x){let A=x+1;A<u.length&&o[A+"_"+T]&&delete o[A+"_"+T].t}if(T==C){let A=C-1;A>=0&&o[_+"_"+A]&&delete o[_+"_"+A].r}if(T==S){let A=S+1;A<u[0].length&&o[_+"_"+A]&&delete o[_+"_"+A].l}}}}}else if(m=="cell"){let g=f[d].value,y=g.row_index,v=g.col_index;if(y<e||y>n||v<t||v>l||s.rowhidden!=null&&s.rowhidden[y]!=null)continue;if(g.l!=null||g.r!=null||g.t!=null||g.b!=null)if(o[y+"_"+v]==null&&(o[y+"_"+v]={}),u[y]!=null&&P(u[y][v])=="object"&&u[y][v].mc!=null){let b=u[y][v],k=s.merge[b.mc.r+"_"+b.mc.c]||{};if(g.l!=null&&v==k.c){o[y+"_"+v].l={color:g.l.color,style:g.l.style};let w=v-1;if(w>=0&&o[y+"_"+w])if(u[y]!=null&&P(u[y][w])=="object"&&u[y][w].mc!=null){let x=u[y][w],C=s.merge[x.mc.r+"_"+x.mc.c];C.c+C.cs-1==w&&(o[y+"_"+w].r={color:g.l.color,style:g.l.style})}else o[y+"_"+w].r={color:g.l.color,style:g.l.style}}else o[y+"_"+v].l=null;if(g.r!=null&&v==k.c+k.cs-1){o[y+"_"+v].r={color:g.r.color,style:g.r.style};let w=v+1;if(w<u[0].length&&o[y+"_"+w])if(u[y]!=null&&P(u[y][w])=="object"&&u[y][w].mc!=null){let x=u[y][w];s.merge[x.mc.r+"_"+x.mc.c].c==w&&(o[y+"_"+w].l={color:g.r.color,style:g.r.style})}else o[y+"_"+w].l={color:g.r.color,style:g.r.style}}else o[y+"_"+v].r=null;if(g.t!=null&&y==k.r){o[y+"_"+v].t={color:g.t.color,style:g.t.style};let w=y-1;if(w>=0&&o[w+"_"+v])if(u[w]!=null&&P(u[w][v])=="object"&&u[w][v].mc!=null){let x=u[w][v],C=s.merge[x.mc.r+"_"+x.mc.c];C.r+C.rs-1==w&&(o[w+"_"+v].b={color:g.t.color,style:g.t.style})}else o[w+"_"+v].b={color:g.t.color,style:g.t.style}}else o[y+"_"+v].t=null;if(g.b!=null&&y==k.r+k.rs-1){o[y+"_"+v].b={color:g.b.color,style:g.b.style};let w=y+1;if(w<u.length&&o[w+"_"+v])if(u[w]!=null&&P(u[w][v])=="object"&&u[w][v].mc!=null){let x=u[w][v];s.merge[x.mc.r+"_"+x.mc.c].r==w&&(o[w+"_"+v].t={color:g.b.color,style:g.b.style})}else o[w+"_"+v].t={color:g.b.color,style:g.b.style}}else o[y+"_"+v].b=null}else{if(g.l!=null){o[y+"_"+v].l={color:g.l.color,style:g.l.style};let b=v-1;if(b>=0&&o[y+"_"+b])if(u[y]!=null&&P(u[y][b])=="object"&&u[y][b].mc!=null){let k=u[y][b],w=s.merge[k.mc.r+"_"+k.mc.c];w.c+w.cs-1==b&&(o[y+"_"+b].r={color:g.l.color,style:g.l.style})}else o[y+"_"+b].r={color:g.l.color,style:g.l.style}}else o[y+"_"+v].l=null;if(g.r!=null){o[y+"_"+v].r={color:g.r.color,style:g.r.style};let b=v+1;if(b<u[0].length&&o[y+"_"+b])if(u[y]!=null&&P(u[y][b])=="object"&&u[y][b].mc!=null){let k=u[y][b];s.merge[k.mc.r+"_"+k.mc.c].c==b&&(o[y+"_"+b].l={color:g.r.color,style:g.r.style})}else o[y+"_"+b].l={color:g.r.color,style:g.r.style}}else o[y+"_"+v].r=null;if(g.t!=null){o[y+"_"+v].t={color:g.t.color,style:g.t.style};let b=y-1;if(b>=0&&o[b+"_"+v])if(u[b]!=null&&P(u[b][v])=="object"&&u[b][v].mc!=null){let k=u[b][v],w=s.merge[k.mc.r+"_"+k.mc.c];w.r+w.rs-1==b&&(o[b+"_"+v].b={color:g.t.color,style:g.t.style})}else o[b+"_"+v].b={color:g.t.color,style:g.t.style}}else o[y+"_"+v].t=null;if(g.b!=null){o[y+"_"+v].b={color:g.b.color,style:g.b.style};let b=y+1;if(b<u.length&&o[b+"_"+v])if(u[b]!=null&&P(u[b][v])=="object"&&u[b][v].mc!=null){let k=u[b][v];s.merge[k.mc.r+"_"+k.mc.c].r==b&&(o[b+"_"+v].t={color:g.b.color,style:g.b.style})}else o[b+"_"+v].t={color:g.b.color,style:g.b.style}}else o[y+"_"+v].b=null}else delete o[y+"_"+v]}}return o}function Gr(e){let n={},t,l;return e==null?(t=h.config,l=h.flowdata):(t=h.luckysheetfile[Z(e)].config,l=h.luckysheetfile[Z(e)].data),n=Ys(0,l.length,0,l[0].length,e),n}var Va=Ie(()=>{Nt();ft();Xe()});var Ae,Zy,nl,Xs=Ie(()=>{Ol();Pa();Va();Ft();Al();Yt();Jt();Ut();gr();Ml();Zt();Nt();ft();Xe();bt();Ae=Fl(vn()),Zy={iconHtml:'<div id="luckysheet-dropCell-icon" style="position: absolute;padding: 2px;background-color: #f1f1f1;z-index: 990;cursor: pointer;"><div id="icon_dropCell"></div></div>',typeListHtml:'<div id="luckysheet-dropCell-typeList" class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-mousedown-cancel"><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="0"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${copyCell}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="1"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${sequence}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="2"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${onlyFormat}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="3"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${noFormat}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="4"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${day}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="5"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${workDay}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="6"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${month}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="7"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${year}</div></div><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" data-type="8"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 2px;"><span style="margin-right:5px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span>${chineseNumber}</div></div></div>',copyRange:{},applyRange:{},applyType:null,direction:null,chnNumChar:{\u96F6:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9},chnNameValue:{\u5341:{value:10,secUnit:!1},\u767E:{value:100,secUnit:!1},\u5343:{value:1e3,secUnit:!1},\u4E07:{value:1e4,secUnit:!0},\u4EBF:{value:1e8,secUnit:!0}},ChineseToNumber:function(e){let n=this,t=0,l=0,a=0,o=!1,s=e.split("");for(let u=0;u<s.length;u++){let f=n.chnNumChar[s[u]];if(typeof f!="undefined")a=f,u==s.length-1&&(l+=a);else{let d=n.chnNameValue[s[u]].value;o=n.chnNameValue[s[u]].secUnit,o?(l=(l+a)*d,t+=l,l=0):l+=a*d,a=0}}return t+l},chnNumChar2:["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],chnUnitSection:["","\u4E07","\u4EBF","\u4E07\u4EBF","\u4EBF\u4EBF"],chnUnitChar:["","\u5341","\u767E","\u5343"],SectionToChinese:function(e){let n=this,t="",l="",a=0,o=!0;for(;e>0;){let s=e%10;s==0?o||(o=!0,l=n.chnNumChar2[s]+l):(o=!1,t=n.chnNumChar2[s],t+=n.chnUnitChar[a],l=t+l),a++,e=Math.floor(e/10)}return l},NumberToChinese:function(e){let n=this,t=0,l="",a="",o=!1;if(e==0)return n.chnNumChar2[0];for(;e>0;){let s=e%1e4;o&&(a=n.chnNumChar2[0]+a),l=n.SectionToChinese(s),l+=s!=0?n.chnUnitSection[t]:n.chnUnitSection[0],a=l+a,o=s<1e3&&s>0,e=Math.floor(e/1e4),t++}return a},isChnNumber:function(e){let n=this,t=!0;if(e.length==1)e=="\u65E5"||e in n.chnNumChar?t=!0:t=!1;else{let l=e.split("");for(let a=0;a<l.length;a++)if(!(l[a]in n.chnNumChar||l[a]in n.chnNameValue)){t=!1;break}}return t},isExtendNumber:function(e){let n=/0|([1-9]+[0-9]*)/g,t=n.test(e);if(t){let l=e.match(n),a=l[l.length-1],o=e.lastIndexOf(a),s=e.substr(0,o),u=e.substr(o+a.length);return[t,Number(a),s,u]}else return[t]},isChnWeek1:function(e){let n=this,t;return e.length==1&&(e=="\u65E5"||n.ChineseToNumber(e)<7)?t=!0:t=!1,t},isChnWeek2:function(e){let n;return e.length==2&&(e=="\u5468\u4E00"||e=="\u5468\u4E8C"||e=="\u5468\u4E09"||e=="\u5468\u56DB"||e=="\u5468\u4E94"||e=="\u5468\u516D"||e=="\u5468\u65E5")?n=!0:n=!1,n},isChnWeek3:function(e){let n;return e.length==3&&(e=="\u661F\u671F\u4E00"||e=="\u661F\u671F\u4E8C"||e=="\u661F\u671F\u4E09"||e=="\u661F\u671F\u56DB"||e=="\u661F\u671F\u4E94"||e=="\u661F\u671F\u516D"||e=="\u661F\u671F\u65E5")?n=!0:n=!1,n},createIcon:function(){let e=this,n=e.copyRange.row[1],t=e.copyRange.column[1],l=e.applyRange.row[1],a=e.applyRange.column[1],o,s;l>=n&&a>=t?(o=l,s=a):(o=n,s=t);let u=tl(o)[1],f=tl(o)[0],d=At(s)[1],m=At(s)[0];$("#luckysheet-dropCell-icon").remove(),$("#luckysheet-cell-main").append(e.iconHtml),$("#luckysheet-dropCell-icon").css({left:d,top:u}),$("#luckysheet-dropCell-icon").mouseover(function(){$(this).css("background-color","#ffe8e8")}).mouseleave(function(){$(this).css("background-color","#f1f1f1")}).mousedown(function(g){$("#luckysheet-dropCell-typeList").remove();let v=Q().dropCell;$("body").append(_e(e.typeListHtml,{copyCell:v.copyCell,sequence:v.sequence,onlyFormat:v.onlyFormat,noFormat:v.noFormat,day:v.day,workDay:v.workDay,month:v.month,year:v.year,chineseNumber:v.chineseNumber}));let b=e.typeItemHide();!b[0]&&!b[1]&&!b[2]&&!b[3]&&!b[4]&&!b[5]&&!b[6]&&($("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=1]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=4]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=5]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=6]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=7]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=8]").hide()),b[2]||($("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=4]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=5]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=6]").hide(),$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=7]").hide()),b[3]||$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=8]").hide();let k=$(this).offset().left,w=$(this).offset().top+25,x=$(window).height(),C=$(window).width(),S=$("#luckysheet-dropCell-typeList").width(),_=$("#luckysheet-dropCell-typeList").height();k+S>C&&(k=k-S),w+_>x&&(w=w-_-38),w<0&&(w=0),$("#luckysheet-dropCell-typeList").css({left:k,top:w}).show(),$("#luckysheet-dropCell-icon").mouseleave(function(){$(this).css("backgroundColor","#ffe8e8")});let T=e.applyType;$("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type="+T+"]").find("span").append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>'),g.stopPropagation()}),$(document).off("click.dCtypeList").on("click.dCtypeList","#luckysheet-dropCell-typeList .luckysheet-cols-menuitem",function(){$("#luckysheet-dropCell-typeList .fa-check").remove(),$(this).find("span").append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>');let g=$(this).attr("data-type");e.applyType=g,e.update(),$("#luckysheet-dropCell-typeList").hide(),$("#luckysheet-dropCell-icon").css("backgroundColor","#f1f1f1"),$("#luckysheet-dropCell-icon").mouseleave(function(){$(this).css("backgroundColor","#f1f1f1")}),wl()})},typeItemHide:function(){let e=this,n=e.copyRange,t=n.row[0],l=n.row[1],a=n.column[0],o=n.column[1],s=!1,u=!1,f=!1,d=!1,m=!1,g=!1,y=!1;for(let v=t;v<=l;v++)for(let b=a;b<=o;b++)if(h.flowdata[v][b]){let k=h.flowdata[v][b];P(k)=="object"&&k.v!=null&&k.f==null&&(k.ct!=null&&k.ct.t=="n"?s=!0:k.ct!=null&&k.ct.t=="d"?f=!0:e.isExtendNumber(k.m)[0]?u=!0:e.isChnNumber(k.m)&&k.m!="\u65E5"?d=!0:k.m=="\u65E5"?m=!0:e.isChnWeek2(k.m)?g=!0:e.isChnWeek3(k.m)&&(y=!0))}return[s,u,f,d,m,g,y]},update:function(){let e=this;if(!vr([e.applyRange],h.currentSheetIndex)||h.allowEdit===!1)return;let n=xe.deepCopyFlowData(h.flowdata),t=h.luckysheetfile[Z(h.currentSheetIndex)],l=$.extend(!0,{},h.config),a=Gr(),o=$.extend(!0,{},t.dataVerification),s=e.direction,u=e.applyType,f=e.copyRange,d=f.row[0],m=f.row[1],g=f.column[0],y=f.column[1],v=e.getCopyData(n,d,m,g,y,s),b;s=="down"||s=="up"?b=m-d+1:(s=="right"||s=="left")&&(b=y-g+1);let k=e.applyRange,w=k.row[0],x=k.row[1],C=k.column[0],S=k.column[1];if(s=="down"||s=="up"){let A=x-w+1;for(let R=C;R<=S;R++){let I=v[R-C],F=e.getApplyData(I,b,A);if(s=="down")for(let z=w;z<=x;z++){let M=F[z-w];if(M.f!=null){let L="="+p.functionCopy(M.f,"down",z-w+1),O=p.execfunction(L,z,R);if(p.execFunctionGroup(z,R,O[1],void 0,n),M.f=O[2],M.v=O[1],M.spl!=null)M.spl=O[3].data;else if(B(M.v)&&!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(M.v)){if(M.v==Infinity||M.v==-Infinity)M.m=M.v.toString();else if(M.v.toString().indexOf("e")>-1){let V=M.v.toString().split(".")[1].split("e")[0].length;V>5&&(V=5),M.m=M.v.toExponential(V).toString()}else{let V;M.ct.fa==="##0.00"?(V=at(Math.round(M.v*1e9)/1e9+".00"),M.m=V[0].toString()):(V=at(Math.round(M.v*1e9)/1e9),M.m=V[0].toString())}M.ct=M.ct||{fa:"General",t:"n"}}else{let V=at(M.v);M.m=V[0].toString(),M.ct=V[1]}}n[z][R]=M;let E=d+(z-w)%b,N=R;if(a[E+"_"+N]){let L={rangeType:"cell",value:{row_index:z,col_index:R,l:a[E+"_"+N].l,r:a[E+"_"+N].r,t:a[E+"_"+N].t,b:a[E+"_"+N].b}};l.borderInfo.push(L)}else if(a[z+"_"+R]){let L={rangeType:"cell",value:{row_index:z,col_index:R,l:null,r:null,t:null,b:null}};l.borderInfo.push(L)}o[E+"_"+N]&&(o[z+"_"+R]=o[E+"_"+N])}if(s=="up")for(let z=x;z>=w;z--){let M=F[x-z];if(M.f!=null){let L="="+p.functionCopy(M.f,"up",x-z+1),O=p.execfunction(L,z,R);if(p.execFunctionGroup(z,R,O[1],void 0,n),M.f=O[2],M.v=O[1],M.spl!=null)M.spl=O[3].data;else if(B(M.v)&&!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(M.v)){if(M.v==Infinity||M.v==-Infinity)M.m=M.v.toString();else if(M.v.toString().indexOf("e")>-1){let V=M.v.toString().split(".")[1].split("e")[0].length;V>5&&(V=5),M.m=M.v.toExponential(V).toString()}else{let V=at(Math.round(M.v*1e9)/1e9);M.m=V[0].toString()}M.ct={fa:"General",t:"n"}}else{let V=at(M.v);M.m=V[0].toString(),M.ct=V[1]}}n[z][R]=M;let E=m-(x-z)%b,N=R;if(a[E+"_"+N]){let L={rangeType:"cell",value:{row_index:z,col_index:R,l:a[E+"_"+N].l,r:a[E+"_"+N].r,t:a[E+"_"+N].t,b:a[E+"_"+N].b}};l.borderInfo.push(L)}else if(a[z+"_"+R]){let L={rangeType:"cell",value:{row_index:z,col_index:R,l:null,r:null,t:null,b:null}};l.borderInfo.push(L)}o[E+"_"+N]&&(o[z+"_"+R]=o[E+"_"+N])}}}else if(s=="right"||s=="left"){let A=S-C+1;for(let R=w;R<=x;R++){let I=v[R-w],F=e.getApplyData(I,b,A);if(s=="right")for(let z=C;z<=S;z++){let M=F[z-C];if(M.f!=null){let L="="+p.functionCopy(M.f,"right",z-C+1),O=p.execfunction(L,R,z);if(p.execFunctionGroup(R,z,O[1],void 0,n),M.f=O[2],M.v=O[1],M.spl!=null)M.spl=O[3].data;else if(B(M.v)&&!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(M.v)){if(M.v==Infinity||M.v==-Infinity)M.m=M.v.toString();else if(M.v.toString().indexOf("e")>-1){let V=M.v.toString().split(".")[1].split("e")[0].length;V>5&&(V=5),M.m=M.v.toExponential(V).toString()}else{let V=at(Math.round(M.v*1e9)/1e9);M.m=V[0].toString()}M.ct={fa:"General",t:"n"}}else{let V=at(M.v);M.m=V[0].toString(),M.ct=V[1]}}n[R][z]=M;let E=R,N=g+(z-C)%b;if(a[E+"_"+N]){let L={rangeType:"cell",value:{row_index:R,col_index:z,l:a[E+"_"+N].l,r:a[E+"_"+N].r,t:a[E+"_"+N].t,b:a[E+"_"+N].b}};l.borderInfo.push(L)}else if(a[R+"_"+z]){let L={rangeType:"cell",value:{row_index:R,col_index:z,l:null,r:null,t:null,b:null}};l.borderInfo.push(L)}o[E+"_"+N]&&(o[R+"_"+z]=o[E+"_"+N])}if(s=="left")for(let z=S;z>=C;z--){let M=F[S-z];if(M.f!=null){let L="="+p.functionCopy(M.f,"left",S-z+1),O=p.execfunction(L,R,z);if(p.execFunctionGroup(R,z,O[1],void 0,n),M.f=O[2],M.v=O[1],M.spl!=null)M.spl=O[3].data;else if(B(M.v)&&!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(M.v)){if(M.v==Infinity||M.v==-Infinity)M.m=M.v.toString();else if(M.v.toString().indexOf("e")>-1){let V=M.v.toString().split(".")[1].split("e")[0].length;V>5&&(V=5),M.m=M.v.toExponential(V).toString()}else{let V=at(Math.round(M.v*1e9)/1e9);M.m=V[0].toString()}M.ct={fa:"General",t:"n"}}else{let V=at(M.v);M.m=V[0].toString(),M.ct=V[1]}}n[R][z]=M;let E=R,N=y-(S-z)%b;if(a[E+"_"+N]){let L={rangeType:"cell",value:{row_index:R,col_index:z,l:a[E+"_"+N].l,r:a[E+"_"+N].r,t:a[E+"_"+N].t,b:a[E+"_"+N].b}};l.borderInfo.push(L)}else if(a[R+"_"+z]){let L={rangeType:"cell",value:{row_index:R,col_index:z,l:null,r:null,t:null,b:null}};l.borderInfo.push(L)}o[E+"_"+N]&&(o[R+"_"+z]=o[E+"_"+N])}}}let _=$.extend(!0,[],t.luckysheet_conditionformat_save);if(_!=null&&_.length>0)for(let A=0;A<_.length;A++){let R=_[A].cellrange,I=[];for(let F=0;F<R.length;F++){let z=$e.CFSplitRange(R[F],{row:f.row,column:f.column},{row:k.row,column:k.column},"operatePart");z.length>0&&(I=I.concat(z))}I.length>0&&_[A].cellrange.push(k)}let T={cfg:l,cdformat:_,dataVerification:o};Ze(n,h.luckysheet_select_save,T),lt()},getCopyData:function(e,n,t,l,a,o){let s=this,u=[],f,d,m,g;o=="down"||o=="up"?(f=l,d=a,m=n,g=t):(o=="right"||o=="left")&&(f=n,d=t,m=l,g=a);for(let y=f;y<=d;y++){let v={},b=[],k=[],w="",x=null,C=null,S=!0;for(let _=m;_<=g;_++){let T;o=="down"||o=="up"?T=e[_][y]:(o=="right"||o=="left")&&(T=e[y][_]);let A;if(!!T&&!!T.v&&T.f==null)if(!!T.ct&&T.ct.t=="n")A="number",x=null,C=null;else if(!!T.ct&&T.ct.t=="d")A="date",x=null,C=null;else if(s.isExtendNumber(T.m)[0]){A="extendNumber";let R=s.isExtendNumber(T.m);x==null||C==null?(S=!0,x=R[2],C=R[3]):R[2]!=x||R[3]!=C?(S=!1,x=R[2],C=R[3]):S=!0}else s.isChnNumber(T.m)?(A="chnNumber",x=null,C=null):s.isChnWeek2(T.m)?(A="chnWeek2",x=null,C=null):s.isChnWeek3(T.m)?(A="chnWeek3",x=null,C=null):(A="other",x=null,C=null);else A="other",x=null,C=null;A=="extendNumber"?_==m?m==g?(w=A,b.push(T),k.push(_-m+1),v[w]=[],v[w].push({data:b,index:k})):(w=A,b.push(T),k.push(_-m+1)):_==g?w==A&&S?(b.push(T),k.push(_-m+1),w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k}))):(w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k})),w=A,b=[],b.push(T),k=[],k.push(_-m+1),w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k}))):w==A&&S?(b.push(T),k.push(_-m+1)):(w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k})),w=A,b=[],b.push(T),k=[],k.push(_-m+1)):_==m?m==g?(w=A,b.push(T),k.push(_-m+1),v[w]=[],v[w].push({data:b,index:k})):(w=A,b.push(T),k.push(_-m+1)):_==g?w==A?(b.push(T),k.push(_-m+1),w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k}))):(w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k})),w=A,b=[],b.push(T),k=[],k.push(_-m+1),w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k}))):w==A?(b.push(T),k.push(_-m+1)):(w in v?v[w].push({data:b,index:k}):(v[w]=[],v[w].push({data:b,index:k})),w=A,b=[],b.push(T),k=[],k.push(_-m+1))}u.push(v)}return u},getApplyData:function(e,n,t){let l=this,a=[],o=l.direction,s=l.applyType,u=Math.floor(t/n),f=t%n,d=e.number,m=[];if(d)for(let R=0;R<d.length;R++){let I=l.getLenS(d[R].index,f),F=d[R].index.length*u+I,z;s=="1"||s=="3"?z=l.getDataByType(d[R].data,F,o,s,"number"):s=="2"?z=l.getDataByType(d[R].data,F,o,s):z=l.getDataByType(d[R].data,F,o,"0");let M=l.getDataIndex(n,t,d[R].index);m.push({data:z,index:M})}let g=e.extendNumber,y=[];if(g)for(let R=0;R<g.length;R++){let I=l.getLenS(g[R].index,f),F=g[R].index.length*u+I,z;s=="1"||s=="3"?z=l.getDataByType(g[R].data,F,o,s,"extendNumber"):s=="2"?z=l.getDataByType(g[R].data,F,o,s):z=l.getDataByType(g[R].data,F,o,"0");let M=l.getDataIndex(n,t,g[R].index);y.push({data:z,index:M})}let v=e.date,b=[];if(v)for(let R=0;R<v.length;R++){let I=l.getLenS(v[R].index,f),F=v[R].index.length*u+I,z;s=="1"||s=="3"?z=l.getDataByType(v[R].data,F,o,s,"date"):s=="8"?z=l.getDataByType(v[R].data,F,o,"0"):z=l.getDataByType(v[R].data,F,o,s);let M=l.getDataIndex(n,t,v[R].index);b.push({data:z,index:M})}let k=e.chnNumber,w=[];if(k)for(let R=0;R<k.length;R++){let I=l.getLenS(k[R].index,f),F=k[R].index.length*u+I,z;s=="1"||s=="3"?z=l.getDataByType(k[R].data,F,o,s,"chnNumber"):s=="2"||s=="8"?z=l.getDataByType(k[R].data,F,o,s):z=l.getDataByType(k[R].data,F,o,"0");let M=l.getDataIndex(n,t,k[R].index);w.push({data:z,index:M})}let x=e.chnWeek2,C=[];if(x)for(let R=0;R<x.length;R++){let I=l.getLenS(x[R].index,f),F=x[R].index.length*u+I,z;s=="1"||s=="3"?z=l.getDataByType(x[R].data,F,o,s,"chnWeek2"):s=="2"?z=l.getDataByType(x[R].data,F,o,s):z=l.getDataByType(x[R].data,F,o,"0");let M=l.getDataIndex(n,t,x[R].index);C.push({data:z,index:M})}let S=e.chnWeek3,_=[];if(S)for(let R=0;R<S.length;R++){let I=l.getLenS(S[R].index,f),F=S[R].index.length*u+I,z;s=="1"||s=="3"?z=l.getDataByType(S[R].data,F,o,s,"chnWeek3"):s=="2"?z=l.getDataByType(S[R].data,F,o,s):z=l.getDataByType(S[R].data,F,o,"0");let M=l.getDataIndex(n,t,S[R].index);_.push({data:z,index:M})}let T=e.other,A=[];if(T)for(let R=0;R<T.length;R++){let I=l.getLenS(T[R].index,f),F=T[R].index.length*u+I,z;s=="2"||s=="3"?z=l.getDataByType(T[R].data,F,o,s):z=l.getDataByType(T[R].data,F,o,"0");let M=l.getDataIndex(n,t,T[R].index);A.push({data:z,index:M})}for(let R=1;R<=t;R++){if(m.length>0)for(let I=0;I<m.length;I++)R in m[I].index&&a.push(m[I].data[m[I].index[R]]);if(y.length>0)for(let I=0;I<y.length;I++)R in y[I].index&&a.push(y[I].data[y[I].index[R]]);if(b.length>0)for(let I=0;I<b.length;I++)R in b[I].index&&a.push(b[I].data[b[I].index[R]]);if(w.length>0)for(let I=0;I<w.length;I++)R in w[I].index&&a.push(w[I].data[w[I].index[R]]);if(C.length>0)for(let I=0;I<C.length;I++)R in C[I].index&&a.push(C[I].data[C[I].index[R]]);if(_.length>0)for(let I=0;I<_.length;I++)R in _[I].index&&a.push(_[I].data[_[I].index[R]]);if(A.length>0)for(let I=0;I<A.length;I++)R in A[I].index&&a.push(A[I].data[A[I].index[R]])}return a},getLenS:function(e,n){let t=0;for(let l=0;l<e.length&&e[l]<=n;l++)t++;return t},getDataIndex:function(e,n,t){let l={},a=Math.floor(n/e),o=n%e,s=0;if(a>0){for(let u=1;u<=a;u++)for(let f=0;f<t.length;f++)l[t[f]+(u-1)*e]=s,s++;for(let u=0;u<t.length&&t[u]<=o;u++)l[t[u]+e*a]=s,s++}else for(let u=0;u<t.length&&t[u]<=o;u++)l[t[u]]=s,s++;return l},getDataByType:function(e,n,t,l,a){let o=this,s=[];if(l=="0")(t=="up"||t=="left")&&e.reverse(),s=o.FillCopy(e,n);else if(l=="1")if(a=="number")s=o.FillSeries(e,n,t);else if(a=="extendNumber")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillExtendNumber(e,n,u)}else{let u=[];for(let f=0;f<e.length;f++){let d=e[f].m;u.push(Number(o.isExtendNumber(d)[1]))}if((t=="up"||t=="left")&&(e.reverse(),u.reverse()),o.isEqualDiff(u)){let f=u[1]-u[0];s=o.FillExtendNumber(e,n,f)}else s=o.FillCopy(e,n)}else if(a=="date")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillDays(e,n,u)}else{(t=="up"||t=="left")&&e.reverse();let u=o.judgeDate(e);if(u[0]&&u[3]){let f=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months");s=o.FillMonths(e,n,f)}else if(!u[0]&&u[2]){let f=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"days");s=o.FillDays(e,n,f)}else s=o.FillCopy(e,n)}else if(a=="chnNumber")if(e.length==1)if(e[0].m=="\u65E5"||o.ChineseToNumber(e[0].m)<7){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillChnWeek(e,n,u)}else{let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillChnNumber(e,n,u)}else{let u=!1;for(let m=0;m<e.length;m++)if(e[m].m=="\u65E5"){u=!0;break}let f=[],d=0;for(let m=0;m<e.length;m++)e[m].m=="\u65E5"?m==0?f.push(0):(d++,f.push(d*7)):u&&o.ChineseToNumber(e[m].m)>0&&o.ChineseToNumber(e[m].m)<7?f.push(o.ChineseToNumber(e[m].m)+d*7):f.push(o.ChineseToNumber(e[m].m));if((t=="up"||t=="left")&&(e.reverse(),f.reverse()),o.isEqualDiff(f))if(u||f[f.length-1]<6&&f[0]>0||f[0]<6&&f[f.length-1]>0){let m=f[1]-f[0];s=o.FillChnWeek(e,n,m)}else{let m=f[1]-f[0];s=o.FillChnNumber(e,n,m)}else s=o.FillCopy(e,n)}else if(a=="chnWeek2")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillChnWeek2(e,n,u)}else{let u=[],f=0;for(let d=0;d<e.length;d++){let m=e[d].m.substr(e[d].m.length-1,1);e[d].m=="\u5468\u65E5"?d==0?u.push(0):(f++,u.push(f*7)):u.push(o.ChineseToNumber(m)+f*7)}if((t=="up"||t=="left")&&(e.reverse(),u.reverse()),o.isEqualDiff(u)){let d=u[1]-u[0];s=o.FillChnWeek2(e,n,d)}else s=o.FillCopy(e,n)}else if(a=="chnWeek3")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillChnWeek3(e,n,u)}else{let u=[],f=0;for(let d=0;d<e.length;d++){let m=e[d].m.substr(e[d].m.length-1,1);e[d].m=="\u661F\u671F\u65E5"?d==0?u.push(0):(f++,u.push(f*7)):u.push(o.ChineseToNumber(m)+f*7)}if((t=="up"||t=="left")&&(e.reverse(),u.reverse()),o.isEqualDiff(u)){let d=u[1]-u[0];s=o.FillChnWeek3(e,n,d)}else s=o.FillCopy(e,n)}else(t=="up"||t=="left")&&e.reverse(),s=o.FillCopy(e,n);else if(l=="2")(t=="up"||t=="left")&&e.reverse(),s=o.FillOnlyFormat(e,n);else if(l=="3"){let u=o.getDataByType(e,n,t,"1",a);s=o.FillWithoutFormat(u)}else if(l=="4")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillDays(e,n,u)}else if(e.length==2){(t=="up"||t=="left")&&e.reverse();let u=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"days");s=o.FillDays(e,n,u)}else{(t=="up"||t=="left")&&e.reverse();let u=o.judgeDate(e);if(u[0]&&u[3]){let f=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months");s=o.FillMonths(e,n,f)}else if(!u[0]&&u[2]){let f=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"days");s=o.FillDays(e,n,f)}else s=o.FillCopy(e,n)}else if(l=="5")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1);let f=Math.round(n*1.5);for(let d=1;d<=f;d++){let m=$.extend(!0,{},e[0]),g=(0,Ae.default)(m.m).add(d,"days").day();if(g==0||g==6)continue;let y=(0,Ae.default)(m.m).add(u*d,"days").format("YYYY-MM-DD");if(m.m=y,m.v=at(y)[2],s.push(m),s.length==n)break}}else if(e.length==2)if((0,Ae.default)(e[1].m).date()==(0,Ae.default)(e[0].m).date()&&(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months")!=0){(t=="up"||t=="left")&&e.reverse();let u=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months");for(let f=1;f<=n;f++){let d=(f-1)%e.length,m=$.extend(!0,{},e[d]),g=(0,Ae.default)(e[e.length-1]).add(u*f,"months").day(),y;g==0?y=(0,Ae.default)(e[e.length-1]).add(u*f,"months").subtract(2,"days").format("YYYY-MM-DD"):g==6?y=(0,Ae.default)(e[e.length-1]).add(u*f,"months").subtract(1,"days").format("YYYY-MM-DD"):y=(0,Ae.default)(e[e.length-1]).add(u*f,"months").format("YYYY-MM-DD"),m.m=y,m.v=at(y)[2],s.push(m)}}else if(Math.abs((0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m)))>7){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1,e.reverse());let f;for(let d=1;d<=n;d++){let m=(d-1)%e.length,g=$.extend(!0,{},e[m]),y=Math.ceil(d/e.length);m==0&&(f=(0,Ae.default)(g.m).add(u*y,"months").diff((0,Ae.default)(g.m),"days"));let v=(0,Ae.default)(g.m).add(f,"days").day(),b;v==0?b=(0,Ae.default)(g.m).add(f,"days").subtract(2,"days").format("YYYY-MM-DD"):v==6?b=(0,Ae.default)(g.m).add(f,"days").subtract(1,"days").format("YYYY-MM-DD"):b=(0,Ae.default)(g.m).add(f,"days").format("YYYY-MM-DD"),g.m=b,g.v=at(b)[2],s.push(g)}}else{let u;t=="down"||t=="right"?u=7:(t=="up"||t=="left")&&(u=-7,e.reverse());let f;for(let d=1;d<=n;d++){let m=(d-1)%e.length,g=$.extend(!0,{},e[m]),y=Math.ceil(d/e.length);m==0&&(f=(0,Ae.default)(g.m).add(u*y,"days").diff((0,Ae.default)(g.m),"days"));let v=(0,Ae.default)(g.m).add(f,"days").day(),b;v==0?b=(0,Ae.default)(g.m).add(f,"days").subtract(2,"days").format("YYYY-MM-DD"):v==6?b=(0,Ae.default)(g.m).add(f,"days").subtract(1,"days").format("YYYY-MM-DD"):b=(0,Ae.default)(g.m).add(f,"days").format("YYYY-MM-DD"),g.m=b,g.v=at(b)[2],s.push(g)}}else{let u=o.judgeDate(e);if(u[0]&&u[3]){(t=="up"||t=="left")&&e.reverse();let f=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months");for(let d=1;d<=n;d++){let m=(d-1)%e.length,g=$.extend(!0,{},e[m]),y=(0,Ae.default)(e[e.length-1].m).add(f*d,"months").day(),v;y==0?v=(0,Ae.default)(e[e.length-1].m).add(f*d,"months").subtract(2,"days").format("YYYY-MM-DD"):y==6?v=(0,Ae.default)(e[e.length-1].m).add(f*d,"months").subtract(1,"days").format("YYYY-MM-DD"):v=(0,Ae.default)(e[e.length-1].m).add(f*d,"months").format("YYYY-MM-DD"),g.m=v,g.v=at(v)[2],s.push(g)}}else if(!u[0]&&u[2])if(Math.abs((0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m)))>7){let f;t=="down"||t=="right"?f=1:(t=="up"||t=="left")&&(f=-1,e.reverse());let d;for(let m=1;m<=n;m++){let g=(m-1)%e.length,y=$.extend(!0,{},e[g]),v=Math.ceil(m/e.length);g==0&&(d=(0,Ae.default)(y.m).add(f*v,"months").diff((0,Ae.default)(y.m),"days"));let b=(0,Ae.default)(y.m).add(d,"days").day(),k;b==0?k=(0,Ae.default)(y.m).add(d,"days").subtract(2,"days").format("YYYY-MM-DD"):b==6?k=(0,Ae.default)(y.m).add(d,"days").subtract(1,"days").format("YYYY-MM-DD"):k=(0,Ae.default)(y.m).add(d,"days").format("YYYY-MM-DD"),y.m=k,y.v=at(k)[2],s.push(y)}}else{let f;t=="down"||t=="right"?f=7:(t=="up"||t=="left")&&(f=-7,e.reverse());let d;for(let m=1;m<=n;m++){let g=(m-1)%e.length,y=$.extend(!0,{},e[g]),v=Math.ceil(m/e.length);g==0&&(d=(0,Ae.default)(y.m).add(f*v,"days").diff((0,Ae.default)(y.m),"days"));let b=(0,Ae.default)(y.m).add(d,"days").day(),k;b==0?k=(0,Ae.default)(y.m).add(d,"days").subtract(2,"days").format("YYYY-MM-DD"):b==6?k=(0,Ae.default)(y.m).add(d,"days").subtract(1,"days").format("YYYY-MM-DD"):k=(0,Ae.default)(y.m).add(d,"days").format("YYYY-MM-DD"),y.m=k,y.v=at(k)[2],s.push(y)}}else(t=="up"||t=="left")&&e.reverse(),s=o.FillCopy(e,n)}else if(l=="6")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillMonths(e,n,u)}else if(e.length==2)if((0,Ae.default)(e[1].m).date()==(0,Ae.default)(e[0].m).date()&&(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months")!=0){(t=="up"||t=="left")&&e.reverse();let u=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months");s=o.FillMonths(e,n,u)}else{let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1,e.reverse());let f;for(let d=1;d<=n;d++){let m=(d-1)%e.length,g=$.extend(!0,{},e[m]),y=Math.ceil(d/e.length);m==0&&(f=(0,Ae.default)(g.m).add(u*y,"months").diff((0,Ae.default)(g.m),"days"));let v=(0,Ae.default)(g.m).add(f,"days").format("YYYY-MM-DD");g.m=v,g.v=at(v)[2],s.push(g)}}else{let u=o.judgeDate(e);if(u[0]&&u[3]){(t=="up"||t=="left")&&e.reverse();let f=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months");s=o.FillMonths(e,n,f)}else if(!u[0]&&u[2]){let f;t=="down"||t=="right"?f=1:(t=="up"||t=="left")&&(f=-1,e.reverse());let d;for(let m=1;m<=n;m++){let g=(m-1)%e.length,y=$.extend(!0,{},e[g]),v=Math.ceil(m/e.length);g==0&&(d=(0,Ae.default)(y.m).add(f*v,"months").diff((0,Ae.default)(y.m),"days"));let b=(0,Ae.default)(y.m).add(d,"days").format("YYYY-MM-DD");y.m=b,y.v=at(b)[2],s.push(y)}}else(t=="up"||t=="left")&&e.reverse(),s=o.FillCopy(e,n)}else if(l=="7")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillYears(e,n,u)}else if(e.length==2)if((0,Ae.default)(e[1].m).date()==(0,Ae.default)(e[0].m).date()&&(0,Ae.default)(e[1].m).month()==(0,Ae.default)(e[0].m).month()&&(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"years")!=0){(t=="up"||t=="left")&&e.reverse();let u=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"years");s=o.FillYears(e,n,u)}else{let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1,e.reverse());let f;for(let d=1;d<=n;d++){let m=(d-1)%e.length,g=$.extend(!0,{},e[m]),y=Math.ceil(d/e.length);m==0&&(f=(0,Ae.default)(g.m).add(u*y,"years").diff((0,Ae.default)(g.m),"days"));let v=(0,Ae.default)(g.m).add(f,"days").format("YYYY-MM-DD");g.m=v,g.v=at(v)[2],s.push(g)}}else{let u=o.judgeDate(e);if(u[0]&&u[1]&&u[4]){(t=="up"||t=="left")&&e.reverse();let f=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"years");s=o.FillYears(e,n,f)}else if(u[0]&&u[3]||u[2]){let f;t=="down"||t=="right"?f=1:(t=="up"||t=="left")&&(f=-1,e.reverse());let d;for(let m=1;m<=n;m++){let g=(m-1)%e.length,y=$.extend(!0,{},e[g]),v=Math.ceil(m/e.length);g==0&&(d=(0,Ae.default)(y.m).add(f*v,"years").diff((0,Ae.default)(y.m),"days"));let b=(0,Ae.default)(y.m).add(d,"days").format("YYYY-MM-DD");y.m=b,y.v=at(b)[2],s.push(y)}}else(t=="up"||t=="left")&&e.reverse(),s=o.FillCopy(e,n)}else if(l=="8")if(e.length==1){let u;t=="down"||t=="right"?u=1:(t=="up"||t=="left")&&(u=-1),s=o.FillChnNumber(e,n,u)}else{let u=[];for(let f=0;f<e.length;f++)u.push(o.ChineseToNumber(e[f].m));if((t=="up"||t=="left")&&(e.reverse(),u.reverse()),o.isEqualDiff(u)){let f=u[1]-u[0];s=o.FillChnNumber(e,n,f)}else s=o.FillCopy(e,n)}return s},FillCopy:function(e,n){let t=[];for(let l=1;l<=n;l++){let a=(l-1)%e.length,o=$.extend(!0,{},e[a]);t.push(o)}return t},FillSeries:function(e,n,t){let l=this,a=[],o=[];for(let s=0;s<e.length;s++)o.push(Number(e[s].v));if(e.length>2&&l.isEqualRatio(o))for(let s=1;s<=n;s++){let u=(s-1)%e.length,f=$.extend(!0,{},e[u]),d;t=="down"||t=="right"?d=Number(e[e.length-1].v)*Math.pow(Number(e[1].v)/Number(e[0].v),s):(t=="up"||t=="left")&&(d=Number(e[0].v)/Math.pow(Number(e[1].v)/Number(e[0].v),s)),f.v=d,f.m=mt(f.ct.fa,d),a.push(f)}else{let s=l.getXArr(e.length);for(let u=1;u<=n;u++){let f=(u-1)%e.length,d=$.extend(!0,{},e[f]),m;t=="down"||t=="right"?m=l.forecast(e.length+u,o,s):(t=="up"||t=="left")&&(m=l.forecast(1-u,o,s)),d.v=m,d.m=mt(d.ct.fa,m),a.push(d)}}return a},FillExtendNumber:function(e,n,t){let l=this,a=[],o=/0|([1-9]+[0-9]*)/g;for(let s=1;s<=n;s++){let u=(s-1)%e.length,f=$.extend(!0,{},e[u]),d=e[e.length-1].m,m=d.match(o),g=m[m.length-1],y=Math.abs(Number(g)+t*s),v=d.lastIndexOf(g),b=d.substr(0,v)+y.toString()+d.substr(v+g.length);f.v=b,f.m=b,a.push(f)}return a},FillOnlyFormat:function(e,n){let t=[];for(let l=1;l<=n;l++){let a=(l-1)%e.length,o=$.extend(!0,{},e[a]);delete o.f,delete o.m,delete o.v,t.push(o)}return t},FillWithoutFormat:function(e){let n=[];for(let t=0;t<e.length;t++){let l=$.extend(!0,{},e[t]),a;l.f==null?a={m:l.v.toString(),v:l.v}:a={f:l.f,m:l.v.toString(),v:l.v},n.push(a)}return n},FillDays:function(e,n,t){let l=[];for(let a=1;a<=n;a++){let o=(a-1)%e.length,s=$.extend(!0,{},e[o]),u=mt("yyyy-MM-dd",s.v);u=(0,Ae.default)(u).add(t*a,"days").format("YYYY-MM-DD"),s.v=at(u)[2],s.m=mt(s.ct.fa,s.v),l.push(s)}return l},FillMonths:function(e,n,t){let l=[];for(let a=1;a<=n;a++){let o=(a-1)%e.length,s=$.extend(!0,{},e[o]),u=mt("yyyy-MM-dd",s.v);u=(0,Ae.default)(u).add(t*a,"months").format("YYYY-MM-DD"),s.v=at(u)[2],s.m=mt(s.ct.fa,s.v),l.push(s)}return l},FillYears:function(e,n,t){let l=[];for(let a=1;a<=n;a++){let o=(a-1)%e.length,s=$.extend(!0,{},e[o]),u=mt("yyyy-MM-dd",s.v);u=(0,Ae.default)(u).add(t*a,"years").format("YYYY-MM-DD"),s.v=at(u)[2],s.m=mt(s.ct.fa,s.v),l.push(s)}return l},FillChnWeek:function(e,n,t){let l=this,a=[];for(let o=1;o<=n;o++){let s=(o-1)%e.length,u=$.extend(!0,{},e[s]),f;e[e.length-1].m=="\u65E5"?f=7+t*o:f=l.ChineseToNumber(e[e.length-1].m)+t*o,f<0&&(f=Math.ceil(Math.abs(f)/7)*7+f);let d=f%7;d==0?(u.m="\u65E5",u.v="\u65E5"):d==1?(u.m="\u4E00",u.v="\u4E00"):d==2?(u.m="\u4E8C",u.v="\u4E8C"):d==3?(u.m="\u4E09",u.v="\u4E09"):d==4?(u.m="\u56DB",u.v="\u56DB"):d==5?(u.m="\u4E94",u.v="\u4E94"):d==6&&(u.m="\u516D",u.v="\u516D"),a.push(u)}return a},FillChnWeek2:function(e,n,t){let l=this,a=[];for(let o=1;o<=n;o++){let s=(o-1)%e.length,u=$.extend(!0,{},e[s]),f;if(e[e.length-1].m=="\u5468\u65E5")f=7+t*o;else{let m=e[e.length-1].m,g=m.substr(m.length-1,1);f=l.ChineseToNumber(g)+t*o}f<0&&(f=Math.ceil(Math.abs(f)/7)*7+f);let d=f%7;d==0?(u.m="\u5468\u65E5",u.v="\u5468\u65E5"):d==1?(u.m="\u5468\u4E00",u.v="\u5468\u4E00"):d==2?(u.m="\u5468\u4E8C",u.v="\u5468\u4E8C"):d==3?(u.m="\u5468\u4E09",u.v="\u5468\u4E09"):d==4?(u.m="\u5468\u56DB",u.v="\u5468\u56DB"):d==5?(u.m="\u5468\u4E94",u.v="\u5468\u4E94"):d==6&&(u.m="\u5468\u516D",u.v="\u5468\u516D"),a.push(u)}return a},FillChnWeek3:function(e,n,t){let l=this,a=[];for(let o=1;o<=n;o++){let s=(o-1)%e.length,u=$.extend(!0,{},e[s]),f;if(e[e.length-1].m=="\u661F\u671F\u65E5")f=7+t*o;else{let m=e[e.length-1].m,g=m.substr(m.length-1,1);f=l.ChineseToNumber(g)+t*o}f<0&&(f=Math.ceil(Math.abs(f)/7)*7+f);let d=f%7;d==0?(u.m="\u661F\u671F\u65E5",u.v="\u661F\u671F\u65E5"):d==1?(u.m="\u661F\u671F\u4E00",u.v="\u661F\u671F\u4E00"):d==2?(u.m="\u661F\u671F\u4E8C",u.v="\u661F\u671F\u4E8C"):d==3?(u.m="\u661F\u671F\u4E09",u.v="\u661F\u671F\u4E09"):d==4?(u.m="\u661F\u671F\u56DB",u.v="\u661F\u671F\u56DB"):d==5?(u.m="\u661F\u671F\u4E94",u.v="\u661F\u671F\u4E94"):d==6&&(u.m="\u661F\u671F\u516D",u.v="\u661F\u671F\u516D"),a.push(u)}return a},FillChnNumber:function(e,n,t){let l=this,a=[];for(let o=1;o<=n;o++){let s=(o-1)%e.length,u=$.extend(!0,{},e[s]),f=l.ChineseToNumber(e[e.length-1].m)+t*o,d;f<=0?d="\u96F6":d=l.NumberToChinese(f),u.v=d,u.m=d.toString(),a.push(u)}return a},isEqualDiff:function(e){let n=!0,t=e[1]-e[0];for(let l=1;l<e.length;l++)if(e[l]-e[l-1]!=t){n=!1;break}return n},isEqualRatio:function(e){let n=!0,t=e[1]/e[0];for(let l=1;l<e.length;l++)if(e[l]/e[l-1]!=t){n=!1;break}return n},getXArr:function(e){let n=[];for(let t=1;t<=e;t++)n.push(t);return n},forecast:function(e,n,t){function l(m){let g=0;for(let y=0;y<m.length;y++)g+=m[y];return g/m.length}let a=l(t),o=l(n),s=0,u=0;for(let m=0;m<t.length;m++)s+=(t[m]-a)*(n[m]-o),u+=(t[m]-a)*(t[m]-a);let f;u==0?f=1:f=s/u;let d=o-f*a;return Math.round((d+f*e)*1e5)/1e5},judgeDate:function(e){let n=!0,t=!0,l=!0,a=!0,o=!0,s=(0,Ae.default)(e[0].m).date(),u=(0,Ae.default)(e[0].m).month(),f=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"days"),d=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"months"),m=(0,Ae.default)(e[1].m).diff((0,Ae.default)(e[0].m),"years");for(let g=1;g<e.length;g++)(0,Ae.default)(e[g].m).date()!=s&&(n=!1),(0,Ae.default)(e[g].m).month()!=u&&(t=!1),(0,Ae.default)(e[g].m).diff((0,Ae.default)(e[g-1].m),"days")!=f&&(l=!1),(0,Ae.default)(e[g].m).diff((0,Ae.default)(e[g-1].m),"months")!=d&&(a=!1),(0,Ae.default)(e[g].m).diff((0,Ae.default)(e[g-1].m),"years")!=m&&(o=!1);return f==0&&(l=!1),d==0&&(a=!1),m==0&&(o=!1),[n,t,l,a,o]}},nl=Zy});var cn,Y,Vl=Ie(()=>{Nt();Lr();Zt();kn();Qt();il();Ur();Xs();Ol();Xe();bt();Yt();cn={freezenHorizontalHTML:'<div id="luckysheet-freezebar-horizontal" class="luckysheet-freezebar" tabindex="0"><div class="luckysheet-freezebar-handle luckysheet-freezebar-horizontal-handle" ><div class="luckysheet-freezebar-handle-bar luckysheet-freezebar-horizontal-handle-title" ></div><div class="luckysheet-freezebar-handle-bar luckysheet-freezebar-horizontal-handle-bar" ></div></div><div class="luckysheet-freezebar-drop luckysheet-freezebar-horizontal-drop" ><div class="luckysheet-freezebar-drop-bar luckysheet-freezebar-horizontal-drop-title" ></div><div class="luckysheet-freezebar-drop-bar luckysheet-freezebar-horizontal-drop-bar" > </div></div></div>',freezenVerticalHTML:'<div id="luckysheet-freezebar-vertical" class="luckysheet-freezebar" tabindex="0"><div class="luckysheet-freezebar-handle luckysheet-freezebar-vertical-handle" ><div class="luckysheet-freezebar-handle-bar luckysheet-freezebar-vertical-handle-title" ></div><div class="luckysheet-freezebar-handle-bar luckysheet-freezebar-vertical-handle-bar" ></div></div><div class="luckysheet-freezebar-drop luckysheet-freezebar-vertical-drop" ><div class="luckysheet-freezebar-drop-bar luckysheet-freezebar-vertical-drop-title" ></div><div class="luckysheet-freezebar-drop-bar luckysheet-freezebar-vertical-drop-bar" > </div></div></div>',initialHorizontal:!0,initialVertical:!0,horizontalmovestate:!1,horizontalmoveposition:null,verticalmovestate:!1,verticalmoveposition:null,windowHeight:null,windowWidth:null,freezenhorizontaldata:null,freezenverticaldata:null,freezenRealFirstRowColumn:!0,cutVolumn:function(e,n){if(n<=0)return e;let t=e.slice(0,n),l=t[t.length-1];return e.slice(n)},cancelFreezenVertical:function(e){let n=this,l=Q().freezen,a=` |
| | | <div class="luckysheet-toolbar-button-outer-box luckysheet-inline-block" |
| | | style="user-select: none;"> |
| | | <div class="luckysheet-toolbar-button-inner-box luckysheet-inline-block" |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | `;$("#luckysheet-freezen-btn-horizontal").html(l),$("#luckysheet-freezebar-vertical").show().find(".luckysheet-freezebar-vertical-handle").css({left:n}).end().find(".luckysheet-freezebar-vertical-drop").css({left:n})},saveFreezen:function(e,n,t,l){let a=h.luckysheetfile[Z(h.currentSheetIndex)];a.freezen==null&&(a.freezen={}),e!=null&&(a.freezen.horizontal==null&&(a.freezen.horizontal={}),a.freezen.horizontal.freezenhorizontaldata=e,a.freezen.horizontal.top=n),t!=null&&(a.freezen.vertical==null&&(a.freezen.vertical={}),a.freezen.vertical.freezenverticaldata=t,a.freezen.vertical.left=l),a.frozen!=null&&ne.saveParam("all",h.currentSheetIndex,a.frozen,{k:"frozen"})},initialFreezen:function(e){let n=this;n.frozenTofreezen();let t=h.luckysheetfile[Z(e)];t.freezen!=null&&t.freezen.horizontal!=null&&t.freezen.horizontal.freezenhorizontaldata!=null?n.createFreezenHorizontal(t.freezen.horizontal.freezenhorizontaldata,t.freezen.horizontal.top):n.cancelFreezenHorizontal(e),t.freezen!=null&&t.freezen.vertical!=null&&t.freezen.vertical.freezenverticaldata!=null?n.createFreezenVertical(t.freezen.vertical.freezenverticaldata,t.freezen.vertical.left):n.cancelFreezenVertical(e),n.createAssistCanvas()},changeFreezenIndex:function(e,n){let t=this;if(n=="v"&&t.freezenverticaldata!=null){let l=t.freezenverticaldata[1],a=st(h.visibledatacolumn,$("#luckysheet-cell-main").scrollLeft());e-a<l&&(e=e-a)}else if(n=="h"&&t.freezenhorizontaldata!=null){let l=t.freezenhorizontaldata[1],a=st(h.visibledatarow,$("#luckysheet-cell-main").scrollTop());e-a<l&&(e=e-a)}return e},scrollFreezen:function(){let e=this,n,t=h.luckysheet_select_save[0].row_focus;t==h.luckysheet_select_save[0].row[0]?n=h.luckysheet_select_save[0].row[1]:t==h.luckysheet_select_save[0].row[1]&&(n=h.luckysheet_select_save[0].row[0]);let l,a=h.luckysheet_select_save[0].column_focus;if(a==h.luckysheet_select_save[0].column[0]?l=h.luckysheet_select_save[0].column[1]:a==h.luckysheet_select_save[0].column[1]&&(l=h.luckysheet_select_save[0].column[0]),e.freezenverticaldata!=null){let o=e.freezenverticaldata[1],s=st(e.freezenverticaldata[3],$("#luckysheet-cell-main").scrollLeft()),u=e.freezenverticaldata[4];o+=s,l>=h.visibledatacolumn.length&&(l=h.visibledatacolumn.length-1),o>=h.visibledatacolumn.length&&(o=h.visibledatacolumn.length-1);let d=h.visibledatacolumn[l],f=h.visibledatacolumn[o];d<=f+u&&setTimeout(function(){$("#luckysheet-scrollbar-x").scrollLeft(0)},100)}if(e.freezenhorizontaldata!=null){let o=e.freezenhorizontaldata[1],s=st(e.freezenhorizontaldata[3],$("#luckysheet-cell-main").scrollTop()),u=e.freezenhorizontaldata[4];o+=s,n>=h.visibledatarow.length&&(n=h.visibledatarow.length-1),o>=h.visibledatarow.length&&(o=h.visibledatarow.length-1);let d=h.visibledatarow[n],f=h.visibledatarow[o];d<=f+u&&setTimeout(function(){$("#luckysheet-scrollbar-y").scrollTop(0)},100)}},cancelFreezenHorizontal:function(e){let n=this,t=` |
| | | `;$("#luckysheet-freezen-btn-horizontal").html(l),$("#luckysheet-freezebar-vertical").show().find(".luckysheet-freezebar-vertical-handle").css({left:n}).end().find(".luckysheet-freezebar-vertical-drop").css({left:n})},saveFreezen:function(e,n,t,l){let a=h.luckysheetfile[Z(h.currentSheetIndex)];a.freezen==null&&(a.freezen={}),e!=null&&(a.freezen.horizontal==null&&(a.freezen.horizontal={}),a.freezen.horizontal.freezenhorizontaldata=e,a.freezen.horizontal.top=n),t!=null&&(a.freezen.vertical==null&&(a.freezen.vertical={}),a.freezen.vertical.freezenverticaldata=t,a.freezen.vertical.left=l),a.frozen!=null&&ne.saveParam("all",h.currentSheetIndex,a.frozen,{k:"frozen"})},initialFreezen:function(e){let n=this;n.frozenTofreezen();let t=h.luckysheetfile[Z(e)];t.freezen!=null&&t.freezen.horizontal!=null&&t.freezen.horizontal.freezenhorizontaldata!=null?n.createFreezenHorizontal(t.freezen.horizontal.freezenhorizontaldata,t.freezen.horizontal.top):n.cancelFreezenHorizontal(e),t.freezen!=null&&t.freezen.vertical!=null&&t.freezen.vertical.freezenverticaldata!=null?n.createFreezenVertical(t.freezen.vertical.freezenverticaldata,t.freezen.vertical.left):n.cancelFreezenVertical(e),n.createAssistCanvas()},changeFreezenIndex:function(e,n){let t=this;if(n=="v"&&t.freezenverticaldata!=null){let l=t.freezenverticaldata[1],a=st(h.visibledatacolumn,$("#luckysheet-cell-main").scrollLeft());e-a<l&&(e=e-a)}else if(n=="h"&&t.freezenhorizontaldata!=null){let l=t.freezenhorizontaldata[1],a=st(h.visibledatarow,$("#luckysheet-cell-main").scrollTop());e-a<l&&(e=e-a)}return e},scrollFreezen:function(){let e=this,n,t=h.luckysheet_select_save[0].row_focus;t==h.luckysheet_select_save[0].row[0]?n=h.luckysheet_select_save[0].row[1]:t==h.luckysheet_select_save[0].row[1]&&(n=h.luckysheet_select_save[0].row[0]);let l,a=h.luckysheet_select_save[0].column_focus;if(a==h.luckysheet_select_save[0].column[0]?l=h.luckysheet_select_save[0].column[1]:a==h.luckysheet_select_save[0].column[1]&&(l=h.luckysheet_select_save[0].column[0]),e.freezenverticaldata!=null){let o=e.freezenverticaldata[1],s=st(e.freezenverticaldata[3],$("#luckysheet-cell-main").scrollLeft()),u=e.freezenverticaldata[4];o+=s,l>=h.visibledatacolumn.length&&(l=h.visibledatacolumn.length-1),o>=h.visibledatacolumn.length&&(o=h.visibledatacolumn.length-1);let f=h.visibledatacolumn[l],d=h.visibledatacolumn[o];f<=d+u&&setTimeout(function(){$("#luckysheet-scrollbar-x").scrollLeft(0)},100)}if(e.freezenhorizontaldata!=null){let o=e.freezenhorizontaldata[1],s=st(e.freezenhorizontaldata[3],$("#luckysheet-cell-main").scrollTop()),u=e.freezenhorizontaldata[4];o+=s,n>=h.visibledatarow.length&&(n=h.visibledatarow.length-1),o>=h.visibledatarow.length&&(o=h.visibledatarow.length-1);let f=h.visibledatarow[n],d=h.visibledatarow[o];f<=d+u&&setTimeout(function(){$("#luckysheet-scrollbar-y").scrollTop(0)},100)}},cancelFreezenHorizontal:function(e){let n=this,t=` |
| | | <div class="luckysheet-toolbar-button-outer-box luckysheet-inline-block" |
| | | style="user-select: none;"> |
| | | <div class="luckysheet-toolbar-button-inner-box luckysheet-inline-block" |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | `;$("#luckysheet-freezen-btn-horizontal").html(l),$("#luckysheet-freezebar-horizontal").show().find(".luckysheet-freezebar-horizontal-handle").css({top:n}).end().find(".luckysheet-freezebar-horizontal-drop").css({top:n})},createAssistCanvas:function(){let e=this;if(e.removeAssistCanvas(),e.freezenverticaldata!=null||e.freezenhorizontaldata!=null){let n,t,l,a,o,s,u=h.luckysheetTableContentHW[0],d=h.luckysheetTableContentHW[1];e.freezenverticaldata!=null&&e.freezenhorizontaldata!=null?(n=e.freezenhorizontaldata[0],t=e.freezenhorizontaldata[1],l=e.freezenhorizontaldata[2],a=e.freezenverticaldata[0],o=e.freezenverticaldata[1],s=e.freezenverticaldata[2],e.createCanvas("freezen_3",a-s,n-l+1,h.rowHeaderWidth-1,h.columnHeaderHeight-1),e.createCanvas("freezen_4",u-a+s,n-l+1,a-s+h.rowHeaderWidth-1,h.columnHeaderHeight-1),e.createCanvas("freezen_7",a-s,d-n+l-h.columnHeaderHeight,h.rowHeaderWidth-1,n-l+h.columnHeaderHeight-1)):e.freezenhorizontaldata!=null?(n=e.freezenhorizontaldata[0],t=e.freezenhorizontaldata[1],l=e.freezenhorizontaldata[2],e.createCanvas("freezen_h",u,n-l+1,h.rowHeaderWidth-1,h.columnHeaderHeight-1)):e.freezenverticaldata!=null&&(a=e.freezenverticaldata[0],o=e.freezenverticaldata[1],s=e.freezenverticaldata[2],e.createCanvas("freezen_v",a-s,d,h.rowHeaderWidth-1,h.columnHeaderHeight-1)),e.scrollAdapt()}},createCanvas:function(e,n,t,l,a){let o=$("<canvas/>").appendTo("#luckysheet-grid-window-1").attr({id:e,width:Math.ceil(n*h.devicePixelRatio),height:Math.ceil(t*h.devicePixelRatio)}).css({"user-select":"none",postion:"absolute",left:l,top:a,width:n,height:t,"z-index":10,"pointer-events":"none"})},removeAssistCanvas:function(){$("#luckysheet-grid-window-1 > canvas").not($("#luckysheetTableContent")).remove(),$("#luckysheet-cell-selected").css("z-index",15)},scrollAdapt:function(){let e=this;if(h.luckysheet_select_save!=null&&h.luckysheet_select_save.length>0&&e.scrollAdaptOfselect(),$("#luckysheet-cell-main .luckysheet-data-visualization-chart").length>0){let n=h.luckysheetfile[Z(h.currentSheetIndex)].chart;n!=null&&n.length>0&&e.scrollAdaptOfchart()}$("#luckysheet-postil-showBoxs .luckysheet-postil-show").length>0&&e.scrollAdaptOfpostil(),$("#luckysheet-dropCell-icon").length>0&&e.scrollAdaptOfdpicon(),$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").length>0&&e.scrollAdaptOffilteroptions()},scrollAdaptOfselect:function(){let e=this;$("#luckysheet-row-count-show").is(":visible")&&$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").is(":visible")&&$("#luckysheet-column-count-show").hide(),$("#luckysheet-rows-h-selected").empty(),$("#luckysheet-cols-h-selected").empty();let n=$("#luckysheet-cell-main").scrollTop(),t=$("#luckysheet-cell-main").scrollLeft();if(e.freezenhorizontaldata!=null&&e.freezenverticaldata!=null){let l=e.freezenhorizontaldata[0],a=e.freezenhorizontaldata[1],o=n-e.freezenhorizontaldata[2],s=e.freezenverticaldata[0],u=e.freezenverticaldata[1],d=t-e.freezenverticaldata[2];for(let f=0;f<h.luckysheet_select_save.length;f++){let m=$.extend(!0,{},h.luckysheet_select_save[f]),g=m.row[0],y=m.row[1],v=h.visibledatarow[y],b=g-1==-1?0:h.visibledatarow[g-1],k=b,w=v-b-1,x=!0;g>=a?k+w<l+o?x=!1:k<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(f).show().css({top:l+o,height:w-(l+o-k)}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(f).show().css({top:k,height:w}):y>=a?k+w<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(f).show().css({top:k+o,height:l-k}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(f).show().css({top:k+o,height:w-o}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(f).show().css("top",k+o);let C=m.column[0],S=m.column[1],_=h.visibledatacolumn[S],T=C-1==-1?0:h.visibledatacolumn[C-1],A=T,R=_-T-1;if(C>=u?A+R<s+d?x=!1:A<s+d?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(f).show().css({left:s+d,width:R-(s+d-A)}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(f).show().css({left:A,width:R}):S>=u?A+R<s+d?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(f).show().css({left:A+d,width:s-A}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(f).show().css({left:A+d,width:R-d}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(f).show().css("left",A+d),x||$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(f).hide(),f==h.luckysheet_select_save.length-1){let I=m.row_focus==null?g:m.row_focus,F=m.column_focus==null?C:m.column_focus,z=h.visibledatarow[I],M=I-1==-1?0:h.visibledatarow[I-1],E=h.visibledatacolumn[F],N=F-1==-1?0:h.visibledatacolumn[F-1],L=ke.mergeborer(h.flowdata,I,F);L&&(z=L.row[1],M=L.row[0],E=L.column[1],N=L.column[0]);let O=M,V=z-M-1,q=N,W=E-N-1,X=!0;O>=l?O+V<l+o?X=!1:O<l+o?$("#luckysheet-cell-selected-focus").show().css({top:l+o,height:V-(l+o-O)}):$("#luckysheet-cell-selected-focus").show().css({top:O,height:V}):O+V>=l?O+V<l+o?$("#luckysheet-cell-selected-focus").show().css({top:O+o,height:l-O}):$("#luckysheet-cell-selected-focus").show().css({top:O+o,height:V-o}):$("#luckysheet-cell-selected-focus").show().css("top",O+o),q>=s?q+W<s+d?X=!1:q<s+d?$("#luckysheet-cell-selected-focus").show().css({left:s+d,width:W-(s+d-q)}):$("#luckysheet-cell-selected-focus").show().css({left:q,width:W}):q+W>=s?q+W<s+d?$("#luckysheet-cell-selected-focus").show().css({left:q+d,width:s-q}):$("#luckysheet-cell-selected-focus").show().css({left:q+d,width:W-d}):$("#luckysheet-cell-selected-focus").show().css("left",q+d),X||$("#luckysheet-cell-selected-focus").hide()}}}else if(e.freezenhorizontaldata!=null){let l=e.freezenhorizontaldata[0],a=e.freezenhorizontaldata[1],o=n-e.freezenhorizontaldata[2];for(let s=0;s<h.luckysheet_select_save.length;s++){let u=$.extend(!0,{},h.luckysheet_select_save[s]),d=u.row[0],f=u.row[1],m=h.visibledatarow[f],g=d-1==-1?0:h.visibledatarow[d-1],y=g,v=m-g-1;if(d>=a?y+v<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).hide():y<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({top:l+o,height:v-(l+o-y)}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({top:y,height:v}):f>=a?y+v<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({top:y+o,height:l-y}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({top:y+o,height:v-o}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css("top",y+o),s==h.luckysheet_select_save.length-1){let b=u.row_focus==null?d:u.row_focus,k=u.column_focus==null?u.column[0]:u.column_focus,w=h.visibledatarow[b],x=b-1==-1?0:h.visibledatarow[b-1],C=ke.mergeborer(h.flowdata,b,k);C&&(w=C.row[1],x=C.row[0]);let S=x,_=w-x-1;S>=l?S+_<l+o?$("#luckysheet-cell-selected-focus").hide():S<l+o?$("#luckysheet-cell-selected-focus").show().css({top:l+o,height:_-(l+o-S)}):$("#luckysheet-cell-selected-focus").show().css({top:S,height:_}):S+_>=l?S+_<l+o?$("#luckysheet-cell-selected-focus").show().css({top:S+o,height:l-S}):$("#luckysheet-cell-selected-focus").show().css({top:S+o,height:_-o}):$("#luckysheet-cell-selected-focus").show().css("top",S+o)}}}else if(e.freezenverticaldata!=null){let l=e.freezenverticaldata[0],a=e.freezenverticaldata[1],o=t-e.freezenverticaldata[2];for(let s=0;s<h.luckysheet_select_save.length;s++){let u=$.extend(!0,{},h.luckysheet_select_save[s]),d=u.column[0],f=u.column[1],m=h.visibledatacolumn[f],g=d-1==-1?0:h.visibledatacolumn[d-1],y=g,v=m-g-1;if(d>=a?y+v<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).hide():y<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({left:l+o,width:v-(l+o-y)}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({left:y,width:v}):f>=a?y+v<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({left:y+o,width:l-y}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({left:y+o,width:v-o}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css("left",y+o),s==h.luckysheet_select_save.length-1){let b=u.row_focus==null?u.row[0]:u.row_focus,k=u.column_focus==null?d:u.column_focus,w=h.visibledatacolumn[k],x=k-1==-1?0:h.visibledatacolumn[k-1],C=ke.mergeborer(h.flowdata,b,k);C&&(w=C.column[1],x=C.column[0]);let S=x,_=w-x-1;S>=l?S+_<l+o?$("#luckysheet-cell-selected-focus").hide():S<l+o?$("#luckysheet-cell-selected-focus").show().css({left:l+o,width:_-(l+o-S)}):$("#luckysheet-cell-selected-focus").show().css({left:S,width:_}):S+_>=l?S+_<l+o?$("#luckysheet-cell-selected-focus").show().css({left:S+o,width:l-S}):$("#luckysheet-cell-selected-focus").show().css({left:S+o,width:_-o}):$("#luckysheet-cell-selected-focus").show().css("left",S+o)}}}else lt()},scrollAdaptOfchart:function(){let e=this,n=$("#luckysheet-cell-main").scrollTop(),t=$("#luckysheet-cell-main").scrollLeft();if(e.freezenhorizontaldata!=null&&e.freezenverticaldata!=null){let l=e.freezenhorizontaldata[0]-e.freezenhorizontaldata[2],a=e.freezenverticaldata[0]-e.freezenverticaldata[2];$("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(o,s){let u=$(s).position(),d=$(s).width(),f=$(s).height(),m=$(s).find("canvas").width(),g=$(s).find("canvas").height(),y=g-f,v=m-d;if(u.top-y<l){let b=l-(u.top-y);b>g+40+2?$(s).css("visibility","hidden"):($(s).css({top:l+n,height:g-b,visibility:"visible"}),$(s).find("canvas").css("top",-b))}else $(s).css({top:u.top-y+n,height:g,visibility:"visible"}),$(s).find("canvas").css("top",0);if(u.left-v<a){let b=a-(u.left-v);b>m+20+2?$(s).css("visibility","hidden"):($(s).css({left:a+t,width:m-b,visibility:"visible"}),$(s).find("canvas").css("left",-b))}else $(s).css({left:u.left-v+t,width:m,visibility:"visible"}),$(s).find("canvas").css("left",0)})}else if(e.freezenhorizontaldata!=null){let l=e.freezenhorizontaldata[0]-e.freezenhorizontaldata[2];$("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(a,o){let s=$(o).position(),u=$(o).height(),d=$(o).find("canvas").height(),f=d-u;if(s.top-f<l){let m=l-(s.top-f);m>d+40+2?$(o).css("visibility","hidden"):($(o).css({top:l+n,height:d-m,visibility:"visible"}),$(o).find("canvas").css("top",-m))}else $(o).css({top:s.top-f+n,height:d,visibility:"visible"}),$(o).find("canvas").css("top",0)})}else if(e.freezenverticaldata!=null){let l=e.freezenverticaldata[0]-e.freezenverticaldata[2];$("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(a,o){let s=$(o).position(),u=$(o).width(),d=$(o).find("canvas").width(),f=d-u;if(s.left-f<l){let m=l-(s.left-f);m>d+20+2?$(o).css("visibility","hidden"):($(o).css({left:l+t,width:d-m,visibility:"visible"}),$(o).find("canvas").css("left",-m))}else $(o).css({left:s.left-f+t,width:d,visibility:"visible"}),$(o).find("canvas").css("left",0)})}else $("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(l,a){let o=$(a).position(),s=$(a).width(),u=$(a).height(),d=$(a).find("canvas").width(),f=$(a).find("canvas").height(),m=f-u,g=d-s;$(a).css({top:o.top-m+n,height:f,left:o.left-g+t,width:d,visibility:"visible"}),$(a).find("canvas").css({top:0,left:0})})},scrollAdaptOfpostil:function(){let e=this,n=$("#luckysheet-cell-main").scrollTop(),t=$("#luckysheet-cell-main").scrollLeft();if(e.freezenhorizontaldata!=null&&e.freezenverticaldata!=null){let l=e.freezenhorizontaldata[0],a=e.freezenverticaldata[0],o=n-e.freezenhorizontaldata[2],s=t-e.freezenverticaldata[2];$("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(u,d){let f=$(d).attr("id"),m=f.split("luckysheet-postil-show_")[1].split("_")[0],g=f.split("luckysheet-postil-show_")[1].split("_")[1],y=h.flowdata[m][g].ps,v=h.visibledatarow[m],b=m-1==-1?0:h.visibledatarow[m-1],k=h.visibledatacolumn[g],w=g-1==-1?0:h.visibledatacolumn[g-1],x=ke.mergeborer(h.flowdata,m,g);x&&(v=x.row[1],b=x.row[0],k=x.column[1],w=x.column[0]);let C=k,S=b,_=y.left==null?C+18:y.left,T=y.top==null?S-18:y.top,A=y.width==null?He.defaultWidth:y.width,R=y.height==null?He.defaultHeight:y.height;T<0&&(T=2);let I=He.getArrowCanvasSize(_,T,C,S),F=!0,z=!0;m>=e.freezenhorizontaldata[1]?T+R<l?($(d).show().find(".luckysheet-postil-show-main").css("top",T+o),$(d).show().find(".arrowCanvas").css("top",I[1]+o)):T<l+o?T+R<=l+o?F=!1:($(d).show().find(".luckysheet-postil-show-main").css({top:l+o,height:R-(l+o-T)}),$(d).show().find(".formulaInputFocus").css("margin-top",-(l+o-T)),$(d).show().find(".arrowCanvas").hide(),z=!1):($(d).show().find(".luckysheet-postil-show-main").css({top:T,height:R}),$(d).show().find(".formulaInputFocus").css("margin-top",0),$(d).show().find(".arrowCanvas").css("top",I[1])):($(d).show().find(".luckysheet-postil-show-main").css("top",T+o),$(d).show().find(".arrowCanvas").css("top",I[1]+o)),g>=e.freezenverticaldata[1]?_+A<a?($(d).show().find(".luckysheet-postil-show-main").css("left",_+s),$(d).show().find(".arrowCanvas").css("left",I[0]+s)):_<a+s?_+A<=a+s?F=!1:($(d).show().find(".luckysheet-postil-show-main").css({left:a+s,width:A-(a+s-_)}),$(d).show().find(".formulaInputFocus").css("margin-left",-(a+s-_)),$(d).show().find(".arrowCanvas").hide(),z=!1):($(d).show().find(".luckysheet-postil-show-main").css({left:_,width:A}),$(d).show().find(".formulaInputFocus").css("margin-left",0),$(d).show().find(".arrowCanvas").css("left",I[0])):($(d).show().find(".luckysheet-postil-show-main").css("left",_+s),$(d).show().find(".arrowCanvas").css("left",I[0]+s)),F||$(d).hide(),F&&z&&$(d).show().find(".arrowCanvas").show()})}else if(e.freezenhorizontaldata!=null){let l=e.freezenhorizontaldata[0],a=n-e.freezenhorizontaldata[2];$("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(o,s){let u=$(s).attr("id"),d=u.split("luckysheet-postil-show_")[1].split("_")[0],f=u.split("luckysheet-postil-show_")[1].split("_")[1],m=h.flowdata[d][f].ps,g=h.visibledatarow[d],y=d-1==-1?0:h.visibledatarow[d-1],v=h.visibledatacolumn[f],b=f-1==-1?0:h.visibledatacolumn[f-1],k=ke.mergeborer(h.flowdata,d,f);k&&(g=k.row[1],y=k.row[0],v=k.column[1],b=k.column[0]);let w=v,x=y,C=m.left==null?w+18:m.left,S=m.top==null?x-18:m.top,_=m.width==null?He.defaultWidth:m.width,T=m.height==null?He.defaultHeight:m.height;S<0&&(S=2);let A=He.getArrowCanvasSize(C,S,w,x);d>=e.freezenhorizontaldata[1]?S+T<l?($(s).show().find(".luckysheet-postil-show-main").css("top",S+a),$(s).show().find(".arrowCanvas").css("top",A[1]+a)):S<l+a?S+T<=l+a?$(s).hide():($(s).show().find(".luckysheet-postil-show-main").css({top:l+a,height:T-(l+a-S)}),$(s).show().find(".formulaInputFocus").css("margin-top",-(l+a-S)),$(s).show().find(".arrowCanvas").hide()):He.buildPs(d,f,m):($(s).show().find(".luckysheet-postil-show-main").css("top",S+a),$(s).show().find(".arrowCanvas").css("top",A[1]+a))})}else if(e.freezenverticaldata!=null){let l=e.freezenverticaldata[0],a=t-e.freezenverticaldata[2];$("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(o,s){let u=$(s).attr("id"),d=u.split("luckysheet-postil-show_")[1].split("_")[0],f=u.split("luckysheet-postil-show_")[1].split("_")[1],m=h.flowdata[d][f].ps,g=h.visibledatarow[d],y=d-1==-1?0:h.visibledatarow[d-1],v=h.visibledatacolumn[f],b=f-1==-1?0:h.visibledatacolumn[f-1],k=ke.mergeborer(h.flowdata,d,f);k&&(g=k.row[1],y=k.row[0],v=k.column[1],b=k.column[0]);let w=v,x=y,C=m.left==null?w+18:m.left,S=m.top==null?x-18:m.top,_=m.width==null?He.defaultWidth:m.width,T=m.height==null?He.defaultHeight:m.height;S<0&&(S=2);let A=He.getArrowCanvasSize(C,S,w,x);f>=e.freezenverticaldata[1]?C+_<l?($(s).show().find(".luckysheet-postil-show-main").css("left",C+a),$(s).show().find(".arrowCanvas").css("left",A[0]+a)):C<l+a?C+_<=l+a?$(s).hide():($(s).show().find(".luckysheet-postil-show-main").css({left:l+a,width:_-(l+a-C)}),$(s).show().find(".formulaInputFocus").css("margin-left",-(l+a-C)),$(s).show().find(".arrowCanvas").hide()):He.buildPs(d,f,m):($(s).show().find(".luckysheet-postil-show-main").css("left",C+a),$(s).show().find(".arrowCanvas").css("left",A[0]+a))})}else $("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(l,a){let o=$(a).attr("id"),s=o.split("luckysheet-postil-show_")[1].split("_")[0],u=o.split("luckysheet-postil-show_")[1].split("_")[1],d=h.flowdata[s][u].ps;He.buildPs(s,u,d)})},scrollAdaptOfdpicon:function(){let e=this,n=nl.copyRange.row[1],t=nl.copyRange.column[1],l=nl.applyRange.row[1],a=nl.applyRange.column[1],o,s;if(l>=n&&a>=t?(o=l,s=a):(o=n,s=t),e.freezenhorizontaldata!=null&&e.freezenverticaldata!=null){let u=e.freezenhorizontaldata[1],d=st(e.freezenhorizontaldata[3],$("#luckysheet-cell-main").scrollTop()-e.freezenhorizontaldata[2]),f=e.freezenverticaldata[1],m=st(e.freezenverticaldata[3],$("#luckysheet-cell-main").scrollLeft()-e.freezenverticaldata[2]);if(o>=u&&s>=f)o<u+d-1||s<f+m-1?$("#luckysheet-dropCell-icon").hide():$("#luckysheet-dropCell-icon").show();else if(o>=u)if(o<u+d-1)$("#luckysheet-dropCell-icon").hide();else{let g=At(s+m)[1];$("#luckysheet-dropCell-icon").show().css("left",g)}else if(s>=f)if(s<f+m-1)$("#luckysheet-dropCell-icon").hide();else{let g=tl(o+d)[1];$("#luckysheet-dropCell-icon").show().css("top",g)}else{let g=tl(o+d)[1],y=At(s+m)[1];$("#luckysheet-dropCell-icon").show().css({left:y,top:g})}}else if(e.freezenhorizontaldata!=null){let u=e.freezenhorizontaldata[1],d=st(e.freezenhorizontaldata[3],$("#luckysheet-cell-main").scrollTop()-e.freezenhorizontaldata[2]);if(o>=u)o<u+d-1?$("#luckysheet-dropCell-icon").hide():$("#luckysheet-dropCell-icon").show();else{let f=tl(o+d)[1];$("#luckysheet-dropCell-icon").show().css("top",f)}}else if(e.freezenverticaldata!=null){let u=e.freezenverticaldata[1],d=st(e.freezenverticaldata[3],$("#luckysheet-cell-main").scrollLeft()-e.freezenverticaldata[2]);if(s>=u)s<u+d-1?$("#luckysheet-dropCell-icon").hide():$("#luckysheet-dropCell-icon").show();else{let f=At(s+d)[1];$("#luckysheet-dropCell-icon").show().css("left",f)}}else{let u=tl(o)[1],d=At(s)[1];$("#luckysheet-dropCell-icon").show().css({left:d,top:u})}},scrollAdaptOffilteroptions:function(){let e=this;if(e.freezenhorizontaldata!=null&&e.freezenverticaldata!=null){let n=e.freezenhorizontaldata[1],t=e.freezenhorizontaldata[0]+$("#luckysheet-cell-main").scrollTop(),l=e.freezenverticaldata[1],a=st(e.freezenverticaldata[3],$("#luckysheet-cell-main").scrollLeft()-e.freezenverticaldata[2]);$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").each(function(o,s){let u=$(s).data("str"),d=u-1==-1?0:h.visibledatarow[u-1],f=$(s).data("cindex");if(u>=n&&f>=l)d<t||f<l+a?$(s).hide():$(s).show();else if(u>=n)if(d<t)$(s).hide();else{let m=h.visibledatacolumn[f+a]-20;$(s).show().css("left",m)}else if(f>=l)f<l+a?$(s).hide():$(s).show().css("top",d+$("#luckysheet-cell-main").scrollTop());else{let m=h.visibledatacolumn[f+a]-20;$(s).show().css({left:m,top:d+$("#luckysheet-cell-main").scrollTop()})}})}else if(e.freezenhorizontaldata!=null){let n=e.freezenhorizontaldata[1],t=e.freezenhorizontaldata[0]+$("#luckysheet-cell-main").scrollTop();$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").each(function(l,a){let o=$(a).data("str"),s=o-1==-1?0:h.visibledatarow[o-1];o>=n?s<t?$(a).hide():$(a).show():$(a).show().css("top",s+$("#luckysheet-cell-main").scrollTop())})}else if(e.freezenverticaldata!=null){let n=e.freezenverticaldata[1],t=st(e.freezenverticaldata[3],$("#luckysheet-cell-main").scrollLeft()-e.freezenverticaldata[2]);$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").each(function(l,a){let o=$(a).data("cindex");if(o>=n)o<n+t?$(a).hide():$(a).show();else{let s=h.visibledatacolumn[o+t]-20;$(a).show().css("left",s)}})}else $("#luckysheet-filter-options-sheet"+h.currentSheetIndex).empty(),Dl(h.luckysheetfile[Z(h.currentSheetIndex)].filter_select)},saveFrozen:function(e,n,t={}){n==null&&(n=Z(h.currentSheetIndex));let l=h.luckysheet_select_save[h.luckysheet_select_save.length-1],a=l.row_focus==null?l.row[0]:l.row_focus,o=l.column_focus==null?l.column[0]:l.column_focus,s={row_focus:t.row_focus||a,column_focus:t.column_focus||o},u={freezenRow:{type:"row"},freezenColumn:{type:"column"},freezenRC:{type:"both"},freezenRowRange:{type:"rangeRow",range:s},freezenColumnRange:{type:"rangeColumn",range:s},freezenRCRange:{type:"rangeBoth",range:s},freezenCancel:{type:"cancel"}};h.luckysheetfile[n].frozen=u[e]},frozenTofreezen:function(){let e=h.luckysheetfile[Z(h.currentSheetIndex)],n=e.frozen;if(n==null)return;let t=null;if(n.type==="row"){let l=0,a=st(h.visibledatarow,l);a==-1&&(a=0);let o=h.visibledatarow[a]-2-l+h.columnHeaderHeight;t={horizontal:{freezenhorizontaldata:[h.visibledatarow[a],a+1,l,cn.cutVolumn(h.visibledatarow,a+1),o],top:o}}}else if(n.type==="column"){let l=0,a=st(h.visibledatacolumn,l);a==-1&&(a=0);let o=h.visibledatacolumn[a]-2-l+h.rowHeaderWidth;t={vertical:{freezenverticaldata:[h.visibledatacolumn[a],a+1,l,cn.cutVolumn(h.visibledatacolumn,a+1),o],left:o}}}else if(n.type==="both"){let l=0,a=st(h.visibledatarow,l);a==-1&&(a=0);let o=h.visibledatarow[a]-2-l+h.columnHeaderHeight,s=[h.visibledatarow[a],a+1,l,cn.cutVolumn(h.visibledatarow,a+1),o],u=0,d=st(h.visibledatacolumn,u);d==-1&&(d=0);let f=h.visibledatacolumn[d]-2-u+h.rowHeaderWidth,m=[h.visibledatacolumn[d],d+1,u,cn.cutVolumn(h.visibledatacolumn,d+1),f];t={horizontal:{freezenhorizontaldata:s,top:o},vertical:{freezenverticaldata:m,left:f}}}else if(n.type==="rangeRow"){let l=0,a=st(h.visibledatarow,l),o=n.range.row_focus;o>a&&(a=o),a==-1&&(a=0);let s=h.visibledatarow[a]-2-l+h.columnHeaderHeight;t={horizontal:{freezenhorizontaldata:[h.visibledatarow[a],a+1,l,cn.cutVolumn(h.visibledatarow,a+1),s],top:s}}}else if(n.type==="rangeColumn"){let l=0,a=st(h.visibledatacolumn,l),o=n.range.column_focus;o>a&&(a=o),a==-1&&(a=0);let s=h.visibledatacolumn[a]-2-l+h.rowHeaderWidth;t={vertical:{freezenverticaldata:[h.visibledatacolumn[a],a+1,l,cn.cutVolumn(h.visibledatacolumn,a+1),s],left:s}}}else if(n.type==="rangeBoth"){let l=0,a=st(h.visibledatarow,l),o=n.range.row_focus;o>a&&(a=o),a==-1&&(a=0);let s=h.visibledatarow[a]-2-l+h.columnHeaderHeight,u=[h.visibledatarow[a],a+1,l,cn.cutVolumn(h.visibledatarow,a+1),s],d=0,f=st(h.visibledatacolumn,d),m=n.range.column_focus;m>f&&(f=m),f==-1&&(f=0);let g=h.visibledatacolumn[f]-2-d+h.rowHeaderWidth,y=[h.visibledatacolumn[f],f+1,d,cn.cutVolumn(h.visibledatacolumn,f+1),g];t={horizontal:{freezenhorizontaldata:u,top:s},vertical:{freezenverticaldata:y,left:g}}}else n.type==="cancel"&&(t={horizontal:null,vertical:null});e.freezen=t}},Y=cn});function zt(e=!0){fe.showinfobar?($("#luckysheet_info_detail").show(),h.infobarHeight=document.querySelector("#luckysheet_info_detail").offsetHeight):(h.infobarHeight=0,$("#luckysheet_info_detail").hide()),!!h.toobarObject&&!!h.toobarObject.toobarElements&&h.toobarObject.toobarElements.length===0?($("#"+h.container).find(".luckysheet-wa-editor").hide(),h.toolbarHeight=0):($("#"+h.container).find(".luckysheet-wa-editor").show(),h.toolbarHeight=document.querySelector("#"+h.container+" .luckysheet-wa-editor").offsetHeight),Jy(),Qy();let n=document.querySelector("#"+h.container+" .luckysheet-wa-calculate");fe.sheetFormulaBar?(n.style.display="block",h.calculatebarHeight=n.offsetHeight):(n.style.display="none",h.calculatebarHeight=0),$("#"+h.container).find(".luckysheet-grid-container").css("top",h.toolbarHeight+h.infobarHeight+h.calculatebarHeight),Un=$("#"+h.container).width(),fe.showConfigWindowResize&&($("#luckysheet-modal-dialog-slider-pivot").is(":visible")?Un-=$("#luckysheet-modal-dialog-slider-pivot").outerWidth():$(".chartSetting").is(":visible")?Un-=$(".chartSetting").outerWidth():$("#luckysheet-modal-dialog-slider-alternateformat").is(":visible")&&(Un-=$("#luckysheet-modal-dialog-slider-alternateformat").outerWidth()),$("#luckysheet-modal-dialog-slider-protection").is(":visible")&&(Un-=$("#luckysheet-modal-dialog-slider-protection").outerWidth()));let l=Q().toolbar,a=!1,o=0,s=`<div class="luckysheet-toolbar-button luckysheet-inline-block" data-tips="${l.toolMoreTip}" id="luckysheet-icon-morebtn" role="button" style="user-select: none;"> |
| | | `;$("#luckysheet-freezen-btn-horizontal").html(l),$("#luckysheet-freezebar-horizontal").show().find(".luckysheet-freezebar-horizontal-handle").css({top:n}).end().find(".luckysheet-freezebar-horizontal-drop").css({top:n})},createAssistCanvas:function(){let e=this;if(e.removeAssistCanvas(),e.freezenverticaldata!=null||e.freezenhorizontaldata!=null){let n,t,l,a,o,s,u=h.luckysheetTableContentHW[0],f=h.luckysheetTableContentHW[1];e.freezenverticaldata!=null&&e.freezenhorizontaldata!=null?(n=e.freezenhorizontaldata[0],t=e.freezenhorizontaldata[1],l=e.freezenhorizontaldata[2],a=e.freezenverticaldata[0],o=e.freezenverticaldata[1],s=e.freezenverticaldata[2],e.createCanvas("freezen_3",a-s,n-l+1,h.rowHeaderWidth-1,h.columnHeaderHeight-1),e.createCanvas("freezen_4",u-a+s,n-l+1,a-s+h.rowHeaderWidth-1,h.columnHeaderHeight-1),e.createCanvas("freezen_7",a-s,f-n+l-h.columnHeaderHeight,h.rowHeaderWidth-1,n-l+h.columnHeaderHeight-1)):e.freezenhorizontaldata!=null?(n=e.freezenhorizontaldata[0],t=e.freezenhorizontaldata[1],l=e.freezenhorizontaldata[2],e.createCanvas("freezen_h",u,n-l+1,h.rowHeaderWidth-1,h.columnHeaderHeight-1)):e.freezenverticaldata!=null&&(a=e.freezenverticaldata[0],o=e.freezenverticaldata[1],s=e.freezenverticaldata[2],e.createCanvas("freezen_v",a-s,f,h.rowHeaderWidth-1,h.columnHeaderHeight-1)),e.scrollAdapt()}},createCanvas:function(e,n,t,l,a){let o=$("<canvas/>").appendTo("#luckysheet-grid-window-1").attr({id:e,width:Math.ceil(n*h.devicePixelRatio),height:Math.ceil(t*h.devicePixelRatio)}).css({"user-select":"none",postion:"absolute",left:l,top:a,width:n,height:t,"z-index":10,"pointer-events":"none"})},removeAssistCanvas:function(){$("#luckysheet-grid-window-1 > canvas").not($("#luckysheetTableContent")).remove(),$("#luckysheet-cell-selected").css("z-index",15)},scrollAdapt:function(){let e=this;if(h.luckysheet_select_save!=null&&h.luckysheet_select_save.length>0&&e.scrollAdaptOfselect(),$("#luckysheet-cell-main .luckysheet-data-visualization-chart").length>0){let n=h.luckysheetfile[Z(h.currentSheetIndex)].chart;n!=null&&n.length>0&&e.scrollAdaptOfchart()}$("#luckysheet-postil-showBoxs .luckysheet-postil-show").length>0&&e.scrollAdaptOfpostil(),$("#luckysheet-dropCell-icon").length>0&&e.scrollAdaptOfdpicon(),$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").length>0&&e.scrollAdaptOffilteroptions()},scrollAdaptOfselect:function(){let e=this;$("#luckysheet-row-count-show").is(":visible")&&$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").is(":visible")&&$("#luckysheet-column-count-show").hide(),$("#luckysheet-rows-h-selected").empty(),$("#luckysheet-cols-h-selected").empty();let n=$("#luckysheet-cell-main").scrollTop(),t=$("#luckysheet-cell-main").scrollLeft();if(e.freezenhorizontaldata!=null&&e.freezenverticaldata!=null){let l=e.freezenhorizontaldata[0],a=e.freezenhorizontaldata[1],o=n-e.freezenhorizontaldata[2],s=e.freezenverticaldata[0],u=e.freezenverticaldata[1],f=t-e.freezenverticaldata[2];for(let d=0;d<h.luckysheet_select_save.length;d++){let m=$.extend(!0,{},h.luckysheet_select_save[d]),g=m.row[0],y=m.row[1],v=h.visibledatarow[y],b=g-1==-1?0:h.visibledatarow[g-1],k=b,w=v-b-1,x=!0;g>=a?k+w<l+o?x=!1:k<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(d).show().css({top:l+o,height:w-(l+o-k)}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(d).show().css({top:k,height:w}):y>=a?k+w<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(d).show().css({top:k+o,height:l-k}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(d).show().css({top:k+o,height:w-o}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(d).show().css("top",k+o);let C=m.column[0],S=m.column[1],_=h.visibledatacolumn[S],T=C-1==-1?0:h.visibledatacolumn[C-1],A=T,R=_-T-1;if(C>=u?A+R<s+f?x=!1:A<s+f?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(d).show().css({left:s+f,width:R-(s+f-A)}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(d).show().css({left:A,width:R}):S>=u?A+R<s+f?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(d).show().css({left:A+f,width:s-A}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(d).show().css({left:A+f,width:R-f}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(d).show().css("left",A+f),x||$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(d).hide(),d==h.luckysheet_select_save.length-1){let I=m.row_focus==null?g:m.row_focus,F=m.column_focus==null?C:m.column_focus,z=h.visibledatarow[I],M=I-1==-1?0:h.visibledatarow[I-1],E=h.visibledatacolumn[F],N=F-1==-1?0:h.visibledatacolumn[F-1],L=ke.mergeborer(h.flowdata,I,F);L&&(z=L.row[1],M=L.row[0],E=L.column[1],N=L.column[0]);let O=M,V=z-M-1,q=N,W=E-N-1,X=!0;O>=l?O+V<l+o?X=!1:O<l+o?$("#luckysheet-cell-selected-focus").show().css({top:l+o,height:V-(l+o-O)}):$("#luckysheet-cell-selected-focus").show().css({top:O,height:V}):O+V>=l?O+V<l+o?$("#luckysheet-cell-selected-focus").show().css({top:O+o,height:l-O}):$("#luckysheet-cell-selected-focus").show().css({top:O+o,height:V-o}):$("#luckysheet-cell-selected-focus").show().css("top",O+o),q>=s?q+W<s+f?X=!1:q<s+f?$("#luckysheet-cell-selected-focus").show().css({left:s+f,width:W-(s+f-q)}):$("#luckysheet-cell-selected-focus").show().css({left:q,width:W}):q+W>=s?q+W<s+f?$("#luckysheet-cell-selected-focus").show().css({left:q+f,width:s-q}):$("#luckysheet-cell-selected-focus").show().css({left:q+f,width:W-f}):$("#luckysheet-cell-selected-focus").show().css("left",q+f),X||$("#luckysheet-cell-selected-focus").hide()}}}else if(e.freezenhorizontaldata!=null){let l=e.freezenhorizontaldata[0],a=e.freezenhorizontaldata[1],o=n-e.freezenhorizontaldata[2];for(let s=0;s<h.luckysheet_select_save.length;s++){let u=$.extend(!0,{},h.luckysheet_select_save[s]),f=u.row[0],d=u.row[1],m=h.visibledatarow[d],g=f-1==-1?0:h.visibledatarow[f-1],y=g,v=m-g-1;if(f>=a?y+v<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).hide():y<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({top:l+o,height:v-(l+o-y)}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({top:y,height:v}):d>=a?y+v<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({top:y+o,height:l-y}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({top:y+o,height:v-o}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css("top",y+o),s==h.luckysheet_select_save.length-1){let b=u.row_focus==null?f:u.row_focus,k=u.column_focus==null?u.column[0]:u.column_focus,w=h.visibledatarow[b],x=b-1==-1?0:h.visibledatarow[b-1],C=ke.mergeborer(h.flowdata,b,k);C&&(w=C.row[1],x=C.row[0]);let S=x,_=w-x-1;S>=l?S+_<l+o?$("#luckysheet-cell-selected-focus").hide():S<l+o?$("#luckysheet-cell-selected-focus").show().css({top:l+o,height:_-(l+o-S)}):$("#luckysheet-cell-selected-focus").show().css({top:S,height:_}):S+_>=l?S+_<l+o?$("#luckysheet-cell-selected-focus").show().css({top:S+o,height:l-S}):$("#luckysheet-cell-selected-focus").show().css({top:S+o,height:_-o}):$("#luckysheet-cell-selected-focus").show().css("top",S+o)}}}else if(e.freezenverticaldata!=null){let l=e.freezenverticaldata[0],a=e.freezenverticaldata[1],o=t-e.freezenverticaldata[2];for(let s=0;s<h.luckysheet_select_save.length;s++){let u=$.extend(!0,{},h.luckysheet_select_save[s]),f=u.column[0],d=u.column[1],m=h.visibledatacolumn[d],g=f-1==-1?0:h.visibledatacolumn[f-1],y=g,v=m-g-1;if(f>=a?y+v<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).hide():y<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({left:l+o,width:v-(l+o-y)}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({left:y,width:v}):d>=a?y+v<l+o?$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({left:y+o,width:l-y}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({left:y+o,width:v-o}):$("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css("left",y+o),s==h.luckysheet_select_save.length-1){let b=u.row_focus==null?u.row[0]:u.row_focus,k=u.column_focus==null?f:u.column_focus,w=h.visibledatacolumn[k],x=k-1==-1?0:h.visibledatacolumn[k-1],C=ke.mergeborer(h.flowdata,b,k);C&&(w=C.column[1],x=C.column[0]);let S=x,_=w-x-1;S>=l?S+_<l+o?$("#luckysheet-cell-selected-focus").hide():S<l+o?$("#luckysheet-cell-selected-focus").show().css({left:l+o,width:_-(l+o-S)}):$("#luckysheet-cell-selected-focus").show().css({left:S,width:_}):S+_>=l?S+_<l+o?$("#luckysheet-cell-selected-focus").show().css({left:S+o,width:l-S}):$("#luckysheet-cell-selected-focus").show().css({left:S+o,width:_-o}):$("#luckysheet-cell-selected-focus").show().css("left",S+o)}}}else lt()},scrollAdaptOfchart:function(){let e=this,n=$("#luckysheet-cell-main").scrollTop(),t=$("#luckysheet-cell-main").scrollLeft();if(e.freezenhorizontaldata!=null&&e.freezenverticaldata!=null){let l=e.freezenhorizontaldata[0]-e.freezenhorizontaldata[2],a=e.freezenverticaldata[0]-e.freezenverticaldata[2];$("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(o,s){let u=$(s).position(),f=$(s).width(),d=$(s).height(),m=$(s).find("canvas").width(),g=$(s).find("canvas").height(),y=g-d,v=m-f;if(u.top-y<l){let b=l-(u.top-y);b>g+40+2?$(s).css("visibility","hidden"):($(s).css({top:l+n,height:g-b,visibility:"visible"}),$(s).find("canvas").css("top",-b))}else $(s).css({top:u.top-y+n,height:g,visibility:"visible"}),$(s).find("canvas").css("top",0);if(u.left-v<a){let b=a-(u.left-v);b>m+20+2?$(s).css("visibility","hidden"):($(s).css({left:a+t,width:m-b,visibility:"visible"}),$(s).find("canvas").css("left",-b))}else $(s).css({left:u.left-v+t,width:m,visibility:"visible"}),$(s).find("canvas").css("left",0)})}else if(e.freezenhorizontaldata!=null){let l=e.freezenhorizontaldata[0]-e.freezenhorizontaldata[2];$("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(a,o){let s=$(o).position(),u=$(o).height(),f=$(o).find("canvas").height(),d=f-u;if(s.top-d<l){let m=l-(s.top-d);m>f+40+2?$(o).css("visibility","hidden"):($(o).css({top:l+n,height:f-m,visibility:"visible"}),$(o).find("canvas").css("top",-m))}else $(o).css({top:s.top-d+n,height:f,visibility:"visible"}),$(o).find("canvas").css("top",0)})}else if(e.freezenverticaldata!=null){let l=e.freezenverticaldata[0]-e.freezenverticaldata[2];$("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(a,o){let s=$(o).position(),u=$(o).width(),f=$(o).find("canvas").width(),d=f-u;if(s.left-d<l){let m=l-(s.left-d);m>f+20+2?$(o).css("visibility","hidden"):($(o).css({left:l+t,width:f-m,visibility:"visible"}),$(o).find("canvas").css("left",-m))}else $(o).css({left:s.left-d+t,width:f,visibility:"visible"}),$(o).find("canvas").css("left",0)})}else $("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(l,a){let o=$(a).position(),s=$(a).width(),u=$(a).height(),f=$(a).find("canvas").width(),d=$(a).find("canvas").height(),m=d-u,g=f-s;$(a).css({top:o.top-m+n,height:d,left:o.left-g+t,width:f,visibility:"visible"}),$(a).find("canvas").css({top:0,left:0})})},scrollAdaptOfpostil:function(){let e=this,n=$("#luckysheet-cell-main").scrollTop(),t=$("#luckysheet-cell-main").scrollLeft();if(e.freezenhorizontaldata!=null&&e.freezenverticaldata!=null){let l=e.freezenhorizontaldata[0],a=e.freezenverticaldata[0],o=n-e.freezenhorizontaldata[2],s=t-e.freezenverticaldata[2];$("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(u,f){let d=$(f).attr("id"),m=d.split("luckysheet-postil-show_")[1].split("_")[0],g=d.split("luckysheet-postil-show_")[1].split("_")[1],y=h.flowdata[m][g].ps,v=h.visibledatarow[m],b=m-1==-1?0:h.visibledatarow[m-1],k=h.visibledatacolumn[g],w=g-1==-1?0:h.visibledatacolumn[g-1],x=ke.mergeborer(h.flowdata,m,g);x&&(v=x.row[1],b=x.row[0],k=x.column[1],w=x.column[0]);let C=k,S=b,_=y.left==null?C+18:y.left,T=y.top==null?S-18:y.top,A=y.width==null?He.defaultWidth:y.width,R=y.height==null?He.defaultHeight:y.height;T<0&&(T=2);let I=He.getArrowCanvasSize(_,T,C,S),F=!0,z=!0;m>=e.freezenhorizontaldata[1]?T+R<l?($(f).show().find(".luckysheet-postil-show-main").css("top",T+o),$(f).show().find(".arrowCanvas").css("top",I[1]+o)):T<l+o?T+R<=l+o?F=!1:($(f).show().find(".luckysheet-postil-show-main").css({top:l+o,height:R-(l+o-T)}),$(f).show().find(".formulaInputFocus").css("margin-top",-(l+o-T)),$(f).show().find(".arrowCanvas").hide(),z=!1):($(f).show().find(".luckysheet-postil-show-main").css({top:T,height:R}),$(f).show().find(".formulaInputFocus").css("margin-top",0),$(f).show().find(".arrowCanvas").css("top",I[1])):($(f).show().find(".luckysheet-postil-show-main").css("top",T+o),$(f).show().find(".arrowCanvas").css("top",I[1]+o)),g>=e.freezenverticaldata[1]?_+A<a?($(f).show().find(".luckysheet-postil-show-main").css("left",_+s),$(f).show().find(".arrowCanvas").css("left",I[0]+s)):_<a+s?_+A<=a+s?F=!1:($(f).show().find(".luckysheet-postil-show-main").css({left:a+s,width:A-(a+s-_)}),$(f).show().find(".formulaInputFocus").css("margin-left",-(a+s-_)),$(f).show().find(".arrowCanvas").hide(),z=!1):($(f).show().find(".luckysheet-postil-show-main").css({left:_,width:A}),$(f).show().find(".formulaInputFocus").css("margin-left",0),$(f).show().find(".arrowCanvas").css("left",I[0])):($(f).show().find(".luckysheet-postil-show-main").css("left",_+s),$(f).show().find(".arrowCanvas").css("left",I[0]+s)),F||$(f).hide(),F&&z&&$(f).show().find(".arrowCanvas").show()})}else if(e.freezenhorizontaldata!=null){let l=e.freezenhorizontaldata[0],a=n-e.freezenhorizontaldata[2];$("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(o,s){let u=$(s).attr("id"),f=u.split("luckysheet-postil-show_")[1].split("_")[0],d=u.split("luckysheet-postil-show_")[1].split("_")[1],m=h.flowdata[f][d].ps,g=h.visibledatarow[f],y=f-1==-1?0:h.visibledatarow[f-1],v=h.visibledatacolumn[d],b=d-1==-1?0:h.visibledatacolumn[d-1],k=ke.mergeborer(h.flowdata,f,d);k&&(g=k.row[1],y=k.row[0],v=k.column[1],b=k.column[0]);let w=v,x=y,C=m.left==null?w+18:m.left,S=m.top==null?x-18:m.top,_=m.width==null?He.defaultWidth:m.width,T=m.height==null?He.defaultHeight:m.height;S<0&&(S=2);let A=He.getArrowCanvasSize(C,S,w,x);f>=e.freezenhorizontaldata[1]?S+T<l?($(s).show().find(".luckysheet-postil-show-main").css("top",S+a),$(s).show().find(".arrowCanvas").css("top",A[1]+a)):S<l+a?S+T<=l+a?$(s).hide():($(s).show().find(".luckysheet-postil-show-main").css({top:l+a,height:T-(l+a-S)}),$(s).show().find(".formulaInputFocus").css("margin-top",-(l+a-S)),$(s).show().find(".arrowCanvas").hide()):He.buildPs(f,d,m):($(s).show().find(".luckysheet-postil-show-main").css("top",S+a),$(s).show().find(".arrowCanvas").css("top",A[1]+a))})}else if(e.freezenverticaldata!=null){let l=e.freezenverticaldata[0],a=t-e.freezenverticaldata[2];$("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(o,s){let u=$(s).attr("id"),f=u.split("luckysheet-postil-show_")[1].split("_")[0],d=u.split("luckysheet-postil-show_")[1].split("_")[1],m=h.flowdata[f][d].ps,g=h.visibledatarow[f],y=f-1==-1?0:h.visibledatarow[f-1],v=h.visibledatacolumn[d],b=d-1==-1?0:h.visibledatacolumn[d-1],k=ke.mergeborer(h.flowdata,f,d);k&&(g=k.row[1],y=k.row[0],v=k.column[1],b=k.column[0]);let w=v,x=y,C=m.left==null?w+18:m.left,S=m.top==null?x-18:m.top,_=m.width==null?He.defaultWidth:m.width,T=m.height==null?He.defaultHeight:m.height;S<0&&(S=2);let A=He.getArrowCanvasSize(C,S,w,x);d>=e.freezenverticaldata[1]?C+_<l?($(s).show().find(".luckysheet-postil-show-main").css("left",C+a),$(s).show().find(".arrowCanvas").css("left",A[0]+a)):C<l+a?C+_<=l+a?$(s).hide():($(s).show().find(".luckysheet-postil-show-main").css({left:l+a,width:_-(l+a-C)}),$(s).show().find(".formulaInputFocus").css("margin-left",-(l+a-C)),$(s).show().find(".arrowCanvas").hide()):He.buildPs(f,d,m):($(s).show().find(".luckysheet-postil-show-main").css("left",C+a),$(s).show().find(".arrowCanvas").css("left",A[0]+a))})}else $("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(l,a){let o=$(a).attr("id"),s=o.split("luckysheet-postil-show_")[1].split("_")[0],u=o.split("luckysheet-postil-show_")[1].split("_")[1],f=h.flowdata[s][u].ps;He.buildPs(s,u,f)})},scrollAdaptOfdpicon:function(){let e=this,n=nl.copyRange.row[1],t=nl.copyRange.column[1],l=nl.applyRange.row[1],a=nl.applyRange.column[1],o,s;if(l>=n&&a>=t?(o=l,s=a):(o=n,s=t),e.freezenhorizontaldata!=null&&e.freezenverticaldata!=null){let u=e.freezenhorizontaldata[1],f=st(e.freezenhorizontaldata[3],$("#luckysheet-cell-main").scrollTop()-e.freezenhorizontaldata[2]),d=e.freezenverticaldata[1],m=st(e.freezenverticaldata[3],$("#luckysheet-cell-main").scrollLeft()-e.freezenverticaldata[2]);if(o>=u&&s>=d)o<u+f-1||s<d+m-1?$("#luckysheet-dropCell-icon").hide():$("#luckysheet-dropCell-icon").show();else if(o>=u)if(o<u+f-1)$("#luckysheet-dropCell-icon").hide();else{let g=At(s+m)[1];$("#luckysheet-dropCell-icon").show().css("left",g)}else if(s>=d)if(s<d+m-1)$("#luckysheet-dropCell-icon").hide();else{let g=tl(o+f)[1];$("#luckysheet-dropCell-icon").show().css("top",g)}else{let g=tl(o+f)[1],y=At(s+m)[1];$("#luckysheet-dropCell-icon").show().css({left:y,top:g})}}else if(e.freezenhorizontaldata!=null){let u=e.freezenhorizontaldata[1],f=st(e.freezenhorizontaldata[3],$("#luckysheet-cell-main").scrollTop()-e.freezenhorizontaldata[2]);if(o>=u)o<u+f-1?$("#luckysheet-dropCell-icon").hide():$("#luckysheet-dropCell-icon").show();else{let d=tl(o+f)[1];$("#luckysheet-dropCell-icon").show().css("top",d)}}else if(e.freezenverticaldata!=null){let u=e.freezenverticaldata[1],f=st(e.freezenverticaldata[3],$("#luckysheet-cell-main").scrollLeft()-e.freezenverticaldata[2]);if(s>=u)s<u+f-1?$("#luckysheet-dropCell-icon").hide():$("#luckysheet-dropCell-icon").show();else{let d=At(s+f)[1];$("#luckysheet-dropCell-icon").show().css("left",d)}}else{let u=tl(o)[1],f=At(s)[1];$("#luckysheet-dropCell-icon").show().css({left:f,top:u})}},scrollAdaptOffilteroptions:function(){let e=this;if(e.freezenhorizontaldata!=null&&e.freezenverticaldata!=null){let n=e.freezenhorizontaldata[1],t=e.freezenhorizontaldata[0]+$("#luckysheet-cell-main").scrollTop(),l=e.freezenverticaldata[1],a=st(e.freezenverticaldata[3],$("#luckysheet-cell-main").scrollLeft()-e.freezenverticaldata[2]);$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").each(function(o,s){let u=$(s).data("str"),f=u-1==-1?0:h.visibledatarow[u-1],d=$(s).data("cindex");if(u>=n&&d>=l)f<t||d<l+a?$(s).hide():$(s).show();else if(u>=n)if(f<t)$(s).hide();else{let m=h.visibledatacolumn[d+a]-20;$(s).show().css("left",m)}else if(d>=l)d<l+a?$(s).hide():$(s).show().css("top",f+$("#luckysheet-cell-main").scrollTop());else{let m=h.visibledatacolumn[d+a]-20;$(s).show().css({left:m,top:f+$("#luckysheet-cell-main").scrollTop()})}})}else if(e.freezenhorizontaldata!=null){let n=e.freezenhorizontaldata[1],t=e.freezenhorizontaldata[0]+$("#luckysheet-cell-main").scrollTop();$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").each(function(l,a){let o=$(a).data("str"),s=o-1==-1?0:h.visibledatarow[o-1];o>=n?s<t?$(a).hide():$(a).show():$(a).show().css("top",s+$("#luckysheet-cell-main").scrollTop())})}else if(e.freezenverticaldata!=null){let n=e.freezenverticaldata[1],t=st(e.freezenverticaldata[3],$("#luckysheet-cell-main").scrollLeft()-e.freezenverticaldata[2]);$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").each(function(l,a){let o=$(a).data("cindex");if(o>=n)o<n+t?$(a).hide():$(a).show();else{let s=h.visibledatacolumn[o+t]-20;$(a).show().css("left",s)}})}else $("#luckysheet-filter-options-sheet"+h.currentSheetIndex).empty(),Dl(h.luckysheetfile[Z(h.currentSheetIndex)].filter_select)},saveFrozen:function(e,n,t={}){n==null&&(n=Z(h.currentSheetIndex));let l=h.luckysheet_select_save[h.luckysheet_select_save.length-1],a=l.row_focus==null?l.row[0]:l.row_focus,o=l.column_focus==null?l.column[0]:l.column_focus,s={row_focus:t.row_focus||a,column_focus:t.column_focus||o},u={freezenRow:{type:"row"},freezenColumn:{type:"column"},freezenRC:{type:"both"},freezenRowRange:{type:"rangeRow",range:s},freezenColumnRange:{type:"rangeColumn",range:s},freezenRCRange:{type:"rangeBoth",range:s},freezenCancel:{type:"cancel"}};h.luckysheetfile[n].frozen=u[e]},frozenTofreezen:function(){let e=h.luckysheetfile[Z(h.currentSheetIndex)],n=e.frozen;if(n==null)return;let t=null;if(n.type==="row"){let l=0,a=st(h.visibledatarow,l);a==-1&&(a=0);let o=h.visibledatarow[a]-2-l+h.columnHeaderHeight;t={horizontal:{freezenhorizontaldata:[h.visibledatarow[a],a+1,l,cn.cutVolumn(h.visibledatarow,a+1),o],top:o}}}else if(n.type==="column"){let l=0,a=st(h.visibledatacolumn,l);a==-1&&(a=0);let o=h.visibledatacolumn[a]-2-l+h.rowHeaderWidth;t={vertical:{freezenverticaldata:[h.visibledatacolumn[a],a+1,l,cn.cutVolumn(h.visibledatacolumn,a+1),o],left:o}}}else if(n.type==="both"){let l=0,a=st(h.visibledatarow,l);a==-1&&(a=0);let o=h.visibledatarow[a]-2-l+h.columnHeaderHeight,s=[h.visibledatarow[a],a+1,l,cn.cutVolumn(h.visibledatarow,a+1),o],u=0,f=st(h.visibledatacolumn,u);f==-1&&(f=0);let d=h.visibledatacolumn[f]-2-u+h.rowHeaderWidth,m=[h.visibledatacolumn[f],f+1,u,cn.cutVolumn(h.visibledatacolumn,f+1),d];t={horizontal:{freezenhorizontaldata:s,top:o},vertical:{freezenverticaldata:m,left:d}}}else if(n.type==="rangeRow"){let l=0,a=st(h.visibledatarow,l),o=n.range.row_focus;o>a&&(a=o),a==-1&&(a=0);let s=h.visibledatarow[a]-2-l+h.columnHeaderHeight;t={horizontal:{freezenhorizontaldata:[h.visibledatarow[a],a+1,l,cn.cutVolumn(h.visibledatarow,a+1),s],top:s}}}else if(n.type==="rangeColumn"){let l=0,a=st(h.visibledatacolumn,l),o=n.range.column_focus;o>a&&(a=o),a==-1&&(a=0);let s=h.visibledatacolumn[a]-2-l+h.rowHeaderWidth;t={vertical:{freezenverticaldata:[h.visibledatacolumn[a],a+1,l,cn.cutVolumn(h.visibledatacolumn,a+1),s],left:s}}}else if(n.type==="rangeBoth"){let l=0,a=st(h.visibledatarow,l),o=n.range.row_focus;o>a&&(a=o),a==-1&&(a=0);let s=h.visibledatarow[a]-2-l+h.columnHeaderHeight,u=[h.visibledatarow[a],a+1,l,cn.cutVolumn(h.visibledatarow,a+1),s],f=0,d=st(h.visibledatacolumn,f),m=n.range.column_focus;m>d&&(d=m),d==-1&&(d=0);let g=h.visibledatacolumn[d]-2-f+h.rowHeaderWidth,y=[h.visibledatacolumn[d],d+1,f,cn.cutVolumn(h.visibledatacolumn,d+1),g];t={horizontal:{freezenhorizontaldata:u,top:s},vertical:{freezenverticaldata:y,left:g}}}else n.type==="cancel"&&(t={horizontal:null,vertical:null});e.freezen=t}},Y=cn});function zt(e=!0){de.showinfobar?($("#luckysheet_info_detail").show(),h.infobarHeight=document.querySelector("#luckysheet_info_detail").offsetHeight):(h.infobarHeight=0,$("#luckysheet_info_detail").hide()),!!h.toobarObject&&!!h.toobarObject.toobarElements&&h.toobarObject.toobarElements.length===0?($("#"+h.container).find(".luckysheet-wa-editor").hide(),h.toolbarHeight=0):($("#"+h.container).find(".luckysheet-wa-editor").show(),h.toolbarHeight=document.querySelector("#"+h.container+" .luckysheet-wa-editor").offsetHeight),Jy(),Qy();let n=document.querySelector("#"+h.container+" .luckysheet-wa-calculate");de.sheetFormulaBar?(n.style.display="block",h.calculatebarHeight=n.offsetHeight):(n.style.display="none",h.calculatebarHeight=0),$("#"+h.container).find(".luckysheet-grid-container").css("top",h.toolbarHeight+h.infobarHeight+h.calculatebarHeight),Un=$("#"+h.container).width(),de.showConfigWindowResize&&($("#luckysheet-modal-dialog-slider-pivot").is(":visible")?Un-=$("#luckysheet-modal-dialog-slider-pivot").outerWidth():$(".chartSetting").is(":visible")?Un-=$(".chartSetting").outerWidth():$("#luckysheet-modal-dialog-slider-alternateformat").is(":visible")&&(Un-=$("#luckysheet-modal-dialog-slider-alternateformat").outerWidth()),$("#luckysheet-modal-dialog-slider-protection").is(":visible")&&(Un-=$("#luckysheet-modal-dialog-slider-protection").outerWidth()));let l=Q().toolbar,a=!1,o=0,s=`<div class="luckysheet-toolbar-button luckysheet-inline-block" data-tips="${l.toolMoreTip}" id="luckysheet-icon-morebtn" role="button" style="user-select: none;"> |
| | | <div class="luckysheet-toolbar-button-outer-box luckysheet-inline-block" style="user-select: none;"> |
| | | <div class="luckysheet-toolbar-button-inner-box luckysheet-inline-block" style="user-select: none;"> |
| | | |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | </div>`,u='<div id="luckysheet-icon-morebtn-div" class="luckysheet-wa-editor" style="position:absolute;top:'+(h.infobarHeight+h.toolbarHeight+$("#"+h.container).offset().top+$("body").scrollTop())+'px;right:0px;z-index:1003;padding:5.5px;visibility:hidden;height:auto;white-space:initial;"></div>';$("#luckysheet-icon-morebtn-div").length==0&&$("body").append(u),We("#luckysheet-icon-morebtn-div").style.visibility="hidden",$("#luckysheet-icon-morebtn-div > div").each(function(){let g=$(this)[0],y=$("#luckysheet-wa-editor")[0];y.appendChild(document.createTextNode(" ")),y.appendChild(g)}),$("#luckysheet-icon-morebtn").remove();let d=h.toobarObject.toobarWidths,f=h.toobarObject.toobarElements,m=0;if(d!=null){for(let g=d.length-1;g>=0;g--)if(d[g]<Un-90){m=g,m<d.length-1&&(a=!0);break}for(let g=m;g<f.length;g++){let y=f[g];if(y instanceof Array)for(let v of y)$("#luckysheet-icon-morebtn-div").append($(`${v}`));else $("#luckysheet-icon-morebtn-div").append($(`${y}`))}a&&($("#luckysheet-wa-editor").append(s),$("#luckysheet-icon-morebtn").click(function(){We("#luckysheet-icon-morebtn-div").style.left="";let g=We(`#${h.container}`).getBoundingClientRect?We(`#${h.container}`).getBoundingClientRect().left:0;We("#luckysheet-icon-morebtn-div").getBoundingClientRect().left<g&&(We("#luckysheet-icon-morebtn-div").style.left=g+"px");let v=$(window).width()-$("#luckysheet-icon-morebtn").offset().left-$("#luckysheet-icon-morebtn").width()+$("body").scrollLeft();if(We("#luckysheet-icon-morebtn-div").style.right=v<0?0:v+"px",We("#luckysheet-icon-morebtn-div").style.visibility==="hidden"?We("#luckysheet-icon-morebtn-div").style.visibility="visible":We("#luckysheet-icon-morebtn-div").style.visibility="hidden",$(this).find(".luckysheet-toolbar-menu-button-caption").text().indexOf(l.toolMore)>-1){let k=` |
| | | </div>`,u='<div id="luckysheet-icon-morebtn-div" class="luckysheet-wa-editor" style="position:absolute;top:'+(h.infobarHeight+h.toolbarHeight+$("#"+h.container).offset().top+$("body").scrollTop())+'px;right:0px;z-index:1003;padding:5.5px;visibility:hidden;height:auto;white-space:initial;"></div>';$("#luckysheet-icon-morebtn-div").length==0&&$("body").append(u),We("#luckysheet-icon-morebtn-div").style.visibility="hidden",$("#luckysheet-icon-morebtn-div > div").each(function(){let g=$(this)[0],y=$("#luckysheet-wa-editor")[0];y.appendChild(document.createTextNode(" ")),y.appendChild(g)}),$("#luckysheet-icon-morebtn").remove();let f=h.toobarObject.toobarWidths,d=h.toobarObject.toobarElements,m=0;if(f!=null){for(let g=f.length-1;g>=0;g--)if(f[g]<Un-90){m=g,m<f.length-1&&(a=!0);break}for(let g=m;g<d.length;g++){let y=d[g];if(y instanceof Array)for(let v of y)$("#luckysheet-icon-morebtn-div").append($(`${v}`));else $("#luckysheet-icon-morebtn-div").append($(`${y}`))}a&&($("#luckysheet-wa-editor").append(s),$("#luckysheet-icon-morebtn").click(function(){We("#luckysheet-icon-morebtn-div").style.left="";let g=We(`#${h.container}`).getBoundingClientRect?We(`#${h.container}`).getBoundingClientRect().left:0;We("#luckysheet-icon-morebtn-div").getBoundingClientRect().left<g&&(We("#luckysheet-icon-morebtn-div").style.left=g+"px");let v=$(window).width()-$("#luckysheet-icon-morebtn").offset().left-$("#luckysheet-icon-morebtn").width()+$("body").scrollLeft();if(We("#luckysheet-icon-morebtn-div").style.right=v<0?0:v+"px",We("#luckysheet-icon-morebtn-div").style.visibility==="hidden"?We("#luckysheet-icon-morebtn-div").style.visibility="visible":We("#luckysheet-icon-morebtn-div").style.visibility="hidden",$(this).find(".luckysheet-toolbar-menu-button-caption").text().indexOf(l.toolMore)>-1){let k=` |
| | | <div class="luckysheet-toolbar-menu-button-caption luckysheet-inline-block" style="user-select: none;"> |
| | | ${l.toolClose} |
| | | </div> |
| | |
| | | </div> |
| | | <div class="luckysheet-toolbar-menu-button-dropdown luckysheet-inline-block iconfont luckysheet-iconfont-xiayige" style="user-select: none;font-size:12px;"> |
| | | </div> |
| | | `;$(this).find(".luckysheet-toolbar-button-inner-box").html(k)}}),$("#luckysheet-icon-morebtn-div .luckysheet-toolbar-button-split-left").off("hover").hover(function(){$(this).next(".luckysheet-toolbar-button-split-right").addClass("luckysheet-toolbar-button-split-right-hover")},function(){$(this).next(".luckysheet-toolbar-button-split-right").removeClass("luckysheet-toolbar-button-split-right-hover")}),$("#luckysheet-icon-morebtn-div .luckysheet-toolbar-button-split-right").off("hover").hover(function(){$(this).prev(".luckysheet-toolbar-button-split-left").addClass("luckysheet-toolbar-button-hover")},function(){$(this).prev(".luckysheet-toolbar-button-split-left").removeClass("luckysheet-toolbar-button-hover")}),U.createHoverTip("#luckysheet-icon-morebtn-div",".luckysheet-toolbar-menu-button, .luckysheet-toolbar-button, .luckysheet-toolbar-combo-button")),$("#"+h.container+" .luckysheet-wa-editor .luckysheet-toolbar-button-split-left").off("hover").hover(function(){$(this).next(".luckysheet-toolbar-button-split-right").addClass("luckysheet-toolbar-button-split-right-hover")},function(){$(this).next(".luckysheet-toolbar-button-split-right").removeClass("luckysheet-toolbar-button-split-right-hover")}),$("#"+h.container+" .luckysheet-wa-editor .luckysheet-toolbar-button-split-right").off("hover").hover(function(){$(this).prev(".luckysheet-toolbar-button-split-left").addClass("luckysheet-toolbar-button-hover")},function(){$(this).prev(".luckysheet-toolbar-button-split-left").removeClass("luckysheet-toolbar-button-hover")}),Ks=$("#"+h.container).height(),$("#"+h.container).find(".luckysheet").height(Ks-2).width(Un-2),Zs(Un,Ks),e&&Be($("#luckysheet-cell-main").scrollLeft(),$("#luckysheet-cell-main").scrollTop()),ve.sheetArrowShowAndHide(),ve.sheetBarShowAndHide()}}function Zs(e,n){e==null&&(e=$("#"+h.container).width()),n==null&&(n=$("#"+h.container).height()),h.cellmainHeight=n-(h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight+h.sheetBarHeight+h.statisticBarHeight),h.cellmainWidth=e-h.rowHeaderWidth,$("#luckysheet-cols-h-c, #luckysheet-cell-main").width(h.cellmainWidth),$("#luckysheet-cell-main").height(h.cellmainHeight),$("#luckysheet-rows-h").height(h.cellmainHeight-h.cellMainSrollBarSize),$("#luckysheet-scrollbar-y").height(h.cellmainHeight+h.columnHeaderHeight-h.cellMainSrollBarSize-3),$("#luckysheet-scrollbar-x").height(h.cellMainSrollBarSize),$("#luckysheet-scrollbar-y").width(h.cellMainSrollBarSize),$("#luckysheet-scrollbar-x").width(h.cellmainWidth).css("left",h.rowHeaderWidth-2),h.luckysheetTableContentHW=[h.cellmainWidth+h.rowHeaderWidth-h.cellMainSrollBarSize,h.cellmainHeight+h.columnHeaderHeight-h.cellMainSrollBarSize],$("#luckysheetTableContent, #luckysheetTableContentF").attr({width:Math.ceil(h.luckysheetTableContentHW[0]*h.devicePixelRatio),height:Math.ceil(h.luckysheetTableContentHW[1]*h.devicePixelRatio)}).css({width:h.luckysheetTableContentHW[0],height:h.luckysheetTableContentHW[1]}),$("#"+h.container).find("#luckysheet-grid-window-1").css("bottom",h.sheetBarHeight),$("#"+h.container).find(".luckysheet-grid-window").css("bottom",h.statisticBarHeight);let t=$("#luckysheet-grid-window-1").width();$("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css({width:t-10}).end().find(".luckysheet-freezebar-horizontal-drop").css({width:t-10});let l=$("#luckysheet-grid-window-1").height();$("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css({height:l-10}).end().find(".luckysheet-freezebar-vertical-drop").css({height:l-10}),Y.createAssistCanvas()}function Zd(){let e=fe.showtoolbar,n=fe.showtoolbarConfig,t=h.toobarObject.toobarWidths=[],l=h.toobarObject.toobarElements=[],a=h.toobarObject.toolbarConfig=o();function o(){let d={};function f(g){let y={},v,b,k=0;for(let w=0;w<g.length;w++)v=g[w],b=g[w+1],v!=="|"&&(y[v]={ele:ls[v],index:k++}),b==="|"&&(P(y[v].ele)==="array"?y[v].ele.push(`#toolbar-separator-${Rn(v)}`):y[v].ele=[y[v].ele,`#toolbar-separator-${Rn(v)}`]);return y}if(P(n)==="array")return e?f(n):d;let m=Fr.reduce(function(g,y){return y!=="|"&&(g[y]=!0),g},{});if(!e)for(let g in m)m[g]=!1;if(JSON.stringify(n)!=="{}"){n.hasOwnProperty("undoRedo")&&(m.undo=m.redo=n.undoRedo),Object.assign(m,n);let g,y,v=0;for(let b=0;b<Fr.length;b++)g=Fr[b],y=Fr[b+1],m[g]!==!1&&(g!=="|"&&m[g]&&(d[g]={ele:ls[g],index:v++}),y==="|"&&(P(d[g].ele)==="array"?d[g].ele.push(`#toolbar-separator-${Rn(g)}`):d[g].ele=[d[g].ele,`#toolbar-separator-${Rn(g)}`]))}else d=e?f(Fr):{};return d}for(let d in a)Object.prototype.hasOwnProperty.call(a,d)&&l.push($.extend(!0,{},a[d]));l.sort(s);function s(d,f){return d.index>f.index?1:-1}l.forEach((d,f,m)=>{m[f]=d.ele,f!==l.length-1?d.ele instanceof Array?t.push($(d.ele[0]).offset().left):t.push($(d.ele).offset().left):d.ele instanceof Array?(t.push($(d.ele[0]).offset().left),t.push($(d.ele[0]).offset().left+$(d.ele[0]).outerWidth()+5)):(t.push($(d.ele).offset().left),t.push($(d.ele).offset().left+$(d.ele).outerWidth()+5))});let u=$("#"+h.container).offset().left;t.forEach((d,f)=>{t[f]-=u})}function Jy(){if(!fe.initShowsheetbarConfig){fe.initShowsheetbarConfig=!0;let t={add:!0,menu:!0,sheet:!0};if(!fe.showsheetbar)for(let l in t)t[l]=!1;JSON.stringify(fe.showsheetbarConfig)!=="{}"&&Object.assign(t,fe.showsheetbarConfig),fe.showsheetbarConfig=t}let e=fe.showsheetbarConfig,n=0;for(let t in e)if(!e[t])switch(t){case"add":$("#luckysheet-sheets-add").hide(),n++;break;case"menu":$("#luckysheet-sheets-m").hide(),n++;break;case"sheet":$("#luckysheet-sheet-container").hide(),$("#luckysheet-sheets-leftscroll").hide(),$("#luckysheet-sheets-rightscroll").hide(),n++;break;default:break}n===3?($("#"+h.container).find("#luckysheet-sheet-area").hide(),h.sheetBarHeight=0):($("#"+h.container).find("#luckysheet-sheet-area").show(),h.sheetBarHeight=31)}function Qy(){if(!fe.initStatisticBarConfig){fe.initStatisticBarConfig=!0;let t={count:!0,view:!0,zoom:!0};if(!fe.showstatisticBar)for(let l in t)t[l]=!1;JSON.stringify(fe.showstatisticBarConfig)!=="{}"&&Object.assign(t,fe.showstatisticBarConfig),fe.showstatisticBarConfig=t}let e=fe.showstatisticBarConfig,n=0;for(let t in e)if(!e[t])switch(t){case"count":$("#luckysheet-sta-content").hide(),n++;break;case"view":$(".luckysheet-print-viewList").hide(),n++;break;case"zoom":$("#luckysheet-zoom-content").hide(),n++;break;default:break}n===3?($("#"+h.container).find(".luckysheet-stat-area").hide(),h.statisticBarHeight=0):($("#"+h.container).find(".luckysheet-stat-area").show(),h.statisticBarHeight=23)}var Un,Ks,pr=Ie(()=>{xl();Vl();Yt();Xe();bt();fl();ll();dt();rs();Un=0,Ks=0});function rf(e){let n=Q(),t=n.protection,l=n.button,a=e.name,o=e.sqref,s=e.password,u="";s!=null&&s.length>0&&(u='<i class="icon iconfont luckysheet-iconfont-bianji2" title="'+t.rangeItemHasPassword+'"></i>');let d=` |
| | | `;$(this).find(".luckysheet-toolbar-button-inner-box").html(k)}}),$("#luckysheet-icon-morebtn-div .luckysheet-toolbar-button-split-left").off("hover").hover(function(){$(this).next(".luckysheet-toolbar-button-split-right").addClass("luckysheet-toolbar-button-split-right-hover")},function(){$(this).next(".luckysheet-toolbar-button-split-right").removeClass("luckysheet-toolbar-button-split-right-hover")}),$("#luckysheet-icon-morebtn-div .luckysheet-toolbar-button-split-right").off("hover").hover(function(){$(this).prev(".luckysheet-toolbar-button-split-left").addClass("luckysheet-toolbar-button-hover")},function(){$(this).prev(".luckysheet-toolbar-button-split-left").removeClass("luckysheet-toolbar-button-hover")}),U.createHoverTip("#luckysheet-icon-morebtn-div",".luckysheet-toolbar-menu-button, .luckysheet-toolbar-button, .luckysheet-toolbar-combo-button")),$("#"+h.container+" .luckysheet-wa-editor .luckysheet-toolbar-button-split-left").off("hover").hover(function(){$(this).next(".luckysheet-toolbar-button-split-right").addClass("luckysheet-toolbar-button-split-right-hover")},function(){$(this).next(".luckysheet-toolbar-button-split-right").removeClass("luckysheet-toolbar-button-split-right-hover")}),$("#"+h.container+" .luckysheet-wa-editor .luckysheet-toolbar-button-split-right").off("hover").hover(function(){$(this).prev(".luckysheet-toolbar-button-split-left").addClass("luckysheet-toolbar-button-hover")},function(){$(this).prev(".luckysheet-toolbar-button-split-left").removeClass("luckysheet-toolbar-button-hover")}),Ks=$("#"+h.container).height(),$("#"+h.container).find(".luckysheet").height(Ks-2).width(Un-2),Zs(Un,Ks),e&&Be($("#luckysheet-cell-main").scrollLeft(),$("#luckysheet-cell-main").scrollTop()),ve.sheetArrowShowAndHide(),ve.sheetBarShowAndHide()}}function Zs(e,n){e==null&&(e=$("#"+h.container).width()),n==null&&(n=$("#"+h.container).height()),h.cellmainHeight=n-(h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight+h.sheetBarHeight+h.statisticBarHeight),h.cellmainWidth=e-h.rowHeaderWidth,$("#luckysheet-cols-h-c, #luckysheet-cell-main").width(h.cellmainWidth),$("#luckysheet-cell-main").height(h.cellmainHeight),$("#luckysheet-rows-h").height(h.cellmainHeight-h.cellMainSrollBarSize),$("#luckysheet-scrollbar-y").height(h.cellmainHeight+h.columnHeaderHeight-h.cellMainSrollBarSize-3),$("#luckysheet-scrollbar-x").height(h.cellMainSrollBarSize),$("#luckysheet-scrollbar-y").width(h.cellMainSrollBarSize),$("#luckysheet-scrollbar-x").width(h.cellmainWidth).css("left",h.rowHeaderWidth-2),h.luckysheetTableContentHW=[h.cellmainWidth+h.rowHeaderWidth-h.cellMainSrollBarSize,h.cellmainHeight+h.columnHeaderHeight-h.cellMainSrollBarSize],$("#luckysheetTableContent, #luckysheetTableContentF").attr({width:Math.ceil(h.luckysheetTableContentHW[0]*h.devicePixelRatio),height:Math.ceil(h.luckysheetTableContentHW[1]*h.devicePixelRatio)}).css({width:h.luckysheetTableContentHW[0],height:h.luckysheetTableContentHW[1]}),$("#"+h.container).find("#luckysheet-grid-window-1").css("bottom",h.sheetBarHeight),$("#"+h.container).find(".luckysheet-grid-window").css("bottom",h.statisticBarHeight);let t=$("#luckysheet-grid-window-1").width();$("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css({width:t-10}).end().find(".luckysheet-freezebar-horizontal-drop").css({width:t-10});let l=$("#luckysheet-grid-window-1").height();$("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css({height:l-10}).end().find(".luckysheet-freezebar-vertical-drop").css({height:l-10}),Y.createAssistCanvas()}function Jf(){let e=de.showtoolbar,n=de.showtoolbarConfig,t=h.toobarObject.toobarWidths=[],l=h.toobarObject.toobarElements=[],a=h.toobarObject.toolbarConfig=o();function o(){let f={};function d(g){let y={},v,b,k=0;for(let w=0;w<g.length;w++)v=g[w],b=g[w+1],v!=="|"&&(y[v]={ele:ls[v],index:k++}),b==="|"&&(P(y[v].ele)==="array"?y[v].ele.push(`#toolbar-separator-${Rn(v)}`):y[v].ele=[y[v].ele,`#toolbar-separator-${Rn(v)}`]);return y}if(P(n)==="array")return e?d(n):f;let m=Fr.reduce(function(g,y){return y!=="|"&&(g[y]=!0),g},{});if(!e)for(let g in m)m[g]=!1;if(JSON.stringify(n)!=="{}"){n.hasOwnProperty("undoRedo")&&(m.undo=m.redo=n.undoRedo),Object.assign(m,n);let g,y,v=0;for(let b=0;b<Fr.length;b++)g=Fr[b],y=Fr[b+1],m[g]!==!1&&(g!=="|"&&m[g]&&(f[g]={ele:ls[g],index:v++}),y==="|"&&(P(f[g].ele)==="array"?f[g].ele.push(`#toolbar-separator-${Rn(g)}`):f[g].ele=[f[g].ele,`#toolbar-separator-${Rn(g)}`]))}else f=e?d(Fr):{};return f}for(let f in a)Object.prototype.hasOwnProperty.call(a,f)&&l.push($.extend(!0,{},a[f]));l.sort(s);function s(f,d){return f.index>d.index?1:-1}l.forEach((f,d,m)=>{m[d]=f.ele,d!==l.length-1?f.ele instanceof Array?t.push($(f.ele[0]).offset().left):t.push($(f.ele).offset().left):f.ele instanceof Array?(t.push($(f.ele[0]).offset().left),t.push($(f.ele[0]).offset().left+$(f.ele[0]).outerWidth()+5)):(t.push($(f.ele).offset().left),t.push($(f.ele).offset().left+$(f.ele).outerWidth()+5))});let u=$("#"+h.container).offset().left;t.forEach((f,d)=>{t[d]-=u})}function Jy(){if(!de.initShowsheetbarConfig){de.initShowsheetbarConfig=!0;let t={add:!0,menu:!0,sheet:!0};if(!de.showsheetbar)for(let l in t)t[l]=!1;JSON.stringify(de.showsheetbarConfig)!=="{}"&&Object.assign(t,de.showsheetbarConfig),de.showsheetbarConfig=t}let e=de.showsheetbarConfig,n=0;for(let t in e)if(!e[t])switch(t){case"add":$("#luckysheet-sheets-add").hide(),n++;break;case"menu":$("#luckysheet-sheets-m").hide(),n++;break;case"sheet":$("#luckysheet-sheet-container").hide(),$("#luckysheet-sheets-leftscroll").hide(),$("#luckysheet-sheets-rightscroll").hide(),n++;break;default:break}n===3?($("#"+h.container).find("#luckysheet-sheet-area").hide(),h.sheetBarHeight=0):($("#"+h.container).find("#luckysheet-sheet-area").show(),h.sheetBarHeight=31)}function Qy(){if(!de.initStatisticBarConfig){de.initStatisticBarConfig=!0;let t={count:!0,view:!0,zoom:!0};if(!de.showstatisticBar)for(let l in t)t[l]=!1;JSON.stringify(de.showstatisticBarConfig)!=="{}"&&Object.assign(t,de.showstatisticBarConfig),de.showstatisticBarConfig=t}let e=de.showstatisticBarConfig,n=0;for(let t in e)if(!e[t])switch(t){case"count":$("#luckysheet-sta-content").hide(),n++;break;case"view":$(".luckysheet-print-viewList").hide(),n++;break;case"zoom":$("#luckysheet-zoom-content").hide(),n++;break;default:break}n===3?($("#"+h.container).find(".luckysheet-stat-area").hide(),h.statisticBarHeight=0):($("#"+h.container).find(".luckysheet-stat-area").show(),h.statisticBarHeight=23)}var Un,Ks,pr=Ie(()=>{xl();Vl();Yt();Xe();bt();dl();ll();ft();rs();Un=0,Ks=0});function nd(e){let n=Q(),t=n.protection,l=n.button,a=e.name,o=e.sqref,s=e.password,u="";s!=null&&s.length>0&&(u='<i class="icon iconfont luckysheet-iconfont-bianji2" title="'+t.rangeItemHasPassword+'"></i>');let f=` |
| | | <div class="luckysheet-protection-rangeItem" title="${t.rangeItemDblclick}"> |
| | | <div class="luckysheet-protection-rangeItem-del" title="${l.delete}"> |
| | | <i class="icon iconfont luckysheet-iconfont-shanchu"></i> |
| | |
| | | <i class="icon iconfont luckysheet-iconfont-bianji"></i> |
| | | </div> |
| | | </div> |
| | | `;$("#luckysheet-protection-rangeItem-container").append(d)}function ev(e){let n=Q(),t=n.protection,l=n.button;$("#luckysheet-slider-protection-ok").click(function(){let a=$("#protection-password").val(),o=$("#protection-swichProtectionState").is(":checked"),s=$("#protection-hint").val(),u=tf,d={};u!=null&&u.config!=null&&u.config.authority!=null&&(d=u.config.authority);let f={},m="None";a!="\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"?(f.password=a,f.algorithmName="None",f.saltValue=null):d!=null?(f.algorithmName=d.algorithmName,f.saltValue=d.saltValue,f.password=d.password):(f.algorithmName="None",f.saltValue=null,f.password=""),f.hintText=s,f.sheet=o==!0?1:0;for(let g=0;g<qa.length;g++){let y=qa[g],v="luckysheet-protection-check-"+y,b=$("#"+v).is(":checked");f[y]=b==!0?1:0}f.allowRangeList=un,un=[],Qs=!0,u.config==null&&(u.config={}),u.config.authority=f,ec={},of()}),$("#luckysheet-slider-protection-cancel, #luckysheet-modal-dialog-protection-close").click(function(){of()}),$("#luckysheet-slider-protection-addRange").click(function(){nf(),Js=!0,$("#luckysheet-protection-rangeItem-confirm").html(l.insert),fa("luckysheet-protection-rangeItem-dialog"),$("#protection-allowRangeAdd-title").val("Default"+un.length),$("#protection-allowRangeAdd-range input").val(""),$("#protection-allowRangeAdd-password").val(""),$("#protection-allowRangeAdd-hint").val("")}),$(document).off("click.luckysheetProtection.rangeItemUpdate").on("click.luckysheetProtection.rangeItemUpdate","#luckysheet-protection-rangeItem-container .luckysheet-protection-rangeItem-update",function(a){nf(),Js=!1,$("#luckysheet-protection-rangeItem-confirm").html(l.update),fa("luckysheet-protection-rangeItem-dialog");let o=$(a.target).closest(".luckysheet-protection-rangeItem"),u=$("#luckysheet-protection-rangeItem-container").find("> div.luckysheet-protection-rangeItem").index(o),d=un[u];ef=u,$("#protection-allowRangeAdd-title").val(d.name),$("#protection-allowRangeAdd-range input").val(d.sqref),d.algorithmName=="None"?$("#protection-allowRangeAdd-password").val(d.password):$("#protection-allowRangeAdd-password").val("\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"),$("#protection-allowRangeAdd-hint").val(d.hintText)}),$(document).off("click.luckysheetProtection.rangeItemDelete").on("click.luckysheetProtection.rangeItemDelete","#luckysheet-protection-rangeItem-container .luckysheet-protection-rangeItem-del",function(a){let o=$(a.target).closest(".luckysheet-protection-rangeItem"),u=$("#luckysheet-protection-rangeItem-container").find("> div.luckysheet-protection-rangeItem").index(o),d=un[u];un.splice(u,1),o.remove()}),$(document).off("click.luckysheetProtection.rangeItemConfirm").on("click.luckysheetProtection.rangeItemConfirm","#luckysheet-protection-rangeItem-confirm",function(){let a=$("#protection-allowRangeAdd-title").val(),o=$("#protection-allowRangeAdd-range input").val(),s=$("#protection-allowRangeAdd-password").val(),u=$("#protection-allowRangeAdd-hint").val();if(a.length==0){alert(t.rangeItemErrorTitleNull);return}let d=Ye.getRangeByTxt(o);if(o.length==0){alert(t.rangeItemErrorRangeNull);return}if(d.length==0){alert(t.rangeItemErrorRange);return}if(o=sf(o),Js){let f={name:a,password:s,hintText:u,algorithmName:"None",saltValue:null,checkRangePasswordUrl:null,sqref:o};rf(f),un.push(f)}else{let f=ef,m=un[f];m.name=a,m.sqref=o,m.hintText=u,s!="\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"&&(m.password=s,m.algorithmName="None");let y=$("#luckysheet-protection-rangeItem-container").find("> div.luckysheet-protection-rangeItem").eq(f),v=y.find(".luckysheet-protection-rangeItem-name"),b="";s!=null&&s.length>0&&(b='<i class="icon iconfont luckysheet-iconfont-bianji2" title="'+t.rangeItemHasPassword+'"></i>'),v.html(a+b).attr("title",a),y.find(".luckysheet-protection-rangeItem-range").html(o).attr("title",o)}$("#luckysheet-protection-rangeItem-dialog").hide(),$("#luckysheet-modal-dialog-mask").hide()}),$(document).off("click.luckysheetProtection.validationConfirm").on("click.luckysheetProtection.validationConfirm","#luckysheet-protection-sheet-validation-confirm",function(a){let o=$("#luckysheet-protection-sheet-validation"),s=wo;if(s==null){tc(wo),o.hide(),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-modal-dialog-slider-protection").show(),zt();return}let d=o.find("input").val();if(d==null||d.length==0){alert(t.checkPasswordNullalert);return}if(s.algorithmName!=null&&s.algorithmName!="None")if(s.saltValue!=null&&s.saltValue.length>0){var f=CryptoApi.getHasher(s.algorithmName);d=CryptoApi.hmac(s.saltValue,d,f)}else d=CryptoApi.hash(s.algorithmName,d);d==s.password?(tc(wo),o.hide(),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-modal-dialog-slider-protection").show(),zt(),Qs=!1):alert(t.checkPasswordWrongalert)}),$("#luckysheet-protection-check-selectLockedCells").change(function(){let a=$("#luckysheet-protection-check-selectLockedCells"),o=$("#luckysheet-protection-check-selectunLockedCells"),s=a.is(":checked"),u=o.is(":checked");s&&o.prop("checked",!0)}),$("#luckysheet-protection-check-selectunLockedCells").change(function(){let a=$("#luckysheet-protection-check-selectLockedCells"),o=$("#luckysheet-protection-check-selectunLockedCells"),s=a.is(":checked");o.is(":checked")||a.prop("checked",!1)}),$(document).off("click.luckysheetProtection.dvRange").on("click.luckysheetProtection.dvRange","#protection-allowRangeAdd-range .fa-table",function(a){$("#luckysheet-protection-rangeItem-dialog").hide();let o="0",s=$(this).siblings("input").val().trim();Ye.rangeDialog(o,s),Ye.selectRange=[];let u=Ye.getRangeByTxt(s);if(u.length>0)for(let d=0;d<u.length;d++){let f=u[d].row[0],m=u[d].row[1],g=u[d].column[0],y=u[d].column[1],v=h.visibledatarow[m],b=f-1==-1?0:h.visibledatarow[f-1],k=h.visibledatacolumn[y],w=g-1==-1?0:h.visibledatacolumn[g-1];Ye.selectRange.push({left:w,width:k-w-1,top:b,height:v-b-1,left_move:w,width_move:k-w-1,top_move:b,height_move:v-b-1,row:[f,m],column:[g,y],row_focus:f,column_focus:g})}Ot(Ye.selectRange)}),$(document).off("click.luckysheetProtection.dvRange2").on("click.luckysheetProtection.dvRange2","#luckysheet-protection-rangeItem-dialog .show-box-item-dropdown .range .fa-table",function(a){$("#luckysheet-protection-rangeItem-dialog").hide();let o="1",s=$(this).siblings("input").val().trim();Ye.rangeDialog(o,s),Ye.selectRange=[];let u=Ye.getRangeByTxt(s);if(u.length>0)for(let d=0;d<u.length;d++){let f=u[d].row[0],m=u[d].row[1],g=u[d].column[0],y=u[d].column[1],v=h.visibledatarow[m],b=f-1==-1?0:h.visibledatarow[f-1],k=h.visibledatacolumn[y],w=g-1==-1?0:h.visibledatacolumn[g-1];Ye.selectRange.push({left:w,width:k-w-1,top:b,height:v-b-1,left_move:w,width_move:k-w-1,top_move:b,height_move:v-b-1,row:[f,m],column:[g,y],row_focus:f,column_focus:g})}Ot(Ye.selectRange)}),$(document).off("click.luckysheetProtection.dvRangeConfirm").on("click.luckysheetProtection.dvRangeConfirm","#luckysheet-dataVerificationRange-dialog-confirm",function(a){let o=$(this).parents("#luckysheet-dataVerificationRange-dialog").find("input").val(),s=$("#protection-allowRangeAdd-range input"),u=s.val();u.substr(u.length-1,1)==","?s.val(u+o):s.val(o),$("#luckysheet-dataVerificationRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-protection-rangeItem-dialog").show(),Ot([])}),$(document).off("click.luckysheetProtection.dvRangeClose").on("click.dvRangeClose","#luckysheet-dataVerificationRange-dialog-close",function(a){$("#luckysheet-dataVerificationRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-protection-rangeItem-dialog").show(),Ot([])}),$(document).on("click.luckysheetProtection.luckysheetProtection","#luckysheet-dataVerificationRange-dialog .luckysheet-modal-dialog-title-close",function(a){$("#luckysheet-dataVerificationRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-protection-rangeItem-dialog").show(),Ot([])})}function nf(e){if(Qd)return;Qd=!0;let n=Q(),t=n.protection,l=n.button;$("body").append(_e(ft,{id:"luckysheet-protection-rangeItem-dialog",addclass:"luckysheet-protection-rangeItem-dialog",title:t.allowRangeTitle,content:` |
| | | `;$("#luckysheet-protection-rangeItem-container").append(f)}function ev(e){let n=Q(),t=n.protection,l=n.button;$("#luckysheet-slider-protection-ok").click(function(){let a=$("#protection-password").val(),o=$("#protection-swichProtectionState").is(":checked"),s=$("#protection-hint").val(),u=ld,f={};u!=null&&u.config!=null&&u.config.authority!=null&&(f=u.config.authority);let d={},m="None";a!="\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"?(d.password=a,d.algorithmName="None",d.saltValue=null):f!=null?(d.algorithmName=f.algorithmName,d.saltValue=f.saltValue,d.password=f.password):(d.algorithmName="None",d.saltValue=null,d.password=""),d.hintText=s,d.sheet=o==!0?1:0;for(let g=0;g<qa.length;g++){let y=qa[g],v="luckysheet-protection-check-"+y,b=$("#"+v).is(":checked");d[y]=b==!0?1:0}d.allowRangeList=un,un=[],Qs=!0,u.config==null&&(u.config={}),u.config.authority=d,ec={},od()}),$("#luckysheet-slider-protection-cancel, #luckysheet-modal-dialog-protection-close").click(function(){od()}),$("#luckysheet-slider-protection-addRange").click(function(){ad(),Js=!0,$("#luckysheet-protection-rangeItem-confirm").html(l.insert),da("luckysheet-protection-rangeItem-dialog"),$("#protection-allowRangeAdd-title").val("Default"+un.length),$("#protection-allowRangeAdd-range input").val(""),$("#protection-allowRangeAdd-password").val(""),$("#protection-allowRangeAdd-hint").val("")}),$(document).off("click.luckysheetProtection.rangeItemUpdate").on("click.luckysheetProtection.rangeItemUpdate","#luckysheet-protection-rangeItem-container .luckysheet-protection-rangeItem-update",function(a){ad(),Js=!1,$("#luckysheet-protection-rangeItem-confirm").html(l.update),da("luckysheet-protection-rangeItem-dialog");let o=$(a.target).closest(".luckysheet-protection-rangeItem"),u=$("#luckysheet-protection-rangeItem-container").find("> div.luckysheet-protection-rangeItem").index(o),f=un[u];td=u,$("#protection-allowRangeAdd-title").val(f.name),$("#protection-allowRangeAdd-range input").val(f.sqref),f.algorithmName=="None"?$("#protection-allowRangeAdd-password").val(f.password):$("#protection-allowRangeAdd-password").val("\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"),$("#protection-allowRangeAdd-hint").val(f.hintText)}),$(document).off("click.luckysheetProtection.rangeItemDelete").on("click.luckysheetProtection.rangeItemDelete","#luckysheet-protection-rangeItem-container .luckysheet-protection-rangeItem-del",function(a){let o=$(a.target).closest(".luckysheet-protection-rangeItem"),u=$("#luckysheet-protection-rangeItem-container").find("> div.luckysheet-protection-rangeItem").index(o),f=un[u];un.splice(u,1),o.remove()}),$(document).off("click.luckysheetProtection.rangeItemConfirm").on("click.luckysheetProtection.rangeItemConfirm","#luckysheet-protection-rangeItem-confirm",function(){let a=$("#protection-allowRangeAdd-title").val(),o=$("#protection-allowRangeAdd-range input").val(),s=$("#protection-allowRangeAdd-password").val(),u=$("#protection-allowRangeAdd-hint").val();if(a.length==0){alert(t.rangeItemErrorTitleNull);return}let f=Ye.getRangeByTxt(o);if(o.length==0){alert(t.rangeItemErrorRangeNull);return}if(f.length==0){alert(t.rangeItemErrorRange);return}if(o=sd(o),Js){let d={name:a,password:s,hintText:u,algorithmName:"None",saltValue:null,checkRangePasswordUrl:null,sqref:o};nd(d),un.push(d)}else{let d=td,m=un[d];m.name=a,m.sqref=o,m.hintText=u,s!="\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"&&(m.password=s,m.algorithmName="None");let y=$("#luckysheet-protection-rangeItem-container").find("> div.luckysheet-protection-rangeItem").eq(d),v=y.find(".luckysheet-protection-rangeItem-name"),b="";s!=null&&s.length>0&&(b='<i class="icon iconfont luckysheet-iconfont-bianji2" title="'+t.rangeItemHasPassword+'"></i>'),v.html(a+b).attr("title",a),y.find(".luckysheet-protection-rangeItem-range").html(o).attr("title",o)}$("#luckysheet-protection-rangeItem-dialog").hide(),$("#luckysheet-modal-dialog-mask").hide()}),$(document).off("click.luckysheetProtection.validationConfirm").on("click.luckysheetProtection.validationConfirm","#luckysheet-protection-sheet-validation-confirm",function(a){let o=$("#luckysheet-protection-sheet-validation"),s=wo;if(s==null){tc(wo),o.hide(),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-modal-dialog-slider-protection").show(),zt();return}let f=o.find("input").val();if(f==null||f.length==0){alert(t.checkPasswordNullalert);return}if(s.algorithmName!=null&&s.algorithmName!="None")if(s.saltValue!=null&&s.saltValue.length>0){var d=CryptoApi.getHasher(s.algorithmName);f=CryptoApi.hmac(s.saltValue,f,d)}else f=CryptoApi.hash(s.algorithmName,f);f==s.password?(tc(wo),o.hide(),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-modal-dialog-slider-protection").show(),zt(),Qs=!1):alert(t.checkPasswordWrongalert)}),$("#luckysheet-protection-check-selectLockedCells").change(function(){let a=$("#luckysheet-protection-check-selectLockedCells"),o=$("#luckysheet-protection-check-selectunLockedCells"),s=a.is(":checked"),u=o.is(":checked");s&&o.prop("checked",!0)}),$("#luckysheet-protection-check-selectunLockedCells").change(function(){let a=$("#luckysheet-protection-check-selectLockedCells"),o=$("#luckysheet-protection-check-selectunLockedCells"),s=a.is(":checked");o.is(":checked")||a.prop("checked",!1)}),$(document).off("click.luckysheetProtection.dvRange").on("click.luckysheetProtection.dvRange","#protection-allowRangeAdd-range .fa-table",function(a){$("#luckysheet-protection-rangeItem-dialog").hide();let o="0",s=$(this).siblings("input").val().trim();Ye.rangeDialog(o,s),Ye.selectRange=[];let u=Ye.getRangeByTxt(s);if(u.length>0)for(let f=0;f<u.length;f++){let d=u[f].row[0],m=u[f].row[1],g=u[f].column[0],y=u[f].column[1],v=h.visibledatarow[m],b=d-1==-1?0:h.visibledatarow[d-1],k=h.visibledatacolumn[y],w=g-1==-1?0:h.visibledatacolumn[g-1];Ye.selectRange.push({left:w,width:k-w-1,top:b,height:v-b-1,left_move:w,width_move:k-w-1,top_move:b,height_move:v-b-1,row:[d,m],column:[g,y],row_focus:d,column_focus:g})}Ot(Ye.selectRange)}),$(document).off("click.luckysheetProtection.dvRange2").on("click.luckysheetProtection.dvRange2","#luckysheet-protection-rangeItem-dialog .show-box-item-dropdown .range .fa-table",function(a){$("#luckysheet-protection-rangeItem-dialog").hide();let o="1",s=$(this).siblings("input").val().trim();Ye.rangeDialog(o,s),Ye.selectRange=[];let u=Ye.getRangeByTxt(s);if(u.length>0)for(let f=0;f<u.length;f++){let d=u[f].row[0],m=u[f].row[1],g=u[f].column[0],y=u[f].column[1],v=h.visibledatarow[m],b=d-1==-1?0:h.visibledatarow[d-1],k=h.visibledatacolumn[y],w=g-1==-1?0:h.visibledatacolumn[g-1];Ye.selectRange.push({left:w,width:k-w-1,top:b,height:v-b-1,left_move:w,width_move:k-w-1,top_move:b,height_move:v-b-1,row:[d,m],column:[g,y],row_focus:d,column_focus:g})}Ot(Ye.selectRange)}),$(document).off("click.luckysheetProtection.dvRangeConfirm").on("click.luckysheetProtection.dvRangeConfirm","#luckysheet-dataVerificationRange-dialog-confirm",function(a){let o=$(this).parents("#luckysheet-dataVerificationRange-dialog").find("input").val(),s=$("#protection-allowRangeAdd-range input"),u=s.val();u.substr(u.length-1,1)==","?s.val(u+o):s.val(o),$("#luckysheet-dataVerificationRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-protection-rangeItem-dialog").show(),Ot([])}),$(document).off("click.luckysheetProtection.dvRangeClose").on("click.dvRangeClose","#luckysheet-dataVerificationRange-dialog-close",function(a){$("#luckysheet-dataVerificationRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-protection-rangeItem-dialog").show(),Ot([])}),$(document).on("click.luckysheetProtection.luckysheetProtection","#luckysheet-dataVerificationRange-dialog .luckysheet-modal-dialog-title-close",function(a){$("#luckysheet-dataVerificationRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-protection-rangeItem-dialog").show(),Ot([])})}function ad(e){if(ed)return;ed=!0;let n=Q(),t=n.protection,l=n.button;$("body").append(_e(dt,{id:"luckysheet-protection-rangeItem-dialog",addclass:"luckysheet-protection-rangeItem-dialog",title:t.allowRangeTitle,content:` |
| | | <div class="luckysheet-protection-rangeItem-content"> |
| | | <div class="luckysheet-slider-protection-row"> |
| | | <div class="luckysheet-slider-protection-column luckysheet-protection-column-3x"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | `;$("body").append(o),$("body").append(_e(ft,{id:"luckysheet-protection-sheet-validation",addclass:"luckysheet-protection-sheet-validation",title:t.validationTitle,content:` |
| | | `;$("body").append(o),$("body").append(_e(dt,{id:"luckysheet-protection-sheet-validation",addclass:"luckysheet-protection-sheet-validation",title:t.validationTitle,content:` |
| | | <div class="luckysheet-slider-protection-row"> |
| | | <div class="luckysheet-slider-protection-column luckysheet-protection-column-10x"> |
| | | ${t.validationTips} |
| | |
| | | </div> |
| | | </div> |
| | | `,botton:`<button id="luckysheet-protection-sheet-validation-confirm" class="btn btn-primary">${l.confirm}</button> |
| | | <button class="btn btn-default luckysheet-model-close-btn">${l.cancel}</button>`,style:"z-index:100003"}))}function tc(e){e==null&&(e={});for(let a=0;a<qa.length;a++){let o=qa[a],s="luckysheet-protection-check-"+o,u=e[o];u==null&&(u=0),u==null&&o in{selectLockedCells:1,selectunLockedCells:1}&&(u=1),$("#"+s).prop("checked",u==1)}e.password!=null&&e.password.length>0?e.algorithmName=="None"||e.algorithmName==null?$("#protection-password").val(e.password):$("#protection-password").val("\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"):$("#protection-password").val("");let n=e.sheet;e.sheet==null&&(n=0),$("#protection-swichProtectionState").prop("checked",n==1);let t=e.hintText;t==null&&(t=""),$("#protection-hint").val(t),un=[],$("#luckysheet-protection-rangeItem-container").empty();let l=e.allowRangeList;if(l!=null&&l.length>0)for(let a=0;a<l.length;a++){let o=l[a];rf(o),un.push(o)}}function af(e){if(Jd||(tv(e),ev(e),Jd=!0),tf=e,e!=null&&e.config!=null&&e.config.authority!=null){let n=e.config.authority;if(Qs&&n.sheet==1&&n.password!=null&&n.password.length>0){wo=n,$("#luckysheet-protection-sheet-validation input").val(""),fa("luckysheet-protection-sheet-validation");return}else tc(n)}else $("#luckysheet-protection-check-selectLockedCells").prop("checked",!0),$("#luckysheet-protection-check-selectunLockedCells").prop("checked",!0);$("#luckysheet-modal-dialog-slider-protection").show(),zt()}function of(){$("#luckysheet-protection-rangeItem-dialog").hide(),$("#luckysheet-modal-dialog-slider-protection").hide(),zt()}function lc(e,n,t,l,a=!0,o=!0){let s=!1,u=t.allowRangeList;if(u!=null&&u.length>0){let d=!1;for(let f=0;f<u.length;f++){let m=u[f],g=m.sqref,y=Ye.getRangeByTxt(g);if(y.length>0)for(let v=0;v<y.length;v++){let b=y[v].row[0],k=y[v].row[1],w=y[v].column[0],x=y[v].column[1];if(e>=b&&e<=k&&n>=w&&n<=x){d=!0;break}}if(d){let v=m.password;if(v!=null&&v.length>0&&!(g in ec))return a&&(lv(m),$("#luckysheet-selection-copy .luckysheet-selection-copy").hide()),!1;s=!0;break}}}if(!s&&!o&&(s=!0),!s&&a){let d;t.hintText!=null&&t.hintText.length>0?d=t.hintText:d=l.defaultSheetHintText,U.info("",d),$("#luckysheet-selection-copy .luckysheet-selection-copy").hide()}return s}function lv(e){let n=Q(),t=n.protection,l=n.button;lf||$("body").append(_e(ft,{id:"luckysheet-protection-range-validation",addclass:"luckysheet-protection-sheet-validation",title:t.validationTitle,content:` |
| | | <button class="btn btn-default luckysheet-model-close-btn">${l.cancel}</button>`,style:"z-index:100003"}))}function tc(e){e==null&&(e={});for(let a=0;a<qa.length;a++){let o=qa[a],s="luckysheet-protection-check-"+o,u=e[o];u==null&&(u=0),u==null&&o in{selectLockedCells:1,selectunLockedCells:1}&&(u=1),$("#"+s).prop("checked",u==1)}e.password!=null&&e.password.length>0?e.algorithmName=="None"||e.algorithmName==null?$("#protection-password").val(e.password):$("#protection-password").val("\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"):$("#protection-password").val("");let n=e.sheet;e.sheet==null&&(n=0),$("#protection-swichProtectionState").prop("checked",n==1);let t=e.hintText;t==null&&(t=""),$("#protection-hint").val(t),un=[],$("#luckysheet-protection-rangeItem-container").empty();let l=e.allowRangeList;if(l!=null&&l.length>0)for(let a=0;a<l.length;a++){let o=l[a];nd(o),un.push(o)}}function id(e){if(Qf||(tv(e),ev(e),Qf=!0),ld=e,e!=null&&e.config!=null&&e.config.authority!=null){let n=e.config.authority;if(Qs&&n.sheet==1&&n.password!=null&&n.password.length>0){wo=n,$("#luckysheet-protection-sheet-validation input").val(""),da("luckysheet-protection-sheet-validation");return}else tc(n)}else $("#luckysheet-protection-check-selectLockedCells").prop("checked",!0),$("#luckysheet-protection-check-selectunLockedCells").prop("checked",!0);$("#luckysheet-modal-dialog-slider-protection").show(),zt()}function od(){$("#luckysheet-protection-rangeItem-dialog").hide(),$("#luckysheet-modal-dialog-slider-protection").hide(),zt()}function lc(e,n,t,l,a=!0,o=!0){let s=!1,u=t.allowRangeList;if(u!=null&&u.length>0){let f=!1;for(let d=0;d<u.length;d++){let m=u[d],g=m.sqref,y=Ye.getRangeByTxt(g);if(y.length>0)for(let v=0;v<y.length;v++){let b=y[v].row[0],k=y[v].row[1],w=y[v].column[0],x=y[v].column[1];if(e>=b&&e<=k&&n>=w&&n<=x){f=!0;break}}if(f){let v=m.password;if(v!=null&&v.length>0&&!(g in ec))return a&&(lv(m),$("#luckysheet-selection-copy .luckysheet-selection-copy").hide()),!1;s=!0;break}}}if(!s&&!o&&(s=!0),!s&&a){let f;t.hintText!=null&&t.hintText.length>0?f=t.hintText:f=l.defaultSheetHintText,U.info("",f),$("#luckysheet-selection-copy .luckysheet-selection-copy").hide()}return s}function lv(e){let n=Q(),t=n.protection,l=n.button;rd||$("body").append(_e(dt,{id:"luckysheet-protection-range-validation",addclass:"luckysheet-protection-sheet-validation",title:t.validationTitle,content:` |
| | | <div class="luckysheet-slider-protection-row"> |
| | | <div id="luckysheet-protection-range-validation-hint" class="luckysheet-slider-protection-column luckysheet-protection-column-10x"> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | `,botton:`<button id="luckysheet-protection-range-validation-confirm" class="btn btn-primary">${l.confirm}</button> |
| | | <button class="btn btn-default luckysheet-model-close-btn">${l.cancel}</button>`,style:"z-index:100003"})),lf=!0,fa("luckysheet-protection-range-validation");let a=$("#luckysheet-protection-range-validation-hint");e.hintText!=null&&e.hintText.length>0?a.html(e.hintText):a.html(t.defaultRangeHintText);let o=$("#luckysheet-protection-range-validation"),s=o.find("input");s.val(""),$("#luckysheet-protection-range-validation-confirm").off("click").on("click",function(){let u=s.val();if(u==null||u.length==0){alert(t.checkPasswordNullalert);return}if(e.algorithmName!=null&&e.algorithmName!="None")if(e.saltValue!=null&&e.saltValue.length>0){var d=CryptoApi.getHasher(e.algorithmName);u=CryptoApi.hmac(e.saltValue,u,d)}else u=CryptoApi.hash(e.algorithmName,u);u==e.password?(ec[e.sqref]=1,o.hide(),$("#luckysheet-modal-dialog-mask").hide(),alert(t.checkPasswordSucceedalert)):alert(t.checkPasswordWrongalert)})}function jr(e){let n=ve.getSheetByIndex(e);if(n==null||n.config==null||n.config.authority==null)return!0;let t=n.config.authority;if(t==null||t.sheet==null||t.sheet==0)return!0;let a=Q().protection,o;return t.hintText!=null&&t.hintText.length>0?o=t.hintText:o=a.defaultSheetHintText,U.info("",o),!1}function wn(e,n,t,l=!0,a=!0){let o=ve.getSheetByIndex(t);if(o==null||o.config==null||o.config.authority==null)return!0;let s=o.data,u=s[e][n],d=o.config.authority;if(d==null||d.sheet==null||d.sheet==0||u&&u.lo===0)return!0;let m=Q().protection;return lc(e,n,d,m,l,a)}function xo(e,n,t){let l=ve.getSheetByIndex(t);if(!l||l.data&&!l.data[e]||l.data&&!l.data[e][n]||l.config==null||l.config.authority==null)return!0;let a=l.data,o=a[e][n],s=l.config.authority;return s==null||s.sheet==null||s.sheet==0||o==null||o.hi==null||o.hi==0}function vr(e,n){let t=ve.getSheetByIndex(n);if(t==null||t.config==null||t.config.authority==null)return!0;let l=t.config.authority;if(l==null||l.sheet==null||l.sheet==0||e==null||e.length==0)return!0;let o=Q().protection;for(let s=0;s<e.length;s++){let u=e[s].row[0],d=e[s].row[1],f=e[s].column[0],m=e[s].column[1];for(let g=u;g<=d;g++)for(let y=f;y<=m;y++){let v=t.data[g][y]||{},b=v.lo===void 0||v.lo===1;if(!lc(g,y,l,o,!0,b))return!1}}return!0}function rc(e,n,t){let a=Q().protection,o=ve.getSheetByIndex(t);if(o==null||o.config==null||o.config.authority==null)return!0;let s=o.data,u=s[e][n],d=o.config.authority;return d==null||d.sheet==null||d.sheet==0?!0:u&&u.lo===0||lc(e,n,d,a,!1)?d.selectunLockedCells==1||d.selectunLockedCells==null:d.selectLockedCells==1||d.selectLockedCells==null}function Di(e){let t=Q().protection,l=ve.getSheetByIndex(e);if(l==null||l.config==null||l.config.authority==null)return!0;let a=l.config.authority;if(a==null||a.sheet==null||a.sheet==0)return!0;let o=!1;(a.selectunLockedCells==1||a.selectunLockedCells==null)&&(o=!0);let s=!1;return(a.selectLockedCells==1||a.selectLockedCells==null)&&(s=!0),!!(o&&s)}function Rr(e){let n=ve.getSheetByIndex(e);if(n==null||n.config==null||n.config.authority==null)return!0;let t=n.config.authority;if(t==null||t.sheet==null||t.sheet==0||t.formatCells==1||t.formatCells==null)return!0;let a=Q().protection,o;return t.hintText!=null&&t.hintText.length>0?o=t.hintText:o=a.defaultSheetHintText,U.info("",o),!1}function $t(e,n="formatColumns",t=!0){let l=ve.getSheetByIndex(e);if(l==null||l.config==null||l.config.authority==null)return!0;let a=l.config.authority;if(a==null||a.sheet==null||a.sheet==0||a[n]==1||a[n]==null)return!0;if(t){let s=Q().protection,u;a.hintText!=null&&a.hintText.length>0?u=a.hintText:u=s.defaultSheetHintText,U.info("",u)}return!1}var Jd,Qd,un,Js,ef,wo,tf,Qs,ec,lf,qa,Ml=Ie(()=>{Xe();bt();Gt();Nt();An();fl();pr();yr();dt();Zt();ll();Vr();Jd=!1,Qd=!1,un=[],Js=!0,ef=null,wo=null,tf=null,Qs=!0,ec={},lf=!1,qa=["selectLockedCells","selectunLockedCells","formatCells","formatColumns","formatRows","insertColumns","insertRows","insertHyperlinks","deleteColumns","deleteRows","sort","filter","usePivotTablereports","editObjects","editScenarios"]});function Hr(e,n,t){t==null&&(t=!0);let l=function(o,s){let u=o[n],d=s[n];if(P(o[n])=="object"&&(u=o[n].v),P(s[n])=="object"&&(d=s[n].v),me(u))return 1;if(me(d))return-1;if(Lt(u)&&Lt(d))return ul(u,d);if(B(u)&&B(d))return(0,xn.default)(u).value()-(0,xn.default)(d).value();if(!B(u)&&!B(d))return u.localeCompare(d,"zh");if(B(u)){if(!B(d))return-1}else return 1},a=function(o,s){let u=o[n],d=s[n];if(P(o[n])=="object"&&(u=o[n].v),P(s[n])=="object"&&(d=s[n].v),me(u))return 1;if(me(d))return-1;if(Lt(u)&&Lt(d))return ul(d,u);if(B(u)&&B(d))return(0,xn.default)(d).value()-(0,xn.default)(u).value();if(!B(u)&&!B(d))return d.localeCompare(u,"zh");if(B(u)){if(!B(d))return 1}else return-1};return t?e.sort(l):e.sort(a)}function bo(e,n){n==null&&(n=!0);let t=function(a,o){let s=a,u=o;if(P(a)=="object"&&(s=a.v),P(o)=="object"&&(u=o.v),s==null&&(s=""),u==null&&(u=""),Lt(s)&&Lt(u))return ul(s,u);if(B(s)&&B(u))return(0,xn.default)(s).value()-(0,xn.default)(u).value();if(!B(s)&&!B(u))return s.localeCompare(u,"zh");if(B(s)){if(!B(u))return-1}else return 1},l=function(a,o){let s=a,u=o;if(P(a)=="object"&&(s=a.v),P(o)=="object"&&(u=o.v),s==null&&(s=""),u==null&&(u=""),Lt(s)&&Lt(u))return ul(u,s);if(B(s)&&B(u))return(0,xn.default)(u).value()-(0,xn.default)(s).value();if(!B(s)&&!B(u))return u.localeCompare(s,"zh");if(B(s)){if(!B(u))return 1}else return-1};return n?e.sort(t):e.sort(l)}function nc(e){if(!$t(h.currentSheetIndex,"sort"))return;let t=Q().sort;if(h.luckysheet_select_save.length>1){de()?alert(t.noRangeError):U.info(t.noRangeError,"");return}e==null&&(e=!0);let l=xe.deepCopyFlowData(h.flowdata),a=h.luckysheet_select_save[0].row[0],o=h.luckysheet_select_save[0].row[1],s=h.luckysheet_select_save[0].column[0],u=h.luckysheet_select_save[0].column[1],d,f;for(let v=a;v<=o;v++)if(l[v]!=null&&l[v][s]!=null){let b=l[v][s];if(b.mc!=null||me(b.v))continue;if(d==null&&/[\u4e00-\u9fa5]+/g.test(b.v)){d=v+1,f=v+1;continue}d==null&&(d=v),f=v}if(d==null||d>o)return;let m=!1,g=[];for(let v=d;v<=f;v++){let b=[];for(let k=s;k<=u;k++){if(l[v][k]!=null&&l[v][k].mc!=null){m=!0;break}b.push(l[v][k])}g.push(b)}if(m){de()?alert(t.mergeError):U.info(t.mergeError,"");return}g=Hr(g,0,e);for(let v=d;v<=f;v++)for(let b=s;b<=u;b++)l[v][b]=g[v-d][b-s];let y={};if(h.config.rowlen!=null){let v=$.extend(!0,{},h.config);v=yl(l,d,f,v),y={cfg:v,RowlChange:!0}}Ze(l,[{row:[d,f],column:[s,u]}],y)}function ac(e,n){if(!$t(h.currentSheetIndex,"sort"))return;n==null&&(n=!0);let l=Q().sort,a=xe.deepCopyFlowData(h.flowdata),o=0,s=a.length-1,u=0,d=a[0].length-1,f,m;for(let b=o;b<=s;b++)if(!(a[b][e]!=null&&a[b][e].mc!=null)){if(a[b][e]!=null&&!me(a[b][e].v)&&/[\u4e00-\u9fa5]+/g.test(a[b][e].v)&&f==null){f=b+1,m=b+1;continue}f==null&&(f=b),a[b][e]!=null&&!me(a[b][e].v)&&(m=b)}if(f==null||f>s)return;let g=!1,y=[];for(let b=f;b<=m;b++){let k=[];for(let w=u;w<=d;w++){if(a[b][w]!=null&&a[b][w].mc!=null){g=!0;break}k.push(a[b][w])}y.push(k)}if(g){de()?alert(l.columnSortMergeError):U.info(l.columnSortMergeError,"");return}y=Hr(y,e,n);for(let b=f;b<=m;b++)for(let k=u;k<=d;k++)a[b][k]=y[b-f][k-u];let v={};if(h.config.rowlen!=null){let b=$.extend(!0,{},h.config);b=yl(a,f,m,b),v={cfg:b,RowlChange:!0}}Ze(a,[{row:[f,m],column:[u,d]}],v)}var xn,ua=Ie(()=>{dt();Ft();Or();ll();Jt();mr();Yt();Ml();Xe();bt();xn=Fl(sa())});var rv,cf,uf=Ie(()=>{Kt();rv={transpose:function(e,n=!0){let t=[];if(e.length==0)return[];if(e[0].length==0)return[];for(let l=0;l<e[0].length;l++){let a=[];for(let o=0;o<e.length;o++){let s="";e[o]!=null&&e[o][l]!=null&&(n?s=ze(o,l,e):s=e[o][l]),a.push(s)}t.push(a)}return t},minusClear:function(e,n){if(n.row[0]>e.row[1]||n.row[1]<e.row[0]||n.column[0]>e.column[1]||n.column[1]<e.column[0])return null;if(n.row[0]==e.row[0]&&n.row[1]<e.row[1]&&n.column[0]>e.column[0]&&n.column[1]<e.column[1])return[];let t=[],l={row:[],column:[]},a=null,o=[e.column[0],e.column[1]];n.row[1]>e.row[0]&&n.row[1]<e.row[1]?a=[n.row[1]+1,e.row[1]]:n.row[0]>e.row[0]&&n.row[0]<e.row[1]&&(a=[e.row[0],n.row[0]-1]),a!=null&&t.push({row:a,column:o});let s=[e.row[0],e.row[1]],u=null;return n.column[1]>e.column[0]&&n.column[1]<e.column[1]?u=[n.column[1]+1,e.column[1]]:n.column[0]>e.column[0]&&n.column[0]<e.column[1]&&(u=[e.column[0],n.column[0]-1]),u!=null&&t.push({row:s,column:u}),t}},cf=rv});var nv,Mi,hf=Ie(()=>{dt();nv={STDEVP:function(e,n){let t=0;for(let l=0;l<n.length;l++){let a=n[l];t+=Math.pow(a-e,2)}return Il(Math.sqrt(t/n.length))},STDEV:function(e,n){let t=0;for(let l=0;l<n.length;l++){let a=n[l];t+=Math.pow(a-e,2)}return Il(Math.sqrt(t/(n.length-1)))},VARP:function(e,n){let t=0;for(let l=0;l<n.length;l++){let a=n[l];t+=Math.pow(a-e,2)}return Il(t/n.length)},let:function(e,n){let t=0;for(let l=0;l<n.length;l++){let a=n[l];t+=Math.pow(a-e,2)}return Il(t/(n.length-1))}},Mi=nv});var Fi,df,Oe,on=Ie(()=>{Nt();dt();Kt();Or();Al();Ft();ua();Yt();ll();Jt();Vr();uf();hf();Zt();Lr();Gt();fl();pr();Qt();Ml();Xe();bt();Fi=Fl(sa());Gt();df={pivotDatas:null,pivotSheetIndex:0,pivotDataSheetIndex:0,celldata:null,origindata:null,getCellData:function(e,n,t){let l=this,a;e!=null?a=e:a=h.currentSheetIndex;let o=Z(a);P(h.luckysheetfile[o].pivotTable)!="object"&&(h.luckysheetfile[o].pivotTable=new Function("return "+h.luckysheetfile[o].pivotTable)()),h.luckysheetfile[o].pivotTable!=null?(l.column=h.luckysheetfile[o].pivotTable.column,l.row=h.luckysheetfile[o].pivotTable.row,l.values=h.luckysheetfile[o].pivotTable.values,l.filter=h.luckysheetfile[o].pivotTable.filter,l.showType=h.luckysheetfile[o].pivotTable.showType,l.filterparm=h.luckysheetfile[o].pivotTable.filterparm,h.luckysheetfile[o].pivotTable.drawPivotTable!=null?l.drawPivotTable=h.luckysheetfile[o].pivotTable.drawPivotTable:l.drawPivotTable=!0,h.luckysheetfile[o].pivotTable.pivotTableBoundary!=null?l.pivotTableBoundary=h.luckysheetfile[o].pivotTable.pivotTableBoundary:l.pivotTableBoundary=[12,6],t!=null?l.pivot_select_save=t:l.pivot_select_save=h.luckysheetfile[o].pivotTable.pivot_select_save,n!=null?l.pivotDataSheetIndex=n:l.pivotDataSheetIndex=h.luckysheetfile[o].pivotTable.pivotDataSheetIndex):(l.column=null,l.row=null,l.values=null,l.filter=null,l.showType=null,l.filterparm=null,l.drawPivotTable=!0,l.pivotTableBoundary=[12,6],t!=null?l.pivot_select_save=t:l.pivot_select_save=h.luckysheet_select_save,n!=null?l.pivotDataSheetIndex=n:l.pivotDataSheetIndex=a);let s=Z(l.pivotDataSheetIndex),u=h.luckysheetfile[s];u.data==null&&(u.data=ve.buildGridData(u)),l.origindata=Si(u.data,l.pivot_select_save);let d={};if(l.filterparm!=null)for(let m in l.filterparm)for(let g in l.filterparm[m])g==="rowhidden"&&l.filterparm[m][g]!=null&&(d=$.extend(!0,d,l.filterparm[m][g]));l.rowhidden=d,l.pivotSheetIndex=a;let f=[];for(let m=0;m<l.origindata.length;m++)l.rowhidden!=null&&l.rowhidden[m]!=null||f.push([].concat(l.origindata[m]));l.celldata=f,l.pivot_data_type={};for(let m=0;m<l.celldata[1].length;m++){let g=tr(l.celldata[1][m]);l.pivot_data_type[m.toString()]=g}},pivot_data_type:{},pivot_select_save:null,column:null,row:null,values:null,filter:null,showType:null,rowhidden:null,selected:null,caljs:null,initial:!0,filterparm:null,luckysheet_pivotTable_select_state:!1,jgridCurrentPivotInput:null,movestate:!1,moveitemposition:[],movesave:{},showvaluecolrow:function(){let e=this;$("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").length>=2?($("#luckysheetpivottablevaluecolrowshow").show(),e.showType=="column"?($("#luckysheetpivottablevaluecolrow").prop("checked",!0),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").addClass("ui-state-active"),$("#luckysheetpivottablevaluecolrow1").prop("checked",!1),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").removeClass("ui-state-active")):($("#luckysheetpivottablevaluecolrow1").prop("checked",!0),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").addClass("ui-state-active"),$("#luckysheetpivottablevaluecolrow").prop("checked",!1),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").removeClass("ui-state-active"))):$("#luckysheetpivottablevaluecolrowshow").hide()},resetOrderby:function(e){let n=$("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").index(e);$("#luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").find(".luckysheet-modal-dialog-slider-config-item").each(function(){$(this).data("orderby")==n&&$(this).data("orderby","self")})},luckysheetsliderlistclearfilter:function(e){let n=this,t=e.parent(),l=t.data("index"),a={},o={},s=n.origindata,u={};t.data("rowhidden","").find(".luckysheet-slider-list-item-filtered").hide(),n.setDatatojsfile("selected",{},l),n.setDatatojsfile("rowhidden",null,l);let d=[];for(let f=0;f<s.length;f++)a[f]==null&&d.push([].concat(s[f]));n.celldata=d,n.refreshPivotTable(),$("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide()},luckysheetsliderlistitemfilter:function(e){let n=this,l=Q().filter,a=e.parent(),o=a.offset(),s=$("#luckysheet-pivotTableFilter-menu"),u=$(window).height(),d=$(window).width(),f=a.data("index"),m=a.data("rowhidden");m==null||m==""?m={}:P(m)=="string"&&(m=JSON.parse(m)),$("body .luckysheet-cols-menu").hide(),$("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(),$("#luckysheet-pivotTableFilter-byvalue-input").val(""),$("#luckysheet-pivotTableFilter-bycondition").next().hide(),$("#luckysheet-pivotTableFilter-byvalue").next().show(),s.data("index",f),$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").hide().find("input").val(),$("#luckysheet-pivotTableFilter-selected span").data("type","0").data("type",null).text(l.filiterInputNone);let g=a.data("byconditiontype");if($("#luckysheet-pivotTableFilter-selected span").data("value",a.data("byconditionvalue")).data("type",g).text(a.data("byconditiontext")),g=="2"){let k=$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input2").show().find("input");k.eq(0).val(a.data("byconditionvalue1")),k.eq(1).val(a.data("byconditionvalue2"))}else g=="1"&&$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").eq(0).show().find("input").val(a.data("byconditionvalue1"));let y=Er("#luckysheet-pivotTableFilter-byvalue-select",{text:l.filiterMoreDataTip});$("#luckysheet-pivotTableFilter-byvalue-select").empty().append(y.el);let v={};$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").not(a.get(0)).each(function(){let k=$(this),w=k.data("rowhidden");if(w==null||w=="")return!0;P(w)=="string"&&(w=JSON.parse(w));for(let x in w)v[x]=0});let b=n.origindata;setTimeout(function(){let k={},w={},x={},C={};for(let T=1;T<b.length;T++){if(T in v||b[T]==null)continue;let A=b[T][f];if(A!=null&&A.ct!=null&&A.ct.t=="d"){let R=mt("YYYY-MM-DD",A.v),I=R.split("-")[0],F=R.split("-")[1],z=R.split("-")[2];I in k||(k[I]={}),F in k[I]||(k[I][F]={}),z in k[I][F]||(k[I][F][z]=0),k[I][F][z]++,T in m&&(w[I]=0,w[F]=0,w[z]=0)}else{let R,I;A==null||me(A.v)?(R=null,I=null):(R=A.v,I=A.m),R in x||(x[R]={}),I in x[R]||(x[R][I]=0),x[R][I]++,T in m&&(C[R+"#$$$#"+I]=0)}}let S=[];if(JSON.stringify(k).length>2)for(let T in k){let A=0,R="";for(let F in k[T]){let z=0,M="";for(let N in k[T][F]){let L=k[T][F][N];z+=L;let O;Number(F)<10?O="0"+Number(F):O=F;let V;Number(N)<10?V="0"+Number(N):V=N,T in w&&F in w&&N in w?M+='<div class="day luckysheet-mousedown-cancel cf" data-check="false" title="'+T+"-"+O+"-"+V+'"><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+N+'</label><span class="count luckysheet-mousedown-cancel">( '+L+" )</span></div>":M+='<div class="day luckysheet-mousedown-cancel cf" data-check="true" title="'+T+"-"+O+"-"+V+'"><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+N+'</label><span class="count luckysheet-mousedown-cancel">( '+L+" )</span></div>"}A+=z;let E;Number(F)<10?E="0"+Number(F):E=F,T in w&&F in w?R+='<div class="monthBox luckysheet-mousedown-cancel"><div class="month luckysheet-mousedown-cancel cf" data-check="false" title="'+T+"-"+E+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+F+""+l.filiterMonthText+'</label><span class="count luckysheet-mousedown-cancel">( '+z+' )</span></div><div class="dayList luckysheet-mousedown-cancel">'+M+"</div></div>":R+='<div class="monthBox luckysheet-mousedown-cancel"><div class="month luckysheet-mousedown-cancel cf" data-check="true" title="'+T+"-"+E+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+F+""+l.filiterMonthText+'</label><span class="count luckysheet-mousedown-cancel">( '+z+' )</span></div><div class="dayList luckysheet-mousedown-cancel">'+M+"</div></div>"}let I;T in w?I='<div class="yearBox luckysheet-mousedown-cancel"><div class="year luckysheet-mousedown-cancel cf" data-check="false" title="'+T+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+T+""+l.filiterYearText+'</label><span class="count luckysheet-mousedown-cancel">( '+A+' )</span></div><div class="monthList luckysheet-mousedown-cancel">'+R+"</div></div>":I='<div class="yearBox luckysheet-mousedown-cancel"><div class="year luckysheet-mousedown-cancel cf" data-check="true" title="'+T+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+T+""+l.filiterYearText+'</label><span class="count luckysheet-mousedown-cancel">( '+A+' )</span></div><div class="monthList luckysheet-mousedown-cancel">'+R+"</div></div>",S.unshift(I)}if(JSON.stringify(x).length>2){let T=Object.keys(x);T=bo(T,!0);for(let A=0;A<T.length;A++){let R=T[A];for(let I in x[R]){let F;R+"#$$$#"+I=="null#$$$#null"?F=l.valueBlank:F=I;let z;R+"#$$$#"+I in C?z='<div class="textBox luckysheet-mousedown-cancel cf" data-check="false" data-filter="'+(R+"#$$$#"+I)+'" title="'+I+'"><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+F+'</label><span class="luckysheet-mousedown-cancel count">( '+x[R][I]+" )</span></div>":z='<div class="textBox luckysheet-mousedown-cancel cf" data-check="true" data-filter="'+(R+"#$$$#"+I)+'" title="'+I+'"><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+F+'</label><span class="luckysheet-mousedown-cancel count">( '+x[R][I]+" )</span></div>",S.push(z)}}}let _=u-o.top-350;_<0&&(_=100),$("#luckysheet-pivotTableFilter-byvalue-select").append("<div class='ListBox luckysheet-mousedown-cancel' style='max-height:"+_+"px;overflow-y:auto;overflow-x:hidden;'>"+S.join("")+"</div>"),y.close()},1),sn(s,o.left-250,o.top)},getSumTypeName:function(e){let n="",l=Q().pivotTable;return e=="SUM"?n=l.valueStatisticsSUM:e=="COUNT"?n=l.valueStatisticsCOUNT:e=="COUNTA"?n=l.valueStatisticsCOUNTA:e=="COUNTUNIQUE"?n=l.valueStatisticsCOUNTUNIQUE:e=="AVERAGE"?n=l.valueStatisticsAVERAGE:e=="MAX"?n=l.valueStatisticsMAX:e=="MIN"?n=l.valueStatisticsMIN:e=="MEDIAN"?n=l.valueStatisticsMEDIAN:e=="PRODUCT"?n=l.valueStatisticsPRODUCT:e=="STDEV"?n=l.valueStatisticsSTDEV:e=="STDEVP"?n=l.valueStatisticsSTDEVP:e=="let"?n=l.valueStatisticslet:e=="VARP"&&(n=l.valueStatisticsVARP),n},setDatatojsfile:function(e,n,t){let l=this,a=Z(l.pivotSheetIndex);h.luckysheetfile[a].pivotTable==null&&(h.luckysheetfile[a].pivotTable={}),t==null?(h.luckysheetfile[a].pivotTable[e]=n,l[e]=n):(h.luckysheetfile[a].pivotTable.filterparm==null&&(h.luckysheetfile[a].pivotTable.filterparm={}),h.luckysheetfile[a].pivotTable.filterparm[t.toString()]==null&&(h.luckysheetfile[a].pivotTable.filterparm[t.toString()]={}),h.luckysheetfile[a].pivotTable.filterparm[t.toString()][e]=n,l.filterparm==null&&(l.filterparm={}),l.filterparm[t.toString()]==null&&(l.filterparm[t.toString()]={}),l.filterparm[t.toString()][e]=n)},createPivotTable:function(e){if(de()||h.allowEdit===!1)return;let n=this,t=h.currentSheetIndex,a=Q().pivotTable;if(de()){alert(a.errorNotAllowEdit);return}if(h.luckysheet_select_save.length>1){U.info("",a.errorNotAllowMulti);return}if(h.luckysheet_select_save.length==0||h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]||h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]){U.info("",a.errorSelectRange);return}let o=$.extend(!0,{},h.luckysheet_select_save[0]);ve.addNewSheet(e,!0),n.getCellData(h.currentSheetIndex,t,o),n.setDatatojsfile("pivot_select_save",o),n.setDatatojsfile("pivotDataSheetIndex",t),n.initialPivotManage()},changePivotTable:function(e){let n=this,l=Q().pivotTable,a=h.luckysheetfile[Z(e)].pivotTable.pivotDataSheetIndex;if(Z(a)==null){U.info(l.errorIsDamage,"");return}n.getCellData(e),n.initialPivotManage(!0),n.refreshPivotTable()},refreshPivotTable:function(e=!0){let n=this,t={};t.pivotTable=df,t.data=xe.deepCopyFlowData(h.flowdata),n.storePivotTableParam();let l=n.dataHandler(n.column,n.row,n.values,n.showType,n.celldata);n.setDatatojsfile("pivotDatas",l);let a=$.extend(!0,[],ve.nulldata),o=a,s=0,u=0;if(l.length==0)n.setDatatojsfile("drawPivotTable",!0),n.setDatatojsfile("pivotTableBoundary",[12,6]);else{n.setDatatojsfile("drawPivotTable",!1),n.setDatatojsfile("pivotTableBoundary",[l.length,l[0].length]);let d=l.length,f=l[0].length;s=d-a.length,u=f-a[0].length,o=cl(a,s+20,u+10,!0);for(let m=0;m<d;m++){let g=[].concat(o[m]);for(let y=0;y<f;y++){let v="";l[m]!=null&&l[m][y]!=null&&(v=ze(m,y,l)),g[y]=v}o[m]=g}}t.type="pivotTable_change",t.curdata=$.extend(!0,[],o),t.sheetIndex=h.currentSheetIndex,t.pivotTablecur=n.getPivotTableData(),h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push(t)),rl(),h.clearjfundo=!1,s>0||u>0?Zl(o[0].length,o.length,o,null,h.luckysheet_select_save,"datachangeAll",void 0,void 0,e):(Ze(o,h.luckysheet_select_save,{},null,e),lt()),h.clearjfundo=!0},drawPivotTable:!0,pivotTableBoundary:[12,6],pivotclick:function(e,n,t){t==null&&(t=h.currentSheetIndex);let l=h.luckysheetfile[Z(t)];if(!l.isPivotTable)return;let a=l.pivotTable.pivotDataSheetIndex;if(Z(a)==null)return;let s=$("#luckysheet-modal-dialog-slider-pivot"),u=this.isPivotRange(e,n);if(u&&s.is(":hidden")){if(!$t(t,"usePivotTablereports",!1))return;s.show(),zt(),$("#luckysheet-sta-content").css("padding-right",260)}else!u&&s.is(":visible")&&(s.hide(),zt(),$("#luckysheet-sta-content").css("padding-right",10))},isPivotRange:function(e,n){let t=this;if(h.luckysheetcurrentisPivotTable)return e<t.pivotTableBoundary[0]&&n<t.pivotTableBoundary[1]},storePivotTableParam:function(){let e=this,n=[],t=[],l=[],a=[];$("#luckysheet-modal-dialog-config-filter .luckysheet-modal-dialog-slider-config-item").each(function(){let u={};u.index=$(this).data("index"),u.name=$(this).data("name"),u.fullname=$(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(),l.push(u)}),$("#luckysheet-modal-dialog-config-row .luckysheet-modal-dialog-slider-config-item").each(function(){let u={};u.index=$(this).data("index"),u.name=$(this).data("name"),u.fullname=$(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(),u.order=$(this).data("order"),u.orderby=$(this).data("orderby"),u.stastic=$(this).data("stastic"),t.push(u)}),$("#luckysheet-modal-dialog-config-column .luckysheet-modal-dialog-slider-config-item").each(function(){let u={};u.index=$(this).data("index"),u.name=$(this).data("name"),u.fullname=$(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(),u.order=$(this).data("order"),u.orderby=$(this).data("orderby"),u.stastic=$(this).data("stastic"),n.push(u)}),$("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").each(function(){let u={};u.index=$(this).data("index"),u.name=$(this).data("name"),u.fullname=$(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(),u.sumtype=$(this).data("sumtype"),u.nameindex=$(this).data("nameindex"),a.push(u)}),e.setDatatojsfile("column",n),e.setDatatojsfile("row",t),e.setDatatojsfile("filter",l),e.setDatatojsfile("values",a);let o=$("#luckysheetpivottablevaluecolrow:checked, #luckysheetpivottablevaluecolrow1:checked").val();e.setDatatojsfile("showType",o=="0"?"row":"column");let s=e.getPivotTableData();delete s.pivotDatas,ne.saveParam("all",e.pivotSheetIndex,s,{k:"pivotTable"})},getPivotTableData:function(e){e==null&&(e=this.pivotSheetIndex);let n=Z(e),t=h.luckysheetfile[n].pivotTable;return P(t)=="object"?t=$.extend(!0,{},h.luckysheetfile[n].pivotTable):t=new Function("return "+t)(),t},addValuesToTitle:function(e,n){let t=e.length*n.length,l=e[0].length+1,a=[];if(e.length==0&&n.length>0){for(let o=0;o<n.length;o++)a.push(n[o].fullname);return a}if(n.length==0&&e.length>0)return e;for(let o=0;o<t;o++){a[o]=new Array(l);for(let s=0;s<l-1;s++)a[o][s]=e[Math.floor(o/n.length)][s];a[o][l-1]=n[o%n.length].fullname}return a},initialPivotManage:function(e){let n=this,t=Q(),l=t.pivotTable,a=t.button,o=t.filter;if(n.initial){n.initial=!1,$("body").append(Du()),$("#luckysheet-modal-dialog-slider-close").click(function(){$("#luckysheet-modal-dialog-slider-pivot").hide(),zt()}),$("body").append(_e(ft,{id:"luckysheet-data-pivotTable-selection",addclass:"luckysheet-data-pivotTable-selection",title:l.titleSelectionDataRange,content:'<input id="luckysheet-pivotTable-range-selection-input" class="luckysheet-datavisual-range-container" style="font-size: 14px;padding:5px;max-width:none;" spellcheck="false" aria-label="'+l.titleDataRange+'" placeholder="'+l.titleDataRange+'">',botton:'<button id="luckysheet-pivotTable-selection-confirm" class="btn btn-primary">'+a.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+a.cancel+"</button>"})),$("body").append(_e(Gi(),{menuid:"pivotTableFilter"})),$("body").append(_e(Wi(),{menuid:"pivotTableFilter"})),$("body").append(_u()),$("body").append(Cu()),$("#luckysheet-pivotTableFilter-orderby-asc").remove(),$("#luckysheet-pivotTableFilter-orderby-desc").next().remove(),$("#luckysheet-pivotTableFilter-orderby-desc").remove(),$("#luckysheet-pivotTableFilter-orderby-color").next().remove(),$("#luckysheet-pivotTableFilter-orderby-color").remove(),$("#luckysheetpivottablevaluecolrow, #luckysheetpivottablevaluecolrow1").checkboxradio({icon:!1}).change(function(){n.refreshPivotTable()});let m=null;$("#luckysheet-pivotTableFilter-menu").mouseover(function(){clearTimeout(m),m=setTimeout(function(){$("#luckysheet-pivotTableFilter-submenu").hide()},500)}),$(document).off("click.ptFilterCheckbox1").on("click.ptFilterCheckbox1","#luckysheet-pivotTableFilter-byvalue-select .textBox",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).find("input[type='checkbox']").prop("checked",!0))}),$(document).off("click.ptFilterCheckbox2").on("click.ptFilterCheckbox2","#luckysheet-pivotTableFilter-byvalue-select .year",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).parents(".yearBox").find(".month").attr("data-check","false"),$(this).parents(".yearBox").find(".day").attr("data-check","false"),$(this).parents(".yearBox").find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).parents(".yearBox").find(".month").attr("data-check","true"),$(this).parents(".yearBox").find(".day").attr("data-check","true"),$(this).parents(".yearBox").find("input[type='checkbox']").prop("checked",!0))}),$(document).off("click.ptFilterCheckbox3").on("click.ptFilterCheckbox3","#luckysheet-pivotTableFilter-byvalue-select .month",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).parents(".monthBox").find(".day").attr("data-check","false"),$(this).parents(".monthBox").find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).parents(".monthBox").find(".day").attr("data-check","true"),$(this).parents(".monthBox").find("input[type='checkbox']").prop("checked",!0));let g=!0;$(this).parents(".yearBox").find(".day").each(function(v,b){$(b).attr("data-check")=="true"||(g=!1)}),g?($(this).parents(".yearBox").find(".year").attr("data-check","true"),$(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked",!0)):($(this).parents(".yearBox").find(".year").attr("data-check","false"),$(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"))}),$(document).off("click.ptFilterCheckbox4").on("click.ptFilterCheckbox4","#luckysheet-pivotTableFilter-byvalue-select .day",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).find("input[type='checkbox']").prop("checked",!0));let g=!0;$(this).parents(".monthBox").find(".day").each(function(k,w){$(w).attr("data-check")=="true"||(g=!1)}),g?($(this).parents(".monthBox").find(".month").attr("data-check","true"),$(this).parents(".monthBox").find(".month input[type='checkbox']").prop("checked",!0)):($(this).parents(".monthBox").find(".month").attr("data-check","false"),$(this).parents(".monthBox").find(".month input[type='checkbox']").removeAttr("checked"));let v=!0;$(this).parents(".yearBox").find(".day").each(function(k,w){$(w).attr("data-check")=="true"||(v=!1)}),v?($(this).parents(".yearBox").find(".year").attr("data-check","true"),$(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked",!0)):($(this).parents(".yearBox").find(".year").attr("data-check","false"),$(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"))}),$(document).off("click.ptFilterYearDropdown").on("click.ptFilterYearDropdown","#luckysheet-pivotTableFilter-byvalue-select .yearBox .fa-caret-right",function(){let g=$(this).parents(".luckysheet-mousedown-cancel");g.hasClass("year")&&$(this).parents(".yearBox").find(".monthList").slideToggle(),g.hasClass("month")&&$(this).parents(".monthBox").find(".dayList").slideToggle()}),$("#luckysheet-pivotTableFilter-byvalue-btn-all").click(function(){$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").prop("checked",!0),$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check","true")}),$("#luckysheet-pivotTableFilter-byvalue-btn-contra").click(function(){$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").each(function(b,k){$(k).is(":checked")?($(k).removeAttr("checked"),$(k).parents(".luckysheet-mousedown-cancel").attr("data-check","false")):($(k).prop("checked",!0),$(k).parents(".luckysheet-mousedown-cancel").attr("data-check","true"))}),$("#luckysheet-pivotTableFilter-byvalue-select .ListBox .monthBox").each(function(b,k){let w=!0;$(k).find(".day input[type='checkbox']").each(function(C,S){$(S).is(":checked")||(w=!1)}),w?($(k).find(".month input[type='checkbox']").prop("checked",!0),$(k).attr("data-check","true")):($(k).find(".month input[type='checkbox']").removeAttr("checked"),$(k).attr("data-check","false"))}),$("#luckysheet-pivotTableFilter-byvalue-select .ListBox .yearBox").each(function(b,k){let w=!0;$(k).find(".day input[type='checkbox']").each(function(C,S){$(S).is(":checked")||(w=!1)}),w?($(k).find(".year input[type='checkbox']").prop("checked",!0),$(k).attr("data-check","true")):($(k).find(".year input[type='checkbox']").removeAttr("checked"),$(k).attr("data-check","false"))})}),$("#luckysheet-pivotTableFilter-byvalue-btn-clear").click(function(){$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").removeAttr("checked"),$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check","false")}),$("#luckysheet-pivotTableFilter-byvalue-input").on("input propertychange",function(){let g=$(this).val().toString();$("#luckysheet-pivotTableFilter-byvalue-select .ListBox .luckysheet-mousedown-cancel").show(),g!=""&&$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").each(function(v,b){let k=$(b).parents(".luckysheet-mousedown-cancel");if(k.hasClass("day")){let w=$(b).siblings("label").text().toString(),x=$(b).parents(".monthBox").find(".month label").text().toString();($(b).parents(".yearBox").find(".year label").text().toString()+"-"+x+"-"+w).indexOf(g)==-1&&($(b).parents(".day").hide(),$(b).parents(".dayList").find(".day:visible").length==0&&$(b).parents(".monthBox").find(".month").hide(),$(b).parents(".monthList").find(".day:visible").length==0&&$(b).parents(".yearBox").find(".year").hide())}k.hasClass("textBox")&&$(b).siblings("label").text().toString().indexOf(g)==-1&&$(b).parents(".textBox").hide()})}),$("#luckysheet-pivotTableFilter-bycondition, #luckysheet-pivotTableFilter-byvalue").click(function(){let g=$(this);g.next().slideToggle(200),setTimeout(function(){g.attr("id")=="luckysheet-pivotTableFilter-bycondition"&&$("#luckysheet-pivotTableFilter-bycondition").next().is(":visible")&&$("#luckysheet-pivotTableFilter-selected span").text()!=o.filiterInputNone&&$("#luckysheet-pivotTableFilter-byvalue").next().slideUp(200),g.is($("#luckysheet-pivotTableFilter-bycondition"))&&$("#luckysheet-pivotTableFilter-bycondition").next().is(":hidden")&&$("#luckysheet-pivotTableFilter-byvalue").next().is(":hidden")&&$("#luckysheet-pivotTableFilter-byvalue").next().slideDown(200)},300)}),$("#luckysheet-pivotTableFilter-cancel").click(function(){$("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide()}),$("#luckysheet-pivotTableFilter-selected").click(function(){let g=$(this),y=g.offset(),v=$("#luckysheet-pivotTableFilter-submenu");v.hide();let b=$(window).height(),k=$(window).width(),w=v.width(),x=v.height(),C=y.top,S=y.left,_=b-y.top-20;y.left+w>k&&(S=y.left-w),y.top>b/2&&(C=b-y.top,C<0&&(C=0),_=y.top-20),v.css({top:C,left:S,height:_}).show(),clearTimeout(m)}),$("#luckysheet-pivotTableFilter-submenu").mouseover(function(){clearTimeout(m)}).find(".luckysheet-cols-menuitem").click(function(g){$("#luckysheet-pivotTableFilter-selected span").html($(this).find(".luckysheet-cols-menuitem-content").text()).data("value",$(this).data("value")),$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").hide(),$(this).data("type")=="2"?($("#luckysheet-pivotTableFilter-selected span").data("type","2"),$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input2").show()):$(this).data("type")=="0"?$("#luckysheet-pivotTableFilter-selected span").data("type","0"):($("#luckysheet-pivotTableFilter-selected span").data("type","1"),$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").eq(0).show(),$(this).attr("data-value")=="dateequal"||$(this).attr("data-value")=="datelessthan"||$(this).attr("data-value")=="datemorethan"?$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input input").prop("type","date"):$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input input").prop("type","text")),$("#luckysheet-pivotTableFilter-byvalue").next().slideUp(),$("#luckysheet-pivotTableFilter-submenu").hide()}),$("#luckysheet-modal-dialog-pivotTable-list").on("click"," .luckysheet-slider-list-item-filter",function(g){return n.luckysheetsliderlistitemfilter($(this)),g.stopPropagation(),!1}),$("#luckysheet-modal-dialog-pivotTable-list").on("click"," .luckysheet-slider-list-item-filtered",function(g){return n.luckysheetsliderlistclearfilter($(this).next()),g.stopPropagation(),!1}),$("#luckysheet-dialog-pivotTable-range-seleted").click(function(){$("#luckysheet-modal-dialog-slider-pivot").hide(),zt();let g=$("#luckysheet-data-pivotTable-selection"),y=g.outerHeight(),v=g.outerWidth(),b=$(window).width(),k=$(window).height(),w=$(document).scrollLeft(),x=$(document).scrollTop();$("#luckysheet-data-pivotTable-selection").css({left:(b+w-v)/2,top:(k+x-y)/4}).show(),n.jgridCurrentPivotInput=$("#luckysheet-dialog-pivotTable-range").html(),$("#luckysheet-pivotTable-range-selection-input").val(n.jgridCurrentPivotInput),n.luckysheet_pivotTable_select_state=!0}),$("#luckysheet-pivotTableFilter-initial").click(function(){$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-slider-list-item-filtered").hide(),$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").data("rowhidden",""),$("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(),$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").hide().find("input").val(),$("#luckysheet-pivotTableFilter-selected span").data("type","0").data("type",null).text(o.filiterInputNone),n.setDatatojsfile("filterparm",null),n.celldata=n.origindata,n.refreshPivotTable()}),$("#luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").on("click",".luckysheet-modal-dialog-slider-config-item-icon",function(g){let y=$(g.target),v=y.closest(".luckysheet-modal-dialog-slider-config-item"),b=v.data("index"),k=v.offset(),w=v.data("order"),x=v.data("orderby"),C=v.data("stastic");w==null&&(w="default");let S='<option value="self">'+v.find(".luckysheet-modal-dialog-slider-config-item-txt").data("name")+"</option>";return $("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").each(function(_){S+='<option value="'+_+'">'+$(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text()+"</option>"}),$("#luckysheet-pivotTable-config-option-orderby").empty().html(S),x==null&&(x="self"),C==null&&(C="1"),$("#luckysheet-pivotTable-config-option-order").val(w).data("index",b),$("#luckysheet-pivotTable-config-option-orderby").val(x).data("index",b),$("#luckysheet-pivotTable-config-option-stastic").val(C).data("index",b),ml($("#luckysheet-pivotTable-config-option"),k.left+v.outerWidth(),k.top-13,"rightbottom"),g.stopPropagation(),!1}),$("#luckysheet-pivotTable-config-option-order,#luckysheet-pivotTable-config-option-orderby,#luckysheet-pivotTable-config-option-stastic").change(function(){let g=$(this),y=g.data("index");$("#luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").find(".luckysheet-modal-dialog-slider-config-item").each(function(){$(this).data("index")==y&&$(this).data(g.attr("id").replace("luckysheet-pivotTable-config-option-",""),g.val())}),n.refreshPivotTable()}),$("#luckysheet-modal-dialog-config-value").on("click",".luckysheet-modal-dialog-slider-config-item-icon",function(g){let y=$(g.target),v=y.closest(".luckysheet-modal-dialog-slider-config-item"),b=v.data("index"),k=v.offset(),w=v.data("sumtype"),x=n.pivot_data_type[b.toString()];w==null&&(x=="num"?w="SUM":w="COUNTA");let C=$("#luckysheet-pivotTable-config-option-sumtype");return C.find(".luckysheet-submenu-arrow").hide(),C.find(".luckysheet-cols-menuitem[sumtype='"+w+"'] .luckysheet-submenu-arrow").css("display","inline"),C.data("item",v),ml(C,k.left+v.outerWidth(),k.top-13,"rightbottom"),g.stopPropagation(),!1}),$("#luckysheet-pivotTable-config-option-sumtype .luckysheet-cols-menuitem").click(function(){let g=$("#luckysheet-pivotTable-config-option-sumtype").data("item"),y=$(this).attr("sumtype");g.data("sumtype",$(this).attr("sumtype"));let v=n.getSumTypeName(y)+":"+g.data("name");g.attr("title",v).find(".luckysheet-modal-dialog-slider-config-item-txt").html(v),$("#luckysheet-pivotTable-config-option-sumtype").hide(),n.refreshPivotTable()}),$("#luckysheet-modal-dialog-config-filter").on("click",".luckysheet-modal-dialog-slider-config-item-icon",function(g){let y=$(g.target),v=y.closest(".luckysheet-modal-dialog-slider-config-item").data("index");return n.luckysheetsliderlistitemfilter($("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(v).find(".luckysheet-slider-list-item-filter")),g.stopPropagation(),!1}),$("#luckysheet-pivotTableFilter-confirm").click(function(){let y=$("#luckysheet-pivotTableFilter-menu").data("index"),v={};$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").each(function(){let _=$(this),T=_.data("rowhidden");if(_.data("index")!=y){if(T==null||T=="")return!0;P(T)=="string"&&(T=JSON.parse(T));for(let A in T)v[A]=0}});let b=n.origindata,k={},w={},x={};if($("#luckysheet-pivotTableFilter-bycondition").next().is(":visible")&&$("#luckysheet-pivotTableFilter-byvalue").next().is(":hidden")&&$("#luckysheet-pivotTableFilter-selected span").data("value")!="null"){let _=$("#luckysheet-pivotTableFilter-selected span"),T=_.data("type"),A=_.data("value");if(x.value=A,x.text=_.text(),T=="0")x.type="0";else if(T=="2"){let R=$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input2 input");x.type="2",x.value1=R.eq(0).val(),x.value2=R.eq(1).val()}else x.type="1",x.value1=$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").eq(0).find("input").val();for(let R=1;R<b.length;R++){if(R in v||b[R]==null)continue;let I=b[R][y];if(A=="cellnull")I!=null&&!me(I.v)&&(w[R]=0);else if(A=="cellnonull")(I==null||me(I.v))&&(w[R]=0);else if(A=="textinclude"){let F=x.value1;(I==null||me(I.v)||I.m.indexOf(F)==-1)&&(w[R]=0)}else if(A=="textnotinclude"){let F=x.value1;I==null||me(I.v)||I.m.indexOf(F)>-1&&(w[R]=0)}else if(A=="textstart"){let F=x.value1,z=F.length;(I==null||me(I.v)||I.m.substr(0,z)!=F)&&(w[R]=0)}else if(A=="textend"){let F=x.value1,z=F.length;(I==null||me(I.v)||z>I.m.length||I.m.substr(I.m.length-z,z)!=F)&&(w[R]=0)}else if(A=="textequal"){let F=x.value1;(I==null||me(I.v)||I.m!=F)&&(w[R]=0)}else if(A=="dateequal"){let F=at(x.value1)[2];I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="d"?parseInt(I.v)!=F&&(w[R]=0):w[R]=0}else if(A=="datelessthan"){let F=at(x.value1)[2];I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="d"?parseInt(I.v)>=F&&(w[R]=0):w[R]=0}else if(A=="datemorethan"){let F=at(x.value1)[2];I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="d"?parseInt(I.v)<=F&&(w[R]=0):w[R]=0}else if(A=="morethan"){let F=parseFloat(x.value1);I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?I.v<=F&&(w[R]=0):w[R]=0}else if(A=="moreequalthan"){let F=parseFloat(x.value1);I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?I.v<F&&(w[R]=0):w[R]=0}else if(A=="lessthan"){let F=parseFloat(x.value1);I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?I.v>=F&&(w[R]=0):w[R]=0}else if(A=="lessequalthan"){let F=parseFloat(x.value1);I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?I.v>F&&(w[R]=0):w[R]=0}else if(A=="equal"){let F=parseFloat(x.value1);I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?I.v!=F&&(w[R]=0):w[R]=0}else if(A=="noequal"){let F=parseFloat(x.value1);I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?I.v==F&&(w[R]=0):w[R]=0}else if(A=="include"){let F=parseFloat(x.value1),z=parseFloat(x.value2),M,E;F<z?(M=F,E=z):(E=F,M=z),I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?(I.v<M||I.v>E)&&(w[R]=0):w[R]=0}else if(A=="noinclude"){let F=parseFloat(x.value1),z=parseFloat(x.value2),M,E;F<z?(M=F,E=z):(E=F,M=z),I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?I.v>=M&&I.v<=E&&(w[R]=0):w[R]=0}}}else{$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").each(function(_,T){if($(T).is(":visible")&&$(T).is(":checked"))return!0;if($(T).closest(".day").length>0){let A=$(T).siblings("label").text();Number(A)<10&&(A="0"+A);let R=$(T).closest(".monthBox").find(".month label").text().replace(o.filiterMonthText,"");Number(R)<10&&(R="0"+R);let I=$(T).closest(".yearBox").find(".year label").text().replace(o.filiterYearText,""),F=o.filterDateFormatTip+"#$$$#"+I+"-"+R+"-"+A;k[F]="1"}if($(T).closest(".textBox").length>0){let A=$(T).closest(".textBox").data("filter");k[A]="1"}});for(let _=1;_<b.length;_++){if(_ in v||b[_]==null)continue;let T=b[_][y],A;if(T==null||me(T.v))A="null#$$$#null";else if(T.ct!=null&&T.ct.t=="d"){let R=mt("YYYY-MM-DD",T.v);A=o.filterDateFormatTip+"#$$$#"+R}else A=T.v+"#$$$#"+T.m;A in k&&(w[_]=0)}}let C=$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(y);$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']:visible:checked").length<$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']:visible").length||$("#luckysheet-pivotTableFilter-byvalue-input").val().length>0||$("#luckysheet-pivotTableFilter-bycondition").next().is(":visible")&&$("#luckysheet-pivotTableFilter-byvalue").next().is(":hidden")&&$("#luckysheet-pivotTableFilter-selected span").data("value")!="null"?(C.data("rowhidden",JSON.stringify(w)).find(".luckysheet-slider-list-item-filtered").show(),n.setDatatojsfile("rowhidden",w,y),x!=null&&(C.data("byconditionvalue",x.value).data("byconditiontype",x.type).data("byconditiontext",x.text),x.value1!=null&&C.data("byconditionvalue1",x.value1),x.value2!=null&&C.data("byconditionvalue2",x.value2),n.setDatatojsfile("caljs",x,y))):(C.data("rowhidden","").find(".luckysheet-slider-list-item-filtered").hide(),n.setDatatojsfile("rowhidden",null,y));let S=[];for(let _=0;_<b.length;_++)_ in w||_ in v||S.push([].concat(b[_]));n.celldata=S,n.refreshPivotTable(),$("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(),rl()}),$("#luckysheet-data-pivotTable-selection .luckysheet-model-close-btn, #luckysheet-data-pivotTable-selection .luckysheet-modal-dialog-title-close").click(function(){$("#luckysheet-modal-dialog-slider-pivot").show(),zt(),$("#luckysheet-cell-main .luckysheet-pivotTable-selection-set div").show(),$("#luckysheet-data-pivotTable-selection").hide(),ve.changeSheetExec(n.pivotSheetIndex),n.luckysheet_pivotTable_select_state=!1,rl()}),$("#luckysheet-pivotTable-selection-confirm").click(function(){let g=$("#luckysheet-pivotTable-range-selection-input"),y=g.val();if($.trim(y).length==0||$.trim(y).toUpperCase()==n.jgridCurrentPivotInput.toUpperCase()){g.val(n.jgridCurrentPivotInput),$("#luckysheet-data-pivotTable-selection .luckysheet-model-close-btn").click();return}else{let v=y.split("!"),b="",k="",w=-1;if(v.length>1){b=v[0],k=v[1];for(let S in h.luckysheetfile)if(b==h.luckysheetfile[S].name){w=h.luckysheetfile[S].index;break}w==-1&&(w=0)}else{let S=Z(h.currentSheetIndex);b=h.luckysheetfile[S].name,w=h.luckysheetfile[S].index,k=v[0]}if(h.luckysheetfile[Z(w)].isPivotTable){de()?alert(l.errorNotAllowPivotData):U.info("",l.errorNotAllowPivotData),g.val(n.jgridCurrentPivotInput);return}if(k.indexOf(":")==-1){de()?alert(l.errorSelectionRange):U.info("",l.errorSelectionRange),g.val(n.jgridCurrentPivotInput);return}k=k.split(":");let x=[],C=[];if(x[0]=parseInt(k[0].replace(/[^0-9]/g,""))-1,x[1]=parseInt(k[1].replace(/[^0-9]/g,""))-1,x[0]>x[1]){de()?alert(l.errorSelectionRange):U.info("",l.errorSelectionRange),g.val(n.jgridCurrentPivotInput);return}if(C[0]=hl(k[0].replace(/[^A-Za-z]/g,"")),C[1]=hl(k[1].replace(/[^A-Za-z]/g,"")),C[0]>C[1]){de()?alert(l.errorSelectionRange):U.info(l.errorSelectionRange),g.val(n.jgridCurrentPivotInput);return}ve.changeSheetExec(n.pivotSheetIndex),n.setDatatojsfile("pivot_select_save",{row:x,column:C}),n.setDatatojsfile("pivotDataSheetIndex",w),n.getCellData(n.pivotSheetIndex,w,{row:x,column:C}),n.initialPivotManage(),$("#luckysheet-dialog-pivotTable-range").html(y),$("#luckysheet-modal-dialog-slider-pivot").show(),$("#luckysheet-data-pivotTable-selection").hide(),n.luckysheet_pivotTable_select_state=!1,n.refreshPivotTable(),zt(),rl()}}),$("#luckysheet-modal-dialog-slider-pivot").on("mousedown",".luckysheet-slider-list-item-name, .luckysheet-modal-dialog-slider-config-item-txt",function(g){let y=$(g.target);n.movestate=!0,n.movesave.obj=y.parent(),n.movesave.name=y.data("name"),n.movesave.containerid=y.parent().parent().attr("id"),n.movesave.index=y.data("index"),$("#luckysheet-modal-dialog-slider-pivot-move").length==0&&$("body").append('<div id="luckysheet-modal-dialog-slider-pivot-move">'+n.movesave.name+"</div>"),n.movesave.width=$("#luckysheet-modal-dialog-slider-pivot-move").outerWidth(),n.movesave.height=$("#luckysheet-modal-dialog-slider-pivot-move").outerHeight(),$("#luckysheet-modal-dialog-pivotTable-list, #luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").css("cursor","default")}),$("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").mousemove(function(g){if(n.movestate){n.moveitemposition.length==0&&(n.moveitemposition=[0],$(this).find(".luckysheet-modal-dialog-slider-config-item").each(function(C){let S=$(this),_=S.outerHeight();n.moveitemposition.push(n.moveitemposition[C]+_+2)}),$(this).append('<div id="luckysheet-modal-dialog-config-order-help" style="position:absolute;height:3px;width:100%;background:#007ACC;z-index:1;pointer-events: none;user-select:none;"></div>')),$("#luckysheet-modal-dialog-slider-pivot-move").css({background:"#FD8585",color:"#fff",border:"1px solid #FD7070"});let y=event.pageX,v=event.pageY,b=$(this),k=v-b.offset().top+b.scrollTop(),w=n.moveitemposition,x=st(w,k);x==-1?$("#luckysheet-modal-dialog-config-order-help").css({top:w[w.length-1]}):k-w[x-1]>(w[x]-w[x-1])/2?$("#luckysheet-modal-dialog-config-order-help").css({top:w[x]}):$("#luckysheet-modal-dialog-config-order-help").css({top:w[x-1]})}}).mouseleave(function(){n.movestate&&($("#luckysheet-modal-dialog-slider-pivot-move").css({background:"#fff",color:"#000",border:"1px dotted #000"}),n.moveitemposition=[],$("#luckysheet-modal-dialog-config-order-help").remove())}).mouseup(function(g){if(n.movestate){let y=$(this),v;if(n.movesave.containerid==y.attr("id"))v=n.movesave.obj.clone();else{let _=n.movesave.name,T="",A="";y.attr("id")=="luckysheet-modal-dialog-config-value"&&(n.pivot_data_type[n.movesave.index.toString()]=="num"?(_=l.valueStatisticsSUM+":"+_,T="data-sumtype='SUM'",A="data-nameindex='0'"):(_=l.valueStatisticsCOUNTA+":"+_,T="data-sumtype='COUNTA'",A="data-nameindex='0'"),$("#luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function(){if($(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text()==_){let I=parseFloat($(this).data("nameindex"))+1;return _=_+I.toString(),$(this).data("nameindex",I),!1}})),v='<div title="'+_+'" class="luckysheet-modal-dialog-slider-config-item" '+A+" "+T+' data-index="'+n.movesave.index+'" data-name="'+n.movesave.name+'"><div class="luckysheet-modal-dialog-slider-config-item-txt" '+A+" "+T+' data-index="'+n.movesave.index+'" data-name="'+n.movesave.name+'">'+_+'</div><div class="luckysheet-modal-dialog-slider-config-item-icon"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>'}let b=event.pageX,k=event.pageY,w=$(this),x=k-w.offset().top+w.scrollTop(),C=n.moveitemposition,S=st(C,x);(n.movesave.containerid=="luckysheet-modal-dialog-pivotTable-list"||n.movesave.containerid=="luckysheet-modal-dialog-config-value"&&n.movesave.containerid!=y.attr("id"))&&$("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").find(".luckysheet-modal-dialog-slider-config-item").each(function(){$(this).data("index")==n.movesave.index&&$(this).remove()}),S==-1?y.find(".luckysheet-modal-dialog-slider-config-item").length==0?y.append(v):y.find(".luckysheet-modal-dialog-slider-config-item").last().after(v):x-C[S-1]>(C[S]-C[S-1])/2?y.find(".luckysheet-modal-dialog-slider-config-item").eq(S-1).after(v):y.find(".luckysheet-modal-dialog-slider-config-item").eq(S-1).before(v),n.movesave.containerid=="luckysheet-modal-dialog-pivotTable-list"||n.movesave.containerid=="luckysheet-modal-dialog-config-value"&&n.movesave.containerid!=y.attr("id")||n.movesave.obj.remove(),$("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function(){let _=$(this).find(".luckysheet-slider-list-item-selected");$(this).data("index")==n.movesave.index&&_.find("i").length==0&&_.append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>')}),n.refreshPivotTable(),$("#luckysheet-modal-dialog-slider-pivot-move").remove(),n.movestate=!1,$("#luckysheet-modal-dialog-pivotTable-list, #luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").css("cursor","default"),n.moveitemposition=[],$("#luckysheet-modal-dialog-config-order-help").remove(),n.showvaluecolrow(),g.stopPropagation()}}),$("#luckysheet-modal-dialog-pivotTable-list").on("click",".luckysheet-slider-list-item-selected",function(){let g=$(this),y=g.parent(),v=y.data("index"),b=y.data("name");if(g.find("i").length==0){g.append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>');let k=n.pivot_data_type[v.toString()],w;if(k=="num")w='<div title="'+b+'" class="luckysheet-modal-dialog-slider-config-item" data-nameindex="0" data-sumtype="SUM" data-index="'+v+'" data-name="'+b+'"><div class="luckysheet-modal-dialog-slider-config-item-txt" data-nameindex="0" data-sumtype="SUM" data-index="'+v+'" data-name="'+b+'">\u6C42\u548C:'+b+'</div><div class="luckysheet-modal-dialog-slider-config-item-icon"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>',$("#luckysheet-modal-dialog-config-value").append(w);else{w='<div title="'+b+'" class="luckysheet-modal-dialog-slider-config-item" data-index="'+v+'" data-name="'+b+'"><div class="luckysheet-modal-dialog-slider-config-item-txt" data-index="'+v+'" data-name="'+b+'">'+b+'</div><div class="luckysheet-modal-dialog-slider-config-item-icon"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>';let x=$("#luckysheet-modal-dialog-config-column"),C=$("#luckysheet-modal-dialog-config-row"),S=x.find(".luckysheet-modal-dialog-slider-config-item"),_=C.find(".luckysheet-modal-dialog-slider-config-item");S.length<2?x.append(w):_.length<2?C.append(w):x.append(w)}}else g.find("i").remove(),$("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function(){$(this).data("index")==v&&($(this).parent().attr("id")=="luckysheet-modal-dialog-config-value"&&n.resetOrderby($(this)),$(this).remove())});n.refreshPivotTable(),n.showvaluecolrow()}),$("#luckysheet-dialog-pivotTable-clearitem").click(function(){$("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function(){$(this).remove()}),$("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function(){$(this).find(".luckysheet-slider-list-item-selected").find("i").remove()}),n.refreshPivotTable(),n.showvaluecolrow()})}e==null&&(e=!1),n.celldata.length<=1&&n.celldata[0].length<=1&&(de()?alert(l.errorIncreaseRange):U.info("",l.errorIncreaseRange));let s="",u=1,d={},f=1;for(let m=0;m<n.celldata[0].length;m++){let g;!!n.celldata[0][m]&&!!n.celldata[0][m].m?g=n.celldata[0][m].m:g=ze(0,m,n.celldata),g!=null&&(g=g.toString()),(g==null||$.trim(g.toString()).length==0)&&(g=l.titleColumn+" "+f),f++,g in d&&(g=g+u++,g in d&&(g=g+u++,g in d&&(g=g+u++))),d[g]=1;let y="",v="";if(e&&n.filterparm!=null&&n.filterparm[m.toString()]!=null){let b=n.filterparm[m.toString()];if(b.rowhidden!=null&&(y+="data-rowhidden='"+JSON.stringify(b.rowhidden)+"'"),b.selected!=null&&(y+="data-selected='"+JSON.stringify(b.selected)+"'"),b.caljs!=null){let k=b.caljs;k.value!=null&&(y+="data-byconditionvalue='"+k.value+"'"),k.type!=null&&(y+="data-byconditiontype='"+k.type+"'"),k.text!=null&&(y+="data-byconditiontext='"+k.text+"'"),k.value1!=null&&(y+="data-byconditionvalue1='"+k.value1+"'"),k.value2!=null&&(y+="data-byconditionvalue2='"+k.value2+"'")}}y.length>0&&(v="display:block;"),s+='<div class="luckysheet-modal-dialog-slider-list-item" '+y+' data-index="'+m+'" data-name="'+g+'"><div title="'+l.titleAddColumn+'" class="luckysheet-slider-list-item-selected"><div></div></div><div title="'+l.titleMoveColumn+'" class="luckysheet-slider-list-item-name" '+y+' data-index="'+m+'" data-name="'+g+'">'+g+'</div><div title="'+l.titleClearColumnFilter+'" class="luckysheet-slider-list-item-filtered" style="'+v+'"><i class="fa fa-filter luckysheet-mousedown-cancel" aria-hidden="true"></i><i class="fa fa-times" aria-hidden="true"></i></div><div title="'+l.titleFilterColumn+'" class="luckysheet-slider-list-item-filter"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>'}if($("#luckysheet-modal-dialog-pivotTable-list").html(s),$("#luckysheetpivottablevaluecolrowshow").hide(),$("#luckysheetpivottablevaluecolrow").prop("checked",!0),$("#luckysheetpivottablevaluecolrow1").prop("checked",!1),$("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").empty(),e){if(n.filter!=null&&n.filter.length>0)for(let m=0;m<n.filter.length;m++){let g=n.filter[m],y='<div title="'+name+'" class="luckysheet-modal-dialog-slider-config-item" data-index="'+g.index+'" data-name="'+g.name+'"><div class="luckysheet-modal-dialog-slider-config-item-txt" data-index="'+g.index+'" data-name="'+g.name+'">'+g.name+'</div><div class="luckysheet-modal-dialog-slider-config-item-icon"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>';$("#luckysheet-modal-dialog-config-filter").append(y);let v=$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(g.index).find(".luckysheet-slider-list-item-selected");v.find("i").length==0&&v.append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>')}if(n.row!=null&&n.row.length>0)for(let m=0;m<n.row.length;m++){let g=n.row[m],y="";g.order!=null&&(y+="data-order = '"+g.order+"'"),g.orderby!=null&&(y+="data-orderby = '"+g.orderby+"'"),g.order!=null&&(y+="data-stastic = '"+g.stastic+"'");let v='<div title="'+name+'" class="luckysheet-modal-dialog-slider-config-item" '+y+' data-index="'+g.index+'" data-name="'+g.name+'"><div class="luckysheet-modal-dialog-slider-config-item-txt" '+y+' data-index="'+g.index+'" data-name="'+g.name+'">'+g.name+'</div><div class="luckysheet-modal-dialog-slider-config-item-icon"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>';$("#luckysheet-modal-dialog-config-row").append(v);let b=$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(g.index).find(".luckysheet-slider-list-item-selected");b.find("i").length==0&&b.append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>')}if(n.column!=null&&n.column.length>0)for(let m=0;m<n.column.length;m++){let g=n.column[m],y="";g.order!=null&&(y+="data-order = '"+g.order+"'"),g.orderby!=null&&(y+="data-orderby = '"+g.orderby+"'"),g.order!=null&&(y+="data-stastic = '"+g.stastic+"'");let v='<div title="'+name+'" class="luckysheet-modal-dialog-slider-config-item" '+y+' data-index="'+g.index+'" data-name="'+g.name+'"><div class="luckysheet-modal-dialog-slider-config-item-txt" '+y+' data-index="'+g.index+'" data-name="'+g.name+'">'+g.name+'</div><div class="luckysheet-modal-dialog-slider-config-item-icon"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>';$("#luckysheet-modal-dialog-config-column").append(v);let b=$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(g.index).find(".luckysheet-slider-list-item-selected");b.find("i").length==0&&b.append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>')}if(n.values!=null&&n.values.length>0){for(let m=0;m<n.values.length;m++){let g=n.values[m],y="";g.sumtype!=null&&(y+="data-sumtype = '"+g.sumtype+"'"),g.nameindex!=null&&(y+="data-nameindex = '"+g.nameindex+"'");let v='<div title="'+name+'" class="luckysheet-modal-dialog-slider-config-item" '+y+' data-index="'+g.index+'" data-name="'+g.name+'"><div class="luckysheet-modal-dialog-slider-config-item-txt" '+y+' data-index="'+g.index+'" data-name="'+g.name+'">'+n.getSumTypeName(g.sumtype)+":"+g.name+'</div><div class="luckysheet-modal-dialog-slider-config-item-icon"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>';$("#luckysheet-modal-dialog-config-value").append(v);let b=$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(g.index).find(".luckysheet-slider-list-item-selected");b.find("i").length==0&&b.append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>')}n.values.length>=2&&($("#luckysheetpivottablevaluecolrowshow").show(),n.showType=="column"?($("#luckysheetpivottablevaluecolrow").prop("checked",!0),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").addClass("ui-state-active"),$("#luckysheetpivottablevaluecolrow1").prop("checked",!1),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").removeClass("ui-state-active")):($("#luckysheetpivottablevaluecolrow1").prop("checked",!0),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").addClass("ui-state-active"),$("#luckysheetpivottablevaluecolrow").prop("checked",!1),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").removeClass("ui-state-active")))}}$("#luckysheet-dialog-pivotTable-range").html(xt(n.pivotDataSheetIndex,n.pivot_select_save)),$("#luckysheet-modal-dialog-slider-pivot").show(),zt(!1)},getComposeArray:function(e){if(e.length==0)return[];let n=[];for(let t=0;t<e.length;t++){let l="";for(let a=0;a<=t;a++)!!e[a]&&!!e[a].m?l+=e[a].m:l+=ze(a,null,e);n.push(l)}return n},getnameArray:function(e,n){if(e.length==0)return[];if(n.length==0)return[];let t=[];for(let l=0;l<n.length;l++){let a;!!e[n[l].index]&&!!e[n[l].index].m?a=e[n[l].index].m:a=ze(n[l].index,null,e),t.push(a)}return t},getTitleFromGroup:function(e,n,t){let l=this,a=l.orderbygroup(e,n,t);return l.generategrouparraymain(a,n)},orderbygroup:function(e,n,t){let l=this,a=[];if(e.length==0)return[];a=e;let o=null,s=a.length,u=a.length,d=0;for(;s!=0;)if(o=a[d++],s--,o.children!=null&&o.children.length>0){o.children=l.orderbygroupchildren(o.children,n[o.index].orderby,n[o.index].order,t);for(let f=0;f<o.children.length;f++)a.push(o.children[f]),s++}return e.splice(0,u)},orderbygroupchildren:function(e,n,t,l){if(e.length==0)return[];let a=!1;(t==null||t=="asc")&&(a=!0);let s=Q().filter,u=function(f,m){let g=null,y=null;if(n=="self"||n==null){if(f.name==null?g=s.valueBlank:g=f.name.toString(),m.name==null?y=s.valueBlank:y=m.name.toString(),Lt(g)&&Lt(y))return ul(g,y)}else g=parseFloat(l[f.orderby].result),y=parseFloat(l[m.orderby].result);if(!isNaN(g)&&!isNaN(y))return(0,Fi.default)(g).value()-(0,Fi.default)(y).value();if(isNaN(g)&&isNaN(y))return g.localeCompare(y);if(isNaN(g))return 1;if(isNaN(y))return-1},d=function(f,m){let g=null,y=null;if(n=="self"||n==null){if(f.name==null?g=s.valueBlank:g=f.name.toString(),m.name==null?y=s.valueBlank:y=m.name.toString(),Lt(g)&&Lt(y))return ul(g,y)}else g=parseFloat(l[f.orderby].result),y=parseFloat(l[m.orderby].result);if(!isNaN(g)&&!isNaN(y))return(0,Fi.default)(y).value()-(0,Fi.default)(g).value();if(isNaN(g)&&isNaN(y))return y.localeCompare(g);if(isNaN(g))return-1;if(isNaN(y))return 1};return a?e.sort(u):e.sort(d)},generategroupaddstatic:function(e,n){let t=[],a=Q().pivotTable;for(let o=0;o<e[0].length;o++)o==0?n==a.valueSum?t.push(n):t.push({name:n,issum:!0}):t.push("");return t},generategrouparraymain:function(e,n){let t=this,l=[];for(let a=0;a<e.length;a++){let o=e[a].name,s=t.generategrouparray(e[a].children,n,1);(n[0].stastic=="1"||n[0].stastic==null)&&s.push(t.generategroupaddstatic(s,o)),l=l.concat(s)}return l},generategrouparray:function(e,n,t){let l=this,a=[];for(let o=0;o<e.length;o++){let s=e[o].name,u;if(e[o].children==0||e[o].children.length==0)u=[s],a.push(u);else{u=l.generategrouparray(e[o].children,n,t+1);for(let d=0;d<u.length;d++)u[d].unshift(s);(n[t].stastic=="1"||n[t].stastic==null)&&u.push(l.generategroupaddstatic(u,s)),a=a.concat(u)}}return a},addStatisticsData:function(e,n,t,l){if(e[t]==null&&(e[t]={data:[],count:0,max:-Infinity,min:Infinity,counta:0,countunique:0,countuniquedata:{},sum:0,digitaldata:[],sumtype:n.sumtype,index:n.index,name:n.fullname,acc:0}),On(l).num===!0){let a=Il(l,6);e[t].digitaldata.push(a),e[t].count+=1,e[t].sum+=a,a>e[t].max&&(e[t].max=a),a<e[t].min&&(e[t].min=a);let o=ic(a);o>e[t].acc&&(e[t].acc=o)}l!=""&&(e[t].data.push(l),e[t].counta+=1,l in e[t].countuniquedata||(e[t].countuniquedata[l]=1,e[t].countunique+=1))},dataHandler:function(e,n,t,l,a){let o=this,s=Q(),u=s.filter,d=s.pivotTable;if(l==null&&(l="column"),e.length==0&&n.length==0&&t.length==0||a.length==0)return o.pivotDatas=[],[];let f={},m=a,g=[],y=[],v={},b=0,k=[],w=[],x={},C=0;for(let z=1;z<m.length;z++){let M=m[z],E="",N="",L="",O=[],V=[],q="",W=[],X=[];V=o.getnameArray(M,n),X=o.getnameArray(M,e),O=o.getComposeArray(V),W=o.getComposeArray(X),O.length>0&&O.unshift(d.valueSum),W.length>0&&W.unshift(d.valueSum);let te=v,le=y;for(let he=0;he<O.length;he++){let ue=O[he],K=he==0?d.valueSum:V[he-1];if(te[he.toString()]!=null&&te[he.toString()][ue]!=null)le=le[te[he.toString()][ue]].children;else{let G=he==0?"self":n[he-1].orderby=="self"||n[he-1].orderby==null?ue:l=="column"?ue+t[parseInt(n[he-1].orderby)].fullname:ue+d.valueSum;K==null&&(K=u.valueBlank),le.push({name:K,fullname:ue,index:he,orderby:G,children:[]}),te[he.toString()]==null&&(te[he.toString()]={}),te[he.toString()][ue]==null&&(te[he.toString()][ue]=le.length-1),le=le[le.length-1].children}}let oe=x,se=w;for(let he=0;he<W.length;he++){let ue=W[he],K=he==0?d.valueSum:X[he-1];if(oe[he.toString()]!=null&&oe[he.toString()][ue]!=null)se=se[oe[he.toString()][ue]].children;else{let G=he==0?"self":e[he-1].orderby=="self"||e[he-1].orderby==null?ue:l=="column"?d.valueSum+ue:t[parseInt(e[he-1].orderby)].fullname+ue;K==null&&(K=u.valueBlank),se.push({name:K,fullname:ue,index:he,orderby:G,children:[]}),oe[he.toString()]==null&&(oe[he.toString()]={}),oe[he.toString()][ue]==null&&(oe[he.toString()][ue]=se.length-1),se=se[se.length-1].children}}let ce="";for(let he=0;he<t.length;he++){let ue=ze(t[he].index,null,M),K=[].concat(W),G=[].concat(O);l=="column"?K.length>0?(K.push(""),K=K.join(t[he].fullname+"|||").split("|||").slice(0,K.length-1)):K.push(t[he].fullname):G.length>0?(G.push(""),G=G.join(t[he].fullname+"|||").split("|||").slice(0,G.length-1)):G.push(t[he].fullname),K.length==0&&K.push(""),G.length==0&&G.push("");for(let ee=0;ee<G.length;ee++)for(let pe=0;pe<K.length;pe++){let ae=G[ee]+K[pe];o.addStatisticsData(f,t[he],ae,ue)}}}for(let z in f){let M=f[z];if(M.sumtype=="SUM")M.result=M.sum;else if(M.sumtype=="COUNT")M.result=M.count;else if(M.sumtype=="COUNTA")M.result=M.counta;else if(M.sumtype=="COUNTUNIQUE")M.result=M.countunique;else if(M.sumtype=="AVERAGE")M.result=Il(M.sum/M.count);else if(M.sumtype=="MAX")M.result=M.max;else if(M.sumtype=="MIN")M.result=M.min;else if(M.sumtype=="MEDIAN"){let N=M.digitaldata.sort(function(V,q){return V-q}),L=N.length,O=parseInt(L/2);L%2==0?M.result=(N[O-1]+N[O])/2:M.result=N[O]}else if(M.sumtype=="PRODUCT")M.result=new Function("return "+M.digitaldata.join("*"))();else if(M.sumtype=="STDEV"){let N=M.sum/M.count;M.result=Mi.STDEV(N,M.digitaldata)}else if(M.sumtype=="STDEVP"){let N=M.sum/M.count;M.result=Mi.STDEVP(N,M.digitaldata)}else if(M.sumtype=="let"){let N=M.sum/M.count;M.result=Mi.let(N,M.digitaldata)}else if(M.sumtype=="VARP"){let N=M.sum/M.count;M.result=Mi.VARP(N,M.digitaldata)}let E=ic(M.result);E>M.acc&&(M.acc=E),M.result=Il(M.result,M.acc)}if(g=o.getTitleFromGroup(y,n,f),k=o.getTitleFromGroup(w,e,f),l=="column")if(k.length>0&&k[0].length>0)k=o.addValuesToTitle(k,t);else for(let z=0;z<t.length;z++)k.push([t[z].fullname]);else if(g.length>0&&g[0].length>0)g=o.addValuesToTitle(g,t);else for(let z=0;z<t.length;z++)g.push([t[z].fullname]);let S=k;k=cf.transpose(k,!1);let _=t.length==0?0:1,T=(k.length==0?_:k.length)+(g.length==0?_:g.length),A=(k.length==0?_:k[0].length)+(g.length==0?_:g[0].length),R=k.length,I=g.length==0?0:g[0].length,F=[];for(let z=0;z<T;z++){F[z]=new Array(A);for(let M=0;M<A;M++){let E=g[z-R];if(z<R&&M<I)F[z][M]="";else if(z<R&&M>=I)k[z]!=null?P(k[z][M-I])=="object"?F[z][M]=k[z][M-I].name+d.valueSum:F[z][M]=k[z][M-I]:F[z][M]="";else if(z>=R&&M<I)E!=null?P(E[M])=="object"?F[z][M]=E[M].name+d.valueSum:F[z][M]=E[M]:F[z][M]="";else{let N="";if(E!=null)if(!(E instanceof Array)||E.length==1)E instanceof Array?N=E[0]:N=E;else for(let q=0;q<E.length;q++)P(E[q])=="object"?N+=E[q].name:N+=E[q];let L="",O=S[M-I];if(O!=null)if(!(O instanceof Array)||O.length==1)O instanceof Array?L=O[0]:L=O;else for(let q=0;q<O.length;q++)P(O[q])=="object"?L+=O[q].name:L+=O[q];let V=N;N!=""&&L!=""?V=N+L:N==""&&(V=L),f[V]==null?F[z][M]="":F[z][M]=f[V].result}}}if(t.length==1&&e.length>0&&n.length>0)F[0][0]=t[0].fullname,F.splice(e.length,1);else if(t.length==1&&e.length>0){let z=F.splice(e.length,1),M=[];for(let E=0;E<F.length;E++){let N=[];E==F.length-1?N.push(z[0][0]):N.push("");for(let L=0;L<F[E].length-1;L++)N.push(F[E][L]);M.push(N)}F=M}return o.pivotDatas=F,F},drillDown:function(e,n){if(!$t(h.currentSheetIndex,"usePivotTablereports"))return;let t=this,l=t.pivotDatas[e][n],a=$.extend(!0,[],ve.nulldata),o=Q(),s=o.filter,u=o.pivotTable,d=1;for(let g=0;g<t.celldata[0].length;g++){let y;!!t.celldata[0][g]&&!!t.celldata[0][g].m?y=t.celldata[0][g].m:y=ze(0,g,t.celldata),y!=null&&(y=y.toString()),(y==null||$.trim(y.toString()).length==0)&&(y=u.titleColumn+" "+d),d++,a[0][g]=y}let f={};if(t.row!=null&&t.row.length>0)for(let g=0;g<t.row.length;g++)f[t.row[g].index]=t.pivotDatas[e][g];if(t.column!=null&&t.column.length>0)for(let g=0;g<t.column.length;g++)f[t.column[g].index]=t.pivotDatas[g][n];let m=[];for(let g=1;g<t.celldata.length;g++){let y=!0;for(let v in f){let b;if(!!t.celldata[g][v]&&!!t.celldata[g][v].m?b=t.celldata[g][v].m:b=ze(g,v,t.celldata),b!=null?b=b.toString():b=s.valueBlank,b!=f[v]){y=!1;break}}y&&m.push(g)}for(let g=0;g<m.length;g++)for(let y=0;y<t.celldata[0].length;y++){let v;!!t.celldata[m[g]][y]&&!!t.celldata[m[g]][y].m?v=t.celldata[m[g]][y].m:v=ze(m[g],y,t.celldata),v!=null?v=v.toString():v="",a[g+1][y]=v}h.luckysheet_select_save=[{row:[0,m.length],column:[0,t.celldata[0].length-1]}],h.clearjfundo=!1,Ze(a,h.luckysheet_select_save),lt(),h.clearjfundo=!0}},Oe=df});var ff,av,Ei,oc,sc,cc,_o,mf,iv,ov,Ni,Ar,pf,sv,cv,Jl,uc=Ie(()=>{Xe();ff=function(){let e,n;return e=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(e.prototype=$.extend(new arguments[0],arguments[arguments.length-1]),e._super=arguments[0].prototype):e.prototype=arguments[arguments.length-1],arguments.length>2&&(n=Array.prototype.slice.call(arguments,1,-1),n.unshift(e.prototype),$.extend.apply($,n))):e.prototype=arguments[0],e.prototype.cls=e,e},av=ff({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(e,n){this.format=e,this.fclass=n},render:function(e,n,t){let l=this,a=e,o,s,u,d,f;return this.format.replace(this.fre,function(){let m;return s=arguments[1],u=arguments[3],o=l.precre.exec(s),o?(f=o[2],s=o[1]):f=!1,d=a[s],d===void 0?"":u&&n&&n[u]?(m=n[u],m.get?n[u].get(d)||d:n[u][d]||d):(iv(d)&&(t.get("numberFormatter")?d=t.get("numberFormatter")(d):d=ov(d,f,t.get("numberDigitGroupCount"),t.get("numberDigitGroupSep"),t.get("numberDecimalMark"))),d)})}});$.spformat=function(e,n){return new av(e,n)};Ei=function(e,n,t){return e<n?n:e>t?t:e},oc=function(e,n){let t;return n===2?(t=Math.floor(e.length/2),e.length%2?e[t]:(e[t-1]+e[t])/2):e.length%2?(t=(e.length*n+n)/4,t%1?(e[Math.floor(t)]+e[Math.floor(t)-1])/2:e[t-1]):(t=(e.length*n+2)/4,t%1?(e[Math.floor(t)]+e[Math.floor(t)-1])/2:e[t-1])},sc=function(e){let n;switch(e){case"undefined":e=void 0;break;case"null":e=null;break;case"true":e=!0;break;case"false":e=!1;break;default:n=parseFloat(e),e==n&&(e=n)}return e},cc=function(e){let n,t=[];for(n=e.length;n--;)t[n]=sc(e[n]);return t},_o=function(e,n,t){let l;for(l=n.length;l--;)if(!(t&&n[l]===null)&&n[l]!==e)return!1;return!0},mf=function(e,n){let t,l,a=[];for(t=0,l=e.length;t<l;t++)e[t]!==n&&a.push(e[t]);return a},iv=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ov=function(e,n,t,l,a){let o,s;for(e=(n===!1?parseFloat(e).toString():e.toFixed(n)).split(""),o=(o=$.inArray(".",e))<0?e.length:o,o<e.length&&(e[o]=a),s=o-t;s>0;s-=t)e.splice(s,0,l);return e.join("")},Ni=ff({init:function(e){let n,t,l=[];for(n in e)e.hasOwnProperty(n)&&typeof n=="string"&&n.indexOf(":")>-1&&(t=n.split(":"),t[0]=t[0].length===0?-Infinity:parseFloat(t[0]),t[1]=t[1].length===0?Infinity:parseFloat(t[1]),t[2]=e[n],l.push(t));this.map=e,this.rangelist=l||!1},get:function(e){let n=this.rangelist,t,l,a;if((a=this.map[e])!==void 0)return a;if(n){for(t=n.length;t--;)if(l=n[t],l[0]<=e&&l[1]>=e)return l[2]}}});$.range_map=function(e){return new Ni(e)};Ar={defaultOption:{common:{type:"line",lineColor:"#2ec7c9",fillColor:"#CCF3F4",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!0,disableInteraction:!0,offsetX:0,offsetY:0},line:{spotColor:0,highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:0,maxSpotColor:0,lineWidth:1,normalRangeMin:void 0,normalRangeMax:void 0,normalRangeColor:"#ccc",drawNormalOnTop:!0,chartRangeMin:void 0,chartRangeMax:void 0,chartRangeMinX:void 0,chartRangeMaxX:void 0},bar:{barColor:"#fc5c5c",negBarColor:"#97b552",stackedBarColor:["#2ec7c9","#fc5c5c","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],zeroColor:void 0,nullColor:void 0,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:void 0,chartRangeMin:void 0,chartRangeClip:!1,colorMap:void 0},column:{barColor:"#fc5c5c",negBarColor:"#97b552",stackedBarColor:["#2ec7c9","#fc5c5c","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],zeroColor:void 0,nullColor:void 0,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:void 0,chartRangeMin:void 0,chartRangeClip:!1,colorMap:void 0},tristate:{barWidth:4,barSpacing:1,posBarColor:"#fc5c5c",negBarColor:"#97b552",zeroBarColor:"#999",colorMap:{}},discrete:{lineHeight:"auto",thresholdColor:"#fc5c5c",thresholdValue:0,chartRangeMax:void 0,chartRangeMin:void 0,chartRangeClip:!1},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff","#6D87FF","#5876FF","#4465FF","#2F54FF","#1A43FF","#0532FF"],base:void 0},pie:{offset:0,sliceColors:["#2ec7c9","#fc5c5c","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],borderWidth:0,borderColor:"#000"},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#5E5E5E",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:void 0,targetColor:"#4a2",chartRangeMax:void 0,chartRangeMin:void 0}},line:{type:"line",init:function(e,n,t,l,a){this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null},getRegion:function(e,n,t){let l,a=this.regionMap;for(l=a.length;l--;)if(a[l]!==null&&n>=a[l][0]&&n<=a[l][1])return a[l][2]},getCurrentRegionFields:function(){let e=this.currentRegion;return{isNull:this.yvalues[e]===null,x:this.xvalues[e],y:this.yvalues[e],color:this.options.get("lineColor"),fillColor:this.options.get("fillColor"),offset:e}},renderHighlight:function(){let e=this.currentRegion,n=this.target,t=this.vertices[e],l=this.options,a=l.get("spotRadius"),o=l.get("highlightSpotColor"),s=l.get("highlightLineColor"),u,d;!t||(a&&o&&(u=n.drawCircle(t[0],t[1],a,void 0,o),this.highlightSpotId=u.id,n.insertAfterShape(this.lastShapeId,u)),s&&(d=n.drawLine(t[0],this.canvasTop,t[0],this.canvasTop+this.canvasHeight,s),this.highlightLineId=d.id,n.insertAfterShape(this.lastShapeId,d)))},removeHighlight:function(){let e=this.target;this.highlightSpotId&&(e.removeShapeId(this.highlightSpotId),this.highlightSpotId=null),this.highlightLineId&&(e.removeShapeId(this.highlightLineId),this.highlightLineId=null)},scanValues:function(){let e=this.values,n=e.length,t=this.xvalues,l=this.yvalues,a=this.yminmax,o,s,u,d,f;for(o=0;o<n;o++)s=e[o],u=typeof e[o]=="string",d=typeof e[o]=="object"&&e[o]instanceof Array,f=u&&e[o].split(":"),u&&f.length===2?(t.push(Number(f[0])),l.push(Number(f[1])),a.push(Number(f[1]))):d?(t.push(s[0]),l.push(s[1]),a.push(s[1])):(t.push(o),e[o]===null||e[o]==="null"?l.push(null):(l.push(Number(s)),a.push(Number(s))));this.options.get("xvalues")&&(t=this.options.get("xvalues")),this.maxy=this.maxyorg=Math.max.apply(Math,a),this.miny=this.minyorg=Math.min.apply(Math,a),this.maxx=Math.max.apply(Math,t),this.minx=Math.min.apply(Math,t),this.xvalues=t,this.yvalues=l,this.yminmax=a},processRangeOptions:function(){let e=this.options,n=e.get("normalRangeMin"),t=e.get("normalRangeMax");n!==void 0&&(n<this.miny&&(this.miny=n),t>this.maxy&&(this.maxy=t)),e.get("chartRangeMin")!==void 0&&(e.get("chartRangeClip")||e.get("chartRangeMin")<this.miny)&&(this.miny=e.get("chartRangeMin")),e.get("chartRangeMax")!==void 0&&(e.get("chartRangeClip")||e.get("chartRangeMax")>this.maxy)&&(this.maxy=e.get("chartRangeMax")),e.get("chartRangeMinX")!==void 0&&(e.get("chartRangeClipX")||e.get("chartRangeMinX")<this.minx)&&(this.minx=e.get("chartRangeMinX")),e.get("chartRangeMaxX")!==void 0&&(e.get("chartRangeClipX")||e.get("chartRangeMaxX")>this.maxx)&&(this.maxx=e.get("chartRangeMaxX"))},drawNormalRange:function(e,n,t,l,a){let o=this.options.get("normalRangeMin"),s=this.options.get("normalRangeMax"),u=n+Math.round(t-t*((s-this.miny)/a)),d=Math.round(t*(s-o)/a);d==0&&o==s&&(d=1),this.target.drawRect(e,u,l,d,void 0,this.options.get("normalRangeColor")).append()},render:function(e,n){this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null,this.values=n;let t=this.options,l=this.target,a=e.mergedOptions.width,o=e.mergedOptions.height,s=this.vertices,u=t.get("spotRadius"),d=this.regionMap,f,m,g,y,v,b,k,w,x,C,S,_,T,A,R,I,F,z,M,E,N,L,O,V,q;if(this.scanValues(),this.processRangeOptions(),O=this.xvalues,V=this.yvalues,!(!this.yminmax.length||this.yvalues.length<2)){for(y=v=0,f=this.maxx-this.minx==0?1:this.maxx-this.minx,m=this.maxy-this.miny==0?1:this.maxy-this.miny,g=this.yvalues.length-1,u&&(a<u*4||o<u*4)&&(u=0),u&&(N=t.get("highlightSpotColor")&&!t.get("disableInteraction"),(N||t.get("minSpotColor")||t.get("spotColor")&&V[g]===this.miny)&&(o-=Math.ceil(u)),(N||t.get("maxSpotColor")||t.get("spotColor")&&V[g]===this.maxy)&&(o-=Math.ceil(u),y+=Math.ceil(u)),(N||(t.get("minSpotColor")||t.get("maxSpotColor"))&&(V[0]===this.miny||V[0]===this.maxy))&&(v+=Math.ceil(u),a-=Math.ceil(u)),(N||t.get("spotColor")||t.get("minSpotColor")||t.get("maxSpotColor")&&(V[g]===this.miny||V[g]===this.maxy))&&(a-=Math.ceil(u))),o--,t.get("normalRangeMin")!==void 0&&!t.get("drawNormalOnTop")&&this.drawNormalRange(v,y,o,a,m),k=[],w=[k],A=R=null,I=V.length,q=0;q<I;q++)x=O[q],S=O[q+1],C=V[q],_=v+Math.round((x-this.minx)*(a/f)),T=q<I-1?v+Math.round((S-this.minx)*(a/f)):a,R=_+(T-_)/2,d[q]=[A||0,R,q],A=R,C===null?q&&(V[q-1]!==null&&(k=[],w.push(k)),s.push(null)):(C<this.miny&&(C=this.miny),C>this.maxy&&(C=this.maxy),k.length||k.push([_,y+o]),b=[_,y+Math.round(o-o*((C-this.miny)/m))],k.push(b),s.push(b));for(F=[],z=[],M=w.length,q=0;q<M;q++)k=w[q],k.length&&(t.get("fillColor")&&(k.push([k[k.length-1][0],y+o]),z.push(k.slice(0)),k.pop()),k.length>2&&(k[0]=[k[0][0],k[1][1]]),F.push(k));for(M=z.length,q=0;q<M;q++)l.drawShape(z[q],t.get("fillColor"),t.get("fillColor")).append();for(M=F.length,q=0;q<M;q++)l.drawShape(F[q],t.get("lineColor"),void 0,t.get("lineWidth")).append();if(t.get("normalRangeMin")!==void 0&&t.get("drawNormalOnTop")&&this.drawNormalRange(v,y,o,a,m),u&&t.get("valueSpots"))for(E=t.get("valueSpots"),E.get===void 0&&(E=new Ni(E)),q=0;q<I;q++)L=E.get(V[q]),L&&l.drawCircle(v+Math.round((O[q]-this.minx)*(a/f)),y+Math.round(o-o*((V[q]-this.miny)/m)),u,void 0,L).append();u&&t.get("spotColor")&&V[g]!==null&&l.drawCircle(v+Math.round((O[O.length-1]-this.minx)*(a/f)),y+Math.round(o-o*((V[g]-this.miny)/m)),u,void 0,t.get("spotColor")).append(),this.maxy!==this.minyorg&&(u&&t.get("minSpotColor")&&(x=O[$.inArray(this.minyorg,V)],l.drawCircle(v+Math.round((x-this.minx)*(a/f)),y+Math.round(o-o*((this.minyorg-this.miny)/m)),u,void 0,t.get("minSpotColor")).append()),u&&t.get("maxSpotColor")&&(x=O[$.inArray(this.maxyorg,V)],l.drawCircle(v+Math.round((x-this.minx)*(a/f)),y+Math.round(o-o*((this.maxyorg-this.miny)/m)),u,void 0,t.get("maxSpotColor")).append()))}}},bar:{type:"bar",init:function(e,n){let t=this.options,l=e.mergedOptions.height,a=e.mergedOptions.width;this.canvasWidth=e.mergedOptions.height,this.canvasHeight=e.mergedOptions.width;let o=parseInt(t.get("barWidth"),10),s=parseInt(t.get("barSpacing"),10),u=t.get("chartRangeMin"),d=t.get("chartRangeMax"),f=t.get("chartRangeClip"),m=Infinity,g=-Infinity,y,v,b,k,w,x,C,S,_,T,A,R,I,F,z,M,E,N,L,O,V,q,W;for(this.values=n,x=0,C=n.length;x<C;x++)O=n[x],y=typeof O=="string"&&O.indexOf(":")>-1,(y||$.isArray(O))&&(z=!0,y&&(O=n[x]=cc(O.split(":"))),O=mf(O,null),v=Math.min.apply(Math,O),b=Math.max.apply(Math,O),v<m&&(m=v),b>g&&(g=b));this.stacked=z,this.regionShapes={},this.barWidth=Math.floor(l/n.length)-s,this.barSpacing=s,this.totalBarWidth=this.barWidth+s,this.width=l,f&&(I=u===void 0?-Infinity:u,F=d===void 0?Infinity:d),w=[],k=z?[]:w;let X=[],te=[];for(x=0,C=n.length;x<C;x++)if(z)for(M=n[x],n[x]=L=[],X[x]=0,k[x]=te[x]=0,E=0,N=M.length;E<N;E++)O=L[E]=f?Ei(M[E],I,F):M[E],O!==null&&(O>0&&(X[x]+=O),m<0&&g>0?O<0?te[x]+=Math.abs(O):k[x]+=O:k[x]+=Math.abs(O),w.push(O));else O=f?Ei(n[x],I,F):n[x],O=n[x]=sc(O),O!==null&&w.push(O);this.max=R=Math.max.apply(Math,w),this.min=A=Math.min.apply(Math,w),this.stackMax=g=z?Math.max.apply(Math,X):R,this.stackMin=m=z?Math.min.apply(Math,w):A,t.get("chartRangeMin")!==void 0&&(t.get("chartRangeClip")||t.get("chartRangeMin")<A)&&(A=t.get("chartRangeMin")),t.get("chartRangeMax")!==void 0&&(t.get("chartRangeClip")||t.get("chartRangeMax")>R)&&(R=t.get("chartRangeMax")),this.zeroAxis=_=t.get("zeroAxis",!0),A<=0&&R>=0&&_?T=0:_==!1?T=A:A>0?T=0:T=R,this.xaxisOffset=T,S=z?Math.max.apply(Math,k)+Math.max.apply(Math,te):R-T,this.canvasHeightEf=_&&A<0?this.canvasHeight-2:this.canvasHeight-1,this.isNeg=!1,A<T?(V=Math.floor(this.canvasHeight/2),this.isNeg=!0,V!==Math.ceil(V)&&(this.canvasHeightEf-=2,V=Math.ceil(V))):V=0,this.yoffset=V,$.isArray(t.get("colorMap"))?(this.colorMapByIndex=t.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=t.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===void 0&&(this.colorMapByValue=new Ni(this.colorMapByValue))),this.range=S},getRegion:function(e,n,t){let l=Math.floor(n/this.totalBarWidth);return l<0||l>=this.values.length?void 0:l},getCurrentRegionFields:function(){let e=this.currentRegion,n=ensureArray(this.values[e]),t=[],l,a;for(a=n.length;a--;)l=n[a],t.push({isNull:l===null,value:l,color:this.calcColor(a,l,e),offset:e});return t},calcColor:function(e,n,t){let l=this.colorMapByIndex,a=this.colorMapByValue,o=this.options,s,u;return this.stacked?s=o.get("stackedBarColor"):s=n<0?o.get("negBarColor"):o.get("barColor"),n===0&&o.get("zeroColor")!==void 0&&(s=o.get("zeroColor")),a&&(u=a.get(n))?s=u:l&&l.length>t&&(s=l[t]),$.isArray(s)?s[e%s.length]:s},renderRegion:function(e,n){let t=this.values[e],l=this.options,a=this.xaxisOffset,o=[],s=this.range,u=this.stacked,d=this.target,f=e*this.totalBarWidth,m=this.canvasHeightEf,g=this.yoffset,y,v,b,k,w,x,C,S,_,T;if(t=$.isArray(t)?t:[t],C=t.length,S=t[0],k=_o(null,t),T=_o(a,t,!0),k)return l.get("nullColor")?(b=n?l.get("nullColor"):this.calcHighlightColor(l.get("nullColor"),l),y=g>0?g-1:g,d.drawRect(y,f,0,this.barWidth-1,b,b)):void 0;for(w=g,this.isNeg&&(m=Math.floor(m/2)),x=0;x<C;x++){if(S=t[x],u&&S===a){if(!T||_)continue;_=!0}s>0?v=Math.floor(m*(Math.abs(S-a)/s)):v=m,S<a||S===a&&g===0?(y=w-v,w+=v):u?(y=g,g+=v):(y=g,g-=v),b=this.calcColor(x,S,e),n&&(b=this.calcHighlightColor(b,l)),o.push(d.drawRect(y,f,v-1,this.barWidth-1,b,b))}return o.length===1?o[0]:o}},column:{type:"column",init:function(e,n){let t=this.options,l=e.mergedOptions.width,a=e.mergedOptions.height;this.canvasWidth=e.mergedOptions.width,this.canvasHeight=e.mergedOptions.height;let o=parseInt(t.get("barWidth"),10),s=parseInt(t.get("barSpacing"),10),u=t.get("chartRangeMin"),d=t.get("chartRangeMax"),f=t.get("chartRangeClip"),m=Infinity,g=-Infinity,y,v,b,k,w,x,C,S,_,T,A,R,I,F,z,M,E,N,L,O,V,q,W;for(this.values=n,x=0,C=n.length;x<C;x++)O=n[x],y=typeof O=="string"&&O.indexOf(":")>-1,(y||$.isArray(O))&&(z=!0,y&&(O=n[x]=cc(O.split(":"))),O=mf(O,null),v=Math.min.apply(Math,O),b=Math.max.apply(Math,O),v<m&&(m=v),b>g&&(g=b));this.stacked=z,this.regionShapes={},this.barWidth=Math.floor(l/n.length)-s,this.barSpacing=s,this.totalBarWidth=this.barWidth+s,this.width=l,f&&(I=u===void 0?-Infinity:u,F=d===void 0?Infinity:d),w=[],k=z?[]:w;let X=[],te=[];for(x=0,C=n.length;x<C;x++)if(z)for(M=n[x],n[x]=L=[],X[x]=0,k[x]=te[x]=0,E=0,N=M.length;E<N;E++)O=L[E]=f?Ei(M[E],I,F):M[E],O!==null&&(O>0&&(X[x]+=O),m<0&&g>0?O<0?te[x]+=Math.abs(O):k[x]+=O:k[x]+=Math.abs(O),w.push(O));else O=f?Ei(n[x],I,F):n[x],O=n[x]=sc(O),O!==null&&w.push(O);this.max=R=Math.max.apply(Math,w),this.min=A=Math.min.apply(Math,w),this.stackMax=g=z?Math.max.apply(Math,X):R,this.stackMin=m=z?Math.min.apply(Math,w):A,t.get("chartRangeMin")!==void 0&&(t.get("chartRangeClip")||t.get("chartRangeMin")<A)&&(A=t.get("chartRangeMin")),t.get("chartRangeMax")!==void 0&&(t.get("chartRangeClip")||t.get("chartRangeMax")>R)&&(R=t.get("chartRangeMax")),this.zeroAxis=_=t.get("zeroAxis",!0),A<=0&&R>=0&&_?T=0:_==!1?T=A:A>0?T=0:T=R,this.xaxisOffset=T,S=z?Math.max.apply(Math,k)+Math.max.apply(Math,te):R-T,this.canvasHeightEf=_&&A<0?this.canvasHeight-2:this.canvasHeight-1,this.isNeg=!1,A<T?(V=Math.floor(this.canvasHeight/2),this.isNeg=!0,V!==Math.ceil(V)&&(this.canvasHeightEf-=2,V=Math.ceil(V))):V=this.canvasHeight,this.yoffset=V,$.isArray(t.get("colorMap"))?(this.colorMapByIndex=t.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=t.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===void 0&&(this.colorMapByValue=new Ni(this.colorMapByValue))),this.range=S},getRegion:function(e,n,t){let l=Math.floor(n/this.totalBarWidth);return l<0||l>=this.values.length?void 0:l},getCurrentRegionFields:function(){let e=this.currentRegion,n=ensureArray(this.values[e]),t=[],l,a;for(a=n.length;a--;)l=n[a],t.push({isNull:l===null,value:l,color:this.calcColor(a,l,e),offset:e});return t},calcColor:function(e,n,t){let l=this.colorMapByIndex,a=this.colorMapByValue,o=this.options,s,u;return this.stacked?s=o.get("stackedBarColor"):s=n<0?o.get("negBarColor"):o.get("barColor"),n===0&&o.get("zeroColor")!==void 0&&(s=o.get("zeroColor")),a&&(u=a.get(n))?s=u:l&&l.length>t&&(s=l[t]),$.isArray(s)?s[e%s.length]:s},renderRegion:function(e,n){let t=this.values[e],l=this.options,a=this.xaxisOffset,o=[],s=this.range,u=this.stacked,d=this.target,f=e*this.totalBarWidth,m=this.canvasHeightEf,g=this.yoffset,y,v,b,k,w,x,C,S,_,T;if(t=$.isArray(t)?t:[t],C=t.length,S=t[0],k=_o(null,t),T=_o(a,t,!0),k)return l.get("nullColor")?(b=n?l.get("nullColor"):this.calcHighlightColor(l.get("nullColor"),l),y=g>0?g-1:g,d.drawRect(f,y,this.barWidth-1,0,b,b)):void 0;for(w=g,this.isNeg&&(m=Math.floor(m/2)),x=0;x<C;x++){if(S=t[x],u&&S===a){if(!T||_)continue;_=!0}s>0?v=Math.floor(m*(Math.abs(S-a)/s)):v=m,S<a||S===a&&g===0?(y=w,w+=v):(y=g-v,g-=v),b=this.calcColor(x,S,e),n&&(b=this.calcHighlightColor(b,l)),o.push(d.drawRect(f,y,this.barWidth-1,v-1,b,b))}return o.length===1?o[0]:o}},tristate:{type:"tristate",init:function(e,n){let t=this.options,l=e.mergedOptions.width,a=e.mergedOptions.height;this.canvasWidth=e.mergedOptions.width,this.canvasHeight=e.mergedOptions.height;let o=parseInt(t.get("barWidth"),10),s=parseInt(t.get("barSpacing"),10);this.regionShapes={},this.barWidth=o,this.barSpacing=s,this.totalBarWidth=o+s,this.values=$.map(n,Number),this.width=l=n.length*o+(n.length-1)*s,$.isArray(t.get("colorMap"))?(this.colorMapByIndex=t.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=t.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===void 0&&(this.colorMapByValue=new Ni(this.colorMapByValue)))},getRegion:function(e,n,t){return Math.floor(n/this.totalBarWidth)},getCurrentRegionFields:function(){let e=this.currentRegion;return{isNull:this.values[e]===void 0,value:this.values[e],color:this.calcColor(this.values[e],e),offset:e}},calcColor:function(e,n){let t=this.values,l=this.options,a=this.colorMapByIndex,o=this.colorMapByValue,s,u;return o&&(u=o.get(e))?s=u:a&&a.length>n?s=a[n]:t[n]<0?s=l.get("negBarColor"):t[n]>0?s=l.get("posBarColor"):s=l.get("zeroBarColor"),s},renderRegion:function(e,n){let t=this.values,l=this.options,a=this.target,o,s,u,d,f,m;if(o=this.canvasHeight,u=Math.round(o/2),d=e*this.totalBarWidth,t[e]<0?(f=u,s=u-1):t[e]>0?(f=0,s=u-1):(f=u-1,s=2),m=this.calcColor(t[e],e),m!==null)return n&&(m=this.calcHighlightColor(m,l)),a.drawRect(d,f,this.barWidth-1,s-1,m,m)}},discrete:{type:"discrete",init:function(e,n){let t=this.options,l=e.mergedOptions.width,a=e.mergedOptions.height;this.canvasWidth=e.mergedOptions.width,this.canvasHeight=e.mergedOptions.height,this.regionShapes={},this.values=n=$.map(n,Number),this.min=Math.min.apply(Math,n),this.max=Math.max.apply(Math,n),this.range=this.max-this.min,this.width=l,this.interval=Math.floor(l/n.length),this.itemWidth=l/n.length,t.get("chartRangeMin")!==void 0&&(t.get("chartRangeClip")||t.get("chartRangeMin")<this.min)&&(this.min=t.get("chartRangeMin")),t.get("chartRangeMax")!==void 0&&(t.get("chartRangeClip")||t.get("chartRangeMax")>this.max)&&(this.max=t.get("chartRangeMax")),this.target&&(this.lineHeight=t.get("lineHeight")==="auto"?Math.round(this.canvasHeight*.3):t.get("lineHeight"))},getRegion:function(e,n,t){return Math.floor(n/this.itemWidth)},getCurrentRegionFields:function(){let e=this.currentRegion;return{isNull:this.values[e]===void 0,value:this.values[e],offset:e}},renderRegion:function(e,n){let t=this.values,l=this.options,a=this.min,o=this.max,s=this.range,u=this.interval,d=this.target,f=this.canvasHeight,m=this.lineHeight,g=f-m,y,v,b,k;return v=Ei(t[e],a,o),k=e*u,y=Math.round(g-g*((v-a)/s)),b=l.get("thresholdColor")&&v<l.get("thresholdValue")?l.get("thresholdColor"):l.get("lineColor"),n&&(b=this.calcHighlightColor(b,l)),this.target.drawRect(k,y,u<=2?1:u-2,m,b,b)}},bullet:{type:"bullet",init:function(e,n){let t=this.options,l=e.mergedOptions.width,a=e.mergedOptions.height;this.canvasWidth=e.mergedOptions.width,this.canvasHeight=e.mergedOptions.height;let o,s,u;this.values=n=cc(n),u=n.slice(),u[0]=u[0]===null?u[2]:u[0],u[1]=n[1]===null?u[2]:u[1],o=Math.min.apply(Math,n),s=Math.max.apply(Math,n),t.get("base")===void 0?o=o<0?o:0:o=t.get("base"),this.min=o,this.max=s,this.range=s-o,this.shapes={},this.valueShapes={},this.regiondata={},this.width=l,n.length||(this.disabled=!0)},getRegion:function(e,n,t){let l=this.target.getShapeAt(e,n,t);return l!==void 0&&this.shapes[l]!==void 0?this.shapes[l]:void 0},getCurrentRegionFields:function(){let e=this.currentRegion;return{fieldkey:e.substr(0,1),value:this.values[e.substr(1)],region:e}},changeHighlight:function(e){let n=this.currentRegion,t=this.valueShapes[n],l;switch(delete this.shapes[t],n.substr(0,1)){case"r":l=this.renderRange(n.substr(1),e);break;case"p":l=this.renderPerformance(e);break;case"t":l=this.renderTarget(e);break}this.valueShapes[n]=l.id,this.shapes[l.id]=n,this.target.replaceWithShape(t,l)},renderRange:function(e,n){let t=this.values[e],l=Math.round(this.canvasWidth*((t-this.min)/this.range)),a=this.options.get("rangeColors")[e-2];return n&&(a=this.calcHighlightColor(a,this.options)),this.target.drawRect(0,0,l-1,this.canvasHeight-1,a,a)},renderPerformance:function(e){let n=this.values[1],t=Math.round(this.canvasWidth*((n-this.min)/this.range)),l=this.options.get("performanceColor");return e&&(l=this.calcHighlightColor(l,this.options)),this.target.drawRect(0,Math.round(this.canvasHeight*.3),t-1,Math.round(this.canvasHeight*.4)-1,l,l)},renderTarget:function(e){let n=this.values[0],t=Math.round(this.canvasWidth*((n-this.min)/this.range)-this.options.get("targetWidth")/2),l=Math.round(this.canvasHeight*.1),a=this.canvasHeight-l*2,o=this.options.get("targetColor");return e&&(o=this.calcHighlightColor(o,this.options)),this.target.drawRect(t,l,this.options.get("targetWidth")-1,a-1,o,o)},render:function(e,n){this.init(e,n);let t=this.values.length,l=this.target,a,o;for(a=2;a<t;a++)o=this.renderRange(a).append(),this.shapes[o.id]="r"+a,this.valueShapes["r"+a]=o.id;this.values[1]!==null&&(o=this.renderPerformance().append(),this.shapes[o.id]="p1",this.valueShapes.p1=o.id),this.values[0]!==null&&(o=this.renderTarget().append(),this.shapes[o.id]="t0",this.valueShapes.t0=o.id)}},pie:{type:"pie",init:function(e,n){let t=this.options,l=e.mergedOptions.width,a=e.mergedOptions.height;this.canvasWidth=e.mergedOptions.width,this.canvasHeight=e.mergedOptions.height;let o=0,s;if(this.shapes={},this.valueShapes={},this.values=n=$.map(n,Number),t.get("width")==="auto"&&(this.width=this.height),n.length>0)for(s=n.length;s--;)o+=n[s];this.total=o,this.radius=Math.floor(Math.min(this.canvasWidth,this.canvasHeight)/2)},getRegion:function(e,n,t){let l=this.target.getShapeAt(e,n,t);return l!==void 0&&this.shapes[l]!==void 0?this.shapes[l]:void 0},getCurrentRegionFields:function(){let e=this.currentRegion;return{isNull:this.values[e]===void 0,value:this.values[e],percent:this.values[e]/this.total*100,color:this.options.get("sliceColors")[e%this.options.get("sliceColors").length],offset:e}},changeHighlight:function(e){let n=this.currentRegion,t=this.renderSlice(n,e),l=this.valueShapes[n];delete this.shapes[l],this.target.replaceWithShape(l,t),this.valueShapes[n]=t.id,this.shapes[t.id]=n},renderSlice:function(e,n){let t=this.target,l=this.options,a=this.radius,o=l.get("borderWidth"),s=l.get("offset"),u=2*Math.PI,d=this.values,f=this.total,m=s?2*Math.PI*(s/360):0,g,y,v,b,k;for(b=d.length,v=0;v<b;v++){if(g=m,y=m,f>0&&(y=m+u*(d[v]/f)),e===v)return k=l.get("sliceColors")[v%l.get("sliceColors").length],n&&(k=this.calcHighlightColor(k,l)),t.drawPieSlice(a,a,a-o,g,y,void 0,k);m=y}},render:function(e,n){this.init(e,n);let t=this.target,l=this.values,a=this.options,o=this.radius,s=a.get("borderWidth"),u,d;for(s&&t.drawCircle(o,o,Math.floor(o-s/2),a.get("borderColor"),void 0,s).append(),d=l.length;d--;)l[d]&&(u=this.renderSlice(d).append(),this.valueShapes[d]=u.id,this.shapes[u.id]=d)}},box:{type:"box",init:function(e,n){let t=this.options,l=e.mergedOptions.width,a=e.mergedOptions.height;this.canvasWidth=e.mergedOptions.width,this.canvasHeight=e.mergedOptions.height,this.values=$.map(n,Number),this.width=t.get("width")==="auto"?"4.0em":l,this.values.length||(this.disabled=1)},getRegion:function(){return 1},getCurrentRegionFields:function(){let e=[{field:"lq",value:this.quartiles[0]},{field:"med",value:this.quartiles[1]},{field:"uq",value:this.quartiles[2]}];return this.loutlier!==void 0&&e.push({field:"lo",value:this.loutlier}),this.routlier!==void 0&&e.push({field:"ro",value:this.routlier}),this.lwhisker!==void 0&&e.push({field:"lw",value:this.lwhisker}),this.rwhisker!==void 0&&e.push({field:"rw",value:this.rwhisker}),e},render:function(e,n){this.init(e,n);let t=this.target,l=this.values,a=l.length,o=this.options,s=this.canvasWidth,u=this.canvasHeight,d=o.get("chartRangeMin")===void 0?Math.min.apply(Math,l):o.get("chartRangeMin"),f=o.get("chartRangeMax")===void 0?Math.max.apply(Math,l):o.get("chartRangeMax"),m=0,g,y,v,b,k,w,x,C,S,_,T;if(o.get("raw"))o.get("showOutliers")&&l.length>5?(y=l[0],g=l[1],b=l[2],k=l[3],w=l[4],x=l[5],C=l[6]):(g=l[0],b=l[1],k=l[2],w=l[3],x=l[4]);else if(l.sort(function(A,R){return A-R}),b=oc(l,1),k=oc(l,2),w=oc(l,3),v=w-b,o.get("showOutliers")){for(g=x=void 0,S=0;S<a;S++)g===void 0&&l[S]>b-v*o.get("outlierIQR")&&(g=l[S]),l[S]<w+v*o.get("outlierIQR")&&(x=l[S]);y=l[0],C=l[a-1]}else g=l[0],x=l[a-1];this.quartiles=[b,k,w],this.lwhisker=g,this.rwhisker=x,this.loutlier=y,this.routlier=C,T=s/(f-d+1),o.get("showOutliers")&&(m=Math.ceil(o.get("spotRadius")),s-=2*Math.ceil(o.get("spotRadius")),T=s/(f-d+1),y<g&&t.drawCircle((y-d)*T+m,u/2,o.get("spotRadius"),o.get("outlierLineColor"),o.get("outlierFillColor")).append(),C>x&&t.drawCircle((C-d)*T+m,u/2,o.get("spotRadius"),o.get("outlierLineColor"),o.get("outlierFillColor")).append()),t.drawRect(Math.round((b-d)*T+m),Math.round(u*.1),Math.round((w-b)*T),Math.round(u*.8),o.get("boxLineColor"),o.get("boxFillColor")).append(),t.drawLine(Math.round((g-d)*T+m),Math.round(u/2),Math.round((b-d)*T+m),Math.round(u/2),o.get("lineColor")).append(),t.drawLine(Math.round((g-d)*T+m),Math.round(u/4),Math.round((g-d)*T+m),Math.round(u-u/4),o.get("whiskerColor")).append(),t.drawLine(Math.round((x-d)*T+m),Math.round(u/2),Math.round((w-d)*T+m),Math.round(u/2),o.get("lineColor")).append(),t.drawLine(Math.round((x-d)*T+m),Math.round(u/4),Math.round((x-d)*T+m),Math.round(u-u/4),o.get("whiskerColor")).append(),t.drawLine(Math.round((k-d)*T+m),Math.round(u*.1),Math.round((k-d)*T+m),Math.round(u*.9),o.get("medianColor")).append(),o.get("target")&&(_=Math.ceil(o.get("spotRadius")),t.drawLine(Math.round((o.get("target")-d)*T+m),Math.round(u/2-_),Math.round((o.get("target")-d)*T+m),Math.round(u/2+_),o.get("targetColor")).append(),t.drawLine(Math.round((o.get("target")-d)*T+m-_),Math.round(u/2),Math.round((o.get("target")-d)*T+m+_),Math.round(u/2),o.get("targetColor")).append())}},shapeCount:0,shapes:{},shapeseq:[],lastShapeId:null,mergedOptions:null,init:function(e,n){let t,l,a;n=n||{};let o=this;return l=this.defaultOption,a=l.common,t=l[n.type||a.type],o.shapeCount=0,o.shapes={},o.shapeseq=[],o.lastShapeId=null,o.mergedOptions=$.extend({},a,t,n),o.mergedOptions.width=o.mergedOptions.width,o.mergedOptions.height=o.mergedOptions.height,o[o.mergedOptions.type].render(o,e),{shapes:o.shapes,shapeseq:o.shapeseq,offsetX:o.mergedOptions.offsetX,offsetY:o.mergedOptions.offsetY,pixelWidth:o.mergedOptions.width,pixelHeight:o.mergedOptions.height}},_getContext:function(e,n,t){let l;return this.ctx!=null?l=this.ctx:l=$("#"+this._canvasID).get(0).getContext("2d"),e!==void 0&&(l.strokeStyle=e),l.lineWidth=t===void 0?1:t,n!==void 0&&(l.fillStyle=n),l},reset:function(){this._getContext().clearRect(0,0,this.pixelWidth,this.pixelHeight),this.shapes={},this.shapeseq=[],this.currentTargetShapeId=void 0},_drawShape:function(e,n,t,l,a){let o=this._getContext(t,l,a),s,u;for(o.beginPath(),o.moveTo(n[0][0]+.5+this.offsetX,n[0][1]+.5+this.offsetY),s=1,u=n.length;s<u;s++)o.lineTo(n[s][0]+.5+this.offsetX,n[s][1]+.5+this.offsetY);t!==void 0&&o.stroke(),l!==void 0&&o.fill(),this.targetX!==void 0&&this.targetY!==void 0&&o.isPointInPath(this.targetX+this.offsetX,this.targetY+this.offsetY)&&(this.currentTargetShapeId=e)},_drawCircle:function(e,n,t,l,a,o,s){let u=this._getContext(a,o,s);u.beginPath(),n+=this.offsetX,t+=this.offsetY,u.arc(n,t,l,0,2*Math.PI,!1),this.targetX!==void 0&&this.targetY!==void 0&&u.isPointInPath(this.targetX+this.offsetX,this.targetY+this.offsetY)&&(this.currentTargetShapeId=e),a!==void 0&&u.stroke(),o!==void 0&&u.fill()},_drawPieSlice:function(e,n,t,l,a,o,s,u){let d=this._getContext(s,u);n+=this.offsetX,t+=this.offsetY,d.beginPath(),d.moveTo(n,t),d.arc(n,t,l,a,o,!1),d.lineTo(n,t),d.closePath(),s!==void 0&&d.stroke(),u&&d.fill(),this.targetX!==void 0&&this.targetY!==void 0&&d.isPointInPath(this.targetX+this.offsetX,this.targetY+this.offsetY)&&(this.currentTargetShapeId=e)},_drawRect:function(e,n,t,l,a,o,s){return this._drawShape(e,[[n,t],[n+l,t],[n+l,t+a],[n,t+a],[n,t]],o,s)},appendShape:function(e){return this.shapes[e.id]=e,this.shapeseq.push(e.id),this.lastShapeId=e.id,e.id},replaceWithShape:function(e,n){let t=this.shapeseq,l;for(this.shapes[n.id]=n,l=t.length;l--;)t[l]==e&&(t[l]=n.id);delete this.shapes[e]},replaceWithShapes:function(e,n){let t=this.shapeseq,l={},a,o,s;for(o=e.length;o--;)l[e[o]]=!0;for(o=t.length;o--;)a=t[o],l[a]&&(t.splice(o,1),delete this.shapes[a],s=o);for(o=n.length;o--;)t.splice(s,0,n[o].id),this.shapes[n[o].id]=n[o]},insertAfterShape:function(e,n){let t=this.shapeseq,l;for(l=t.length;l--;)if(t[l]===e){t.splice(l+1,0,n.id),this.shapes[n.id]=n;return}},removeShapeId:function(e){let n=this.shapeseq,t;for(t=n.length;t--;)if(n[t]===e){n.splice(t,1);break}delete this.shapes[e]},getShapeAt:function(e,n,t){return this.targetX=n,this.targetY=t,this.render(),this.currentTargetShapeId},_canvasID:"luckysheetTableContent",render:function(e,n,t,l,a,o,s,u){s==null&&(s="luckysheetTableContent"),this._canvasID=s,u!=null&&(this.ctx=u);let d=e.length,f=this._getContext(),m,g,y;for(this.offsetX=t,this.offsetY=l,this.pixelWidth=a,this.pixelHeight=o,y=0;y<d;y++)m=e[y],g=n[m],this["_draw"+g.type].apply(this,g.args)},drawLine:function(e,n,t,l,a,o){return this.drawShape([[e,n],[t,l]],a,o)},drawShape:function(e,n,t,l){return this._genShape("Shape",[e,n,t,l])},drawCircle:function(e,n,t,l,a,o){return this._genShape("Circle",[e,n,t,l,a,o])},drawPieSlice:function(e,n,t,l,a,o,s){return this._genShape("PieSlice",[e,n,t,l,a,o,s])},drawRect:function(e,n,t,l,a,o){return this._genShape("Rect",[e,n,t,l,a,o])},_genShape:function(e,n){let t=this.shapeCount++;n.unshift(t);let l={id:t,type:e,args:n};return this.shapes[t]=l,this.shapeseq.push(t),this.lastShapeId=t,{append:function(){return l},get:function(){return t}}}},pf={changeHighlight:function(e){let n=this.currentRegion,t=this.target,l=this.regionShapes[n],a;l&&(a=this.renderRegion(n,e),$.isArray(a)||$.isArray(l)?(t.replaceWithShapes(l,a),this.regionShapes[n]=$.map(a,function(o){return o.id})):(t.replaceWithShape(l,a),this.regionShapes[n]=a.id))},render:function(e,n){this.init(e,n);let t=this.values,l=this.target,a=this.regionShapes,o,s,u,d;for(u=t.length;u--;)if(o=this.renderRegion(u),o)if($.isArray(o)){for(s=[],d=o.length;d--;)o[d].append(),s.push(o[d].id);a[u]=s}else o.append(),a[u]=o.id;else a[u]=null}},sv={get:function(e){return Ar.mergedOptions[e]}},cv={drawLine:function(e,n,t,l,a,o){return Ar.drawLine(e,n,t,l,a,o)},drawShape:function(e,n,t,l){return Ar.drawShape(e,n,t,l)},drawCircle:function(e,n,t,l,a,o){return Ar.drawCircle(e,n,t,l,a,o)},drawPieSlice:function(e,n,t,l,a,o,s){return Ar.drawPieSlice(e,n,t,l,a,o,s)},drawRect:function(e,n,t,l,a,o){return Ar.drawRect(e,n,t,l,a,o)}};for(let e in Ar)e in{line:null,bar:null,column:null,tristate:null,discrete:null,bullet:null,pie:null,box:null}&&(Ar[e].options=sv,Ar[e].target=cv),e in{bar:null,column:null,tristate:null,discrete:null}&&(Ar[e].changeHighlight=pf.changeHighlight,Ar[e].render=pf.render);Jl=Ar});function ma(e,n,t){e==null&&(e=$("#luckysheet-cell-main").scrollTop()),n==null&&(n=h.luckysheetTableContentHW[1]),t==null&&(t=h.columnHeaderHeight);let l=$("#luckysheetTableContent").get(0).getContext("2d");l.save(),l.scale(h.devicePixelRatio,h.devicePixelRatio),l.clearRect(0,t,h.rowHeaderWidth-1,n),l.font=Zn(),l.textBaseline=Sl.textBaseline,l.fillStyle=Sl.fillStyle;let a,o;a=st(h.visibledatarow,e),o=st(h.visibledatarow,e+n),a==-1&&(a=0),o==-1&&(o=h.visibledatarow.length-1),l.save(),l.beginPath(),l.rect(0,t-1,h.rowHeaderWidth-1,n-2),l.clip();let s,u,d=.5,f;for(let m=a;m<=o;m++){m==0?u=-e-1:u=h.visibledatarow[m-1]-e-1,s=h.visibledatarow[m]-e;let g=a==m?-2:0,y=o==m?-2:0;if(!!Je.createHookFunction("rowTitleCellRenderBefore",m+1,{r:m,top:u+t+g,width:h.rowHeaderWidth-1,height:s-u+1+y-g},l)){if(!(h.config.rowhidden!=null&&h.config.rowhidden[m]!=null)){l.fillStyle="#ffffff",l.fillRect(0,u+t+g,h.rowHeaderWidth-1,s-u+1+y-g),l.fillStyle="#000000",l.save(),l.scale(h.zoomRatio,h.zoomRatio);let v=zr(m+1,l),b=(h.rowHeaderWidth-v.width)/2,k=u+(s-u)/2+t;l.fillText(m+1,b/h.zoomRatio,k/h.zoomRatio),l.restore()}l.beginPath(),l.moveTo(h.rowHeaderWidth-2+d,u+t-2),l.lineTo(h.rowHeaderWidth-2+d,s+t-2),l.lineWidth=1,l.strokeStyle=Sl.strokeStyle,l.stroke(),l.closePath(),h.config.rowhidden!=null&&h.config.rowhidden[m]==null&&h.config.rowhidden[m+1]!=null?(l.beginPath(),l.moveTo(-1,s+t-4+d),l.lineTo(h.rowHeaderWidth-1,s+t-4+d),l.closePath(),l.stroke()):(h.config.rowhidden==null||h.config.rowhidden[m]==null)&&(l.beginPath(),l.moveTo(-1,s+t-2+d),l.lineTo(h.rowHeaderWidth-1,s+t-2+d),l.closePath(),l.stroke()),h.config.rowhidden!=null&&h.config.rowhidden[m-1]!=null&&f!=null&&(l.beginPath(),l.moveTo(-1,f+t+d),l.lineTo(h.rowHeaderWidth-1,f+t+d),l.closePath(),l.stroke()),f=s,Je.createHookFunction("rowTitleCellRenderAfter",m+1,{r:m,top:u+t+g,width:h.rowHeaderWidth-1,height:s-u+1+y-g},l)}}l.restore(),l.restore()}function pa(e,n,t){e==null&&(e=$("#luckysheet-cell-main").scrollLeft()),n==null&&(n=h.luckysheetTableContentHW[0]),t==null&&(t=h.rowHeaderWidth);let l=$("#luckysheetTableContent").get(0).getContext("2d");l.save(),l.scale(h.devicePixelRatio,h.devicePixelRatio),l.clearRect(t,0,n,h.columnHeaderHeight-1),l.font=Zn(),l.textBaseline=Sl.textBaseline,l.fillStyle=Sl.fillStyle;let a,o;a=st(h.visibledatacolumn,e),o=st(h.visibledatacolumn,e+n),a==-1&&(a=0),o==-1&&(o=h.visibledatacolumn.length-1),l.save(),l.beginPath(),l.rect(t-1,0,n,h.columnHeaderHeight-1),l.clip();let s,u,d=.5,f;for(let m=a;m<=o;m++){m==0?u=-e:u=h.visibledatacolumn[m-1]-e,s=h.visibledatacolumn[m]-e;let g=tt(m);if(!!Je.createHookFunction("columnTitleCellRenderBefore",g,{c:m,left:u+t-1,width:s-u,height:h.columnHeaderHeight-1},l)){if(!(h.config.colhidden!=null&&h.config.colhidden[m]!=null)){l.fillStyle="#ffffff",l.fillRect(u+t-1,0,s-u,h.columnHeaderHeight-1),l.fillStyle="#000000",l.save(),l.scale(h.zoomRatio,h.zoomRatio);let y=zr(g,l),v=Math.round(u+(s-u)/2+t-y.width/2),b=Math.round(h.columnHeaderHeight/2);l.fillText(g,v/h.zoomRatio,b/h.zoomRatio),l.restore()}h.config.colhidden!=null&&h.config.colhidden[m]==null&&h.config.colhidden[m+1]!=null?(l.beginPath(),l.moveTo(s+t-4+d,0),l.lineTo(s+t-4+d,h.columnHeaderHeight-2),l.lineWidth=1,l.strokeStyle=Sl.strokeStyle,l.closePath(),l.stroke()):(h.config.colhidden==null||h.config.colhidden[m]==null)&&(l.beginPath(),l.moveTo(s+t-2+d,0),l.lineTo(s+t-2+d,h.columnHeaderHeight-2),l.lineWidth=1,l.strokeStyle=Sl.strokeStyle,l.closePath(),l.stroke()),h.config.colhidden!=null&&h.config.colhidden[m-1]!=null&&f!=null&&(l.beginPath(),l.moveTo(f+t+d,0),l.lineTo(f+t+d,h.columnHeaderHeight-2),l.closePath(),l.stroke()),l.beginPath(),l.moveTo(u+t-1,h.columnHeaderHeight-2+d),l.lineTo(s+t-1,h.columnHeaderHeight-2+d),l.stroke(),l.closePath(),f=s,Je.createHookFunction("columnTitleCellRenderAfter",g,{c:m,left:u+t-1,width:s-u,height:h.columnHeaderHeight-1},l)}}l.restore(),l.restore()}function nr(e,n,t,l,a,o,s,u,d){if(h.flowdata==null)return;let f=ve.getSheetByIndex();clearTimeout(h.measureTextCacheTimeOut),e==null&&(e=$("#luckysheet-cell-main").scrollLeft()),n==null&&(n=$("#luckysheet-cell-main").scrollTop()),t==null&&(t=h.luckysheetTableContentHW[0]),l==null&&(l=h.luckysheetTableContentHW[1]),a==null&&(a=h.rowHeaderWidth),o==null&&(o=h.columnHeaderHeight),s==null&&(s=0),u==null&&(u=0);let m=null;if(d==null)m=$("#luckysheetTableContent").get(0).getContext("2d");else if(P(d)=="object")try{m=d.get(0).getContext("2d")}catch(E){m=d}else m=$("#"+d).get(0).getContext("2d");m.save(),m.scale(h.devicePixelRatio,h.devicePixelRatio),m.clearRect(0,0,h.luckysheetTableContentHW[0],h.luckysheetTableContentHW[1]);let g,y,v,b;g=st(h.visibledatarow,n),y=st(h.visibledatarow,n+l),g==-1&&(g=0),g+=u,y==-1&&(y=h.visibledatarow.length-1),y+=u,y>=h.visibledatarow.length&&(y=h.visibledatarow.length-1),v=st(h.visibledatacolumn,e),b=st(h.visibledatacolumn,e+t),v==-1&&(v=0),v+=s,b==-1&&(b=h.visibledatacolumn.length-1),b+=s,b>=h.visibledatacolumn.length&&(b=h.visibledatacolumn.length-1);let k,w,x,C;g==0?k=0:k=h.visibledatarow[g-1],w=h.visibledatarow[y],v==0?x=0:x=h.visibledatacolumn[v-1],C=h.visibledatacolumn[b],m.fillStyle="#ffffff",m.fillRect(a-1,o-1,C-e,w-n),m.font=Zn(),m.fillStyle=Sl.fillStyle;let S=[],_={},T={},A=.5;Je.createHookFunction("cellAllRenderBefore",h.flowdata,f,m);for(let E=g;E<=y;E++){let N;E==0?N=-n-1:N=h.visibledatarow[E-1]-n-1;let L=h.visibledatarow[E]-n;if(!(h.config.rowhidden!=null&&h.config.rowhidden[E]!=null))for(let O=v;O<=b;O++){let V;O==0?V=-e:V=h.visibledatacolumn[O-1]-e;let q=h.visibledatacolumn[O]-e;if(h.config.colhidden!=null&&h.config.colhidden[O]!=null)continue;let W=h.defaultcollen;if(h.config.columnlen!=null&&h.config.columnlen[O]!=null&&(W=h.config.columnlen[O]),h.flowdata[E]!=null&&h.flowdata[E][O]!=null){let X=h.flowdata[E][O];if(P(X)=="object"&&"mc"in X)if(T[E+"_"+O]={start_r:N,start_c:V,end_r:L,end_c:q},"rs"in X.mc){let te="r"+E+"c"+O;_[te]=S.length}else{let te="r"+X.mc.r+"c"+X.mc.c,le=S[_[te]];le==null?(_[te]=S.length,S.push({r:E,c:O,start_c:V,start_r:N,end_r:L,end_c:q,firstcolumnlen:W})):(le.c==O&&(le.end_r+=L-N-1),le.r==E&&(le.end_c+=q-V,le.firstcolumnlen+=W));continue}}S.push({r:E,c:O,start_r:N,start_c:V,end_r:L,end_c:q,firstcolumnlen:W}),T[E+"_"+O]={start_r:N,start_c:V,end_r:L,end_c:q}}}let R=Ci(h.luckysheetfile[Z(h.currentSheetIndex)].dynamicArray),I=el.getComputeMap(),F=$e.getComputeMap(),z=uv(m,v,b,g,y),M=[];for(let E=0;E<S.length;E++){let N=S[E],L=N.r,O=N.c,V=N.start_r,q=N.start_c,W=N.end_r,X=N.end_c,te=N.firstcolumnlen;if(h.flowdata[L]!=null)if(h.flowdata[L][O]==null)hc(L,O,V,q,W,X,m,I,F,a,o,R,z,v,b,n,e,A);else{let le=h.flowdata[L][O],oe=null;if(typeof le=="object"&&"mc"in le?M.push(S[E]):oe=Hs(L,O),oe==null||oe.toString().length==0){hc(L,O,V,q,W,X,m,I,F,a,o,R,z,v,b,n,e,A);let se=ke.borderfix(h.flowdata,L,O),ce=[q+a+se[0],V+o+se[1],X-q-3+se[2],W-V-3-1+se[3]];gf(L,O,ce[0],ce[1],"luckysheetTableContent",m)}else L+"_"+O in R&&(oe=R[L+"_"+O].v),yf(L,O,V,q,W,X,oe,m,I,F,a,o,R,z,v,b,n,e,A)}}for(let E=0;E<M.length;E++){let N=M[E],L=N.r,O=N.c,V=N.start_r,q=N.start_c,W=N.end_r-1,X=N.end_c-1,te=N.firstcolumnlen,le=h.flowdata[L][O],oe=null,se=le.mc;oe=Hs(se.r,se.c),L=se.r,O=se.c;let ce=h.flowdata[L][O];if(O==0?q=-e:q=h.visibledatacolumn[O-1]-e,L==0?V=-n-1:V=h.visibledatarow[L-1]-n-1,W=h.visibledatarow[L+ce.mc.rs-1]-n,X=h.visibledatacolumn[O+ce.mc.cs-1]-e,oe==null||oe.toString().length==0){hc(L,O,V,q,W,X,m,I,F,a,o,R,z,v,b,n,e,A,!0);let he=ke.borderfix(h.flowdata,L,O),ue=[q+a+he[0],V+o+he[1],X-q-3+he[2],W-V-3-1+he[3]];gf(L,O,ue[0],ue[1],"luckysheetTableContent",m)}else L+"_"+O in R&&(oe=R[L+"_"+O].v),yf(L,O,V,q,W,X,oe,m,I,F,a,o,R,z,v,b,n,e,A,!0)}for(let E=g;E<=y;E++){let N;E==0?N=-n-1:N=h.visibledatarow[E-1]-n-1;let L=h.visibledatarow[E]-n;for(let O=v;O<=b;O++){let V;O==0?V=-e:V=h.visibledatacolumn[O-1]-e;let q=h.visibledatacolumn[O]-e;!!h.luckysheetcurrentisPivotTable&&Oe.drawPivotTable?((O==0||O==5)&&E<=11&&(m.beginPath(),m.moveTo(q-2+A+a,N+o),m.lineTo(q-2+A+a,L-2+A+o),m.lineWidth=1,m.strokeStyle="#000000",m.closePath(),m.stroke()),(E==2||E==11)&&O<=5&&(m.beginPath(),m.moveTo(V-1+a,L-2+A+o),m.lineTo(q-2+A+a,L-2+A+o),m.lineWidth=1,m.strokeStyle="#000000",m.closePath(),m.stroke()),E==6&&O==3&&(m.save(),m.font="bold 30px Arial",m.fillStyle="#626675",m.textAlign="center",m.fillText(Q().pivotTable.title,V+(q-V)/2+4+a,N+(L-N)/2-1+o),m.restore())):h.luckysheetcurrentisPivotTable&&O<Oe.pivotTableBoundary[1]&&E<Oe.pivotTableBoundary[0]&&(m.beginPath(),m.moveTo(q-2+A+a,N+o),m.lineTo(q-2+A+a,L-2+A+o),m.lineWidth=1,m.strokeStyle="#000000",m.closePath(),m.stroke(),m.beginPath(),m.moveTo(V-1+a,L-2+A+o),m.lineTo(q-2+a,L-2+A+o),m.lineWidth=1,m.strokeStyle="#000000",m.closePath(),m.stroke())}}if(h.config.borderInfo!=null&&h.config.borderInfo.length>0){let E=function(q,W,X,te,le,oe,se,ce,he){let ue=q,K=te-2+A+se,G=X+ce-1,ee=te-2+A+se,pe=le-2+A+ce;he.save(),ke.setLineDash(he,ue,"v",K,G,ee,pe),he.strokeStyle=W,he.stroke(),he.closePath(),he.restore()},N=function(q,W,X,te,le,oe,se,ce,he){let ue=q,K=oe-2+A+se,G=X+ce-1,ee=oe-2+A+se,pe=le-2+A+ce;he.save(),ke.setLineDash(he,ue,"v",K,G,ee,pe),he.strokeStyle=W,he.stroke(),he.closePath(),he.restore()},L=function(q,W,X,te,le,oe,se,ce,he){let ue=q,K=te-2+A+se,G=le-2+A+ce,ee=oe-2+A+se,pe=le-2+A+ce;he.save(),ke.setLineDash(he,ue,"h",K,G,ee,pe),he.strokeStyle=W,he.stroke(),he.closePath(),he.restore()},O=function(q,W,X,te,le,oe,se,ce,he){let ue=q,K=te-2+A+se,G=X-1+A+ce,ee=oe-2+A+se,pe=X-1+A+ce;he.save(),ke.setLineDash(he,ue,"h",K,G,ee,pe),he.strokeStyle=W,he.stroke(),he.closePath(),he.restore()},V=Ys(g,y,v,b);for(let q in V){let W=q.substr(0,q.indexOf("_")),X=q.substr(q.indexOf("_")+1);if(T[W+"_"+X]){let te=T[W+"_"+X].start_r,le=T[W+"_"+X].start_c,oe=T[W+"_"+X].end_r,se=T[W+"_"+X].end_c,ce=dc(z,W,X,v,b),he=V[q].l;he!=null&&(!ce.colIn||ce.stc==X)&&E(he.style,he.color,te,le,oe,se,a,o,m);let ue=V[q].r;ue!=null&&(!ce.colIn||ce.colLast)&&N(ue.style,ue.color,te,le,oe,se,a,o,m);let K=V[q].t;K!=null&&O(K.style,K.color,te,le,oe,se,a,o,m);let G=V[q].b;G!=null&&L(G.style,G.color,te,le,oe,se,a,o,m)}}}b==h.visibledatacolumn.length-1&&m.clearRect(C-e+a-1,o-1,h.ch_width-h.visibledatacolumn[b],w-n),m.restore(),h.measureTextCacheTimeOut=setTimeout(()=>{h.measureTextCache={},h.measureTextCellInfoCache={},h.cellOverflowMapCache={}},100)}function uv(e,n,t,l,a){let o={},s=h.flowdata;for(let u=l;u<=a;u++){if(s[u]==null)continue;if(h.cellOverflowMapCache[u]!=null){o[u]=h.cellOverflowMapCache[u];continue}let d=!1;for(let f=0;f<s[u].length;f++){let m=s[u][f];if(!(h.config.colhidden!=null&&h.config.colhidden[f]!=null)&&m!=null&&(!me(m.v)||_l(m))&&m.mc==null&&m.tb=="1"){let g=ke.checkstatus(s,u,f,"ht"),y=Sr(m,e,{r:u,c:f}),v=0;y!=null&&(v=y.textWidthAll);let b=f-1<0?0:h.visibledatacolumn[f-1],k=h.visibledatacolumn[f],w,x;if(k-b<v){if(g=="0"){let C=ja(u,f,f-1,"forward",g,v),S=ja(u,f,f+1,"backward",g,v);C.success?w=C.c:w=C.c+1,S.success?x=S.c:x=S.c-1}else if(g=="1"){let C=ja(u,f,f+1,"backward",g,v);w=f,C.success?x=C.c:x=C.c-1}else if(g=="2"){let C=ja(u,f,f-1,"forward",g,v);x=f,C.success?w=C.c:w=C.c+1}}else w=f,x=f;if((w<=t||x>=n)&&w<x){let C={r:u,stc:w,edc:x};o[u]==null&&(o[u]={}),o[u][f]=C,d=!0}}}d&&(h.cellOverflowMapCache[u]=o[u])}return o}function ja(e,n,t,l,a,o){let s=h.flowdata;if(l=="forward"&&t<0)return{success:!1,r:e,c:t};if(l=="backward"&&t>s[e].length-1)return{success:!1,r:e,c:t};let u=s[e][t];if(u!=null&&(!me(u.v)||u.mc!=null))return{success:!1,r:e,c:t};let d=n-1<0?0:h.visibledatacolumn[n-1],f=h.visibledatacolumn[n],m=o-(f-d);a=="0"?(d-=m/2,f+=m/2):a=="1"?f+=m:a=="2"&&(d-=m);let g=t-1<0?0:h.visibledatacolumn[t-1],y=h.visibledatacolumn[t];if(l=="forward")return d<g?ja(e,n,t-1,l,a,o):d<y?{success:!0,r:e,c:t}:{success:!1,r:e,c:t};if(l=="backward")return f>y?ja(e,n,t+1,l,a,o):f>g?{success:!0,r:e,c:t}:{success:!1,r:e,c:t}}function dc(e,n,t,l,a){let o=!1,s=!1,u,d,f,m;for(let g in e){for(let y in e[g]){u=g,d=y;let v=e[g][y];if(f=v.stc,m=v.edc,u==n&&t>=f&&t<=m&&(o=!0,t==m||t==a)){s=!0;break}}if(s)break}return{colIn:o,colLast:s,rowIndex:u,colIndex:d,stc:f,edc:m}}function bf(e,n,t){if(e==null)return;let l=e.values,a=t.pos_x,o=t.pos_y;if(l!=null){e.rotate!=0&&e.type!="verticalWrap"&&(n.save(),n.translate((a+e.textLeftAll)/h.zoomRatio,(o+e.textTopAll)/h.zoomRatio),n.rotate(-e.rotate*Math.PI/180),n.translate(-(e.textLeftAll+a)/h.zoomRatio,-(o+e.textTopAll)/h.zoomRatio));for(let s=0;s<l.length;s++){let u=l[s];u.inline===!0&&u.style!=null?(n.font=u.style.fontset,n.fillStyle=u.style.fc):n.font=u.style;let d=typeof u.content=="object"?u.content.m:u.content;if(n.fillText(d,(a+u.left)/h.zoomRatio,(o+u.top)/h.zoomRatio),u.cancelLine!=null){let f=u.cancelLine;n.beginPath(),n.moveTo(Math.floor((a+f.startX)/h.zoomRatio)+.5,Math.floor((o+f.startY)/h.zoomRatio)+.5),n.lineTo(Math.floor((a+f.endX)/h.zoomRatio)+.5,Math.floor((o+f.endY)/h.zoomRatio)+.5),n.lineWidth=Math.floor(f.fs/9),n.strokeStyle=n.fillStyle,n.stroke(),n.closePath()}if(u.underLine!=null){let f=u.underLine;for(let m=0;m<f.length;m++){let g=f[m];n.beginPath(),n.moveTo(Math.floor((a+g.startX)/h.zoomRatio)+.5,Math.floor((o+g.startY)/h.zoomRatio)),n.lineTo(Math.floor((a+g.endX)/h.zoomRatio)+.5,Math.floor((o+g.endY)/h.zoomRatio)+.5),n.lineWidth=Math.floor(g.fs/9),n.strokeStyle=n.fillStyle,n.stroke(),n.closePath()}}}e.rotate!=0&&e.type!="verticalWrap"&&n.restore()}}var gf,hc,yf,vf,Co=Ie(()=>{on();gr();Oa();uc();il();yr();Gt();Lr();fo();xa();Ft();mr();Kt();Va();Nt();dt();gn();Ll();Xe();bt();fl();gf=function(e,n,t,l,a,o){if(h.flowdata[e]==null||h.flowdata[e][n]==null)return;let s=h.flowdata[e][n].spl;if(s!=null){if(typeof s=="string"&&(s=new Function("return "+s)()),P(s)=="object"){let u=s,d=u.offsetX,f=u.offsetY;d=d==null?0:d,f=f==null?0:f,Jl.render(u.shapeseq,u.shapes,t+d,l+f,u.pixelWidth,u.pixelHeight,a,o)}else if(P(s)=="array"&&P(s[0])=="object")for(let u=0;u<s.length;u++){let d=s[u],f=d.offsetX,m=d.offsetY;f=f==null?0:f,m=m==null?0:m,Jl.render(d.shapeseq,d.shapes,t+f,l+m,d.pixelWidth,d.pixelHeight,a,o)}}},hc=function(e,n,t,l,a,o,s,u,d,f,m,g,y,v,b,k,w,x,C){let S=el.checksAF(e,n,u),_=$e.checksCF(e,n,d),T=ke.borderfix(h.flowdata,e,n),A=ke.checkstatus(h.flowdata,e,n,"bg");S!=null&&S[1]!=null&&(A=S[1]),_!=null&&_.cellColor!=null&&(A=_.cellColor),h.flowdata[e][n]!=null&&h.flowdata[e][n].tc!=null&&(A=h.flowdata[e][n].tc),A==null?s.fillStyle="#FFFFFF":s.fillStyle=A;let R=[l+f+T[0]+1,t+m+T[1]+1,o-l+T[2]-(C?1:0)-1,a-t+T[3]-1];if(!Je.createHookFunction("cellRenderBefore",h.flowdata[e][n],{r:e,c:n,start_r:R[1],start_c:R[0],end_r:R[3]+R[1],end_c:R[2]+R[0]},ve.getSheetByIndex(),s))return;if(s.fillRect(R[0],R[1],R[2],R[3]),e+"_"+n in g){let F=g[e+"_"+n].v;s.fillStyle="#000000";let z=Zn();s.font=z;let M=l+4+f,E=dr.luckysheetrefreshfixed(),N=a+m-2;s.textBaseline="bottom",s.fillText(F==null?"":F,M,N)}if(h.flowdata[e][n]!=null&&h.flowdata[e][n].ps!=null){let F=8*h.zoomRatio,z=8*h.zoomRatio;s.beginPath(),s.moveTo(o+f-1-F,t+m),s.lineTo(o+f-1,t+m),s.lineTo(o+f-1,t+m+z),s.fillStyle="#FC6666",s.fill(),s.closePath()}let I=dc(y,e,n,v,b);I.colLast&&vf(I.rowIndex,I.colIndex,I.stc,I.edc,s,k,w,f,m,u,d),(!I.colIn||I.colLast)&&!h.luckysheetcurrentisPivotTable&&h.showGridLines&&(s.beginPath(),s.moveTo(o+f-2+x,t+m),s.lineTo(o+f-2+x,a+m),s.lineWidth=1,s.strokeStyle=Sl.strokeStyle,s.stroke(),s.closePath()),!h.luckysheetcurrentisPivotTable&&h.showGridLines&&(s.beginPath(),s.moveTo(l+f-1,a+m-2+x),s.lineTo(o+f-1,a+m-2+x),s.lineWidth=1,s.strokeStyle=Sl.strokeStyle,s.stroke(),s.closePath()),Je.createHookFunction("cellRenderAfter",h.flowdata[e][n],{r:e,c:n,start_r:R[1],start_c:R[0],end_r:R[3]+R[1],end_c:R[2]+R[0]},ve.getSheetByIndex(),s)},yf=function(e,n,t,l,a,o,s,u,d,f,m,g,y,v,b,k,w,x,C,S){let _=h.flowdata[e][n],T=o-l-2,A=a-t-2,R=2,I=2,F=ke.checkstatus(h.flowdata,e,n,"ht"),z=ke.checkstatus(h.flowdata,e,n,"vt"),M=el.checksAF(e,n,d),E=$e.checksCF(e,n,f),N=ke.checkstatus(h.flowdata,e,n,"bg");M!=null&&M[1]!=null&&(N=M[1]),E!=null&&E.cellColor!=null&&(N=E.cellColor),N==null?u.fillStyle="#FFFFFF":u.fillStyle=N;let L=ke.borderfix(h.flowdata,e,n),O=[l+m+L[0]+1,t+g+L[1]+1,o-l+L[2]-(S?1:0)-1,a-t+L[3]+1];if(!Je.createHookFunction("cellRenderBefore",h.flowdata[e][n],{r:e,c:n,start_r:O[1],start_c:O[0],end_r:O[3]+O[1],end_c:O[2]+O[0]},ve.getSheetByIndex(),u))return;u.fillRect(O[0],O[1],O[2],O[3]);let V=Ye.dataVerification;if(V!=null&&V[e+"_"+n]!=null&&!Ye.validateCellData(s,V[e+"_"+n])){let X=5*h.zoomRatio,te=5*h.zoomRatio;u.beginPath(),u.moveTo(l+m,t+g),u.lineTo(l+m+X,t+g),u.lineTo(l+m,t+g+te),u.fillStyle="#FC6666",u.fill(),u.closePath()}if(_.ps!=null){let X=8*h.zoomRatio,te=8*h.zoomRatio;u.beginPath(),u.moveTo(o+m-X,t+g),u.lineTo(o+m,t+g),u.lineTo(o+m,t+g+te),u.fillStyle="#FC6666",u.fill(),u.closePath()}if(_.qp==1&&B(_.v)){let X=6*h.zoomRatio,te=6*h.zoomRatio;u.beginPath(),u.moveTo(l+m+X-1,t+g),u.lineTo(l+m-1,t+g),u.lineTo(l+m-1,t+g+te),u.fillStyle="#487f1e",u.fill(),u.closePath()}let q=!0,W=dc(v,e,n,b,k);if(_.tb=="1"&&W.colIn)W.colLast?vf(W.rowIndex,W.colIndex,W.stc,W.edc,u,w,x,m,g,d,f):q=!1;else if(V!=null&&V[e+"_"+n]!=null&&V[e+"_"+n].type=="checkbox"){let X=l+m,te=t+g+1;u.save(),u.beginPath(),u.rect(X,te,T,A),u.clip(),u.scale(h.zoomRatio,h.zoomRatio);let le=zr(s,u),oe=le.width+14,se=le.actualBoundingBoxDescent+le.actualBoundingBoxAscent,ce=X+R;F=="0"?ce=X+T/2-oe/2:F=="2"&&(ce=X+T-R-oe);let he=A>se?A:se,ue=te+he-I;u.textBaseline="bottom";let K=ue-13*h.zoomRatio;z=="0"?(ue=te+he/2,u.textBaseline="middle",K=ue-6*h.zoomRatio):z=="1"&&(ue=te+I,u.textBaseline="top",K=ue+1*h.zoomRatio),ce=ce/h.zoomRatio,ue=ue/h.zoomRatio,K=K/h.zoomRatio,u.lineWidth=1,u.strokeStyle="#000",u.strokeRect(ce,K,10,10),V[e+"_"+n].checked&&(u.beginPath(),u.lineTo(ce+1,K+6),u.lineTo(ce+4,K+9),u.lineTo(ce+9,K+2),u.stroke(),u.closePath()),u.fillStyle=ke.checkstatus(h.flowdata,e,n,"fc"),u.fillText(s==null?"":s,ce+14,ue),u.restore()}else{if(E!=null&&E.dataBar!=null&&E.dataBar.valueLen&&E.dataBar.valueLen.toString()!=="NaN"){let oe=l+m+R,se=t+g+I,ce=T-R*2,he=A-I*2,ue=E.dataBar.valueType,K=E.dataBar.valueLen,G=E.dataBar.format;if(ue=="minus"){let ee=E.dataBar.minusLen;if(G.length>1){let pe=u.createLinearGradient(oe+ce*ee*(1-K),se,oe+ce*ee,se);pe.addColorStop(0,"#ffffff"),pe.addColorStop(1,"#ff0000"),u.fillStyle=pe}else u.fillStyle="#ff0000";u.fillRect(oe+ce*ee*(1-K),se,ce*ee*K,he),u.beginPath(),u.moveTo(oe+ce*ee*(1-K),se),u.lineTo(oe+ce*ee*(1-K),se+he),u.lineTo(oe+ce*ee,se+he),u.lineTo(oe+ce*ee,se),u.lineTo(oe+ce*ee*(1-K),se),u.lineWidth=1,u.strokeStyle="#ff0000",u.stroke(),u.closePath()}else if(ue=="plus"){let ee=E.dataBar.plusLen;if(ee==1){if(G.length>1){let pe=u.createLinearGradient(oe,se,oe+ce*K,se);pe.addColorStop(0,G[0]),pe.addColorStop(1,G[1]),u.fillStyle=pe}else u.fillStyle=G[0];u.fillRect(oe,se,ce*K,he),u.beginPath(),u.moveTo(oe,se),u.lineTo(oe,se+he),u.lineTo(oe+ce*K,se+he),u.lineTo(oe+ce*K,se),u.lineTo(oe,se),u.lineWidth=1,u.strokeStyle=G[0],u.stroke(),u.closePath()}else{let pe=E.dataBar.minusLen;if(G.length>1){let ae=u.createLinearGradient(oe+ce*pe,se,oe+ce*pe+ce*ee*K,se);ae.addColorStop(0,G[0]),ae.addColorStop(1,G[1]),u.fillStyle=ae}else u.fillStyle=G[0];u.fillRect(oe+ce*pe,se,ce*ee*K,he),u.beginPath(),u.moveTo(oe+ce*pe,se),u.lineTo(oe+ce*pe,se+he),u.lineTo(oe+ce*pe+ce*ee*K,se+he),u.lineTo(oe+ce*pe+ce*ee*K,se),u.lineTo(oe+ce*pe,se),u.lineWidth=1,u.strokeStyle=G[0],u.stroke(),u.closePath()}}}let X=l+m,te=t+g+1;u.save(),u.beginPath(),u.rect(X,te,T,A),u.clip(),u.scale(h.zoomRatio,h.zoomRatio);let le=Sr(_,u,{cellWidth:T,cellHeight:A,space_width:R,space_height:I,r:e,c:n});if(E!=null&&E.icons!=null&&le.type=="plain"){let oe=E.icons.left,se=E.icons.top,ce=le.values[0],he=X+ce.left,ue=te+ce.top-le.textHeightAll;z=="0"?ue=te+A/2-le.textHeightAll/2:z=="1"?ue=te:z=="2"&&(ue=ue-le.desc),ue=ue/h.zoomRatio,he=he/h.zoomRatio,u.drawImage(wa,oe*42,se*32,32,32,X/h.zoomRatio,ue,le.textHeightAll/h.zoomRatio,le.textHeightAll/h.zoomRatio),F!="0"&&F!="2"&&(he=he+le.textHeightAll/h.zoomRatio)}u.fillStyle=ke.checkstatus(h.flowdata,e,n,"fc"),M!=null&&M[0]!=null&&(u.fillStyle=M[0]),E!=null&&E.textColor!=null&&(u.fillStyle=E.textColor),_.ct&&_.ct.fa&&_.ct.fa.indexOf("[Red]")>-1&&_.ct.t=="n"&&_.v<0&&(u.fillStyle="#ff0000"),bf(le,u,{pos_x:X,pos_y:te}),u.restore()}q&&!h.luckysheetcurrentisPivotTable&&h.showGridLines&&(u.beginPath(),u.moveTo(o+m-2+C,t+g),u.lineTo(o+m-2+C,a+g),u.lineWidth=1,u.strokeStyle=Sl.strokeStyle,u.stroke(),u.closePath()),!h.luckysheetcurrentisPivotTable&&h.showGridLines&&(u.beginPath(),u.moveTo(l+m-1,a+g-2+C),u.lineTo(o+m-1,a+g-2+C),u.lineWidth=1,u.strokeStyle=Sl.strokeStyle,u.stroke(),u.closePath()),Je.createHookFunction("cellRenderAfter",h.flowdata[e][n],{r:e,c:n,start_r:O[1],start_c:O[0],end_r:O[3]+O[1],end_c:O[2]+O[0]},ve.getSheetByIndex(),u)},vf=function(e,n,t,l,a,o,s,u,d,f,m){let g;e==0?g=-o-1:g=h.visibledatarow[e-1]-o-1;let y=h.visibledatarow[e]-o,v;t==0?v=-s:v=h.visibledatacolumn[t-1]-s;let b=h.visibledatacolumn[l]-s,k=h.flowdata[e][n],w=b-v-2,x=y-g-2,C=2,S=2,_=v+u,T=g+d+1,A=oa(k);a.font=A,a.save(),a.beginPath(),a.rect(_,T,w,x),a.clip(),a.scale(h.zoomRatio,h.zoomRatio);let R=Sr(k,a,{cellWidth:w,cellHeight:x,space_width:C,space_height:S,r:e,c:n}),I=el.checksAF(e,n,f),F=$e.checksCF(e,n,m);a.fillStyle=ke.checkstatus(h.flowdata,e,n,"fc"),I!=null&&I[0]!=null&&(a.fillStyle=I[0]),F!=null&&F.textColor!=null&&(a.fillStyle=F.textColor),bf(R,a,{pos_x:_,pos_y:T}),a.restore()}});var hv,Cl,Ua=Ie(()=>{dt();Kt();Yt();Ol();Ut();ll();Jt();Gt();Zt();Qt();fl();Vl();il();Nt();bt();Xe();hv={item:{linkType:"external",linkAddress:"",linkTooltip:""},hyperlink:null,createDialog:function(){let e=this,n=Q(),t=n.insertLink,l=n.toolbar,a=n.button;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-insertLink-dialog").remove();let o="";h.luckysheetfile.forEach(b=>{o+=`<option value="${b.name}">${b.name}</option>`});let s=`<div class="box"> |
| | | <button class="btn btn-default luckysheet-model-close-btn">${l.cancel}</button>`,style:"z-index:100003"})),rd=!0,da("luckysheet-protection-range-validation");let a=$("#luckysheet-protection-range-validation-hint");e.hintText!=null&&e.hintText.length>0?a.html(e.hintText):a.html(t.defaultRangeHintText);let o=$("#luckysheet-protection-range-validation"),s=o.find("input");s.val(""),$("#luckysheet-protection-range-validation-confirm").off("click").on("click",function(){let u=s.val();if(u==null||u.length==0){alert(t.checkPasswordNullalert);return}if(e.algorithmName!=null&&e.algorithmName!="None")if(e.saltValue!=null&&e.saltValue.length>0){var f=CryptoApi.getHasher(e.algorithmName);u=CryptoApi.hmac(e.saltValue,u,f)}else u=CryptoApi.hash(e.algorithmName,u);u==e.password?(ec[e.sqref]=1,o.hide(),$("#luckysheet-modal-dialog-mask").hide(),alert(t.checkPasswordSucceedalert)):alert(t.checkPasswordWrongalert)})}function jr(e){let n=ve.getSheetByIndex(e);if(n==null||n.config==null||n.config.authority==null)return!0;let t=n.config.authority;if(t==null||t.sheet==null||t.sheet==0)return!0;let a=Q().protection,o;return t.hintText!=null&&t.hintText.length>0?o=t.hintText:o=a.defaultSheetHintText,U.info("",o),!1}function wn(e,n,t,l=!0,a=!0){let o=ve.getSheetByIndex(t);if(o==null||o.config==null||o.config.authority==null)return!0;let s=o.data,u=s[e][n],f=o.config.authority;if(f==null||f.sheet==null||f.sheet==0||u&&u.lo===0)return!0;let m=Q().protection;return lc(e,n,f,m,l,a)}function xo(e,n,t){let l=ve.getSheetByIndex(t);if(!l||l.data&&!l.data[e]||l.data&&!l.data[e][n]||l.config==null||l.config.authority==null)return!0;let a=l.data,o=a[e][n],s=l.config.authority;return s==null||s.sheet==null||s.sheet==0||o==null||o.hi==null||o.hi==0}function vr(e,n){let t=ve.getSheetByIndex(n);if(t==null||t.config==null||t.config.authority==null)return!0;let l=t.config.authority;if(l==null||l.sheet==null||l.sheet==0||e==null||e.length==0)return!0;let o=Q().protection;for(let s=0;s<e.length;s++){let u=e[s].row[0],f=e[s].row[1],d=e[s].column[0],m=e[s].column[1];for(let g=u;g<=f;g++)for(let y=d;y<=m;y++){let v=t.data[g][y]||{},b=v.lo===void 0||v.lo===1;if(!lc(g,y,l,o,!0,b))return!1}}return!0}function rc(e,n,t){let a=Q().protection,o=ve.getSheetByIndex(t);if(o==null||o.config==null||o.config.authority==null)return!0;let s=o.data,u=s[e][n],f=o.config.authority;return f==null||f.sheet==null||f.sheet==0?!0:u&&u.lo===0||lc(e,n,f,a,!1)?f.selectunLockedCells==1||f.selectunLockedCells==null:f.selectLockedCells==1||f.selectLockedCells==null}function Di(e){let t=Q().protection,l=ve.getSheetByIndex(e);if(l==null||l.config==null||l.config.authority==null)return!0;let a=l.config.authority;if(a==null||a.sheet==null||a.sheet==0)return!0;let o=!1;(a.selectunLockedCells==1||a.selectunLockedCells==null)&&(o=!0);let s=!1;return(a.selectLockedCells==1||a.selectLockedCells==null)&&(s=!0),!!(o&&s)}function Rr(e){let n=ve.getSheetByIndex(e);if(n==null||n.config==null||n.config.authority==null)return!0;let t=n.config.authority;if(t==null||t.sheet==null||t.sheet==0||t.formatCells==1||t.formatCells==null)return!0;let a=Q().protection,o;return t.hintText!=null&&t.hintText.length>0?o=t.hintText:o=a.defaultSheetHintText,U.info("",o),!1}function $t(e,n="formatColumns",t=!0){let l=ve.getSheetByIndex(e);if(l==null||l.config==null||l.config.authority==null)return!0;let a=l.config.authority;if(a==null||a.sheet==null||a.sheet==0||a[n]==1||a[n]==null)return!0;if(t){let s=Q().protection,u;a.hintText!=null&&a.hintText.length>0?u=a.hintText:u=s.defaultSheetHintText,U.info("",u)}return!1}var Qf,ed,un,Js,td,wo,ld,Qs,ec,rd,qa,Ml=Ie(()=>{Xe();bt();Gt();Nt();An();dl();pr();yr();ft();Zt();ll();Vr();Qf=!1,ed=!1,un=[],Js=!0,td=null,wo=null,ld=null,Qs=!0,ec={},rd=!1,qa=["selectLockedCells","selectunLockedCells","formatCells","formatColumns","formatRows","insertColumns","insertRows","insertHyperlinks","deleteColumns","deleteRows","sort","filter","usePivotTablereports","editObjects","editScenarios"]});function Hr(e,n,t){t==null&&(t=!0);let l=function(o,s){let u=o[n],f=s[n];if(P(o[n])=="object"&&(u=o[n].v),P(s[n])=="object"&&(f=s[n].v),me(u))return 1;if(me(f))return-1;if(Lt(u)&&Lt(f))return ul(u,f);if(B(u)&&B(f))return(0,xn.default)(u).value()-(0,xn.default)(f).value();if(!B(u)&&!B(f))return u.localeCompare(f,"zh");if(B(u)){if(!B(f))return-1}else return 1},a=function(o,s){let u=o[n],f=s[n];if(P(o[n])=="object"&&(u=o[n].v),P(s[n])=="object"&&(f=s[n].v),me(u))return 1;if(me(f))return-1;if(Lt(u)&&Lt(f))return ul(f,u);if(B(u)&&B(f))return(0,xn.default)(f).value()-(0,xn.default)(u).value();if(!B(u)&&!B(f))return f.localeCompare(u,"zh");if(B(u)){if(!B(f))return 1}else return-1};return t?e.sort(l):e.sort(a)}function bo(e,n){n==null&&(n=!0);let t=function(a,o){let s=a,u=o;if(P(a)=="object"&&(s=a.v),P(o)=="object"&&(u=o.v),s==null&&(s=""),u==null&&(u=""),Lt(s)&&Lt(u))return ul(s,u);if(B(s)&&B(u))return(0,xn.default)(s).value()-(0,xn.default)(u).value();if(!B(s)&&!B(u))return s.localeCompare(u,"zh");if(B(s)){if(!B(u))return-1}else return 1},l=function(a,o){let s=a,u=o;if(P(a)=="object"&&(s=a.v),P(o)=="object"&&(u=o.v),s==null&&(s=""),u==null&&(u=""),Lt(s)&&Lt(u))return ul(u,s);if(B(s)&&B(u))return(0,xn.default)(u).value()-(0,xn.default)(s).value();if(!B(s)&&!B(u))return u.localeCompare(s,"zh");if(B(s)){if(!B(u))return 1}else return-1};return n?e.sort(t):e.sort(l)}function nc(e){if(!$t(h.currentSheetIndex,"sort"))return;let t=Q().sort;if(h.luckysheet_select_save.length>1){fe()?alert(t.noRangeError):U.info(t.noRangeError,"");return}e==null&&(e=!0);let l=xe.deepCopyFlowData(h.flowdata),a=h.luckysheet_select_save[0].row[0],o=h.luckysheet_select_save[0].row[1],s=h.luckysheet_select_save[0].column[0],u=h.luckysheet_select_save[0].column[1],f,d;for(let v=a;v<=o;v++)if(l[v]!=null&&l[v][s]!=null){let b=l[v][s];if(b.mc!=null||me(b.v))continue;if(f==null&&/[\u4e00-\u9fa5]+/g.test(b.v)){f=v+1,d=v+1;continue}f==null&&(f=v),d=v}if(f==null||f>o)return;let m=!1,g=[];for(let v=f;v<=d;v++){let b=[];for(let k=s;k<=u;k++){if(l[v][k]!=null&&l[v][k].mc!=null){m=!0;break}b.push(l[v][k])}g.push(b)}if(m){fe()?alert(t.mergeError):U.info(t.mergeError,"");return}g=Hr(g,0,e);for(let v=f;v<=d;v++)for(let b=s;b<=u;b++)l[v][b]=g[v-f][b-s];let y={};if(h.config.rowlen!=null){let v=$.extend(!0,{},h.config);v=yl(l,f,d,v),y={cfg:v,RowlChange:!0}}Ze(l,[{row:[f,d],column:[s,u]}],y)}function ac(e,n){if(!$t(h.currentSheetIndex,"sort"))return;n==null&&(n=!0);let l=Q().sort,a=xe.deepCopyFlowData(h.flowdata),o=0,s=a.length-1,u=0,f=a[0].length-1,d,m;for(let b=o;b<=s;b++)if(!(a[b][e]!=null&&a[b][e].mc!=null)){if(a[b][e]!=null&&!me(a[b][e].v)&&/[\u4e00-\u9fa5]+/g.test(a[b][e].v)&&d==null){d=b+1,m=b+1;continue}d==null&&(d=b),a[b][e]!=null&&!me(a[b][e].v)&&(m=b)}if(d==null||d>s)return;let g=!1,y=[];for(let b=d;b<=m;b++){let k=[];for(let w=u;w<=f;w++){if(a[b][w]!=null&&a[b][w].mc!=null){g=!0;break}k.push(a[b][w])}y.push(k)}if(g){fe()?alert(l.columnSortMergeError):U.info(l.columnSortMergeError,"");return}y=Hr(y,e,n);for(let b=d;b<=m;b++)for(let k=u;k<=f;k++)a[b][k]=y[b-d][k-u];let v={};if(h.config.rowlen!=null){let b=$.extend(!0,{},h.config);b=yl(a,d,m,b),v={cfg:b,RowlChange:!0}}Ze(a,[{row:[d,m],column:[u,f]}],v)}var xn,ua=Ie(()=>{ft();Ft();Or();ll();Jt();mr();Yt();Ml();Xe();bt();xn=Fl(sa())});var rv,cd,ud=Ie(()=>{Kt();rv={transpose:function(e,n=!0){let t=[];if(e.length==0)return[];if(e[0].length==0)return[];for(let l=0;l<e[0].length;l++){let a=[];for(let o=0;o<e.length;o++){let s="";e[o]!=null&&e[o][l]!=null&&(n?s=ze(o,l,e):s=e[o][l]),a.push(s)}t.push(a)}return t},minusClear:function(e,n){if(n.row[0]>e.row[1]||n.row[1]<e.row[0]||n.column[0]>e.column[1]||n.column[1]<e.column[0])return null;if(n.row[0]==e.row[0]&&n.row[1]<e.row[1]&&n.column[0]>e.column[0]&&n.column[1]<e.column[1])return[];let t=[],l={row:[],column:[]},a=null,o=[e.column[0],e.column[1]];n.row[1]>e.row[0]&&n.row[1]<e.row[1]?a=[n.row[1]+1,e.row[1]]:n.row[0]>e.row[0]&&n.row[0]<e.row[1]&&(a=[e.row[0],n.row[0]-1]),a!=null&&t.push({row:a,column:o});let s=[e.row[0],e.row[1]],u=null;return n.column[1]>e.column[0]&&n.column[1]<e.column[1]?u=[n.column[1]+1,e.column[1]]:n.column[0]>e.column[0]&&n.column[0]<e.column[1]&&(u=[e.column[0],n.column[0]-1]),u!=null&&t.push({row:s,column:u}),t}},cd=rv});var nv,Mi,hd=Ie(()=>{ft();nv={STDEVP:function(e,n){let t=0;for(let l=0;l<n.length;l++){let a=n[l];t+=Math.pow(a-e,2)}return Il(Math.sqrt(t/n.length))},STDEV:function(e,n){let t=0;for(let l=0;l<n.length;l++){let a=n[l];t+=Math.pow(a-e,2)}return Il(Math.sqrt(t/(n.length-1)))},VARP:function(e,n){let t=0;for(let l=0;l<n.length;l++){let a=n[l];t+=Math.pow(a-e,2)}return Il(t/n.length)},let:function(e,n){let t=0;for(let l=0;l<n.length;l++){let a=n[l];t+=Math.pow(a-e,2)}return Il(t/(n.length-1))}},Mi=nv});var Fi,fd,Oe,on=Ie(()=>{Nt();ft();Kt();Or();Al();Ft();ua();Yt();ll();Jt();Vr();ud();hd();Zt();Lr();Gt();dl();pr();Qt();Ml();Xe();bt();Fi=Fl(sa());Gt();fd={pivotDatas:null,pivotSheetIndex:0,pivotDataSheetIndex:0,celldata:null,origindata:null,getCellData:function(e,n,t){let l=this,a;e!=null?a=e:a=h.currentSheetIndex;let o=Z(a);P(h.luckysheetfile[o].pivotTable)!="object"&&(h.luckysheetfile[o].pivotTable=new Function("return "+h.luckysheetfile[o].pivotTable)()),h.luckysheetfile[o].pivotTable!=null?(l.column=h.luckysheetfile[o].pivotTable.column,l.row=h.luckysheetfile[o].pivotTable.row,l.values=h.luckysheetfile[o].pivotTable.values,l.filter=h.luckysheetfile[o].pivotTable.filter,l.showType=h.luckysheetfile[o].pivotTable.showType,l.filterparm=h.luckysheetfile[o].pivotTable.filterparm,h.luckysheetfile[o].pivotTable.drawPivotTable!=null?l.drawPivotTable=h.luckysheetfile[o].pivotTable.drawPivotTable:l.drawPivotTable=!0,h.luckysheetfile[o].pivotTable.pivotTableBoundary!=null?l.pivotTableBoundary=h.luckysheetfile[o].pivotTable.pivotTableBoundary:l.pivotTableBoundary=[12,6],t!=null?l.pivot_select_save=t:l.pivot_select_save=h.luckysheetfile[o].pivotTable.pivot_select_save,n!=null?l.pivotDataSheetIndex=n:l.pivotDataSheetIndex=h.luckysheetfile[o].pivotTable.pivotDataSheetIndex):(l.column=null,l.row=null,l.values=null,l.filter=null,l.showType=null,l.filterparm=null,l.drawPivotTable=!0,l.pivotTableBoundary=[12,6],t!=null?l.pivot_select_save=t:l.pivot_select_save=h.luckysheet_select_save,n!=null?l.pivotDataSheetIndex=n:l.pivotDataSheetIndex=a);let s=Z(l.pivotDataSheetIndex),u=h.luckysheetfile[s];u.data==null&&(u.data=ve.buildGridData(u)),l.origindata=Si(u.data,l.pivot_select_save);let f={};if(l.filterparm!=null)for(let m in l.filterparm)for(let g in l.filterparm[m])g==="rowhidden"&&l.filterparm[m][g]!=null&&(f=$.extend(!0,f,l.filterparm[m][g]));l.rowhidden=f,l.pivotSheetIndex=a;let d=[];for(let m=0;m<l.origindata.length;m++)l.rowhidden!=null&&l.rowhidden[m]!=null||d.push([].concat(l.origindata[m]));l.celldata=d,l.pivot_data_type={};for(let m=0;m<l.celldata[1].length;m++){let g=tr(l.celldata[1][m]);l.pivot_data_type[m.toString()]=g}},pivot_data_type:{},pivot_select_save:null,column:null,row:null,values:null,filter:null,showType:null,rowhidden:null,selected:null,caljs:null,initial:!0,filterparm:null,luckysheet_pivotTable_select_state:!1,jgridCurrentPivotInput:null,movestate:!1,moveitemposition:[],movesave:{},showvaluecolrow:function(){let e=this;$("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").length>=2?($("#luckysheetpivottablevaluecolrowshow").show(),e.showType=="column"?($("#luckysheetpivottablevaluecolrow").prop("checked",!0),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").addClass("ui-state-active"),$("#luckysheetpivottablevaluecolrow1").prop("checked",!1),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").removeClass("ui-state-active")):($("#luckysheetpivottablevaluecolrow1").prop("checked",!0),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").addClass("ui-state-active"),$("#luckysheetpivottablevaluecolrow").prop("checked",!1),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").removeClass("ui-state-active"))):$("#luckysheetpivottablevaluecolrowshow").hide()},resetOrderby:function(e){let n=$("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").index(e);$("#luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").find(".luckysheet-modal-dialog-slider-config-item").each(function(){$(this).data("orderby")==n&&$(this).data("orderby","self")})},luckysheetsliderlistclearfilter:function(e){let n=this,t=e.parent(),l=t.data("index"),a={},o={},s=n.origindata,u={};t.data("rowhidden","").find(".luckysheet-slider-list-item-filtered").hide(),n.setDatatojsfile("selected",{},l),n.setDatatojsfile("rowhidden",null,l);let f=[];for(let d=0;d<s.length;d++)a[d]==null&&f.push([].concat(s[d]));n.celldata=f,n.refreshPivotTable(),$("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide()},luckysheetsliderlistitemfilter:function(e){let n=this,l=Q().filter,a=e.parent(),o=a.offset(),s=$("#luckysheet-pivotTableFilter-menu"),u=$(window).height(),f=$(window).width(),d=a.data("index"),m=a.data("rowhidden");m==null||m==""?m={}:P(m)=="string"&&(m=JSON.parse(m)),$("body .luckysheet-cols-menu").hide(),$("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(),$("#luckysheet-pivotTableFilter-byvalue-input").val(""),$("#luckysheet-pivotTableFilter-bycondition").next().hide(),$("#luckysheet-pivotTableFilter-byvalue").next().show(),s.data("index",d),$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").hide().find("input").val(),$("#luckysheet-pivotTableFilter-selected span").data("type","0").data("type",null).text(l.filiterInputNone);let g=a.data("byconditiontype");if($("#luckysheet-pivotTableFilter-selected span").data("value",a.data("byconditionvalue")).data("type",g).text(a.data("byconditiontext")),g=="2"){let k=$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input2").show().find("input");k.eq(0).val(a.data("byconditionvalue1")),k.eq(1).val(a.data("byconditionvalue2"))}else g=="1"&&$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").eq(0).show().find("input").val(a.data("byconditionvalue1"));let y=Er("#luckysheet-pivotTableFilter-byvalue-select",{text:l.filiterMoreDataTip});$("#luckysheet-pivotTableFilter-byvalue-select").empty().append(y.el);let v={};$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").not(a.get(0)).each(function(){let k=$(this),w=k.data("rowhidden");if(w==null||w=="")return!0;P(w)=="string"&&(w=JSON.parse(w));for(let x in w)v[x]=0});let b=n.origindata;setTimeout(function(){let k={},w={},x={},C={};for(let T=1;T<b.length;T++){if(T in v||b[T]==null)continue;let A=b[T][d];if(A!=null&&A.ct!=null&&A.ct.t=="d"){let R=mt("YYYY-MM-DD",A.v),I=R.split("-")[0],F=R.split("-")[1],z=R.split("-")[2];I in k||(k[I]={}),F in k[I]||(k[I][F]={}),z in k[I][F]||(k[I][F][z]=0),k[I][F][z]++,T in m&&(w[I]=0,w[F]=0,w[z]=0)}else{let R,I;A==null||me(A.v)?(R=null,I=null):(R=A.v,I=A.m),R in x||(x[R]={}),I in x[R]||(x[R][I]=0),x[R][I]++,T in m&&(C[R+"#$$$#"+I]=0)}}let S=[];if(JSON.stringify(k).length>2)for(let T in k){let A=0,R="";for(let F in k[T]){let z=0,M="";for(let N in k[T][F]){let L=k[T][F][N];z+=L;let O;Number(F)<10?O="0"+Number(F):O=F;let V;Number(N)<10?V="0"+Number(N):V=N,T in w&&F in w&&N in w?M+='<div class="day luckysheet-mousedown-cancel cf" data-check="false" title="'+T+"-"+O+"-"+V+'"><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+N+'</label><span class="count luckysheet-mousedown-cancel">( '+L+" )</span></div>":M+='<div class="day luckysheet-mousedown-cancel cf" data-check="true" title="'+T+"-"+O+"-"+V+'"><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+N+'</label><span class="count luckysheet-mousedown-cancel">( '+L+" )</span></div>"}A+=z;let E;Number(F)<10?E="0"+Number(F):E=F,T in w&&F in w?R+='<div class="monthBox luckysheet-mousedown-cancel"><div class="month luckysheet-mousedown-cancel cf" data-check="false" title="'+T+"-"+E+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+F+""+l.filiterMonthText+'</label><span class="count luckysheet-mousedown-cancel">( '+z+' )</span></div><div class="dayList luckysheet-mousedown-cancel">'+M+"</div></div>":R+='<div class="monthBox luckysheet-mousedown-cancel"><div class="month luckysheet-mousedown-cancel cf" data-check="true" title="'+T+"-"+E+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+F+""+l.filiterMonthText+'</label><span class="count luckysheet-mousedown-cancel">( '+z+' )</span></div><div class="dayList luckysheet-mousedown-cancel">'+M+"</div></div>"}let I;T in w?I='<div class="yearBox luckysheet-mousedown-cancel"><div class="year luckysheet-mousedown-cancel cf" data-check="false" title="'+T+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+T+""+l.filiterYearText+'</label><span class="count luckysheet-mousedown-cancel">( '+A+' )</span></div><div class="monthList luckysheet-mousedown-cancel">'+R+"</div></div>":I='<div class="yearBox luckysheet-mousedown-cancel"><div class="year luckysheet-mousedown-cancel cf" data-check="true" title="'+T+'"><i class="fa fa-caret-right luckysheet-mousedown-cancel" aria-hidden="true"></i><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+T+""+l.filiterYearText+'</label><span class="count luckysheet-mousedown-cancel">( '+A+' )</span></div><div class="monthList luckysheet-mousedown-cancel">'+R+"</div></div>",S.unshift(I)}if(JSON.stringify(x).length>2){let T=Object.keys(x);T=bo(T,!0);for(let A=0;A<T.length;A++){let R=T[A];for(let I in x[R]){let F;R+"#$$$#"+I=="null#$$$#null"?F=l.valueBlank:F=I;let z;R+"#$$$#"+I in C?z='<div class="textBox luckysheet-mousedown-cancel cf" data-check="false" data-filter="'+(R+"#$$$#"+I)+'" title="'+I+'"><input class="luckysheet-mousedown-cancel" type="checkbox"/><label class="luckysheet-mousedown-cancel">'+F+'</label><span class="luckysheet-mousedown-cancel count">( '+x[R][I]+" )</span></div>":z='<div class="textBox luckysheet-mousedown-cancel cf" data-check="true" data-filter="'+(R+"#$$$#"+I)+'" title="'+I+'"><input class="luckysheet-mousedown-cancel" type="checkbox" checked="checked"/><label class="luckysheet-mousedown-cancel">'+F+'</label><span class="luckysheet-mousedown-cancel count">( '+x[R][I]+" )</span></div>",S.push(z)}}}let _=u-o.top-350;_<0&&(_=100),$("#luckysheet-pivotTableFilter-byvalue-select").append("<div class='ListBox luckysheet-mousedown-cancel' style='max-height:"+_+"px;overflow-y:auto;overflow-x:hidden;'>"+S.join("")+"</div>"),y.close()},1),sn(s,o.left-250,o.top)},getSumTypeName:function(e){let n="",l=Q().pivotTable;return e=="SUM"?n=l.valueStatisticsSUM:e=="COUNT"?n=l.valueStatisticsCOUNT:e=="COUNTA"?n=l.valueStatisticsCOUNTA:e=="COUNTUNIQUE"?n=l.valueStatisticsCOUNTUNIQUE:e=="AVERAGE"?n=l.valueStatisticsAVERAGE:e=="MAX"?n=l.valueStatisticsMAX:e=="MIN"?n=l.valueStatisticsMIN:e=="MEDIAN"?n=l.valueStatisticsMEDIAN:e=="PRODUCT"?n=l.valueStatisticsPRODUCT:e=="STDEV"?n=l.valueStatisticsSTDEV:e=="STDEVP"?n=l.valueStatisticsSTDEVP:e=="let"?n=l.valueStatisticslet:e=="VARP"&&(n=l.valueStatisticsVARP),n},setDatatojsfile:function(e,n,t){let l=this,a=Z(l.pivotSheetIndex);h.luckysheetfile[a].pivotTable==null&&(h.luckysheetfile[a].pivotTable={}),t==null?(h.luckysheetfile[a].pivotTable[e]=n,l[e]=n):(h.luckysheetfile[a].pivotTable.filterparm==null&&(h.luckysheetfile[a].pivotTable.filterparm={}),h.luckysheetfile[a].pivotTable.filterparm[t.toString()]==null&&(h.luckysheetfile[a].pivotTable.filterparm[t.toString()]={}),h.luckysheetfile[a].pivotTable.filterparm[t.toString()][e]=n,l.filterparm==null&&(l.filterparm={}),l.filterparm[t.toString()]==null&&(l.filterparm[t.toString()]={}),l.filterparm[t.toString()][e]=n)},createPivotTable:function(e){if(fe()||h.allowEdit===!1)return;let n=this,t=h.currentSheetIndex,a=Q().pivotTable;if(fe()){alert(a.errorNotAllowEdit);return}if(h.luckysheet_select_save.length>1){U.info("",a.errorNotAllowMulti);return}if(h.luckysheet_select_save.length==0||h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]||h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]){U.info("",a.errorSelectRange);return}let o=$.extend(!0,{},h.luckysheet_select_save[0]);ve.addNewSheet(e,!0),n.getCellData(h.currentSheetIndex,t,o),n.setDatatojsfile("pivot_select_save",o),n.setDatatojsfile("pivotDataSheetIndex",t),n.initialPivotManage()},changePivotTable:function(e){let n=this,l=Q().pivotTable,a=h.luckysheetfile[Z(e)].pivotTable.pivotDataSheetIndex;if(Z(a)==null){U.info(l.errorIsDamage,"");return}n.getCellData(e),n.initialPivotManage(!0),n.refreshPivotTable()},refreshPivotTable:function(e=!0){let n=this,t={};t.pivotTable=fd,t.data=xe.deepCopyFlowData(h.flowdata),n.storePivotTableParam();let l=n.dataHandler(n.column,n.row,n.values,n.showType,n.celldata);n.setDatatojsfile("pivotDatas",l);let a=$.extend(!0,[],ve.nulldata),o=a,s=0,u=0;if(l.length==0)n.setDatatojsfile("drawPivotTable",!0),n.setDatatojsfile("pivotTableBoundary",[12,6]);else{n.setDatatojsfile("drawPivotTable",!1),n.setDatatojsfile("pivotTableBoundary",[l.length,l[0].length]);let f=l.length,d=l[0].length;s=f-a.length,u=d-a[0].length,o=cl(a,s+20,u+10,!0);for(let m=0;m<f;m++){let g=[].concat(o[m]);for(let y=0;y<d;y++){let v="";l[m]!=null&&l[m][y]!=null&&(v=ze(m,y,l)),g[y]=v}o[m]=g}}t.type="pivotTable_change",t.curdata=$.extend(!0,[],o),t.sheetIndex=h.currentSheetIndex,t.pivotTablecur=n.getPivotTableData(),h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push(t)),rl(),h.clearjfundo=!1,s>0||u>0?Zl(o[0].length,o.length,o,null,h.luckysheet_select_save,"datachangeAll",void 0,void 0,e):(Ze(o,h.luckysheet_select_save,{},null,e),lt()),h.clearjfundo=!0},drawPivotTable:!0,pivotTableBoundary:[12,6],pivotclick:function(e,n,t){t==null&&(t=h.currentSheetIndex);let l=h.luckysheetfile[Z(t)];if(!l.isPivotTable)return;let a=l.pivotTable.pivotDataSheetIndex;if(Z(a)==null)return;let s=$("#luckysheet-modal-dialog-slider-pivot"),u=this.isPivotRange(e,n);if(u&&s.is(":hidden")){if(!$t(t,"usePivotTablereports",!1))return;s.show(),zt(),$("#luckysheet-sta-content").css("padding-right",260)}else!u&&s.is(":visible")&&(s.hide(),zt(),$("#luckysheet-sta-content").css("padding-right",10))},isPivotRange:function(e,n){let t=this;if(h.luckysheetcurrentisPivotTable)return e<t.pivotTableBoundary[0]&&n<t.pivotTableBoundary[1]},storePivotTableParam:function(){let e=this,n=[],t=[],l=[],a=[];$("#luckysheet-modal-dialog-config-filter .luckysheet-modal-dialog-slider-config-item").each(function(){let u={};u.index=$(this).data("index"),u.name=$(this).data("name"),u.fullname=$(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(),l.push(u)}),$("#luckysheet-modal-dialog-config-row .luckysheet-modal-dialog-slider-config-item").each(function(){let u={};u.index=$(this).data("index"),u.name=$(this).data("name"),u.fullname=$(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(),u.order=$(this).data("order"),u.orderby=$(this).data("orderby"),u.stastic=$(this).data("stastic"),t.push(u)}),$("#luckysheet-modal-dialog-config-column .luckysheet-modal-dialog-slider-config-item").each(function(){let u={};u.index=$(this).data("index"),u.name=$(this).data("name"),u.fullname=$(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(),u.order=$(this).data("order"),u.orderby=$(this).data("orderby"),u.stastic=$(this).data("stastic"),n.push(u)}),$("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").each(function(){let u={};u.index=$(this).data("index"),u.name=$(this).data("name"),u.fullname=$(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(),u.sumtype=$(this).data("sumtype"),u.nameindex=$(this).data("nameindex"),a.push(u)}),e.setDatatojsfile("column",n),e.setDatatojsfile("row",t),e.setDatatojsfile("filter",l),e.setDatatojsfile("values",a);let o=$("#luckysheetpivottablevaluecolrow:checked, #luckysheetpivottablevaluecolrow1:checked").val();e.setDatatojsfile("showType",o=="0"?"row":"column");let s=e.getPivotTableData();delete s.pivotDatas,ne.saveParam("all",e.pivotSheetIndex,s,{k:"pivotTable"})},getPivotTableData:function(e){e==null&&(e=this.pivotSheetIndex);let n=Z(e),t=h.luckysheetfile[n].pivotTable;return P(t)=="object"?t=$.extend(!0,{},h.luckysheetfile[n].pivotTable):t=new Function("return "+t)(),t},addValuesToTitle:function(e,n){let t=e.length*n.length,l=e[0].length+1,a=[];if(e.length==0&&n.length>0){for(let o=0;o<n.length;o++)a.push(n[o].fullname);return a}if(n.length==0&&e.length>0)return e;for(let o=0;o<t;o++){a[o]=new Array(l);for(let s=0;s<l-1;s++)a[o][s]=e[Math.floor(o/n.length)][s];a[o][l-1]=n[o%n.length].fullname}return a},initialPivotManage:function(e){let n=this,t=Q(),l=t.pivotTable,a=t.button,o=t.filter;if(n.initial){n.initial=!1,$("body").append(Du()),$("#luckysheet-modal-dialog-slider-close").click(function(){$("#luckysheet-modal-dialog-slider-pivot").hide(),zt()}),$("body").append(_e(dt,{id:"luckysheet-data-pivotTable-selection",addclass:"luckysheet-data-pivotTable-selection",title:l.titleSelectionDataRange,content:'<input id="luckysheet-pivotTable-range-selection-input" class="luckysheet-datavisual-range-container" style="font-size: 14px;padding:5px;max-width:none;" spellcheck="false" aria-label="'+l.titleDataRange+'" placeholder="'+l.titleDataRange+'">',botton:'<button id="luckysheet-pivotTable-selection-confirm" class="btn btn-primary">'+a.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+a.cancel+"</button>"})),$("body").append(_e(Gi(),{menuid:"pivotTableFilter"})),$("body").append(_e(Wi(),{menuid:"pivotTableFilter"})),$("body").append(_u()),$("body").append(Cu()),$("#luckysheet-pivotTableFilter-orderby-asc").remove(),$("#luckysheet-pivotTableFilter-orderby-desc").next().remove(),$("#luckysheet-pivotTableFilter-orderby-desc").remove(),$("#luckysheet-pivotTableFilter-orderby-color").next().remove(),$("#luckysheet-pivotTableFilter-orderby-color").remove(),$("#luckysheetpivottablevaluecolrow, #luckysheetpivottablevaluecolrow1").checkboxradio({icon:!1}).change(function(){n.refreshPivotTable()});let m=null;$("#luckysheet-pivotTableFilter-menu").mouseover(function(){clearTimeout(m),m=setTimeout(function(){$("#luckysheet-pivotTableFilter-submenu").hide()},500)}),$(document).off("click.ptFilterCheckbox1").on("click.ptFilterCheckbox1","#luckysheet-pivotTableFilter-byvalue-select .textBox",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).find("input[type='checkbox']").prop("checked",!0))}),$(document).off("click.ptFilterCheckbox2").on("click.ptFilterCheckbox2","#luckysheet-pivotTableFilter-byvalue-select .year",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).parents(".yearBox").find(".month").attr("data-check","false"),$(this).parents(".yearBox").find(".day").attr("data-check","false"),$(this).parents(".yearBox").find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).parents(".yearBox").find(".month").attr("data-check","true"),$(this).parents(".yearBox").find(".day").attr("data-check","true"),$(this).parents(".yearBox").find("input[type='checkbox']").prop("checked",!0))}),$(document).off("click.ptFilterCheckbox3").on("click.ptFilterCheckbox3","#luckysheet-pivotTableFilter-byvalue-select .month",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).parents(".monthBox").find(".day").attr("data-check","false"),$(this).parents(".monthBox").find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).parents(".monthBox").find(".day").attr("data-check","true"),$(this).parents(".monthBox").find("input[type='checkbox']").prop("checked",!0));let g=!0;$(this).parents(".yearBox").find(".day").each(function(v,b){$(b).attr("data-check")=="true"||(g=!1)}),g?($(this).parents(".yearBox").find(".year").attr("data-check","true"),$(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked",!0)):($(this).parents(".yearBox").find(".year").attr("data-check","false"),$(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"))}),$(document).off("click.ptFilterCheckbox4").on("click.ptFilterCheckbox4","#luckysheet-pivotTableFilter-byvalue-select .day",function(){$(this).attr("data-check")=="true"?($(this).attr("data-check","false"),$(this).find("input[type='checkbox']").removeAttr("checked")):($(this).attr("data-check","true"),$(this).find("input[type='checkbox']").prop("checked",!0));let g=!0;$(this).parents(".monthBox").find(".day").each(function(k,w){$(w).attr("data-check")=="true"||(g=!1)}),g?($(this).parents(".monthBox").find(".month").attr("data-check","true"),$(this).parents(".monthBox").find(".month input[type='checkbox']").prop("checked",!0)):($(this).parents(".monthBox").find(".month").attr("data-check","false"),$(this).parents(".monthBox").find(".month input[type='checkbox']").removeAttr("checked"));let v=!0;$(this).parents(".yearBox").find(".day").each(function(k,w){$(w).attr("data-check")=="true"||(v=!1)}),v?($(this).parents(".yearBox").find(".year").attr("data-check","true"),$(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked",!0)):($(this).parents(".yearBox").find(".year").attr("data-check","false"),$(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"))}),$(document).off("click.ptFilterYearDropdown").on("click.ptFilterYearDropdown","#luckysheet-pivotTableFilter-byvalue-select .yearBox .fa-caret-right",function(){let g=$(this).parents(".luckysheet-mousedown-cancel");g.hasClass("year")&&$(this).parents(".yearBox").find(".monthList").slideToggle(),g.hasClass("month")&&$(this).parents(".monthBox").find(".dayList").slideToggle()}),$("#luckysheet-pivotTableFilter-byvalue-btn-all").click(function(){$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").prop("checked",!0),$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check","true")}),$("#luckysheet-pivotTableFilter-byvalue-btn-contra").click(function(){$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").each(function(b,k){$(k).is(":checked")?($(k).removeAttr("checked"),$(k).parents(".luckysheet-mousedown-cancel").attr("data-check","false")):($(k).prop("checked",!0),$(k).parents(".luckysheet-mousedown-cancel").attr("data-check","true"))}),$("#luckysheet-pivotTableFilter-byvalue-select .ListBox .monthBox").each(function(b,k){let w=!0;$(k).find(".day input[type='checkbox']").each(function(C,S){$(S).is(":checked")||(w=!1)}),w?($(k).find(".month input[type='checkbox']").prop("checked",!0),$(k).attr("data-check","true")):($(k).find(".month input[type='checkbox']").removeAttr("checked"),$(k).attr("data-check","false"))}),$("#luckysheet-pivotTableFilter-byvalue-select .ListBox .yearBox").each(function(b,k){let w=!0;$(k).find(".day input[type='checkbox']").each(function(C,S){$(S).is(":checked")||(w=!1)}),w?($(k).find(".year input[type='checkbox']").prop("checked",!0),$(k).attr("data-check","true")):($(k).find(".year input[type='checkbox']").removeAttr("checked"),$(k).attr("data-check","false"))})}),$("#luckysheet-pivotTableFilter-byvalue-btn-clear").click(function(){$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").removeAttr("checked"),$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check","false")}),$("#luckysheet-pivotTableFilter-byvalue-input").on("input propertychange",function(){let g=$(this).val().toString();$("#luckysheet-pivotTableFilter-byvalue-select .ListBox .luckysheet-mousedown-cancel").show(),g!=""&&$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").each(function(v,b){let k=$(b).parents(".luckysheet-mousedown-cancel");if(k.hasClass("day")){let w=$(b).siblings("label").text().toString(),x=$(b).parents(".monthBox").find(".month label").text().toString();($(b).parents(".yearBox").find(".year label").text().toString()+"-"+x+"-"+w).indexOf(g)==-1&&($(b).parents(".day").hide(),$(b).parents(".dayList").find(".day:visible").length==0&&$(b).parents(".monthBox").find(".month").hide(),$(b).parents(".monthList").find(".day:visible").length==0&&$(b).parents(".yearBox").find(".year").hide())}k.hasClass("textBox")&&$(b).siblings("label").text().toString().indexOf(g)==-1&&$(b).parents(".textBox").hide()})}),$("#luckysheet-pivotTableFilter-bycondition, #luckysheet-pivotTableFilter-byvalue").click(function(){let g=$(this);g.next().slideToggle(200),setTimeout(function(){g.attr("id")=="luckysheet-pivotTableFilter-bycondition"&&$("#luckysheet-pivotTableFilter-bycondition").next().is(":visible")&&$("#luckysheet-pivotTableFilter-selected span").text()!=o.filiterInputNone&&$("#luckysheet-pivotTableFilter-byvalue").next().slideUp(200),g.is($("#luckysheet-pivotTableFilter-bycondition"))&&$("#luckysheet-pivotTableFilter-bycondition").next().is(":hidden")&&$("#luckysheet-pivotTableFilter-byvalue").next().is(":hidden")&&$("#luckysheet-pivotTableFilter-byvalue").next().slideDown(200)},300)}),$("#luckysheet-pivotTableFilter-cancel").click(function(){$("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide()}),$("#luckysheet-pivotTableFilter-selected").click(function(){let g=$(this),y=g.offset(),v=$("#luckysheet-pivotTableFilter-submenu");v.hide();let b=$(window).height(),k=$(window).width(),w=v.width(),x=v.height(),C=y.top,S=y.left,_=b-y.top-20;y.left+w>k&&(S=y.left-w),y.top>b/2&&(C=b-y.top,C<0&&(C=0),_=y.top-20),v.css({top:C,left:S,height:_}).show(),clearTimeout(m)}),$("#luckysheet-pivotTableFilter-submenu").mouseover(function(){clearTimeout(m)}).find(".luckysheet-cols-menuitem").click(function(g){$("#luckysheet-pivotTableFilter-selected span").html($(this).find(".luckysheet-cols-menuitem-content").text()).data("value",$(this).data("value")),$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").hide(),$(this).data("type")=="2"?($("#luckysheet-pivotTableFilter-selected span").data("type","2"),$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input2").show()):$(this).data("type")=="0"?$("#luckysheet-pivotTableFilter-selected span").data("type","0"):($("#luckysheet-pivotTableFilter-selected span").data("type","1"),$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").eq(0).show(),$(this).attr("data-value")=="dateequal"||$(this).attr("data-value")=="datelessthan"||$(this).attr("data-value")=="datemorethan"?$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input input").prop("type","date"):$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input input").prop("type","text")),$("#luckysheet-pivotTableFilter-byvalue").next().slideUp(),$("#luckysheet-pivotTableFilter-submenu").hide()}),$("#luckysheet-modal-dialog-pivotTable-list").on("click"," .luckysheet-slider-list-item-filter",function(g){return n.luckysheetsliderlistitemfilter($(this)),g.stopPropagation(),!1}),$("#luckysheet-modal-dialog-pivotTable-list").on("click"," .luckysheet-slider-list-item-filtered",function(g){return n.luckysheetsliderlistclearfilter($(this).next()),g.stopPropagation(),!1}),$("#luckysheet-dialog-pivotTable-range-seleted").click(function(){$("#luckysheet-modal-dialog-slider-pivot").hide(),zt();let g=$("#luckysheet-data-pivotTable-selection"),y=g.outerHeight(),v=g.outerWidth(),b=$(window).width(),k=$(window).height(),w=$(document).scrollLeft(),x=$(document).scrollTop();$("#luckysheet-data-pivotTable-selection").css({left:(b+w-v)/2,top:(k+x-y)/4}).show(),n.jgridCurrentPivotInput=$("#luckysheet-dialog-pivotTable-range").html(),$("#luckysheet-pivotTable-range-selection-input").val(n.jgridCurrentPivotInput),n.luckysheet_pivotTable_select_state=!0}),$("#luckysheet-pivotTableFilter-initial").click(function(){$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-slider-list-item-filtered").hide(),$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").data("rowhidden",""),$("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(),$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").hide().find("input").val(),$("#luckysheet-pivotTableFilter-selected span").data("type","0").data("type",null).text(o.filiterInputNone),n.setDatatojsfile("filterparm",null),n.celldata=n.origindata,n.refreshPivotTable()}),$("#luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").on("click",".luckysheet-modal-dialog-slider-config-item-icon",function(g){let y=$(g.target),v=y.closest(".luckysheet-modal-dialog-slider-config-item"),b=v.data("index"),k=v.offset(),w=v.data("order"),x=v.data("orderby"),C=v.data("stastic");w==null&&(w="default");let S='<option value="self">'+v.find(".luckysheet-modal-dialog-slider-config-item-txt").data("name")+"</option>";return $("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").each(function(_){S+='<option value="'+_+'">'+$(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text()+"</option>"}),$("#luckysheet-pivotTable-config-option-orderby").empty().html(S),x==null&&(x="self"),C==null&&(C="1"),$("#luckysheet-pivotTable-config-option-order").val(w).data("index",b),$("#luckysheet-pivotTable-config-option-orderby").val(x).data("index",b),$("#luckysheet-pivotTable-config-option-stastic").val(C).data("index",b),ml($("#luckysheet-pivotTable-config-option"),k.left+v.outerWidth(),k.top-13,"rightbottom"),g.stopPropagation(),!1}),$("#luckysheet-pivotTable-config-option-order,#luckysheet-pivotTable-config-option-orderby,#luckysheet-pivotTable-config-option-stastic").change(function(){let g=$(this),y=g.data("index");$("#luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").find(".luckysheet-modal-dialog-slider-config-item").each(function(){$(this).data("index")==y&&$(this).data(g.attr("id").replace("luckysheet-pivotTable-config-option-",""),g.val())}),n.refreshPivotTable()}),$("#luckysheet-modal-dialog-config-value").on("click",".luckysheet-modal-dialog-slider-config-item-icon",function(g){let y=$(g.target),v=y.closest(".luckysheet-modal-dialog-slider-config-item"),b=v.data("index"),k=v.offset(),w=v.data("sumtype"),x=n.pivot_data_type[b.toString()];w==null&&(x=="num"?w="SUM":w="COUNTA");let C=$("#luckysheet-pivotTable-config-option-sumtype");return C.find(".luckysheet-submenu-arrow").hide(),C.find(".luckysheet-cols-menuitem[sumtype='"+w+"'] .luckysheet-submenu-arrow").css("display","inline"),C.data("item",v),ml(C,k.left+v.outerWidth(),k.top-13,"rightbottom"),g.stopPropagation(),!1}),$("#luckysheet-pivotTable-config-option-sumtype .luckysheet-cols-menuitem").click(function(){let g=$("#luckysheet-pivotTable-config-option-sumtype").data("item"),y=$(this).attr("sumtype");g.data("sumtype",$(this).attr("sumtype"));let v=n.getSumTypeName(y)+":"+g.data("name");g.attr("title",v).find(".luckysheet-modal-dialog-slider-config-item-txt").html(v),$("#luckysheet-pivotTable-config-option-sumtype").hide(),n.refreshPivotTable()}),$("#luckysheet-modal-dialog-config-filter").on("click",".luckysheet-modal-dialog-slider-config-item-icon",function(g){let y=$(g.target),v=y.closest(".luckysheet-modal-dialog-slider-config-item").data("index");return n.luckysheetsliderlistitemfilter($("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(v).find(".luckysheet-slider-list-item-filter")),g.stopPropagation(),!1}),$("#luckysheet-pivotTableFilter-confirm").click(function(){let y=$("#luckysheet-pivotTableFilter-menu").data("index"),v={};$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").each(function(){let _=$(this),T=_.data("rowhidden");if(_.data("index")!=y){if(T==null||T=="")return!0;P(T)=="string"&&(T=JSON.parse(T));for(let A in T)v[A]=0}});let b=n.origindata,k={},w={},x={};if($("#luckysheet-pivotTableFilter-bycondition").next().is(":visible")&&$("#luckysheet-pivotTableFilter-byvalue").next().is(":hidden")&&$("#luckysheet-pivotTableFilter-selected span").data("value")!="null"){let _=$("#luckysheet-pivotTableFilter-selected span"),T=_.data("type"),A=_.data("value");if(x.value=A,x.text=_.text(),T=="0")x.type="0";else if(T=="2"){let R=$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input2 input");x.type="2",x.value1=R.eq(0).val(),x.value2=R.eq(1).val()}else x.type="1",x.value1=$("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").eq(0).find("input").val();for(let R=1;R<b.length;R++){if(R in v||b[R]==null)continue;let I=b[R][y];if(A=="cellnull")I!=null&&!me(I.v)&&(w[R]=0);else if(A=="cellnonull")(I==null||me(I.v))&&(w[R]=0);else if(A=="textinclude"){let F=x.value1;(I==null||me(I.v)||I.m.indexOf(F)==-1)&&(w[R]=0)}else if(A=="textnotinclude"){let F=x.value1;I==null||me(I.v)||I.m.indexOf(F)>-1&&(w[R]=0)}else if(A=="textstart"){let F=x.value1,z=F.length;(I==null||me(I.v)||I.m.substr(0,z)!=F)&&(w[R]=0)}else if(A=="textend"){let F=x.value1,z=F.length;(I==null||me(I.v)||z>I.m.length||I.m.substr(I.m.length-z,z)!=F)&&(w[R]=0)}else if(A=="textequal"){let F=x.value1;(I==null||me(I.v)||I.m!=F)&&(w[R]=0)}else if(A=="dateequal"){let F=at(x.value1)[2];I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="d"?parseInt(I.v)!=F&&(w[R]=0):w[R]=0}else if(A=="datelessthan"){let F=at(x.value1)[2];I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="d"?parseInt(I.v)>=F&&(w[R]=0):w[R]=0}else if(A=="datemorethan"){let F=at(x.value1)[2];I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="d"?parseInt(I.v)<=F&&(w[R]=0):w[R]=0}else if(A=="morethan"){let F=parseFloat(x.value1);I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?I.v<=F&&(w[R]=0):w[R]=0}else if(A=="moreequalthan"){let F=parseFloat(x.value1);I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?I.v<F&&(w[R]=0):w[R]=0}else if(A=="lessthan"){let F=parseFloat(x.value1);I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?I.v>=F&&(w[R]=0):w[R]=0}else if(A=="lessequalthan"){let F=parseFloat(x.value1);I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?I.v>F&&(w[R]=0):w[R]=0}else if(A=="equal"){let F=parseFloat(x.value1);I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?I.v!=F&&(w[R]=0):w[R]=0}else if(A=="noequal"){let F=parseFloat(x.value1);I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?I.v==F&&(w[R]=0):w[R]=0}else if(A=="include"){let F=parseFloat(x.value1),z=parseFloat(x.value2),M,E;F<z?(M=F,E=z):(E=F,M=z),I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?(I.v<M||I.v>E)&&(w[R]=0):w[R]=0}else if(A=="noinclude"){let F=parseFloat(x.value1),z=parseFloat(x.value2),M,E;F<z?(M=F,E=z):(E=F,M=z),I==null||me(I.v)?w[R]=0:I.ct!=null&&I.ct.t=="n"?I.v>=M&&I.v<=E&&(w[R]=0):w[R]=0}}}else{$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").each(function(_,T){if($(T).is(":visible")&&$(T).is(":checked"))return!0;if($(T).closest(".day").length>0){let A=$(T).siblings("label").text();Number(A)<10&&(A="0"+A);let R=$(T).closest(".monthBox").find(".month label").text().replace(o.filiterMonthText,"");Number(R)<10&&(R="0"+R);let I=$(T).closest(".yearBox").find(".year label").text().replace(o.filiterYearText,""),F=o.filterDateFormatTip+"#$$$#"+I+"-"+R+"-"+A;k[F]="1"}if($(T).closest(".textBox").length>0){let A=$(T).closest(".textBox").data("filter");k[A]="1"}});for(let _=1;_<b.length;_++){if(_ in v||b[_]==null)continue;let T=b[_][y],A;if(T==null||me(T.v))A="null#$$$#null";else if(T.ct!=null&&T.ct.t=="d"){let R=mt("YYYY-MM-DD",T.v);A=o.filterDateFormatTip+"#$$$#"+R}else A=T.v+"#$$$#"+T.m;A in k&&(w[_]=0)}}let C=$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(y);$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']:visible:checked").length<$("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']:visible").length||$("#luckysheet-pivotTableFilter-byvalue-input").val().length>0||$("#luckysheet-pivotTableFilter-bycondition").next().is(":visible")&&$("#luckysheet-pivotTableFilter-byvalue").next().is(":hidden")&&$("#luckysheet-pivotTableFilter-selected span").data("value")!="null"?(C.data("rowhidden",JSON.stringify(w)).find(".luckysheet-slider-list-item-filtered").show(),n.setDatatojsfile("rowhidden",w,y),x!=null&&(C.data("byconditionvalue",x.value).data("byconditiontype",x.type).data("byconditiontext",x.text),x.value1!=null&&C.data("byconditionvalue1",x.value1),x.value2!=null&&C.data("byconditionvalue2",x.value2),n.setDatatojsfile("caljs",x,y))):(C.data("rowhidden","").find(".luckysheet-slider-list-item-filtered").hide(),n.setDatatojsfile("rowhidden",null,y));let S=[];for(let _=0;_<b.length;_++)_ in w||_ in v||S.push([].concat(b[_]));n.celldata=S,n.refreshPivotTable(),$("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(),rl()}),$("#luckysheet-data-pivotTable-selection .luckysheet-model-close-btn, #luckysheet-data-pivotTable-selection .luckysheet-modal-dialog-title-close").click(function(){$("#luckysheet-modal-dialog-slider-pivot").show(),zt(),$("#luckysheet-cell-main .luckysheet-pivotTable-selection-set div").show(),$("#luckysheet-data-pivotTable-selection").hide(),ve.changeSheetExec(n.pivotSheetIndex),n.luckysheet_pivotTable_select_state=!1,rl()}),$("#luckysheet-pivotTable-selection-confirm").click(function(){let g=$("#luckysheet-pivotTable-range-selection-input"),y=g.val();if($.trim(y).length==0||$.trim(y).toUpperCase()==n.jgridCurrentPivotInput.toUpperCase()){g.val(n.jgridCurrentPivotInput),$("#luckysheet-data-pivotTable-selection .luckysheet-model-close-btn").click();return}else{let v=y.split("!"),b="",k="",w=-1;if(v.length>1){b=v[0],k=v[1];for(let S in h.luckysheetfile)if(b==h.luckysheetfile[S].name){w=h.luckysheetfile[S].index;break}w==-1&&(w=0)}else{let S=Z(h.currentSheetIndex);b=h.luckysheetfile[S].name,w=h.luckysheetfile[S].index,k=v[0]}if(h.luckysheetfile[Z(w)].isPivotTable){fe()?alert(l.errorNotAllowPivotData):U.info("",l.errorNotAllowPivotData),g.val(n.jgridCurrentPivotInput);return}if(k.indexOf(":")==-1){fe()?alert(l.errorSelectionRange):U.info("",l.errorSelectionRange),g.val(n.jgridCurrentPivotInput);return}k=k.split(":");let x=[],C=[];if(x[0]=parseInt(k[0].replace(/[^0-9]/g,""))-1,x[1]=parseInt(k[1].replace(/[^0-9]/g,""))-1,x[0]>x[1]){fe()?alert(l.errorSelectionRange):U.info("",l.errorSelectionRange),g.val(n.jgridCurrentPivotInput);return}if(C[0]=hl(k[0].replace(/[^A-Za-z]/g,"")),C[1]=hl(k[1].replace(/[^A-Za-z]/g,"")),C[0]>C[1]){fe()?alert(l.errorSelectionRange):U.info(l.errorSelectionRange),g.val(n.jgridCurrentPivotInput);return}ve.changeSheetExec(n.pivotSheetIndex),n.setDatatojsfile("pivot_select_save",{row:x,column:C}),n.setDatatojsfile("pivotDataSheetIndex",w),n.getCellData(n.pivotSheetIndex,w,{row:x,column:C}),n.initialPivotManage(),$("#luckysheet-dialog-pivotTable-range").html(y),$("#luckysheet-modal-dialog-slider-pivot").show(),$("#luckysheet-data-pivotTable-selection").hide(),n.luckysheet_pivotTable_select_state=!1,n.refreshPivotTable(),zt(),rl()}}),$("#luckysheet-modal-dialog-slider-pivot").on("mousedown",".luckysheet-slider-list-item-name, .luckysheet-modal-dialog-slider-config-item-txt",function(g){let y=$(g.target);n.movestate=!0,n.movesave.obj=y.parent(),n.movesave.name=y.data("name"),n.movesave.containerid=y.parent().parent().attr("id"),n.movesave.index=y.data("index"),$("#luckysheet-modal-dialog-slider-pivot-move").length==0&&$("body").append('<div id="luckysheet-modal-dialog-slider-pivot-move">'+n.movesave.name+"</div>"),n.movesave.width=$("#luckysheet-modal-dialog-slider-pivot-move").outerWidth(),n.movesave.height=$("#luckysheet-modal-dialog-slider-pivot-move").outerHeight(),$("#luckysheet-modal-dialog-pivotTable-list, #luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").css("cursor","default")}),$("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").mousemove(function(g){if(n.movestate){n.moveitemposition.length==0&&(n.moveitemposition=[0],$(this).find(".luckysheet-modal-dialog-slider-config-item").each(function(C){let S=$(this),_=S.outerHeight();n.moveitemposition.push(n.moveitemposition[C]+_+2)}),$(this).append('<div id="luckysheet-modal-dialog-config-order-help" style="position:absolute;height:3px;width:100%;background:#007ACC;z-index:1;pointer-events: none;user-select:none;"></div>')),$("#luckysheet-modal-dialog-slider-pivot-move").css({background:"#FD8585",color:"#fff",border:"1px solid #FD7070"});let y=event.pageX,v=event.pageY,b=$(this),k=v-b.offset().top+b.scrollTop(),w=n.moveitemposition,x=st(w,k);x==-1?$("#luckysheet-modal-dialog-config-order-help").css({top:w[w.length-1]}):k-w[x-1]>(w[x]-w[x-1])/2?$("#luckysheet-modal-dialog-config-order-help").css({top:w[x]}):$("#luckysheet-modal-dialog-config-order-help").css({top:w[x-1]})}}).mouseleave(function(){n.movestate&&($("#luckysheet-modal-dialog-slider-pivot-move").css({background:"#fff",color:"#000",border:"1px dotted #000"}),n.moveitemposition=[],$("#luckysheet-modal-dialog-config-order-help").remove())}).mouseup(function(g){if(n.movestate){let y=$(this),v;if(n.movesave.containerid==y.attr("id"))v=n.movesave.obj.clone();else{let _=n.movesave.name,T="",A="";y.attr("id")=="luckysheet-modal-dialog-config-value"&&(n.pivot_data_type[n.movesave.index.toString()]=="num"?(_=l.valueStatisticsSUM+":"+_,T="data-sumtype='SUM'",A="data-nameindex='0'"):(_=l.valueStatisticsCOUNTA+":"+_,T="data-sumtype='COUNTA'",A="data-nameindex='0'"),$("#luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function(){if($(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text()==_){let I=parseFloat($(this).data("nameindex"))+1;return _=_+I.toString(),$(this).data("nameindex",I),!1}})),v='<div title="'+_+'" class="luckysheet-modal-dialog-slider-config-item" '+A+" "+T+' data-index="'+n.movesave.index+'" data-name="'+n.movesave.name+'"><div class="luckysheet-modal-dialog-slider-config-item-txt" '+A+" "+T+' data-index="'+n.movesave.index+'" data-name="'+n.movesave.name+'">'+_+'</div><div class="luckysheet-modal-dialog-slider-config-item-icon"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>'}let b=event.pageX,k=event.pageY,w=$(this),x=k-w.offset().top+w.scrollTop(),C=n.moveitemposition,S=st(C,x);(n.movesave.containerid=="luckysheet-modal-dialog-pivotTable-list"||n.movesave.containerid=="luckysheet-modal-dialog-config-value"&&n.movesave.containerid!=y.attr("id"))&&$("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").find(".luckysheet-modal-dialog-slider-config-item").each(function(){$(this).data("index")==n.movesave.index&&$(this).remove()}),S==-1?y.find(".luckysheet-modal-dialog-slider-config-item").length==0?y.append(v):y.find(".luckysheet-modal-dialog-slider-config-item").last().after(v):x-C[S-1]>(C[S]-C[S-1])/2?y.find(".luckysheet-modal-dialog-slider-config-item").eq(S-1).after(v):y.find(".luckysheet-modal-dialog-slider-config-item").eq(S-1).before(v),n.movesave.containerid=="luckysheet-modal-dialog-pivotTable-list"||n.movesave.containerid=="luckysheet-modal-dialog-config-value"&&n.movesave.containerid!=y.attr("id")||n.movesave.obj.remove(),$("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function(){let _=$(this).find(".luckysheet-slider-list-item-selected");$(this).data("index")==n.movesave.index&&_.find("i").length==0&&_.append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>')}),n.refreshPivotTable(),$("#luckysheet-modal-dialog-slider-pivot-move").remove(),n.movestate=!1,$("#luckysheet-modal-dialog-pivotTable-list, #luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").css("cursor","default"),n.moveitemposition=[],$("#luckysheet-modal-dialog-config-order-help").remove(),n.showvaluecolrow(),g.stopPropagation()}}),$("#luckysheet-modal-dialog-pivotTable-list").on("click",".luckysheet-slider-list-item-selected",function(){let g=$(this),y=g.parent(),v=y.data("index"),b=y.data("name");if(g.find("i").length==0){g.append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>');let k=n.pivot_data_type[v.toString()],w;if(k=="num")w='<div title="'+b+'" class="luckysheet-modal-dialog-slider-config-item" data-nameindex="0" data-sumtype="SUM" data-index="'+v+'" data-name="'+b+'"><div class="luckysheet-modal-dialog-slider-config-item-txt" data-nameindex="0" data-sumtype="SUM" data-index="'+v+'" data-name="'+b+'">\u6C42\u548C:'+b+'</div><div class="luckysheet-modal-dialog-slider-config-item-icon"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>',$("#luckysheet-modal-dialog-config-value").append(w);else{w='<div title="'+b+'" class="luckysheet-modal-dialog-slider-config-item" data-index="'+v+'" data-name="'+b+'"><div class="luckysheet-modal-dialog-slider-config-item-txt" data-index="'+v+'" data-name="'+b+'">'+b+'</div><div class="luckysheet-modal-dialog-slider-config-item-icon"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>';let x=$("#luckysheet-modal-dialog-config-column"),C=$("#luckysheet-modal-dialog-config-row"),S=x.find(".luckysheet-modal-dialog-slider-config-item"),_=C.find(".luckysheet-modal-dialog-slider-config-item");S.length<2?x.append(w):_.length<2?C.append(w):x.append(w)}}else g.find("i").remove(),$("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function(){$(this).data("index")==v&&($(this).parent().attr("id")=="luckysheet-modal-dialog-config-value"&&n.resetOrderby($(this)),$(this).remove())});n.refreshPivotTable(),n.showvaluecolrow()}),$("#luckysheet-dialog-pivotTable-clearitem").click(function(){$("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function(){$(this).remove()}),$("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function(){$(this).find(".luckysheet-slider-list-item-selected").find("i").remove()}),n.refreshPivotTable(),n.showvaluecolrow()})}e==null&&(e=!1),n.celldata.length<=1&&n.celldata[0].length<=1&&(fe()?alert(l.errorIncreaseRange):U.info("",l.errorIncreaseRange));let s="",u=1,f={},d=1;for(let m=0;m<n.celldata[0].length;m++){let g;!!n.celldata[0][m]&&!!n.celldata[0][m].m?g=n.celldata[0][m].m:g=ze(0,m,n.celldata),g!=null&&(g=g.toString()),(g==null||$.trim(g.toString()).length==0)&&(g=l.titleColumn+" "+d),d++,g in f&&(g=g+u++,g in f&&(g=g+u++,g in f&&(g=g+u++))),f[g]=1;let y="",v="";if(e&&n.filterparm!=null&&n.filterparm[m.toString()]!=null){let b=n.filterparm[m.toString()];if(b.rowhidden!=null&&(y+="data-rowhidden='"+JSON.stringify(b.rowhidden)+"'"),b.selected!=null&&(y+="data-selected='"+JSON.stringify(b.selected)+"'"),b.caljs!=null){let k=b.caljs;k.value!=null&&(y+="data-byconditionvalue='"+k.value+"'"),k.type!=null&&(y+="data-byconditiontype='"+k.type+"'"),k.text!=null&&(y+="data-byconditiontext='"+k.text+"'"),k.value1!=null&&(y+="data-byconditionvalue1='"+k.value1+"'"),k.value2!=null&&(y+="data-byconditionvalue2='"+k.value2+"'")}}y.length>0&&(v="display:block;"),s+='<div class="luckysheet-modal-dialog-slider-list-item" '+y+' data-index="'+m+'" data-name="'+g+'"><div title="'+l.titleAddColumn+'" class="luckysheet-slider-list-item-selected"><div></div></div><div title="'+l.titleMoveColumn+'" class="luckysheet-slider-list-item-name" '+y+' data-index="'+m+'" data-name="'+g+'">'+g+'</div><div title="'+l.titleClearColumnFilter+'" class="luckysheet-slider-list-item-filtered" style="'+v+'"><i class="fa fa-filter luckysheet-mousedown-cancel" aria-hidden="true"></i><i class="fa fa-times" aria-hidden="true"></i></div><div title="'+l.titleFilterColumn+'" class="luckysheet-slider-list-item-filter"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>'}if($("#luckysheet-modal-dialog-pivotTable-list").html(s),$("#luckysheetpivottablevaluecolrowshow").hide(),$("#luckysheetpivottablevaluecolrow").prop("checked",!0),$("#luckysheetpivottablevaluecolrow1").prop("checked",!1),$("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").empty(),e){if(n.filter!=null&&n.filter.length>0)for(let m=0;m<n.filter.length;m++){let g=n.filter[m],y='<div title="'+name+'" class="luckysheet-modal-dialog-slider-config-item" data-index="'+g.index+'" data-name="'+g.name+'"><div class="luckysheet-modal-dialog-slider-config-item-txt" data-index="'+g.index+'" data-name="'+g.name+'">'+g.name+'</div><div class="luckysheet-modal-dialog-slider-config-item-icon"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>';$("#luckysheet-modal-dialog-config-filter").append(y);let v=$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(g.index).find(".luckysheet-slider-list-item-selected");v.find("i").length==0&&v.append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>')}if(n.row!=null&&n.row.length>0)for(let m=0;m<n.row.length;m++){let g=n.row[m],y="";g.order!=null&&(y+="data-order = '"+g.order+"'"),g.orderby!=null&&(y+="data-orderby = '"+g.orderby+"'"),g.order!=null&&(y+="data-stastic = '"+g.stastic+"'");let v='<div title="'+name+'" class="luckysheet-modal-dialog-slider-config-item" '+y+' data-index="'+g.index+'" data-name="'+g.name+'"><div class="luckysheet-modal-dialog-slider-config-item-txt" '+y+' data-index="'+g.index+'" data-name="'+g.name+'">'+g.name+'</div><div class="luckysheet-modal-dialog-slider-config-item-icon"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>';$("#luckysheet-modal-dialog-config-row").append(v);let b=$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(g.index).find(".luckysheet-slider-list-item-selected");b.find("i").length==0&&b.append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>')}if(n.column!=null&&n.column.length>0)for(let m=0;m<n.column.length;m++){let g=n.column[m],y="";g.order!=null&&(y+="data-order = '"+g.order+"'"),g.orderby!=null&&(y+="data-orderby = '"+g.orderby+"'"),g.order!=null&&(y+="data-stastic = '"+g.stastic+"'");let v='<div title="'+name+'" class="luckysheet-modal-dialog-slider-config-item" '+y+' data-index="'+g.index+'" data-name="'+g.name+'"><div class="luckysheet-modal-dialog-slider-config-item-txt" '+y+' data-index="'+g.index+'" data-name="'+g.name+'">'+g.name+'</div><div class="luckysheet-modal-dialog-slider-config-item-icon"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>';$("#luckysheet-modal-dialog-config-column").append(v);let b=$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(g.index).find(".luckysheet-slider-list-item-selected");b.find("i").length==0&&b.append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>')}if(n.values!=null&&n.values.length>0){for(let m=0;m<n.values.length;m++){let g=n.values[m],y="";g.sumtype!=null&&(y+="data-sumtype = '"+g.sumtype+"'"),g.nameindex!=null&&(y+="data-nameindex = '"+g.nameindex+"'");let v='<div title="'+name+'" class="luckysheet-modal-dialog-slider-config-item" '+y+' data-index="'+g.index+'" data-name="'+g.name+'"><div class="luckysheet-modal-dialog-slider-config-item-txt" '+y+' data-index="'+g.index+'" data-name="'+g.name+'">'+n.getSumTypeName(g.sumtype)+":"+g.name+'</div><div class="luckysheet-modal-dialog-slider-config-item-icon"><i class="fa fa-sort-desc" aria-hidden="true"></i></div></div>';$("#luckysheet-modal-dialog-config-value").append(v);let b=$("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(g.index).find(".luckysheet-slider-list-item-selected");b.find("i").length==0&&b.append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>')}n.values.length>=2&&($("#luckysheetpivottablevaluecolrowshow").show(),n.showType=="column"?($("#luckysheetpivottablevaluecolrow").prop("checked",!0),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").addClass("ui-state-active"),$("#luckysheetpivottablevaluecolrow1").prop("checked",!1),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").removeClass("ui-state-active")):($("#luckysheetpivottablevaluecolrow1").prop("checked",!0),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").addClass("ui-state-active"),$("#luckysheetpivottablevaluecolrow").prop("checked",!1),$("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").removeClass("ui-state-active")))}}$("#luckysheet-dialog-pivotTable-range").html(xt(n.pivotDataSheetIndex,n.pivot_select_save)),$("#luckysheet-modal-dialog-slider-pivot").show(),zt(!1)},getComposeArray:function(e){if(e.length==0)return[];let n=[];for(let t=0;t<e.length;t++){let l="";for(let a=0;a<=t;a++)!!e[a]&&!!e[a].m?l+=e[a].m:l+=ze(a,null,e);n.push(l)}return n},getnameArray:function(e,n){if(e.length==0)return[];if(n.length==0)return[];let t=[];for(let l=0;l<n.length;l++){let a;!!e[n[l].index]&&!!e[n[l].index].m?a=e[n[l].index].m:a=ze(n[l].index,null,e),t.push(a)}return t},getTitleFromGroup:function(e,n,t){let l=this,a=l.orderbygroup(e,n,t);return l.generategrouparraymain(a,n)},orderbygroup:function(e,n,t){let l=this,a=[];if(e.length==0)return[];a=e;let o=null,s=a.length,u=a.length,f=0;for(;s!=0;)if(o=a[f++],s--,o.children!=null&&o.children.length>0){o.children=l.orderbygroupchildren(o.children,n[o.index].orderby,n[o.index].order,t);for(let d=0;d<o.children.length;d++)a.push(o.children[d]),s++}return e.splice(0,u)},orderbygroupchildren:function(e,n,t,l){if(e.length==0)return[];let a=!1;(t==null||t=="asc")&&(a=!0);let s=Q().filter,u=function(d,m){let g=null,y=null;if(n=="self"||n==null){if(d.name==null?g=s.valueBlank:g=d.name.toString(),m.name==null?y=s.valueBlank:y=m.name.toString(),Lt(g)&&Lt(y))return ul(g,y)}else g=parseFloat(l[d.orderby].result),y=parseFloat(l[m.orderby].result);if(!isNaN(g)&&!isNaN(y))return(0,Fi.default)(g).value()-(0,Fi.default)(y).value();if(isNaN(g)&&isNaN(y))return g.localeCompare(y);if(isNaN(g))return 1;if(isNaN(y))return-1},f=function(d,m){let g=null,y=null;if(n=="self"||n==null){if(d.name==null?g=s.valueBlank:g=d.name.toString(),m.name==null?y=s.valueBlank:y=m.name.toString(),Lt(g)&&Lt(y))return ul(g,y)}else g=parseFloat(l[d.orderby].result),y=parseFloat(l[m.orderby].result);if(!isNaN(g)&&!isNaN(y))return(0,Fi.default)(y).value()-(0,Fi.default)(g).value();if(isNaN(g)&&isNaN(y))return y.localeCompare(g);if(isNaN(g))return-1;if(isNaN(y))return 1};return a?e.sort(u):e.sort(f)},generategroupaddstatic:function(e,n){let t=[],a=Q().pivotTable;for(let o=0;o<e[0].length;o++)o==0?n==a.valueSum?t.push(n):t.push({name:n,issum:!0}):t.push("");return t},generategrouparraymain:function(e,n){let t=this,l=[];for(let a=0;a<e.length;a++){let o=e[a].name,s=t.generategrouparray(e[a].children,n,1);(n[0].stastic=="1"||n[0].stastic==null)&&s.push(t.generategroupaddstatic(s,o)),l=l.concat(s)}return l},generategrouparray:function(e,n,t){let l=this,a=[];for(let o=0;o<e.length;o++){let s=e[o].name,u;if(e[o].children==0||e[o].children.length==0)u=[s],a.push(u);else{u=l.generategrouparray(e[o].children,n,t+1);for(let f=0;f<u.length;f++)u[f].unshift(s);(n[t].stastic=="1"||n[t].stastic==null)&&u.push(l.generategroupaddstatic(u,s)),a=a.concat(u)}}return a},addStatisticsData:function(e,n,t,l){if(e[t]==null&&(e[t]={data:[],count:0,max:-Infinity,min:Infinity,counta:0,countunique:0,countuniquedata:{},sum:0,digitaldata:[],sumtype:n.sumtype,index:n.index,name:n.fullname,acc:0}),On(l).num===!0){let a=Il(l,6);e[t].digitaldata.push(a),e[t].count+=1,e[t].sum+=a,a>e[t].max&&(e[t].max=a),a<e[t].min&&(e[t].min=a);let o=ic(a);o>e[t].acc&&(e[t].acc=o)}l!=""&&(e[t].data.push(l),e[t].counta+=1,l in e[t].countuniquedata||(e[t].countuniquedata[l]=1,e[t].countunique+=1))},dataHandler:function(e,n,t,l,a){let o=this,s=Q(),u=s.filter,f=s.pivotTable;if(l==null&&(l="column"),e.length==0&&n.length==0&&t.length==0||a.length==0)return o.pivotDatas=[],[];let d={},m=a,g=[],y=[],v={},b=0,k=[],w=[],x={},C=0;for(let z=1;z<m.length;z++){let M=m[z],E="",N="",L="",O=[],V=[],q="",W=[],X=[];V=o.getnameArray(M,n),X=o.getnameArray(M,e),O=o.getComposeArray(V),W=o.getComposeArray(X),O.length>0&&O.unshift(f.valueSum),W.length>0&&W.unshift(f.valueSum);let te=v,le=y;for(let he=0;he<O.length;he++){let ue=O[he],K=he==0?f.valueSum:V[he-1];if(te[he.toString()]!=null&&te[he.toString()][ue]!=null)le=le[te[he.toString()][ue]].children;else{let G=he==0?"self":n[he-1].orderby=="self"||n[he-1].orderby==null?ue:l=="column"?ue+t[parseInt(n[he-1].orderby)].fullname:ue+f.valueSum;K==null&&(K=u.valueBlank),le.push({name:K,fullname:ue,index:he,orderby:G,children:[]}),te[he.toString()]==null&&(te[he.toString()]={}),te[he.toString()][ue]==null&&(te[he.toString()][ue]=le.length-1),le=le[le.length-1].children}}let oe=x,se=w;for(let he=0;he<W.length;he++){let ue=W[he],K=he==0?f.valueSum:X[he-1];if(oe[he.toString()]!=null&&oe[he.toString()][ue]!=null)se=se[oe[he.toString()][ue]].children;else{let G=he==0?"self":e[he-1].orderby=="self"||e[he-1].orderby==null?ue:l=="column"?f.valueSum+ue:t[parseInt(e[he-1].orderby)].fullname+ue;K==null&&(K=u.valueBlank),se.push({name:K,fullname:ue,index:he,orderby:G,children:[]}),oe[he.toString()]==null&&(oe[he.toString()]={}),oe[he.toString()][ue]==null&&(oe[he.toString()][ue]=se.length-1),se=se[se.length-1].children}}let ce="";for(let he=0;he<t.length;he++){let ue=ze(t[he].index,null,M),K=[].concat(W),G=[].concat(O);l=="column"?K.length>0?(K.push(""),K=K.join(t[he].fullname+"|||").split("|||").slice(0,K.length-1)):K.push(t[he].fullname):G.length>0?(G.push(""),G=G.join(t[he].fullname+"|||").split("|||").slice(0,G.length-1)):G.push(t[he].fullname),K.length==0&&K.push(""),G.length==0&&G.push("");for(let ee=0;ee<G.length;ee++)for(let pe=0;pe<K.length;pe++){let ae=G[ee]+K[pe];o.addStatisticsData(d,t[he],ae,ue)}}}for(let z in d){let M=d[z];if(M.sumtype=="SUM")M.result=M.sum;else if(M.sumtype=="COUNT")M.result=M.count;else if(M.sumtype=="COUNTA")M.result=M.counta;else if(M.sumtype=="COUNTUNIQUE")M.result=M.countunique;else if(M.sumtype=="AVERAGE")M.result=Il(M.sum/M.count);else if(M.sumtype=="MAX")M.result=M.max;else if(M.sumtype=="MIN")M.result=M.min;else if(M.sumtype=="MEDIAN"){let N=M.digitaldata.sort(function(V,q){return V-q}),L=N.length,O=parseInt(L/2);L%2==0?M.result=(N[O-1]+N[O])/2:M.result=N[O]}else if(M.sumtype=="PRODUCT")M.result=new Function("return "+M.digitaldata.join("*"))();else if(M.sumtype=="STDEV"){let N=M.sum/M.count;M.result=Mi.STDEV(N,M.digitaldata)}else if(M.sumtype=="STDEVP"){let N=M.sum/M.count;M.result=Mi.STDEVP(N,M.digitaldata)}else if(M.sumtype=="let"){let N=M.sum/M.count;M.result=Mi.let(N,M.digitaldata)}else if(M.sumtype=="VARP"){let N=M.sum/M.count;M.result=Mi.VARP(N,M.digitaldata)}let E=ic(M.result);E>M.acc&&(M.acc=E),M.result=Il(M.result,M.acc)}if(g=o.getTitleFromGroup(y,n,d),k=o.getTitleFromGroup(w,e,d),l=="column")if(k.length>0&&k[0].length>0)k=o.addValuesToTitle(k,t);else for(let z=0;z<t.length;z++)k.push([t[z].fullname]);else if(g.length>0&&g[0].length>0)g=o.addValuesToTitle(g,t);else for(let z=0;z<t.length;z++)g.push([t[z].fullname]);let S=k;k=cd.transpose(k,!1);let _=t.length==0?0:1,T=(k.length==0?_:k.length)+(g.length==0?_:g.length),A=(k.length==0?_:k[0].length)+(g.length==0?_:g[0].length),R=k.length,I=g.length==0?0:g[0].length,F=[];for(let z=0;z<T;z++){F[z]=new Array(A);for(let M=0;M<A;M++){let E=g[z-R];if(z<R&&M<I)F[z][M]="";else if(z<R&&M>=I)k[z]!=null?P(k[z][M-I])=="object"?F[z][M]=k[z][M-I].name+f.valueSum:F[z][M]=k[z][M-I]:F[z][M]="";else if(z>=R&&M<I)E!=null?P(E[M])=="object"?F[z][M]=E[M].name+f.valueSum:F[z][M]=E[M]:F[z][M]="";else{let N="";if(E!=null)if(!(E instanceof Array)||E.length==1)E instanceof Array?N=E[0]:N=E;else for(let q=0;q<E.length;q++)P(E[q])=="object"?N+=E[q].name:N+=E[q];let L="",O=S[M-I];if(O!=null)if(!(O instanceof Array)||O.length==1)O instanceof Array?L=O[0]:L=O;else for(let q=0;q<O.length;q++)P(O[q])=="object"?L+=O[q].name:L+=O[q];let V=N;N!=""&&L!=""?V=N+L:N==""&&(V=L),d[V]==null?F[z][M]="":F[z][M]=d[V].result}}}if(t.length==1&&e.length>0&&n.length>0)F[0][0]=t[0].fullname,F.splice(e.length,1);else if(t.length==1&&e.length>0){let z=F.splice(e.length,1),M=[];for(let E=0;E<F.length;E++){let N=[];E==F.length-1?N.push(z[0][0]):N.push("");for(let L=0;L<F[E].length-1;L++)N.push(F[E][L]);M.push(N)}F=M}return o.pivotDatas=F,F},drillDown:function(e,n){if(!$t(h.currentSheetIndex,"usePivotTablereports"))return;let t=this,l=t.pivotDatas[e][n],a=$.extend(!0,[],ve.nulldata),o=Q(),s=o.filter,u=o.pivotTable,f=1;for(let g=0;g<t.celldata[0].length;g++){let y;!!t.celldata[0][g]&&!!t.celldata[0][g].m?y=t.celldata[0][g].m:y=ze(0,g,t.celldata),y!=null&&(y=y.toString()),(y==null||$.trim(y.toString()).length==0)&&(y=u.titleColumn+" "+f),f++,a[0][g]=y}let d={};if(t.row!=null&&t.row.length>0)for(let g=0;g<t.row.length;g++)d[t.row[g].index]=t.pivotDatas[e][g];if(t.column!=null&&t.column.length>0)for(let g=0;g<t.column.length;g++)d[t.column[g].index]=t.pivotDatas[g][n];let m=[];for(let g=1;g<t.celldata.length;g++){let y=!0;for(let v in d){let b;if(!!t.celldata[g][v]&&!!t.celldata[g][v].m?b=t.celldata[g][v].m:b=ze(g,v,t.celldata),b!=null?b=b.toString():b=s.valueBlank,b!=d[v]){y=!1;break}}y&&m.push(g)}for(let g=0;g<m.length;g++)for(let y=0;y<t.celldata[0].length;y++){let v;!!t.celldata[m[g]][y]&&!!t.celldata[m[g]][y].m?v=t.celldata[m[g]][y].m:v=ze(m[g],y,t.celldata),v!=null?v=v.toString():v="",a[g+1][y]=v}h.luckysheet_select_save=[{row:[0,m.length],column:[0,t.celldata[0].length-1]}],h.clearjfundo=!1,Ze(a,h.luckysheet_select_save),lt(),h.clearjfundo=!0}},Oe=fd});var dd,av,Ei,oc,sc,cc,_o,md,iv,ov,Ni,Ar,pd,sv,cv,Jl,uc=Ie(()=>{Xe();dd=function(){let e,n;return e=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(e.prototype=$.extend(new arguments[0],arguments[arguments.length-1]),e._super=arguments[0].prototype):e.prototype=arguments[arguments.length-1],arguments.length>2&&(n=Array.prototype.slice.call(arguments,1,-1),n.unshift(e.prototype),$.extend.apply($,n))):e.prototype=arguments[0],e.prototype.cls=e,e},av=dd({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(e,n){this.format=e,this.fclass=n},render:function(e,n,t){let l=this,a=e,o,s,u,f,d;return this.format.replace(this.fre,function(){let m;return s=arguments[1],u=arguments[3],o=l.precre.exec(s),o?(d=o[2],s=o[1]):d=!1,f=a[s],f===void 0?"":u&&n&&n[u]?(m=n[u],m.get?n[u].get(f)||f:n[u][f]||f):(iv(f)&&(t.get("numberFormatter")?f=t.get("numberFormatter")(f):f=ov(f,d,t.get("numberDigitGroupCount"),t.get("numberDigitGroupSep"),t.get("numberDecimalMark"))),f)})}});$.spformat=function(e,n){return new av(e,n)};Ei=function(e,n,t){return e<n?n:e>t?t:e},oc=function(e,n){let t;return n===2?(t=Math.floor(e.length/2),e.length%2?e[t]:(e[t-1]+e[t])/2):e.length%2?(t=(e.length*n+n)/4,t%1?(e[Math.floor(t)]+e[Math.floor(t)-1])/2:e[t-1]):(t=(e.length*n+2)/4,t%1?(e[Math.floor(t)]+e[Math.floor(t)-1])/2:e[t-1])},sc=function(e){let n;switch(e){case"undefined":e=void 0;break;case"null":e=null;break;case"true":e=!0;break;case"false":e=!1;break;default:n=parseFloat(e),e==n&&(e=n)}return e},cc=function(e){let n,t=[];for(n=e.length;n--;)t[n]=sc(e[n]);return t},_o=function(e,n,t){let l;for(l=n.length;l--;)if(!(t&&n[l]===null)&&n[l]!==e)return!1;return!0},md=function(e,n){let t,l,a=[];for(t=0,l=e.length;t<l;t++)e[t]!==n&&a.push(e[t]);return a},iv=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ov=function(e,n,t,l,a){let o,s;for(e=(n===!1?parseFloat(e).toString():e.toFixed(n)).split(""),o=(o=$.inArray(".",e))<0?e.length:o,o<e.length&&(e[o]=a),s=o-t;s>0;s-=t)e.splice(s,0,l);return e.join("")},Ni=dd({init:function(e){let n,t,l=[];for(n in e)e.hasOwnProperty(n)&&typeof n=="string"&&n.indexOf(":")>-1&&(t=n.split(":"),t[0]=t[0].length===0?-Infinity:parseFloat(t[0]),t[1]=t[1].length===0?Infinity:parseFloat(t[1]),t[2]=e[n],l.push(t));this.map=e,this.rangelist=l||!1},get:function(e){let n=this.rangelist,t,l,a;if((a=this.map[e])!==void 0)return a;if(n){for(t=n.length;t--;)if(l=n[t],l[0]<=e&&l[1]>=e)return l[2]}}});$.range_map=function(e){return new Ni(e)};Ar={defaultOption:{common:{type:"line",lineColor:"#2ec7c9",fillColor:"#CCF3F4",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!0,disableInteraction:!0,offsetX:0,offsetY:0},line:{spotColor:0,highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:0,maxSpotColor:0,lineWidth:1,normalRangeMin:void 0,normalRangeMax:void 0,normalRangeColor:"#ccc",drawNormalOnTop:!0,chartRangeMin:void 0,chartRangeMax:void 0,chartRangeMinX:void 0,chartRangeMaxX:void 0},bar:{barColor:"#fc5c5c",negBarColor:"#97b552",stackedBarColor:["#2ec7c9","#fc5c5c","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],zeroColor:void 0,nullColor:void 0,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:void 0,chartRangeMin:void 0,chartRangeClip:!1,colorMap:void 0},column:{barColor:"#fc5c5c",negBarColor:"#97b552",stackedBarColor:["#2ec7c9","#fc5c5c","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],zeroColor:void 0,nullColor:void 0,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:void 0,chartRangeMin:void 0,chartRangeClip:!1,colorMap:void 0},tristate:{barWidth:4,barSpacing:1,posBarColor:"#fc5c5c",negBarColor:"#97b552",zeroBarColor:"#999",colorMap:{}},discrete:{lineHeight:"auto",thresholdColor:"#fc5c5c",thresholdValue:0,chartRangeMax:void 0,chartRangeMin:void 0,chartRangeClip:!1},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff","#6D87FF","#5876FF","#4465FF","#2F54FF","#1A43FF","#0532FF"],base:void 0},pie:{offset:0,sliceColors:["#2ec7c9","#fc5c5c","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],borderWidth:0,borderColor:"#000"},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#5E5E5E",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:void 0,targetColor:"#4a2",chartRangeMax:void 0,chartRangeMin:void 0}},line:{type:"line",init:function(e,n,t,l,a){this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null},getRegion:function(e,n,t){let l,a=this.regionMap;for(l=a.length;l--;)if(a[l]!==null&&n>=a[l][0]&&n<=a[l][1])return a[l][2]},getCurrentRegionFields:function(){let e=this.currentRegion;return{isNull:this.yvalues[e]===null,x:this.xvalues[e],y:this.yvalues[e],color:this.options.get("lineColor"),fillColor:this.options.get("fillColor"),offset:e}},renderHighlight:function(){let e=this.currentRegion,n=this.target,t=this.vertices[e],l=this.options,a=l.get("spotRadius"),o=l.get("highlightSpotColor"),s=l.get("highlightLineColor"),u,f;!t||(a&&o&&(u=n.drawCircle(t[0],t[1],a,void 0,o),this.highlightSpotId=u.id,n.insertAfterShape(this.lastShapeId,u)),s&&(f=n.drawLine(t[0],this.canvasTop,t[0],this.canvasTop+this.canvasHeight,s),this.highlightLineId=f.id,n.insertAfterShape(this.lastShapeId,f)))},removeHighlight:function(){let e=this.target;this.highlightSpotId&&(e.removeShapeId(this.highlightSpotId),this.highlightSpotId=null),this.highlightLineId&&(e.removeShapeId(this.highlightLineId),this.highlightLineId=null)},scanValues:function(){let e=this.values,n=e.length,t=this.xvalues,l=this.yvalues,a=this.yminmax,o,s,u,f,d;for(o=0;o<n;o++)s=e[o],u=typeof e[o]=="string",f=typeof e[o]=="object"&&e[o]instanceof Array,d=u&&e[o].split(":"),u&&d.length===2?(t.push(Number(d[0])),l.push(Number(d[1])),a.push(Number(d[1]))):f?(t.push(s[0]),l.push(s[1]),a.push(s[1])):(t.push(o),e[o]===null||e[o]==="null"?l.push(null):(l.push(Number(s)),a.push(Number(s))));this.options.get("xvalues")&&(t=this.options.get("xvalues")),this.maxy=this.maxyorg=Math.max.apply(Math,a),this.miny=this.minyorg=Math.min.apply(Math,a),this.maxx=Math.max.apply(Math,t),this.minx=Math.min.apply(Math,t),this.xvalues=t,this.yvalues=l,this.yminmax=a},processRangeOptions:function(){let e=this.options,n=e.get("normalRangeMin"),t=e.get("normalRangeMax");n!==void 0&&(n<this.miny&&(this.miny=n),t>this.maxy&&(this.maxy=t)),e.get("chartRangeMin")!==void 0&&(e.get("chartRangeClip")||e.get("chartRangeMin")<this.miny)&&(this.miny=e.get("chartRangeMin")),e.get("chartRangeMax")!==void 0&&(e.get("chartRangeClip")||e.get("chartRangeMax")>this.maxy)&&(this.maxy=e.get("chartRangeMax")),e.get("chartRangeMinX")!==void 0&&(e.get("chartRangeClipX")||e.get("chartRangeMinX")<this.minx)&&(this.minx=e.get("chartRangeMinX")),e.get("chartRangeMaxX")!==void 0&&(e.get("chartRangeClipX")||e.get("chartRangeMaxX")>this.maxx)&&(this.maxx=e.get("chartRangeMaxX"))},drawNormalRange:function(e,n,t,l,a){let o=this.options.get("normalRangeMin"),s=this.options.get("normalRangeMax"),u=n+Math.round(t-t*((s-this.miny)/a)),f=Math.round(t*(s-o)/a);f==0&&o==s&&(f=1),this.target.drawRect(e,u,l,f,void 0,this.options.get("normalRangeColor")).append()},render:function(e,n){this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null,this.values=n;let t=this.options,l=this.target,a=e.mergedOptions.width,o=e.mergedOptions.height,s=this.vertices,u=t.get("spotRadius"),f=this.regionMap,d,m,g,y,v,b,k,w,x,C,S,_,T,A,R,I,F,z,M,E,N,L,O,V,q;if(this.scanValues(),this.processRangeOptions(),O=this.xvalues,V=this.yvalues,!(!this.yminmax.length||this.yvalues.length<2)){for(y=v=0,d=this.maxx-this.minx==0?1:this.maxx-this.minx,m=this.maxy-this.miny==0?1:this.maxy-this.miny,g=this.yvalues.length-1,u&&(a<u*4||o<u*4)&&(u=0),u&&(N=t.get("highlightSpotColor")&&!t.get("disableInteraction"),(N||t.get("minSpotColor")||t.get("spotColor")&&V[g]===this.miny)&&(o-=Math.ceil(u)),(N||t.get("maxSpotColor")||t.get("spotColor")&&V[g]===this.maxy)&&(o-=Math.ceil(u),y+=Math.ceil(u)),(N||(t.get("minSpotColor")||t.get("maxSpotColor"))&&(V[0]===this.miny||V[0]===this.maxy))&&(v+=Math.ceil(u),a-=Math.ceil(u)),(N||t.get("spotColor")||t.get("minSpotColor")||t.get("maxSpotColor")&&(V[g]===this.miny||V[g]===this.maxy))&&(a-=Math.ceil(u))),o--,t.get("normalRangeMin")!==void 0&&!t.get("drawNormalOnTop")&&this.drawNormalRange(v,y,o,a,m),k=[],w=[k],A=R=null,I=V.length,q=0;q<I;q++)x=O[q],S=O[q+1],C=V[q],_=v+Math.round((x-this.minx)*(a/d)),T=q<I-1?v+Math.round((S-this.minx)*(a/d)):a,R=_+(T-_)/2,f[q]=[A||0,R,q],A=R,C===null?q&&(V[q-1]!==null&&(k=[],w.push(k)),s.push(null)):(C<this.miny&&(C=this.miny),C>this.maxy&&(C=this.maxy),k.length||k.push([_,y+o]),b=[_,y+Math.round(o-o*((C-this.miny)/m))],k.push(b),s.push(b));for(F=[],z=[],M=w.length,q=0;q<M;q++)k=w[q],k.length&&(t.get("fillColor")&&(k.push([k[k.length-1][0],y+o]),z.push(k.slice(0)),k.pop()),k.length>2&&(k[0]=[k[0][0],k[1][1]]),F.push(k));for(M=z.length,q=0;q<M;q++)l.drawShape(z[q],t.get("fillColor"),t.get("fillColor")).append();for(M=F.length,q=0;q<M;q++)l.drawShape(F[q],t.get("lineColor"),void 0,t.get("lineWidth")).append();if(t.get("normalRangeMin")!==void 0&&t.get("drawNormalOnTop")&&this.drawNormalRange(v,y,o,a,m),u&&t.get("valueSpots"))for(E=t.get("valueSpots"),E.get===void 0&&(E=new Ni(E)),q=0;q<I;q++)L=E.get(V[q]),L&&l.drawCircle(v+Math.round((O[q]-this.minx)*(a/d)),y+Math.round(o-o*((V[q]-this.miny)/m)),u,void 0,L).append();u&&t.get("spotColor")&&V[g]!==null&&l.drawCircle(v+Math.round((O[O.length-1]-this.minx)*(a/d)),y+Math.round(o-o*((V[g]-this.miny)/m)),u,void 0,t.get("spotColor")).append(),this.maxy!==this.minyorg&&(u&&t.get("minSpotColor")&&(x=O[$.inArray(this.minyorg,V)],l.drawCircle(v+Math.round((x-this.minx)*(a/d)),y+Math.round(o-o*((this.minyorg-this.miny)/m)),u,void 0,t.get("minSpotColor")).append()),u&&t.get("maxSpotColor")&&(x=O[$.inArray(this.maxyorg,V)],l.drawCircle(v+Math.round((x-this.minx)*(a/d)),y+Math.round(o-o*((this.maxyorg-this.miny)/m)),u,void 0,t.get("maxSpotColor")).append()))}}},bar:{type:"bar",init:function(e,n){let t=this.options,l=e.mergedOptions.height,a=e.mergedOptions.width;this.canvasWidth=e.mergedOptions.height,this.canvasHeight=e.mergedOptions.width;let o=parseInt(t.get("barWidth"),10),s=parseInt(t.get("barSpacing"),10),u=t.get("chartRangeMin"),f=t.get("chartRangeMax"),d=t.get("chartRangeClip"),m=Infinity,g=-Infinity,y,v,b,k,w,x,C,S,_,T,A,R,I,F,z,M,E,N,L,O,V,q,W;for(this.values=n,x=0,C=n.length;x<C;x++)O=n[x],y=typeof O=="string"&&O.indexOf(":")>-1,(y||$.isArray(O))&&(z=!0,y&&(O=n[x]=cc(O.split(":"))),O=md(O,null),v=Math.min.apply(Math,O),b=Math.max.apply(Math,O),v<m&&(m=v),b>g&&(g=b));this.stacked=z,this.regionShapes={},this.barWidth=Math.floor(l/n.length)-s,this.barSpacing=s,this.totalBarWidth=this.barWidth+s,this.width=l,d&&(I=u===void 0?-Infinity:u,F=f===void 0?Infinity:f),w=[],k=z?[]:w;let X=[],te=[];for(x=0,C=n.length;x<C;x++)if(z)for(M=n[x],n[x]=L=[],X[x]=0,k[x]=te[x]=0,E=0,N=M.length;E<N;E++)O=L[E]=d?Ei(M[E],I,F):M[E],O!==null&&(O>0&&(X[x]+=O),m<0&&g>0?O<0?te[x]+=Math.abs(O):k[x]+=O:k[x]+=Math.abs(O),w.push(O));else O=d?Ei(n[x],I,F):n[x],O=n[x]=sc(O),O!==null&&w.push(O);this.max=R=Math.max.apply(Math,w),this.min=A=Math.min.apply(Math,w),this.stackMax=g=z?Math.max.apply(Math,X):R,this.stackMin=m=z?Math.min.apply(Math,w):A,t.get("chartRangeMin")!==void 0&&(t.get("chartRangeClip")||t.get("chartRangeMin")<A)&&(A=t.get("chartRangeMin")),t.get("chartRangeMax")!==void 0&&(t.get("chartRangeClip")||t.get("chartRangeMax")>R)&&(R=t.get("chartRangeMax")),this.zeroAxis=_=t.get("zeroAxis",!0),A<=0&&R>=0&&_?T=0:_==!1?T=A:A>0?T=0:T=R,this.xaxisOffset=T,S=z?Math.max.apply(Math,k)+Math.max.apply(Math,te):R-T,this.canvasHeightEf=_&&A<0?this.canvasHeight-2:this.canvasHeight-1,this.isNeg=!1,A<T?(V=Math.floor(this.canvasHeight/2),this.isNeg=!0,V!==Math.ceil(V)&&(this.canvasHeightEf-=2,V=Math.ceil(V))):V=0,this.yoffset=V,$.isArray(t.get("colorMap"))?(this.colorMapByIndex=t.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=t.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===void 0&&(this.colorMapByValue=new Ni(this.colorMapByValue))),this.range=S},getRegion:function(e,n,t){let l=Math.floor(n/this.totalBarWidth);return l<0||l>=this.values.length?void 0:l},getCurrentRegionFields:function(){let e=this.currentRegion,n=ensureArray(this.values[e]),t=[],l,a;for(a=n.length;a--;)l=n[a],t.push({isNull:l===null,value:l,color:this.calcColor(a,l,e),offset:e});return t},calcColor:function(e,n,t){let l=this.colorMapByIndex,a=this.colorMapByValue,o=this.options,s,u;return this.stacked?s=o.get("stackedBarColor"):s=n<0?o.get("negBarColor"):o.get("barColor"),n===0&&o.get("zeroColor")!==void 0&&(s=o.get("zeroColor")),a&&(u=a.get(n))?s=u:l&&l.length>t&&(s=l[t]),$.isArray(s)?s[e%s.length]:s},renderRegion:function(e,n){let t=this.values[e],l=this.options,a=this.xaxisOffset,o=[],s=this.range,u=this.stacked,f=this.target,d=e*this.totalBarWidth,m=this.canvasHeightEf,g=this.yoffset,y,v,b,k,w,x,C,S,_,T;if(t=$.isArray(t)?t:[t],C=t.length,S=t[0],k=_o(null,t),T=_o(a,t,!0),k)return l.get("nullColor")?(b=n?l.get("nullColor"):this.calcHighlightColor(l.get("nullColor"),l),y=g>0?g-1:g,f.drawRect(y,d,0,this.barWidth-1,b,b)):void 0;for(w=g,this.isNeg&&(m=Math.floor(m/2)),x=0;x<C;x++){if(S=t[x],u&&S===a){if(!T||_)continue;_=!0}s>0?v=Math.floor(m*(Math.abs(S-a)/s)):v=m,S<a||S===a&&g===0?(y=w-v,w+=v):u?(y=g,g+=v):(y=g,g-=v),b=this.calcColor(x,S,e),n&&(b=this.calcHighlightColor(b,l)),o.push(f.drawRect(y,d,v-1,this.barWidth-1,b,b))}return o.length===1?o[0]:o}},column:{type:"column",init:function(e,n){let t=this.options,l=e.mergedOptions.width,a=e.mergedOptions.height;this.canvasWidth=e.mergedOptions.width,this.canvasHeight=e.mergedOptions.height;let o=parseInt(t.get("barWidth"),10),s=parseInt(t.get("barSpacing"),10),u=t.get("chartRangeMin"),f=t.get("chartRangeMax"),d=t.get("chartRangeClip"),m=Infinity,g=-Infinity,y,v,b,k,w,x,C,S,_,T,A,R,I,F,z,M,E,N,L,O,V,q,W;for(this.values=n,x=0,C=n.length;x<C;x++)O=n[x],y=typeof O=="string"&&O.indexOf(":")>-1,(y||$.isArray(O))&&(z=!0,y&&(O=n[x]=cc(O.split(":"))),O=md(O,null),v=Math.min.apply(Math,O),b=Math.max.apply(Math,O),v<m&&(m=v),b>g&&(g=b));this.stacked=z,this.regionShapes={},this.barWidth=Math.floor(l/n.length)-s,this.barSpacing=s,this.totalBarWidth=this.barWidth+s,this.width=l,d&&(I=u===void 0?-Infinity:u,F=f===void 0?Infinity:f),w=[],k=z?[]:w;let X=[],te=[];for(x=0,C=n.length;x<C;x++)if(z)for(M=n[x],n[x]=L=[],X[x]=0,k[x]=te[x]=0,E=0,N=M.length;E<N;E++)O=L[E]=d?Ei(M[E],I,F):M[E],O!==null&&(O>0&&(X[x]+=O),m<0&&g>0?O<0?te[x]+=Math.abs(O):k[x]+=O:k[x]+=Math.abs(O),w.push(O));else O=d?Ei(n[x],I,F):n[x],O=n[x]=sc(O),O!==null&&w.push(O);this.max=R=Math.max.apply(Math,w),this.min=A=Math.min.apply(Math,w),this.stackMax=g=z?Math.max.apply(Math,X):R,this.stackMin=m=z?Math.min.apply(Math,w):A,t.get("chartRangeMin")!==void 0&&(t.get("chartRangeClip")||t.get("chartRangeMin")<A)&&(A=t.get("chartRangeMin")),t.get("chartRangeMax")!==void 0&&(t.get("chartRangeClip")||t.get("chartRangeMax")>R)&&(R=t.get("chartRangeMax")),this.zeroAxis=_=t.get("zeroAxis",!0),A<=0&&R>=0&&_?T=0:_==!1?T=A:A>0?T=0:T=R,this.xaxisOffset=T,S=z?Math.max.apply(Math,k)+Math.max.apply(Math,te):R-T,this.canvasHeightEf=_&&A<0?this.canvasHeight-2:this.canvasHeight-1,this.isNeg=!1,A<T?(V=Math.floor(this.canvasHeight/2),this.isNeg=!0,V!==Math.ceil(V)&&(this.canvasHeightEf-=2,V=Math.ceil(V))):V=this.canvasHeight,this.yoffset=V,$.isArray(t.get("colorMap"))?(this.colorMapByIndex=t.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=t.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===void 0&&(this.colorMapByValue=new Ni(this.colorMapByValue))),this.range=S},getRegion:function(e,n,t){let l=Math.floor(n/this.totalBarWidth);return l<0||l>=this.values.length?void 0:l},getCurrentRegionFields:function(){let e=this.currentRegion,n=ensureArray(this.values[e]),t=[],l,a;for(a=n.length;a--;)l=n[a],t.push({isNull:l===null,value:l,color:this.calcColor(a,l,e),offset:e});return t},calcColor:function(e,n,t){let l=this.colorMapByIndex,a=this.colorMapByValue,o=this.options,s,u;return this.stacked?s=o.get("stackedBarColor"):s=n<0?o.get("negBarColor"):o.get("barColor"),n===0&&o.get("zeroColor")!==void 0&&(s=o.get("zeroColor")),a&&(u=a.get(n))?s=u:l&&l.length>t&&(s=l[t]),$.isArray(s)?s[e%s.length]:s},renderRegion:function(e,n){let t=this.values[e],l=this.options,a=this.xaxisOffset,o=[],s=this.range,u=this.stacked,f=this.target,d=e*this.totalBarWidth,m=this.canvasHeightEf,g=this.yoffset,y,v,b,k,w,x,C,S,_,T;if(t=$.isArray(t)?t:[t],C=t.length,S=t[0],k=_o(null,t),T=_o(a,t,!0),k)return l.get("nullColor")?(b=n?l.get("nullColor"):this.calcHighlightColor(l.get("nullColor"),l),y=g>0?g-1:g,f.drawRect(d,y,this.barWidth-1,0,b,b)):void 0;for(w=g,this.isNeg&&(m=Math.floor(m/2)),x=0;x<C;x++){if(S=t[x],u&&S===a){if(!T||_)continue;_=!0}s>0?v=Math.floor(m*(Math.abs(S-a)/s)):v=m,S<a||S===a&&g===0?(y=w,w+=v):(y=g-v,g-=v),b=this.calcColor(x,S,e),n&&(b=this.calcHighlightColor(b,l)),o.push(f.drawRect(d,y,this.barWidth-1,v-1,b,b))}return o.length===1?o[0]:o}},tristate:{type:"tristate",init:function(e,n){let t=this.options,l=e.mergedOptions.width,a=e.mergedOptions.height;this.canvasWidth=e.mergedOptions.width,this.canvasHeight=e.mergedOptions.height;let o=parseInt(t.get("barWidth"),10),s=parseInt(t.get("barSpacing"),10);this.regionShapes={},this.barWidth=o,this.barSpacing=s,this.totalBarWidth=o+s,this.values=$.map(n,Number),this.width=l=n.length*o+(n.length-1)*s,$.isArray(t.get("colorMap"))?(this.colorMapByIndex=t.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=t.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===void 0&&(this.colorMapByValue=new Ni(this.colorMapByValue)))},getRegion:function(e,n,t){return Math.floor(n/this.totalBarWidth)},getCurrentRegionFields:function(){let e=this.currentRegion;return{isNull:this.values[e]===void 0,value:this.values[e],color:this.calcColor(this.values[e],e),offset:e}},calcColor:function(e,n){let t=this.values,l=this.options,a=this.colorMapByIndex,o=this.colorMapByValue,s,u;return o&&(u=o.get(e))?s=u:a&&a.length>n?s=a[n]:t[n]<0?s=l.get("negBarColor"):t[n]>0?s=l.get("posBarColor"):s=l.get("zeroBarColor"),s},renderRegion:function(e,n){let t=this.values,l=this.options,a=this.target,o,s,u,f,d,m;if(o=this.canvasHeight,u=Math.round(o/2),f=e*this.totalBarWidth,t[e]<0?(d=u,s=u-1):t[e]>0?(d=0,s=u-1):(d=u-1,s=2),m=this.calcColor(t[e],e),m!==null)return n&&(m=this.calcHighlightColor(m,l)),a.drawRect(f,d,this.barWidth-1,s-1,m,m)}},discrete:{type:"discrete",init:function(e,n){let t=this.options,l=e.mergedOptions.width,a=e.mergedOptions.height;this.canvasWidth=e.mergedOptions.width,this.canvasHeight=e.mergedOptions.height,this.regionShapes={},this.values=n=$.map(n,Number),this.min=Math.min.apply(Math,n),this.max=Math.max.apply(Math,n),this.range=this.max-this.min,this.width=l,this.interval=Math.floor(l/n.length),this.itemWidth=l/n.length,t.get("chartRangeMin")!==void 0&&(t.get("chartRangeClip")||t.get("chartRangeMin")<this.min)&&(this.min=t.get("chartRangeMin")),t.get("chartRangeMax")!==void 0&&(t.get("chartRangeClip")||t.get("chartRangeMax")>this.max)&&(this.max=t.get("chartRangeMax")),this.target&&(this.lineHeight=t.get("lineHeight")==="auto"?Math.round(this.canvasHeight*.3):t.get("lineHeight"))},getRegion:function(e,n,t){return Math.floor(n/this.itemWidth)},getCurrentRegionFields:function(){let e=this.currentRegion;return{isNull:this.values[e]===void 0,value:this.values[e],offset:e}},renderRegion:function(e,n){let t=this.values,l=this.options,a=this.min,o=this.max,s=this.range,u=this.interval,f=this.target,d=this.canvasHeight,m=this.lineHeight,g=d-m,y,v,b,k;return v=Ei(t[e],a,o),k=e*u,y=Math.round(g-g*((v-a)/s)),b=l.get("thresholdColor")&&v<l.get("thresholdValue")?l.get("thresholdColor"):l.get("lineColor"),n&&(b=this.calcHighlightColor(b,l)),this.target.drawRect(k,y,u<=2?1:u-2,m,b,b)}},bullet:{type:"bullet",init:function(e,n){let t=this.options,l=e.mergedOptions.width,a=e.mergedOptions.height;this.canvasWidth=e.mergedOptions.width,this.canvasHeight=e.mergedOptions.height;let o,s,u;this.values=n=cc(n),u=n.slice(),u[0]=u[0]===null?u[2]:u[0],u[1]=n[1]===null?u[2]:u[1],o=Math.min.apply(Math,n),s=Math.max.apply(Math,n),t.get("base")===void 0?o=o<0?o:0:o=t.get("base"),this.min=o,this.max=s,this.range=s-o,this.shapes={},this.valueShapes={},this.regiondata={},this.width=l,n.length||(this.disabled=!0)},getRegion:function(e,n,t){let l=this.target.getShapeAt(e,n,t);return l!==void 0&&this.shapes[l]!==void 0?this.shapes[l]:void 0},getCurrentRegionFields:function(){let e=this.currentRegion;return{fieldkey:e.substr(0,1),value:this.values[e.substr(1)],region:e}},changeHighlight:function(e){let n=this.currentRegion,t=this.valueShapes[n],l;switch(delete this.shapes[t],n.substr(0,1)){case"r":l=this.renderRange(n.substr(1),e);break;case"p":l=this.renderPerformance(e);break;case"t":l=this.renderTarget(e);break}this.valueShapes[n]=l.id,this.shapes[l.id]=n,this.target.replaceWithShape(t,l)},renderRange:function(e,n){let t=this.values[e],l=Math.round(this.canvasWidth*((t-this.min)/this.range)),a=this.options.get("rangeColors")[e-2];return n&&(a=this.calcHighlightColor(a,this.options)),this.target.drawRect(0,0,l-1,this.canvasHeight-1,a,a)},renderPerformance:function(e){let n=this.values[1],t=Math.round(this.canvasWidth*((n-this.min)/this.range)),l=this.options.get("performanceColor");return e&&(l=this.calcHighlightColor(l,this.options)),this.target.drawRect(0,Math.round(this.canvasHeight*.3),t-1,Math.round(this.canvasHeight*.4)-1,l,l)},renderTarget:function(e){let n=this.values[0],t=Math.round(this.canvasWidth*((n-this.min)/this.range)-this.options.get("targetWidth")/2),l=Math.round(this.canvasHeight*.1),a=this.canvasHeight-l*2,o=this.options.get("targetColor");return e&&(o=this.calcHighlightColor(o,this.options)),this.target.drawRect(t,l,this.options.get("targetWidth")-1,a-1,o,o)},render:function(e,n){this.init(e,n);let t=this.values.length,l=this.target,a,o;for(a=2;a<t;a++)o=this.renderRange(a).append(),this.shapes[o.id]="r"+a,this.valueShapes["r"+a]=o.id;this.values[1]!==null&&(o=this.renderPerformance().append(),this.shapes[o.id]="p1",this.valueShapes.p1=o.id),this.values[0]!==null&&(o=this.renderTarget().append(),this.shapes[o.id]="t0",this.valueShapes.t0=o.id)}},pie:{type:"pie",init:function(e,n){let t=this.options,l=e.mergedOptions.width,a=e.mergedOptions.height;this.canvasWidth=e.mergedOptions.width,this.canvasHeight=e.mergedOptions.height;let o=0,s;if(this.shapes={},this.valueShapes={},this.values=n=$.map(n,Number),t.get("width")==="auto"&&(this.width=this.height),n.length>0)for(s=n.length;s--;)o+=n[s];this.total=o,this.radius=Math.floor(Math.min(this.canvasWidth,this.canvasHeight)/2)},getRegion:function(e,n,t){let l=this.target.getShapeAt(e,n,t);return l!==void 0&&this.shapes[l]!==void 0?this.shapes[l]:void 0},getCurrentRegionFields:function(){let e=this.currentRegion;return{isNull:this.values[e]===void 0,value:this.values[e],percent:this.values[e]/this.total*100,color:this.options.get("sliceColors")[e%this.options.get("sliceColors").length],offset:e}},changeHighlight:function(e){let n=this.currentRegion,t=this.renderSlice(n,e),l=this.valueShapes[n];delete this.shapes[l],this.target.replaceWithShape(l,t),this.valueShapes[n]=t.id,this.shapes[t.id]=n},renderSlice:function(e,n){let t=this.target,l=this.options,a=this.radius,o=l.get("borderWidth"),s=l.get("offset"),u=2*Math.PI,f=this.values,d=this.total,m=s?2*Math.PI*(s/360):0,g,y,v,b,k;for(b=f.length,v=0;v<b;v++){if(g=m,y=m,d>0&&(y=m+u*(f[v]/d)),e===v)return k=l.get("sliceColors")[v%l.get("sliceColors").length],n&&(k=this.calcHighlightColor(k,l)),t.drawPieSlice(a,a,a-o,g,y,void 0,k);m=y}},render:function(e,n){this.init(e,n);let t=this.target,l=this.values,a=this.options,o=this.radius,s=a.get("borderWidth"),u,f;for(s&&t.drawCircle(o,o,Math.floor(o-s/2),a.get("borderColor"),void 0,s).append(),f=l.length;f--;)l[f]&&(u=this.renderSlice(f).append(),this.valueShapes[f]=u.id,this.shapes[u.id]=f)}},box:{type:"box",init:function(e,n){let t=this.options,l=e.mergedOptions.width,a=e.mergedOptions.height;this.canvasWidth=e.mergedOptions.width,this.canvasHeight=e.mergedOptions.height,this.values=$.map(n,Number),this.width=t.get("width")==="auto"?"4.0em":l,this.values.length||(this.disabled=1)},getRegion:function(){return 1},getCurrentRegionFields:function(){let e=[{field:"lq",value:this.quartiles[0]},{field:"med",value:this.quartiles[1]},{field:"uq",value:this.quartiles[2]}];return this.loutlier!==void 0&&e.push({field:"lo",value:this.loutlier}),this.routlier!==void 0&&e.push({field:"ro",value:this.routlier}),this.lwhisker!==void 0&&e.push({field:"lw",value:this.lwhisker}),this.rwhisker!==void 0&&e.push({field:"rw",value:this.rwhisker}),e},render:function(e,n){this.init(e,n);let t=this.target,l=this.values,a=l.length,o=this.options,s=this.canvasWidth,u=this.canvasHeight,f=o.get("chartRangeMin")===void 0?Math.min.apply(Math,l):o.get("chartRangeMin"),d=o.get("chartRangeMax")===void 0?Math.max.apply(Math,l):o.get("chartRangeMax"),m=0,g,y,v,b,k,w,x,C,S,_,T;if(o.get("raw"))o.get("showOutliers")&&l.length>5?(y=l[0],g=l[1],b=l[2],k=l[3],w=l[4],x=l[5],C=l[6]):(g=l[0],b=l[1],k=l[2],w=l[3],x=l[4]);else if(l.sort(function(A,R){return A-R}),b=oc(l,1),k=oc(l,2),w=oc(l,3),v=w-b,o.get("showOutliers")){for(g=x=void 0,S=0;S<a;S++)g===void 0&&l[S]>b-v*o.get("outlierIQR")&&(g=l[S]),l[S]<w+v*o.get("outlierIQR")&&(x=l[S]);y=l[0],C=l[a-1]}else g=l[0],x=l[a-1];this.quartiles=[b,k,w],this.lwhisker=g,this.rwhisker=x,this.loutlier=y,this.routlier=C,T=s/(d-f+1),o.get("showOutliers")&&(m=Math.ceil(o.get("spotRadius")),s-=2*Math.ceil(o.get("spotRadius")),T=s/(d-f+1),y<g&&t.drawCircle((y-f)*T+m,u/2,o.get("spotRadius"),o.get("outlierLineColor"),o.get("outlierFillColor")).append(),C>x&&t.drawCircle((C-f)*T+m,u/2,o.get("spotRadius"),o.get("outlierLineColor"),o.get("outlierFillColor")).append()),t.drawRect(Math.round((b-f)*T+m),Math.round(u*.1),Math.round((w-b)*T),Math.round(u*.8),o.get("boxLineColor"),o.get("boxFillColor")).append(),t.drawLine(Math.round((g-f)*T+m),Math.round(u/2),Math.round((b-f)*T+m),Math.round(u/2),o.get("lineColor")).append(),t.drawLine(Math.round((g-f)*T+m),Math.round(u/4),Math.round((g-f)*T+m),Math.round(u-u/4),o.get("whiskerColor")).append(),t.drawLine(Math.round((x-f)*T+m),Math.round(u/2),Math.round((w-f)*T+m),Math.round(u/2),o.get("lineColor")).append(),t.drawLine(Math.round((x-f)*T+m),Math.round(u/4),Math.round((x-f)*T+m),Math.round(u-u/4),o.get("whiskerColor")).append(),t.drawLine(Math.round((k-f)*T+m),Math.round(u*.1),Math.round((k-f)*T+m),Math.round(u*.9),o.get("medianColor")).append(),o.get("target")&&(_=Math.ceil(o.get("spotRadius")),t.drawLine(Math.round((o.get("target")-f)*T+m),Math.round(u/2-_),Math.round((o.get("target")-f)*T+m),Math.round(u/2+_),o.get("targetColor")).append(),t.drawLine(Math.round((o.get("target")-f)*T+m-_),Math.round(u/2),Math.round((o.get("target")-f)*T+m+_),Math.round(u/2),o.get("targetColor")).append())}},shapeCount:0,shapes:{},shapeseq:[],lastShapeId:null,mergedOptions:null,init:function(e,n){let t,l,a;n=n||{};let o=this;return l=this.defaultOption,a=l.common,t=l[n.type||a.type],o.shapeCount=0,o.shapes={},o.shapeseq=[],o.lastShapeId=null,o.mergedOptions=$.extend({},a,t,n),o.mergedOptions.width=o.mergedOptions.width,o.mergedOptions.height=o.mergedOptions.height,o[o.mergedOptions.type].render(o,e),{shapes:o.shapes,shapeseq:o.shapeseq,offsetX:o.mergedOptions.offsetX,offsetY:o.mergedOptions.offsetY,pixelWidth:o.mergedOptions.width,pixelHeight:o.mergedOptions.height}},_getContext:function(e,n,t){let l;return this.ctx!=null?l=this.ctx:l=$("#"+this._canvasID).get(0).getContext("2d"),e!==void 0&&(l.strokeStyle=e),l.lineWidth=t===void 0?1:t,n!==void 0&&(l.fillStyle=n),l},reset:function(){this._getContext().clearRect(0,0,this.pixelWidth,this.pixelHeight),this.shapes={},this.shapeseq=[],this.currentTargetShapeId=void 0},_drawShape:function(e,n,t,l,a){let o=this._getContext(t,l,a),s,u;for(o.beginPath(),o.moveTo(n[0][0]+.5+this.offsetX,n[0][1]+.5+this.offsetY),s=1,u=n.length;s<u;s++)o.lineTo(n[s][0]+.5+this.offsetX,n[s][1]+.5+this.offsetY);t!==void 0&&o.stroke(),l!==void 0&&o.fill(),this.targetX!==void 0&&this.targetY!==void 0&&o.isPointInPath(this.targetX+this.offsetX,this.targetY+this.offsetY)&&(this.currentTargetShapeId=e)},_drawCircle:function(e,n,t,l,a,o,s){let u=this._getContext(a,o,s);u.beginPath(),n+=this.offsetX,t+=this.offsetY,u.arc(n,t,l,0,2*Math.PI,!1),this.targetX!==void 0&&this.targetY!==void 0&&u.isPointInPath(this.targetX+this.offsetX,this.targetY+this.offsetY)&&(this.currentTargetShapeId=e),a!==void 0&&u.stroke(),o!==void 0&&u.fill()},_drawPieSlice:function(e,n,t,l,a,o,s,u){let f=this._getContext(s,u);n+=this.offsetX,t+=this.offsetY,f.beginPath(),f.moveTo(n,t),f.arc(n,t,l,a,o,!1),f.lineTo(n,t),f.closePath(),s!==void 0&&f.stroke(),u&&f.fill(),this.targetX!==void 0&&this.targetY!==void 0&&f.isPointInPath(this.targetX+this.offsetX,this.targetY+this.offsetY)&&(this.currentTargetShapeId=e)},_drawRect:function(e,n,t,l,a,o,s){return this._drawShape(e,[[n,t],[n+l,t],[n+l,t+a],[n,t+a],[n,t]],o,s)},appendShape:function(e){return this.shapes[e.id]=e,this.shapeseq.push(e.id),this.lastShapeId=e.id,e.id},replaceWithShape:function(e,n){let t=this.shapeseq,l;for(this.shapes[n.id]=n,l=t.length;l--;)t[l]==e&&(t[l]=n.id);delete this.shapes[e]},replaceWithShapes:function(e,n){let t=this.shapeseq,l={},a,o,s;for(o=e.length;o--;)l[e[o]]=!0;for(o=t.length;o--;)a=t[o],l[a]&&(t.splice(o,1),delete this.shapes[a],s=o);for(o=n.length;o--;)t.splice(s,0,n[o].id),this.shapes[n[o].id]=n[o]},insertAfterShape:function(e,n){let t=this.shapeseq,l;for(l=t.length;l--;)if(t[l]===e){t.splice(l+1,0,n.id),this.shapes[n.id]=n;return}},removeShapeId:function(e){let n=this.shapeseq,t;for(t=n.length;t--;)if(n[t]===e){n.splice(t,1);break}delete this.shapes[e]},getShapeAt:function(e,n,t){return this.targetX=n,this.targetY=t,this.render(),this.currentTargetShapeId},_canvasID:"luckysheetTableContent",render:function(e,n,t,l,a,o,s,u){s==null&&(s="luckysheetTableContent"),this._canvasID=s,u!=null&&(this.ctx=u);let f=e.length,d=this._getContext(),m,g,y;for(this.offsetX=t,this.offsetY=l,this.pixelWidth=a,this.pixelHeight=o,y=0;y<f;y++)m=e[y],g=n[m],this["_draw"+g.type].apply(this,g.args)},drawLine:function(e,n,t,l,a,o){return this.drawShape([[e,n],[t,l]],a,o)},drawShape:function(e,n,t,l){return this._genShape("Shape",[e,n,t,l])},drawCircle:function(e,n,t,l,a,o){return this._genShape("Circle",[e,n,t,l,a,o])},drawPieSlice:function(e,n,t,l,a,o,s){return this._genShape("PieSlice",[e,n,t,l,a,o,s])},drawRect:function(e,n,t,l,a,o){return this._genShape("Rect",[e,n,t,l,a,o])},_genShape:function(e,n){let t=this.shapeCount++;n.unshift(t);let l={id:t,type:e,args:n};return this.shapes[t]=l,this.shapeseq.push(t),this.lastShapeId=t,{append:function(){return l},get:function(){return t}}}},pd={changeHighlight:function(e){let n=this.currentRegion,t=this.target,l=this.regionShapes[n],a;l&&(a=this.renderRegion(n,e),$.isArray(a)||$.isArray(l)?(t.replaceWithShapes(l,a),this.regionShapes[n]=$.map(a,function(o){return o.id})):(t.replaceWithShape(l,a),this.regionShapes[n]=a.id))},render:function(e,n){this.init(e,n);let t=this.values,l=this.target,a=this.regionShapes,o,s,u,f;for(u=t.length;u--;)if(o=this.renderRegion(u),o)if($.isArray(o)){for(s=[],f=o.length;f--;)o[f].append(),s.push(o[f].id);a[u]=s}else o.append(),a[u]=o.id;else a[u]=null}},sv={get:function(e){return Ar.mergedOptions[e]}},cv={drawLine:function(e,n,t,l,a,o){return Ar.drawLine(e,n,t,l,a,o)},drawShape:function(e,n,t,l){return Ar.drawShape(e,n,t,l)},drawCircle:function(e,n,t,l,a,o){return Ar.drawCircle(e,n,t,l,a,o)},drawPieSlice:function(e,n,t,l,a,o,s){return Ar.drawPieSlice(e,n,t,l,a,o,s)},drawRect:function(e,n,t,l,a,o){return Ar.drawRect(e,n,t,l,a,o)}};for(let e in Ar)e in{line:null,bar:null,column:null,tristate:null,discrete:null,bullet:null,pie:null,box:null}&&(Ar[e].options=sv,Ar[e].target=cv),e in{bar:null,column:null,tristate:null,discrete:null}&&(Ar[e].changeHighlight=pd.changeHighlight,Ar[e].render=pd.render);Jl=Ar});function ma(e,n,t){e==null&&(e=$("#luckysheet-cell-main").scrollTop()),n==null&&(n=h.luckysheetTableContentHW[1]),t==null&&(t=h.columnHeaderHeight);let l=$("#luckysheetTableContent").get(0).getContext("2d");l.save(),l.scale(h.devicePixelRatio,h.devicePixelRatio),l.clearRect(0,t,h.rowHeaderWidth-1,n),l.font=Zn(),l.textBaseline=Sl.textBaseline,l.fillStyle=Sl.fillStyle;let a,o;a=st(h.visibledatarow,e),o=st(h.visibledatarow,e+n),a==-1&&(a=0),o==-1&&(o=h.visibledatarow.length-1),l.save(),l.beginPath(),l.rect(0,t-1,h.rowHeaderWidth-1,n-2),l.clip();let s,u,f=.5,d;for(let m=a;m<=o;m++){m==0?u=-e-1:u=h.visibledatarow[m-1]-e-1,s=h.visibledatarow[m]-e;let g=a==m?-2:0,y=o==m?-2:0;if(!!Je.createHookFunction("rowTitleCellRenderBefore",m+1,{r:m,top:u+t+g,width:h.rowHeaderWidth-1,height:s-u+1+y-g},l)){if(!(h.config.rowhidden!=null&&h.config.rowhidden[m]!=null)){l.fillStyle="#ffffff",l.fillRect(0,u+t+g,h.rowHeaderWidth-1,s-u+1+y-g),l.fillStyle="#000000",l.save(),l.scale(h.zoomRatio,h.zoomRatio);let v=zr(m+1,l),b=(h.rowHeaderWidth-v.width)/2,k=u+(s-u)/2+t;l.fillText(m+1,b/h.zoomRatio,k/h.zoomRatio),l.restore()}l.beginPath(),l.moveTo(h.rowHeaderWidth-2+f,u+t-2),l.lineTo(h.rowHeaderWidth-2+f,s+t-2),l.lineWidth=1,l.strokeStyle=Sl.strokeStyle,l.stroke(),l.closePath(),h.config.rowhidden!=null&&h.config.rowhidden[m]==null&&h.config.rowhidden[m+1]!=null?(l.beginPath(),l.moveTo(-1,s+t-4+f),l.lineTo(h.rowHeaderWidth-1,s+t-4+f),l.closePath(),l.stroke()):(h.config.rowhidden==null||h.config.rowhidden[m]==null)&&(l.beginPath(),l.moveTo(-1,s+t-2+f),l.lineTo(h.rowHeaderWidth-1,s+t-2+f),l.closePath(),l.stroke()),h.config.rowhidden!=null&&h.config.rowhidden[m-1]!=null&&d!=null&&(l.beginPath(),l.moveTo(-1,d+t+f),l.lineTo(h.rowHeaderWidth-1,d+t+f),l.closePath(),l.stroke()),d=s,Je.createHookFunction("rowTitleCellRenderAfter",m+1,{r:m,top:u+t+g,width:h.rowHeaderWidth-1,height:s-u+1+y-g},l)}}l.restore(),l.restore()}function pa(e,n,t){e==null&&(e=$("#luckysheet-cell-main").scrollLeft()),n==null&&(n=h.luckysheetTableContentHW[0]),t==null&&(t=h.rowHeaderWidth);let l=$("#luckysheetTableContent").get(0).getContext("2d");l.save(),l.scale(h.devicePixelRatio,h.devicePixelRatio),l.clearRect(t,0,n,h.columnHeaderHeight-1),l.font=Zn(),l.textBaseline=Sl.textBaseline,l.fillStyle=Sl.fillStyle;let a,o;a=st(h.visibledatacolumn,e),o=st(h.visibledatacolumn,e+n),a==-1&&(a=0),o==-1&&(o=h.visibledatacolumn.length-1),l.save(),l.beginPath(),l.rect(t-1,0,n,h.columnHeaderHeight-1),l.clip();let s,u,f=.5,d;for(let m=a;m<=o;m++){m==0?u=-e:u=h.visibledatacolumn[m-1]-e,s=h.visibledatacolumn[m]-e;let g=tt(m);if(!!Je.createHookFunction("columnTitleCellRenderBefore",g,{c:m,left:u+t-1,width:s-u,height:h.columnHeaderHeight-1},l)){if(!(h.config.colhidden!=null&&h.config.colhidden[m]!=null)){l.fillStyle="#ffffff",l.fillRect(u+t-1,0,s-u,h.columnHeaderHeight-1),l.fillStyle="#000000",l.save(),l.scale(h.zoomRatio,h.zoomRatio);let y=zr(g,l),v=Math.round(u+(s-u)/2+t-y.width/2),b=Math.round(h.columnHeaderHeight/2);l.fillText(g,v/h.zoomRatio,b/h.zoomRatio),l.restore()}h.config.colhidden!=null&&h.config.colhidden[m]==null&&h.config.colhidden[m+1]!=null?(l.beginPath(),l.moveTo(s+t-4+f,0),l.lineTo(s+t-4+f,h.columnHeaderHeight-2),l.lineWidth=1,l.strokeStyle=Sl.strokeStyle,l.closePath(),l.stroke()):(h.config.colhidden==null||h.config.colhidden[m]==null)&&(l.beginPath(),l.moveTo(s+t-2+f,0),l.lineTo(s+t-2+f,h.columnHeaderHeight-2),l.lineWidth=1,l.strokeStyle=Sl.strokeStyle,l.closePath(),l.stroke()),h.config.colhidden!=null&&h.config.colhidden[m-1]!=null&&d!=null&&(l.beginPath(),l.moveTo(d+t+f,0),l.lineTo(d+t+f,h.columnHeaderHeight-2),l.closePath(),l.stroke()),l.beginPath(),l.moveTo(u+t-1,h.columnHeaderHeight-2+f),l.lineTo(s+t-1,h.columnHeaderHeight-2+f),l.stroke(),l.closePath(),d=s,Je.createHookFunction("columnTitleCellRenderAfter",g,{c:m,left:u+t-1,width:s-u,height:h.columnHeaderHeight-1},l)}}l.restore(),l.restore()}function nr(e,n,t,l,a,o,s,u,f){if(h.flowdata==null)return;let d=ve.getSheetByIndex();clearTimeout(h.measureTextCacheTimeOut),e==null&&(e=$("#luckysheet-cell-main").scrollLeft()),n==null&&(n=$("#luckysheet-cell-main").scrollTop()),t==null&&(t=h.luckysheetTableContentHW[0]),l==null&&(l=h.luckysheetTableContentHW[1]),a==null&&(a=h.rowHeaderWidth),o==null&&(o=h.columnHeaderHeight),s==null&&(s=0),u==null&&(u=0);let m=null;if(f==null)m=$("#luckysheetTableContent").get(0).getContext("2d");else if(P(f)=="object")try{m=f.get(0).getContext("2d")}catch(E){m=f}else m=$("#"+f).get(0).getContext("2d");m.save(),m.scale(h.devicePixelRatio,h.devicePixelRatio),m.clearRect(0,0,h.luckysheetTableContentHW[0],h.luckysheetTableContentHW[1]);let g,y,v,b;g=st(h.visibledatarow,n),y=st(h.visibledatarow,n+l),g==-1&&(g=0),g+=u,y==-1&&(y=h.visibledatarow.length-1),y+=u,y>=h.visibledatarow.length&&(y=h.visibledatarow.length-1),v=st(h.visibledatacolumn,e),b=st(h.visibledatacolumn,e+t),v==-1&&(v=0),v+=s,b==-1&&(b=h.visibledatacolumn.length-1),b+=s,b>=h.visibledatacolumn.length&&(b=h.visibledatacolumn.length-1);let k,w,x,C;g==0?k=0:k=h.visibledatarow[g-1],w=h.visibledatarow[y],v==0?x=0:x=h.visibledatacolumn[v-1],C=h.visibledatacolumn[b],m.fillStyle="#ffffff",m.fillRect(a-1,o-1,C-e,w-n),m.font=Zn(),m.fillStyle=Sl.fillStyle;let S=[],_={},T={},A=.5;Je.createHookFunction("cellAllRenderBefore",h.flowdata,d,m);for(let E=g;E<=y;E++){let N;E==0?N=-n-1:N=h.visibledatarow[E-1]-n-1;let L=h.visibledatarow[E]-n;if(!(h.config.rowhidden!=null&&h.config.rowhidden[E]!=null))for(let O=v;O<=b;O++){let V;O==0?V=-e:V=h.visibledatacolumn[O-1]-e;let q=h.visibledatacolumn[O]-e;if(h.config.colhidden!=null&&h.config.colhidden[O]!=null)continue;let W=h.defaultcollen;if(h.config.columnlen!=null&&h.config.columnlen[O]!=null&&(W=h.config.columnlen[O]),h.flowdata[E]!=null&&h.flowdata[E][O]!=null){let X=h.flowdata[E][O];if(P(X)=="object"&&"mc"in X)if(T[E+"_"+O]={start_r:N,start_c:V,end_r:L,end_c:q},"rs"in X.mc){let te="r"+E+"c"+O;_[te]=S.length}else{let te="r"+X.mc.r+"c"+X.mc.c,le=S[_[te]];le==null?(_[te]=S.length,S.push({r:E,c:O,start_c:V,start_r:N,end_r:L,end_c:q,firstcolumnlen:W})):(le.c==O&&(le.end_r+=L-N-1),le.r==E&&(le.end_c+=q-V,le.firstcolumnlen+=W));continue}}S.push({r:E,c:O,start_r:N,start_c:V,end_r:L,end_c:q,firstcolumnlen:W}),T[E+"_"+O]={start_r:N,start_c:V,end_r:L,end_c:q}}}let R=Ci(h.luckysheetfile[Z(h.currentSheetIndex)].dynamicArray),I=el.getComputeMap(),F=$e.getComputeMap(),z=uv(m,v,b,g,y),M=[];for(let E=0;E<S.length;E++){let N=S[E],L=N.r,O=N.c,V=N.start_r,q=N.start_c,W=N.end_r,X=N.end_c,te=N.firstcolumnlen;if(h.flowdata[L]!=null)if(h.flowdata[L][O]==null)hc(L,O,V,q,W,X,m,I,F,a,o,R,z,v,b,n,e,A);else{let le=h.flowdata[L][O],oe=null;if(typeof le=="object"&&"mc"in le?M.push(S[E]):oe=Hs(L,O),oe==null||oe.toString().length==0){hc(L,O,V,q,W,X,m,I,F,a,o,R,z,v,b,n,e,A);let se=ke.borderfix(h.flowdata,L,O),ce=[q+a+se[0],V+o+se[1],X-q-3+se[2],W-V-3-1+se[3]];gd(L,O,ce[0],ce[1],"luckysheetTableContent",m)}else L+"_"+O in R&&(oe=R[L+"_"+O].v),yd(L,O,V,q,W,X,oe,m,I,F,a,o,R,z,v,b,n,e,A)}}for(let E=0;E<M.length;E++){let N=M[E],L=N.r,O=N.c,V=N.start_r,q=N.start_c,W=N.end_r-1,X=N.end_c-1,te=N.firstcolumnlen,le=h.flowdata[L][O],oe=null,se=le.mc;oe=Hs(se.r,se.c),L=se.r,O=se.c;let ce=h.flowdata[L][O];if(O==0?q=-e:q=h.visibledatacolumn[O-1]-e,L==0?V=-n-1:V=h.visibledatarow[L-1]-n-1,W=h.visibledatarow[L+ce.mc.rs-1]-n,X=h.visibledatacolumn[O+ce.mc.cs-1]-e,oe==null||oe.toString().length==0){hc(L,O,V,q,W,X,m,I,F,a,o,R,z,v,b,n,e,A,!0);let he=ke.borderfix(h.flowdata,L,O),ue=[q+a+he[0],V+o+he[1],X-q-3+he[2],W-V-3-1+he[3]];gd(L,O,ue[0],ue[1],"luckysheetTableContent",m)}else L+"_"+O in R&&(oe=R[L+"_"+O].v),yd(L,O,V,q,W,X,oe,m,I,F,a,o,R,z,v,b,n,e,A,!0)}for(let E=g;E<=y;E++){let N;E==0?N=-n-1:N=h.visibledatarow[E-1]-n-1;let L=h.visibledatarow[E]-n;for(let O=v;O<=b;O++){let V;O==0?V=-e:V=h.visibledatacolumn[O-1]-e;let q=h.visibledatacolumn[O]-e;!!h.luckysheetcurrentisPivotTable&&Oe.drawPivotTable?((O==0||O==5)&&E<=11&&(m.beginPath(),m.moveTo(q-2+A+a,N+o),m.lineTo(q-2+A+a,L-2+A+o),m.lineWidth=1,m.strokeStyle="#000000",m.closePath(),m.stroke()),(E==2||E==11)&&O<=5&&(m.beginPath(),m.moveTo(V-1+a,L-2+A+o),m.lineTo(q-2+A+a,L-2+A+o),m.lineWidth=1,m.strokeStyle="#000000",m.closePath(),m.stroke()),E==6&&O==3&&(m.save(),m.font="bold 30px Arial",m.fillStyle="#626675",m.textAlign="center",m.fillText(Q().pivotTable.title,V+(q-V)/2+4+a,N+(L-N)/2-1+o),m.restore())):h.luckysheetcurrentisPivotTable&&O<Oe.pivotTableBoundary[1]&&E<Oe.pivotTableBoundary[0]&&(m.beginPath(),m.moveTo(q-2+A+a,N+o),m.lineTo(q-2+A+a,L-2+A+o),m.lineWidth=1,m.strokeStyle="#000000",m.closePath(),m.stroke(),m.beginPath(),m.moveTo(V-1+a,L-2+A+o),m.lineTo(q-2+a,L-2+A+o),m.lineWidth=1,m.strokeStyle="#000000",m.closePath(),m.stroke())}}if(h.config.borderInfo!=null&&h.config.borderInfo.length>0){let E=function(q,W,X,te,le,oe,se,ce,he){let ue=q,K=te-2+A+se,G=X+ce-1,ee=te-2+A+se,pe=le-2+A+ce;he.save(),ke.setLineDash(he,ue,"v",K,G,ee,pe),he.strokeStyle=W,he.stroke(),he.closePath(),he.restore()},N=function(q,W,X,te,le,oe,se,ce,he){let ue=q,K=oe-2+A+se,G=X+ce-1,ee=oe-2+A+se,pe=le-2+A+ce;he.save(),ke.setLineDash(he,ue,"v",K,G,ee,pe),he.strokeStyle=W,he.stroke(),he.closePath(),he.restore()},L=function(q,W,X,te,le,oe,se,ce,he){let ue=q,K=te-2+A+se,G=le-2+A+ce,ee=oe-2+A+se,pe=le-2+A+ce;he.save(),ke.setLineDash(he,ue,"h",K,G,ee,pe),he.strokeStyle=W,he.stroke(),he.closePath(),he.restore()},O=function(q,W,X,te,le,oe,se,ce,he){let ue=q,K=te-2+A+se,G=X-1+A+ce,ee=oe-2+A+se,pe=X-1+A+ce;he.save(),ke.setLineDash(he,ue,"h",K,G,ee,pe),he.strokeStyle=W,he.stroke(),he.closePath(),he.restore()},V=Ys(g,y,v,b);for(let q in V){let W=q.substr(0,q.indexOf("_")),X=q.substr(q.indexOf("_")+1);if(T[W+"_"+X]){let te=T[W+"_"+X].start_r,le=T[W+"_"+X].start_c,oe=T[W+"_"+X].end_r,se=T[W+"_"+X].end_c,ce=fc(z,W,X,v,b),he=V[q].l;he!=null&&(!ce.colIn||ce.stc==X)&&E(he.style,he.color,te,le,oe,se,a,o,m);let ue=V[q].r;ue!=null&&(!ce.colIn||ce.colLast)&&N(ue.style,ue.color,te,le,oe,se,a,o,m);let K=V[q].t;K!=null&&O(K.style,K.color,te,le,oe,se,a,o,m);let G=V[q].b;G!=null&&L(G.style,G.color,te,le,oe,se,a,o,m)}}}b==h.visibledatacolumn.length-1&&m.clearRect(C-e+a-1,o-1,h.ch_width-h.visibledatacolumn[b],w-n),m.restore(),h.measureTextCacheTimeOut=setTimeout(()=>{h.measureTextCache={},h.measureTextCellInfoCache={},h.cellOverflowMapCache={}},100)}function uv(e,n,t,l,a){let o={},s=h.flowdata;for(let u=l;u<=a;u++){if(s[u]==null)continue;if(h.cellOverflowMapCache[u]!=null){o[u]=h.cellOverflowMapCache[u];continue}let f=!1;for(let d=0;d<s[u].length;d++){let m=s[u][d];if(!(h.config.colhidden!=null&&h.config.colhidden[d]!=null)&&m!=null&&(!me(m.v)||_l(m))&&m.mc==null&&m.tb=="1"){let g=ke.checkstatus(s,u,d,"ht"),y=Sr(m,e,{r:u,c:d}),v=0;y!=null&&(v=y.textWidthAll);let b=d-1<0?0:h.visibledatacolumn[d-1],k=h.visibledatacolumn[d],w,x;if(k-b<v){if(g=="0"){let C=ja(u,d,d-1,"forward",g,v),S=ja(u,d,d+1,"backward",g,v);C.success?w=C.c:w=C.c+1,S.success?x=S.c:x=S.c-1}else if(g=="1"){let C=ja(u,d,d+1,"backward",g,v);w=d,C.success?x=C.c:x=C.c-1}else if(g=="2"){let C=ja(u,d,d-1,"forward",g,v);x=d,C.success?w=C.c:w=C.c+1}}else w=d,x=d;if((w<=t||x>=n)&&w<x){let C={r:u,stc:w,edc:x};o[u]==null&&(o[u]={}),o[u][d]=C,f=!0}}}f&&(h.cellOverflowMapCache[u]=o[u])}return o}function ja(e,n,t,l,a,o){let s=h.flowdata;if(l=="forward"&&t<0)return{success:!1,r:e,c:t};if(l=="backward"&&t>s[e].length-1)return{success:!1,r:e,c:t};let u=s[e][t];if(u!=null&&(!me(u.v)||u.mc!=null))return{success:!1,r:e,c:t};let f=n-1<0?0:h.visibledatacolumn[n-1],d=h.visibledatacolumn[n],m=o-(d-f);a=="0"?(f-=m/2,d+=m/2):a=="1"?d+=m:a=="2"&&(f-=m);let g=t-1<0?0:h.visibledatacolumn[t-1],y=h.visibledatacolumn[t];if(l=="forward")return f<g?ja(e,n,t-1,l,a,o):f<y?{success:!0,r:e,c:t}:{success:!1,r:e,c:t};if(l=="backward")return d>y?ja(e,n,t+1,l,a,o):d>g?{success:!0,r:e,c:t}:{success:!1,r:e,c:t}}function fc(e,n,t,l,a){let o=!1,s=!1,u,f,d,m;for(let g in e){for(let y in e[g]){u=g,f=y;let v=e[g][y];if(d=v.stc,m=v.edc,u==n&&t>=d&&t<=m&&(o=!0,t==m||t==a)){s=!0;break}}if(s)break}return{colIn:o,colLast:s,rowIndex:u,colIndex:f,stc:d,edc:m}}function bd(e,n,t){if(e==null)return;let l=e.values,a=t.pos_x,o=t.pos_y;if(l!=null){e.rotate!=0&&e.type!="verticalWrap"&&(n.save(),n.translate((a+e.textLeftAll)/h.zoomRatio,(o+e.textTopAll)/h.zoomRatio),n.rotate(-e.rotate*Math.PI/180),n.translate(-(e.textLeftAll+a)/h.zoomRatio,-(o+e.textTopAll)/h.zoomRatio));for(let s=0;s<l.length;s++){let u=l[s];u.inline===!0&&u.style!=null?(n.font=u.style.fontset,n.fillStyle=u.style.fc):n.font=u.style;let f=typeof u.content=="object"?u.content.m:u.content;if(n.fillText(f,(a+u.left)/h.zoomRatio,(o+u.top)/h.zoomRatio),u.cancelLine!=null){let d=u.cancelLine;n.beginPath(),n.moveTo(Math.floor((a+d.startX)/h.zoomRatio)+.5,Math.floor((o+d.startY)/h.zoomRatio)+.5),n.lineTo(Math.floor((a+d.endX)/h.zoomRatio)+.5,Math.floor((o+d.endY)/h.zoomRatio)+.5),n.lineWidth=Math.floor(d.fs/9),n.strokeStyle=n.fillStyle,n.stroke(),n.closePath()}if(u.underLine!=null){let d=u.underLine;for(let m=0;m<d.length;m++){let g=d[m];n.beginPath(),n.moveTo(Math.floor((a+g.startX)/h.zoomRatio)+.5,Math.floor((o+g.startY)/h.zoomRatio)),n.lineTo(Math.floor((a+g.endX)/h.zoomRatio)+.5,Math.floor((o+g.endY)/h.zoomRatio)+.5),n.lineWidth=Math.floor(g.fs/9),n.strokeStyle=n.fillStyle,n.stroke(),n.closePath()}}}e.rotate!=0&&e.type!="verticalWrap"&&n.restore()}}var gd,hc,yd,vd,Co=Ie(()=>{on();gr();Oa();uc();il();yr();Gt();Lr();fo();xa();Ft();mr();Kt();Va();Nt();ft();gn();Ll();Xe();bt();dl();gd=function(e,n,t,l,a,o){if(h.flowdata[e]==null||h.flowdata[e][n]==null)return;let s=h.flowdata[e][n].spl;if(s!=null){if(typeof s=="string"&&(s=new Function("return "+s)()),P(s)=="object"){let u=s,f=u.offsetX,d=u.offsetY;f=f==null?0:f,d=d==null?0:d,Jl.render(u.shapeseq,u.shapes,t+f,l+d,u.pixelWidth,u.pixelHeight,a,o)}else if(P(s)=="array"&&P(s[0])=="object")for(let u=0;u<s.length;u++){let f=s[u],d=f.offsetX,m=f.offsetY;d=d==null?0:d,m=m==null?0:m,Jl.render(f.shapeseq,f.shapes,t+d,l+m,f.pixelWidth,f.pixelHeight,a,o)}}},hc=function(e,n,t,l,a,o,s,u,f,d,m,g,y,v,b,k,w,x,C){let S=el.checksAF(e,n,u),_=$e.checksCF(e,n,f),T=ke.borderfix(h.flowdata,e,n),A=ke.checkstatus(h.flowdata,e,n,"bg");S!=null&&S[1]!=null&&(A=S[1]),_!=null&&_.cellColor!=null&&(A=_.cellColor),h.flowdata[e][n]!=null&&h.flowdata[e][n].tc!=null&&(A=h.flowdata[e][n].tc),A==null?s.fillStyle="#FFFFFF":s.fillStyle=A;let R=[l+d+T[0]+1,t+m+T[1]+1,o-l+T[2]-(C?1:0)-1,a-t+T[3]-1];if(!Je.createHookFunction("cellRenderBefore",h.flowdata[e][n],{r:e,c:n,start_r:R[1],start_c:R[0],end_r:R[3]+R[1],end_c:R[2]+R[0]},ve.getSheetByIndex(),s))return;if(s.fillRect(R[0],R[1],R[2],R[3]),e+"_"+n in g){let F=g[e+"_"+n].v;s.fillStyle="#000000";let z=Zn();s.font=z;let M=l+4+d,E=fr.luckysheetrefreshfixed(),N=a+m-2;s.textBaseline="bottom",s.fillText(F==null?"":F,M,N)}if(h.flowdata[e][n]!=null&&h.flowdata[e][n].ps!=null){let F=8*h.zoomRatio,z=8*h.zoomRatio;s.beginPath(),s.moveTo(o+d-1-F,t+m),s.lineTo(o+d-1,t+m),s.lineTo(o+d-1,t+m+z),s.fillStyle="#FC6666",s.fill(),s.closePath()}let I=fc(y,e,n,v,b);I.colLast&&vd(I.rowIndex,I.colIndex,I.stc,I.edc,s,k,w,d,m,u,f),(!I.colIn||I.colLast)&&!h.luckysheetcurrentisPivotTable&&h.showGridLines&&(s.beginPath(),s.moveTo(o+d-2+x,t+m),s.lineTo(o+d-2+x,a+m),s.lineWidth=1,s.strokeStyle=Sl.strokeStyle,s.stroke(),s.closePath()),!h.luckysheetcurrentisPivotTable&&h.showGridLines&&(s.beginPath(),s.moveTo(l+d-1,a+m-2+x),s.lineTo(o+d-1,a+m-2+x),s.lineWidth=1,s.strokeStyle=Sl.strokeStyle,s.stroke(),s.closePath()),Je.createHookFunction("cellRenderAfter",h.flowdata[e][n],{r:e,c:n,start_r:R[1],start_c:R[0],end_r:R[3]+R[1],end_c:R[2]+R[0]},ve.getSheetByIndex(),s)},yd=function(e,n,t,l,a,o,s,u,f,d,m,g,y,v,b,k,w,x,C,S){let _=h.flowdata[e][n],T=o-l-2,A=a-t-2,R=2,I=2,F=ke.checkstatus(h.flowdata,e,n,"ht"),z=ke.checkstatus(h.flowdata,e,n,"vt"),M=el.checksAF(e,n,f),E=$e.checksCF(e,n,d),N=ke.checkstatus(h.flowdata,e,n,"bg");M!=null&&M[1]!=null&&(N=M[1]),E!=null&&E.cellColor!=null&&(N=E.cellColor),N==null?u.fillStyle="#FFFFFF":u.fillStyle=N;let L=ke.borderfix(h.flowdata,e,n),O=[l+m+L[0]+1,t+g+L[1]+1,o-l+L[2]-(S?1:0)-1,a-t+L[3]+1];if(!Je.createHookFunction("cellRenderBefore",h.flowdata[e][n],{r:e,c:n,start_r:O[1],start_c:O[0],end_r:O[3]+O[1],end_c:O[2]+O[0]},ve.getSheetByIndex(),u))return;u.fillRect(O[0],O[1],O[2],O[3]);let V=Ye.dataVerification;if(V!=null&&V[e+"_"+n]!=null&&!Ye.validateCellData(s,V[e+"_"+n])){let X=5*h.zoomRatio,te=5*h.zoomRatio;u.beginPath(),u.moveTo(l+m,t+g),u.lineTo(l+m+X,t+g),u.lineTo(l+m,t+g+te),u.fillStyle="#FC6666",u.fill(),u.closePath()}if(_.ps!=null){let X=8*h.zoomRatio,te=8*h.zoomRatio;u.beginPath(),u.moveTo(o+m-X,t+g),u.lineTo(o+m,t+g),u.lineTo(o+m,t+g+te),u.fillStyle="#FC6666",u.fill(),u.closePath()}if(_.qp==1&&B(_.v)){let X=6*h.zoomRatio,te=6*h.zoomRatio;u.beginPath(),u.moveTo(l+m+X-1,t+g),u.lineTo(l+m-1,t+g),u.lineTo(l+m-1,t+g+te),u.fillStyle="#487f1e",u.fill(),u.closePath()}let q=!0,W=fc(v,e,n,b,k);if(_.tb=="1"&&W.colIn)W.colLast?vd(W.rowIndex,W.colIndex,W.stc,W.edc,u,w,x,m,g,f,d):q=!1;else if(V!=null&&V[e+"_"+n]!=null&&V[e+"_"+n].type=="checkbox"){let X=l+m,te=t+g+1;u.save(),u.beginPath(),u.rect(X,te,T,A),u.clip(),u.scale(h.zoomRatio,h.zoomRatio);let le=zr(s,u),oe=le.width+14,se=le.actualBoundingBoxDescent+le.actualBoundingBoxAscent,ce=X+R;F=="0"?ce=X+T/2-oe/2:F=="2"&&(ce=X+T-R-oe);let he=A>se?A:se,ue=te+he-I;u.textBaseline="bottom";let K=ue-13*h.zoomRatio;z=="0"?(ue=te+he/2,u.textBaseline="middle",K=ue-6*h.zoomRatio):z=="1"&&(ue=te+I,u.textBaseline="top",K=ue+1*h.zoomRatio),ce=ce/h.zoomRatio,ue=ue/h.zoomRatio,K=K/h.zoomRatio,u.lineWidth=1,u.strokeStyle="#000",u.strokeRect(ce,K,10,10),V[e+"_"+n].checked&&(u.beginPath(),u.lineTo(ce+1,K+6),u.lineTo(ce+4,K+9),u.lineTo(ce+9,K+2),u.stroke(),u.closePath()),u.fillStyle=ke.checkstatus(h.flowdata,e,n,"fc"),u.fillText(s==null?"":s,ce+14,ue),u.restore()}else{if(E!=null&&E.dataBar!=null&&E.dataBar.valueLen&&E.dataBar.valueLen.toString()!=="NaN"){let oe=l+m+R,se=t+g+I,ce=T-R*2,he=A-I*2,ue=E.dataBar.valueType,K=E.dataBar.valueLen,G=E.dataBar.format;if(ue=="minus"){let ee=E.dataBar.minusLen;if(G.length>1){let pe=u.createLinearGradient(oe+ce*ee*(1-K),se,oe+ce*ee,se);pe.addColorStop(0,"#ffffff"),pe.addColorStop(1,"#ff0000"),u.fillStyle=pe}else u.fillStyle="#ff0000";u.fillRect(oe+ce*ee*(1-K),se,ce*ee*K,he),u.beginPath(),u.moveTo(oe+ce*ee*(1-K),se),u.lineTo(oe+ce*ee*(1-K),se+he),u.lineTo(oe+ce*ee,se+he),u.lineTo(oe+ce*ee,se),u.lineTo(oe+ce*ee*(1-K),se),u.lineWidth=1,u.strokeStyle="#ff0000",u.stroke(),u.closePath()}else if(ue=="plus"){let ee=E.dataBar.plusLen;if(ee==1){if(G.length>1){let pe=u.createLinearGradient(oe,se,oe+ce*K,se);pe.addColorStop(0,G[0]),pe.addColorStop(1,G[1]),u.fillStyle=pe}else u.fillStyle=G[0];u.fillRect(oe,se,ce*K,he),u.beginPath(),u.moveTo(oe,se),u.lineTo(oe,se+he),u.lineTo(oe+ce*K,se+he),u.lineTo(oe+ce*K,se),u.lineTo(oe,se),u.lineWidth=1,u.strokeStyle=G[0],u.stroke(),u.closePath()}else{let pe=E.dataBar.minusLen;if(G.length>1){let ae=u.createLinearGradient(oe+ce*pe,se,oe+ce*pe+ce*ee*K,se);ae.addColorStop(0,G[0]),ae.addColorStop(1,G[1]),u.fillStyle=ae}else u.fillStyle=G[0];u.fillRect(oe+ce*pe,se,ce*ee*K,he),u.beginPath(),u.moveTo(oe+ce*pe,se),u.lineTo(oe+ce*pe,se+he),u.lineTo(oe+ce*pe+ce*ee*K,se+he),u.lineTo(oe+ce*pe+ce*ee*K,se),u.lineTo(oe+ce*pe,se),u.lineWidth=1,u.strokeStyle=G[0],u.stroke(),u.closePath()}}}let X=l+m,te=t+g+1;u.save(),u.beginPath(),u.rect(X,te,T,A),u.clip(),u.scale(h.zoomRatio,h.zoomRatio);let le=Sr(_,u,{cellWidth:T,cellHeight:A,space_width:R,space_height:I,r:e,c:n});if(E!=null&&E.icons!=null&&le.type=="plain"){let oe=E.icons.left,se=E.icons.top,ce=le.values[0],he=X+ce.left,ue=te+ce.top-le.textHeightAll;z=="0"?ue=te+A/2-le.textHeightAll/2:z=="1"?ue=te:z=="2"&&(ue=ue-le.desc),ue=ue/h.zoomRatio,he=he/h.zoomRatio,u.drawImage(wa,oe*42,se*32,32,32,X/h.zoomRatio,ue,le.textHeightAll/h.zoomRatio,le.textHeightAll/h.zoomRatio),F!="0"&&F!="2"&&(he=he+le.textHeightAll/h.zoomRatio)}u.fillStyle=ke.checkstatus(h.flowdata,e,n,"fc"),M!=null&&M[0]!=null&&(u.fillStyle=M[0]),E!=null&&E.textColor!=null&&(u.fillStyle=E.textColor),_.ct&&_.ct.fa&&_.ct.fa.indexOf("[Red]")>-1&&_.ct.t=="n"&&_.v<0&&(u.fillStyle="#ff0000"),bd(le,u,{pos_x:X,pos_y:te}),u.restore()}q&&!h.luckysheetcurrentisPivotTable&&h.showGridLines&&(u.beginPath(),u.moveTo(o+m-2+C,t+g),u.lineTo(o+m-2+C,a+g),u.lineWidth=1,u.strokeStyle=Sl.strokeStyle,u.stroke(),u.closePath()),!h.luckysheetcurrentisPivotTable&&h.showGridLines&&(u.beginPath(),u.moveTo(l+m-1,a+g-2+C),u.lineTo(o+m-1,a+g-2+C),u.lineWidth=1,u.strokeStyle=Sl.strokeStyle,u.stroke(),u.closePath()),Je.createHookFunction("cellRenderAfter",h.flowdata[e][n],{r:e,c:n,start_r:O[1],start_c:O[0],end_r:O[3]+O[1],end_c:O[2]+O[0]},ve.getSheetByIndex(),u)},vd=function(e,n,t,l,a,o,s,u,f,d,m){let g;e==0?g=-o-1:g=h.visibledatarow[e-1]-o-1;let y=h.visibledatarow[e]-o,v;t==0?v=-s:v=h.visibledatacolumn[t-1]-s;let b=h.visibledatacolumn[l]-s,k=h.flowdata[e][n],w=b-v-2,x=y-g-2,C=2,S=2,_=v+u,T=g+f+1,A=oa(k);a.font=A,a.save(),a.beginPath(),a.rect(_,T,w,x),a.clip(),a.scale(h.zoomRatio,h.zoomRatio);let R=Sr(k,a,{cellWidth:w,cellHeight:x,space_width:C,space_height:S,r:e,c:n}),I=el.checksAF(e,n,d),F=$e.checksCF(e,n,m);a.fillStyle=ke.checkstatus(h.flowdata,e,n,"fc"),I!=null&&I[0]!=null&&(a.fillStyle=I[0]),F!=null&&F.textColor!=null&&(a.fillStyle=F.textColor),bd(R,a,{pos_x:_,pos_y:T}),a.restore()}});var hv,Cl,Ua=Ie(()=>{ft();Kt();Yt();Ol();Ut();ll();Jt();Gt();Zt();Qt();dl();Vl();il();Nt();bt();Xe();hv={item:{linkType:"external",linkAddress:"",linkTooltip:""},hyperlink:null,createDialog:function(){let e=this,n=Q(),t=n.insertLink,l=n.toolbar,a=n.button;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-insertLink-dialog").remove();let o="";h.luckysheetfile.forEach(b=>{o+=`<option value="${b.name}">${b.name}</option>`});let s=`<div class="box"> |
| | | <div class="box-item"> |
| | | <label for="luckysheet-insertLink-dialog-linkText">${t.linkText}\uFF1A</label> |
| | | <input type="text" id="luckysheet-insertLink-dialog-linkText"/> |
| | |
| | | <label for="luckysheet-insertLink-dialog-linkTooltip">${t.linkTooltip}\uFF1A</label> |
| | | <input type="text" id="luckysheet-insertLink-dialog-linkTooltip" placeholder="${t.placeholder3}" /> |
| | | </div> |
| | | </div>`;$("body").append(_e(ft,{id:"luckysheet-insertLink-dialog",addclass:"luckysheet-insertLink-dialog",title:l.insertLink,content:s,botton:`<button id="luckysheet-insertLink-dialog-confirm" class="btn btn-primary">${a.confirm}</button> |
| | | <button class="btn btn-default luckysheet-model-close-btn">${a.cancel}</button>`,style:"z-index:100003"}));let u=$("#luckysheet-insertLink-dialog").find(".luckysheet-modal-dialog-content").css("min-width",350).end(),d=u.outerHeight(),f=u.outerWidth(),m=$(window).width(),g=$(window).height(),y=$(document).scrollLeft(),v=$(document).scrollTop();$("#luckysheet-insertLink-dialog").css({left:(m+y-f)/2,top:(g+v-d)/3}).show(),e.dataAllocation()},init:function(){let e=this,t=Q().insertLink;$(document).off("change.linkType").on("change.linkType","#luckysheet-insertLink-dialog-linkType",function(l){let a=this.value;$("#luckysheet-insertLink-dialog .show-box").hide(),$("#luckysheet-insertLink-dialog .show-box-"+a).show()}),$(document).off("click.confirm").on("click.confirm","#luckysheet-insertLink-dialog-confirm",function(l){let a=h.luckysheet_select_save[h.luckysheet_select_save.length-1],o=a.row_focus||a.row[0],s=a.column_focus||a.column[0],u=$("#luckysheet-insertLink-dialog-linkText").val(),d=$("#luckysheet-insertLink-dialog-linkType").val(),f=$("#luckysheet-insertLink-dialog-linkAddress").val(),m=$("#luckysheet-insertLink-dialog-linkSheet").val(),g=$("#luckysheet-insertLink-dialog-linkCell").val(),y=$("#luckysheet-insertLink-dialog-linkTooltip").val();if(d=="external"){if(/^http[s]?:\/\//.test(f)||(f="https://"+f),!/^http[s]?:\/\/([\w\-\.]+)+[\w-]*([\w\-\.\/\?%&=]+)?$/ig.test(f)){U.info('<i class="fa fa-exclamation-triangle"></i>',t.tooltipInfo1);return}}else{if(!p.iscelldata(g)){U.info('<i class="fa fa-exclamation-triangle"></i>',t.tooltipInfo2);return}f=m+"!"+g}(u==null||u.replace(/\s/g,"")=="")&&(u=f);let v={linkType:d,linkAddress:f,linkTooltip:y},b=$.extend(!0,{},e.hyperlink),k=$.extend(!0,{},e.hyperlink);k[o+"_"+s]=v;let w=xe.deepCopyFlowData(h.flowdata),x=w[o][s];x==null&&(x={}),x.fc="rgb(0, 0, 255)",x.un=1,x.v=x.m=u,w[o][s]=x,e.ref(b,k,h.currentSheetIndex,w,[{row:[o,o],column:[s,s]}]),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-insertLink-dialog").hide()})},dataAllocation:function(){let e=this,n=h.luckysheet_select_save[h.luckysheet_select_save.length-1],t=n.row_focus||n.row[0],l=n.column_focus||n.column[0],o=(e.hyperlink||{})[t+"_"+l]||{},s=ze(t,l,null,"m");$("#luckysheet-insertLink-dialog-linkText").val(s);let u=o.linkType||"external";$("#luckysheet-insertLink-dialog-linkType").val(u),$("#luckysheet-insertLink-dialog .show-box").hide(),$("#luckysheet-insertLink-dialog .show-box-"+u).show();let d=o.linkAddress||"";if(u=="external")$("#luckysheet-insertLink-dialog-linkAddress").val(d);else if(p.iscelldata(d)){let m=d.split("!")[0],g=d.split("!")[1];$("#luckysheet-insertLink-dialog-linkSheet").val(m),$("#luckysheet-insertLink-dialog-linkCell").val(g)}let f=o.linkTooltip||"";$("#luckysheet-insertLink-dialog-linkTooltip").val(f)},cellFocus:function(e,n){let t=this;if(t.hyperlink==null||t.hyperlink[e+"_"+n]==null)return;let l=t.hyperlink[e+"_"+n];if(l.linkType=="external")window.open(l.linkAddress);else{let a=p.getcellrange(l.linkAddress),o=a.sheetIndex,s=[{row:a.row,column:a.column}];o!=h.currentSheetIndex&&($("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),$("#luckysheet-sheets-item"+o).addClass("luckysheet-sheets-item-active"),ve.changeSheet(o)),h.luckysheet_select_save=s,lt(!0);let u=a.row[0]-1==-1?0:h.visibledatarow[a.row[0]-1],d=a.column[0]-1==-1?0:h.visibledatacolumn[a.column[0]-1];$("#luckysheet-scrollbar-x").scrollLeft(d),$("#luckysheet-scrollbar-y").scrollTop(u)}},overshow:function(e){let n=this;if($("#luckysheet-hyperlink-overshow").remove(),$(e.target).closest("#luckysheet-cell-main").length==0)return;let t=nt(e.pageX,e.pageY),l=$("#luckysheet-cell-main").scrollLeft(),a=$("#luckysheet-cell-main").scrollTop(),o=t[0]+l,s=t[1]+a;if(Y.freezenverticaldata!=null&&t[0]<Y.freezenverticaldata[0]-Y.freezenverticaldata[2]||Y.freezenhorizontaldata!=null&&t[1]<Y.freezenhorizontaldata[0]-Y.freezenhorizontaldata[2])return;let u=_t(s)[2],d=wt(o)[2],f=ke.mergeborer(h.flowdata,u,d);if(f&&(u=f.row[2],d=f.column[2]),n.hyperlink==null||n.hyperlink[u+"_"+d]==null)return;let m=n.hyperlink[u+"_"+d],g=m.linkTooltip;(g==null||g.replace(/\s/g,"")=="")&&(g=m.linkAddress);let y=h.visibledatarow[u],v=u-1==-1?0:h.visibledatarow[u-1],b=h.visibledatacolumn[d],k=d-1==-1?0:h.visibledatacolumn[d-1];f&&(y=f.row[1],v=f.row[0],b=f.column[1],k=f.column[0]);let w=`<div id="luckysheet-hyperlink-overshow" style="background:#fff;padding:5px 10px;border:1px solid #000;box-shadow:2px 2px #999;position:absolute;left:${k}px;top:${y+5}px;z-index:100;"> |
| | | </div>`;$("body").append(_e(dt,{id:"luckysheet-insertLink-dialog",addclass:"luckysheet-insertLink-dialog",title:l.insertLink,content:s,botton:`<button id="luckysheet-insertLink-dialog-confirm" class="btn btn-primary">${a.confirm}</button> |
| | | <button class="btn btn-default luckysheet-model-close-btn">${a.cancel}</button>`,style:"z-index:100003"}));let u=$("#luckysheet-insertLink-dialog").find(".luckysheet-modal-dialog-content").css("min-width",350).end(),f=u.outerHeight(),d=u.outerWidth(),m=$(window).width(),g=$(window).height(),y=$(document).scrollLeft(),v=$(document).scrollTop();$("#luckysheet-insertLink-dialog").css({left:(m+y-d)/2,top:(g+v-f)/3}).show(),e.dataAllocation()},init:function(){let e=this,t=Q().insertLink;$(document).off("change.linkType").on("change.linkType","#luckysheet-insertLink-dialog-linkType",function(l){let a=this.value;$("#luckysheet-insertLink-dialog .show-box").hide(),$("#luckysheet-insertLink-dialog .show-box-"+a).show()}),$(document).off("click.confirm").on("click.confirm","#luckysheet-insertLink-dialog-confirm",function(l){let a=h.luckysheet_select_save[h.luckysheet_select_save.length-1],o=a.row_focus||a.row[0],s=a.column_focus||a.column[0],u=$("#luckysheet-insertLink-dialog-linkText").val(),f=$("#luckysheet-insertLink-dialog-linkType").val(),d=$("#luckysheet-insertLink-dialog-linkAddress").val(),m=$("#luckysheet-insertLink-dialog-linkSheet").val(),g=$("#luckysheet-insertLink-dialog-linkCell").val(),y=$("#luckysheet-insertLink-dialog-linkTooltip").val();if(f=="external"){if(/^http[s]?:\/\//.test(d)||(d="https://"+d),!/^http[s]?:\/\/([\w\-\.]+)+[\w-]*([\w\-\.\/\?%&=]+)?$/ig.test(d)){U.info('<i class="fa fa-exclamation-triangle"></i>',t.tooltipInfo1);return}}else{if(!p.iscelldata(g)){U.info('<i class="fa fa-exclamation-triangle"></i>',t.tooltipInfo2);return}d=m+"!"+g}(u==null||u.replace(/\s/g,"")=="")&&(u=d);let v={linkType:f,linkAddress:d,linkTooltip:y},b=$.extend(!0,{},e.hyperlink),k=$.extend(!0,{},e.hyperlink);k[o+"_"+s]=v;let w=xe.deepCopyFlowData(h.flowdata),x=w[o][s];x==null&&(x={}),x.fc="rgb(0, 0, 255)",x.un=1,x.v=x.m=u,w[o][s]=x,e.ref(b,k,h.currentSheetIndex,w,[{row:[o,o],column:[s,s]}]),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-insertLink-dialog").hide()})},dataAllocation:function(){let e=this,n=h.luckysheet_select_save[h.luckysheet_select_save.length-1],t=n.row_focus||n.row[0],l=n.column_focus||n.column[0],o=(e.hyperlink||{})[t+"_"+l]||{},s=ze(t,l,null,"m");$("#luckysheet-insertLink-dialog-linkText").val(s);let u=o.linkType||"external";$("#luckysheet-insertLink-dialog-linkType").val(u),$("#luckysheet-insertLink-dialog .show-box").hide(),$("#luckysheet-insertLink-dialog .show-box-"+u).show();let f=o.linkAddress||"";if(u=="external")$("#luckysheet-insertLink-dialog-linkAddress").val(f);else if(p.iscelldata(f)){let m=f.split("!")[0],g=f.split("!")[1];$("#luckysheet-insertLink-dialog-linkSheet").val(m),$("#luckysheet-insertLink-dialog-linkCell").val(g)}let d=o.linkTooltip||"";$("#luckysheet-insertLink-dialog-linkTooltip").val(d)},cellFocus:function(e,n){let t=this;if(t.hyperlink==null||t.hyperlink[e+"_"+n]==null)return;let l=t.hyperlink[e+"_"+n];if(l.linkType=="external")window.open(l.linkAddress);else{let a=p.getcellrange(l.linkAddress),o=a.sheetIndex,s=[{row:a.row,column:a.column}];o!=h.currentSheetIndex&&($("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),$("#luckysheet-sheets-item"+o).addClass("luckysheet-sheets-item-active"),ve.changeSheet(o)),h.luckysheet_select_save=s,lt(!0);let u=a.row[0]-1==-1?0:h.visibledatarow[a.row[0]-1],f=a.column[0]-1==-1?0:h.visibledatacolumn[a.column[0]-1];$("#luckysheet-scrollbar-x").scrollLeft(f),$("#luckysheet-scrollbar-y").scrollTop(u)}},overshow:function(e){let n=this;if($("#luckysheet-hyperlink-overshow").remove(),$(e.target).closest("#luckysheet-cell-main").length==0)return;let t=nt(e.pageX,e.pageY),l=$("#luckysheet-cell-main").scrollLeft(),a=$("#luckysheet-cell-main").scrollTop(),o=t[0]+l,s=t[1]+a;if(Y.freezenverticaldata!=null&&t[0]<Y.freezenverticaldata[0]-Y.freezenverticaldata[2]||Y.freezenhorizontaldata!=null&&t[1]<Y.freezenhorizontaldata[0]-Y.freezenhorizontaldata[2])return;let u=_t(s)[2],f=wt(o)[2],d=ke.mergeborer(h.flowdata,u,f);if(d&&(u=d.row[2],f=d.column[2]),n.hyperlink==null||n.hyperlink[u+"_"+f]==null)return;let m=n.hyperlink[u+"_"+f],g=m.linkTooltip;(g==null||g.replace(/\s/g,"")=="")&&(g=m.linkAddress);let y=h.visibledatarow[u],v=u-1==-1?0:h.visibledatarow[u-1],b=h.visibledatacolumn[f],k=f-1==-1?0:h.visibledatacolumn[f-1];d&&(y=d.row[1],v=d.row[0],b=d.column[1],k=d.column[0]);let w=`<div id="luckysheet-hyperlink-overshow" style="background:#fff;padding:5px 10px;border:1px solid #000;box-shadow:2px 2px #999;position:absolute;left:${k}px;top:${y+5}px;z-index:100;"> |
| | | <div>${g}</div> |
| | | <div>\u5355\u51FB\u9F20\u6807\u53EF\u4EE5\u8FFD\u8E2A</div> |
| | | </div>`;$(w).appendTo($("#luckysheet-cell-main"))},ref:function(e,n,t,l,a){let o=this;if(h.clearjfundo){h.jfundo.length=0;let s={};s.type="updateHyperlink",s.sheetIndex=t,s.historyHyperlink=e,s.currentHyperlink=n,s.data=h.flowdata,s.curData=l,s.range=a,h.jfredo.push(s)}o.hyperlink=n,h.luckysheetfile[Z(t)].hyperlink=n,h.flowdata=l,xe.webWorkerFlowDataCache(h.flowdata),h.luckysheetfile[Z(t)].data=h.flowdata,ne.allowUpdate&&(ne.saveParam("all",t,n,{k:"hyperlink"}),ne.historyParam(h.flowdata,t,a[0])),setTimeout(function(){Be()},1)}},Cl=hv});function fc(e,n,t){p.execFunctionExist=[];for(let l=0;l<e.length;l++)for(let a=e[l].row[0];a<=e[l].row[1];a++)for(let o=e[l].column[0];o<=e[l].column[1];o++)p.execFunctionExist.push({r:a,c:o,i:n});p.execFunctionExist.reverse(),p.execFunctionGroup(null,null,null,null,t),p.execFunctionGlobalData=null}function Ze(e,n,t,l=!0,a=!0){e==null&&(e=h.flowdata),n==null&&(n=h.luckysheet_select_save),n=JSON.parse(JSON.stringify(n)),clearTimeout(Dr),t==null&&(t={});let o=t.cfg,s=t.RowlChange,u=t.cdformat,d=t.dataVerification,f=t.dynamicArray,m=t.hyperlink,g=h.luckysheetfile[Z(h.currentSheetIndex)];if(h.clearjfundo){h.jfundo.length=0;let y;o==null?y=$.extend(!0,{},h.config):y=$.extend(!0,{},o);let v;u==null?v=$.extend(!0,[],g.luckysheet_conditionformat_save):v=u;let b;d==null?b=$.extend(!0,{},g.dataVerification):b=d;let k;f==null?k=$.extend(!0,[],g.dynamicArray):k=f,h.jfredo.push({type:"datachange",data:h.flowdata,curdata:e,sheetIndex:h.currentSheetIndex,config:$.extend(!0,{},h.config),curConfig:y,cdformat:$.extend(!0,[],g.luckysheet_conditionformat_save),curCdformat:v,RowlChange:s,dataVerification:$.extend(!0,[],g.dataVerification),curDataVerification:b,dynamicArray:$.extend(!0,[],g.dynamicArray),curDynamicArray:k,hyperlink:m&&$.extend(!0,{},g.hyperlink),curHyperlink:m,range:n,dataRange:[...g.luckysheet_select_save]})}h.flowdata=e,xe.webWorkerFlowDataCache(h.flowdata),g.data=h.flowdata,o!=null&&(h.config=o,g.config=h.config,ne.saveParam("all",h.currentSheetIndex,o,{k:"config"}),s!=null&&St(h.flowdata.length,h.flowdata[0].length)),u!=null&&u.length!==0&&(g.luckysheet_conditionformat_save=u,ne.saveParam("all",h.currentSheetIndex,u,{k:"luckysheet_conditionformat_save"})),d!=null&&Object.keys(d).length!==0&&(Ye.dataVerification=d,g.dataVerification=d,ne.saveParam("all",h.currentSheetIndex,d,{k:"dataVerification"})),f!=null&&(g.dynamicArray=f,ne.saveParam("all",h.currentSheetIndex,f,{k:"dynamicArray"})),m!=null&&(g.hyperlink=m,Cl.hyperlink=m,ne.saveParam("all",h.currentSheetIndex,m,{k:"hyperlink"}));for(let y=0;y<n.length;y++){let v=n[y].row[0],b=n[y].column[0];if(h.flowdata[v][b]!=null&&h.flowdata[v][b].spl!=null){window.luckysheetCurrentRow=v,window.luckysheetCurrentColumn=b,window.luckysheetCurrentFunction=h.flowdata[v][b].f;let k=$.trim(p.functionParserExe(h.flowdata[v][b].f)),w=new Function("return "+k)();h.flowdata[v][b].spl=w}ne.allowUpdate&&ne.historyParam(h.flowdata,h.currentSheetIndex,n[y]),typeof h.chartparam.jfrefreshchartall=="function"&&h.chartparam.jfrefreshchartall(h.flowdata,n[y].row[0],n[y].row[1],n[y].column[0],n[y].column[1])}l&&fc(n,h.currentSheetIndex,e),a&&(Dr=setTimeout(function(){Be()},1)),lt(),window.luckysheet_getcelldata_cache=null}function Zl(e,n,t,l,a,o,s,u,d=!0){let f={},m=!1;if(clearTimeout(Dr),o=="cellRowChange"){f.type="cellRowChange",f.config=$.extend(!0,{},h.config),f.curconfig=$.extend(!0,{},l),f.range=$.extend(!0,[],h.luckysheet_select_save),f.currange=a,f.ctrlType=o,f.ctrlValue=s;let g=l.rowlen;g==null&&(g={}),ne.saveParam("cg",h.currentSheetIndex,g,{k:"rowlen"})}else if(o=="resizeC"){f.type="resize",f.config=$.extend(!0,{},h.config),f.curconfig=$.extend(!0,{},l),f.range=$.extend(!0,[],h.luckysheet_select_save),f.currange=a,f.ctrlType=o,f.ctrlValue=s;let g=l.columnlen;g==null&&(g={}),ne.saveParam("cg",h.currentSheetIndex,g,{k:"columnlen"})}else if(o.indexOf("extend")>-1)f.type="extend",f.config=$.extend(!0,{},h.config),f.curconfig=$.extend(!0,{},l),f.range=$.extend(!0,[],h.luckysheet_select_save),f.currange=a,f.ctrlType=o,f.ctrlValue=s,ne.saveParam("arc",h.currentSheetIndex,{index:s.index,len:s.len,direction:s.direction,mc:l.merge},{rc:s.type});else if(o.indexOf("dele")>-1)f.type="dele",f.config=$.extend(!0,{},h.config),f.curconfig=$.extend(!0,{},l),f.range=$.extend(!0,[],h.luckysheet_select_save),f.currange=a,f.ctrlType=o,f.ctrlValue=s,ne.saveParam("drc",h.currentSheetIndex,{index:s.index,len:s.len,mc:l.merge,borderInfo:l.borderInfo},{rc:s.type});else{f.type="datachangeAll",f.range=$.extend(!0,[],h.luckysheet_select_save),f.currange=a,f.ctrlType=o,f.ctrlValue=s,m=!0;for(let g=0;g<a.length;g++)ne.historyParam(t,h.currentSheetIndex,a[g])}h.clearjfundo&&(h.jfundo.length=0,f.data=h.flowdata,f.curdata=t,f.sheetIndex=h.currentSheetIndex,f.cdformat=$.extend(!0,[],h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save),f.curCdformat=u,h.jfredo.push(f)),h.flowdata=t,xe.webWorkerFlowDataCache(t),h.luckysheetfile[Z(h.currentSheetIndex)].data=h.flowdata,l!=null&&(h.config=l,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("all",h.currentSheetIndex,l,{k:"config"})),u!=null&&(h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save=u,ne.saveParam("all",h.currentSheetIndex,u,{k:"luckysheet_conditionformat_save"})),h.luckysheet_select_save=$.extend(!0,[],a),h.luckysheet_select_save.length>0&<(),m&&fc(a,h.currentSheetIndex,t),St(n,e),d&&(Dr=setTimeout(function(){Be()},1)),ve.storeSheetParamALL(),window.luckysheet_getcelldata_cache=null}function Ea(e,n,t){clearTimeout(Dr),h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"rangechange",data:h.flowdata,curdata:e,range:n,sheetIndex:h.currentSheetIndex,cdformat:$.extend(!0,[],h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save),curCdformat:t})),h.flowdata=e,xe.webWorkerFlowDataCache(h.flowdata),h.luckysheetfile[Z(h.currentSheetIndex)].data=h.flowdata,t!=null&&(h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save=t),fc(n,h.currentSheetIndex,e),Dr=setTimeout(function(){Be()},1);for(let l=0;l<n.length;l++)ne.historyParam(h.flowdata,h.currentSheetIndex,n[l])}function jn(e,n,t,l,a,o,s,u,d,f,m){let g=h.luckysheetfile[Z(h.currentSheetIndex)];Gn();let y=[];for(let x in n.merge){let C=n.merge[x];for(let S=C.r;S<=C.r+C.rs-1;S++)for(let _=C.c;_<=C.c+C.cs-1;_++)e[S][_]==null&&(e[S][_]={}),S==C.r&&_==C.c?e[S][_].mc=C:e[S][_].mc={r:C.r,c:C.c},y.push({r:S,c:_})}let v=[];h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:t,sheetIndex:h.currentSheetIndex,data:h.flowdata,curData:e,config:$.extend(!0,{},h.config),curConfig:n,ctrlValue:l,mcData:y,calc:$.extend(!0,[],g.calcChain),curCalc:a,funcData:v,filterObj:{filter_select:$.extend(!0,{},g.filter_select),filter:$.extend(!0,{},g.filter)},curFilterObj:o,cf:$.extend(!0,[],g.luckysheet_conditionformat_save),curCf:s,af:$.extend(!0,[],g.luckysheet_alternateformat_save),curAf:u,freezen:{freezenhorizontaldata:Y.freezenhorizontaldata,freezenverticaldata:Y.freezenverticaldata},curFreezen:d,dataVerification:$.extend(!0,{},g.dataVerification),curDataVerification:f,hyperlink:$.extend(!0,{},g.hyperlink),curHyperlink:m,range:g.luckysheet_select_save,dataRange:[...g.luckysheet_select_save]}));let b=l.index,k=l.len,w=l.rc;if(t=="addRC"){let x=l.direction,C=l.restore,S=[];if(C){if(w=="r"){let _;x=="lefttop"?_=b:x=="rightbottom"&&(_=b+1);let T=_+k-1;for(let A=_;A<=T;A++){let R=[];for(let I=0;I<e[0].length;I++){let F=e[A][I];R.push(F)}S.push(R)}}else if(w=="c"){let _;x=="lefttop"?_=b:x=="rightbottom"&&(_=b+1);let T=_+k-1;for(let A=0;A<e.length;A++){let R=[];for(let I=_;I<=T;I++){let F=e[A][I];R.push(F)}S.push(R)}}}ne.saveParam("arc",h.currentSheetIndex,{index:b,len:k,direction:x,data:S},{rc:w})}else t=="delRC"&&ne.saveParam("drc",h.currentSheetIndex,{index:b,len:k},{rc:w});h.flowdata=e,xe.webWorkerFlowDataCache(h.flowdata),g.data=e,h.config=n,g.config=h.config,ne.saveParam("all",h.currentSheetIndex,n,{k:"config"});for(let x=0;x<y.length;x++){let C=y[x].r,S=y[x].c;ne.saveParam("v",h.currentSheetIndex,h.flowdata[C][S],{r:C,c:S})}if(a.length>0)for(let x=0;x<a.length;x++){let C=a[x],S=C.r,_=C.c,T=C.index,A=zl(S,_,T,e),R=p.execfunction(A,S,_,T,null,!0);C.func=R,e[S][_].f==A&&Ht(S,_,e,R[1])}g.calcChain=a,ne.saveParam("all",h.currentSheetIndex,a,{k:"calcChain"});for(let x=0;x<v.length;x++){let C=v[x].r,S=v[x].c;ne.saveParam("v",h.currentSheetIndex,h.flowdata[C][S],{r:C,c:S})}o!=null?(g.filter_select=o.filter_select,g.filter=o.filter):(g.filter_select=null,g.filter=null),Dl(g.filter_select,g.filter),ne.saveParam("all",h.currentSheetIndex,g.filter_select,{k:"filter_select"}),ne.saveParam("all",h.currentSheetIndex,g.filter,{k:"filter"}),g.luckysheet_conditionformat_save=s,ne.saveParam("all",h.currentSheetIndex,g.luckysheet_conditionformat_save,{k:"luckysheet_conditionformat_save"}),g.luckysheet_alternateformat_save=u,ne.saveParam("all",h.currentSheetIndex,g.luckysheet_alternateformat_save,{k:"luckysheet_alternateformat_save"}),d!=null?(Y.freezenhorizontaldata=d.freezenhorizontaldata,Y.freezenverticaldata=d.freezenverticaldata):(Y.freezenhorizontaldata=null,Y.freezenverticaldata=null),Ye.dataVerification=f,g.dataVerification=f,ne.saveParam("all",h.currentSheetIndex,g.dataVerification,{k:"dataVerification"}),Cl.hyperlink=m,g.hyperlink=m,ne.saveParam("all",h.currentSheetIndex,g.hyperlink,{k:"hyperlink"}),St(h.flowdata.length,h.flowdata[0].length)}function Ai(e,n,t,l,a,o,s,u){let d=h.luckysheetfile[Z(h.currentSheetIndex)];clearTimeout(Dr),Gn();let f=[];if(JSON.stringify(n.merge)=="{}")for(let g=0;g<e.length;g++)for(let y=0;y<e[0].length;y++){let v=e[g][y];v!=null&&v.mc!=null&&(delete v.mc,f.push({r:g,c:y}))}else for(let g in n.merge){let y=n.merge[g];for(let v=y.r;v<=y.r+y.rs-1;v++)for(let b=y.c;b<=y.c+y.cs-1;b++)if(e[v][b]==null&&(e[v][b]={}),v==y.r&&b==y.c)JSON.stringify(e[v][b].mc)!=JSON.stringify(y)&&(e[v][b].mc=y,f.push({r:v,c:b}));else{let k={r:y.r,c:y.c};JSON.stringify(e[v][b].mc)!=JSON.stringify(k)&&(e[v][b].mc=k,f.push({r:v,c:b}))}}let m=[];if(h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"deleteCell",sheetIndex:h.currentSheetIndex,ctrl:t,data:h.flowdata,curData:e,config:$.extend(!0,{},h.config),curConfig:n,mcData:f,calc:$.extend(!0,[],d.calcChain),curCalc:l,funcData:m,filterObj:{filter_select:$.extend(!0,{},d.filter_select),filter:$.extend(!0,{},d.filter)},curFilterObj:a,cf:$.extend(!0,[],d.luckysheet_conditionformat_save),curCf:o,dataVerification:$.extend(!0,{},d.dataVerification),curDataVerification:s,hyperlink:$.extend(!0,{},d.hyperlink),curHyperlink:u,range:d.luckysheet_select_save,dataRange:[...d.luckysheet_select_save]})),h.flowdata=e,xe.webWorkerFlowDataCache(h.flowdata),d.data=e,ne.allowUpdate){let g=t.type,y=t.str,v=t.edr,b=t.stc,k=t.edc,w;g=="moveUp"?w={row:[y,e.length-1],column:[b,k]}:g=="moveLeft"&&(w={row:[y,v],column:[b,e[0].length-1]}),ne.historyParam(h.flowdata,h.currentSheetIndex,w)}h.config=n,d.config=h.config,ne.saveParam("all",h.currentSheetIndex,n,{k:"config"});for(let g=0;g<f.length;g++){let y=f[g].r,v=f[g].c;ne.saveParam("v",h.currentSheetIndex,h.flowdata[y][v],{r:y,c:v})}if(l.length>0)for(let g=0;g<l.length;g++){let y=l[g],v=y.r,b=y.c,k=y.index,w=zl(v,b,k,e),x=p.execfunction(w,v,b,k,null,!0);y.func=x,e[v][b].f==w&&Ht(v,b,e,x[1])}d.calcChain=l,ne.saveParam("all",h.currentSheetIndex,l,{k:"calcChain"});for(let g=0;g<m.length;g++){let y=m[g].r,v=m[g].c;ne.saveParam("v",h.currentSheetIndex,h.flowdata[y][v],{r:y,c:v})}a!=null?(d.filter_select=a.filter_select,d.filter=a.filter):(d.filter_select=null,d.filter=null),Dl(d.filter_select,d.filter),ne.saveParam("all",h.currentSheetIndex,d.filter_select,{k:"filter_select"}),ne.saveParam("all",h.currentSheetIndex,d.filter,{k:"filter"}),d.luckysheet_conditionformat_save=o,ne.saveParam("all",h.currentSheetIndex,d.luckysheet_conditionformat_save,{k:"luckysheet_conditionformat_save"}),Ye.dataVerification=s,d.dataVerification=s,ne.saveParam("all",h.currentSheetIndex,d.dataVerification,{k:"dataVerification"}),Cl.hyperlink=u,d.hyperlink=u,ne.saveParam("all",h.currentSheetIndex,d.hyperlink,{k:"hyperlink"}),Dr=setTimeout(function(){Be()},1)}function Ga(e,n,t){let l={};p.execFunctionExist=[],clearTimeout(Dr);for(let u=e.range.row[0];u<=e.range.row[1];u++)for(let d=e.range.column[0];d<=e.range.column[1];d++)u+"_"+d+"_"+e.sheetIndex in l||(l[u+"_"+d+"_"+e.sheetIndex]=0,p.execFunctionExist.push({r:u,c:d,i:e.sheetIndex}));for(let u=n.range.row[0];u<=n.range.row[1];u++)for(let d=n.range.column[0];d<=n.range.column[1];d++)u+"_"+d+"_"+n.sheetIndex in l||(l[u+"_"+d+"_"+n.sheetIndex]=0,p.execFunctionExist.push({r:u,c:d,i:n.sheetIndex}));h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"pasteCut",source:e,target:n,RowlChange:t}));let a;if(h.currentSheetIndex==e.sheetIndex?(h.config=e.curConfig,a=e.curData.length,h.luckysheetfile[Z(n.sheetIndex)].config=n.curConfig):h.currentSheetIndex==n.sheetIndex&&(h.config=n.curConfig,a=n.curData.length,h.luckysheetfile[Z(e.sheetIndex)].config=e.curConfig),t){h.visibledatarow=[],h.rh_height=0;for(let u=0;u<a;u++){let d=h.defaultrowlen;if(h.config.rowlen!=null&&h.config.rowlen[u]!=null&&(d=h.config.rowlen[u]),h.config.rowhidden!=null&&h.config.rowhidden[u]!=null){d=h.config.rowhidden[u],h.visibledatarow.push(h.rh_height);continue}else h.rh_height+=d+1;h.visibledatarow.push(h.rh_height)}if(h.rh_height+=80,h.currentSheetIndex==e.sheetIndex){let u=go(n.curData.length,n.curConfig);h.luckysheetfile[Z(n.sheetIndex)].visibledatarow=u}else if(h.currentSheetIndex==n.sheetIndex){let u=go(e.curData.length,e.curConfig);h.luckysheetfile[Z(e.sheetIndex)].visibledatarow=u}}h.currentSheetIndex==e.sheetIndex?(h.flowdata=e.curData,h.luckysheetfile[Z(n.sheetIndex)].data=n.curData):h.currentSheetIndex==n.sheetIndex&&(h.flowdata=n.curData,h.luckysheetfile[Z(e.sheetIndex)].data=e.curData),xe.webWorkerFlowDataCache(h.flowdata),h.luckysheetfile[Z(h.currentSheetIndex)].data=h.flowdata,h.currentSheetIndex==n.sheetIndex?h.luckysheet_select_save=[{row:n.range.row,column:n.range.column}]:h.luckysheet_select_save=[{row:e.range.row,column:e.range.column}],h.luckysheet_select_save.length>0&<(),h.luckysheetfile[Z(e.sheetIndex)].luckysheet_conditionformat_save=e.curCdformat,h.luckysheetfile[Z(n.sheetIndex)].luckysheet_conditionformat_save=n.curCdformat,h.currentSheetIndex==e.sheetIndex?Ye.dataVerification=e.curDataVerification:h.currentSheetIndex==n.sheetIndex&&(Ye.dataVerification=n.curDataVerification),h.luckysheetfile[Z(e.sheetIndex)].dataVerification=e.curDataVerification,h.luckysheetfile[Z(n.sheetIndex)].dataVerification=n.curDataVerification,p.execFunctionExist.reverse(),p.execFunctionGroup(null,null,null,null,n.curData),p.execFunctionGlobalData=null;let o=Z(h.currentSheetIndex),s=h.luckysheetfile[o];s.scrollTop=$("#luckysheet-cell-main").scrollTop(),s.scrollLeft=$("#luckysheet-cell-main").scrollLeft(),ve.showSheet(),Dr=setTimeout(function(){Be()},1),ve.storeSheetParamALL(),ne.saveParam("all",e.sheetIndex,e.curConfig,{k:"config"}),ne.saveParam("all",n.sheetIndex,n.curConfig,{k:"config"}),ne.historyParam(e.curData,e.sheetIndex,{row:e.range.row,column:e.range.column}),ne.historyParam(n.curData,n.sheetIndex,{row:n.range.row,column:n.range.column}),ne.saveParam("all",e.sheetIndex,e.curCdformat,{k:"luckysheet_conditionformat_save"}),ne.saveParam("all",n.sheetIndex,n.curCdformat,{k:"luckysheet_conditionformat_save"}),ne.saveParam("all",e.sheetIndex,e.curDataVerification,{k:"dataVerification"}),ne.saveParam("all",n.sheetIndex,n.curDataVerification,{k:"dataVerification"})}function St(e,n,t=!0){yn(e,n),clearTimeout(Dr),ve.storeSheetParam();let l=h.luckysheetfile[Z(h.currentSheetIndex)].calcChain;if(l!=null&&l.length>0){h.config.rowlen==null&&(h.config.rowlen={}),h.config.columnlen==null&&(h.config.columnlen={});for(let a=0;a<l.length;a++){let o=l[a].r,s=l[a].c;if(l[a].index==h.currentSheetIndex&&h.flowdata[o][s]!=null&&h.flowdata[o][s].spl!=null&&(o in h.config.rowlen||s in h.config.columnlen)){window.luckysheetCurrentRow=o,window.luckysheetCurrentColumn=s,window.luckysheetCurrentFunction=h.flowdata[o][s].f;let d=$.trim(p.functionParserExe(h.flowdata[o][s].f)),f=new Function("return "+d)();h.flowdata[o][s].spl=f,ne.saveParam("v",h.currentSheetIndex,h.flowdata[o][s],{r:o,c:s})}}h.luckysheetfile[Z(h.currentSheetIndex)].data=h.flowdata}if(He.positionSync(),lt(),Gn(),$(".luckysheet-selection-copy").is(":visible")&&Ot(),$("#luckysheet-dropCell-icon").is(":visible")&&$("#luckysheet-dropCell-icon").remove(),Y.freezenhorizontaldata!=null&&Y.freezenverticaldata!=null){let a=Y.freezenhorizontaldata[1]-1,o=Y.freezenverticaldata[1]-1,s=Y.freezenhorizontaldata[2],u=Y.freezenverticaldata[2],d=h.visibledatarow[a]-2-s+h.columnHeaderHeight,f=[h.visibledatarow[a],a+1,s,Y.cutVolumn(h.visibledatarow,a+1),d],m=h.visibledatacolumn[o]-2-u+h.rowHeaderWidth,g=[h.visibledatacolumn[o],o+1,u,Y.cutVolumn(h.visibledatacolumn,o+1),m];Y.saveFreezen(f,d,g,m),Y.createFreezenHorizontal(f,d),Y.createFreezenVertical(g,m),Y.createAssistCanvas()}else if(Y.freezenhorizontaldata!=null){let a=Y.freezenhorizontaldata[1]-1,o=Y.freezenhorizontaldata[2],s=h.visibledatarow[a]-2-o+h.columnHeaderHeight,u=[h.visibledatarow[a],a+1,o,Y.cutVolumn(h.visibledatarow,a+1),s];Y.saveFreezen(u,s,null,null),Y.createFreezenHorizontal(u,s),Y.createAssistCanvas()}else if(Y.freezenverticaldata!=null){let a=Y.freezenverticaldata[1]-1,o=Y.freezenverticaldata[2],s=h.visibledatacolumn[a]-2-o+h.rowHeaderWidth,u=[h.visibledatacolumn[a],a+1,o,Y.cutVolumn(h.visibledatacolumn,a+1),s];Y.saveFreezen(null,null,u,s),Y.createFreezenVertical(u,s),Y.createAssistCanvas()}else $("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").length>0&&$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").each(function(a,o){let s=$(o).data("str"),u=$(o).data("cindex"),d=h.visibledatacolumn[u]-20,f=s-1==-1?0:h.visibledatarow[s-1];$(o).css({left:d,top:f})});if($("#luckysheet-filter-selected-sheet"+h.currentSheetIndex).length>0){let a=h.luckysheetfile[Z(h.currentSheetIndex)].filter_select,o=a.row[0],s=a.row[1],u=a.column[0],d=a.column[1],f=h.visibledatarow[s],m=o-1==-1?0:h.visibledatarow[o-1],g=h.visibledatacolumn[d],y=u-1==-1?0:h.visibledatacolumn[u-1];$("#luckysheet-filter-selected-sheet"+h.currentSheetIndex).css({left:y,width:g-y-1,top:m,height:f-m-1})}ve.showSheet(),t&&(Dr=setTimeout(function(){Be()},1))}function Be(e,n){if(p.groupValuesRefresh(),e==null&&(e=$("#luckysheet-cell-main").scrollLeft()),n==null&&(n=$("#luckysheet-cell-main").scrollTop()),Y.freezenverticaldata!=null||Y.freezenhorizontaldata!=null){let t,l,a,o,s,u,d=h.luckysheetTableContentHW[0],f=h.luckysheetTableContentHW[1];Y.freezenverticaldata!=null&&Y.freezenhorizontaldata!=null?(t=Y.freezenhorizontaldata[0],l=Y.freezenhorizontaldata[1],a=Y.freezenhorizontaldata[2],o=Y.freezenverticaldata[0],s=Y.freezenverticaldata[1],u=Y.freezenverticaldata[2],nr(u,a,o,t,1,1,null,null,"freezen_3"),nr(e+o-u,a,d-o+u,t,1,1,null,null,"freezen_4"),nr(u,n+t-a,o,f-t+a,1,1,null,null,"freezen_7"),nr(e+o-u,n+t-a,d-o+u,f-t+a,o-u+h.rowHeaderWidth,t-a+h.columnHeaderHeight),pa(u,o,h.rowHeaderWidth),pa(e+o-u,d-o+u,o-u+h.rowHeaderWidth),ma(a,t,h.columnHeaderHeight),ma(n+t-a,f-t+a,t-a+h.columnHeaderHeight)):Y.freezenhorizontaldata!=null?(t=Y.freezenhorizontaldata[0],l=Y.freezenhorizontaldata[1],a=Y.freezenhorizontaldata[2],nr(e,a,d,t,1,1,null,null,"freezen_h"),nr(e,n+t-a,d,f-t+a,null,t-a+h.columnHeaderHeight),pa(e,d,null),ma(a,t,h.columnHeaderHeight),ma(n+t-a,f-t+a,t-a+h.columnHeaderHeight)):Y.freezenverticaldata!=null&&(o=Y.freezenverticaldata[0],s=Y.freezenverticaldata[1],u=Y.freezenverticaldata[2],nr(u,n,o,f,1,1,null,null,"freezen_v"),nr(e+o-u,n,d-o+u,f,o-u+h.rowHeaderWidth,null),ma(n,f,null),pa(u,o,h.rowHeaderWidth),pa(e+o-u,d-o+u,o-u+h.rowHeaderWidth))}else{if($("#luckysheetTableContent").length==0)return;let t=$("#luckysheetTableContent").get(0).getContext("2d");nr(e,n),pa(e),ma(n),t.clearRect(0,0,h.rowHeaderWidth*h.devicePixelRatio-1,h.columnHeaderHeight*h.devicePixelRatio-1)}}var Dr,Yt=Ie(()=>{Ii();Ut();Jt();$r();Kt();mr();Co();Vl();Qt();fl();Ur();yr();Ua();Zt();kn();Nt();Xe();Dr=null});function kf(e,n,t){return new Promise((l,a)=>{let o=new XMLHttpRequest||new ActiveXObject("Microsoft.XMLHTTP");o.open(e,n),o.send(JSON.stringify(t)),o.onreadystatechange=function(){o.readyState==4&&(o.status==200?l(o.responseText):a("error"))}})}var wf=Ie(()=>{});var mc,Pi,ga,ne,Qt=Ie(()=>{mc=Fl(Td());zs();Yt();Jt();Gt();fl();il();kn();Vl();Ur();qr();yr();Ua();dt();Nt();Xe();Zt();bt();Pi=Fl(vn());Ba();xl();wf();Ll();ga={gridKey:null,loadUrl:null,updateUrl:null,updateImageUrl:null,title:null,loadSheetUrl:null,retryTimer:null,allowUpdate:!1,historyParam:function(e,n,t){let l=this,a=t.row[0],o=t.row[1],s=t.column[0],u=t.column[1];if(a==o&&s==u){let d=e[a][s];l.saveParam("v",n,d,{r:a,c:s})}else{let d=o-a+1,f=u-s+1,m=Math.floor(1e3/f),g=Math.ceil(d/m);for(let y=0;y<g;y++){let v=a+m*y,b;y==g-1?b=o:b=a+m*(y+1)-1;let k=[];for(let w=v;w<=b;w++){let x=[];for(let C=s;C<=u;C++)e[w]==null?x.push(null):x.push(e[w][C]);k.push(x)}l.saveParam("rv",n,k,{range:{row:[v,b],column:[s,u]}}),y==g-1&&l.saveParam("rv_end",n,null)}}},saveParam:function(e,n,t,l){let a=this;if(!a.allowUpdate)return;t==null&&(t=null);let o={};if(o.t=e,o.i=n,o.v=t,e==="shs")return;e=="rv"?o.range=l.range:e=="v"||e=="fu"||e=="fm"?(o.r=l.r,o.c=l.c):e=="fc"?(o.op=l.op,o.pos=l.pos):e=="drc"||e=="arc"||e=="h"||e=="wh"?o.rc=l.rc:e=="c"?(o.cid=l.cid,o.op=l.op):e=="f"?(o.op=l.op,o.pos=l.pos):e=="s"||(e=="sh"?(o.op=l.op,l.cur!=null&&(o.cur=l.cur)):(e=="cg"||e=="all")&&(o.k=l.k));let s=fe.imageUpdateMethodConfig;if(JSON.stringify(s)!=="{}")if(o.k!="images"){let u=mc.default.gzip(encodeURIComponent(JSON.stringify(o)),{to:"string"});a.websocket!=null&&a.websocket.send(u)}else kf(s.method,s.url,o).then(u=>{console.log(u)}).catch(u=>{console.log(u)});else{let u=mc.default.gzip(encodeURIComponent(JSON.stringify(o)),{to:"string"});a.websocket!=null&&a.websocket.send(u)}},websocket:null,wxErrorCount:0,openWebSocket:function(){let e=this;if("WebSocket"in window){let n=e.updateUrl+"?t=111&g="+encodeURIComponent(e.gridKey);e.updateUrl.indexOf("?")>-1&&(n=e.updateUrl+"&t=111&g="+encodeURIComponent(e.gridKey)),e.websocket=new WebSocket(n),e.websocket.onopen=function(){console.info(Q().websocket.success),_i(),e.wxErrorCount=0,e.retryTimer=setInterval(function(){e.websocket.send("rub")},6e4)},e.websocket.onmessage=function(t){h.result=t;let l=new Function("return "+t.data)();Je.createHookFunction("cooperativeMessage",l),console.info(l);let a=l.type,{message:o,id:s}=l;if(o==="\u7528\u6237\u9000\u51FA"&&($("#luckysheet-multipleRange-show-"+s).hide(),h.cooperativeEdit.changeCollaborationSize=h.cooperativeEdit.changeCollaborationSize.filter(u=>u.id!=s),h.cooperativeEdit.checkoutData=h.cooperativeEdit.checkoutData.filter(u=>u.id!=s)),a==1){let u=l.data.v.index,d=h.luckysheetfile.filter(f=>f.index===u)[0];d!==null&&setTimeout(()=>{let f=l.data.i;d.index=f,h.currentSheetIndex=f,$(`#luckysheet-sheets-item${u}`).attr("data-index",f),$(`#luckysheet-sheets-item${u}`).prop("id",`luckysheet-sheets-item${f}`),$(`#luckysheet-datavisual-selection-set-${u}`).prop("id",`luckysheet-datavisual-selection-set-${f}`)},1)}else if(a==2){let u=JSON.parse(l.data);e.wsUpdateMsg(u);let d=JSON.parse(l.data);d.k=="columnlen"?Gn(d.v,null):d.k=="rowlen"&&Gn(null,d.v)}else if(a==3){let u=l.id,d=l.username,f=JSON.parse(l.data),m=f.t,g=f.i,y=f.v;h.cooperativeEdit.changeCollaborationSize.length===0&&h.cooperativeEdit.changeCollaborationSize.push({id:u,v:f.v[0],i:g}),h.cooperativeEdit.changeCollaborationSize.some(x=>x.id==u)?h.cooperativeEdit.changeCollaborationSize.forEach(x=>{x.id==u&&(x.v=f.v[0]||f.range[0],x.i=g)}):h.cooperativeEdit.changeCollaborationSize.push({id:u,v:f.v[0],i:g}),P(y)!="array"&&P(y)!=="object"&&(y=JSON.parse(y));let b=0,k=0;if(g==h.currentSheetIndex?P(y)==="object"&&y.op==="enterEdit"?(b=y.range[y.range.length-1].row[0],k=y.range[y.range.length-1].column[0],e.multipleRangeShow(u,d,b,k,y.op)):(b=y[y.length-1].row[0],k=y[y.length-1].column[0],e.multipleRangeShow(u,d,b,k)):P(y)==="object"&&y.op==="enterEdit"?(b=y.range[y.range.length-1].row[0],k=y.range[y.range.length-1].column[0]):(b=y[y.length-1].row[0],k=y[y.length-1].column[0]),h.cooperativeEdit.checkoutData.length===0&&(y.op?h.cooperativeEdit.checkoutData.push({id:u,username:d,r:b,c:k,op:y.op,index:g}):h.cooperativeEdit.checkoutData.push({id:u,username:d,r:b,c:k,index:g})),h.cooperativeEdit.checkoutData.some(x=>x.id==u)?h.cooperativeEdit.checkoutData.forEach(x=>{x.id==u&&(x.username=d,x.r=b,x.c=k,x.index=g,y.op==="enterEdit"&&(x.op=y.op))}):y.op==="enterEdit"?h.cooperativeEdit.checkoutData.push({id:u,username:d,r:b,c:k,op:y.op,index:g}):h.cooperativeEdit.checkoutData.push({id:u,username:d,r:b,c:k,index:g}),h.cooperativeEdit.checkoutData.forEach(x=>{x.index!=h.currentSheetIndex&&($("#luckysheet-multipleRange-show-"+x.id).hide(),x.op=="")}),$("#luckysheet-multipleRange-show-"+u)[0]){let x=$("#luckysheet-multipleRange-show-"+u)[0].offsetHeight-1;$("#luckysheet-multipleRange-show-"+u+">.username").css({bottom:x+"px"})}}else if(a==4){let u=l.data===""?l.data:JSON.parse(l.data);for(let d=0;d<u.length;d++)e.wsUpdateMsg(item[d])}else a==5?Fa(l.data):a==6&&_i()},e.websocket.onerror=function(){e.wxErrorCount++,e.wxErrorCount>3?Fa(Q().websocket.refresh):(Fa(Q().websocket.wait),e.openWebSocket())},e.websocket.onclose=function(t){console.info(Q().websocket.close),t.code===1e3?(clearInterval(e.retryTimer),e.retryTimer=null):alert(Q().websocket.contact)}}else alert(Q().websocket.support)},wsUpdateMsg:function(e){let n=e.t,t=e.i,l=e.v,a=h.luckysheetfile[Z(t)];if(!(["v","rv","cg","all","fc","drc","arc","f","fsc","fsr","sh","c"].includes(n)&&a==null))if(n=="v"){if(a.data==null||a.data.length==0)return;let o=e.r,s=e.c;a.data[o][s]=l,t==h.currentSheetIndex&&(h.flowdata=a.data,xe.webWorkerFlowDataCache(h.flowdata),l!=null&&l.ps!=null?He.buildPs(o,s,l.ps):He.buildPs(o,s,null),setTimeout(function(){Be()},1))}else if(n=="rv"){if(Object.keys(e.range).length>0&&(h.cooperativeEdit.merge_range=e.range,h.cooperativeEdit.merge_range.v=e.v,Gn()),a.data==null||a.data.length==0)return;let o=e.range.row[0],s=e.range.row[1],u=e.range.column[0],d=e.range.column[1];for(let f=o;f<=s;f++)for(let m=u;m<=d;m++)a.data[f][m]=l[f-o][m-u];if(t==h.currentSheetIndex){h.flowdata=a.data,xe.webWorkerFlowDataCache(h.flowdata);for(let f=o;f<=s;f++)for(let m=u;m<=d;m++)l[f-o][m-u]!=null&&l[f-o][m-u].ps!=null?He.buildPs(f,m,l[f-o][m-u].ps):He.buildPs(f,m,null);setTimeout(function(){Be()},1)}}else if(n=="cg"){let o=e.k;o=="borderInfo"?a.config.borderInfo=l:(o in a.config||(a.config[o]={}),l&&typeof l=="object"&&(a.config[o]=l)),t==h.currentSheetIndex&&(h.config=a.config,(o=="rowlen"||o=="columnlen"||o=="rowhidden")&&St(h.flowdata.length,h.flowdata[0].length),setTimeout(function(){Be()},1))}else if(n=="all"){let o=e.k;if(a[o]=l,o=="name")$("#luckysheet-sheet-container-c #luckysheet-sheets-item"+t).find("span.luckysheet-sheets-item-name").html(l);else if(o=="color"){let s=$("#luckysheet-sheet-container-c #luckysheet-sheets-item"+t);s.find(".luckysheet-sheets-item-color").remove(),(l!=null||l!="")&&s.append('<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+l+';"></div>')}else if(o!="pivotTable")if(o=="frozen"){if(Y.frozenTofreezen(),t==h.currentSheetIndex){let u=Q().freezen;a.freezen.horizontal==null?($("#luckysheet-freezen-btn-horizontal").html('<i class="fa fa-list-alt"></i> '+u.freezenRow),Y.freezenhorizontaldata=null,$("#luckysheet-freezebar-horizontal").hide()):Y.createFreezenHorizontal(a.freezen.horizontal.freezenhorizontaldata,a.freezen.horizontal.top),a.freezen.vertical==null?($("#luckysheet-freezen-btn-vertical").html('<i class="fa fa-indent"></i> '+u.freezenColumn),Y.freezenverticaldata=null,$("#luckysheet-freezebar-vertical").hide()):Y.createFreezenVertical(a.freezen.vertical.freezenverticaldata,a.freezen.vertical.left),Y.createAssistCanvas()}}else o=="filter_select"?t==h.currentSheetIndex&&Dl(l):o=="filter"?t==h.currentSheetIndex&&Dl(a.filter_select,l):o=="luckysheet_conditionformat_save"?t==h.currentSheetIndex&&setTimeout(function(){Be()},1):o=="luckysheet_alternateformat_save"?t==h.currentSheetIndex&&setTimeout(function(){Be()},1):o=="config"?t==h.currentSheetIndex&&(h.config=l,St(h.flowdata.length,h.flowdata[0].length)):o=="dynamicArray"?t==h.currentSheetIndex&&setTimeout(function(){Be()},1):o=="images"?t==h.currentSheetIndex&&(Re.images=l,Re.allImagesShow(),Re.init()):o=="dataVerification"?t==h.currentSheetIndex&&(Ye.dataVerification=l,Ye.init()):o=="hyperlink"&&t==h.currentSheetIndex&&(Cl.hyperlink=l,Cl.init())}else if(n=="fc"){let o=e.op,s=e.pos;P(l)!="object"&&(l=new Function("return "+l)());let u=l.r,d=l.c,f=a.calcChain==null?[]:a.calcChain;if(o=="add")f.push(l);else if(o=="del")for(let m=0;m<f.length;m++)u==f[m].r&&d==f[m].c&&t==f[m].index&&f.splice(m,1);setTimeout(function(){Be()},1)}else if(n=="drc"){if(a.data==null||a.data.length==0)return;let o=e.rc,s=l.index,u=l.len,d=l.mc,f=l.borderInfo,m=a.data;if(o=="r"){a.row-=u,m.splice(s,u);let g=[];for(let y=0;y<m[0].length;y++)g.push(null);for(let y=0;y<u;y++)m.push(g)}else{a.column-=u;let g=[];for(let y=0;y<u;y++)g.push(null);for(let y=0;y<m.length;y++)m[y].splice(s,u),m[y]=m[y].concat(g)}for(let g in d){let y=d[g].r,v=d[g].c;m[y][v].mc=d[g]}a.config.merge=d,a.config.borderInfo=f,t==h.currentSheetIndex&&(h.flowdata=m,xe.webWorkerFlowDataCache(h.flowdata),h.config.merge=d,h.config.borderInfo=f,setTimeout(function(){Be()},1))}else if(n=="arc"){if(a.data==null||a.data.length==0)return;let o=e.rc,s=l.index,u=l.len,d=l.data,f=l.direction,m=l.mc,g=l.borderInfo,y=$.extend(!0,[],a.data);if(o=="r"){a.row+=u;let v=[];for(let k=0;k<y[0].length;k++)v.push(null);let b=[];for(let k=0;k<u;k++)d[k]==null?b.push(JSON.stringify(v)):b.push(JSON.stringify(d[k]));f=="lefttop"?s==0?new Function("data","return data.unshift("+b.join(",")+")")(y):new Function("data","return data.splice("+s+", 0, "+b.join(",")+")")(y):new Function("data","return data.splice("+(s+1)+", 0, "+b.join(",")+")")(y)}else{a.column+=u;for(let v=0;v<y.length;v++)for(let b=0;b<u;b++)f=="lefttop"?y[v].splice(s,0,d[b]):y[v].splice(s+1,0,d[b])}for(let v in m){let b=m[v].r,k=m[v].c;y[b][k].mc=m[v]}a.data=y,a.config.merge=m,a.config.borderInfo=g,t==h.currentSheetIndex&&(h.flowdata=y,xe.webWorkerFlowDataCache(h.flowdata),h.config.merge=m,h.config.borderInfo=g,setTimeout(function(){Be()},1))}else if(n=="f"){let o=e.op,s=e.pos,u=a.filter;u==null&&(u={}),o=="upOrAdd"?u[s]=l:o=="del"&&delete u[s],t==h.currentSheetIndex&&Dl(a.filter_select,u)}else if(n=="fsc")a.filter=null,a.filter_select=null,t==h.currentSheetIndex&&($("#luckysheet-filter-selected-sheet"+h.currentSheetIndex+", #luckysheet-filter-options-sheet"+h.currentSheetIndex).remove(),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide());else if(n=="fsr")a.filter=l.filter,a.filter_select=l.filter_select,t==h.currentSheetIndex&&Dl(a.filter_select,a.filter);else if(n=="sha"){h.luckysheetfile.push(l);let o="";l.color!=null&&(o='<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+l.color+';"></div>'),$("#luckysheet-sheet-container-c").append(_e(Ql,{index:l.index,active:"",name:l.name,style:"",colorset:o})),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+l.index+'" class="luckysheet-datavisual-selection-set"></div>'),ve.locationSheet()}else if(n=="shc"){let o=l.copyindex,s=l.name,u=Z(o),d=$.extend(!0,{},h.luckysheetfile[u]);d.index=t,d.name=s,h.luckysheetfile.splice(u+1,0,d);let f=$("#luckysheet-sheets-item"+o);$("#luckysheet-sheet-container-c").append(_e(Ql,{index:d.index,active:"",name:d.name,style:"",colorset:""})),$("#luckysheet-sheets-item"+d.index).insertAfter(f),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+d.index+'" class="luckysheet-datavisual-selection-set"></div>')}else if(n=="shd"){for(let o=0;o<h.luckysheetfile.length;o++)if(h.luckysheetfile[o].index==l.deleIndex){if(h.currentSheetIndex===l.deleIndex){let s=l.deleIndex;h.luckysheetfile[ve.getSheetIndex(s)].hide=1;let u=$("#luckysheet-sheets-item"+s);u.hide(),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active");let d=u.nextAll(":visible");u.nextAll(":visible").length>0?d=d.eq(0).data("index"):d=u.prevAll(":visible").eq(0).data("index"),$("#luckysheet-sheets-item"+d).addClass("luckysheet-sheets-item-active"),ve.changeSheetExec(d)}ga.sheetDeleSave.push(h.luckysheetfile[o]),h.luckysheetfile.splice(o,1);break}$("#luckysheet-sheets-item"+l.deleIndex).remove(),$("#luckysheet-datavisual-selection-set-"+l.deleIndex).remove(),ve.locationSheet()}else if(n=="shr")for(let o in l)h.luckysheetfile[Z(o)].order=l[o];else if(n=="shre"){for(let o=0;o<ga.sheetDeleSave.length;o++)if(ga.sheetDeleSave[o].index==l.reIndex){let s=ga.sheetDeleSave[o];h.luckysheetfile.push(s);let u="";l.color!=null&&(u='<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+s.color+';"></div>'),$("#luckysheet-sheet-container-c").append(_e(Ql,{index:s.index,active:"",name:s.name,style:"",colorset:u})),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+s.index+'" class="luckysheet-datavisual-selection-set"></div>');break}}else if(n=="sh"){let o=e.op,s=e.cur;o=="hide"?(a.hide=1,$("#luckysheet-sheets-item"+t).hide(),t==h.currentSheetIndex&&($("#luckysheet-sheets-item"+s).addClass("luckysheet-sheets-item-active"),ve.changeSheetExec(s))):o=="show"&&(a.hide=0,$("#luckysheet-sheets-item"+t).show()),ve.locationSheet()}else if(n=="c"){let o=e.op,s=e.cid;if(o=="add")a.chart.push(l),luckysheet.insertChartTosheet(l.sheetIndex,l.dataSheetIndex,l.option,l.chartType,l.selfOption,l.defaultOption,l.row,l.column,l.chart_selection_color,l.chart_id,l.chart_selection_id,l.chartStyle,l.rangeConfigCheck,l.rangeRowCheck,l.rangeColCheck,l.chartMarkConfig,l.chartTitleConfig,l.winWidth,l.winHeight,l.scrollLeft1,l.scrollTop1,l.chartTheme,l.myWidth,l.myHeight,l.myLeft,l.myTop,l.myindexrank1,!0);else if(o=="xy"||o=="wh"||o=="update")for(let u=0;u<a.chart.length;u++){let d=a.chart[u];if(d.chart_id==s){for(let f in d)for(let m in l)f==m&&(d[f]=l[m]);ve.saveChart(d);return}}else if(o=="del"){for(let u=0;u<a.chart.length;u++)if(a.chart[u].chart_id==s){a.chart.splice(u,1),$("#"+s).remove(),ve.delChart($("#"+s).attr("chart_id"),$("#"+s).attr("sheetIndex"));return}}}else n=="na"&&$("#luckysheet_info_detail_input").val(l).css("width",ya(l)*10)},multipleIndex:0,multipleRangeShow:function(e,n,t,l,a){let o=this,s=n,u=h.visibledatarow[t],d=t-1==-1?0:h.visibledatarow[t-1],f=h.visibledatacolumn[l],m=l-1==-1?0:h.visibledatacolumn[l-1],g=ke.mergeborer(h.flowdata,t,l);if(g&&(u=g.row[1],d=g.row[0],f=g.column[1],m=g.column[0]),m<=0&&(m+=1),d<=0&&(d+=1),ya(n)>16&&(n=ya(n,16)+"..."),a==="enterEdit"&&(n+=" "+Q().edit.typing),$("#luckysheet-multipleRange-show-"+e).length>0)$("#luckysheet-multipleRange-show-"+e).css({position:"absolute",left:m-1,width:f-m-1,top:d-1,height:u-d-1}),$("#luckysheet-multipleRange-show-"+e+" .username").text(n),$("#luckysheet-multipleRange-show-"+e+" .username").show(),h.cooperativeEdit.usernameTimeout["user"+e]!=null&&clearTimeout(h.cooperativeEdit.usernameTimeout["user"+e]),h.cooperativeEdit.usernameTimeout["user"+e]=setTimeout(()=>{clearTimeout(h.cooperativeEdit.usernameTimeout["user"+e]),h.cooperativeEdit.usernameTimeout["user"+e]=null},10*1e3);else{let y=`<div |
| | | </div>`;$(w).appendTo($("#luckysheet-cell-main"))},ref:function(e,n,t,l,a){let o=this;if(h.clearjfundo){h.jfundo.length=0;let s={};s.type="updateHyperlink",s.sheetIndex=t,s.historyHyperlink=e,s.currentHyperlink=n,s.data=h.flowdata,s.curData=l,s.range=a,h.jfredo.push(s)}o.hyperlink=n,h.luckysheetfile[Z(t)].hyperlink=n,h.flowdata=l,xe.webWorkerFlowDataCache(h.flowdata),h.luckysheetfile[Z(t)].data=h.flowdata,ne.allowUpdate&&(ne.saveParam("all",t,n,{k:"hyperlink"}),ne.historyParam(h.flowdata,t,a[0])),setTimeout(function(){Be()},1)}},Cl=hv});function dc(e,n,t){p.execFunctionExist=[];for(let l=0;l<e.length;l++)for(let a=e[l].row[0];a<=e[l].row[1];a++)for(let o=e[l].column[0];o<=e[l].column[1];o++)p.execFunctionExist.push({r:a,c:o,i:n});p.execFunctionExist.reverse(),p.execFunctionGroup(null,null,null,null,t),p.execFunctionGlobalData=null}function Ze(e,n,t,l=!0,a=!0){e==null&&(e=h.flowdata),n==null&&(n=h.luckysheet_select_save),n=JSON.parse(JSON.stringify(n)),clearTimeout(Dr),t==null&&(t={});let o=t.cfg,s=t.RowlChange,u=t.cdformat,f=t.dataVerification,d=t.dynamicArray,m=t.hyperlink,g=h.luckysheetfile[Z(h.currentSheetIndex)];if(h.clearjfundo){h.jfundo.length=0;let y;o==null?y=$.extend(!0,{},h.config):y=$.extend(!0,{},o);let v;u==null?v=$.extend(!0,[],g.luckysheet_conditionformat_save):v=u;let b;f==null?b=$.extend(!0,{},g.dataVerification):b=f;let k;d==null?k=$.extend(!0,[],g.dynamicArray):k=d,h.jfredo.push({type:"datachange",data:h.flowdata,curdata:e,sheetIndex:h.currentSheetIndex,config:$.extend(!0,{},h.config),curConfig:y,cdformat:$.extend(!0,[],g.luckysheet_conditionformat_save),curCdformat:v,RowlChange:s,dataVerification:$.extend(!0,[],g.dataVerification),curDataVerification:b,dynamicArray:$.extend(!0,[],g.dynamicArray),curDynamicArray:k,hyperlink:m&&$.extend(!0,{},g.hyperlink),curHyperlink:m,range:n,dataRange:[...g.luckysheet_select_save]})}h.flowdata=e,xe.webWorkerFlowDataCache(h.flowdata),g.data=h.flowdata,o!=null&&(h.config=o,g.config=h.config,ne.saveParam("all",h.currentSheetIndex,o,{k:"config"}),s!=null&&St(h.flowdata.length,h.flowdata[0].length)),u!=null&&u.length!==0&&(g.luckysheet_conditionformat_save=u,ne.saveParam("all",h.currentSheetIndex,u,{k:"luckysheet_conditionformat_save"})),f!=null&&Object.keys(f).length!==0&&(Ye.dataVerification=f,g.dataVerification=f,ne.saveParam("all",h.currentSheetIndex,f,{k:"dataVerification"})),d!=null&&(g.dynamicArray=d,ne.saveParam("all",h.currentSheetIndex,d,{k:"dynamicArray"})),m!=null&&(g.hyperlink=m,Cl.hyperlink=m,ne.saveParam("all",h.currentSheetIndex,m,{k:"hyperlink"}));for(let y=0;y<n.length;y++){let v=n[y].row[0],b=n[y].column[0];if(h.flowdata[v][b]!=null&&h.flowdata[v][b].spl!=null){window.luckysheetCurrentRow=v,window.luckysheetCurrentColumn=b,window.luckysheetCurrentFunction=h.flowdata[v][b].f;let k=$.trim(p.functionParserExe(h.flowdata[v][b].f)),w=new Function("return "+k)();h.flowdata[v][b].spl=w}ne.allowUpdate&&ne.historyParam(h.flowdata,h.currentSheetIndex,n[y]),typeof h.chartparam.jfrefreshchartall=="function"&&h.chartparam.jfrefreshchartall(h.flowdata,n[y].row[0],n[y].row[1],n[y].column[0],n[y].column[1])}l&&dc(n,h.currentSheetIndex,e),a&&(Dr=setTimeout(function(){Be()},1)),lt(),window.luckysheet_getcelldata_cache=null}function Zl(e,n,t,l,a,o,s,u,f=!0){let d={},m=!1;if(clearTimeout(Dr),o=="cellRowChange"){d.type="cellRowChange",d.config=$.extend(!0,{},h.config),d.curconfig=$.extend(!0,{},l),d.range=$.extend(!0,[],h.luckysheet_select_save),d.currange=a,d.ctrlType=o,d.ctrlValue=s;let g=l.rowlen;g==null&&(g={}),ne.saveParam("cg",h.currentSheetIndex,g,{k:"rowlen"})}else if(o=="resizeC"){d.type="resize",d.config=$.extend(!0,{},h.config),d.curconfig=$.extend(!0,{},l),d.range=$.extend(!0,[],h.luckysheet_select_save),d.currange=a,d.ctrlType=o,d.ctrlValue=s;let g=l.columnlen;g==null&&(g={}),ne.saveParam("cg",h.currentSheetIndex,g,{k:"columnlen"})}else if(o.indexOf("extend")>-1)d.type="extend",d.config=$.extend(!0,{},h.config),d.curconfig=$.extend(!0,{},l),d.range=$.extend(!0,[],h.luckysheet_select_save),d.currange=a,d.ctrlType=o,d.ctrlValue=s,ne.saveParam("arc",h.currentSheetIndex,{index:s.index,len:s.len,direction:s.direction,mc:l.merge},{rc:s.type});else if(o.indexOf("dele")>-1)d.type="dele",d.config=$.extend(!0,{},h.config),d.curconfig=$.extend(!0,{},l),d.range=$.extend(!0,[],h.luckysheet_select_save),d.currange=a,d.ctrlType=o,d.ctrlValue=s,ne.saveParam("drc",h.currentSheetIndex,{index:s.index,len:s.len,mc:l.merge,borderInfo:l.borderInfo},{rc:s.type});else{d.type="datachangeAll",d.range=$.extend(!0,[],h.luckysheet_select_save),d.currange=a,d.ctrlType=o,d.ctrlValue=s,m=!0;for(let g=0;g<a.length;g++)ne.historyParam(t,h.currentSheetIndex,a[g])}h.clearjfundo&&(h.jfundo.length=0,d.data=h.flowdata,d.curdata=t,d.sheetIndex=h.currentSheetIndex,d.cdformat=$.extend(!0,[],h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save),d.curCdformat=u,h.jfredo.push(d)),h.flowdata=t,xe.webWorkerFlowDataCache(t),h.luckysheetfile[Z(h.currentSheetIndex)].data=h.flowdata,l!=null&&(h.config=l,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("all",h.currentSheetIndex,l,{k:"config"})),u!=null&&(h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save=u,ne.saveParam("all",h.currentSheetIndex,u,{k:"luckysheet_conditionformat_save"})),h.luckysheet_select_save=$.extend(!0,[],a),h.luckysheet_select_save.length>0&<(),m&&dc(a,h.currentSheetIndex,t),St(n,e),f&&(Dr=setTimeout(function(){Be()},1)),ve.storeSheetParamALL(),window.luckysheet_getcelldata_cache=null}function Ea(e,n,t){clearTimeout(Dr),h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"rangechange",data:h.flowdata,curdata:e,range:n,sheetIndex:h.currentSheetIndex,cdformat:$.extend(!0,[],h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save),curCdformat:t})),h.flowdata=e,xe.webWorkerFlowDataCache(h.flowdata),h.luckysheetfile[Z(h.currentSheetIndex)].data=h.flowdata,t!=null&&(h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save=t),dc(n,h.currentSheetIndex,e),Dr=setTimeout(function(){Be()},1);for(let l=0;l<n.length;l++)ne.historyParam(h.flowdata,h.currentSheetIndex,n[l])}function jn(e,n,t,l,a,o,s,u,f,d,m){let g=h.luckysheetfile[Z(h.currentSheetIndex)];Gn();let y=[];for(let x in n.merge){let C=n.merge[x];for(let S=C.r;S<=C.r+C.rs-1;S++)for(let _=C.c;_<=C.c+C.cs-1;_++)e[S][_]==null&&(e[S][_]={}),S==C.r&&_==C.c?e[S][_].mc=C:e[S][_].mc={r:C.r,c:C.c},y.push({r:S,c:_})}let v=[];h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:t,sheetIndex:h.currentSheetIndex,data:h.flowdata,curData:e,config:$.extend(!0,{},h.config),curConfig:n,ctrlValue:l,mcData:y,calc:$.extend(!0,[],g.calcChain),curCalc:a,funcData:v,filterObj:{filter_select:$.extend(!0,{},g.filter_select),filter:$.extend(!0,{},g.filter)},curFilterObj:o,cf:$.extend(!0,[],g.luckysheet_conditionformat_save),curCf:s,af:$.extend(!0,[],g.luckysheet_alternateformat_save),curAf:u,freezen:{freezenhorizontaldata:Y.freezenhorizontaldata,freezenverticaldata:Y.freezenverticaldata},curFreezen:f,dataVerification:$.extend(!0,{},g.dataVerification),curDataVerification:d,hyperlink:$.extend(!0,{},g.hyperlink),curHyperlink:m,range:g.luckysheet_select_save,dataRange:[...g.luckysheet_select_save]}));let b=l.index,k=l.len,w=l.rc;if(t=="addRC"){let x=l.direction,C=l.restore,S=[];if(C){if(w=="r"){let _;x=="lefttop"?_=b:x=="rightbottom"&&(_=b+1);let T=_+k-1;for(let A=_;A<=T;A++){let R=[];for(let I=0;I<e[0].length;I++){let F=e[A][I];R.push(F)}S.push(R)}}else if(w=="c"){let _;x=="lefttop"?_=b:x=="rightbottom"&&(_=b+1);let T=_+k-1;for(let A=0;A<e.length;A++){let R=[];for(let I=_;I<=T;I++){let F=e[A][I];R.push(F)}S.push(R)}}}ne.saveParam("arc",h.currentSheetIndex,{index:b,len:k,direction:x,data:S},{rc:w})}else t=="delRC"&&ne.saveParam("drc",h.currentSheetIndex,{index:b,len:k},{rc:w});h.flowdata=e,xe.webWorkerFlowDataCache(h.flowdata),g.data=e,h.config=n,g.config=h.config,ne.saveParam("all",h.currentSheetIndex,n,{k:"config"});for(let x=0;x<y.length;x++){let C=y[x].r,S=y[x].c;ne.saveParam("v",h.currentSheetIndex,h.flowdata[C][S],{r:C,c:S})}if(a.length>0)for(let x=0;x<a.length;x++){let C=a[x],S=C.r,_=C.c,T=C.index,A=zl(S,_,T,e),R=p.execfunction(A,S,_,T,null,!0);C.func=R,e[S][_].f==A&&Ht(S,_,e,R[1])}g.calcChain=a,ne.saveParam("all",h.currentSheetIndex,a,{k:"calcChain"});for(let x=0;x<v.length;x++){let C=v[x].r,S=v[x].c;ne.saveParam("v",h.currentSheetIndex,h.flowdata[C][S],{r:C,c:S})}o!=null?(g.filter_select=o.filter_select,g.filter=o.filter):(g.filter_select=null,g.filter=null),Dl(g.filter_select,g.filter),ne.saveParam("all",h.currentSheetIndex,g.filter_select,{k:"filter_select"}),ne.saveParam("all",h.currentSheetIndex,g.filter,{k:"filter"}),g.luckysheet_conditionformat_save=s,ne.saveParam("all",h.currentSheetIndex,g.luckysheet_conditionformat_save,{k:"luckysheet_conditionformat_save"}),g.luckysheet_alternateformat_save=u,ne.saveParam("all",h.currentSheetIndex,g.luckysheet_alternateformat_save,{k:"luckysheet_alternateformat_save"}),f!=null?(Y.freezenhorizontaldata=f.freezenhorizontaldata,Y.freezenverticaldata=f.freezenverticaldata):(Y.freezenhorizontaldata=null,Y.freezenverticaldata=null),Ye.dataVerification=d,g.dataVerification=d,ne.saveParam("all",h.currentSheetIndex,g.dataVerification,{k:"dataVerification"}),Cl.hyperlink=m,g.hyperlink=m,ne.saveParam("all",h.currentSheetIndex,g.hyperlink,{k:"hyperlink"}),St(h.flowdata.length,h.flowdata[0].length)}function Ai(e,n,t,l,a,o,s,u){let f=h.luckysheetfile[Z(h.currentSheetIndex)];clearTimeout(Dr),Gn();let d=[];if(JSON.stringify(n.merge)=="{}")for(let g=0;g<e.length;g++)for(let y=0;y<e[0].length;y++){let v=e[g][y];v!=null&&v.mc!=null&&(delete v.mc,d.push({r:g,c:y}))}else for(let g in n.merge){let y=n.merge[g];for(let v=y.r;v<=y.r+y.rs-1;v++)for(let b=y.c;b<=y.c+y.cs-1;b++)if(e[v][b]==null&&(e[v][b]={}),v==y.r&&b==y.c)JSON.stringify(e[v][b].mc)!=JSON.stringify(y)&&(e[v][b].mc=y,d.push({r:v,c:b}));else{let k={r:y.r,c:y.c};JSON.stringify(e[v][b].mc)!=JSON.stringify(k)&&(e[v][b].mc=k,d.push({r:v,c:b}))}}let m=[];if(h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"deleteCell",sheetIndex:h.currentSheetIndex,ctrl:t,data:h.flowdata,curData:e,config:$.extend(!0,{},h.config),curConfig:n,mcData:d,calc:$.extend(!0,[],f.calcChain),curCalc:l,funcData:m,filterObj:{filter_select:$.extend(!0,{},f.filter_select),filter:$.extend(!0,{},f.filter)},curFilterObj:a,cf:$.extend(!0,[],f.luckysheet_conditionformat_save),curCf:o,dataVerification:$.extend(!0,{},f.dataVerification),curDataVerification:s,hyperlink:$.extend(!0,{},f.hyperlink),curHyperlink:u,range:f.luckysheet_select_save,dataRange:[...f.luckysheet_select_save]})),h.flowdata=e,xe.webWorkerFlowDataCache(h.flowdata),f.data=e,ne.allowUpdate){let g=t.type,y=t.str,v=t.edr,b=t.stc,k=t.edc,w;g=="moveUp"?w={row:[y,e.length-1],column:[b,k]}:g=="moveLeft"&&(w={row:[y,v],column:[b,e[0].length-1]}),ne.historyParam(h.flowdata,h.currentSheetIndex,w)}h.config=n,f.config=h.config,ne.saveParam("all",h.currentSheetIndex,n,{k:"config"});for(let g=0;g<d.length;g++){let y=d[g].r,v=d[g].c;ne.saveParam("v",h.currentSheetIndex,h.flowdata[y][v],{r:y,c:v})}if(l.length>0)for(let g=0;g<l.length;g++){let y=l[g],v=y.r,b=y.c,k=y.index,w=zl(v,b,k,e),x=p.execfunction(w,v,b,k,null,!0);y.func=x,e[v][b].f==w&&Ht(v,b,e,x[1])}f.calcChain=l,ne.saveParam("all",h.currentSheetIndex,l,{k:"calcChain"});for(let g=0;g<m.length;g++){let y=m[g].r,v=m[g].c;ne.saveParam("v",h.currentSheetIndex,h.flowdata[y][v],{r:y,c:v})}a!=null?(f.filter_select=a.filter_select,f.filter=a.filter):(f.filter_select=null,f.filter=null),Dl(f.filter_select,f.filter),ne.saveParam("all",h.currentSheetIndex,f.filter_select,{k:"filter_select"}),ne.saveParam("all",h.currentSheetIndex,f.filter,{k:"filter"}),f.luckysheet_conditionformat_save=o,ne.saveParam("all",h.currentSheetIndex,f.luckysheet_conditionformat_save,{k:"luckysheet_conditionformat_save"}),Ye.dataVerification=s,f.dataVerification=s,ne.saveParam("all",h.currentSheetIndex,f.dataVerification,{k:"dataVerification"}),Cl.hyperlink=u,f.hyperlink=u,ne.saveParam("all",h.currentSheetIndex,f.hyperlink,{k:"hyperlink"}),Dr=setTimeout(function(){Be()},1)}function Ga(e,n,t){let l={};p.execFunctionExist=[],clearTimeout(Dr);for(let u=e.range.row[0];u<=e.range.row[1];u++)for(let f=e.range.column[0];f<=e.range.column[1];f++)u+"_"+f+"_"+e.sheetIndex in l||(l[u+"_"+f+"_"+e.sheetIndex]=0,p.execFunctionExist.push({r:u,c:f,i:e.sheetIndex}));for(let u=n.range.row[0];u<=n.range.row[1];u++)for(let f=n.range.column[0];f<=n.range.column[1];f++)u+"_"+f+"_"+n.sheetIndex in l||(l[u+"_"+f+"_"+n.sheetIndex]=0,p.execFunctionExist.push({r:u,c:f,i:n.sheetIndex}));h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"pasteCut",source:e,target:n,RowlChange:t}));let a;if(h.currentSheetIndex==e.sheetIndex?(h.config=e.curConfig,a=e.curData.length,h.luckysheetfile[Z(n.sheetIndex)].config=n.curConfig):h.currentSheetIndex==n.sheetIndex&&(h.config=n.curConfig,a=n.curData.length,h.luckysheetfile[Z(e.sheetIndex)].config=e.curConfig),t){h.visibledatarow=[],h.rh_height=0;for(let u=0;u<a;u++){let f=h.defaultrowlen;if(h.config.rowlen!=null&&h.config.rowlen[u]!=null&&(f=h.config.rowlen[u]),h.config.rowhidden!=null&&h.config.rowhidden[u]!=null){f=h.config.rowhidden[u],h.visibledatarow.push(h.rh_height);continue}else h.rh_height+=f+1;h.visibledatarow.push(h.rh_height)}if(h.rh_height+=80,h.currentSheetIndex==e.sheetIndex){let u=go(n.curData.length,n.curConfig);h.luckysheetfile[Z(n.sheetIndex)].visibledatarow=u}else if(h.currentSheetIndex==n.sheetIndex){let u=go(e.curData.length,e.curConfig);h.luckysheetfile[Z(e.sheetIndex)].visibledatarow=u}}h.currentSheetIndex==e.sheetIndex?(h.flowdata=e.curData,h.luckysheetfile[Z(n.sheetIndex)].data=n.curData):h.currentSheetIndex==n.sheetIndex&&(h.flowdata=n.curData,h.luckysheetfile[Z(e.sheetIndex)].data=e.curData),xe.webWorkerFlowDataCache(h.flowdata),h.luckysheetfile[Z(h.currentSheetIndex)].data=h.flowdata,h.currentSheetIndex==n.sheetIndex?h.luckysheet_select_save=[{row:n.range.row,column:n.range.column}]:h.luckysheet_select_save=[{row:e.range.row,column:e.range.column}],h.luckysheet_select_save.length>0&<(),h.luckysheetfile[Z(e.sheetIndex)].luckysheet_conditionformat_save=e.curCdformat,h.luckysheetfile[Z(n.sheetIndex)].luckysheet_conditionformat_save=n.curCdformat,h.currentSheetIndex==e.sheetIndex?Ye.dataVerification=e.curDataVerification:h.currentSheetIndex==n.sheetIndex&&(Ye.dataVerification=n.curDataVerification),h.luckysheetfile[Z(e.sheetIndex)].dataVerification=e.curDataVerification,h.luckysheetfile[Z(n.sheetIndex)].dataVerification=n.curDataVerification,p.execFunctionExist.reverse(),p.execFunctionGroup(null,null,null,null,n.curData),p.execFunctionGlobalData=null;let o=Z(h.currentSheetIndex),s=h.luckysheetfile[o];s.scrollTop=$("#luckysheet-cell-main").scrollTop(),s.scrollLeft=$("#luckysheet-cell-main").scrollLeft(),ve.showSheet(),Dr=setTimeout(function(){Be()},1),ve.storeSheetParamALL(),ne.saveParam("all",e.sheetIndex,e.curConfig,{k:"config"}),ne.saveParam("all",n.sheetIndex,n.curConfig,{k:"config"}),ne.historyParam(e.curData,e.sheetIndex,{row:e.range.row,column:e.range.column}),ne.historyParam(n.curData,n.sheetIndex,{row:n.range.row,column:n.range.column}),ne.saveParam("all",e.sheetIndex,e.curCdformat,{k:"luckysheet_conditionformat_save"}),ne.saveParam("all",n.sheetIndex,n.curCdformat,{k:"luckysheet_conditionformat_save"}),ne.saveParam("all",e.sheetIndex,e.curDataVerification,{k:"dataVerification"}),ne.saveParam("all",n.sheetIndex,n.curDataVerification,{k:"dataVerification"})}function St(e,n,t=!0){yn(e,n),clearTimeout(Dr),ve.storeSheetParam();let l=h.luckysheetfile[Z(h.currentSheetIndex)].calcChain;if(l!=null&&l.length>0){h.config.rowlen==null&&(h.config.rowlen={}),h.config.columnlen==null&&(h.config.columnlen={});for(let a=0;a<l.length;a++){let o=l[a].r,s=l[a].c;if(l[a].index==h.currentSheetIndex&&h.flowdata[o][s]!=null&&h.flowdata[o][s].spl!=null&&(o in h.config.rowlen||s in h.config.columnlen)){window.luckysheetCurrentRow=o,window.luckysheetCurrentColumn=s,window.luckysheetCurrentFunction=h.flowdata[o][s].f;let f=$.trim(p.functionParserExe(h.flowdata[o][s].f)),d=new Function("return "+f)();h.flowdata[o][s].spl=d,ne.saveParam("v",h.currentSheetIndex,h.flowdata[o][s],{r:o,c:s})}}h.luckysheetfile[Z(h.currentSheetIndex)].data=h.flowdata}if(He.positionSync(),lt(),Gn(),$(".luckysheet-selection-copy").is(":visible")&&Ot(),$("#luckysheet-dropCell-icon").is(":visible")&&$("#luckysheet-dropCell-icon").remove(),Y.freezenhorizontaldata!=null&&Y.freezenverticaldata!=null){let a=Y.freezenhorizontaldata[1]-1,o=Y.freezenverticaldata[1]-1,s=Y.freezenhorizontaldata[2],u=Y.freezenverticaldata[2],f=h.visibledatarow[a]-2-s+h.columnHeaderHeight,d=[h.visibledatarow[a],a+1,s,Y.cutVolumn(h.visibledatarow,a+1),f],m=h.visibledatacolumn[o]-2-u+h.rowHeaderWidth,g=[h.visibledatacolumn[o],o+1,u,Y.cutVolumn(h.visibledatacolumn,o+1),m];Y.saveFreezen(d,f,g,m),Y.createFreezenHorizontal(d,f),Y.createFreezenVertical(g,m),Y.createAssistCanvas()}else if(Y.freezenhorizontaldata!=null){let a=Y.freezenhorizontaldata[1]-1,o=Y.freezenhorizontaldata[2],s=h.visibledatarow[a]-2-o+h.columnHeaderHeight,u=[h.visibledatarow[a],a+1,o,Y.cutVolumn(h.visibledatarow,a+1),s];Y.saveFreezen(u,s,null,null),Y.createFreezenHorizontal(u,s),Y.createAssistCanvas()}else if(Y.freezenverticaldata!=null){let a=Y.freezenverticaldata[1]-1,o=Y.freezenverticaldata[2],s=h.visibledatacolumn[a]-2-o+h.rowHeaderWidth,u=[h.visibledatacolumn[a],a+1,o,Y.cutVolumn(h.visibledatacolumn,a+1),s];Y.saveFreezen(null,null,u,s),Y.createFreezenVertical(u,s),Y.createAssistCanvas()}else $("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").length>0&&$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").each(function(a,o){let s=$(o).data("str"),u=$(o).data("cindex"),f=h.visibledatacolumn[u]-20,d=s-1==-1?0:h.visibledatarow[s-1];$(o).css({left:f,top:d})});if($("#luckysheet-filter-selected-sheet"+h.currentSheetIndex).length>0){let a=h.luckysheetfile[Z(h.currentSheetIndex)].filter_select,o=a.row[0],s=a.row[1],u=a.column[0],f=a.column[1],d=h.visibledatarow[s],m=o-1==-1?0:h.visibledatarow[o-1],g=h.visibledatacolumn[f],y=u-1==-1?0:h.visibledatacolumn[u-1];$("#luckysheet-filter-selected-sheet"+h.currentSheetIndex).css({left:y,width:g-y-1,top:m,height:d-m-1})}ve.showSheet(),t&&(Dr=setTimeout(function(){Be()},1))}function Be(e,n){if(p.groupValuesRefresh(),e==null&&(e=$("#luckysheet-cell-main").scrollLeft()),n==null&&(n=$("#luckysheet-cell-main").scrollTop()),Y.freezenverticaldata!=null||Y.freezenhorizontaldata!=null){let t,l,a,o,s,u,f=h.luckysheetTableContentHW[0],d=h.luckysheetTableContentHW[1];Y.freezenverticaldata!=null&&Y.freezenhorizontaldata!=null?(t=Y.freezenhorizontaldata[0],l=Y.freezenhorizontaldata[1],a=Y.freezenhorizontaldata[2],o=Y.freezenverticaldata[0],s=Y.freezenverticaldata[1],u=Y.freezenverticaldata[2],nr(u,a,o,t,1,1,null,null,"freezen_3"),nr(e+o-u,a,f-o+u,t,1,1,null,null,"freezen_4"),nr(u,n+t-a,o,d-t+a,1,1,null,null,"freezen_7"),nr(e+o-u,n+t-a,f-o+u,d-t+a,o-u+h.rowHeaderWidth,t-a+h.columnHeaderHeight),pa(u,o,h.rowHeaderWidth),pa(e+o-u,f-o+u,o-u+h.rowHeaderWidth),ma(a,t,h.columnHeaderHeight),ma(n+t-a,d-t+a,t-a+h.columnHeaderHeight)):Y.freezenhorizontaldata!=null?(t=Y.freezenhorizontaldata[0],l=Y.freezenhorizontaldata[1],a=Y.freezenhorizontaldata[2],nr(e,a,f,t,1,1,null,null,"freezen_h"),nr(e,n+t-a,f,d-t+a,null,t-a+h.columnHeaderHeight),pa(e,f,null),ma(a,t,h.columnHeaderHeight),ma(n+t-a,d-t+a,t-a+h.columnHeaderHeight)):Y.freezenverticaldata!=null&&(o=Y.freezenverticaldata[0],s=Y.freezenverticaldata[1],u=Y.freezenverticaldata[2],nr(u,n,o,d,1,1,null,null,"freezen_v"),nr(e+o-u,n,f-o+u,d,o-u+h.rowHeaderWidth,null),ma(n,d,null),pa(u,o,h.rowHeaderWidth),pa(e+o-u,f-o+u,o-u+h.rowHeaderWidth))}else{if($("#luckysheetTableContent").length==0)return;let t=$("#luckysheetTableContent").get(0).getContext("2d");nr(e,n),pa(e),ma(n),t.clearRect(0,0,h.rowHeaderWidth*h.devicePixelRatio-1,h.columnHeaderHeight*h.devicePixelRatio-1)}}var Dr,Yt=Ie(()=>{Ii();Ut();Jt();$r();Kt();mr();Co();Vl();Qt();dl();Ur();yr();Ua();Zt();kn();Nt();Xe();Dr=null});function kd(e,n,t){return new Promise((l,a)=>{let o=new XMLHttpRequest||new ActiveXObject("Microsoft.XMLHTTP");o.open(e,n),o.send(JSON.stringify(t)),o.onreadystatechange=function(){o.readyState==4&&(o.status==200?l(o.responseText):a("error"))}})}var wd=Ie(()=>{});var mc,Pi,ga,ne,Qt=Ie(()=>{mc=Fl(Sf());zs();Yt();Jt();Gt();dl();il();kn();Vl();Ur();qr();yr();Ua();ft();Nt();Xe();Zt();bt();Pi=Fl(vn());Ba();xl();wd();Ll();ga={gridKey:null,loadUrl:null,updateUrl:null,updateImageUrl:null,title:null,loadSheetUrl:null,retryTimer:null,allowUpdate:!1,historyParam:function(e,n,t){let l=this,a=t.row[0],o=t.row[1],s=t.column[0],u=t.column[1];if(a==o&&s==u){let f=e[a][s];l.saveParam("v",n,f,{r:a,c:s})}else{let f=o-a+1,d=u-s+1,m=Math.floor(1e3/d),g=Math.ceil(f/m);for(let y=0;y<g;y++){let v=a+m*y,b;y==g-1?b=o:b=a+m*(y+1)-1;let k=[];for(let w=v;w<=b;w++){let x=[];for(let C=s;C<=u;C++)e[w]==null?x.push(null):x.push(e[w][C]);k.push(x)}l.saveParam("rv",n,k,{range:{row:[v,b],column:[s,u]}}),y==g-1&&l.saveParam("rv_end",n,null)}}},saveParam:function(e,n,t,l){let a=this;if(!a.allowUpdate)return;t==null&&(t=null);let o={};if(o.t=e,o.i=n,o.v=t,e==="shs")return;e=="rv"?o.range=l.range:e=="v"||e=="fu"||e=="fm"?(o.r=l.r,o.c=l.c):e=="fc"?(o.op=l.op,o.pos=l.pos):e=="drc"||e=="arc"||e=="h"||e=="wh"?o.rc=l.rc:e=="c"?(o.cid=l.cid,o.op=l.op):e=="f"?(o.op=l.op,o.pos=l.pos):e=="s"||(e=="sh"?(o.op=l.op,l.cur!=null&&(o.cur=l.cur)):(e=="cg"||e=="all")&&(o.k=l.k));let s=de.imageUpdateMethodConfig;if(JSON.stringify(s)!=="{}")if(o.k!="images"){let u=mc.default.gzip(encodeURIComponent(JSON.stringify(o)),{to:"string"});a.websocket!=null&&a.websocket.send(u)}else kd(s.method,s.url,o).then(u=>{console.log(u)}).catch(u=>{console.log(u)});else{let u=mc.default.gzip(encodeURIComponent(JSON.stringify(o)),{to:"string"});a.websocket!=null&&a.websocket.send(u)}},websocket:null,wxErrorCount:0,openWebSocket:function(){let e=this;if("WebSocket"in window){let n=e.updateUrl+"?t=111&g="+encodeURIComponent(e.gridKey);e.updateUrl.indexOf("?")>-1&&(n=e.updateUrl+"&t=111&g="+encodeURIComponent(e.gridKey)),e.websocket=new WebSocket(n),e.websocket.onopen=function(){console.info(Q().websocket.success),_i(),e.wxErrorCount=0,e.retryTimer=setInterval(function(){e.websocket.send("rub")},6e4)},e.websocket.onmessage=function(t){h.result=t;let l=new Function("return "+t.data)();Je.createHookFunction("cooperativeMessage",l),console.info(l);let a=l.type,{message:o,id:s}=l;if(o==="\u7528\u6237\u9000\u51FA"&&($("#luckysheet-multipleRange-show-"+s).hide(),h.cooperativeEdit.changeCollaborationSize=h.cooperativeEdit.changeCollaborationSize.filter(u=>u.id!=s),h.cooperativeEdit.checkoutData=h.cooperativeEdit.checkoutData.filter(u=>u.id!=s)),a==1){let u=l.data.v.index,f=h.luckysheetfile.filter(d=>d.index===u)[0];f!==null&&setTimeout(()=>{let d=l.data.i;f.index=d,h.currentSheetIndex=d,$(`#luckysheet-sheets-item${u}`).attr("data-index",d),$(`#luckysheet-sheets-item${u}`).prop("id",`luckysheet-sheets-item${d}`),$(`#luckysheet-datavisual-selection-set-${u}`).prop("id",`luckysheet-datavisual-selection-set-${d}`)},1)}else if(a==2){let u=JSON.parse(l.data);e.wsUpdateMsg(u);let f=JSON.parse(l.data);f.k=="columnlen"?Gn(f.v,null):f.k=="rowlen"&&Gn(null,f.v)}else if(a==3){let u=l.id,f=l.username,d=JSON.parse(l.data),m=d.t,g=d.i,y=d.v;h.cooperativeEdit.changeCollaborationSize.length===0&&h.cooperativeEdit.changeCollaborationSize.push({id:u,v:d.v[0],i:g}),h.cooperativeEdit.changeCollaborationSize.some(x=>x.id==u)?h.cooperativeEdit.changeCollaborationSize.forEach(x=>{x.id==u&&(x.v=d.v[0]||d.range[0],x.i=g)}):h.cooperativeEdit.changeCollaborationSize.push({id:u,v:d.v[0],i:g}),P(y)!="array"&&P(y)!=="object"&&(y=JSON.parse(y));let b=0,k=0;if(g==h.currentSheetIndex?P(y)==="object"&&y.op==="enterEdit"?(b=y.range[y.range.length-1].row[0],k=y.range[y.range.length-1].column[0],e.multipleRangeShow(u,f,b,k,y.op)):(b=y[y.length-1].row[0],k=y[y.length-1].column[0],e.multipleRangeShow(u,f,b,k)):P(y)==="object"&&y.op==="enterEdit"?(b=y.range[y.range.length-1].row[0],k=y.range[y.range.length-1].column[0]):(b=y[y.length-1].row[0],k=y[y.length-1].column[0]),h.cooperativeEdit.checkoutData.length===0&&(y.op?h.cooperativeEdit.checkoutData.push({id:u,username:f,r:b,c:k,op:y.op,index:g}):h.cooperativeEdit.checkoutData.push({id:u,username:f,r:b,c:k,index:g})),h.cooperativeEdit.checkoutData.some(x=>x.id==u)?h.cooperativeEdit.checkoutData.forEach(x=>{x.id==u&&(x.username=f,x.r=b,x.c=k,x.index=g,y.op==="enterEdit"&&(x.op=y.op))}):y.op==="enterEdit"?h.cooperativeEdit.checkoutData.push({id:u,username:f,r:b,c:k,op:y.op,index:g}):h.cooperativeEdit.checkoutData.push({id:u,username:f,r:b,c:k,index:g}),h.cooperativeEdit.checkoutData.forEach(x=>{x.index!=h.currentSheetIndex&&($("#luckysheet-multipleRange-show-"+x.id).hide(),x.op=="")}),$("#luckysheet-multipleRange-show-"+u)[0]){let x=$("#luckysheet-multipleRange-show-"+u)[0].offsetHeight-1;$("#luckysheet-multipleRange-show-"+u+">.username").css({bottom:x+"px"})}}else if(a==4){let u=l.data===""?l.data:JSON.parse(l.data);for(let f=0;f<u.length;f++)e.wsUpdateMsg(item[f])}else a==5?Fa(l.data):a==6&&_i()},e.websocket.onerror=function(){e.wxErrorCount++,e.wxErrorCount>3?Fa(Q().websocket.refresh):(Fa(Q().websocket.wait),e.openWebSocket())},e.websocket.onclose=function(t){console.info(Q().websocket.close),t.code===1e3?(clearInterval(e.retryTimer),e.retryTimer=null):alert(Q().websocket.contact)}}else alert(Q().websocket.support)},wsUpdateMsg:function(e){let n=e.t,t=e.i,l=e.v,a=h.luckysheetfile[Z(t)];if(!(["v","rv","cg","all","fc","drc","arc","f","fsc","fsr","sh","c"].includes(n)&&a==null))if(n=="v"){if(a.data==null||a.data.length==0)return;let o=e.r,s=e.c;a.data[o][s]=l,t==h.currentSheetIndex&&(h.flowdata=a.data,xe.webWorkerFlowDataCache(h.flowdata),l!=null&&l.ps!=null?He.buildPs(o,s,l.ps):He.buildPs(o,s,null),setTimeout(function(){Be()},1))}else if(n=="rv"){if(Object.keys(e.range).length>0&&(h.cooperativeEdit.merge_range=e.range,h.cooperativeEdit.merge_range.v=e.v,Gn()),a.data==null||a.data.length==0)return;let o=e.range.row[0],s=e.range.row[1],u=e.range.column[0],f=e.range.column[1];for(let d=o;d<=s;d++)for(let m=u;m<=f;m++)a.data[d][m]=l[d-o][m-u];if(t==h.currentSheetIndex){h.flowdata=a.data,xe.webWorkerFlowDataCache(h.flowdata);for(let d=o;d<=s;d++)for(let m=u;m<=f;m++)l[d-o][m-u]!=null&&l[d-o][m-u].ps!=null?He.buildPs(d,m,l[d-o][m-u].ps):He.buildPs(d,m,null);setTimeout(function(){Be()},1)}}else if(n=="cg"){let o=e.k;o=="borderInfo"?a.config.borderInfo=l:(o in a.config||(a.config[o]={}),l&&typeof l=="object"&&(a.config[o]=l)),t==h.currentSheetIndex&&(h.config=a.config,(o=="rowlen"||o=="columnlen"||o=="rowhidden")&&St(h.flowdata.length,h.flowdata[0].length),setTimeout(function(){Be()},1))}else if(n=="all"){let o=e.k;if(a[o]=l,o=="name")$("#luckysheet-sheet-container-c #luckysheet-sheets-item"+t).find("span.luckysheet-sheets-item-name").html(l);else if(o=="color"){let s=$("#luckysheet-sheet-container-c #luckysheet-sheets-item"+t);s.find(".luckysheet-sheets-item-color").remove(),(l!=null||l!="")&&s.append('<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+l+';"></div>')}else if(o!="pivotTable")if(o=="frozen"){if(Y.frozenTofreezen(),t==h.currentSheetIndex){let u=Q().freezen;a.freezen.horizontal==null?($("#luckysheet-freezen-btn-horizontal").html('<i class="fa fa-list-alt"></i> '+u.freezenRow),Y.freezenhorizontaldata=null,$("#luckysheet-freezebar-horizontal").hide()):Y.createFreezenHorizontal(a.freezen.horizontal.freezenhorizontaldata,a.freezen.horizontal.top),a.freezen.vertical==null?($("#luckysheet-freezen-btn-vertical").html('<i class="fa fa-indent"></i> '+u.freezenColumn),Y.freezenverticaldata=null,$("#luckysheet-freezebar-vertical").hide()):Y.createFreezenVertical(a.freezen.vertical.freezenverticaldata,a.freezen.vertical.left),Y.createAssistCanvas()}}else o=="filter_select"?t==h.currentSheetIndex&&Dl(l):o=="filter"?t==h.currentSheetIndex&&Dl(a.filter_select,l):o=="luckysheet_conditionformat_save"?t==h.currentSheetIndex&&setTimeout(function(){Be()},1):o=="luckysheet_alternateformat_save"?t==h.currentSheetIndex&&setTimeout(function(){Be()},1):o=="config"?t==h.currentSheetIndex&&(h.config=l,St(h.flowdata.length,h.flowdata[0].length)):o=="dynamicArray"?t==h.currentSheetIndex&&setTimeout(function(){Be()},1):o=="images"?t==h.currentSheetIndex&&(Re.images=l,Re.allImagesShow(),Re.init()):o=="dataVerification"?t==h.currentSheetIndex&&(Ye.dataVerification=l,Ye.init()):o=="hyperlink"&&t==h.currentSheetIndex&&(Cl.hyperlink=l,Cl.init())}else if(n=="fc"){let o=e.op,s=e.pos;P(l)!="object"&&(l=new Function("return "+l)());let u=l.r,f=l.c,d=a.calcChain==null?[]:a.calcChain;if(o=="add")d.push(l);else if(o=="del")for(let m=0;m<d.length;m++)u==d[m].r&&f==d[m].c&&t==d[m].index&&d.splice(m,1);setTimeout(function(){Be()},1)}else if(n=="drc"){if(a.data==null||a.data.length==0)return;let o=e.rc,s=l.index,u=l.len,f=l.mc,d=l.borderInfo,m=a.data;if(o=="r"){a.row-=u,m.splice(s,u);let g=[];for(let y=0;y<m[0].length;y++)g.push(null);for(let y=0;y<u;y++)m.push(g)}else{a.column-=u;let g=[];for(let y=0;y<u;y++)g.push(null);for(let y=0;y<m.length;y++)m[y].splice(s,u),m[y]=m[y].concat(g)}for(let g in f){let y=f[g].r,v=f[g].c;m[y][v].mc=f[g]}a.config.merge=f,a.config.borderInfo=d,t==h.currentSheetIndex&&(h.flowdata=m,xe.webWorkerFlowDataCache(h.flowdata),h.config.merge=f,h.config.borderInfo=d,setTimeout(function(){Be()},1))}else if(n=="arc"){if(a.data==null||a.data.length==0)return;let o=e.rc,s=l.index,u=l.len,f=l.data,d=l.direction,m=l.mc,g=l.borderInfo,y=$.extend(!0,[],a.data);if(o=="r"){a.row+=u;let v=[];for(let k=0;k<y[0].length;k++)v.push(null);let b=[];for(let k=0;k<u;k++)f[k]==null?b.push(JSON.stringify(v)):b.push(JSON.stringify(f[k]));d=="lefttop"?s==0?new Function("data","return data.unshift("+b.join(",")+")")(y):new Function("data","return data.splice("+s+", 0, "+b.join(",")+")")(y):new Function("data","return data.splice("+(s+1)+", 0, "+b.join(",")+")")(y)}else{a.column+=u;for(let v=0;v<y.length;v++)for(let b=0;b<u;b++)d=="lefttop"?y[v].splice(s,0,f[b]):y[v].splice(s+1,0,f[b])}for(let v in m){let b=m[v].r,k=m[v].c;y[b][k].mc=m[v]}a.data=y,a.config.merge=m,a.config.borderInfo=g,t==h.currentSheetIndex&&(h.flowdata=y,xe.webWorkerFlowDataCache(h.flowdata),h.config.merge=m,h.config.borderInfo=g,setTimeout(function(){Be()},1))}else if(n=="f"){let o=e.op,s=e.pos,u=a.filter;u==null&&(u={}),o=="upOrAdd"?u[s]=l:o=="del"&&delete u[s],t==h.currentSheetIndex&&Dl(a.filter_select,u)}else if(n=="fsc")a.filter=null,a.filter_select=null,t==h.currentSheetIndex&&($("#luckysheet-filter-selected-sheet"+h.currentSheetIndex+", #luckysheet-filter-options-sheet"+h.currentSheetIndex).remove(),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide());else if(n=="fsr")a.filter=l.filter,a.filter_select=l.filter_select,t==h.currentSheetIndex&&Dl(a.filter_select,a.filter);else if(n=="sha"){h.luckysheetfile.push(l);let o="";l.color!=null&&(o='<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+l.color+';"></div>'),$("#luckysheet-sheet-container-c").append(_e(Ql,{index:l.index,active:"",name:l.name,style:"",colorset:o})),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+l.index+'" class="luckysheet-datavisual-selection-set"></div>'),ve.locationSheet()}else if(n=="shc"){let o=l.copyindex,s=l.name,u=Z(o),f=$.extend(!0,{},h.luckysheetfile[u]);f.index=t,f.name=s,h.luckysheetfile.splice(u+1,0,f);let d=$("#luckysheet-sheets-item"+o);$("#luckysheet-sheet-container-c").append(_e(Ql,{index:f.index,active:"",name:f.name,style:"",colorset:""})),$("#luckysheet-sheets-item"+f.index).insertAfter(d),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+f.index+'" class="luckysheet-datavisual-selection-set"></div>')}else if(n=="shd"){for(let o=0;o<h.luckysheetfile.length;o++)if(h.luckysheetfile[o].index==l.deleIndex){if(h.currentSheetIndex===l.deleIndex){let s=l.deleIndex;h.luckysheetfile[ve.getSheetIndex(s)].hide=1;let u=$("#luckysheet-sheets-item"+s);u.hide(),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active");let f=u.nextAll(":visible");u.nextAll(":visible").length>0?f=f.eq(0).data("index"):f=u.prevAll(":visible").eq(0).data("index"),$("#luckysheet-sheets-item"+f).addClass("luckysheet-sheets-item-active"),ve.changeSheetExec(f)}ga.sheetDeleSave.push(h.luckysheetfile[o]),h.luckysheetfile.splice(o,1);break}$("#luckysheet-sheets-item"+l.deleIndex).remove(),$("#luckysheet-datavisual-selection-set-"+l.deleIndex).remove(),ve.locationSheet()}else if(n=="shr")for(let o in l)h.luckysheetfile[Z(o)].order=l[o];else if(n=="shre"){for(let o=0;o<ga.sheetDeleSave.length;o++)if(ga.sheetDeleSave[o].index==l.reIndex){let s=ga.sheetDeleSave[o];h.luckysheetfile.push(s);let u="";l.color!=null&&(u='<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+s.color+';"></div>'),$("#luckysheet-sheet-container-c").append(_e(Ql,{index:s.index,active:"",name:s.name,style:"",colorset:u})),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+s.index+'" class="luckysheet-datavisual-selection-set"></div>');break}}else if(n=="sh"){let o=e.op,s=e.cur;o=="hide"?(a.hide=1,$("#luckysheet-sheets-item"+t).hide(),t==h.currentSheetIndex&&($("#luckysheet-sheets-item"+s).addClass("luckysheet-sheets-item-active"),ve.changeSheetExec(s))):o=="show"&&(a.hide=0,$("#luckysheet-sheets-item"+t).show()),ve.locationSheet()}else if(n=="c"){let o=e.op,s=e.cid;if(o=="add")a.chart.push(l),luckysheet.insertChartTosheet(l.sheetIndex,l.dataSheetIndex,l.option,l.chartType,l.selfOption,l.defaultOption,l.row,l.column,l.chart_selection_color,l.chart_id,l.chart_selection_id,l.chartStyle,l.rangeConfigCheck,l.rangeRowCheck,l.rangeColCheck,l.chartMarkConfig,l.chartTitleConfig,l.winWidth,l.winHeight,l.scrollLeft1,l.scrollTop1,l.chartTheme,l.myWidth,l.myHeight,l.myLeft,l.myTop,l.myindexrank1,!0);else if(o=="xy"||o=="wh"||o=="update")for(let u=0;u<a.chart.length;u++){let f=a.chart[u];if(f.chart_id==s){for(let d in f)for(let m in l)d==m&&(f[d]=l[m]);ve.saveChart(f);return}}else if(o=="del"){for(let u=0;u<a.chart.length;u++)if(a.chart[u].chart_id==s){a.chart.splice(u,1),$("#"+s).remove(),ve.delChart($("#"+s).attr("chart_id"),$("#"+s).attr("sheetIndex"));return}}}else n=="na"&&$("#luckysheet_info_detail_input").val(l).css("width",ya(l)*10)},multipleIndex:0,multipleRangeShow:function(e,n,t,l,a){let o=this,s=n,u=h.visibledatarow[t],f=t-1==-1?0:h.visibledatarow[t-1],d=h.visibledatacolumn[l],m=l-1==-1?0:h.visibledatacolumn[l-1],g=ke.mergeborer(h.flowdata,t,l);if(g&&(u=g.row[1],f=g.row[0],d=g.column[1],m=g.column[0]),m<=0&&(m+=1),f<=0&&(f+=1),ya(n)>16&&(n=ya(n,16)+"..."),a==="enterEdit"&&(n+=" "+Q().edit.typing),$("#luckysheet-multipleRange-show-"+e).length>0)$("#luckysheet-multipleRange-show-"+e).css({position:"absolute",left:m-1,width:d-m-1,top:f-1,height:u-f-1}),$("#luckysheet-multipleRange-show-"+e+" .username").text(n),$("#luckysheet-multipleRange-show-"+e+" .username").show(),h.cooperativeEdit.usernameTimeout["user"+e]!=null&&clearTimeout(h.cooperativeEdit.usernameTimeout["user"+e]),h.cooperativeEdit.usernameTimeout["user"+e]=setTimeout(()=>{clearTimeout(h.cooperativeEdit.usernameTimeout["user"+e]),h.cooperativeEdit.usernameTimeout["user"+e]=null},10*1e3);else{let y=`<div |
| | | id="luckysheet-multipleRange-show-${e}" |
| | | class="luckysheet-multipleRange-show" |
| | | data-color="${Yl[o.multipleIndex]}" |
| | | title="${s}" |
| | | style="position: absolute;left: ${m-1}px;width: ${f-m-1}px;top: ${d-1}px;height: ${u-d-1}px;border: 1px solid ${Yl[o.multipleIndex]};z-index: 15;"> |
| | | style="position: absolute;left: ${m-1}px;width: ${d-m-1}px;top: ${f-1}px;height: ${u-f-1}px;border: 1px solid ${Yl[o.multipleIndex]};z-index: 15;"> |
| | | |
| | | <div class="username" style="height: 19px;line-height:19px;width: max-content;position: absolute;bottom: ${u-d-1}px;right: 0;background-color: ${Yl[o.multipleIndex]};color:#ffffff;padding:0 10px;"> |
| | | <div class="username" style="height: 19px;line-height:19px;width: max-content;position: absolute;bottom: ${u-f-1}px;right: 0;background-color: ${Yl[o.multipleIndex]};color:#ffffff;padding:0 10px;"> |
| | | ${n} |
| | | </div> |
| | | |
| | | <div style="width: 100%;height: 100%;position: absolute;top: 0;right: 0;bottom: 0;left: 0;opacity: 0.03;background-color: ${Yl[o.multipleIndex]}"> |
| | | </div> |
| | | |
| | | </div>`;$(y).appendTo($("#luckysheet-cell-main #luckysheet-multipleRange-show")),o.multipleIndex++,h.cooperativeEdit.usernameTimeout["user"+e]!=null&&clearTimeout(h.cooperativeEdit.usernameTimeout["user"+e]),h.cooperativeEdit.usernameTimeout["user"+e]=setTimeout(()=>{clearTimeout(h.cooperativeEdit.usernameTimeout["user"+e]),h.cooperativeEdit.usernameTimeout["user"+e]=null},10*1e3)}},sheetDeleSave:[],submitInterval:1e3,imagesubmitInterval:5e3,submitdatalimit:50,submitcompresslimit:1e3,checksubmit:function(e){let n=this;n.submitTimeout(),clearTimeout(n.imageRequestTimeout),n.imageRequestTimeout=setTimeout(function(){n.imageRequest()},n.imagesubmitInterval)},submitTimeout:function(){let e=this;clearTimeout(e.requestTimeOut),!e.requestLock&&e.requestlast!=null&&e.requestlast.clone().add(1,"seconds").isBefore((0,Pi.default)())&&e.request(),e.requestTimeOut=setTimeout(function(){e.submitTimeout()},e.submitInterval)},requestLock:!1,requestlast:null,firstchange:!0,requestTimeOut:null,request:function(){let e=this,t=this.gridKey+"__qkcache";e.cachelocaldata(function(l,a){if(a.length==0)return;a=encodeURIComponent(JSON.stringify(a));let o=a.length,s=!1;e.requestLock=!0,e.updateUrl!=""&&$.post(e.updateUrl,{compress:s,gridKey:e.gridKey,data:a},function(u){new Function("return "+u)().status?($("#luckysheet_info_detail_update").html("\u6700\u8FD1\u5B58\u6863\u65F6\u95F4:"+(0,Pi.default)().format("M-D H:m:s")),$("#luckysheet_info_detail_save").html("\u540C\u6B65\u6210\u529F"),e.clearcachelocaldata()):($("#luckysheet_info_detail_save").html("<span style='color:#ff2121'>\u540C\u6B65\u5931\u8D25</span>"),e.restorecachelocaldata()),e.requestlast=(0,Pi.default)(),e.requestLock=!1})})},imageRequestLast:null,imageRequestLock:!1,imageRequestTimeout:null,imageRequest:function(){let e=this;html2canvas($("#"+container).find(".luckysheet-grid-window").get(0),{onrendered:function(n){let t=$(n).appendTo("body");t.hide();let l=t.width(),a=t.height(),o=t.get(0).getContext("2d").getImageData(0,0,l,a),s=l,u=a;s*.54>u?s=u/.54:u=s*.54;let d=$("<canvas>").attr("width",s).attr("height",u)[0];d.getContext("2d").putImageData(o,0,0),t.attr("width",350),t.attr("height",189),t.get(0).getContext("2d").drawImage(d,0,0,350,189);let f=t.get(0).toDataURL("image/jpeg",.9),m=luckysheet.sheetmanage.getCurSheetnoset();e.imageRequestLock=!0;let g=encodeURIComponent(JSON.stringify({t:"thumb",img:f,curindex:m}));t.remove(),e.updateImageUrl!=""&&$.post(e.updateImageUrl,{compress:!1,gridKey:e.gridKey,data:g},function(y){new Function("return "+y)().status?imageRequestLast=(0,Pi.default)():$("#luckysheet_info_detail_save").html("<span style='color:#ff2121'>\u7F51\u7EDC\u4E0D\u7A33\u5B9A</span>"),e.imageRequestLock=!0})}})},localdata:[],matchOpt:function(e,n){for(let t in e){if(t=="t"&&e.t in{drc:1,arc:1,sha:1,shc:1,shd:1})return!1;if(t!="v"&&(!(t in n)||n[t]!=e[t]))return!1}return!0},deleteRepeatOpt:function(e,n){let t=e,l=this;if(n instanceof Array)for(let o=0;o<n.length;o++){let s=n[o];for(let u=0;u<t.length;u++){let d=e[o];l.matchOpt(s,d)&&delete t[u]}}else for(let o=0;o<t.length;o++){let s=t[o];l.matchOpt(n,s)&&delete t[o]}let a=[];for(let o=0;o<t.length;o++)t[o]!=null&&a.push(t[o]);return a},setlocaldata:function(e,n){let t=this.gridKey,l=this;l.getlocaldata(function(a){a==null&&(a=[]),e instanceof Array?a=a.concat(e):a.push(e),l.localdata=a,n(l.localdata)})},getlocaldata:function(e){let n=this.gridKey;e(this.localdata)},clearlocaldata:function(e){let n=this.gridKey;this.localdata=[],e()},cachelocaldata:function(e){let n=this.gridKey,t=this,l=n+"__qkcache",a=t.localdata,o=a.length;if(o>1){let s=[];s[0]=a[0];for(let u=1;u<o;u++){let d=a[u],f=!0;for(let m=0;m<s.length;m++){let g=s[m];if(t.matchOpt(d,g)){s.splice(m,1,d),f=!1;break}}f&&(s=s.concat(d))}a=s}a==null||a.length==0||t.clearlocaldata(function(){localforage.setItem(l,a).then(function(){e(l,a)})})},clearcachelocaldata:function(e){let t=this.gridKey+"__qkcache";localforage.removeItem(t,function(l,a){e&&typeof e=="function"&&e()})},restorecachelocaldata:function(e){let t=this.gridKey+"__qkcache",l=this;localforage.getItem(t).then(function(a){let o=a;l.getlocaldata(function(s){s==null&&(s=[]);let u=o.concat(s);l.localdata=u,e instanceof Function&&e(l.localdata)})})},keepHighLightBox:function(){h.cooperativeEdit.checkoutData.forEach(e=>{e.index==h.currentSheetIndex&&(e.op==="enterEdit"?ga.multipleRangeShow(e.id,e.username,e.r,e.c,e.op):ga.multipleRangeShow(e.id,e.username,e.r,e.c))})}},ne=ga});var dv,U,ll=Ie(()=>{Gt();xa();dt();bt();Qt();dv={info:function(e,n){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-info").remove();let l=Q().button;$("body").append(_e(ft,{id:"luckysheet-info",addclass:"",title:e,content:n,botton:'<button class="btn btn-default luckysheet-model-close-btn"> '+l.close+" </button>",style:"z-index:100003"}));let a=$("#luckysheet-info").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),d=$(window).height(),f=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-info").css({left:(u+f-s)/2,top:(d+m-o)/3}).show()},confirm:function(e,n,t,l,a,o){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-confirm").remove();let u=Q().button;a==null&&(a=u.confirm),o==null&&(o=u.cancel),$("body").append(_e(ft,{id:"luckysheet-confirm",addclass:"",style:"z-index:100003",title:e,content:n,botton:'<button class="btn btn-primary luckysheet-model-conform-btn"> '+a+' </button><button class="btn btn-default luckysheet-model-cancel-btn"> '+o+" </button>"}));let d=$("#luckysheet-confirm").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),f=d.outerHeight(),m=d.outerWidth(),g=$(window).width(),y=$(window).height(),v=$(document).scrollLeft(),b=$(document).scrollTop();$("#luckysheet-confirm").css({left:(g+v-m)/2,top:(y+b-f)/3}).show(),d.find(".luckysheet-model-conform-btn").click(function(){typeof t=="function"&&t(),ne.keepHighLightBox(),$("#luckysheet-confirm").hide(),$("#luckysheet-modal-dialog-mask").hide()}),d.find(".luckysheet-model-cancel-btn").click(function(){typeof l=="function"&&l(),$("#luckysheet-confirm").hide(),$("#luckysheet-modal-dialog-mask").hide()})},screenshot:function(e,n,t){let a=Q().screenshot;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-confirm").remove(),$("body").append(_e(ft,{id:"luckysheet-confirm",addclass:"",style:"z-index:100003",title:e,content:n,botton:'<a style="text-decoration:none;color:#fff;" class="download btn btn-primary luckysheet-model-conform-btn"> '+a.downLoadBtn+' </a> <button class="btn btn-primary luckysheet-model-copy-btn"> '+a.downLoadCopy+' </button><button class="btn btn-default luckysheet-model-cancel-btn"> '+a.downLoadClose+" </button>"}));let o=$("#luckysheet-confirm").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),s=o.outerHeight(),u=o.outerWidth(),d=$(window).width(),f=$(window).height(),m=$(document).scrollLeft(),g=$(document).scrollTop();$("#luckysheet-confirm").css({left:(d+m-u)/2,top:(f+g-s)/3}).show(),o.find(".luckysheet-model-conform-btn").click(function(){dr.isIE()=="1"?alert(a.browserNotTip):(!!window.ActiveXObject||"ActiveXObject"in window)&&($("#IframeReportImg").length===0&&$('<iframe style="display:none;" id="IframeReportImg" name="IframeReportImg" onload="downloadImg();" width="0" height="0" src="about:blank"></iframe>').appendTo("body"),$("#IframeReportImg").attr("src")!=t?$("#IframeReportImg").attr("src",t):$("#IframeReportImg").src!="about:blank"&&window.frames.IframeReportImg.document.execCommand("SaveAs"))}),o.find(".luckysheet-model-cancel-btn").click(function(){$("#luckysheet-confirm").hide(),$("#luckysheet-modal-dialog-mask").hide()}),$("#luckysheet-confirm .luckysheet-model-copy-btn").click(function(){let y=new clipboard.DT;y.setData("text/html","<img src='"+t+"'>"),dr.isIE()=="1"?alert(a.rightclickTip):(clipboard.write(y),alert(a.successTip))})},chartPointConfig:function(e,n,t){$("body").append(_e(ft,{id:e,addclass:"luckysheet-chart-point-config-c",title:"\u6570\u636E\u70B9\u6279\u91CF\u8BBE\u7F6E",content:Fu,botton:'<button class="btn btn-danger luckysheet-model-save-btn"> \u4FDD\u5B58\u8BBE\u7F6E </button><button class="btn btn-default luckysheet-model-close-btn"> \u53D6\u6D88 </button>',style:"z-index:100003;height:80%;width:80%;top:10%;left:10%;"})),$("#luckysheet-modal-dialog-mask").show();let l=$(window).width(),a=$(window).height();$("#"+e).find(".luckysheet-chart-point-config").css("height",a-160),$("#"+e).css({height:a-90,width:l-100,left:7,top:14}).show().find(".luckysheet-model-save-btn").click(function(){typeof n=="function"&&n(),$("#"+e).hide(),$("#luckysheet-modal-dialog-mask").hide()}),$("#"+e).find(".luckysheet-model-save-btn").click(function(){typeof t=="function"&&t(),$("#"+e).hide(),$("#luckysheet-modal-dialog-mask").hide()})},sheetConfig:function(){},hoverTipshowState:!1,hoverTipshowTimeOut:null,createHoverTip:function(e,n){let t=this;$(e).on("mouseover",n,function(l){t.hoverTipshowState||(clearTimeout(t.hoverTipshowTimeOut),t.hoverTipshowTimeOut=setTimeout(function(){let a=$(l.currentTarget),o=a.offset(),s=$("#luckysheet-tooltip-up"),u=a.data("tips");if((u==null||u.length==0)&&(u=a.prev().data("tips"),u==null||u.length==0))return;s.length==0&&($("body").append(Eu),s=$("#luckysheet-tooltip-up")),s.removeClass("jfk-tooltip-hide").find("div.jfk-tooltip-contentId").html(u);let d=s.outerWidth();s.find("div.jfk-tooltip-arrow").css("left",d/2);let f=o.left+(a.outerWidth()-d)/2;f<2&&(f=2,s.find("div.jfk-tooltip-arrow").css("left",a.outerWidth()/2)),s.css({top:o.top+a.outerHeight()+1,left:f})},300))}).on("mouseout",n,function(l){t.hoverTipshowState=!1,clearTimeout(t.hoverTipshowTimeOut),$("#luckysheet-tooltip-up").addClass("jfk-tooltip-hide")}).on("click",n,function(l){t.hoverTipshowState=!0,clearTimeout(t.hoverTipshowTimeOut),$("#luckysheet-tooltip-up").addClass("jfk-tooltip-hide")})},popover:function(e,n,t,l,a,o){let s=Q(),u=s.button,d=s.paint;a==null&&(a=u.close);let f='<div id="luckysheetpopover" class="luckysheetpopover"><div class="luckysheetpopover-content">'+d.start+'</div><div class="luckysheetpopover-btn">'+a+"</div></div>";$("#luckysheetpopover").remove(),$("body").append(f),$("#luckysheetpopover .luckysheetpopover-content").html(e);let m=$("#luckysheetpopover").outerWidth(),g=$("#luckysheetpopover").outerHeight(),y={};n=="topLeft"?(y.top="20px",y.left="20px"):n=="topCenter"?(y.top="20px",y.left="50%",y["margin-left"]=-m/2):n=="topRight"?(y.top="20px",y.right="20px"):n=="midLeft"?(y.top="50%",y["margin-top"]=-g/2,y.left="20px"):n=="center"?(y.top="50%",y["margin-top"]=-g/2,y.left="50%",y["margin-left"]=-m/2):n=="midRight"?(y.top="50%",y["margin-top"]=-g/2,y.right="20px"):n=="bottomLeft"?(y.bottom="20px",y.left="20px"):n=="bottomCenter"?(y.bottom="20px",y.left="50%",y["margin-left"]=-m/2):n=="bottomRight"?(y.bottom="20px",y.right="20px"):(y.top="20px",y.left="50%",y["margin-left"]=-m/2),l=="white"&&(y.background="rgba(255, 255, 255, 0.65)",y.color="#000",$("#luckysheetpopover .luckysheetpopover-btn").css({border:"1px solid #000"})),setTimeout(function(){$("#luckysheetpopover .luckysheetpopover-content").css({"margin-left":-$("#luckysheetpopover .luckysheetpopover-btn").outerWidth()/2})},1),$("#luckysheetpopover").css(y).fadeIn(),$("#luckysheetpopover .luckysheetpopover-btn").click(function(){typeof o=="function"&&o()}),t!=null&&typeof t=="number"&&setTimeout(function(){$("#luckysheetpopover").fadeOut().remove(),typeof o=="function"&&o()},t)}},U=dv});var To,fv,$e,gr=Ie(()=>{Nt();dt();Ut();Ft();ll();Yt();Kt();Al();Gt();Qt();Zt();fl();bt();Ml();Xe();To=Fl(vn()),fv={fileClone:[],editorRule:null,ruleTypeHtml:function(){let e=Q().conditionformat;return`<div class="ruleTypeBox"> |
| | | </div>`;$(y).appendTo($("#luckysheet-cell-main #luckysheet-multipleRange-show")),o.multipleIndex++,h.cooperativeEdit.usernameTimeout["user"+e]!=null&&clearTimeout(h.cooperativeEdit.usernameTimeout["user"+e]),h.cooperativeEdit.usernameTimeout["user"+e]=setTimeout(()=>{clearTimeout(h.cooperativeEdit.usernameTimeout["user"+e]),h.cooperativeEdit.usernameTimeout["user"+e]=null},10*1e3)}},sheetDeleSave:[],submitInterval:1e3,imagesubmitInterval:5e3,submitdatalimit:50,submitcompresslimit:1e3,checksubmit:function(e){let n=this;n.submitTimeout(),clearTimeout(n.imageRequestTimeout),n.imageRequestTimeout=setTimeout(function(){n.imageRequest()},n.imagesubmitInterval)},submitTimeout:function(){let e=this;clearTimeout(e.requestTimeOut),!e.requestLock&&e.requestlast!=null&&e.requestlast.clone().add(1,"seconds").isBefore((0,Pi.default)())&&e.request(),e.requestTimeOut=setTimeout(function(){e.submitTimeout()},e.submitInterval)},requestLock:!1,requestlast:null,firstchange:!0,requestTimeOut:null,request:function(){let e=this,t=this.gridKey+"__qkcache";e.cachelocaldata(function(l,a){if(a.length==0)return;a=encodeURIComponent(JSON.stringify(a));let o=a.length,s=!1;e.requestLock=!0,e.updateUrl!=""&&$.post(e.updateUrl,{compress:s,gridKey:e.gridKey,data:a},function(u){new Function("return "+u)().status?($("#luckysheet_info_detail_update").html("\u6700\u8FD1\u5B58\u6863\u65F6\u95F4:"+(0,Pi.default)().format("M-D H:m:s")),$("#luckysheet_info_detail_save").html("\u540C\u6B65\u6210\u529F"),e.clearcachelocaldata()):($("#luckysheet_info_detail_save").html("<span style='color:#ff2121'>\u540C\u6B65\u5931\u8D25</span>"),e.restorecachelocaldata()),e.requestlast=(0,Pi.default)(),e.requestLock=!1})})},imageRequestLast:null,imageRequestLock:!1,imageRequestTimeout:null,imageRequest:function(){let e=this;html2canvas($("#"+container).find(".luckysheet-grid-window").get(0),{onrendered:function(n){let t=$(n).appendTo("body");t.hide();let l=t.width(),a=t.height(),o=t.get(0).getContext("2d").getImageData(0,0,l,a),s=l,u=a;s*.54>u?s=u/.54:u=s*.54;let f=$("<canvas>").attr("width",s).attr("height",u)[0];f.getContext("2d").putImageData(o,0,0),t.attr("width",350),t.attr("height",189),t.get(0).getContext("2d").drawImage(f,0,0,350,189);let d=t.get(0).toDataURL("image/jpeg",.9),m=luckysheet.sheetmanage.getCurSheetnoset();e.imageRequestLock=!0;let g=encodeURIComponent(JSON.stringify({t:"thumb",img:d,curindex:m}));t.remove(),e.updateImageUrl!=""&&$.post(e.updateImageUrl,{compress:!1,gridKey:e.gridKey,data:g},function(y){new Function("return "+y)().status?imageRequestLast=(0,Pi.default)():$("#luckysheet_info_detail_save").html("<span style='color:#ff2121'>\u7F51\u7EDC\u4E0D\u7A33\u5B9A</span>"),e.imageRequestLock=!0})}})},localdata:[],matchOpt:function(e,n){for(let t in e){if(t=="t"&&e.t in{drc:1,arc:1,sha:1,shc:1,shd:1})return!1;if(t!="v"&&(!(t in n)||n[t]!=e[t]))return!1}return!0},deleteRepeatOpt:function(e,n){let t=e,l=this;if(n instanceof Array)for(let o=0;o<n.length;o++){let s=n[o];for(let u=0;u<t.length;u++){let f=e[o];l.matchOpt(s,f)&&delete t[u]}}else for(let o=0;o<t.length;o++){let s=t[o];l.matchOpt(n,s)&&delete t[o]}let a=[];for(let o=0;o<t.length;o++)t[o]!=null&&a.push(t[o]);return a},setlocaldata:function(e,n){let t=this.gridKey,l=this;l.getlocaldata(function(a){a==null&&(a=[]),e instanceof Array?a=a.concat(e):a.push(e),l.localdata=a,n(l.localdata)})},getlocaldata:function(e){let n=this.gridKey;e(this.localdata)},clearlocaldata:function(e){let n=this.gridKey;this.localdata=[],e()},cachelocaldata:function(e){let n=this.gridKey,t=this,l=n+"__qkcache",a=t.localdata,o=a.length;if(o>1){let s=[];s[0]=a[0];for(let u=1;u<o;u++){let f=a[u],d=!0;for(let m=0;m<s.length;m++){let g=s[m];if(t.matchOpt(f,g)){s.splice(m,1,f),d=!1;break}}d&&(s=s.concat(f))}a=s}a==null||a.length==0||t.clearlocaldata(function(){localforage.setItem(l,a).then(function(){e(l,a)})})},clearcachelocaldata:function(e){let t=this.gridKey+"__qkcache";localforage.removeItem(t,function(l,a){e&&typeof e=="function"&&e()})},restorecachelocaldata:function(e){let t=this.gridKey+"__qkcache",l=this;localforage.getItem(t).then(function(a){let o=a;l.getlocaldata(function(s){s==null&&(s=[]);let u=o.concat(s);l.localdata=u,e instanceof Function&&e(l.localdata)})})},keepHighLightBox:function(){h.cooperativeEdit.checkoutData.forEach(e=>{e.index==h.currentSheetIndex&&(e.op==="enterEdit"?ga.multipleRangeShow(e.id,e.username,e.r,e.c,e.op):ga.multipleRangeShow(e.id,e.username,e.r,e.c))})}},ne=ga});var fv,U,ll=Ie(()=>{Gt();xa();ft();bt();Qt();fv={info:function(e,n){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-info").remove();let l=Q().button;$("body").append(_e(dt,{id:"luckysheet-info",addclass:"",title:e,content:n,botton:'<button class="btn btn-default luckysheet-model-close-btn"> '+l.close+" </button>",style:"z-index:100003"}));let a=$("#luckysheet-info").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),f=$(window).height(),d=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-info").css({left:(u+d-s)/2,top:(f+m-o)/3}).show()},confirm:function(e,n,t,l,a,o){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-confirm").remove();let u=Q().button;a==null&&(a=u.confirm),o==null&&(o=u.cancel),$("body").append(_e(dt,{id:"luckysheet-confirm",addclass:"",style:"z-index:100003",title:e,content:n,botton:'<button class="btn btn-primary luckysheet-model-conform-btn"> '+a+' </button><button class="btn btn-default luckysheet-model-cancel-btn"> '+o+" </button>"}));let f=$("#luckysheet-confirm").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),d=f.outerHeight(),m=f.outerWidth(),g=$(window).width(),y=$(window).height(),v=$(document).scrollLeft(),b=$(document).scrollTop();$("#luckysheet-confirm").css({left:(g+v-m)/2,top:(y+b-d)/3}).show(),f.find(".luckysheet-model-conform-btn").click(function(){typeof t=="function"&&t(),ne.keepHighLightBox(),$("#luckysheet-confirm").hide(),$("#luckysheet-modal-dialog-mask").hide()}),f.find(".luckysheet-model-cancel-btn").click(function(){typeof l=="function"&&l(),$("#luckysheet-confirm").hide(),$("#luckysheet-modal-dialog-mask").hide()})},screenshot:function(e,n,t){let a=Q().screenshot;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-confirm").remove(),$("body").append(_e(dt,{id:"luckysheet-confirm",addclass:"",style:"z-index:100003",title:e,content:n,botton:'<a style="text-decoration:none;color:#fff;" class="download btn btn-primary luckysheet-model-conform-btn"> '+a.downLoadBtn+' </a> <button class="btn btn-primary luckysheet-model-copy-btn"> '+a.downLoadCopy+' </button><button class="btn btn-default luckysheet-model-cancel-btn"> '+a.downLoadClose+" </button>"}));let o=$("#luckysheet-confirm").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),s=o.outerHeight(),u=o.outerWidth(),f=$(window).width(),d=$(window).height(),m=$(document).scrollLeft(),g=$(document).scrollTop();$("#luckysheet-confirm").css({left:(f+m-u)/2,top:(d+g-s)/3}).show(),o.find(".luckysheet-model-conform-btn").click(function(){fr.isIE()=="1"?alert(a.browserNotTip):(!!window.ActiveXObject||"ActiveXObject"in window)&&($("#IframeReportImg").length===0&&$('<iframe style="display:none;" id="IframeReportImg" name="IframeReportImg" onload="downloadImg();" width="0" height="0" src="about:blank"></iframe>').appendTo("body"),$("#IframeReportImg").attr("src")!=t?$("#IframeReportImg").attr("src",t):$("#IframeReportImg").src!="about:blank"&&window.frames.IframeReportImg.document.execCommand("SaveAs"))}),o.find(".luckysheet-model-cancel-btn").click(function(){$("#luckysheet-confirm").hide(),$("#luckysheet-modal-dialog-mask").hide()}),$("#luckysheet-confirm .luckysheet-model-copy-btn").click(function(){let y=new clipboard.DT;y.setData("text/html","<img src='"+t+"'>"),fr.isIE()=="1"?alert(a.rightclickTip):(clipboard.write(y),alert(a.successTip))})},chartPointConfig:function(e,n,t){$("body").append(_e(dt,{id:e,addclass:"luckysheet-chart-point-config-c",title:"\u6570\u636E\u70B9\u6279\u91CF\u8BBE\u7F6E",content:Fu,botton:'<button class="btn btn-danger luckysheet-model-save-btn"> \u4FDD\u5B58\u8BBE\u7F6E </button><button class="btn btn-default luckysheet-model-close-btn"> \u53D6\u6D88 </button>',style:"z-index:100003;height:80%;width:80%;top:10%;left:10%;"})),$("#luckysheet-modal-dialog-mask").show();let l=$(window).width(),a=$(window).height();$("#"+e).find(".luckysheet-chart-point-config").css("height",a-160),$("#"+e).css({height:a-90,width:l-100,left:7,top:14}).show().find(".luckysheet-model-save-btn").click(function(){typeof n=="function"&&n(),$("#"+e).hide(),$("#luckysheet-modal-dialog-mask").hide()}),$("#"+e).find(".luckysheet-model-save-btn").click(function(){typeof t=="function"&&t(),$("#"+e).hide(),$("#luckysheet-modal-dialog-mask").hide()})},sheetConfig:function(){},hoverTipshowState:!1,hoverTipshowTimeOut:null,createHoverTip:function(e,n){let t=this;$(e).on("mouseover",n,function(l){t.hoverTipshowState||(clearTimeout(t.hoverTipshowTimeOut),t.hoverTipshowTimeOut=setTimeout(function(){let a=$(l.currentTarget),o=a.offset(),s=$("#luckysheet-tooltip-up"),u=a.data("tips");if((u==null||u.length==0)&&(u=a.prev().data("tips"),u==null||u.length==0))return;s.length==0&&($("body").append(Eu),s=$("#luckysheet-tooltip-up")),s.removeClass("jfk-tooltip-hide").find("div.jfk-tooltip-contentId").html(u);let f=s.outerWidth();s.find("div.jfk-tooltip-arrow").css("left",f/2);let d=o.left+(a.outerWidth()-f)/2;d<2&&(d=2,s.find("div.jfk-tooltip-arrow").css("left",a.outerWidth()/2)),s.css({top:o.top+a.outerHeight()+1,left:d})},300))}).on("mouseout",n,function(l){t.hoverTipshowState=!1,clearTimeout(t.hoverTipshowTimeOut),$("#luckysheet-tooltip-up").addClass("jfk-tooltip-hide")}).on("click",n,function(l){t.hoverTipshowState=!0,clearTimeout(t.hoverTipshowTimeOut),$("#luckysheet-tooltip-up").addClass("jfk-tooltip-hide")})},popover:function(e,n,t,l,a,o){let s=Q(),u=s.button,f=s.paint;a==null&&(a=u.close);let d='<div id="luckysheetpopover" class="luckysheetpopover"><div class="luckysheetpopover-content">'+f.start+'</div><div class="luckysheetpopover-btn">'+a+"</div></div>";$("#luckysheetpopover").remove(),$("body").append(d),$("#luckysheetpopover .luckysheetpopover-content").html(e);let m=$("#luckysheetpopover").outerWidth(),g=$("#luckysheetpopover").outerHeight(),y={};n=="topLeft"?(y.top="20px",y.left="20px"):n=="topCenter"?(y.top="20px",y.left="50%",y["margin-left"]=-m/2):n=="topRight"?(y.top="20px",y.right="20px"):n=="midLeft"?(y.top="50%",y["margin-top"]=-g/2,y.left="20px"):n=="center"?(y.top="50%",y["margin-top"]=-g/2,y.left="50%",y["margin-left"]=-m/2):n=="midRight"?(y.top="50%",y["margin-top"]=-g/2,y.right="20px"):n=="bottomLeft"?(y.bottom="20px",y.left="20px"):n=="bottomCenter"?(y.bottom="20px",y.left="50%",y["margin-left"]=-m/2):n=="bottomRight"?(y.bottom="20px",y.right="20px"):(y.top="20px",y.left="50%",y["margin-left"]=-m/2),l=="white"&&(y.background="rgba(255, 255, 255, 0.65)",y.color="#000",$("#luckysheetpopover .luckysheetpopover-btn").css({border:"1px solid #000"})),setTimeout(function(){$("#luckysheetpopover .luckysheetpopover-content").css({"margin-left":-$("#luckysheetpopover .luckysheetpopover-btn").outerWidth()/2})},1),$("#luckysheetpopover").css(y).fadeIn(),$("#luckysheetpopover .luckysheetpopover-btn").click(function(){typeof o=="function"&&o()}),t!=null&&typeof t=="number"&&setTimeout(function(){$("#luckysheetpopover").fadeOut().remove(),typeof o=="function"&&o()},t)}},U=fv});var To,dv,$e,gr=Ie(()=>{Nt();ft();Ut();Ft();ll();Yt();Kt();Al();Gt();Qt();Zt();dl();bt();Ml();Xe();To=Fl(vn()),dv={fileClone:[],editorRule:null,ruleTypeHtml:function(){let e=Q().conditionformat;return`<div class="ruleTypeBox"> |
| | | <div class="ruleTypeItem"> |
| | | <span class="icon iconfont luckysheet-iconfont-youjiantou"></span> |
| | | <span>${e.ruleTypeItem1}</span> |
| | |
| | | <label for="checkCellColor">${e.cellColor}\uFF1A</label> |
| | | <input id="cellcolorshow" data-tips="${e.cellColor}" data-func="background" class="luckysheet-conditionformat-config-color" type="text" value="#ffc7ce" style="display: none;"> |
| | | </div> |
| | | </div>`},selectRange:[],selectStatus:!1,dataBarList:[{format:["#638ec6","#ffffff"]},{format:["#63c384","#ffffff"]},{format:["#ff555a","#ffffff"]},{format:["#ffb628","#ffffff"]},{format:["#008aef","#ffffff"]},{format:["#d6007b","#ffffff"]},{format:["#638ec6"]},{format:["#63c384"]},{format:["#ff555a"]},{format:["#ffb628"]},{format:["#008aef"]},{format:["#d6007b"]}],colorGradationList:[{format:["rgb(99, 190, 123)","rgb(255, 235, 132)","rgb(248, 105, 107)"]},{format:["rgb(248, 105, 107)","rgb(255, 235, 132)","rgb(99, 190, 123)"]},{format:["rgb(99, 190, 123)","rgb(252, 252, 255)","rgb(248, 105, 107)"]},{format:["rgb(248, 105, 107)","rgb(252, 252, 255)","rgb(99, 190, 123)"]},{format:["rgb(90, 138, 198)","rgb(252, 252, 255)","rgb(248, 105, 107)"]},{format:["rgb(248, 105, 107)","rgb(252, 252, 255)","rgb(90, 138, 198)"]},{format:["rgb(252, 252, 255)","rgb(248, 105, 107)"]},{format:["rgb(248, 105, 107)","rgb(252, 252, 255)"]},{format:["rgb(99, 190, 123)","rgb(252, 252, 255)"]},{format:["rgb(252, 252, 255)","rgb(99, 190, 123)"]},{format:["rgb(99, 190, 123)","rgb(255, 235, 132)"]},{format:["rgb(255, 235, 132)","rgb(99, 190, 123)"]}],init:function(){let e=this,n=Q().conditionformat;$(document).off("change.CFchooseSheet").on("change.CFchooseSheet","#luckysheet-administerRule-dialog .chooseSheet",function(){let t=$("#luckysheet-administerRule-dialog .chooseSheet option:selected").val();e.getConditionRuleList(t)}),$(document).off("click.CFadministerRuleItem").on("click.CFadministerRuleItem","#luckysheet-administerRule-dialog .ruleList .listBox .item",function(){$(this).addClass("on").siblings().removeClass("on")}),$(document).off("click.CFadministerRuleConfirm").on("click.CFadministerRuleConfirm","#luckysheet-administerRule-dialog-confirm",function(){if(!Rr(h.currentSheetIndex))return;let t=$.extend(!0,[],h.luckysheetfile),l=e.getHistoryRules(t),a=$.extend(!0,[],e.fileClone);for(let u=0;u<a.length;u++){let d=a[u].index;h.luckysheetfile[Z(d)].luckysheet_conditionformat_save=a[Z(d)].luckysheet_conditionformat_save}let o=$.extend(!0,[],h.luckysheetfile),s=e.getCurrentRules(o);if(e.ref(l,s),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-administerRule-dialog").hide(),ne.allowUpdate){let u=$.extend(!0,[],h.luckysheetfile);for(let d=0;d<u.length;d++)ne.saveParam("all",u[d].index,u[d].luckysheet_conditionformat_save,{k:"luckysheet_conditionformat_save"})}}),$(document).off("click.CFadministerRuleClose").on("click.CFadministerRuleClose","#luckysheet-administerRule-dialog-close",function(){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-administerRule-dialog").hide(),e.fileClone=[]}),$(document).off("click.CFadministerRuleFa").on("click.CFadministerRuleFa","#luckysheet-administerRule-dialog .item .fa-table",function(){$(this).parents("#luckysheet-administerRule-dialog").hide();let t=$("#luckysheet-administerRule-dialog .chooseSheet select option:selected").val();t!=h.currentSheetIndex&&ve.changeSheetExec(t);let l=$(this).siblings("input").val().trim(),a=$(this).parents(".item").attr("data-item");e.multiRangeDialog(a,l),e.selectRange=[];let o=e.getRangeByTxt(l);if(o.length>0)for(let s=0;s<o.length;s++){let u=o[s].row[0],d=o[s].row[1],f=o[s].column[0],m=o[s].column[1],g=h.visibledatarow[d],y=u-1==-1?0:h.visibledatarow[u-1],v=h.visibledatacolumn[m],b=f-1==-1?0:h.visibledatacolumn[f-1];e.selectRange.push({left:b,width:v-b-1,top:y,height:g-y-1,left_move:b,width_move:v-b-1,top_move:y,height_move:g-y-1,row:[u,d],column:[f,m],row_focus:u,column_focus:f})}Ot(e.selectRange)}),$(document).off("click.CFmultiRangeConfirm").on("click.CFmultiRangeConfirm","#luckysheet-multiRange-dialog-confirm",function(){$(this).parents("#luckysheet-multiRange-dialog").hide();let t=$(this).attr("data-item"),l=$(this).parents("#luckysheet-multiRange-dialog").find("input").val();$("#luckysheet-administerRule-dialog .item[data-item="+t+"] input").val(l);let a=$("#luckysheet-administerRule-dialog .chooseSheet option:selected").val();e.fileClone[Z(a)].luckysheet_conditionformat_save[t].cellrange=e.getRangeByTxt(l),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-administerRule-dialog").show(),Ot([])}),$(document).off("click.CFmultiRangeClose").on("click.CFmultiRangeClose","#luckysheet-multiRange-dialog-close",function(){$(this).parents("#luckysheet-multiRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-administerRule-dialog").show(),$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide(),Ot([])}),$(document).off("click.CFnewConditionRule").on("click.CFnewConditionRule","#newConditionRule",function(){let t=$("#luckysheet-administerRule-dialog .chooseSheet option:selected").val();if(!!Rr(t)){if(h.luckysheet_select_save.length==0){de()?alert(n.pleaseSelectRange):U.info(n.pleaseSelectRange,"");return}e.newConditionRuleDialog(1)}}),$(document).off("click.CFnewConditionRuleConfirm").on("click.CFnewConditionRuleConfirm","#luckysheet-newConditionRule-dialog-confirm",function(){if(!Rr(h.currentSheetIndex))return;let t=$("#luckysheet-newConditionRule-dialog .ruleTypeItem.on").index(),l=$("#luckysheet-newConditionRule-dialog #type1 option:selected").val(),a=$("#luckysheet-newConditionRule-dialog ."+l+"Box #type2 option:selected").val(),o,s;if(t==0){if(l=="dataBar"){let d=$(this).parents("#luckysheet-newConditionRule-dialog").find(".dataBarBox .luckysheet-conditionformat-config-color").spectrum("get").toHexString();a=="gradient"?o=[d,"#ffffff"]:a=="solid"&&(o=[d]),s={type:"dataBar",cellrange:$.extend(!0,[],h.luckysheet_select_save),format:o}}else if(l=="colorGradation"){let d=$(this).parents("#luckysheet-newConditionRule-dialog").find(".colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(),f=$(this).parents("#luckysheet-newConditionRule-dialog").find(".colorGradationBox .midVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(),m=$(this).parents("#luckysheet-newConditionRule-dialog").find(".colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString();a=="threeColor"?o=[d,f,m]:a=="twoColor"&&(o=[d,m]),s={type:"colorGradation",cellrange:$.extend(!0,[],h.luckysheet_select_save),format:o}}else if(l=="icons"){let d=$(this).parents("#luckysheet-newConditionRule-dialog").find(".iconsBox .model").attr("data-len"),f=$(this).parents("#luckysheet-newConditionRule-dialog").find(".iconsBox .model").attr("data-leftmin"),m=$(this).parents("#luckysheet-newConditionRule-dialog").find(".iconsBox .model").attr("data-top");o={len:d,leftMin:f,top:m},s={type:"icons",cellrange:$.extend(!0,[],h.luckysheet_select_save),format:o}}}else{let d="",f=[],m=[];if(t==1){if(l=="number")if(d=a,a=="betweenness"){let v=$("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim(),b=$("#luckysheet-newConditionRule-dialog #conditionVal2 input").val().trim(),k=e.getRangeByTxt(v);if(k.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(k.length==1){let x=k[0].row[0],C=k[0].row[1],S=k[0].column[0],_=k[0].column[1];if(x==C&&S==_)v=ze(x,S,h.flowdata),f.push({row:k[0].row,column:k[0].column}),m.push(v);else{e.infoDialog(n.onlySingleCell,"");return}}else if(k.length==0)if(isNaN(v)||v==""){e.infoDialog(n.conditionValueCanOnly,"");return}else m.push(v);let w=e.getRangeByTxt(b);if(w.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(w.length==1){let x=w[0].row[0],C=w[0].row[1],S=w[0].column[0],_=w[0].column[1];if(x==C&&S==_)b=ze(x,S,h.flowdata),f.push({row:w[0].row,column:w[0].column}),m.push(b);else{e.infoDialog(n.onlySingleCell,"");return}}else if(w.length==0)if(isNaN(b)||b==""){e.infoDialog(n.conditionValueCanOnly,"");return}else m.push(b)}else{let v=$("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim(),b=e.getRangeByTxt(v);if(b.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(b.length==1){let k=b[0].row[0],w=b[0].row[1],x=b[0].column[0],C=b[0].column[1];if(k==w&&x==C)v=ze(k,x,h.flowdata),f.push({row:b[0].row,column:b[0].column}),m.push(v);else{e.infoDialog(n.onlySingleCell,"");return}}else if(b.length==0)if(isNaN(v)||v==""){e.infoDialog(n.conditionValueCanOnly,"");return}else m.push(v)}else if(l=="text"){d="textContains";let v=$("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim(),b=e.getRangeByTxt(v);if(b.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(b.length==1){let k=b[0].row[0],w=b[0].row[1],x=b[0].column[0],C=b[0].column[1];if(k==w&&x==C)v=ze(k,x,h.flowdata),f.push({row:b[0].row,column:b[0].column}),m.push(v);else{e.infoDialog(n.onlySingleCell,"");return}}else if(b.length==0)if(v==""){e.infoDialog(n.conditionValueCanOnly,"");return}else m.push(v)}else if(l=="date"){d="occurrenceDate";let v=$("#luckysheet-newConditionRule-dialog #daterange-btn").val();if(v==""||v==null){e.infoDialog(n.pleaseSelectADate,"");return}m.push(v)}}else if(t==2){l=="top"?$("#luckysheet-newConditionRule-dialog #isPercent").is(":selected")?d="top10%":d="top10":l=="last"&&($("#luckysheet-newConditionRule-dialog #isPercent").is(":selected")?d="last10%":d="last10");let v=$("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim();if(parseInt(v)!=v||parseInt(v)<1||parseInt(v)>1e3){e.infoDialog(n.pleaseEnterInteger,"");return}m.push(parseInt(v))}else if(t==3)l=="AboveAverage"?(d="AboveAverage",m.push("AboveAverage")):l=="SubAverage"&&(d="SubAverage",m.push("SubAverage"));else if(t==4)d="duplicateValue",m.push(l);else if(t==5){d="formula";let v=$("#luckysheet-newConditionRule-dialog #formulaConditionVal input").val().trim();if(v==""){e.infoDialog("Condition value cannot be empty!","");return}m.push(v)}let g;$("#luckysheet-newConditionRule-dialog #checkTextColor").is(":checked")?g=$("#luckysheet-newConditionRule-dialog #textcolorshow").spectrum("get").toHexString():g=null;let y;$("#luckysheet-newConditionRule-dialog #checkCellColor").is(":checked")?y=$("#luckysheet-newConditionRule-dialog #cellcolorshow").spectrum("get").toHexString():y=null,o={textColor:g,cellColor:y},s={type:"default",cellrange:$.extend(!0,[],h.luckysheet_select_save),format:o,conditionName:d,conditionRange:f,conditionValue:m}}$("#luckysheet-newConditionRule-dialog").hide();let u=$(this).attr("data-source");if(u==0){$("#luckysheet-modal-dialog-mask").hide();let d=$.extend(!0,[],h.luckysheetfile),f=e.getHistoryRules(d),m=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save==null?[]:h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save;m.push(s),h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save=m;let g=$.extend(!0,[],h.luckysheetfile),y=e.getCurrentRules(g);e.ref(f,y),ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,m,{k:"luckysheet_conditionformat_save"})}else if(u==1){let d=e.fileClone[Z(h.currentSheetIndex)].luckysheet_conditionformat_save?e.fileClone[Z(h.currentSheetIndex)].luckysheet_conditionformat_save:[];d.push(s),e.fileClone[Z(h.currentSheetIndex)].luckysheet_conditionformat_save=d,e.administerRuleDialog()}}),$(document).off("click.CFnewConditionRuleClose").on("click.CFnewConditionRuleClose","#luckysheet-newConditionRule-dialog-close",function(){let t=$(this).attr("data-source");t==0&&$("#luckysheet-modal-dialog-mask").hide(),t==1&&$("#luckysheet-administerRule-dialog").show(),$("#luckysheet-newConditionRule-dialog").hide(),$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide()}),$(document).off("click.CFeditorConditionRule").on("click.CFeditorConditionRule","#editorConditionRule",function(){let t=$("#luckysheet-administerRule-dialog .chooseSheet option:selected").val();if(!Rr(t))return;let l=$("#luckysheet-administerRule-dialog .ruleList .listBox .item.on").attr("data-item"),a={sheetIndex:t,itemIndex:l,data:e.fileClone[Z(t)].luckysheet_conditionformat_save[l]};e.editorRule=a,e.editorConditionRuleDialog()}),$(document).off("click.CFeditorConditionRuleConfirm").on("click.CFeditorConditionRuleConfirm","#luckysheet-editorConditionRule-dialog-confirm",function(){let t=$("#luckysheet-editorConditionRule-dialog .ruleTypeItem.on").index(),l=$("#luckysheet-editorConditionRule-dialog #type1 option:selected").val(),a=$("#luckysheet-editorConditionRule-dialog ."+l+"Box #type2 option:selected").val(),o=e.editorRule.data.cellrange,s,u;if(t==0){if(l=="dataBar"){let m=$(this).parents("#luckysheet-editorConditionRule-dialog").find(".dataBarBox .luckysheet-conditionformat-config-color").spectrum("get").toHexString();a=="gradient"?s=[m,"#ffffff"]:a=="solid"&&(s=[m]),u={type:"dataBar",cellrange:o,format:s}}else if(l=="colorGradation"){let m=$(this).parents("#luckysheet-editorConditionRule-dialog").find(".colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(),g=$(this).parents("#luckysheet-editorConditionRule-dialog").find(".colorGradationBox .midVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(),y=$(this).parents("#luckysheet-editorConditionRule-dialog").find(".colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString();a=="threeColor"?s=[m,g,y]:a=="twoColor"&&(s=[m,y]),u={type:"colorGradation",cellrange:o,format:s}}else if(l=="icons"){let m=$(this).parents("#luckysheet-editorConditionRule-dialog").find(".iconsBox .model").attr("data-len"),g=$(this).parents("#luckysheet-editorConditionRule-dialog").find(".iconsBox .model").attr("data-leftmin"),y=$(this).parents("#luckysheet-editorConditionRule-dialog").find(".iconsBox .model").attr("data-top");s={len:m,leftMin:g,top:y},u={type:"icons",cellrange:o,format:s}}}else{let m="",g=[],y=[];if(t==1){if(l=="number")if(m=a,a=="betweenness"){let k=$("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim(),w=$("#luckysheet-editorConditionRule-dialog #conditionVal2 input").val().trim(),x=e.getRangeByTxt(k);if(x.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(x.length==1){let S=x[0].row[0],_=x[0].row[1],T=x[0].column[0],A=x[0].column[1];if(S==_&&T==A)k=ze(S,T,h.flowdata),g.push({row:x[0].row,column:x[0].column}),y.push(k);else{e.infoDialog(n.onlySingleCell,"");return}}else if(x.length==0)if(isNaN(k)||k==""){e.infoDialog(n.conditionValueCanOnly,"");return}else y.push(k);let C=e.getRangeByTxt(w);if(C.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(C.length==1){let S=C[0].row[0],_=C[0].row[1],T=C[0].column[0],A=C[0].column[1];if(S==_&&T==A)w=ze(S,T,h.flowdata),g.push({row:C[0].row,column:C[0].column}),y.push(w);else{e.infoDialog(n.onlySingleCell,"");return}}else if(C.length==0)if(isNaN(w)||w==""){e.infoDialog(n.conditionValueCanOnly,"");return}else y.push(w)}else{let k=$("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim(),w=e.getRangeByTxt(k);if(w.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(w.length==1){let x=w[0].row[0],C=w[0].row[1],S=w[0].column[0],_=w[0].column[1];if(x==C&&S==_)k=ze(x,S,h.flowdata),g.push({row:w[0].row,column:w[0].column}),y.push(k);else{e.infoDialog(n.onlySingleCell,"");return}}else if(w.length==0)if(isNaN(k)||k==""){e.infoDialog(n.conditionValueCanOnly,"");return}else y.push(k)}else if(l=="text"){m="textContains";let k=$("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim(),w=e.getRangeByTxt(k);if(w.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(w.length==1){let x=w[0].row[0],C=w[0].row[1],S=w[0].column[0],_=w[0].column[1];if(x==C&&S==_)k=ze(x,S,h.flowdata),g.push({row:w[0].row,column:w[0].column}),y.push(k);else{e.infoDialog(n.onlySingleCell,"");return}}else if(w.length==0)if(isNaN(k)||k==""){e.infoDialog(n.conditionValueCanOnly,"");return}else y.push(k)}else if(l=="date"){m="occurrenceDate";let k=$("#luckysheet-editorConditionRule-dialog #daterange-btn").val();if(k==""||k==null){e.infoDialog(n.pleaseSelectADate,"");return}y.push(k)}}else if(t==2){l=="top"?$("#luckysheet-editorConditionRule-dialog #isPercent").is(":selected")?m="top10%":m="top10":l=="last"&&($("#luckysheet-editorConditionRule-dialog #isPercent").is(":selected")?m="last10%":m="last10");let k=$("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim();if(parseInt(k)!=k||parseInt(k)<1||parseInt(k)>1e3){e.infoDialog(n.pleaseEnterInteger,"");return}y.push(k)}else if(t==3)l=="AboveAverage"?(m="AboveAverage",y.push("AboveAverage")):l=="SubAverage"&&(m="SubAverage",y.push("SubAverage"));else if(t==4)m="duplicateValue",y.push(l);else if(t==5){m="formula";let k=$("#luckysheet-editorConditionRule-dialog #formulaConditionVal input").val().trim();if(console.log(k),k==""){e.infoDialog("Condition value cannot be empty!","");return}y.push(k)}let v;$("#luckysheet-editorConditionRule-dialog #checkTextColor").is(":checked")?v=$("#luckysheet-editorConditionRule-dialog #textcolorshow").spectrum("get").toHexString():v=null;let b;$("#luckysheet-editorConditionRule-dialog #checkCellColor").is(":checked")?b=$("#luckysheet-editorConditionRule-dialog #cellcolorshow").spectrum("get").toHexString():b=null,s={textColor:v,cellColor:b},u={type:"default",cellrange:o,format:s,conditionName:m,conditionRange:g,conditionValue:y}}let d=e.editorRule.sheetIndex,f=e.editorRule.itemIndex;e.fileClone[Z(d)].luckysheet_conditionformat_save[f]=u,$("#luckysheet-editorConditionRule-dialog").hide(),e.administerRuleDialog()}),$(document).off("click.CFeditorConditionRuleClose").on("click.CFeditorConditionRuleClose","#luckysheet-editorConditionRule-dialog-close",function(){$("#luckysheet-editorConditionRule-dialog").hide(),$("#luckysheet-administerRule-dialog").show(),$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide()}),$(document).off("click.CFnewEditorRuleItem").on("click.CFnewEditorRuleItem",".luckysheet-newEditorRule-dialog .ruleTypeItem",function(){$(this).addClass("on").siblings().removeClass("on");let t=$(this).index();$(this).parents(".luckysheet-newEditorRule-dialog").find(".ruleExplainBox").html(e.getRuleExplain(t)),e.colorSelectInit()}),$(document).off("change.CFnewEditorRuleType1").on("change.CFnewEditorRuleType1",".luckysheet-newEditorRule-dialog #type1",function(){let t=$(this).find("option:selected").val();(t=="dataBar"||t=="colorGradation"||t=="icons"||t=="number"||t=="text"||t=="date")&&$(this).parents(".luckysheet-newEditorRule-dialog").find("."+t+"Box").show().siblings().hide(),t=="date"&&e.daterangeInit($(this).parents(".luckysheet-newEditorRule-dialog").attr("id"))}),$(document).off("change.CFnewEditorRuleType2").on("change.CFnewEditorRuleType2",".luckysheet-newEditorRule-dialog #type2",function(){let t=$(this).parents(".luckysheet-newEditorRule-dialog").find("#type1 option:selected").val();t=="colorGradation"?$(this).find("option:selected").val()=="threeColor"?$(this).parents(".luckysheet-newEditorRule-dialog").find(".midVal").show():$(this).parents(".luckysheet-newEditorRule-dialog").find(".midVal").hide():t=="number"&&($(this).find("option:selected").val()=="betweenness"?($(this).parents(".luckysheet-newEditorRule-dialog").find(".txt").show(),$(this).parents(".luckysheet-newEditorRule-dialog").find("#conditionVal2").show()):($(this).parents(".luckysheet-newEditorRule-dialog").find(".txt").hide(),$(this).parents(".luckysheet-newEditorRule-dialog").find("#conditionVal2").hide()))}),$(document).off("click.CFiconsShowbox").on("click.CFiconsShowbox",".luckysheet-newEditorRule-dialog .iconsBox .showbox",function(){$(this).parents(".iconsBox").find("ul").toggle()}),$(document).off("click.CFiconsLi").on("click.CFiconsLi",".luckysheet-newEditorRule-dialog .iconsBox li",function(){let t=$(this).find("div").attr("data-len"),l=$(this).find("div").attr("data-leftmin"),a=$(this).find("div").attr("data-top"),o=$(this).find("div").attr("title"),s=$(this).find("div").css("background-position");$(this).parents(".iconsBox").find(".showbox .model").css("background-position",s),$(this).parents(".iconsBox").find(".showbox .model").attr("data-len",t),$(this).parents(".iconsBox").find(".showbox .model").attr("data-leftmin",l),$(this).parents(".iconsBox").find(".showbox .model").attr("data-top",a),$(this).parents(".iconsBox").find(".showbox .model").attr("title",o),$(this).parents("ul").hide()}),$(document).off("click.CFdeleteConditionRule").on("click.CFdeleteConditionRule","#deleteConditionRule",function(){let t=$("#luckysheet-administerRule-dialog .chooseSheet option:selected").val();if(!Rr(t))return;let l=$("#luckysheet-administerRule-dialog .ruleList .listBox .item.on").attr("data-item");e.fileClone[Z(t)].luckysheet_conditionformat_save.splice(l,1),e.administerRuleDialog()}),$(document).off("click.CFdefault").on("click.CFdefault","#luckysheet-conditionformat-dialog-confirm",function(){if(!Rr(h.currentSheetIndex))return;let t=$("#luckysheet-conditionformat-dialog .box").attr("data-itemvalue"),l=[],a=[];if(t=="greaterThan"||t=="lessThan"||t=="equal"||t=="textContains"){let v=$("#luckysheet-conditionformat-dialog #conditionVal").val().trim(),b=e.getRangeByTxt(v);if(b.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(b.length==1){let k=b[0].row[0],w=b[0].row[1],x=b[0].column[0],C=b[0].column[1];if(k==w&&x==C)v=ze(k,x,h.flowdata),l.push({row:b[0].row,column:b[0].column}),a.push(v);else{e.infoDialog(n.onlySingleCell,"");return}}else if(b.length==0)if(isNaN(v)||v==""){e.infoDialog(n.conditionValueCanOnly,"");return}else a.push(v)}else if(t=="betweenness"){let v=$("#luckysheet-conditionformat-dialog #conditionVal").val().trim(),b=$("#luckysheet-conditionformat-dialog #conditionVal2").val().trim(),k=e.getRangeByTxt(v);if(k.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(k.length==1){let x=k[0].row[0],C=k[0].row[1],S=k[0].column[0],_=k[0].column[1];if(x==C&&S==_)v=ze(x,S,h.flowdata),l.push({row:k[0].row,column:k[0].column}),a.push(v);else{e.infoDialog(n.onlySingleCell,"");return}}else if(k.length==0)if(isNaN(v)||v==""){e.infoDialog(n.conditionValueCanOnly,"");return}else a.push(v);let w=e.getRangeByTxt(b);if(w.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(w.length==1){let x=w[0].row[0],C=w[0].row[1],S=w[0].column[0],_=w[0].column[1];if(x==C&&S==_)b=ze(x,S,h.flowdata),l.push({row:w[0].row,column:w[0].column}),a.push(b);else{e.infoDialog(n.onlySingleCell,"");return}}else if(w.length==0)if(isNaN(b)||b==""){e.infoDialog(n.conditionValueCanOnly,"");return}else a.push(b)}else if(t=="occurrenceDate"){let v=$("#luckysheet-conditionformat-dialog #daterange-btn").val();if(v==""||v==null){e.infoDialog(n.pleaseSelectADate,"");return}a.push(v)}else if(t=="duplicateValue")a.push($("#luckysheet-conditionformat-dialog #conditionVal option:selected").val());else if(t=="top10"||t=="top10%"||t=="last10"||t=="last10%"){let v=$("#luckysheet-conditionformat-dialog #conditionVal").val().trim();if(parseInt(v)!=v||parseInt(v)<1||parseInt(v)>1e3){e.infoDialog(n.pleaseEnterInteger,"");return}a.push(v)}else t=="AboveAverage"?a.push("AboveAverage"):t=="SubAverage"&&a.push("SubAverage");let o;$("#checkTextColor").is(":checked")?o=$("#textcolorshow").spectrum("get").toHexString():o=null;let s;$("#checkCellColor").is(":checked")?s=$("#cellcolorshow").spectrum("get").toHexString():s=null;let u=$.extend(!0,[],h.luckysheetfile),d=e.getHistoryRules(u),f={type:"default",cellrange:$.extend(!0,[],h.luckysheet_select_save),format:{textColor:o,cellColor:s},conditionName:t,conditionRange:l,conditionValue:a},m=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save==null?[]:h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save;m.push(f),h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save=m;let g=$.extend(!0,[],h.luckysheetfile),y=e.getCurrentRules(g);e.ref(d,y),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-conditionformat-dialog").hide(),ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,m,{k:"luckysheet_conditionformat_save"})}),$(document).off("click.CFicons").on("click.CFicons","#luckysheet-CFicons-dialog .item",function(){if($("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-CFicons-dialog").hide(),h.luckysheet_select_save.length>0){let t=$.extend(!0,[],h.luckysheet_select_save),l={len:$(this).attr("data-len"),leftMin:$(this).attr("data-leftMin"),top:$(this).attr("data-top")};e.updateItem("icons",t,l)}}),$(document).on("click",".range .fa-table",function(){let t=$(this).parents(".luckysheet-modal-dialog").attr("id");$("#"+t).hide();let l;if(t=="luckysheet-conditionformat-dialog")$(this).siblings("input").attr("id")=="conditionVal"?l="0_1":l="0_2";else if(t=="luckysheet-newConditionRule-dialog"){let o=$(this).parents(".range").attr("id");o=="formulaConditionVal"?l="1_0":o=="conditionVal"?l="1_1":l="1_2"}else if(t=="luckysheet-editorConditionRule-dialog"){let o=$(this).parents(".range").attr("id");o=="formulaConditionVal"?l="2_0":o=="conditionVal"?l="2_1":l="2_2"}let a=$(this).siblings("input").val();e.singleRangeDialog(l,a),Ot(e.getRangeByTxt(a))}),$(document).on("click","#luckysheet-singleRange-dialog-confirm",function(){$("#luckysheet-modal-dialog-mask").show(),$(this).parents("#luckysheet-singleRange-dialog").hide();let t=$(this).attr("data-source"),l=$(this).parents("#luckysheet-singleRange-dialog").find("input").val();t=="0_1"?($("#luckysheet-conditionformat-dialog").show(),$("#luckysheet-conditionformat-dialog #conditionVal").val(l)):t=="0_2"?($("#luckysheet-conditionformat-dialog").show(),$("#luckysheet-conditionformat-dialog #conditionVal2").val(l)):t=="1_0"?($("#luckysheet-newConditionRule-dialog").show(),$("#luckysheet-newConditionRule-dialog #formulaConditionVal input").val(l)):t=="1_1"?($("#luckysheet-newConditionRule-dialog").show(),$("#luckysheet-newConditionRule-dialog #conditionVal input").val(l)):t=="1_2"?($("#luckysheet-newConditionRule-dialog").show(),$("#luckysheet-newConditionRule-dialog #conditionVal2 input").val(l)):t=="2_0"?($("#luckysheet-editorConditionRule-dialog").show(),$("#luckysheet-editorConditionRule-dialog #formulaConditionVal input").val(l)):t=="2_1"?($("#luckysheet-editorConditionRule-dialog").show(),$("#luckysheet-editorConditionRule-dialog #conditionVal input").val(l)):t=="2_2"&&($("#luckysheet-editorConditionRule-dialog").show(),$("#luckysheet-editorConditionRule-dialog #conditionVal2 input").val(l)),Ot([])}),$(document).on("click","#luckysheet-singleRange-dialog-close",function(){$("#luckysheet-modal-dialog-mask").show(),$(this).parents("#luckysheet-singleRange-dialog").hide();let t=$(this).attr("data-source");t=="0_1"||t=="0_2"?$("#luckysheet-conditionformat-dialog").show():t=="1_0"||t=="1_1"||t=="1_2"?$("#luckysheet-newConditionRule-dialog").show():(t=="2_0"||t=="2_1"||t=="2_2")&&$("#luckysheet-editorConditionRule-dialog").show(),Ot([])}),$(document).on("click",".luckysheet-modal-dialog-title-close",function(){let t=$(this).parents(".luckysheet-modal-dialog").attr("id");if(t=="luckysheet-newConditionRule-dialog"&&$("#"+t).find("#luckysheet-newConditionRule-dialog-close").attr("data-source")==1&&$("#luckysheet-administerRule-dialog").show(),t=="luckysheet-editorConditionRule-dialog"&&$("#luckysheet-administerRule-dialog").show(),t=="luckysheet-singleRange-dialog"){$("#luckysheet-modal-dialog-mask").show();let l=$(this).parents("#luckysheet-singleRange-dialog").find("#luckysheet-singleRange-dialog-confirm").attr("data-source");l=="0_1"||l=="0_2"?$("#luckysheet-conditionformat-dialog").show():l=="1_1"||l=="1_2"?$("#luckysheet-newConditionRule-dialog").show():(l=="2_1"||l=="2_2")&&$("#luckysheet-editorConditionRule-dialog").show(),Ot([])}t=="luckysheet-multiRange-dialog"&&($("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-administerRule-dialog").show(),Ot([])),t=="luckysheet-conditionformat-info-dialog"&&$("#luckysheet-modal-dialog-mask").show()}),$(document).on("click","#luckysheet-conditionformat-info-dialog-close",function(){$(this).parents("#luckysheet-conditionformat-info-dialog").hide()})},singleRangeDialog:function(e,n){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-singleRange-dialog").remove();let t=Q().conditionformat;$("body").append(_e(ft,{id:"luckysheet-singleRange-dialog",addclass:"luckysheet-singleRange-dialog",title:t.selectCell,content:`<input readonly="readonly" placeholder="${t.pleaseSelectCell}" value="${n}"/>`,botton:`<button id="luckysheet-singleRange-dialog-confirm" class="btn btn-primary" data-source="${e}">${t.confirm}</button> |
| | | <button id="luckysheet-singleRange-dialog-close" class="btn btn-default" data-source="${e}">${t.cancel}</button>`,style:"z-index:100003"}));let l=$("#luckysheet-singleRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),a=l.outerHeight(),o=l.outerWidth(),s=$(window).width(),u=$(window).height(),d=$(document).scrollLeft(),f=$(document).scrollTop();$("#luckysheet-singleRange-dialog").css({left:(s+d-o)/2,top:(u+f-a)/3}).show()},multiRangeDialog:function(e,n){let t=this;$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-multiRange-dialog").remove();let l=Q().conditionformat;$("body").append(_e(ft,{id:"luckysheet-multiRange-dialog",addclass:"luckysheet-multiRange-dialog",title:l.selectRange,content:`<input readonly="readonly" placeholder="${l.pleaseSelectRange}" value="${n}"/>`,botton:`<button id="luckysheet-multiRange-dialog-confirm" class="btn btn-primary" data-item="${e}">${l.confirm}</button> |
| | | <button id="luckysheet-multiRange-dialog-close" class="btn btn-default">${l.cancel}</button>`,style:"z-index:100003"}));let a=$("#luckysheet-multiRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),d=$(window).height(),f=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-multiRange-dialog").css({left:(u+f-s)/2,top:(d+m-o)/3}).show(),Ot(t.getRangeByTxt(n))},getTxtByRange:function(e){if(e.length>0){let n=[];for(let t=0;t<e.length;t++){let l=e[t].row[0],a=e[t].row[1],o=e[t].column[0],s=e[t].column[1];n.push(xt(h.currentSheetIndex,{row:[l,a],column:[o,s]},h.currentSheetIndex))}return n.join(",")}},getRangeByTxt:function(e){let n=[];if(e=e.toString(),e.indexOf(",")!=-1){let t=e.split(",");for(let l=0;l<t.length;l++)if(p.iscelldata(t[l]))n.push(p.getcellrange(t[l]));else{n=[];break}}else p.iscelldata(e)&&n.push(p.getcellrange(e));return n},colorSelectInit:function(){let e=Q().conditionformat;$(".luckysheet-conditionformat-config-color").spectrum({showPalette:!0,showPaletteOnly:!0,preferredFormat:"hex",clickoutFiresChange:!1,showInitial:!0,showInput:!0,hideAfterPaletteSelect:!0,showSelectionPalette:!0,maxPaletteSize:8,maxSelectionSize:8,cancelText:e.cancel,chooseText:e.confirmColor,togglePaletteMoreText:"\u81EA\u5B9A\u4E49",togglePaletteLessText:"\u6536\u8D77",togglePaletteOnly:!0,clearText:e.clearColorSelect,noColorSelectedText:"\u6CA1\u6709\u989C\u8272\u88AB\u9009\u62E9",localStorageKey:"spectrum.textcolor"+ne.gridKey,palette:[["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]],change:function(n){n!=null&&(n=n.toHexString())}})},conditionformatDialog:function(e,n){let t=this;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-conditionformat-dialog").remove();let l=Q().conditionformat;$("body").append(_e(ft,{id:"luckysheet-conditionformat-dialog",addclass:"luckysheet-conditionformat-dialog",title:e,content:n,botton:`<button id="luckysheet-conditionformat-dialog-confirm" class="btn btn-primary">${l.confirm}</button> |
| | | <button class="btn btn-default luckysheet-model-close-btn">${l.cancel}</button>`,style:"z-index:9999"}));let a=$("#luckysheet-conditionformat-dialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),d=$(window).height(),f=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-conditionformat-dialog").css({left:(u+f-s)/2,top:(d+m-o)/3}).show(),t.init(),t.colorSelectInit(),e==Q().conditionformat.conditionformat_occurrenceDate&&t.daterangeInit("luckysheet-conditionformat-dialog")},CFiconsDialog:function(){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-CFicons-dialog").remove();let e=Q().conditionformat,n=`<div class="box"> |
| | | </div>`},selectRange:[],selectStatus:!1,dataBarList:[{format:["#638ec6","#ffffff"]},{format:["#63c384","#ffffff"]},{format:["#ff555a","#ffffff"]},{format:["#ffb628","#ffffff"]},{format:["#008aef","#ffffff"]},{format:["#d6007b","#ffffff"]},{format:["#638ec6"]},{format:["#63c384"]},{format:["#ff555a"]},{format:["#ffb628"]},{format:["#008aef"]},{format:["#d6007b"]}],colorGradationList:[{format:["rgb(99, 190, 123)","rgb(255, 235, 132)","rgb(248, 105, 107)"]},{format:["rgb(248, 105, 107)","rgb(255, 235, 132)","rgb(99, 190, 123)"]},{format:["rgb(99, 190, 123)","rgb(252, 252, 255)","rgb(248, 105, 107)"]},{format:["rgb(248, 105, 107)","rgb(252, 252, 255)","rgb(99, 190, 123)"]},{format:["rgb(90, 138, 198)","rgb(252, 252, 255)","rgb(248, 105, 107)"]},{format:["rgb(248, 105, 107)","rgb(252, 252, 255)","rgb(90, 138, 198)"]},{format:["rgb(252, 252, 255)","rgb(248, 105, 107)"]},{format:["rgb(248, 105, 107)","rgb(252, 252, 255)"]},{format:["rgb(99, 190, 123)","rgb(252, 252, 255)"]},{format:["rgb(252, 252, 255)","rgb(99, 190, 123)"]},{format:["rgb(99, 190, 123)","rgb(255, 235, 132)"]},{format:["rgb(255, 235, 132)","rgb(99, 190, 123)"]}],init:function(){let e=this,n=Q().conditionformat;$(document).off("change.CFchooseSheet").on("change.CFchooseSheet","#luckysheet-administerRule-dialog .chooseSheet",function(){let t=$("#luckysheet-administerRule-dialog .chooseSheet option:selected").val();e.getConditionRuleList(t)}),$(document).off("click.CFadministerRuleItem").on("click.CFadministerRuleItem","#luckysheet-administerRule-dialog .ruleList .listBox .item",function(){$(this).addClass("on").siblings().removeClass("on")}),$(document).off("click.CFadministerRuleConfirm").on("click.CFadministerRuleConfirm","#luckysheet-administerRule-dialog-confirm",function(){if(!Rr(h.currentSheetIndex))return;let t=$.extend(!0,[],h.luckysheetfile),l=e.getHistoryRules(t),a=$.extend(!0,[],e.fileClone);for(let u=0;u<a.length;u++){let f=a[u].index;h.luckysheetfile[Z(f)].luckysheet_conditionformat_save=a[Z(f)].luckysheet_conditionformat_save}let o=$.extend(!0,[],h.luckysheetfile),s=e.getCurrentRules(o);if(e.ref(l,s),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-administerRule-dialog").hide(),ne.allowUpdate){let u=$.extend(!0,[],h.luckysheetfile);for(let f=0;f<u.length;f++)ne.saveParam("all",u[f].index,u[f].luckysheet_conditionformat_save,{k:"luckysheet_conditionformat_save"})}}),$(document).off("click.CFadministerRuleClose").on("click.CFadministerRuleClose","#luckysheet-administerRule-dialog-close",function(){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-administerRule-dialog").hide(),e.fileClone=[]}),$(document).off("click.CFadministerRuleFa").on("click.CFadministerRuleFa","#luckysheet-administerRule-dialog .item .fa-table",function(){$(this).parents("#luckysheet-administerRule-dialog").hide();let t=$("#luckysheet-administerRule-dialog .chooseSheet select option:selected").val();t!=h.currentSheetIndex&&ve.changeSheetExec(t);let l=$(this).siblings("input").val().trim(),a=$(this).parents(".item").attr("data-item");e.multiRangeDialog(a,l),e.selectRange=[];let o=e.getRangeByTxt(l);if(o.length>0)for(let s=0;s<o.length;s++){let u=o[s].row[0],f=o[s].row[1],d=o[s].column[0],m=o[s].column[1],g=h.visibledatarow[f],y=u-1==-1?0:h.visibledatarow[u-1],v=h.visibledatacolumn[m],b=d-1==-1?0:h.visibledatacolumn[d-1];e.selectRange.push({left:b,width:v-b-1,top:y,height:g-y-1,left_move:b,width_move:v-b-1,top_move:y,height_move:g-y-1,row:[u,f],column:[d,m],row_focus:u,column_focus:d})}Ot(e.selectRange)}),$(document).off("click.CFmultiRangeConfirm").on("click.CFmultiRangeConfirm","#luckysheet-multiRange-dialog-confirm",function(){$(this).parents("#luckysheet-multiRange-dialog").hide();let t=$(this).attr("data-item"),l=$(this).parents("#luckysheet-multiRange-dialog").find("input").val();$("#luckysheet-administerRule-dialog .item[data-item="+t+"] input").val(l);let a=$("#luckysheet-administerRule-dialog .chooseSheet option:selected").val();e.fileClone[Z(a)].luckysheet_conditionformat_save[t].cellrange=e.getRangeByTxt(l),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-administerRule-dialog").show(),Ot([])}),$(document).off("click.CFmultiRangeClose").on("click.CFmultiRangeClose","#luckysheet-multiRange-dialog-close",function(){$(this).parents("#luckysheet-multiRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-administerRule-dialog").show(),$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide(),Ot([])}),$(document).off("click.CFnewConditionRule").on("click.CFnewConditionRule","#newConditionRule",function(){let t=$("#luckysheet-administerRule-dialog .chooseSheet option:selected").val();if(!!Rr(t)){if(h.luckysheet_select_save.length==0){fe()?alert(n.pleaseSelectRange):U.info(n.pleaseSelectRange,"");return}e.newConditionRuleDialog(1)}}),$(document).off("click.CFnewConditionRuleConfirm").on("click.CFnewConditionRuleConfirm","#luckysheet-newConditionRule-dialog-confirm",function(){if(!Rr(h.currentSheetIndex))return;let t=$("#luckysheet-newConditionRule-dialog .ruleTypeItem.on").index(),l=$("#luckysheet-newConditionRule-dialog #type1 option:selected").val(),a=$("#luckysheet-newConditionRule-dialog ."+l+"Box #type2 option:selected").val(),o,s;if(t==0){if(l=="dataBar"){let f=$(this).parents("#luckysheet-newConditionRule-dialog").find(".dataBarBox .luckysheet-conditionformat-config-color").spectrum("get").toHexString();a=="gradient"?o=[f,"#ffffff"]:a=="solid"&&(o=[f]),s={type:"dataBar",cellrange:$.extend(!0,[],h.luckysheet_select_save),format:o}}else if(l=="colorGradation"){let f=$(this).parents("#luckysheet-newConditionRule-dialog").find(".colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(),d=$(this).parents("#luckysheet-newConditionRule-dialog").find(".colorGradationBox .midVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(),m=$(this).parents("#luckysheet-newConditionRule-dialog").find(".colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString();a=="threeColor"?o=[f,d,m]:a=="twoColor"&&(o=[f,m]),s={type:"colorGradation",cellrange:$.extend(!0,[],h.luckysheet_select_save),format:o}}else if(l=="icons"){let f=$(this).parents("#luckysheet-newConditionRule-dialog").find(".iconsBox .model").attr("data-len"),d=$(this).parents("#luckysheet-newConditionRule-dialog").find(".iconsBox .model").attr("data-leftmin"),m=$(this).parents("#luckysheet-newConditionRule-dialog").find(".iconsBox .model").attr("data-top");o={len:f,leftMin:d,top:m},s={type:"icons",cellrange:$.extend(!0,[],h.luckysheet_select_save),format:o}}}else{let f="",d=[],m=[];if(t==1){if(l=="number")if(f=a,a=="betweenness"){let v=$("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim(),b=$("#luckysheet-newConditionRule-dialog #conditionVal2 input").val().trim(),k=e.getRangeByTxt(v);if(k.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(k.length==1){let x=k[0].row[0],C=k[0].row[1],S=k[0].column[0],_=k[0].column[1];if(x==C&&S==_)v=ze(x,S,h.flowdata),d.push({row:k[0].row,column:k[0].column}),m.push(v);else{e.infoDialog(n.onlySingleCell,"");return}}else if(k.length==0)if(isNaN(v)||v==""){e.infoDialog(n.conditionValueCanOnly,"");return}else m.push(v);let w=e.getRangeByTxt(b);if(w.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(w.length==1){let x=w[0].row[0],C=w[0].row[1],S=w[0].column[0],_=w[0].column[1];if(x==C&&S==_)b=ze(x,S,h.flowdata),d.push({row:w[0].row,column:w[0].column}),m.push(b);else{e.infoDialog(n.onlySingleCell,"");return}}else if(w.length==0)if(isNaN(b)||b==""){e.infoDialog(n.conditionValueCanOnly,"");return}else m.push(b)}else{let v=$("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim(),b=e.getRangeByTxt(v);if(b.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(b.length==1){let k=b[0].row[0],w=b[0].row[1],x=b[0].column[0],C=b[0].column[1];if(k==w&&x==C)v=ze(k,x,h.flowdata),d.push({row:b[0].row,column:b[0].column}),m.push(v);else{e.infoDialog(n.onlySingleCell,"");return}}else if(b.length==0)if(isNaN(v)||v==""){e.infoDialog(n.conditionValueCanOnly,"");return}else m.push(v)}else if(l=="text"){f="textContains";let v=$("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim(),b=e.getRangeByTxt(v);if(b.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(b.length==1){let k=b[0].row[0],w=b[0].row[1],x=b[0].column[0],C=b[0].column[1];if(k==w&&x==C)v=ze(k,x,h.flowdata),d.push({row:b[0].row,column:b[0].column}),m.push(v);else{e.infoDialog(n.onlySingleCell,"");return}}else if(b.length==0)if(v==""){e.infoDialog(n.conditionValueCanOnly,"");return}else m.push(v)}else if(l=="date"){f="occurrenceDate";let v=$("#luckysheet-newConditionRule-dialog #daterange-btn").val();if(v==""||v==null){e.infoDialog(n.pleaseSelectADate,"");return}m.push(v)}}else if(t==2){l=="top"?$("#luckysheet-newConditionRule-dialog #isPercent").is(":selected")?f="top10%":f="top10":l=="last"&&($("#luckysheet-newConditionRule-dialog #isPercent").is(":selected")?f="last10%":f="last10");let v=$("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim();if(parseInt(v)!=v||parseInt(v)<1||parseInt(v)>1e3){e.infoDialog(n.pleaseEnterInteger,"");return}m.push(parseInt(v))}else if(t==3)l=="AboveAverage"?(f="AboveAverage",m.push("AboveAverage")):l=="SubAverage"&&(f="SubAverage",m.push("SubAverage"));else if(t==4)f="duplicateValue",m.push(l);else if(t==5){f="formula";let v=$("#luckysheet-newConditionRule-dialog #formulaConditionVal input").val().trim();if(v==""){e.infoDialog("Condition value cannot be empty!","");return}m.push(v)}let g;$("#luckysheet-newConditionRule-dialog #checkTextColor").is(":checked")?g=$("#luckysheet-newConditionRule-dialog #textcolorshow").spectrum("get").toHexString():g=null;let y;$("#luckysheet-newConditionRule-dialog #checkCellColor").is(":checked")?y=$("#luckysheet-newConditionRule-dialog #cellcolorshow").spectrum("get").toHexString():y=null,o={textColor:g,cellColor:y},s={type:"default",cellrange:$.extend(!0,[],h.luckysheet_select_save),format:o,conditionName:f,conditionRange:d,conditionValue:m}}$("#luckysheet-newConditionRule-dialog").hide();let u=$(this).attr("data-source");if(u==0){$("#luckysheet-modal-dialog-mask").hide();let f=$.extend(!0,[],h.luckysheetfile),d=e.getHistoryRules(f),m=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save==null?[]:h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save;m.push(s),h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save=m;let g=$.extend(!0,[],h.luckysheetfile),y=e.getCurrentRules(g);e.ref(d,y),ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,m,{k:"luckysheet_conditionformat_save"})}else if(u==1){let f=e.fileClone[Z(h.currentSheetIndex)].luckysheet_conditionformat_save?e.fileClone[Z(h.currentSheetIndex)].luckysheet_conditionformat_save:[];f.push(s),e.fileClone[Z(h.currentSheetIndex)].luckysheet_conditionformat_save=f,e.administerRuleDialog()}}),$(document).off("click.CFnewConditionRuleClose").on("click.CFnewConditionRuleClose","#luckysheet-newConditionRule-dialog-close",function(){let t=$(this).attr("data-source");t==0&&$("#luckysheet-modal-dialog-mask").hide(),t==1&&$("#luckysheet-administerRule-dialog").show(),$("#luckysheet-newConditionRule-dialog").hide(),$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide()}),$(document).off("click.CFeditorConditionRule").on("click.CFeditorConditionRule","#editorConditionRule",function(){let t=$("#luckysheet-administerRule-dialog .chooseSheet option:selected").val();if(!Rr(t))return;let l=$("#luckysheet-administerRule-dialog .ruleList .listBox .item.on").attr("data-item"),a={sheetIndex:t,itemIndex:l,data:e.fileClone[Z(t)].luckysheet_conditionformat_save[l]};e.editorRule=a,e.editorConditionRuleDialog()}),$(document).off("click.CFeditorConditionRuleConfirm").on("click.CFeditorConditionRuleConfirm","#luckysheet-editorConditionRule-dialog-confirm",function(){let t=$("#luckysheet-editorConditionRule-dialog .ruleTypeItem.on").index(),l=$("#luckysheet-editorConditionRule-dialog #type1 option:selected").val(),a=$("#luckysheet-editorConditionRule-dialog ."+l+"Box #type2 option:selected").val(),o=e.editorRule.data.cellrange,s,u;if(t==0){if(l=="dataBar"){let m=$(this).parents("#luckysheet-editorConditionRule-dialog").find(".dataBarBox .luckysheet-conditionformat-config-color").spectrum("get").toHexString();a=="gradient"?s=[m,"#ffffff"]:a=="solid"&&(s=[m]),u={type:"dataBar",cellrange:o,format:s}}else if(l=="colorGradation"){let m=$(this).parents("#luckysheet-editorConditionRule-dialog").find(".colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(),g=$(this).parents("#luckysheet-editorConditionRule-dialog").find(".colorGradationBox .midVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(),y=$(this).parents("#luckysheet-editorConditionRule-dialog").find(".colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString();a=="threeColor"?s=[m,g,y]:a=="twoColor"&&(s=[m,y]),u={type:"colorGradation",cellrange:o,format:s}}else if(l=="icons"){let m=$(this).parents("#luckysheet-editorConditionRule-dialog").find(".iconsBox .model").attr("data-len"),g=$(this).parents("#luckysheet-editorConditionRule-dialog").find(".iconsBox .model").attr("data-leftmin"),y=$(this).parents("#luckysheet-editorConditionRule-dialog").find(".iconsBox .model").attr("data-top");s={len:m,leftMin:g,top:y},u={type:"icons",cellrange:o,format:s}}}else{let m="",g=[],y=[];if(t==1){if(l=="number")if(m=a,a=="betweenness"){let k=$("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim(),w=$("#luckysheet-editorConditionRule-dialog #conditionVal2 input").val().trim(),x=e.getRangeByTxt(k);if(x.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(x.length==1){let S=x[0].row[0],_=x[0].row[1],T=x[0].column[0],A=x[0].column[1];if(S==_&&T==A)k=ze(S,T,h.flowdata),g.push({row:x[0].row,column:x[0].column}),y.push(k);else{e.infoDialog(n.onlySingleCell,"");return}}else if(x.length==0)if(isNaN(k)||k==""){e.infoDialog(n.conditionValueCanOnly,"");return}else y.push(k);let C=e.getRangeByTxt(w);if(C.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(C.length==1){let S=C[0].row[0],_=C[0].row[1],T=C[0].column[0],A=C[0].column[1];if(S==_&&T==A)w=ze(S,T,h.flowdata),g.push({row:C[0].row,column:C[0].column}),y.push(w);else{e.infoDialog(n.onlySingleCell,"");return}}else if(C.length==0)if(isNaN(w)||w==""){e.infoDialog(n.conditionValueCanOnly,"");return}else y.push(w)}else{let k=$("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim(),w=e.getRangeByTxt(k);if(w.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(w.length==1){let x=w[0].row[0],C=w[0].row[1],S=w[0].column[0],_=w[0].column[1];if(x==C&&S==_)k=ze(x,S,h.flowdata),g.push({row:w[0].row,column:w[0].column}),y.push(k);else{e.infoDialog(n.onlySingleCell,"");return}}else if(w.length==0)if(isNaN(k)||k==""){e.infoDialog(n.conditionValueCanOnly,"");return}else y.push(k)}else if(l=="text"){m="textContains";let k=$("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim(),w=e.getRangeByTxt(k);if(w.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(w.length==1){let x=w[0].row[0],C=w[0].row[1],S=w[0].column[0],_=w[0].column[1];if(x==C&&S==_)k=ze(x,S,h.flowdata),g.push({row:w[0].row,column:w[0].column}),y.push(k);else{e.infoDialog(n.onlySingleCell,"");return}}else if(w.length==0)if(isNaN(k)||k==""){e.infoDialog(n.conditionValueCanOnly,"");return}else y.push(k)}else if(l=="date"){m="occurrenceDate";let k=$("#luckysheet-editorConditionRule-dialog #daterange-btn").val();if(k==""||k==null){e.infoDialog(n.pleaseSelectADate,"");return}y.push(k)}}else if(t==2){l=="top"?$("#luckysheet-editorConditionRule-dialog #isPercent").is(":selected")?m="top10%":m="top10":l=="last"&&($("#luckysheet-editorConditionRule-dialog #isPercent").is(":selected")?m="last10%":m="last10");let k=$("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim();if(parseInt(k)!=k||parseInt(k)<1||parseInt(k)>1e3){e.infoDialog(n.pleaseEnterInteger,"");return}y.push(k)}else if(t==3)l=="AboveAverage"?(m="AboveAverage",y.push("AboveAverage")):l=="SubAverage"&&(m="SubAverage",y.push("SubAverage"));else if(t==4)m="duplicateValue",y.push(l);else if(t==5){m="formula";let k=$("#luckysheet-editorConditionRule-dialog #formulaConditionVal input").val().trim();if(console.log(k),k==""){e.infoDialog("Condition value cannot be empty!","");return}y.push(k)}let v;$("#luckysheet-editorConditionRule-dialog #checkTextColor").is(":checked")?v=$("#luckysheet-editorConditionRule-dialog #textcolorshow").spectrum("get").toHexString():v=null;let b;$("#luckysheet-editorConditionRule-dialog #checkCellColor").is(":checked")?b=$("#luckysheet-editorConditionRule-dialog #cellcolorshow").spectrum("get").toHexString():b=null,s={textColor:v,cellColor:b},u={type:"default",cellrange:o,format:s,conditionName:m,conditionRange:g,conditionValue:y}}let f=e.editorRule.sheetIndex,d=e.editorRule.itemIndex;e.fileClone[Z(f)].luckysheet_conditionformat_save[d]=u,$("#luckysheet-editorConditionRule-dialog").hide(),e.administerRuleDialog()}),$(document).off("click.CFeditorConditionRuleClose").on("click.CFeditorConditionRuleClose","#luckysheet-editorConditionRule-dialog-close",function(){$("#luckysheet-editorConditionRule-dialog").hide(),$("#luckysheet-administerRule-dialog").show(),$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide()}),$(document).off("click.CFnewEditorRuleItem").on("click.CFnewEditorRuleItem",".luckysheet-newEditorRule-dialog .ruleTypeItem",function(){$(this).addClass("on").siblings().removeClass("on");let t=$(this).index();$(this).parents(".luckysheet-newEditorRule-dialog").find(".ruleExplainBox").html(e.getRuleExplain(t)),e.colorSelectInit()}),$(document).off("change.CFnewEditorRuleType1").on("change.CFnewEditorRuleType1",".luckysheet-newEditorRule-dialog #type1",function(){let t=$(this).find("option:selected").val();(t=="dataBar"||t=="colorGradation"||t=="icons"||t=="number"||t=="text"||t=="date")&&$(this).parents(".luckysheet-newEditorRule-dialog").find("."+t+"Box").show().siblings().hide(),t=="date"&&e.daterangeInit($(this).parents(".luckysheet-newEditorRule-dialog").attr("id"))}),$(document).off("change.CFnewEditorRuleType2").on("change.CFnewEditorRuleType2",".luckysheet-newEditorRule-dialog #type2",function(){let t=$(this).parents(".luckysheet-newEditorRule-dialog").find("#type1 option:selected").val();t=="colorGradation"?$(this).find("option:selected").val()=="threeColor"?$(this).parents(".luckysheet-newEditorRule-dialog").find(".midVal").show():$(this).parents(".luckysheet-newEditorRule-dialog").find(".midVal").hide():t=="number"&&($(this).find("option:selected").val()=="betweenness"?($(this).parents(".luckysheet-newEditorRule-dialog").find(".txt").show(),$(this).parents(".luckysheet-newEditorRule-dialog").find("#conditionVal2").show()):($(this).parents(".luckysheet-newEditorRule-dialog").find(".txt").hide(),$(this).parents(".luckysheet-newEditorRule-dialog").find("#conditionVal2").hide()))}),$(document).off("click.CFiconsShowbox").on("click.CFiconsShowbox",".luckysheet-newEditorRule-dialog .iconsBox .showbox",function(){$(this).parents(".iconsBox").find("ul").toggle()}),$(document).off("click.CFiconsLi").on("click.CFiconsLi",".luckysheet-newEditorRule-dialog .iconsBox li",function(){let t=$(this).find("div").attr("data-len"),l=$(this).find("div").attr("data-leftmin"),a=$(this).find("div").attr("data-top"),o=$(this).find("div").attr("title"),s=$(this).find("div").css("background-position");$(this).parents(".iconsBox").find(".showbox .model").css("background-position",s),$(this).parents(".iconsBox").find(".showbox .model").attr("data-len",t),$(this).parents(".iconsBox").find(".showbox .model").attr("data-leftmin",l),$(this).parents(".iconsBox").find(".showbox .model").attr("data-top",a),$(this).parents(".iconsBox").find(".showbox .model").attr("title",o),$(this).parents("ul").hide()}),$(document).off("click.CFdeleteConditionRule").on("click.CFdeleteConditionRule","#deleteConditionRule",function(){let t=$("#luckysheet-administerRule-dialog .chooseSheet option:selected").val();if(!Rr(t))return;let l=$("#luckysheet-administerRule-dialog .ruleList .listBox .item.on").attr("data-item");e.fileClone[Z(t)].luckysheet_conditionformat_save.splice(l,1),e.administerRuleDialog()}),$(document).off("click.CFdefault").on("click.CFdefault","#luckysheet-conditionformat-dialog-confirm",function(){if(!Rr(h.currentSheetIndex))return;let t=$("#luckysheet-conditionformat-dialog .box").attr("data-itemvalue"),l=[],a=[];if(t=="greaterThan"||t=="lessThan"||t=="equal"||t=="textContains"){let v=$("#luckysheet-conditionformat-dialog #conditionVal").val().trim(),b=e.getRangeByTxt(v);if(b.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(b.length==1){let k=b[0].row[0],w=b[0].row[1],x=b[0].column[0],C=b[0].column[1];if(k==w&&x==C)v=ze(k,x,h.flowdata),l.push({row:b[0].row,column:b[0].column}),a.push(v);else{e.infoDialog(n.onlySingleCell,"");return}}else if(b.length==0)if(isNaN(v)||v==""){e.infoDialog(n.conditionValueCanOnly,"");return}else a.push(v)}else if(t=="betweenness"){let v=$("#luckysheet-conditionformat-dialog #conditionVal").val().trim(),b=$("#luckysheet-conditionformat-dialog #conditionVal2").val().trim(),k=e.getRangeByTxt(v);if(k.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(k.length==1){let x=k[0].row[0],C=k[0].row[1],S=k[0].column[0],_=k[0].column[1];if(x==C&&S==_)v=ze(x,S,h.flowdata),l.push({row:k[0].row,column:k[0].column}),a.push(v);else{e.infoDialog(n.onlySingleCell,"");return}}else if(k.length==0)if(isNaN(v)||v==""){e.infoDialog(n.conditionValueCanOnly,"");return}else a.push(v);let w=e.getRangeByTxt(b);if(w.length>1){e.infoDialog(n.onlySingleCell,"");return}else if(w.length==1){let x=w[0].row[0],C=w[0].row[1],S=w[0].column[0],_=w[0].column[1];if(x==C&&S==_)b=ze(x,S,h.flowdata),l.push({row:w[0].row,column:w[0].column}),a.push(b);else{e.infoDialog(n.onlySingleCell,"");return}}else if(w.length==0)if(isNaN(b)||b==""){e.infoDialog(n.conditionValueCanOnly,"");return}else a.push(b)}else if(t=="occurrenceDate"){let v=$("#luckysheet-conditionformat-dialog #daterange-btn").val();if(v==""||v==null){e.infoDialog(n.pleaseSelectADate,"");return}a.push(v)}else if(t=="duplicateValue")a.push($("#luckysheet-conditionformat-dialog #conditionVal option:selected").val());else if(t=="top10"||t=="top10%"||t=="last10"||t=="last10%"){let v=$("#luckysheet-conditionformat-dialog #conditionVal").val().trim();if(parseInt(v)!=v||parseInt(v)<1||parseInt(v)>1e3){e.infoDialog(n.pleaseEnterInteger,"");return}a.push(v)}else t=="AboveAverage"?a.push("AboveAverage"):t=="SubAverage"&&a.push("SubAverage");let o;$("#checkTextColor").is(":checked")?o=$("#textcolorshow").spectrum("get").toHexString():o=null;let s;$("#checkCellColor").is(":checked")?s=$("#cellcolorshow").spectrum("get").toHexString():s=null;let u=$.extend(!0,[],h.luckysheetfile),f=e.getHistoryRules(u),d={type:"default",cellrange:$.extend(!0,[],h.luckysheet_select_save),format:{textColor:o,cellColor:s},conditionName:t,conditionRange:l,conditionValue:a},m=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save==null?[]:h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save;m.push(d),h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save=m;let g=$.extend(!0,[],h.luckysheetfile),y=e.getCurrentRules(g);e.ref(f,y),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-conditionformat-dialog").hide(),ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,m,{k:"luckysheet_conditionformat_save"})}),$(document).off("click.CFicons").on("click.CFicons","#luckysheet-CFicons-dialog .item",function(){if($("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-CFicons-dialog").hide(),h.luckysheet_select_save.length>0){let t=$.extend(!0,[],h.luckysheet_select_save),l={len:$(this).attr("data-len"),leftMin:$(this).attr("data-leftMin"),top:$(this).attr("data-top")};e.updateItem("icons",t,l)}}),$(document).on("click",".range .fa-table",function(){let t=$(this).parents(".luckysheet-modal-dialog").attr("id");$("#"+t).hide();let l;if(t=="luckysheet-conditionformat-dialog")$(this).siblings("input").attr("id")=="conditionVal"?l="0_1":l="0_2";else if(t=="luckysheet-newConditionRule-dialog"){let o=$(this).parents(".range").attr("id");o=="formulaConditionVal"?l="1_0":o=="conditionVal"?l="1_1":l="1_2"}else if(t=="luckysheet-editorConditionRule-dialog"){let o=$(this).parents(".range").attr("id");o=="formulaConditionVal"?l="2_0":o=="conditionVal"?l="2_1":l="2_2"}let a=$(this).siblings("input").val();e.singleRangeDialog(l,a),Ot(e.getRangeByTxt(a))}),$(document).on("click","#luckysheet-singleRange-dialog-confirm",function(){$("#luckysheet-modal-dialog-mask").show(),$(this).parents("#luckysheet-singleRange-dialog").hide();let t=$(this).attr("data-source"),l=$(this).parents("#luckysheet-singleRange-dialog").find("input").val();t=="0_1"?($("#luckysheet-conditionformat-dialog").show(),$("#luckysheet-conditionformat-dialog #conditionVal").val(l)):t=="0_2"?($("#luckysheet-conditionformat-dialog").show(),$("#luckysheet-conditionformat-dialog #conditionVal2").val(l)):t=="1_0"?($("#luckysheet-newConditionRule-dialog").show(),$("#luckysheet-newConditionRule-dialog #formulaConditionVal input").val(l)):t=="1_1"?($("#luckysheet-newConditionRule-dialog").show(),$("#luckysheet-newConditionRule-dialog #conditionVal input").val(l)):t=="1_2"?($("#luckysheet-newConditionRule-dialog").show(),$("#luckysheet-newConditionRule-dialog #conditionVal2 input").val(l)):t=="2_0"?($("#luckysheet-editorConditionRule-dialog").show(),$("#luckysheet-editorConditionRule-dialog #formulaConditionVal input").val(l)):t=="2_1"?($("#luckysheet-editorConditionRule-dialog").show(),$("#luckysheet-editorConditionRule-dialog #conditionVal input").val(l)):t=="2_2"&&($("#luckysheet-editorConditionRule-dialog").show(),$("#luckysheet-editorConditionRule-dialog #conditionVal2 input").val(l)),Ot([])}),$(document).on("click","#luckysheet-singleRange-dialog-close",function(){$("#luckysheet-modal-dialog-mask").show(),$(this).parents("#luckysheet-singleRange-dialog").hide();let t=$(this).attr("data-source");t=="0_1"||t=="0_2"?$("#luckysheet-conditionformat-dialog").show():t=="1_0"||t=="1_1"||t=="1_2"?$("#luckysheet-newConditionRule-dialog").show():(t=="2_0"||t=="2_1"||t=="2_2")&&$("#luckysheet-editorConditionRule-dialog").show(),Ot([])}),$(document).on("click",".luckysheet-modal-dialog-title-close",function(){let t=$(this).parents(".luckysheet-modal-dialog").attr("id");if(t=="luckysheet-newConditionRule-dialog"&&$("#"+t).find("#luckysheet-newConditionRule-dialog-close").attr("data-source")==1&&$("#luckysheet-administerRule-dialog").show(),t=="luckysheet-editorConditionRule-dialog"&&$("#luckysheet-administerRule-dialog").show(),t=="luckysheet-singleRange-dialog"){$("#luckysheet-modal-dialog-mask").show();let l=$(this).parents("#luckysheet-singleRange-dialog").find("#luckysheet-singleRange-dialog-confirm").attr("data-source");l=="0_1"||l=="0_2"?$("#luckysheet-conditionformat-dialog").show():l=="1_1"||l=="1_2"?$("#luckysheet-newConditionRule-dialog").show():(l=="2_1"||l=="2_2")&&$("#luckysheet-editorConditionRule-dialog").show(),Ot([])}t=="luckysheet-multiRange-dialog"&&($("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-administerRule-dialog").show(),Ot([])),t=="luckysheet-conditionformat-info-dialog"&&$("#luckysheet-modal-dialog-mask").show()}),$(document).on("click","#luckysheet-conditionformat-info-dialog-close",function(){$(this).parents("#luckysheet-conditionformat-info-dialog").hide()})},singleRangeDialog:function(e,n){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-singleRange-dialog").remove();let t=Q().conditionformat;$("body").append(_e(dt,{id:"luckysheet-singleRange-dialog",addclass:"luckysheet-singleRange-dialog",title:t.selectCell,content:`<input readonly="readonly" placeholder="${t.pleaseSelectCell}" value="${n}"/>`,botton:`<button id="luckysheet-singleRange-dialog-confirm" class="btn btn-primary" data-source="${e}">${t.confirm}</button> |
| | | <button id="luckysheet-singleRange-dialog-close" class="btn btn-default" data-source="${e}">${t.cancel}</button>`,style:"z-index:100003"}));let l=$("#luckysheet-singleRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),a=l.outerHeight(),o=l.outerWidth(),s=$(window).width(),u=$(window).height(),f=$(document).scrollLeft(),d=$(document).scrollTop();$("#luckysheet-singleRange-dialog").css({left:(s+f-o)/2,top:(u+d-a)/3}).show()},multiRangeDialog:function(e,n){let t=this;$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-multiRange-dialog").remove();let l=Q().conditionformat;$("body").append(_e(dt,{id:"luckysheet-multiRange-dialog",addclass:"luckysheet-multiRange-dialog",title:l.selectRange,content:`<input readonly="readonly" placeholder="${l.pleaseSelectRange}" value="${n}"/>`,botton:`<button id="luckysheet-multiRange-dialog-confirm" class="btn btn-primary" data-item="${e}">${l.confirm}</button> |
| | | <button id="luckysheet-multiRange-dialog-close" class="btn btn-default">${l.cancel}</button>`,style:"z-index:100003"}));let a=$("#luckysheet-multiRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),f=$(window).height(),d=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-multiRange-dialog").css({left:(u+d-s)/2,top:(f+m-o)/3}).show(),Ot(t.getRangeByTxt(n))},getTxtByRange:function(e){if(e.length>0){let n=[];for(let t=0;t<e.length;t++){let l=e[t].row[0],a=e[t].row[1],o=e[t].column[0],s=e[t].column[1];n.push(xt(h.currentSheetIndex,{row:[l,a],column:[o,s]},h.currentSheetIndex))}return n.join(",")}},getRangeByTxt:function(e){let n=[];if(e=e.toString(),e.indexOf(",")!=-1){let t=e.split(",");for(let l=0;l<t.length;l++)if(p.iscelldata(t[l]))n.push(p.getcellrange(t[l]));else{n=[];break}}else p.iscelldata(e)&&n.push(p.getcellrange(e));return n},colorSelectInit:function(){let e=Q().conditionformat;$(".luckysheet-conditionformat-config-color").spectrum({showPalette:!0,showPaletteOnly:!0,preferredFormat:"hex",clickoutFiresChange:!1,showInitial:!0,showInput:!0,hideAfterPaletteSelect:!0,showSelectionPalette:!0,maxPaletteSize:8,maxSelectionSize:8,cancelText:e.cancel,chooseText:e.confirmColor,togglePaletteMoreText:"\u81EA\u5B9A\u4E49",togglePaletteLessText:"\u6536\u8D77",togglePaletteOnly:!0,clearText:e.clearColorSelect,noColorSelectedText:"\u6CA1\u6709\u989C\u8272\u88AB\u9009\u62E9",localStorageKey:"spectrum.textcolor"+ne.gridKey,palette:[["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]],change:function(n){n!=null&&(n=n.toHexString())}})},conditionformatDialog:function(e,n){let t=this;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-conditionformat-dialog").remove();let l=Q().conditionformat;$("body").append(_e(dt,{id:"luckysheet-conditionformat-dialog",addclass:"luckysheet-conditionformat-dialog",title:e,content:n,botton:`<button id="luckysheet-conditionformat-dialog-confirm" class="btn btn-primary">${l.confirm}</button> |
| | | <button class="btn btn-default luckysheet-model-close-btn">${l.cancel}</button>`,style:"z-index:9999"}));let a=$("#luckysheet-conditionformat-dialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),f=$(window).height(),d=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-conditionformat-dialog").css({left:(u+d-s)/2,top:(f+m-o)/3}).show(),t.init(),t.colorSelectInit(),e==Q().conditionformat.conditionformat_occurrenceDate&&t.daterangeInit("luckysheet-conditionformat-dialog")},CFiconsDialog:function(){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-CFicons-dialog").remove();let e=Q().conditionformat,n=`<div class="box"> |
| | | <div style="margin-bottom: 10px;">${e.pleaseSelectIcon}</div> |
| | | <div class="title">${e.direction}</div> |
| | | <div class="list"> |
| | |
| | | </div> |
| | | <div style="clear:both;"></div> |
| | | </div> |
| | | </div>`;$("body").append(_e(ft,{id:"luckysheet-CFicons-dialog",addclass:"luckysheet-CFicons-dialog",title:e.icons,content:n,botton:`<button class="btn btn-default luckysheet-model-close-btn">${e.close}</button>`,style:"z-index:100003"}));let t=$("#luckysheet-CFicons-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),l=t.outerHeight(),a=t.outerWidth(),o=$(window).width(),s=$(window).height(),u=$(document).scrollLeft(),d=$(document).scrollTop();$("#luckysheet-CFicons-dialog").css({left:(o+u-a)/2,top:(s+d-l)/3}).show()},administerRuleDialog:function(){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-administerRule-dialog").remove();let e=Q().conditionformat,n="";for(let g=0;g<h.luckysheetfile.length;g++)h.luckysheetfile[g].status=="1"?n+=`<option value="${h.luckysheetfile[g].index}" selected="selected"> |
| | | </div>`;$("body").append(_e(dt,{id:"luckysheet-CFicons-dialog",addclass:"luckysheet-CFicons-dialog",title:e.icons,content:n,botton:`<button class="btn btn-default luckysheet-model-close-btn">${e.close}</button>`,style:"z-index:100003"}));let t=$("#luckysheet-CFicons-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),l=t.outerHeight(),a=t.outerWidth(),o=$(window).width(),s=$(window).height(),u=$(document).scrollLeft(),f=$(document).scrollTop();$("#luckysheet-CFicons-dialog").css({left:(o+u-a)/2,top:(s+f-l)/3}).show()},administerRuleDialog:function(){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-administerRule-dialog").remove();let e=Q().conditionformat,n="";for(let g=0;g<h.luckysheetfile.length;g++)h.luckysheetfile[g].status=="1"?n+=`<option value="${h.luckysheetfile[g].index}" selected="selected"> |
| | | ${e.currentSheet}\uFF1A${h.luckysheetfile[g].name} |
| | | </option>`:n+=`<option value="${h.luckysheetfile[g].index}"> |
| | | ${e.sheet}\uFF1A${h.luckysheetfile[g].name} |
| | |
| | | </div> |
| | | <div class="listBox"></div> |
| | | </div> |
| | | </div>`;$("body").append(_e(ft,{id:"luckysheet-administerRule-dialog",addclass:"luckysheet-administerRule-dialog",title:e.conditionformatManageRules,content:t,botton:`<button id="luckysheet-administerRule-dialog-confirm" class="btn btn-primary">${e.confirm}</button> |
| | | <button id="luckysheet-administerRule-dialog-close" class="btn btn-default">${e.close}</button>`,style:"z-index:100003"}));let l=$("#luckysheet-administerRule-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),a=l.outerHeight(),o=l.outerWidth(),s=$(window).width(),u=$(window).height(),d=$(document).scrollLeft(),f=$(document).scrollTop();$("#luckysheet-administerRule-dialog").css({left:(s+d-o)/2,top:(u+f-a)/3}).show();let m=$("#luckysheet-administerRule-dialog .chooseSheet option:selected").val();this.getConditionRuleList(m)},getConditionRuleList:function(e){let n=this;$("#luckysheet-administerRule-dialog .ruleList .listBox").empty();let t=n.fileClone[Z(e)].luckysheet_conditionformat_save;if(t!=null&&t.length>0){let l=Q().conditionformat;for(let a=0;a<t.length;a++){let o=t[a].type,s=t[a].format,u=t[a].cellrange,d,f="";o=="dataBar"?(d=l.dataBar,f='<canvas width="46" height="18" style="width: 46px;height: 18px;margin: 3px 0 0 5px;"></canvas>'):o=="colorGradation"?(d=l.colorGradation,f='<canvas width="46" height="18" style="width: 46px;height: 18px;margin: 3px 0 0 5px;"></canvas>'):o=="icons"?(d=l.icons,f='<canvas width="46" height="18" style="width: 46px;height: 18px;margin: 3px 0 0 5px;"></canvas>'):(d=n.getConditionRuleName(t[a].conditionName,t[a].conditionRange,t[a].conditionValue),s.textColor!=null&&(f+='<span class="colorbox" title="'+l.textColor+'" style="background-color:'+s.textColor+'"></span>'),s.cellColor!=null&&(f+='<span class="colorbox" title="'+l.cellColor+'" style="background-color:'+s.cellColor+'"></span>'));let m=[];for(let y=0;y<u.length;y++){let v=u[y].row[0],b=u[y].row[1],k=u[y].column[0],w=u[y].column[1];m.push(tt(k)+(v+1)+":"+tt(w)+(b+1))}let g='<div class="item" data-item="'+a+'"><div class="ruleName" title="'+d+'">'+d+'</div><div class="format">'+f+'</div><div class="ruleRange"><input class="formulaInputFocus" readonly="true" value="'+m.join(",")+'"/><i class="fa fa-table" aria-hidden="true" title="'+l.selectRange+'"></i></div></div>';$("#luckysheet-administerRule-dialog .ruleList .listBox").prepend(g)}$("#luckysheet-administerRule-dialog .ruleList .listBox .item canvas").each(function(a){let o=$(this).closest(".item").attr("data-item"),s=t[o].type,u=t[o].format,d=$(this).get(0).getContext("2d");if(s=="dataBar")if(u.length==2){let f=d.createLinearGradient(0,0,46,0);f.addColorStop(0,u[0]),f.addColorStop(1,u[1]),d.fillStyle=f,d.fillRect(0,0,46,18),d.beginPath(),d.moveTo(0,0),d.lineTo(0,18),d.lineTo(46,18),d.lineTo(46,0),d.lineTo(0,0),d.lineWidth=h.devicePixelRatio,d.strokeStyle=u[0],d.stroke(),d.closePath()}else u.length==1&&(d.fillStyle=u[0],d.fillRect(0,0,46,18),d.beginPath(),d.moveTo(0,0),d.lineTo(0,18),d.lineTo(46,18),d.lineTo(46,0),d.lineTo(0,0),d.lineWidth=h.devicePixelRatio,d.strokeStyle=u[0],d.stroke(),d.closePath());else if(s=="colorGradation"){let f=d.createLinearGradient(0,0,46,0);u.length==3?(f.addColorStop(0,u[0]),f.addColorStop(.5,u[1]),f.addColorStop(1,u[2])):u.length==2&&(f.addColorStop(0,u[0]),f.addColorStop(1,u[1])),d.fillStyle=f,d.fillRect(0,0,46,18)}else if(s=="icons"){let f=u.len,m=u.leftMin,g=u.top,y=32*f+10*(f-1),v=32,b=46,k=46*32/y;m=="0"?d.drawImage(wa,0,g*32,y,v,0,(18-k)/2,b,k):m=="5"&&d.drawImage(wa,210,g*32,y,v,0,(18-k)/2,b,k)}}),$("#luckysheet-administerRule-dialog .ruleList .listBox .item").eq(0).addClass("on")}},getConditionRuleName:function(e,n,t){let l;n[0]!=null?l=tt(n[0].column[0])+(n[0].row[0]+1):l=t[0];let a=Q().conditionformat;if(e=="greaterThan")return a.cellValue+" > "+l;if(e=="lessThan")return a.cellValue+" < "+l;if(e=="betweenness"){let o;return n[1]!=null?o=tt(n[1].column[0])+(n[1].row[0]+1):o=t[1],a.cellValue+" "+a.between+" "+l+" "+a.in+" "+o+" "+a.between2}else{if(e=="equal")return a.cellValue+" = "+l;if(e=="textContains")return a.cellValue+a.contain+" ="+l;if(e=="occurrenceDate")return t;if(e=="duplicateValue"){if(t=="0")return a.duplicateValue;if(t=="1")return a.uniqueValue}else{if(e=="top10")return a.top+" "+l+" "+a.oneself;if(e=="top10%")return a.top+" "+l+"% "+a.oneself;if(e=="last10")return a.last+" "+l+" "+a.oneself;if(e=="last10%")return a.last+" "+l+"% "+a.oneself;if(e=="AboveAverage")return a.aboveAverage;if(e=="SubAverage")return a.belowAverage;if(e=="formula")return l.slice(0,1)!="="&&(l="="+l),a.formula+": "+l}}},newConditionRuleDialog:function(e){let n=this,t=Q().conditionformat,l=n.getRuleExplain(0);$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-administerRule-dialog").hide(),$("#luckysheet-newConditionRule-dialog").remove();let a='<div><div class="boxTitle">'+t.chooseRuleType+"\uFF1A</div>"+n.ruleTypeHtml()+'<div class="boxTitle">'+t.editRuleDescription+'\uFF1A</div><div class="ruleExplainBox">'+l+"</div></div>";$("body").append(_e(ft,{id:"luckysheet-newConditionRule-dialog",addclass:"luckysheet-newEditorRule-dialog",title:t.newFormatRule,content:a,botton:`<button id="luckysheet-newConditionRule-dialog-confirm" class="btn btn-primary" data-source="${e}">${t.confirm}</button> |
| | | <button id="luckysheet-newConditionRule-dialog-close" class="btn btn-default" data-source="${e}">${t.cancel}</button>`,style:"z-index:100003"}));let o=$("#luckysheet-newConditionRule-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),s=o.outerHeight(),u=o.outerWidth(),d=$(window).width(),f=$(window).height(),m=$(document).scrollLeft(),g=$(document).scrollTop();$("#luckysheet-newConditionRule-dialog").css({left:(d+m-u)/2,top:(f+g-s)/3}).show(),$("#luckysheet-newConditionRule-dialog .ruleTypeBox .ruleTypeItem:eq(0)").addClass("on").siblings().removeClass("on"),n.colorSelectInit()},editorConditionRuleDialog:function(){let e=this,n=Q().conditionformat,t=e.editorRule.data;if(t==null)return;let l=t.type,a=t.format,o=t.conditionName,s,u;l=="dataBar"||l=="colorGradation"||l=="icons"?(s=0,u=l):o=="greaterThan"||o=="lessThan"||o=="betweenness"||o=="equal"||o=="textContains"||o=="occurrenceDate"?(s=1,o=="greaterThan"||o=="lessThan"||o=="betweenness"||o=="equal"?u="number":o=="textContains"?u="text":o=="occurrenceDate"&&(u="date")):o=="top10"||o=="top10%"||o=="last10"||o=="last10%"?(s=2,o=="top10"||o=="top10%"?u="top":(o=="last10"||o=="last10%")&&(u="last")):o=="AboveAverage"||o=="SubAverage"?(s=3,u=o):o=="duplicateValue"?(s=4,u=t.conditionValue):o=="formula"&&(s=5);let d=e.getRuleExplain(s);$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-administerRule-dialog").hide(),$("#luckysheet-editorConditionRule-dialog").remove();let f='<div><div class="boxTitle">'+n.chooseRuleType+"\uFF1A</div>"+e.ruleTypeHtml()+'<div class="boxTitle">'+n.editRuleDescription+'\uFF1A</div><div class="ruleExplainBox">'+d+"</div></div>";$("body").append(_e(ft,{id:"luckysheet-editorConditionRule-dialog",addclass:"luckysheet-newEditorRule-dialog",title:n.editFormatRule,content:f,botton:`<button id="luckysheet-editorConditionRule-dialog-confirm" class="btn btn-primary">${n.confirm}</button> |
| | | <button id="luckysheet-editorConditionRule-dialog-close" class="btn btn-default">${n.cancel}</button>`,style:"z-index:100003"}));let m=$("#luckysheet-editorConditionRule-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),g=m.outerHeight(),y=m.outerWidth(),v=$(window).width(),b=$(window).height(),k=$(document).scrollLeft(),w=$(document).scrollTop();if($("#luckysheet-editorConditionRule-dialog").css({left:(v+k-y)/2,top:(b+w-g)/3}).show(),e.colorSelectInit(),$("#luckysheet-editorConditionRule-dialog .ruleTypeBox .ruleTypeItem:eq("+s+")").addClass("on").siblings().removeClass("on"),$("#luckysheet-editorConditionRule-dialog #type1").val(u),(u=="dataBar"||u=="colorGradation"||u=="icons"||u=="number"||u=="text"||u=="date")&&($("#luckysheet-editorConditionRule-dialog ."+u+"Box").show(),$("#luckysheet-editorConditionRule-dialog ."+u+"Box").siblings().hide()),u=="date"&&e.daterangeInit("luckysheet-editorConditionRule-dialog"),l=="dataBar"||l=="colorGradation"||l=="icons"){if(u=="dataBar")a.length==2?$("#luckysheet-editorConditionRule-dialog .dataBarBox #type2").val("gradient"):a.length==1&&$("#luckysheet-editorConditionRule-dialog .dataBarBox #type2").val("solid"),$("#luckysheet-editorConditionRule-dialog .dataBarBox .luckysheet-conditionformat-config-color").spectrum("set",a[0]);else if(u=="colorGradation")a.length==3?($("#luckysheet-editorConditionRule-dialog .colorGradationBox #type2").val("threeColor"),$("#luckysheet-editorConditionRule-dialog .colorGradationBox .midVal").show(),$("#luckysheet-editorConditionRule-dialog .colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("set",a[0]),$("#luckysheet-editorConditionRule-dialog .colorGradationBox .midVal .luckysheet-conditionformat-config-color").spectrum("set",a[1]),$("#luckysheet-editorConditionRule-dialog .colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("set",a[2])):a.length==2&&($("#luckysheet-editorConditionRule-dialog .colorGradationBox #type2").val("twoColor"),$("#luckysheet-editorConditionRule-dialog .colorGradationBox .midVal").hide(),$("#luckysheet-editorConditionRule-dialog .colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("set",a[0]),$("#luckysheet-editorConditionRule-dialog .colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("set",a[1]));else if(u=="icons"){let x=a.len,C=a.leftMin,S=a.top;$("#luckysheet-editorConditionRule-dialog .iconsBox li").each(function(_,T){if($(T).find("div").attr("data-len")==x&&$(T).find("div").attr("data-leftmin")==C&&$(T).find("div").attr("data-top")==S)return $("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").css("background-position",$(T).find("div").css("background-position")),$("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("data-len",$(T).find("div").attr("data-len")),$("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("data-leftmin",$(T).find("div").attr("data-leftmin")),$("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("data-top",$(T).find("div").attr("data-leftmin")),$("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("title",$(T).find("div").attr("title")),!0})}}else{if(u=="number"){$("#luckysheet-editorConditionRule-dialog .numberBox #type2").val(o);let x;if(t.conditionRange[0]!=null?x=xt(h.currentSheetIndex,{row:t.conditionRange[0].row,column:t.conditionRange[0].column},h.currentSheetIndex):x=t.conditionValue[0],$("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal input").val(x),o=="betweenness"){$("#luckysheet-editorConditionRule-dialog .numberBox .txt").show(),$("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal2").show();let C;t.conditionRange[1]!=null?C=xt(h.currentSheetIndex,{row:t.conditionRange[1].row,column:t.conditionRange[1].column},h.currentSheetIndex):C=t.conditionValue[1],$("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal2 input").val(C)}else $("#luckysheet-editorConditionRule-dialog .numberBox .txt").hide(),$("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal2").hide()}else if(u=="text"){let x;t.conditionRange[0]!=null?x=xt(h.currentSheetIndex,{row:t.conditionRange[0].row,column:t.conditionRange[0].column},h.currentSheetIndex):x=t.conditionValue[0],$("#luckysheet-editorConditionRule-dialog .textBox #conditionVal input").val(x)}else if(u=="date"){e.daterangeInit("luckysheet-editorConditionRule-dialog");let x=t.conditionValue[0];$("#luckysheet-editorConditionRule-dialog .dateBox #daterange-btn").val(x)}else if(u=="top"||u=="last"){let x=t.conditionValue[0];(o=="top10%"||o=="last10%")&&$("#luckysheet-editorConditionRule-dialog #isPercent").attr("checked","checked")}else if(o=="formula"){let x=t.conditionValue[0];$("#luckysheet-editorConditionRule-dialog #formulaConditionVal input").val(x)}$("#luckysheet-editorConditionRule-dialog #textcolorshow").spectrum("set",a.textColor),$("#luckysheet-editorConditionRule-dialog #cellcolorshow").spectrum("set",a.cellColor)}},infoDialog:function(e,n){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-conditionformat-info-dialog").remove(),$("body").append(_e(ft,{id:"luckysheet-conditionformat-info-dialog",addclass:"",title:e,content:n,botton:`<button id="luckysheet-conditionformat-info-dialog-close" class="btn btn-default">${Q().conditionformat.close}</button>`,style:"z-index:100003"}));let t=$("#luckysheet-conditionformat-info-dialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),l=t.outerHeight(),a=t.outerWidth(),o=$(window).width(),s=$(window).height(),u=$(document).scrollLeft(),d=$(document).scrollTop();$("#luckysheet-conditionformat-info-dialog").css({left:(o+u-a)/2,top:(s+d-l)/3}).show()},getRuleExplain:function(e){let n=Q().conditionformat,t=this.textCellColorHtml(),l;switch(e){case 0:l=`<div class="title">${n.ruleTypeItem1}\uFF1A</div> |
| | | </div>`;$("body").append(_e(dt,{id:"luckysheet-administerRule-dialog",addclass:"luckysheet-administerRule-dialog",title:e.conditionformatManageRules,content:t,botton:`<button id="luckysheet-administerRule-dialog-confirm" class="btn btn-primary">${e.confirm}</button> |
| | | <button id="luckysheet-administerRule-dialog-close" class="btn btn-default">${e.close}</button>`,style:"z-index:100003"}));let l=$("#luckysheet-administerRule-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),a=l.outerHeight(),o=l.outerWidth(),s=$(window).width(),u=$(window).height(),f=$(document).scrollLeft(),d=$(document).scrollTop();$("#luckysheet-administerRule-dialog").css({left:(s+f-o)/2,top:(u+d-a)/3}).show();let m=$("#luckysheet-administerRule-dialog .chooseSheet option:selected").val();this.getConditionRuleList(m)},getConditionRuleList:function(e){let n=this;$("#luckysheet-administerRule-dialog .ruleList .listBox").empty();let t=n.fileClone[Z(e)].luckysheet_conditionformat_save;if(t!=null&&t.length>0){let l=Q().conditionformat;for(let a=0;a<t.length;a++){let o=t[a].type,s=t[a].format,u=t[a].cellrange,f,d="";o=="dataBar"?(f=l.dataBar,d='<canvas width="46" height="18" style="width: 46px;height: 18px;margin: 3px 0 0 5px;"></canvas>'):o=="colorGradation"?(f=l.colorGradation,d='<canvas width="46" height="18" style="width: 46px;height: 18px;margin: 3px 0 0 5px;"></canvas>'):o=="icons"?(f=l.icons,d='<canvas width="46" height="18" style="width: 46px;height: 18px;margin: 3px 0 0 5px;"></canvas>'):(f=n.getConditionRuleName(t[a].conditionName,t[a].conditionRange,t[a].conditionValue),s.textColor!=null&&(d+='<span class="colorbox" title="'+l.textColor+'" style="background-color:'+s.textColor+'"></span>'),s.cellColor!=null&&(d+='<span class="colorbox" title="'+l.cellColor+'" style="background-color:'+s.cellColor+'"></span>'));let m=[];for(let y=0;y<u.length;y++){let v=u[y].row[0],b=u[y].row[1],k=u[y].column[0],w=u[y].column[1];m.push(tt(k)+(v+1)+":"+tt(w)+(b+1))}let g='<div class="item" data-item="'+a+'"><div class="ruleName" title="'+f+'">'+f+'</div><div class="format">'+d+'</div><div class="ruleRange"><input class="formulaInputFocus" readonly="true" value="'+m.join(",")+'"/><i class="fa fa-table" aria-hidden="true" title="'+l.selectRange+'"></i></div></div>';$("#luckysheet-administerRule-dialog .ruleList .listBox").prepend(g)}$("#luckysheet-administerRule-dialog .ruleList .listBox .item canvas").each(function(a){let o=$(this).closest(".item").attr("data-item"),s=t[o].type,u=t[o].format,f=$(this).get(0).getContext("2d");if(s=="dataBar")if(u.length==2){let d=f.createLinearGradient(0,0,46,0);d.addColorStop(0,u[0]),d.addColorStop(1,u[1]),f.fillStyle=d,f.fillRect(0,0,46,18),f.beginPath(),f.moveTo(0,0),f.lineTo(0,18),f.lineTo(46,18),f.lineTo(46,0),f.lineTo(0,0),f.lineWidth=h.devicePixelRatio,f.strokeStyle=u[0],f.stroke(),f.closePath()}else u.length==1&&(f.fillStyle=u[0],f.fillRect(0,0,46,18),f.beginPath(),f.moveTo(0,0),f.lineTo(0,18),f.lineTo(46,18),f.lineTo(46,0),f.lineTo(0,0),f.lineWidth=h.devicePixelRatio,f.strokeStyle=u[0],f.stroke(),f.closePath());else if(s=="colorGradation"){let d=f.createLinearGradient(0,0,46,0);u.length==3?(d.addColorStop(0,u[0]),d.addColorStop(.5,u[1]),d.addColorStop(1,u[2])):u.length==2&&(d.addColorStop(0,u[0]),d.addColorStop(1,u[1])),f.fillStyle=d,f.fillRect(0,0,46,18)}else if(s=="icons"){let d=u.len,m=u.leftMin,g=u.top,y=32*d+10*(d-1),v=32,b=46,k=46*32/y;m=="0"?f.drawImage(wa,0,g*32,y,v,0,(18-k)/2,b,k):m=="5"&&f.drawImage(wa,210,g*32,y,v,0,(18-k)/2,b,k)}}),$("#luckysheet-administerRule-dialog .ruleList .listBox .item").eq(0).addClass("on")}},getConditionRuleName:function(e,n,t){let l;n[0]!=null?l=tt(n[0].column[0])+(n[0].row[0]+1):l=t[0];let a=Q().conditionformat;if(e=="greaterThan")return a.cellValue+" > "+l;if(e=="lessThan")return a.cellValue+" < "+l;if(e=="betweenness"){let o;return n[1]!=null?o=tt(n[1].column[0])+(n[1].row[0]+1):o=t[1],a.cellValue+" "+a.between+" "+l+" "+a.in+" "+o+" "+a.between2}else{if(e=="equal")return a.cellValue+" = "+l;if(e=="textContains")return a.cellValue+a.contain+" ="+l;if(e=="occurrenceDate")return t;if(e=="duplicateValue"){if(t=="0")return a.duplicateValue;if(t=="1")return a.uniqueValue}else{if(e=="top10")return a.top+" "+l+" "+a.oneself;if(e=="top10%")return a.top+" "+l+"% "+a.oneself;if(e=="last10")return a.last+" "+l+" "+a.oneself;if(e=="last10%")return a.last+" "+l+"% "+a.oneself;if(e=="AboveAverage")return a.aboveAverage;if(e=="SubAverage")return a.belowAverage;if(e=="formula")return l.slice(0,1)!="="&&(l="="+l),a.formula+": "+l}}},newConditionRuleDialog:function(e){let n=this,t=Q().conditionformat,l=n.getRuleExplain(0);$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-administerRule-dialog").hide(),$("#luckysheet-newConditionRule-dialog").remove();let a='<div><div class="boxTitle">'+t.chooseRuleType+"\uFF1A</div>"+n.ruleTypeHtml()+'<div class="boxTitle">'+t.editRuleDescription+'\uFF1A</div><div class="ruleExplainBox">'+l+"</div></div>";$("body").append(_e(dt,{id:"luckysheet-newConditionRule-dialog",addclass:"luckysheet-newEditorRule-dialog",title:t.newFormatRule,content:a,botton:`<button id="luckysheet-newConditionRule-dialog-confirm" class="btn btn-primary" data-source="${e}">${t.confirm}</button> |
| | | <button id="luckysheet-newConditionRule-dialog-close" class="btn btn-default" data-source="${e}">${t.cancel}</button>`,style:"z-index:100003"}));let o=$("#luckysheet-newConditionRule-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),s=o.outerHeight(),u=o.outerWidth(),f=$(window).width(),d=$(window).height(),m=$(document).scrollLeft(),g=$(document).scrollTop();$("#luckysheet-newConditionRule-dialog").css({left:(f+m-u)/2,top:(d+g-s)/3}).show(),$("#luckysheet-newConditionRule-dialog .ruleTypeBox .ruleTypeItem:eq(0)").addClass("on").siblings().removeClass("on"),n.colorSelectInit()},editorConditionRuleDialog:function(){let e=this,n=Q().conditionformat,t=e.editorRule.data;if(t==null)return;let l=t.type,a=t.format,o=t.conditionName,s,u;l=="dataBar"||l=="colorGradation"||l=="icons"?(s=0,u=l):o=="greaterThan"||o=="lessThan"||o=="betweenness"||o=="equal"||o=="textContains"||o=="occurrenceDate"?(s=1,o=="greaterThan"||o=="lessThan"||o=="betweenness"||o=="equal"?u="number":o=="textContains"?u="text":o=="occurrenceDate"&&(u="date")):o=="top10"||o=="top10%"||o=="last10"||o=="last10%"?(s=2,o=="top10"||o=="top10%"?u="top":(o=="last10"||o=="last10%")&&(u="last")):o=="AboveAverage"||o=="SubAverage"?(s=3,u=o):o=="duplicateValue"?(s=4,u=t.conditionValue):o=="formula"&&(s=5);let f=e.getRuleExplain(s);$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-administerRule-dialog").hide(),$("#luckysheet-editorConditionRule-dialog").remove();let d='<div><div class="boxTitle">'+n.chooseRuleType+"\uFF1A</div>"+e.ruleTypeHtml()+'<div class="boxTitle">'+n.editRuleDescription+'\uFF1A</div><div class="ruleExplainBox">'+f+"</div></div>";$("body").append(_e(dt,{id:"luckysheet-editorConditionRule-dialog",addclass:"luckysheet-newEditorRule-dialog",title:n.editFormatRule,content:d,botton:`<button id="luckysheet-editorConditionRule-dialog-confirm" class="btn btn-primary">${n.confirm}</button> |
| | | <button id="luckysheet-editorConditionRule-dialog-close" class="btn btn-default">${n.cancel}</button>`,style:"z-index:100003"}));let m=$("#luckysheet-editorConditionRule-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),g=m.outerHeight(),y=m.outerWidth(),v=$(window).width(),b=$(window).height(),k=$(document).scrollLeft(),w=$(document).scrollTop();if($("#luckysheet-editorConditionRule-dialog").css({left:(v+k-y)/2,top:(b+w-g)/3}).show(),e.colorSelectInit(),$("#luckysheet-editorConditionRule-dialog .ruleTypeBox .ruleTypeItem:eq("+s+")").addClass("on").siblings().removeClass("on"),$("#luckysheet-editorConditionRule-dialog #type1").val(u),(u=="dataBar"||u=="colorGradation"||u=="icons"||u=="number"||u=="text"||u=="date")&&($("#luckysheet-editorConditionRule-dialog ."+u+"Box").show(),$("#luckysheet-editorConditionRule-dialog ."+u+"Box").siblings().hide()),u=="date"&&e.daterangeInit("luckysheet-editorConditionRule-dialog"),l=="dataBar"||l=="colorGradation"||l=="icons"){if(u=="dataBar")a.length==2?$("#luckysheet-editorConditionRule-dialog .dataBarBox #type2").val("gradient"):a.length==1&&$("#luckysheet-editorConditionRule-dialog .dataBarBox #type2").val("solid"),$("#luckysheet-editorConditionRule-dialog .dataBarBox .luckysheet-conditionformat-config-color").spectrum("set",a[0]);else if(u=="colorGradation")a.length==3?($("#luckysheet-editorConditionRule-dialog .colorGradationBox #type2").val("threeColor"),$("#luckysheet-editorConditionRule-dialog .colorGradationBox .midVal").show(),$("#luckysheet-editorConditionRule-dialog .colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("set",a[0]),$("#luckysheet-editorConditionRule-dialog .colorGradationBox .midVal .luckysheet-conditionformat-config-color").spectrum("set",a[1]),$("#luckysheet-editorConditionRule-dialog .colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("set",a[2])):a.length==2&&($("#luckysheet-editorConditionRule-dialog .colorGradationBox #type2").val("twoColor"),$("#luckysheet-editorConditionRule-dialog .colorGradationBox .midVal").hide(),$("#luckysheet-editorConditionRule-dialog .colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("set",a[0]),$("#luckysheet-editorConditionRule-dialog .colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("set",a[1]));else if(u=="icons"){let x=a.len,C=a.leftMin,S=a.top;$("#luckysheet-editorConditionRule-dialog .iconsBox li").each(function(_,T){if($(T).find("div").attr("data-len")==x&&$(T).find("div").attr("data-leftmin")==C&&$(T).find("div").attr("data-top")==S)return $("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").css("background-position",$(T).find("div").css("background-position")),$("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("data-len",$(T).find("div").attr("data-len")),$("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("data-leftmin",$(T).find("div").attr("data-leftmin")),$("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("data-top",$(T).find("div").attr("data-leftmin")),$("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("title",$(T).find("div").attr("title")),!0})}}else{if(u=="number"){$("#luckysheet-editorConditionRule-dialog .numberBox #type2").val(o);let x;if(t.conditionRange[0]!=null?x=xt(h.currentSheetIndex,{row:t.conditionRange[0].row,column:t.conditionRange[0].column},h.currentSheetIndex):x=t.conditionValue[0],$("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal input").val(x),o=="betweenness"){$("#luckysheet-editorConditionRule-dialog .numberBox .txt").show(),$("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal2").show();let C;t.conditionRange[1]!=null?C=xt(h.currentSheetIndex,{row:t.conditionRange[1].row,column:t.conditionRange[1].column},h.currentSheetIndex):C=t.conditionValue[1],$("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal2 input").val(C)}else $("#luckysheet-editorConditionRule-dialog .numberBox .txt").hide(),$("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal2").hide()}else if(u=="text"){let x;t.conditionRange[0]!=null?x=xt(h.currentSheetIndex,{row:t.conditionRange[0].row,column:t.conditionRange[0].column},h.currentSheetIndex):x=t.conditionValue[0],$("#luckysheet-editorConditionRule-dialog .textBox #conditionVal input").val(x)}else if(u=="date"){e.daterangeInit("luckysheet-editorConditionRule-dialog");let x=t.conditionValue[0];$("#luckysheet-editorConditionRule-dialog .dateBox #daterange-btn").val(x)}else if(u=="top"||u=="last"){let x=t.conditionValue[0];(o=="top10%"||o=="last10%")&&$("#luckysheet-editorConditionRule-dialog #isPercent").attr("checked","checked")}else if(o=="formula"){let x=t.conditionValue[0];$("#luckysheet-editorConditionRule-dialog #formulaConditionVal input").val(x)}$("#luckysheet-editorConditionRule-dialog #textcolorshow").spectrum("set",a.textColor),$("#luckysheet-editorConditionRule-dialog #cellcolorshow").spectrum("set",a.cellColor)}},infoDialog:function(e,n){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-conditionformat-info-dialog").remove(),$("body").append(_e(dt,{id:"luckysheet-conditionformat-info-dialog",addclass:"",title:e,content:n,botton:`<button id="luckysheet-conditionformat-info-dialog-close" class="btn btn-default">${Q().conditionformat.close}</button>`,style:"z-index:100003"}));let t=$("#luckysheet-conditionformat-info-dialog").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),l=t.outerHeight(),a=t.outerWidth(),o=$(window).width(),s=$(window).height(),u=$(document).scrollLeft(),f=$(document).scrollTop();$("#luckysheet-conditionformat-info-dialog").css({left:(o+u-a)/2,top:(s+f-l)/3}).show()},getRuleExplain:function(e){let n=Q().conditionformat,t=this.textCellColorHtml(),l;switch(e){case 0:l=`<div class="title">${n.ruleTypeItem1}\uFF1A</div> |
| | | <div style="height: 30px;margin-bottom: 5px;"> |
| | | <label style="display: block;width: 80px;height: 30px;line-height: 30px;float: left;">${n.formatStyle}\uFF1A</label> |
| | | <select id="type1"> |
| | |
| | | <i class="fa fa-table" aria-hidden="true" title="${n.selectCell}"></i> |
| | | </div> |
| | | </div> |
| | | <div class="title">${n.setFormat}: </div>${t}`;break}return l},daterangeInit:function(e){let n=Q().conditionformat;$(".ranges_1 ul").remove(),$("#"+e).find("#daterange-btn").flatpickr({mode:"range",onChange:function(t,l){let[a,o]=t,s=[n.yesterday,n.today],u=[n.lastWeek,n.thisWeek,n.lastMonth,n.thisMonth,n.lastYear,n.thisYear,n.last7days,n.last30days];l==n.all?$("#daterange-btn").val(""):s.indexOf(l)>-1?$("#daterange-btn").val((0,To.default)(a).format("YYYY/MM/DD")):u.indexOf(l)>-1&&$("#daterange-btn").val((0,To.default)(a).format("YYYY/MM/DD")+"-"+(0,To.default)(o).format("YYYY/MM/DD"))}})},CFSplitRange:function(e,n,t,l){let a=[],o=t.row[0]-n.row[0],s=t.column[0]-n.column[0],u=e.row[0],d=e.row[1],f=e.column[0],m=e.column[1];return u>=n.row[0]&&d<=n.row[1]&&f>=n.column[0]&&m<=n.column[1]?l=="allPart"?a=[{row:[u+o,d+o],column:[f+s,m+s]}]:l=="restPart"?a=[]:l=="operatePart"&&(a=[{row:[u+o,d+o],column:[f+s,m+s]}]):u>=n.row[0]&&u<=n.row[1]&&f>=n.column[0]&&m<=n.column[1]?l=="allPart"?a=[{row:[n.row[1]+1,d],column:[f,m]},{row:[u+o,n.row[1]+o],column:[f+s,m+s]}]:l=="restPart"?a=[{row:[n.row[1]+1,d],column:[f,m]}]:l=="operatePart"&&(a=[{row:[u+o,n.row[1]+o],column:[f+s,m+s]}]):d>=n.row[0]&&d<=n.row[1]&&f>=n.column[0]&&m<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[0]+o,d+o],column:[f+s,m+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[f,m]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,d+o],column:[f+s,m+s]}]):u<n.row[0]&&d>n.row[1]&&f>=n.column[0]&&m<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[1]+1,d],column:[f,m]},{row:[n.row[0]+o,n.row[1]+o],column:[f+s,m+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[1]+1,d],column:[f,m]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,n.row[1]+o],column:[f+s,m+s]}]):f>=n.column[0]&&f<=n.column[1]&&u>=n.row[0]&&d<=n.row[1]?l=="allPart"?a=[{row:[u,d],column:[n.column[1]+1,m]},{row:[u+o,d+o],column:[f+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,d],column:[n.column[1]+1,m]}]:l=="operatePart"&&(a=[{row:[u+o,d+o],column:[f+s,n.column[1]+s]}]):m>=n.column[0]&&m<=n.column[1]&&u>=n.row[0]&&d<=n.row[1]?l=="allPart"?a=[{row:[u,d],column:[f,n.column[0]-1]},{row:[u+o,d+o],column:[n.column[0]+s,m+s]}]:l=="restPart"?a=[{row:[u,d],column:[f,n.column[0]-1]}]:l=="operatePart"&&(a=[{row:[u+o,d+o],column:[n.column[0]+s,m+s]}]):f<n.column[0]&&m>n.column[1]&&u>=n.row[0]&&d<=n.row[1]?l=="allPart"?a=[{row:[u,d],column:[f,n.column[0]-1]},{row:[u,d],column:[n.column[1]+1,m]},{row:[u+o,d+o],column:[n.column[0]+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,d],column:[f,n.column[0]-1]},{row:[u,d],column:[n.column[1]+1,m]}]:l=="operatePart"&&(a=[{row:[u+o,d+o],column:[n.column[0]+s,n.column[1]+s]}]):u>=n.row[0]&&u<=n.row[1]&&f>=n.column[0]&&f<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,d],column:[f,m]},{row:[u+o,n.row[1]+o],column:[f+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,d],column:[f,m]}]:l=="operatePart"&&(a=[{row:[u+o,n.row[1]+o],column:[f+s,n.column[1]+s]}]):u>=n.row[0]&&u<=n.row[1]&&m>=n.column[0]&&m<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[1]],column:[f,n.column[0]-1]},{row:[n.row[1]+1,d],column:[f,m]},{row:[u+o,n.row[1]+o],column:[n.column[0]+s,m+s]}]:l=="restPart"?a=[{row:[u,n.row[1]],column:[f,n.column[0]-1]},{row:[n.row[1]+1,d],column:[f,m]}]:l=="operatePart"&&(a=[{row:[u+o,n.row[1]+o],column:[n.column[0]+s,m+s]}]):d>=n.row[0]&&d<=n.row[1]&&f>=n.column[0]&&f<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[0],d],column:[n.column[1]+1,m]},{row:[n.row[0]+o,d+o],column:[f+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[0],d],column:[n.column[1]+1,m]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,d+o],column:[f+s,n.column[1]+s]}]):d>=n.row[0]&&d<=n.row[1]&&m>=n.column[0]&&m<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[0],d],column:[f,n.column[0]-1]},{row:[n.row[0]+o,d+o],column:[n.column[0]+s,m+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[0],d],column:[f,n.column[0]-1]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,d+o],column:[n.column[0]+s,m+s]}]):u<n.row[0]&&d>n.row[1]&&f>=n.column[0]&&f<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[0],n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,d],column:[f,m]},{row:[n.row[0]+o,n.row[1]+o],column:[f+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[0],n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,d],column:[f,m]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,n.row[1]+o],column:[f+s,n.column[1]+s]}]):u<n.row[0]&&d>n.row[1]&&m>=n.column[0]&&m<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[0],n.row[1]],column:[f,n.column[0]-1]},{row:[n.row[1]+1,d],column:[f,m]},{row:[n.row[0]+o,n.row[1]+o],column:[n.column[0]+s,m+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[0],n.row[1]],column:[f,n.column[0]-1]},{row:[n.row[1]+1,d],column:[f,m]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,n.row[1]+o],column:[n.column[0]+s,m+s]}]):f<n.column[0]&&m>n.column[1]&&u>=n.row[0]&&u<=n.row[1]?l=="allPart"?a=[{row:[u,n.row[1]],column:[f,n.column[0]-1]},{row:[u,n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,d],column:[f,m]},{row:[u+o,n.row[1]+o],column:[n.column[0]+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,n.row[1]],column:[f,n.column[0]-1]},{row:[u,n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,d],column:[f,m]}]:l=="operatePart"&&(a=[{row:[u+o,n.row[1]+o],column:[n.column[0]+s,n.column[1]+s]}]):f<n.column[0]&&m>n.column[1]&&d>=n.row[0]&&d<=n.row[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[0],d],column:[f,n.column[0]-1]},{row:[n.row[0],d],column:[n.column[1]+1,m]},{row:[n.row[0]+o,d+o],column:[n.column[0]+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[0],d],column:[f,n.column[0]-1]},{row:[n.row[0],d],column:[n.column[1]+1,m]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,d+o],column:[n.column[0]+s,n.column[1]+s]}]):u<n.row[0]&&d>n.row[1]&&f<n.column[0]&&m>n.column[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[0],n.row[1]],column:[f,n.column[0]-1]},{row:[n.row[0],n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,d],column:[f,m]},{row:[n.row[0]+o,n.row[1]+o],column:[n.column[0]+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[f,m]},{row:[n.row[0],n.row[1]],column:[f,n.column[0]-1]},{row:[n.row[0],n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,d],column:[f,m]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,n.row[1]+o],column:[n.column[0]+s,n.column[1]+s]}]):l=="allPart"?a=[{row:[u,d],column:[f,m]}]:l=="restPart"?a=[{row:[u,d],column:[f,m]}]:l=="operatePart"&&(a=[]),a},getcolorGradation:function(e,n,t,l,a){let o=e.split(","),s=parseInt(o[0].split("(")[1]),u=parseInt(o[1]),d=parseInt(o[2].split(")")[0]),f=n.split(","),m=parseInt(f[0].split("(")[1]),g=parseInt(f[1]),y=parseInt(f[2].split(")")[0]),v=Math.round(s-(s-m)/(t-l)*(t-a)),b=Math.round(u-(u-g)/(t-l)*(t-a)),k=Math.round(d-(d-y)/(t-l)*(t-a));return"rgb("+v+", "+b+", "+k+")"},getCFPartRange:function(e,n,t){let l=[],a=h.luckysheetfile[Z(e)].luckysheet_conditionformat_save;if(a!=null&&a.length>0){e:for(let o=0;o<a.length;o++){let s=a[o].cellrange;for(let u=0;u<s.length;u++){let d=s[u].row[0],f=s[u].row[1],m=s[u].column[0],g=s[u].column[1];for(let y=0;y<range.length;y++)if(range[y].row[0]>=d&&range[y].row[0]<=f||range[y].row[1]>=d&&range[y].row[1]<=f||range[y].column[0]>=m&&range[y].column[0]<=g||range[y].column[1]>=m&&range[y].column[1]<=g){l.push(a[o]);continue e}}}}return l},checksCF:function(e,n,t){return t!=null&&e+"_"+n in t?t[e+"_"+n]:null},getComputeMap:function(e){let n=Z(h.currentSheetIndex);e!=null&&(n=Z(e));let t=h.luckysheetfile[n].luckysheet_conditionformat_save,l=h.luckysheetfile[n].data;return l==null?null:this.compute(t,l)},compute:function(e,n){let t=this;e==null&&(e=[]);let l={};if(e.length>0)for(let a=0;a<e.length;a++){let o=e[a].type,s=e[a].cellrange,u=e[a].format;if(o=="dataBar"){let d=null,f=null;for(let m=0;m<s.length;m++)for(let g=s[m].row[0];g<=s[m].row[1];g++)for(let y=s[m].column[0];y<=s[m].column[1];y++){if(n[g]==null||n[g][y]==null)continue;let v=n[g][y];P(v)=="object"&&v.ct!=null&&v.ct.t=="n"&&v.v!=null&&((d==null||parseInt(v.v)>d)&&(d=parseInt(v.v)),(f==null||parseInt(v.v)<f)&&(f=parseInt(v.v)))}if(d!=null&&f!=null)if(f<0){let m=Math.round(d/(d-f)*10)/10,g=Math.round(Math.abs(f)/(d-f)*10)/10;for(let y=0;y<s.length;y++)for(let v=s[y].row[0];v<=s[y].row[1];v++)for(let b=s[y].column[0];b<=s[y].column[1];b++){if(n[v]==null||n[v][b]==null)continue;let k=n[v][b];if(P(k)=="object"&&k.ct!=null&&k.ct.t=="n"&&k.v!=null){if(parseInt(k.v)<0){let w=Math.round(Math.abs(parseInt(k.v))/Math.abs(f)*100)/100;v+"_"+b in l?l[v+"_"+b].dataBar={valueType:"minus",minusLen:g,valueLen:w,format:u}:l[v+"_"+b]={dataBar:{valueType:"minus",minusLen:g,valueLen:w,format:u}}}if(parseInt(k.v)>0){let w=Math.round(parseInt(k.v)/d*100)/100;v+"_"+b in l?l[v+"_"+b].dataBar={valueType:"plus",plusLen:m,minusLen:g,valueLen:w,format:u}:l[v+"_"+b]={dataBar:{valueType:"plus",plusLen:m,minusLen:g,valueLen:w,format:u}}}}}}else{let m=1;for(let g=0;g<s.length;g++)for(let y=s[g].row[0];y<=s[g].row[1];y++)for(let v=s[g].column[0];v<=s[g].column[1];v++){if(n[y]==null||n[y][v]==null)continue;let b=n[y][v];if(P(b)=="object"&&b.ct!=null&&b.ct.t=="n"&&b.v!=null){let k;d==0?k=1:k=Math.round(parseInt(b.v)/d*100)/100,y+"_"+v in l?l[y+"_"+v].dataBar={valueType:"plus",plusLen:m,valueLen:k,format:u}:l[y+"_"+v]={dataBar:{valueType:"plus",plusLen:m,valueLen:k,format:u}}}}}}else if(o=="colorGradation"){let d=null,f=null,m=0,g=0;for(let y=0;y<s.length;y++)for(let v=s[y].row[0];v<=s[y].row[1];v++)for(let b=s[y].column[0];b<=s[y].column[1];b++){if(n[v]==null||n[v][b]==null)continue;let k=n[v][b];P(k)=="object"&&k.ct!=null&&k.ct.t=="n"&&k.v!=null&&(g++,m+=parseInt(k.v),(d==null||parseInt(k.v)>d)&&(d=parseInt(k.v)),(f==null||parseInt(k.v)<f)&&(f=parseInt(k.v)))}if(d!=null&&f!=null){if(u.length==3){let y=Math.floor(m/g);for(let v=0;v<s.length;v++)for(let b=s[v].row[0];b<=s[v].row[1];b++)for(let k=s[v].column[0];k<=s[v].column[1];k++){if(n[b]==null||n[b][k]==null)continue;let w=n[b][k];P(w)=="object"&&w.ct!=null&&w.ct.t=="n"&&w.v!=null&&(parseInt(w.v)==f?b+"_"+k in l?l[b+"_"+k].cellColor=u[2]:l[b+"_"+k]={cellColor:u[2]}:parseInt(w.v)>f&&parseInt(w.v)<y?b+"_"+k in l?l[b+"_"+k].cellColor=t.getcolorGradation(u[2],u[1],f,y,parseInt(w.v)):l[b+"_"+k]={cellColor:t.getcolorGradation(u[2],u[1],f,y,parseInt(w.v))}:parseInt(w.v)==y?b+"_"+k in l?l[b+"_"+k].cellColor=u[1]:l[b+"_"+k]={cellColor:u[1]}:parseInt(w.v)>y&&parseInt(w.v)<d?b+"_"+k in l?l[b+"_"+k].cellColor=t.getcolorGradation(u[1],u[0],y,d,parseInt(w.v)):l[b+"_"+k]={cellColor:t.getcolorGradation(u[1],u[0],y,d,parseInt(w.v))}:parseInt(w.v)==d&&(b+"_"+k in l?l[b+"_"+k].cellColor=u[0]:l[b+"_"+k]={cellColor:u[0]}))}}else if(u.length==2)for(let y=0;y<s.length;y++)for(let v=s[y].row[0];v<=s[y].row[1];v++)for(let b=s[y].column[0];b<=s[y].column[1];b++){if(n[v]==null||n[v][b]==null)continue;let k=n[v][b];P(k)=="object"&&k.ct!=null&&k.ct.t=="n"&&k.v!=null&&(parseInt(k.v)==f?v+"_"+b in l?l[v+"_"+b].cellColor=u[1]:l[v+"_"+b]={cellColor:u[1]}:parseInt(k.v)>f&&parseInt(k.v)<d?v+"_"+b in l?l[v+"_"+b].cellColor=t.getcolorGradation(u[1],u[0],f,d,parseInt(k.v)):l[v+"_"+b]={cellColor:t.getcolorGradation(u[1],u[0],f,d,parseInt(k.v))}:parseInt(k.v)==d&&(v+"_"+b in l?l[v+"_"+b].cellColor=u[0]:l[v+"_"+b]={cellColor:u[0]}))}}}else if(o=="icons"){let d=parseInt(u.len),f=parseInt(u.leftMin),m=parseInt(u.top),g=null,y=null;for(let v=0;v<s.length;v++)for(let b=s[v].row[0];b<=s[v].row[1];b++)for(let k=s[v].column[0];k<=s[v].column[1];k++){if(n[b]==null||n[b][k]==null)continue;let w=n[b][k];P(w)=="object"&&w.ct!=null&&w.ct.t=="n"&&w.v!=null&&((g==null||parseInt(w.v)>g)&&(g=parseInt(w.v)),(y==null||parseInt(w.v)<y)&&(y=parseInt(w.v)))}if(g!=null&&y!=null){let v=Math.floor((g-y+1)/d),b=(g-y+1)%d;if(d==3){let k,w,x;b==2?(k=[y,y+v],w=[y+v+1,y+v*2],x=[y+v*2+1,g]):(k=[y,y+v-1],w=[y+v,y+v*2-1],x=[y+v*2,g]);for(let C=0;C<s.length;C++)for(let S=s[C].row[0];S<=s[C].row[1];S++)for(let _=s[C].column[0];_<=s[C].column[1];_++){if(n[S]==null||n[S][_]==null)continue;let T=n[S][_];P(T)=="object"&&T.ct!=null&&T.ct.t=="n"&&T.v!=null&&(parseInt(T.v)>=k[0]&&parseInt(T.v)<=k[1]?S+"_"+_ in l?l[S+"_"+_].icons={left:f+2,top:m}:l[S+"_"+_]={icons:{left:f+2,top:m}}:parseInt(T.v)>=w[0]&&parseInt(T.v)<=w[1]?S+"_"+_ in l?l[S+"_"+_].icons={left:f+1,top:m}:l[S+"_"+_]={icons:{left:f+1,top:m}}:parseInt(T.v)>=x[0]&&parseInt(T.v)<=x[1]&&(S+"_"+_ in l?l[S+"_"+_].icons={left:f,top:m}:l[S+"_"+_]={icons:{left:f,top:m}}))}}else if(d==4){let k,w,x,C;b==2?(k=[y,y+v],w=[y+v+1,y+v*2],x=[y+v*2+1,y+v*3],C=[y+v*3+1,g]):b==3?(k=[y,y+v],w=[y+v+1,y+v*2],x=[y+v*2+1,y+v*3+1],C=[y+v*3+2,g]):(k=[y,y+v-1],w=[y+v,y+v*2-1],x=[y+v*2,y+v*3-1],C=[y+v*3,g]);for(let S=0;S<s.length;S++)for(let _=s[S].row[0];_<=s[S].row[1];_++)for(let T=s[S].column[0];T<=s[S].column[1];T++){if(n[_]==null||n[_][T]==null)continue;let A=n[_][T];P(A)=="object"&&A.ct!=null&&A.ct.t=="n"&&A.v!=null&&(parseInt(A.v)>=k[0]&&parseInt(A.v)<=k[1]?_+"_"+T in l?l[_+"_"+T].icons={left:f+3,top:m}:l[_+"_"+T]={icons:{left:f+3,top:m}}:parseInt(A.v)>=w[0]&&parseInt(A.v)<=w[1]?_+"_"+T in l?l[_+"_"+T].icons={left:f+2,top:m}:l[_+"_"+T]={icons:{left:f+2,top:m}}:parseInt(A.v)>=x[0]&&parseInt(A.v)<=x[1]?_+"_"+T in l?l[_+"_"+T].icons={left:f+1,top:m}:l[_+"_"+T]={icons:{left:f+1,top:m}}:parseInt(A.v)>=C[0]&&parseInt(A.v)<=C[1]&&(_+"_"+T in l?l[_+"_"+T].icons={left:f,top:m}:l[_+"_"+T]={icons:{left:f,top:m}}))}}else if(d==5){let k,w,x,C,S;b==2?(k=[y,y+v],w=[y+v+1,y+v*2],x=[y+v*2+1,y+v*3],C=[y+v*3+1,y+v*4],S=[y+v*4+1,g]):b==3?(k=[y,y+v],w=[y+v+1,y+v*2],x=[y+v*2+1,y+v*3+1],C=[y+v*3+2,y+v*4+1],S=[y+v*4+2,g]):b==4?(k=[y,y+v],w=[y+v+1,y+v*2+1],x=[y+v*2+2,y+v*3+1],C=[y+v*3+2,y+v*4+2],S=[y+v*4+3,g]):(k=[y,y+v-1],w=[y+v,y+v*2-1],x=[y+v*2,y+v*3-1],C=[y+v*3,y+v*4-1],S=[y+v*4,g]);for(let _=0;_<s.length;_++)for(let T=s[_].row[0];T<=s[_].row[1];T++)for(let A=s[_].column[0];A<=s[_].column[1];A++){if(n[T]==null||n[T][A]==null)continue;let R=n[T][A];P(R)=="object"&&R.ct!=null&&R.ct.t=="n"&&R.v!=null&&(parseInt(R.v)>=k[0]&&parseInt(R.v)<=k[1]?T+"_"+A in l?l[T+"_"+A].icons={left:f+4,top:m}:l[T+"_"+A]={icons:{left:f+4,top:m}}:parseInt(R.v)>=w[0]&&parseInt(R.v)<=w[1]?T+"_"+A in l?l[T+"_"+A].icons={left:f+3,top:m}:l[T+"_"+A]={icons:{left:f+3,top:m}}:parseInt(R.v)>=x[0]&&parseInt(R.v)<=x[1]?T+"_"+A in l?l[T+"_"+A].icons={left:f+2,top:m}:l[T+"_"+A]={icons:{left:f+2,top:m}}:parseInt(R.v)>=C[0]&&parseInt(R.v)<=C[1]?T+"_"+A in l?l[T+"_"+A].icons={left:f+1,top:m}:l[T+"_"+A]={icons:{left:f+1,top:m}}:parseInt(R.v)>=S[0]&&parseInt(R.v)<=S[1]&&(T+"_"+A in l?l[T+"_"+A].icons={left:f,top:m}:l[T+"_"+A]={icons:{left:f,top:m}}))}}}}else{let d=e[a].conditionName,f=e[a].conditionValue[0],m=e[a].conditionValue[1],g=u.textColor,y=u.cellColor;for(let v=0;v<s.length;v++)if(d=="greaterThan"||d=="lessThan"||d=="equal"||d=="textContains")for(let b=s[v].row[0];b<=s[v].row[1];b++)for(let k=s[v].column[0];k<=s[v].column[1];k++){if(n[b]==null||n[b][k]==null)continue;let w=n[b][k];P(w)!="object"||me(w.v)||(d=="greaterThan"&&w.v>f?b+"_"+k in l?(l[b+"_"+k].textColor=g,l[b+"_"+k].cellColor=y):l[b+"_"+k]={textColor:g,cellColor:y}:d=="lessThan"&&w.v<f?b+"_"+k in l?(l[b+"_"+k].textColor=g,l[b+"_"+k].cellColor=y):l[b+"_"+k]={textColor:g,cellColor:y}:d=="equal"&&w.v==f?b+"_"+k in l?(l[b+"_"+k].textColor=g,l[b+"_"+k].cellColor=y):l[b+"_"+k]={textColor:g,cellColor:y}:d=="textContains"&&w.v.toString().indexOf(f)!=-1&&(b+"_"+k in l?(l[b+"_"+k].textColor=g,l[b+"_"+k].cellColor=y):l[b+"_"+k]={textColor:g,cellColor:y}))}else if(d=="betweenness"){let b,k;f>m?(b=f,k=m):(b=m,k=f);for(let w=s[v].row[0];w<=s[v].row[1];w++)for(let x=s[v].column[0];x<=s[v].column[1];x++){if(n[w]==null||n[w][x]==null)continue;let C=n[w][x];P(C)!="object"||me(C.v)||C.v>=k&&C.v<=b&&(w+"_"+x in l?(l[w+"_"+x].textColor=g,l[w+"_"+x].cellColor=y):l[w+"_"+x]={textColor:g,cellColor:y})}}else if(d=="occurrenceDate"){let b,k;if(f.toString().indexOf("-")==-1)b=at(f)[2],k=at(f)[2];else{let w=f.toString().split("-");b=at(w[1].trim())[2],k=at(w[0].trim())[2]}for(let w=s[v].row[0];w<=s[v].row[1];w++)for(let x=s[v].column[0];x<=s[v].column[1];x++)if(!(n[w]==null||n[w][x]==null)&&n[w][x].ct!=null&&n[w][x].ct.t=="d"){let C=ze(w,x,n);C>=k&&C<=b&&(w+"_"+x in l?(l[w+"_"+x].textColor=g,l[w+"_"+x].cellColor=y):l[w+"_"+x]={textColor:g,cellColor:y})}}else if(d=="duplicateValue"){let b={};for(let k=s[v].row[0];k<=s[v].row[1];k++)for(let w=s[v].column[0];w<=s[v].column[1];w++){let x=ze(k,w,n);x in b||(b[x]=[]),b[x].push({r:k,c:w})}if(f=="0"){for(let k in b)if(k!="null"&&k!="undefined"&&b[k].length>1)for(let w=0;w<b[k].length;w++)b[k][w].r+"_"+b[k][w].c in l?(l[b[k][w].r+"_"+b[k][w].c].textColor=g,l[b[k][w].r+"_"+b[k][w].c].cellColor=y):l[b[k][w].r+"_"+b[k][w].c]={textColor:g,cellColor:y}}if(f=="1")for(let k in b)k!="null"&&k!="undefined"&&b[k].length==1&&(b[k][0].r+"_"+b[k][0].c in l?(l[b[k][0].r+"_"+b[k][0].c].textColor=g,l[b[k][0].r+"_"+b[k][0].c].cellColor=y):l[b[k][0].r+"_"+b[k][0].c]={textColor:g,cellColor:y})}else if(d=="top10"||d=="top10%"||d=="last10"||d=="last10%"||d=="AboveAverage"||d=="SubAverage"){let b=[];for(let k=s[v].row[0];k<=s[v].row[1];k++)for(let w=s[v].column[0];w<=s[v].column[1];w++)n[k]==null||n[k][w]==null||n[k][w].ct!=null&&n[k][w].ct.t=="n"&&b.push(ze(k,w,n));if(d=="top10"||d=="top10%"||d=="last10"||d=="last10%"){for(let w=0;w<b.length;w++)for(let x=0;x<b.length-1-w;x++)if(b[x]<b[x+1]){let C=b[x];b[x]=b[x+1],b[x+1]=C}let k;d=="top10"?k=b.slice(0,f):d=="top10%"?k=b.slice(0,Math.floor(f*b.length/100)):d=="last10"?k=b.slice(b.length-f,b.length):d=="last10%"&&(k=b.slice(b.length-Math.floor(f*b.length/100),b.length));for(let w=s[v].row[0];w<=s[v].row[1];w++)for(let x=s[v].column[0];x<=s[v].column[1];x++){if(n[w]==null||n[w][x]==null)continue;let C=ze(w,x,n);k.indexOf(C)!=-1&&(w+"_"+x in l?(l[w+"_"+x].textColor=g,l[w+"_"+x].cellColor=y):l[w+"_"+x]={textColor:g,cellColor:y})}}else if(d=="AboveAverage"||d=="SubAverage"){let k=0;for(let x=0;x<b.length;x++)k+=b[x];let w=k/b.length;if(d=="AboveAverage")for(let x=s[v].row[0];x<=s[v].row[1];x++)for(let C=s[v].column[0];C<=s[v].column[1];C++){if(n[x]==null||n[x][C]==null)continue;ze(x,C,n)>w&&(x+"_"+C in l?(l[x+"_"+C].textColor=g,l[x+"_"+C].cellColor=y):l[x+"_"+C]={textColor:g,cellColor:y})}else if(d=="SubAverage")for(let x=s[v].row[0];x<=s[v].row[1];x++)for(let C=s[v].column[0];C<=s[v].column[1];C++){if(n[x]==null||n[x][C]==null)continue;ze(x,C,n)<w&&(x+"_"+C in l?(l[x+"_"+C].textColor=g,l[x+"_"+C].cellColor=y):l[x+"_"+C]={textColor:g,cellColor:y})}}}else if(d=="formula"){let b=s[v].row[0],k=s[v].row[1],w=s[v].column[0],x=s[v].column[1],C=f;f.toString().slice(0,1)!="="&&(C="="+f);for(let S=b;S<=k;S++)for(let _=w;_<=x;_++){let T=C,A=S-b,R=_-w;A>0&&(T="="+p.functionCopy(T,"down",A)),R>0&&(T="="+p.functionCopy(T,"right",R));let F=p.execfunction(T)[1];typeof F!="boolean"&&(F=!!Number(F)),!!F&&(S+"_"+_ in l?(l[S+"_"+_].textColor=g,l[S+"_"+_].cellColor=y):l[S+"_"+_]={textColor:g,cellColor:y})}}}}return l},updateItem:function(e,n,t){if(!Rr(h.currentSheetIndex))return;let l=this,a=Z(h.currentSheetIndex),o=$.extend(!0,[],h.luckysheetfile),s=l.getHistoryRules(o),u;if(e=="delSheet")u=[];else{let m={type:e,cellrange:n,format:t};u=h.luckysheetfile[a].luckysheet_conditionformat_save==null?[]:h.luckysheetfile[a].luckysheet_conditionformat_save,u.push(m)}h.luckysheetfile[a].luckysheet_conditionformat_save=u;let d=$.extend(!0,[],h.luckysheetfile),f=l.getCurrentRules(d);l.ref(s,f),ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,u,{k:"luckysheet_conditionformat_save"})},getHistoryRules:function(e){let n=[];for(let t=0;t<e.length;t++)n.push({sheetIndex:e[t].index,luckysheet_conditionformat_save:e[t].luckysheet_conditionformat_save});return n},getCurrentRules:function(e){let n=[];for(let t=0;t<e.length;t++)n.push({sheetIndex:e[t].index,luckysheet_conditionformat_save:e[t].luckysheet_conditionformat_save});return n},ref:function(e,n){if(h.clearjfundo){h.jfundo.length=0;let t={};t.type="updateCF",t.data={historyRules:e,currentRules:n},h.jfredo.push(t)}setTimeout(function(){Be()},1)}},$e=fv});var mv,Ct,Wa=Ie(()=>{Zt();il();gr();Ml();Jt();ll();Ut();Va();Kt();mr();Ft();Yt();Al();Nt();dt();Xe();bt();qr();mv={clearcopy:function(e){let n=window.clipboardData;n||e&&(n=e.originalEvent.clipboardData);let t=" ";if(h.luckysheet_selection_range=[],Ot(),n)return n.setData("Text",t),!1;{let l=$("#luckysheet-copy-content").css("visibility","hidden");l.val(t),l.focus(),l.select(),setTimeout(function(){l.blur().css("visibility","visible")},10)}},getHtmlBorderStyle:function(e,n){let t="";return e={"0":"none","1":"Thin","2":"Hair","3":"Dotted","4":"Dashed","5":"DashDot","6":"DashDotDot","7":"Double","8":"Medium","9":"MediumDashed","10":"MediumDashDot","11":"MediumDashDotDot","12":"SlantedDashDot","13":"Thick"}[e.toString()],e.indexOf("Medium")>-1?t+="1pt ":e=="Thick"?t+="1.5pt ":t+="0.5pt ",e=="Hair"?t+="double ":e.indexOf("DashDotDot")>-1?t+="dotted ":e.indexOf("DashDot")>-1?t+="dashed ":e.indexOf("Dotted")>-1?t+="dotted ":e.indexOf("Dashed")>-1?t+="dashed ":t+="solid ",t+n+";"},copy:function(e){let n=window.clipboardData;n||(n=e.originalEvent.clipboardData),h.luckysheet_selection_range=[];let t=[],l=[],a=[],o=!1,s=!1;for(let y=0;y<h.luckysheet_select_save.length;y++){let v=h.luckysheet_select_save[y],b=v.row[0],k=v.row[1],w=v.column[0],x=v.column[1];for(let C=b;C<=k;C++)if(!(h.config.rowhidden!=null&&h.config.rowhidden[C]!=null)){t.includes(C)||t.push(C),h.config.rowlen!=null&&C in h.config.rowlen&&(o=!0);for(let S=w;S<=x;S++){if(h.config.colhidden!=null&&h.config.colhidden[S]!=null)continue;l.includes(S)||l.push(S);let _=h.flowdata[C][S];P(_)=="object"&&"mc"in _&&_.mc.rs!=null&&(s=!0)}}h.luckysheet_selection_range.push({row:v.row,column:v.column}),a.push({row:v.row,column:v.column})}Ot(),h.luckysheet_copy_save={dataSheetIndex:h.currentSheetIndex,copyRange:a,RowlChange:o,HasMC:s};let u=this,d;h.config.borderInfo&&h.config.borderInfo.length>0&&(d=Gr());let f="",m=xe.deepCopyFlowData(h.flowdata),g="";for(let y=0;y<t.length;y++){let v=t[y];if(!(h.config.rowhidden!=null&&h.config.rowhidden[v]!=null)){h.config==null||h.config.rowlen==null||h.config.rowlen[v.toString()]==null?f+='<tr height="19">':f+=`<tr height="${h.config.rowlen[v.toString()]}">`;for(let b=0;b<l.length;b++){let k=l[b];if(v==t[0]&&(h.config==null||h.config.columnlen==null||h.config.columnlen[k.toString()]==null?g+='<col width="72px"></col>':g+='<col width="'+h.config.columnlen[k.toString()]+'px"></col>'),h.config.colhidden!=null&&h.config.colhidden[k]!=null)continue;let w='<td ${span} style="${style}">';if(m[v]!=null&&m[v][k]!=null){let x="",C="",S=/^(w|W)((0?)|(0\.0+))$/,_;if(m[v][k].ct!=null&&m[v][k].ct.fa!=null&&m[v][k].ct.fa.match(S)?_=ze(v,k,m):_=ze(v,k,m,"m"),x+=ke.getStyleByCell(m,v,k),P(m[v][k])=="object"&&"mc"in m[v][k])if("rs"in m[v][k].mc){if(C='rowspan="'+m[v][k].mc.rs+'" colspan="'+m[v][k].mc.cs+'"',d&&d[v+"_"+k]){let T={color:{},style:{}},A={color:{},style:{}},R={color:{},style:{}},I={color:{},style:{}};for(let M=v;M<v+m[v][k].mc.rs;M++)for(let E=k;E<k+m[v][k].mc.cs;E++){if(M==v&&d[M+"_"+E]&&d[M+"_"+E].t){let N=d[M+"_"+E].t.style,L=d[M+"_"+E].t.color;R.style[N]==null?R.style[N]=1:R.style[N]=R.style[N]+1,R.color[L]==null?R.color[L]=1:R.color[L]=R.color[L]+1}if(M==v+m[v][k].mc.rs-1&&d[M+"_"+E]&&d[M+"_"+E].b){let N=d[M+"_"+E].b.style,L=d[M+"_"+E].b.color;I.style[N]==null?I.style[N]=1:I.style[N]=I.style[N]+1,I.color[L]==null?I.color[L]=1:I.color[L]=I.color[L]+1}if(E==k&&d[M+"_"+E]&&d[M+"_"+E].l){let N=d[v+"_"+k].l.style,L=d[M+"_"+E].l.color;T.style[N]==null?T.style[N]=1:T.style[N]=T.style[N]+1,T.color[L]==null?T.color[L]=1:T.color[L]=T.color[L]+1}if(E==k+m[v][k].mc.cs-1&&d[M+"_"+E]&&d[M+"_"+E].r){let N=d[M+"_"+E].r.style,L=d[M+"_"+E].r.color;A.style[N]==null?A.style[N]=1:A.style[N]=A.style[N]+1,A.color[L]==null?A.color[L]=1:A.color[L]=A.color[L]+1}}let F=m[v][k].mc.rs,z=m[v][k].mc.cs;if(JSON.stringify(T).length>23){let M=null,E=null;for(let N in T.color)T.color[N]>=F/2&&(M=N);for(let N in T.style)T.style[N]>=F/2&&(E=N);M!=null&&E!=null&&(x+="border-left:"+u.getHtmlBorderStyle(E,M))}if(JSON.stringify(A).length>23){let M=null,E=null;for(let N in A.color)A.color[N]>=F/2&&(M=N);for(let N in A.style)A.style[N]>=F/2&&(E=N);M!=null&&E!=null&&(x+="border-right:"+u.getHtmlBorderStyle(E,M))}if(JSON.stringify(R).length>23){let M=null,E=null;for(let N in R.color)R.color[N]>=z/2&&(M=N);for(let N in R.style)R.style[N]>=z/2&&(E=N);M!=null&&E!=null&&(x+="border-top:"+u.getHtmlBorderStyle(E,M))}if(JSON.stringify(I).length>23){let M=null,E=null;for(let N in I.color)I.color[N]>=z/2&&(M=N);for(let N in I.style)I.style[N]>=z/2&&(E=N);M!=null&&E!=null&&(x+="border-bottom:"+u.getHtmlBorderStyle(E,M))}}}else continue;else if(d&&d[v+"_"+k]){if(d[v+"_"+k].l){let T=d[v+"_"+k].l.style,A=d[v+"_"+k].l.color;x+="border-left:"+u.getHtmlBorderStyle(T,A)}if(d[v+"_"+k].r){let T=d[v+"_"+k].r.style,A=d[v+"_"+k].r.color;x+="border-right:"+u.getHtmlBorderStyle(T,A)}if(d[v+"_"+k].b){let T=d[v+"_"+k].b.style,A=d[v+"_"+k].b.color;x+="border-bottom:"+u.getHtmlBorderStyle(T,A)}if(d[v+"_"+k].t){let T=d[v+"_"+k].t.style,A=d[v+"_"+k].t.color;x+="border-top:"+u.getHtmlBorderStyle(T,A)}}w=_e(w,{style:x,span:C}),_==null&&(_=ze(v,k,m)),_==null&&m[v][k]&&m[v][k].ct&&m[v][k].ct.t=="inlineStr"&&(_=m[v][k].ct.s.map(T=>{let A=$('<br style="mso-data-placement:same-cell;">');return T.v.split(`\r |
| | | `).map(I=>{if(!I)return"";let F=$("<font></font>");return T.fs&&F.css("font-size",`${T.fs}pt`),T.bl&&F.css("font-weight","bold"),T.it&&F.css("font-style","italic"),T.un&&F.css("text-decoration","underline"),T.fc&&F.css("color",T.fc),T.cl?F.append(`<s>${I}</s>`):F.text(I),F[0].outerHTML}).join(A[0].outerHTML)}).join("")),_==null&&(_=""),_=p.ltGtSignDeal(_),w+=_}else{let x="";if(d&&d[v+"_"+k]){if(d[v+"_"+k].l){let C=d[v+"_"+k].l.style,S=d[v+"_"+k].l.color;x+="border-left:"+u.getHtmlBorderStyle(C,S)}if(d[v+"_"+k].r){let C=d[v+"_"+k].r.style,S=d[v+"_"+k].r.color;x+="border-right:"+u.getHtmlBorderStyle(C,S)}if(d[v+"_"+k].b){let C=d[v+"_"+k].b.style,S=d[v+"_"+k].b.color;x+="border-bottom:"+u.getHtmlBorderStyle(C,S)}if(d[v+"_"+k].t){let C=d[v+"_"+k].t.style,S=d[v+"_"+k].t.color;x+="border-top:"+u.getHtmlBorderStyle(C,S)}}w+="",w=_e(w,{style:x,span:""}),w+=""}w+="</td>",f+=w}f+="</tr>"}}if(f=`<table data-type="luckysheet_copy_action_table"><colgroup>${g}</colgroup>`+f+"</table>",h.iscopyself=!0,n)return n.setData("Text",f),!1;{let y=$("#luckysheet-copy-content");y.html(f),y.focus(),y.select(),document.execCommand("selectAll"),document.execCommand("Copy"),setTimeout(function(){$("#luckysheet-copy-content").blur()},10)}},copybyformat:function(e,n){let t=window.clipboardData;t||(t=e.originalEvent&&e.originalEvent.clipboardData),h.luckysheet_selection_range=[{row:h.luckysheet_select_save[0].row,column:h.luckysheet_select_save[0].column}],Ot();let l=n;if(h.iscopyself=!0,t)return t.setData("Text",l),!1;{let a=$("#luckysheet-copy-content");a.text(l),a.focus(),a.select(),document.execCommand("selectAll"),document.execCommand("Copy"),setTimeout(function(){a.blur()},10)}},isPasteAction:!1,paste:function(e,n){let t=this;if(h.allowEdit===!1)return;let a=Q().drag,o=$("#luckysheet-copy-content");o.focus(),o.select(),setTimeout(function(){let s=o.html();s.indexOf("luckysheet_copy_action_table")>-1&&h.luckysheet_copy_save.copyRange!=null&&h.luckysheet_copy_save.copyRange.length>0?h.luckysheet_paste_iscut?(h.luckysheet_paste_iscut=!1,t.pasteHandlerOfCutPaste(h.luckysheet_copy_save),t.clearcopy(e)):t.pasteHandlerOfCopyPaste(h.luckysheet_copy_save):s.indexOf("luckysheet_copy_action_image")>-1?Re.pasteImgItem():n!="btn"?t.pasteHandler(s):de()?alert(a.pasteMustKeybordAlert):U.info(a.pasteMustKeybordAlertHTMLTitle,a.pasteMustKeybordAlertHTML)},10)},pasteHandler:function(e,n){if(!vr(h.luckysheet_select_save,h.currentSheetIndex)||h.allowEdit===!1)return;let l=Q().paste;if(h.luckysheet_select_save.length>1&&(de()?alert(l.errorNotAllowMulti):U.info(`<i class="fa fa-exclamation-triangle"></i>${l.warning}`,l.errorNotAllowMulti)),typeof e=="object"){if(e.length==0)return;let a=$.extend(!0,{},h.config);a.merge==null&&(a.merge={}),JSON.stringify(n).length>2&&a.borderInfo==null&&(a.borderInfo=[]);let o=e.length,s=e[0].length,u=h.luckysheet_select_save[0].row[0],d=u+o-1,f=h.luckysheet_select_save[0].column[0],m=f+s-1,g=!1;if(a.merge!=null&&(g=Mt(a,u,d,f,m)),g){de()?alert(l.errorNotAllowMerged):U.info(`<i class="fa fa-exclamation-triangle"></i>${l.warning}`,l.errorNotAllowMerged);return}let y=xe.deepCopyFlowData(h.flowdata),v=y.length,b=y[0].length,k=d-v+1,w=m-b+1;(k>0||w>0)&&(y=cl([].concat(y),k,w,!0)),a.rowlen==null&&(a.rowlen={});let x=!1,C={};for(let S=u;S<=d;S++){let _=[].concat(y[S]),T=h.defaultrowlen;a.rowlen[S]!=null&&(T=a.rowlen[S]);for(let A=f;A<=m;A++){P(_[A])=="object"&&"mc"in _[A]&&("rs"in _[A].mc&&delete a.merge[_[A].mc.r+"_"+_[A].mc.c],delete _[A].mc);let R=null;if(e[S-u]!=null&&e[S-u][A-f]!=null&&(R=e[S-u][A-f]),_[A]=$.extend(!0,{},R),R!=null&&"mc"in _[A]&&(_[A].mc.rs!=null?(_[A].mc.r=S,_[A].mc.c=A,a.merge[_[A].mc.r+"_"+_[A].mc.c]=_[A].mc,C[R.mc.r+"_"+R.mc.c]=[_[A].mc.r,_[A].mc.c]):_[A]={mc:{r:C[R.mc.r+"_"+R.mc.c][0],c:C[R.mc.r+"_"+R.mc.c][1]}}),n[S-u+"_"+(A-f)]){let z={rangeType:"cell",value:{row_index:S,col_index:A,l:n[S-u+"_"+(A-f)].l,r:n[S-u+"_"+(A-f)].r,t:n[S-u+"_"+(A-f)].t,b:n[S-u+"_"+(A-f)].b}};a.borderInfo.push(z)}let I=oa(_[A]),F=ke.getTextSize("\u7530",I)[1];F>T&&(T=F,x=!0)}y[S]=_,T!=h.defaultrowlen&&(a.rowlen[S]=T)}if(h.luckysheet_select_save=[{row:[u,d],column:[f,m]}],k>0||w>0||x){let S={cfg:a,RowlChange:!0};Ze(y,h.luckysheet_select_save,S)}else{let S={cfg:a};Ze(y,h.luckysheet_select_save,S),lt()}}else{e=e.replace(/\r/g,"");let a=[],o=e.split(` |
| | | `),s=o[0].split(" ").length;for(let w=0;w<o.length;w++)o[w].split(" ").length<s||a.push(o[w].split(" "));let u=xe.deepCopyFlowData(h.flowdata),d=h.luckysheet_select_save[h.luckysheet_select_save.length-1],f=d.row==null?0:d.row[0],m=d.column==null?0:d.column[0],g=a.length,y=a[0].length,v=!1;if(h.config.merge!=null&&(v=Mt(h.config,f,f+g-1,m,m+y-1)),v){de()?alert(l.errorNotAllowMerged):U.info(`<i class="fa fa-exclamation-triangle"></i>${l.warning}`,l.errorNotAllowMerged);return}let b=f+g-u.length,k=m+y-u[0].length;(b>0||k>0)&&(u=cl([].concat(u),b,k,!0));for(let w=0;w<g;w++){let x=[].concat(u[w+f]);for(let C=0;C<y;C++){let S=x[C+m],_=a[w][C];if(B(_)&&(S&&S.ct&&S.ct.fa==="@"?_=String(_):_=parseFloat(_)),S instanceof Object)S.v=_,S.ct!=null&&S.ct.fa!=null?S.m=mt(S.ct.fa,_):S.m=_,S.f!=null&&S.f.length>0&&(S.f="",p.delFunctionGroup(w+f,C+m,h.currentSheetIndex));else{let T={},A=at(_);T.v=A[2],T.ct=A[1],T.m=A[0],x[C+m]=T}}u[w+f]=x}if(d.row=[f,f+g-1],d.column=[m,m+y-1],b>0||k>0){let w={RowlChange:!0};Ze(u,h.luckysheet_select_save,w)}else Ze(u,h.luckysheet_select_save),lt()}},pasteHandlerOfCutPaste:function(e){if(!vr(h.luckysheet_select_save,h.currentSheetIndex)||h.allowEdit===!1)return;let t=Q().paste,l=$.extend(!0,{},h.config);l.merge==null&&(l.merge={});let a=e.HasMC,o=e.RowlChange,s=e.dataSheetIndex,u=e.copyRange[0].row[0],d=e.copyRange[0].row[1],f=e.copyRange[0].column[0],m=e.copyRange[0].column[1],g=$.extend(!0,[],Pt({row:[u,d],column:[f,m]},s)),y=g.length,v=g[0].length,b=h.luckysheet_select_save[h.luckysheet_select_save.length-1],k=b.row_focus,w=k+y-1,x=b.column_focus,C=x+v-1,S=!1;if(l.merge!=null&&(S=Mt(l,k,w,x,C)),S){de()?alert(t.errorNotAllowMerged):U.info(`<i class="fa fa-exclamation-triangle"></i>${t.warning}`,t.errorNotAllowMerged);return}let _=xe.deepCopyFlowData(h.flowdata),T=_.length,A=_[0].length,R=y+k-T,I=v+x-A;(R>0||I>0)&&(_=cl([].concat(_),R,I,!0));let F=Gr(s),z=$.extend(!0,{},h.luckysheetfile[Z(s)].dataVerification),M=$.extend(!0,{},h.luckysheetfile[Z(h.currentSheetIndex)].dataVerification);if(h.currentSheetIndex==s){for(let O=u;O<=d;O++)for(let V=f;V<=m;V++){let q=_[O][V];P(q)=="object"&&"mc"in q&&("rs"in q.mc&&delete l.merge[q.mc.r+"_"+q.mc.c],delete q.mc),_[O][V]=null,delete M[O+"_"+V]}if(l.borderInfo&&l.borderInfo.length>0){let O=[];for(let V=0;V<l.borderInfo.length;V++){let q=l.borderInfo[V].rangeType;if(q=="range"){let W=l.borderInfo[V].range,X=[];for(let te=0;te<W.length;te++)X=X.concat($e.CFSplitRange(W[te],{row:[u,d],column:[f,m]},{row:[k,w],column:[x,C]},"restPart"));l.borderInfo[V].range=X,O.push(l.borderInfo[V])}else if(q=="cell"){let W=l.borderInfo[V].value.row_index,X=l.borderInfo[V].value.col_index;W>=u&&W<=d&&X>=f&&X<=m||O.push(l.borderInfo[V])}}l.borderInfo=O}}let E={};for(let O=k;O<=w;O++){let V=[].concat(_[O]);for(let q=x;q<=C;q++){if(F[u+O-k+"_"+(f+q-x)]){let X={rangeType:"cell",value:{row_index:O,col_index:q,l:F[u+O-k+"_"+(f+q-x)].l,r:F[u+O-k+"_"+(f+q-x)].r,t:F[u+O-k+"_"+(f+q-x)].t,b:F[u+O-k+"_"+(f+q-x)].b}};l.borderInfo==null&&(l.borderInfo=[]),l.borderInfo.push(X)}else if(F[O+"_"+q]){let X={rangeType:"cell",value:{row_index:O,col_index:q,l:null,r:null,t:null,b:null}};l.borderInfo==null&&(l.borderInfo=[]),l.borderInfo.push(X)}z[u+O-k+"_"+(f+q-x)]&&(M[O+"_"+q]=z[u+O-k+"_"+(f+q-x)]),P(V[q])=="object"&&"mc"in V[q]&&("rs"in V[q].mc&&delete l.merge[V[q].mc.r+"_"+V[q].mc.c],delete V[q].mc);let W=null;g[O-k]!=null&&g[O-k][q-x]!=null&&(W=g[O-k][q-x]),V[q]=$.extend(!0,{},W),W!=null&&a&&"mc"in V[q]&&(V[q].mc.rs!=null?(V[q].mc.r=O,V[q].mc.c=q,l.merge[V[q].mc.r+"_"+V[q].mc.c]=V[q].mc,E[W.mc.r+"_"+W.mc.c]=[V[q].mc.r,V[q].mc.c]):V[q]={mc:{r:E[W.mc.r+"_"+W.mc.c][0],c:E[W.mc.r+"_"+W.mc.c][1]}})}_[O]=V}b.row=[k,w],b.column=[x,C],o&&(h.currentSheetIndex!=s?l=yl(_,k,w,l):(l=yl(_,u,d,l),l=yl(_,k,w,l)));let N,L;if(h.currentSheetIndex!=s){let O=$.extend(!0,[],h.luckysheetfile[Z(s)].data),V=$.extend(!0,{},h.luckysheetfile[Z(s)].config),q=$.extend(!0,[],O),W=$.extend(!0,{},V);W.merge==null&&(W.merge={});for(let ce=u;ce<=d;ce++)for(let he=f;he<=m;he++){let ue=q[ce][he];P(ue)=="object"&&"mc"in ue&&("rs"in ue.mc&&delete W.merge[ue.mc.r+"_"+ue.mc.c],delete ue.mc),q[ce][he]=null}if(o&&(W=yl(q,u,d,W)),W.borderInfo&&W.borderInfo.length>0){let ce=[];for(let he=0;he<W.borderInfo.length;he++){let ue=W.borderInfo[he].rangeType;if(ue=="range"){let K=W.borderInfo[he].range,G=[];for(let ee=0;ee<K.length;ee++)G=G.concat($e.CFSplitRange(K[ee],{row:[u,d],column:[f,m]},{row:[k,w],column:[x,C]},"restPart"));W.borderInfo[he].range=G,ce.push(W.borderInfo[he])}else if(ue=="cell"){let K=W.borderInfo[he].value.row_index,G=W.borderInfo[he].value.col_index;K>=u&&K<=d&&G>=f&&G<=m||ce.push(W.borderInfo[he])}}W.borderInfo=ce}let X=$.extend(!0,[],h.luckysheetfile[Z(s)].luckysheet_conditionformat_save),te=$.extend(!0,[],X),le=[];if(te!=null&&te.length>0)for(let ce=0;ce<te.length;ce++){let he=te[ce].cellrange,ue=[],K=[];for(let G=0;G<he.length;G++){let ee=$e.CFSplitRange(he[G],{row:[u,d],column:[f,m]},{row:[k,w],column:[x,C]},"restPart");ue=ue.concat(ee);let pe=$e.CFSplitRange(he[G],{row:[u,d],column:[f,m]},{row:[k,w],column:[x,C]},"operatePart");pe.length>0&&(K=K.concat(pe))}if(te[ce].cellrange=ue,K.length>0){let G=$.extend(!0,{},te[ce]);G.cellrange=K,le.push(G)}}let oe=$.extend(!0,[],h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save),se=$.extend(!0,[],oe);le.length>0&&(se=se.concat(le));for(let ce=u;ce<=d;ce++)for(let he=f;he<=m;he++)delete z[ce+"_"+he];N={sheetIndex:s,data:O,curData:q,config:V,curConfig:W,cdformat:X,curCdformat:te,dataVerification:$.extend(!0,{},h.luckysheetfile[Z(s)].dataVerification),curDataVerification:z,range:{row:[u,d],column:[f,m]}},L={sheetIndex:h.currentSheetIndex,data:h.flowdata,curData:_,config:$.extend(!0,{},h.config),curConfig:l,cdformat:oe,curCdformat:se,dataVerification:$.extend(!0,{},h.luckysheetfile[Z(h.currentSheetIndex)].dataVerification),curDataVerification:M,range:{row:[k,w],column:[x,C]}}}else{let O=$.extend(!0,[],h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save),V=$.extend(!0,[],O);if(V!=null&&V.length>0)for(let q=0;q<V.length;q++){let W=V[q].cellrange,X=[];for(let te=0;te<W.length;te++){let le=$e.CFSplitRange(W[te],{row:[u,d],column:[f,m]},{row:[k,w],column:[x,C]},"allPart");X=X.concat(le)}V[q].cellrange=X}N={sheetIndex:h.currentSheetIndex,data:h.flowdata,curData:_,config:$.extend(!0,{},h.config),curConfig:l,cdformat:O,curCdformat:V,dataVerification:$.extend(!0,{},h.luckysheetfile[Z(h.currentSheetIndex)].dataVerification),curDataVerification:M,range:{row:[u,d],column:[f,m]}},L={sheetIndex:h.currentSheetIndex,data:h.flowdata,curData:_,config:$.extend(!0,{},h.config),curConfig:l,cdformat:O,curCdformat:V,dataVerification:$.extend(!0,{},h.luckysheetfile[Z(h.currentSheetIndex)].dataVerification),curDataVerification:M,range:{row:[k,w],column:[x,C]}}}R>0||I>0?Ga(N,L,!0):Ga(N,L,o)},pasteHandlerOfCopyPaste:function(e){if(!vr(h.luckysheet_select_save,h.currentSheetIndex))return;let t=Q().paste,l=$.extend(!0,{},h.config);l.merge==null&&(l.merge={});let a=e.HasMC,o=e.RowlChange,s=e.dataSheetIndex,u=e.copyRange[0].row[0],d=e.copyRange[0].row[1],f=e.copyRange[0].column[0],m=e.copyRange[0].column[1],g=[],y=!1;for(let se=0;se<e.copyRange.length;se++){let ce=Pt({row:e.copyRange[se].row,column:e.copyRange[se].column},s);e.copyRange.length>1?u==e.copyRange[1].row[0]&&d==e.copyRange[1].row[1]?(ce=ce[0].map(function(he,ue){return ce.map(function(K){return K[ue]})}),g=g.concat(ce),y=!0):f==e.copyRange[1].column[0]&&m==e.copyRange[1].column[1]&&(g=g.concat(ce)):g=ce}y&&(g=g[0].map(function(se,ce){return g.map(function(he){return he[ce]})}));let v=$.extend(!0,[],g);if(e.copyRange.length>1)for(let se=0;se<v.length;se++)for(let ce=0;ce<v[se].length;ce++)v[se][ce]!=null&&v[se][ce].f!=null&&(delete v[se][ce].f,delete v[se][ce].spl);let b=v.length,k=v[0].length,w=h.luckysheet_select_save[h.luckysheet_select_save.length-1],x=w.row[0],C=w.row[1],S=w.column[0],_=w.column[1],T=(C-x+1)%b,A=(_-S+1)%k;(T!=0||A!=0)&&(C=x+b-1,_=S+k-1);let R=!1;if(l.merge!=null&&(R=Mt(l,x,C,S,_)),R){de()?alert(t.errorNotAllowMerged):U.info(`<i class="fa fa-exclamation-triangle"></i>${t.warning}`,t.errorNotAllowMerged);return}let I=(C-x+1)/b,F=(_-S+1)/k,z=xe.deepCopyFlowData(h.flowdata),M=z.length,E=z[0].length,N=b+x-M,L=k+S-E;(N>0||L>0)&&(z=cl([].concat(z),N,L,!0));let O=Gr(s),V=$.extend(!0,{},h.luckysheetfile[Z(s)].dataVerification),q=null,W=0,X=0,te=0,le=0;for(let se=1;se<=I;se++)for(let ce=1;ce<=F;ce++){W=x+(se-1)*b,X=S+(ce-1)*k,le=x+se*b,te=S+ce*k;let he=W-u,ue=X-f,K={};for(let G=W;G<le;G++){let ee=[].concat(z[G]);for(let pe=X;pe<te;pe++){if(O[u+G-W+"_"+(f+pe-X)]){let Te={rangeType:"cell",value:{row_index:G,col_index:pe,l:O[u+G-W+"_"+(f+pe-X)].l,r:O[u+G-W+"_"+(f+pe-X)].r,t:O[u+G-W+"_"+(f+pe-X)].t,b:O[u+G-W+"_"+(f+pe-X)].b}};l.borderInfo==null&&(l.borderInfo=[]),l.borderInfo.push(Te)}else if(O[G+"_"+pe]){let Te={rangeType:"cell",value:{row_index:G,col_index:pe,l:null,r:null,t:null,b:null}};l.borderInfo==null&&(l.borderInfo=[]),l.borderInfo.push(Te)}V[u+G-W+"_"+(f+pe-X)]&&(q==null&&(q=$.extend(!0,{},h.luckysheetfile[Z(h.currentSheetIndex)].dataVerification)),q[G+"_"+pe]=V[u+G-W+"_"+(f+pe-X)]),P(ee[pe])=="object"&&"mc"in ee[pe]&&("rs"in ee[pe].mc&&delete l.merge[ee[pe].mc.r+"_"+ee[pe].mc.c],delete ee[pe].mc);let ae=null;if(v[G-W]!=null&&v[G-W][pe-X]!=null&&(ae=$.extend(!0,{},v[G-W][pe-X])),ae!=null&&ae.f!=null){let Te=ae.f;he>0&&(Te="="+p.functionCopy(Te,"down",he)),he<0&&(Te="="+p.functionCopy(Te,"up",Math.abs(he))),ue>0&&(Te="="+p.functionCopy(Te,"right",ue)),ue<0&&(Te="="+p.functionCopy(Te,"left",Math.abs(ue)));let ie=p.execfunction(Te,G,pe,void 0,!0);ae.spl!=null?(ae.f=ie[2],ae.v=ie[1],ae.spl=ie[3].data):(ae.f=ie[2],ae.v=ie[1],ae.ct!=null&&ae.ct.fa!=null&&(ae.m=mt(ae.ct.fa,ie[1])))}ee[pe]=$.extend(!0,{},ae),ae!=null&&a&&"mc"in ee[pe]&&(ee[pe].mc.rs!=null?(ee[pe].mc.r=G,ee[pe].mc.c=pe,l.merge[ee[pe].mc.r+"_"+ee[pe].mc.c]=ee[pe].mc,K[ae.mc.r+"_"+ae.mc.c]=[ee[pe].mc.r,ee[pe].mc.c]):ee[pe]={mc:{r:K[ae.mc.r+"_"+ae.mc.c][0],c:K[ae.mc.r+"_"+ae.mc.c][1]}})}z[G]=ee}}let oe=null;if(e.copyRange.length==1){let se=h.luckysheetfile[Z(s)],ce=h.luckysheetfile[Z(h.currentSheetIndex)],he=$.extend(!0,[],se.luckysheet_conditionformat_save);if(he!=null&&he.length>0){oe=$.extend(!0,[],ce.luckysheet_conditionformat_save);for(let ue=0;ue<he.length;ue++){let K=he[ue].cellrange,G=[];for(let ee=1;ee<=I;ee++)for(let pe=1;pe<=F;pe++){W=x+(ee-1)*b,X=S+(pe-1)*k,le=x+ee*b,te=S+pe*k;for(let ae=0;ae<K.length;ae++){let Te=$e.CFSplitRange(K[ae],{row:[u,d],column:[f,m]},{row:[W,le-1],column:[X,te-1]},"operatePart");Te.length>0&&(G=G.concat(Te))}}G.length>0&&(he[ue].cellrange=G,oe.push(he[ue]))}}}if(w.row=[x,C],w.column=[S,_],o||N>0||L>0){l=yl(z,x,C,l);let se={cfg:l,RowlChange:!0,cdformat:oe,dataVerification:q};Ze(z,h.luckysheet_select_save,se)}else{let se={cfg:l,cdformat:oe,dataVerification:q};Ze(z,h.luckysheet_select_save,se),lt()}},pasteHandlerOfPaintModel:function(e){if(!vr(h.luckysheet_select_save,h.currentSheetIndex))return;let t=Q().paste,l=$.extend(!0,{},h.config);l.merge==null&&(l.merge={});let a=e.HasMC,o=e.RowlChange,s=e.dataSheetIndex,u=e.copyRange[0].row[0],d=e.copyRange[0].row[1],f=e.copyRange[0].column[0],m=e.copyRange[0].column[1],g=$.extend(!0,[],Pt({row:[u,d],column:[f,m]},s)),y=h.luckysheet_select_save[h.luckysheet_select_save.length-1],v=y.row[0],b=y.row[1],k=y.column[0],w=y.column[1],x=g.length,C=g[0].length;if(v==b&&k==w){let q=!1;if(l.merge!=null&&(q=Mt(l,v,v+x-1,k,k+C-1)),q){de()?alert(t.errorNotAllowMerged):U.info(`<i class="fa fa-exclamation-triangle"></i>${t.warning}`,t.errorNotAllowMerged);return}b=v+x-1,w=k+C-1}let S=Math.ceil((b-v+1)/x),_=Math.ceil((w-k+1)/C),T=xe.deepCopyFlowData(h.flowdata),A=T[0].length,R=T.length,I=Gr(s),F=$.extend(!0,{},h.luckysheetfile[Z(s)].dataVerification),z=null,M=0,E=0,N=0,L=0;for(let q=1;q<=S;q++)for(let W=1;W<=_;W++){M=v+(q-1)*x,E=k+(W-1)*C,L=v+q*x>R?R:v+q*x,L>b+1&&(L=b+1),N=k+W*C>A?A:k+W*C,N>w+1&&(N=w+1);let X={};for(let te=M;te<L;te++){let le=[].concat(T[te]);for(let oe=E;oe<N;oe++){if(I[u+te-M+"_"+(f+oe-E)]){let ce={rangeType:"cell",value:{row_index:te,col_index:oe,l:I[u+te-M+"_"+(f+oe-E)].l,r:I[u+te-M+"_"+(f+oe-E)].r,t:I[u+te-M+"_"+(f+oe-E)].t,b:I[u+te-M+"_"+(f+oe-E)].b}};l.borderInfo==null&&(l.borderInfo=[]),l.borderInfo.push(ce)}else if(I[te+"_"+oe]){let ce={rangeType:"cell",value:{row_index:te,col_index:oe,l:null,r:null,t:null,b:null}};l.borderInfo==null&&(l.borderInfo=[]),l.borderInfo.push(ce)}F[u+te-M+"_"+(f+oe-E)]&&(z==null&&(z=$.extend(!0,{},h.luckysheetfile[Z(h.currentSheetIndex)].dataVerification)),z[te+"_"+oe]=F[u+te-M+"_"+(f+oe-E)]),P(le[oe])=="object"&&"mc"in le[oe]&&("rs"in le[oe].mc&&delete l.merge[le[oe].mc.r+"_"+le[oe].mc.c],delete le[oe].mc);let se=null;if(g[te-M]!=null&&g[te-M][oe-E]!=null&&(se=g[te-M][oe-E]),se!=null&&(delete se.v,delete se.m,delete se.f,delete se.spl,se.ct&&se.ct.t=="inlineStr"&&delete se.ct,P(le[oe])=="object"?le[oe].ct&&le[oe].ct.t==="inlineStr"?delete se.ct:["bg","fc","ct","ht","vt","bl","it","cl","un","fs","ff","tb"].forEach(he=>{Reflect.deleteProperty(le[oe],he)}):le[oe]={v:le[oe]},le[oe]=$.extend(!0,le[oe],se),le[oe].ct&&le[oe].ct.t==="inlineStr"&&le[oe].ct.s.forEach(ce=>ce=$.extend(!0,ce,se)),a&&"mc"in le[oe]&&(le[oe].mc.rs!=null?(le[oe].mc.r=te,le[oe].mc.rs+te>=L&&(le[oe].mc.rs=L-te),le[oe].mc.c=oe,le[oe].mc.cs+oe>=N&&(le[oe].mc.cs=N-oe),l.merge[le[oe].mc.r+"_"+le[oe].mc.c]=le[oe].mc,X[se.mc.r+"_"+se.mc.c]=[le[oe].mc.r,le[oe].mc.c]):le[oe]={mc:{r:X[se.mc.r+"_"+se.mc.c][0],c:X[se.mc.r+"_"+se.mc.c][1]}}),le[oe].v!=null&&se.ct!=null&&se.ct.fa!=null)){let ce=mt(se.ct.fa,le[oe].v);le[oe].m=ce}}T[te]=le}}let O=null,V=$.extend(!0,[],h.luckysheetfile[Z(s)].luckysheet_conditionformat_save);if(V!=null&&V.length>0){O=$.extend(!0,[],h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save);for(let q=0;q<V.length;q++){let W=V[q].cellrange,X=[];for(let te=0;te<W.length;te++){let le=$e.CFSplitRange(W[te],{row:[u,d],column:[f,m]},{row:[v,b],column:[k,w]},"operatePart");le.length>0&&(X=X.concat(le))}X.length>0&&(V[q].cellrange=[{row:[v,b],column:[k,w]}],O.push(V[q]))}}if(y.row=[v,b],y.column=[k,w],o){l=yl(T,v,b,l);let q={cfg:l,RowlChange:!0,cdformat:O,dataVerification:z};Ze(T,h.luckysheet_select_save,q)}else{b>=T.length&&(b=T.length-1),l=yl(T,v,b,l);let q={cfg:l,RowlChange:!0,cdformat:O,dataVerification:z};Ze(T,h.luckysheet_select_save,q),lt()}},matchcopy:function(e,n){let t=[],l=[],a,o;if(typeof e=="object")t=e;else{t=e.split(` |
| | | <div class="title">${n.setFormat}: </div>${t}`;break}return l},daterangeInit:function(e){let n=Q().conditionformat;$(".ranges_1 ul").remove(),$("#"+e).find("#daterange-btn").flatpickr({mode:"range",onChange:function(t,l){let[a,o]=t,s=[n.yesterday,n.today],u=[n.lastWeek,n.thisWeek,n.lastMonth,n.thisMonth,n.lastYear,n.thisYear,n.last7days,n.last30days];l==n.all?$("#daterange-btn").val(""):s.indexOf(l)>-1?$("#daterange-btn").val((0,To.default)(a).format("YYYY/MM/DD")):u.indexOf(l)>-1&&$("#daterange-btn").val((0,To.default)(a).format("YYYY/MM/DD")+"-"+(0,To.default)(o).format("YYYY/MM/DD"))}})},CFSplitRange:function(e,n,t,l){let a=[],o=t.row[0]-n.row[0],s=t.column[0]-n.column[0],u=e.row[0],f=e.row[1],d=e.column[0],m=e.column[1];return u>=n.row[0]&&f<=n.row[1]&&d>=n.column[0]&&m<=n.column[1]?l=="allPart"?a=[{row:[u+o,f+o],column:[d+s,m+s]}]:l=="restPart"?a=[]:l=="operatePart"&&(a=[{row:[u+o,f+o],column:[d+s,m+s]}]):u>=n.row[0]&&u<=n.row[1]&&d>=n.column[0]&&m<=n.column[1]?l=="allPart"?a=[{row:[n.row[1]+1,f],column:[d,m]},{row:[u+o,n.row[1]+o],column:[d+s,m+s]}]:l=="restPart"?a=[{row:[n.row[1]+1,f],column:[d,m]}]:l=="operatePart"&&(a=[{row:[u+o,n.row[1]+o],column:[d+s,m+s]}]):f>=n.row[0]&&f<=n.row[1]&&d>=n.column[0]&&m<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[0]+o,f+o],column:[d+s,m+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[d,m]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,f+o],column:[d+s,m+s]}]):u<n.row[0]&&f>n.row[1]&&d>=n.column[0]&&m<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[1]+1,f],column:[d,m]},{row:[n.row[0]+o,n.row[1]+o],column:[d+s,m+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[1]+1,f],column:[d,m]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,n.row[1]+o],column:[d+s,m+s]}]):d>=n.column[0]&&d<=n.column[1]&&u>=n.row[0]&&f<=n.row[1]?l=="allPart"?a=[{row:[u,f],column:[n.column[1]+1,m]},{row:[u+o,f+o],column:[d+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,f],column:[n.column[1]+1,m]}]:l=="operatePart"&&(a=[{row:[u+o,f+o],column:[d+s,n.column[1]+s]}]):m>=n.column[0]&&m<=n.column[1]&&u>=n.row[0]&&f<=n.row[1]?l=="allPart"?a=[{row:[u,f],column:[d,n.column[0]-1]},{row:[u+o,f+o],column:[n.column[0]+s,m+s]}]:l=="restPart"?a=[{row:[u,f],column:[d,n.column[0]-1]}]:l=="operatePart"&&(a=[{row:[u+o,f+o],column:[n.column[0]+s,m+s]}]):d<n.column[0]&&m>n.column[1]&&u>=n.row[0]&&f<=n.row[1]?l=="allPart"?a=[{row:[u,f],column:[d,n.column[0]-1]},{row:[u,f],column:[n.column[1]+1,m]},{row:[u+o,f+o],column:[n.column[0]+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,f],column:[d,n.column[0]-1]},{row:[u,f],column:[n.column[1]+1,m]}]:l=="operatePart"&&(a=[{row:[u+o,f+o],column:[n.column[0]+s,n.column[1]+s]}]):u>=n.row[0]&&u<=n.row[1]&&d>=n.column[0]&&d<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,f],column:[d,m]},{row:[u+o,n.row[1]+o],column:[d+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,f],column:[d,m]}]:l=="operatePart"&&(a=[{row:[u+o,n.row[1]+o],column:[d+s,n.column[1]+s]}]):u>=n.row[0]&&u<=n.row[1]&&m>=n.column[0]&&m<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[1]],column:[d,n.column[0]-1]},{row:[n.row[1]+1,f],column:[d,m]},{row:[u+o,n.row[1]+o],column:[n.column[0]+s,m+s]}]:l=="restPart"?a=[{row:[u,n.row[1]],column:[d,n.column[0]-1]},{row:[n.row[1]+1,f],column:[d,m]}]:l=="operatePart"&&(a=[{row:[u+o,n.row[1]+o],column:[n.column[0]+s,m+s]}]):f>=n.row[0]&&f<=n.row[1]&&d>=n.column[0]&&d<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[0],f],column:[n.column[1]+1,m]},{row:[n.row[0]+o,f+o],column:[d+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[0],f],column:[n.column[1]+1,m]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,f+o],column:[d+s,n.column[1]+s]}]):f>=n.row[0]&&f<=n.row[1]&&m>=n.column[0]&&m<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[0],f],column:[d,n.column[0]-1]},{row:[n.row[0]+o,f+o],column:[n.column[0]+s,m+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[0],f],column:[d,n.column[0]-1]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,f+o],column:[n.column[0]+s,m+s]}]):u<n.row[0]&&f>n.row[1]&&d>=n.column[0]&&d<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[0],n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,f],column:[d,m]},{row:[n.row[0]+o,n.row[1]+o],column:[d+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[0],n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,f],column:[d,m]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,n.row[1]+o],column:[d+s,n.column[1]+s]}]):u<n.row[0]&&f>n.row[1]&&m>=n.column[0]&&m<=n.column[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[0],n.row[1]],column:[d,n.column[0]-1]},{row:[n.row[1]+1,f],column:[d,m]},{row:[n.row[0]+o,n.row[1]+o],column:[n.column[0]+s,m+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[0],n.row[1]],column:[d,n.column[0]-1]},{row:[n.row[1]+1,f],column:[d,m]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,n.row[1]+o],column:[n.column[0]+s,m+s]}]):d<n.column[0]&&m>n.column[1]&&u>=n.row[0]&&u<=n.row[1]?l=="allPart"?a=[{row:[u,n.row[1]],column:[d,n.column[0]-1]},{row:[u,n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,f],column:[d,m]},{row:[u+o,n.row[1]+o],column:[n.column[0]+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,n.row[1]],column:[d,n.column[0]-1]},{row:[u,n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,f],column:[d,m]}]:l=="operatePart"&&(a=[{row:[u+o,n.row[1]+o],column:[n.column[0]+s,n.column[1]+s]}]):d<n.column[0]&&m>n.column[1]&&f>=n.row[0]&&f<=n.row[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[0],f],column:[d,n.column[0]-1]},{row:[n.row[0],f],column:[n.column[1]+1,m]},{row:[n.row[0]+o,f+o],column:[n.column[0]+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[0],f],column:[d,n.column[0]-1]},{row:[n.row[0],f],column:[n.column[1]+1,m]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,f+o],column:[n.column[0]+s,n.column[1]+s]}]):u<n.row[0]&&f>n.row[1]&&d<n.column[0]&&m>n.column[1]?l=="allPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[0],n.row[1]],column:[d,n.column[0]-1]},{row:[n.row[0],n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,f],column:[d,m]},{row:[n.row[0]+o,n.row[1]+o],column:[n.column[0]+s,n.column[1]+s]}]:l=="restPart"?a=[{row:[u,n.row[0]-1],column:[d,m]},{row:[n.row[0],n.row[1]],column:[d,n.column[0]-1]},{row:[n.row[0],n.row[1]],column:[n.column[1]+1,m]},{row:[n.row[1]+1,f],column:[d,m]}]:l=="operatePart"&&(a=[{row:[n.row[0]+o,n.row[1]+o],column:[n.column[0]+s,n.column[1]+s]}]):l=="allPart"?a=[{row:[u,f],column:[d,m]}]:l=="restPart"?a=[{row:[u,f],column:[d,m]}]:l=="operatePart"&&(a=[]),a},getcolorGradation:function(e,n,t,l,a){let o=e.split(","),s=parseInt(o[0].split("(")[1]),u=parseInt(o[1]),f=parseInt(o[2].split(")")[0]),d=n.split(","),m=parseInt(d[0].split("(")[1]),g=parseInt(d[1]),y=parseInt(d[2].split(")")[0]),v=Math.round(s-(s-m)/(t-l)*(t-a)),b=Math.round(u-(u-g)/(t-l)*(t-a)),k=Math.round(f-(f-y)/(t-l)*(t-a));return"rgb("+v+", "+b+", "+k+")"},getCFPartRange:function(e,n,t){let l=[],a=h.luckysheetfile[Z(e)].luckysheet_conditionformat_save;if(a!=null&&a.length>0){e:for(let o=0;o<a.length;o++){let s=a[o].cellrange;for(let u=0;u<s.length;u++){let f=s[u].row[0],d=s[u].row[1],m=s[u].column[0],g=s[u].column[1];for(let y=0;y<range.length;y++)if(range[y].row[0]>=f&&range[y].row[0]<=d||range[y].row[1]>=f&&range[y].row[1]<=d||range[y].column[0]>=m&&range[y].column[0]<=g||range[y].column[1]>=m&&range[y].column[1]<=g){l.push(a[o]);continue e}}}}return l},checksCF:function(e,n,t){return t!=null&&e+"_"+n in t?t[e+"_"+n]:null},getComputeMap:function(e){let n=Z(h.currentSheetIndex);e!=null&&(n=Z(e));let t=h.luckysheetfile[n].luckysheet_conditionformat_save,l=h.luckysheetfile[n].data;return l==null?null:this.compute(t,l)},compute:function(e,n){let t=this;e==null&&(e=[]);let l={};if(e.length>0)for(let a=0;a<e.length;a++){let o=e[a].type,s=e[a].cellrange,u=e[a].format;if(o=="dataBar"){let f=null,d=null;for(let m=0;m<s.length;m++)for(let g=s[m].row[0];g<=s[m].row[1];g++)for(let y=s[m].column[0];y<=s[m].column[1];y++){if(n[g]==null||n[g][y]==null)continue;let v=n[g][y];P(v)=="object"&&v.ct!=null&&v.ct.t=="n"&&v.v!=null&&((f==null||parseInt(v.v)>f)&&(f=parseInt(v.v)),(d==null||parseInt(v.v)<d)&&(d=parseInt(v.v)))}if(f!=null&&d!=null)if(d<0){let m=Math.round(f/(f-d)*10)/10,g=Math.round(Math.abs(d)/(f-d)*10)/10;for(let y=0;y<s.length;y++)for(let v=s[y].row[0];v<=s[y].row[1];v++)for(let b=s[y].column[0];b<=s[y].column[1];b++){if(n[v]==null||n[v][b]==null)continue;let k=n[v][b];if(P(k)=="object"&&k.ct!=null&&k.ct.t=="n"&&k.v!=null){if(parseInt(k.v)<0){let w=Math.round(Math.abs(parseInt(k.v))/Math.abs(d)*100)/100;v+"_"+b in l?l[v+"_"+b].dataBar={valueType:"minus",minusLen:g,valueLen:w,format:u}:l[v+"_"+b]={dataBar:{valueType:"minus",minusLen:g,valueLen:w,format:u}}}if(parseInt(k.v)>0){let w=Math.round(parseInt(k.v)/f*100)/100;v+"_"+b in l?l[v+"_"+b].dataBar={valueType:"plus",plusLen:m,minusLen:g,valueLen:w,format:u}:l[v+"_"+b]={dataBar:{valueType:"plus",plusLen:m,minusLen:g,valueLen:w,format:u}}}}}}else{let m=1;for(let g=0;g<s.length;g++)for(let y=s[g].row[0];y<=s[g].row[1];y++)for(let v=s[g].column[0];v<=s[g].column[1];v++){if(n[y]==null||n[y][v]==null)continue;let b=n[y][v];if(P(b)=="object"&&b.ct!=null&&b.ct.t=="n"&&b.v!=null){let k;f==0?k=1:k=Math.round(parseInt(b.v)/f*100)/100,y+"_"+v in l?l[y+"_"+v].dataBar={valueType:"plus",plusLen:m,valueLen:k,format:u}:l[y+"_"+v]={dataBar:{valueType:"plus",plusLen:m,valueLen:k,format:u}}}}}}else if(o=="colorGradation"){let f=null,d=null,m=0,g=0;for(let y=0;y<s.length;y++)for(let v=s[y].row[0];v<=s[y].row[1];v++)for(let b=s[y].column[0];b<=s[y].column[1];b++){if(n[v]==null||n[v][b]==null)continue;let k=n[v][b];P(k)=="object"&&k.ct!=null&&k.ct.t=="n"&&k.v!=null&&(g++,m+=parseInt(k.v),(f==null||parseInt(k.v)>f)&&(f=parseInt(k.v)),(d==null||parseInt(k.v)<d)&&(d=parseInt(k.v)))}if(f!=null&&d!=null){if(u.length==3){let y=Math.floor(m/g);for(let v=0;v<s.length;v++)for(let b=s[v].row[0];b<=s[v].row[1];b++)for(let k=s[v].column[0];k<=s[v].column[1];k++){if(n[b]==null||n[b][k]==null)continue;let w=n[b][k];P(w)=="object"&&w.ct!=null&&w.ct.t=="n"&&w.v!=null&&(parseInt(w.v)==d?b+"_"+k in l?l[b+"_"+k].cellColor=u[2]:l[b+"_"+k]={cellColor:u[2]}:parseInt(w.v)>d&&parseInt(w.v)<y?b+"_"+k in l?l[b+"_"+k].cellColor=t.getcolorGradation(u[2],u[1],d,y,parseInt(w.v)):l[b+"_"+k]={cellColor:t.getcolorGradation(u[2],u[1],d,y,parseInt(w.v))}:parseInt(w.v)==y?b+"_"+k in l?l[b+"_"+k].cellColor=u[1]:l[b+"_"+k]={cellColor:u[1]}:parseInt(w.v)>y&&parseInt(w.v)<f?b+"_"+k in l?l[b+"_"+k].cellColor=t.getcolorGradation(u[1],u[0],y,f,parseInt(w.v)):l[b+"_"+k]={cellColor:t.getcolorGradation(u[1],u[0],y,f,parseInt(w.v))}:parseInt(w.v)==f&&(b+"_"+k in l?l[b+"_"+k].cellColor=u[0]:l[b+"_"+k]={cellColor:u[0]}))}}else if(u.length==2)for(let y=0;y<s.length;y++)for(let v=s[y].row[0];v<=s[y].row[1];v++)for(let b=s[y].column[0];b<=s[y].column[1];b++){if(n[v]==null||n[v][b]==null)continue;let k=n[v][b];P(k)=="object"&&k.ct!=null&&k.ct.t=="n"&&k.v!=null&&(parseInt(k.v)==d?v+"_"+b in l?l[v+"_"+b].cellColor=u[1]:l[v+"_"+b]={cellColor:u[1]}:parseInt(k.v)>d&&parseInt(k.v)<f?v+"_"+b in l?l[v+"_"+b].cellColor=t.getcolorGradation(u[1],u[0],d,f,parseInt(k.v)):l[v+"_"+b]={cellColor:t.getcolorGradation(u[1],u[0],d,f,parseInt(k.v))}:parseInt(k.v)==f&&(v+"_"+b in l?l[v+"_"+b].cellColor=u[0]:l[v+"_"+b]={cellColor:u[0]}))}}}else if(o=="icons"){let f=parseInt(u.len),d=parseInt(u.leftMin),m=parseInt(u.top),g=null,y=null;for(let v=0;v<s.length;v++)for(let b=s[v].row[0];b<=s[v].row[1];b++)for(let k=s[v].column[0];k<=s[v].column[1];k++){if(n[b]==null||n[b][k]==null)continue;let w=n[b][k];P(w)=="object"&&w.ct!=null&&w.ct.t=="n"&&w.v!=null&&((g==null||parseInt(w.v)>g)&&(g=parseInt(w.v)),(y==null||parseInt(w.v)<y)&&(y=parseInt(w.v)))}if(g!=null&&y!=null){let v=Math.floor((g-y+1)/f),b=(g-y+1)%f;if(f==3){let k,w,x;b==2?(k=[y,y+v],w=[y+v+1,y+v*2],x=[y+v*2+1,g]):(k=[y,y+v-1],w=[y+v,y+v*2-1],x=[y+v*2,g]);for(let C=0;C<s.length;C++)for(let S=s[C].row[0];S<=s[C].row[1];S++)for(let _=s[C].column[0];_<=s[C].column[1];_++){if(n[S]==null||n[S][_]==null)continue;let T=n[S][_];P(T)=="object"&&T.ct!=null&&T.ct.t=="n"&&T.v!=null&&(parseInt(T.v)>=k[0]&&parseInt(T.v)<=k[1]?S+"_"+_ in l?l[S+"_"+_].icons={left:d+2,top:m}:l[S+"_"+_]={icons:{left:d+2,top:m}}:parseInt(T.v)>=w[0]&&parseInt(T.v)<=w[1]?S+"_"+_ in l?l[S+"_"+_].icons={left:d+1,top:m}:l[S+"_"+_]={icons:{left:d+1,top:m}}:parseInt(T.v)>=x[0]&&parseInt(T.v)<=x[1]&&(S+"_"+_ in l?l[S+"_"+_].icons={left:d,top:m}:l[S+"_"+_]={icons:{left:d,top:m}}))}}else if(f==4){let k,w,x,C;b==2?(k=[y,y+v],w=[y+v+1,y+v*2],x=[y+v*2+1,y+v*3],C=[y+v*3+1,g]):b==3?(k=[y,y+v],w=[y+v+1,y+v*2],x=[y+v*2+1,y+v*3+1],C=[y+v*3+2,g]):(k=[y,y+v-1],w=[y+v,y+v*2-1],x=[y+v*2,y+v*3-1],C=[y+v*3,g]);for(let S=0;S<s.length;S++)for(let _=s[S].row[0];_<=s[S].row[1];_++)for(let T=s[S].column[0];T<=s[S].column[1];T++){if(n[_]==null||n[_][T]==null)continue;let A=n[_][T];P(A)=="object"&&A.ct!=null&&A.ct.t=="n"&&A.v!=null&&(parseInt(A.v)>=k[0]&&parseInt(A.v)<=k[1]?_+"_"+T in l?l[_+"_"+T].icons={left:d+3,top:m}:l[_+"_"+T]={icons:{left:d+3,top:m}}:parseInt(A.v)>=w[0]&&parseInt(A.v)<=w[1]?_+"_"+T in l?l[_+"_"+T].icons={left:d+2,top:m}:l[_+"_"+T]={icons:{left:d+2,top:m}}:parseInt(A.v)>=x[0]&&parseInt(A.v)<=x[1]?_+"_"+T in l?l[_+"_"+T].icons={left:d+1,top:m}:l[_+"_"+T]={icons:{left:d+1,top:m}}:parseInt(A.v)>=C[0]&&parseInt(A.v)<=C[1]&&(_+"_"+T in l?l[_+"_"+T].icons={left:d,top:m}:l[_+"_"+T]={icons:{left:d,top:m}}))}}else if(f==5){let k,w,x,C,S;b==2?(k=[y,y+v],w=[y+v+1,y+v*2],x=[y+v*2+1,y+v*3],C=[y+v*3+1,y+v*4],S=[y+v*4+1,g]):b==3?(k=[y,y+v],w=[y+v+1,y+v*2],x=[y+v*2+1,y+v*3+1],C=[y+v*3+2,y+v*4+1],S=[y+v*4+2,g]):b==4?(k=[y,y+v],w=[y+v+1,y+v*2+1],x=[y+v*2+2,y+v*3+1],C=[y+v*3+2,y+v*4+2],S=[y+v*4+3,g]):(k=[y,y+v-1],w=[y+v,y+v*2-1],x=[y+v*2,y+v*3-1],C=[y+v*3,y+v*4-1],S=[y+v*4,g]);for(let _=0;_<s.length;_++)for(let T=s[_].row[0];T<=s[_].row[1];T++)for(let A=s[_].column[0];A<=s[_].column[1];A++){if(n[T]==null||n[T][A]==null)continue;let R=n[T][A];P(R)=="object"&&R.ct!=null&&R.ct.t=="n"&&R.v!=null&&(parseInt(R.v)>=k[0]&&parseInt(R.v)<=k[1]?T+"_"+A in l?l[T+"_"+A].icons={left:d+4,top:m}:l[T+"_"+A]={icons:{left:d+4,top:m}}:parseInt(R.v)>=w[0]&&parseInt(R.v)<=w[1]?T+"_"+A in l?l[T+"_"+A].icons={left:d+3,top:m}:l[T+"_"+A]={icons:{left:d+3,top:m}}:parseInt(R.v)>=x[0]&&parseInt(R.v)<=x[1]?T+"_"+A in l?l[T+"_"+A].icons={left:d+2,top:m}:l[T+"_"+A]={icons:{left:d+2,top:m}}:parseInt(R.v)>=C[0]&&parseInt(R.v)<=C[1]?T+"_"+A in l?l[T+"_"+A].icons={left:d+1,top:m}:l[T+"_"+A]={icons:{left:d+1,top:m}}:parseInt(R.v)>=S[0]&&parseInt(R.v)<=S[1]&&(T+"_"+A in l?l[T+"_"+A].icons={left:d,top:m}:l[T+"_"+A]={icons:{left:d,top:m}}))}}}}else{let f=e[a].conditionName,d=e[a].conditionValue[0],m=e[a].conditionValue[1],g=u.textColor,y=u.cellColor;for(let v=0;v<s.length;v++)if(f=="greaterThan"||f=="lessThan"||f=="equal"||f=="textContains")for(let b=s[v].row[0];b<=s[v].row[1];b++)for(let k=s[v].column[0];k<=s[v].column[1];k++){if(n[b]==null||n[b][k]==null)continue;let w=n[b][k];P(w)!="object"||me(w.v)||(f=="greaterThan"&&w.v>d?b+"_"+k in l?(l[b+"_"+k].textColor=g,l[b+"_"+k].cellColor=y):l[b+"_"+k]={textColor:g,cellColor:y}:f=="lessThan"&&w.v<d?b+"_"+k in l?(l[b+"_"+k].textColor=g,l[b+"_"+k].cellColor=y):l[b+"_"+k]={textColor:g,cellColor:y}:f=="equal"&&w.v==d?b+"_"+k in l?(l[b+"_"+k].textColor=g,l[b+"_"+k].cellColor=y):l[b+"_"+k]={textColor:g,cellColor:y}:f=="textContains"&&w.v.toString().indexOf(d)!=-1&&(b+"_"+k in l?(l[b+"_"+k].textColor=g,l[b+"_"+k].cellColor=y):l[b+"_"+k]={textColor:g,cellColor:y}))}else if(f=="betweenness"){let b,k;d>m?(b=d,k=m):(b=m,k=d);for(let w=s[v].row[0];w<=s[v].row[1];w++)for(let x=s[v].column[0];x<=s[v].column[1];x++){if(n[w]==null||n[w][x]==null)continue;let C=n[w][x];P(C)!="object"||me(C.v)||C.v>=k&&C.v<=b&&(w+"_"+x in l?(l[w+"_"+x].textColor=g,l[w+"_"+x].cellColor=y):l[w+"_"+x]={textColor:g,cellColor:y})}}else if(f=="occurrenceDate"){let b,k;if(d.toString().indexOf("-")==-1)b=at(d)[2],k=at(d)[2];else{let w=d.toString().split("-");b=at(w[1].trim())[2],k=at(w[0].trim())[2]}for(let w=s[v].row[0];w<=s[v].row[1];w++)for(let x=s[v].column[0];x<=s[v].column[1];x++)if(!(n[w]==null||n[w][x]==null)&&n[w][x].ct!=null&&n[w][x].ct.t=="d"){let C=ze(w,x,n);C>=k&&C<=b&&(w+"_"+x in l?(l[w+"_"+x].textColor=g,l[w+"_"+x].cellColor=y):l[w+"_"+x]={textColor:g,cellColor:y})}}else if(f=="duplicateValue"){let b={};for(let k=s[v].row[0];k<=s[v].row[1];k++)for(let w=s[v].column[0];w<=s[v].column[1];w++){let x=ze(k,w,n);x in b||(b[x]=[]),b[x].push({r:k,c:w})}if(d=="0"){for(let k in b)if(k!="null"&&k!="undefined"&&b[k].length>1)for(let w=0;w<b[k].length;w++)b[k][w].r+"_"+b[k][w].c in l?(l[b[k][w].r+"_"+b[k][w].c].textColor=g,l[b[k][w].r+"_"+b[k][w].c].cellColor=y):l[b[k][w].r+"_"+b[k][w].c]={textColor:g,cellColor:y}}if(d=="1")for(let k in b)k!="null"&&k!="undefined"&&b[k].length==1&&(b[k][0].r+"_"+b[k][0].c in l?(l[b[k][0].r+"_"+b[k][0].c].textColor=g,l[b[k][0].r+"_"+b[k][0].c].cellColor=y):l[b[k][0].r+"_"+b[k][0].c]={textColor:g,cellColor:y})}else if(f=="top10"||f=="top10%"||f=="last10"||f=="last10%"||f=="AboveAverage"||f=="SubAverage"){let b=[];for(let k=s[v].row[0];k<=s[v].row[1];k++)for(let w=s[v].column[0];w<=s[v].column[1];w++)n[k]==null||n[k][w]==null||n[k][w].ct!=null&&n[k][w].ct.t=="n"&&b.push(ze(k,w,n));if(f=="top10"||f=="top10%"||f=="last10"||f=="last10%"){for(let w=0;w<b.length;w++)for(let x=0;x<b.length-1-w;x++)if(b[x]<b[x+1]){let C=b[x];b[x]=b[x+1],b[x+1]=C}let k;f=="top10"?k=b.slice(0,d):f=="top10%"?k=b.slice(0,Math.floor(d*b.length/100)):f=="last10"?k=b.slice(b.length-d,b.length):f=="last10%"&&(k=b.slice(b.length-Math.floor(d*b.length/100),b.length));for(let w=s[v].row[0];w<=s[v].row[1];w++)for(let x=s[v].column[0];x<=s[v].column[1];x++){if(n[w]==null||n[w][x]==null)continue;let C=ze(w,x,n);k.indexOf(C)!=-1&&(w+"_"+x in l?(l[w+"_"+x].textColor=g,l[w+"_"+x].cellColor=y):l[w+"_"+x]={textColor:g,cellColor:y})}}else if(f=="AboveAverage"||f=="SubAverage"){let k=0;for(let x=0;x<b.length;x++)k+=b[x];let w=k/b.length;if(f=="AboveAverage")for(let x=s[v].row[0];x<=s[v].row[1];x++)for(let C=s[v].column[0];C<=s[v].column[1];C++){if(n[x]==null||n[x][C]==null)continue;ze(x,C,n)>w&&(x+"_"+C in l?(l[x+"_"+C].textColor=g,l[x+"_"+C].cellColor=y):l[x+"_"+C]={textColor:g,cellColor:y})}else if(f=="SubAverage")for(let x=s[v].row[0];x<=s[v].row[1];x++)for(let C=s[v].column[0];C<=s[v].column[1];C++){if(n[x]==null||n[x][C]==null)continue;ze(x,C,n)<w&&(x+"_"+C in l?(l[x+"_"+C].textColor=g,l[x+"_"+C].cellColor=y):l[x+"_"+C]={textColor:g,cellColor:y})}}}else if(f=="formula"){let b=s[v].row[0],k=s[v].row[1],w=s[v].column[0],x=s[v].column[1],C=d;d.toString().slice(0,1)!="="&&(C="="+d);for(let S=b;S<=k;S++)for(let _=w;_<=x;_++){let T=C,A=S-b,R=_-w;A>0&&(T="="+p.functionCopy(T,"down",A)),R>0&&(T="="+p.functionCopy(T,"right",R));let F=p.execfunction(T)[1];typeof F!="boolean"&&(F=!!Number(F)),!!F&&(S+"_"+_ in l?(l[S+"_"+_].textColor=g,l[S+"_"+_].cellColor=y):l[S+"_"+_]={textColor:g,cellColor:y})}}}}return l},updateItem:function(e,n,t){if(!Rr(h.currentSheetIndex))return;let l=this,a=Z(h.currentSheetIndex),o=$.extend(!0,[],h.luckysheetfile),s=l.getHistoryRules(o),u;if(e=="delSheet")u=[];else{let m={type:e,cellrange:n,format:t};u=h.luckysheetfile[a].luckysheet_conditionformat_save==null?[]:h.luckysheetfile[a].luckysheet_conditionformat_save,u.push(m)}h.luckysheetfile[a].luckysheet_conditionformat_save=u;let f=$.extend(!0,[],h.luckysheetfile),d=l.getCurrentRules(f);l.ref(s,d),ne.allowUpdate&&ne.saveParam("all",h.currentSheetIndex,u,{k:"luckysheet_conditionformat_save"})},getHistoryRules:function(e){let n=[];for(let t=0;t<e.length;t++)n.push({sheetIndex:e[t].index,luckysheet_conditionformat_save:e[t].luckysheet_conditionformat_save});return n},getCurrentRules:function(e){let n=[];for(let t=0;t<e.length;t++)n.push({sheetIndex:e[t].index,luckysheet_conditionformat_save:e[t].luckysheet_conditionformat_save});return n},ref:function(e,n){if(h.clearjfundo){h.jfundo.length=0;let t={};t.type="updateCF",t.data={historyRules:e,currentRules:n},h.jfredo.push(t)}setTimeout(function(){Be()},1)}},$e=dv});var mv,Ct,Wa=Ie(()=>{Zt();il();gr();Ml();Jt();ll();Ut();Va();Kt();mr();Ft();Yt();Al();Nt();ft();Xe();bt();qr();mv={clearcopy:function(e){let n=window.clipboardData;n||e&&(n=e.originalEvent.clipboardData);let t=" ";if(h.luckysheet_selection_range=[],Ot(),n)return n.setData("Text",t),!1;{let l=$("#luckysheet-copy-content").css("visibility","hidden");l.val(t),l.focus(),l.select(),setTimeout(function(){l.blur().css("visibility","visible")},10)}},getHtmlBorderStyle:function(e,n){let t="";return e={"0":"none","1":"Thin","2":"Hair","3":"Dotted","4":"Dashed","5":"DashDot","6":"DashDotDot","7":"Double","8":"Medium","9":"MediumDashed","10":"MediumDashDot","11":"MediumDashDotDot","12":"SlantedDashDot","13":"Thick"}[e.toString()],e.indexOf("Medium")>-1?t+="1pt ":e=="Thick"?t+="1.5pt ":t+="0.5pt ",e=="Hair"?t+="double ":e.indexOf("DashDotDot")>-1?t+="dotted ":e.indexOf("DashDot")>-1?t+="dashed ":e.indexOf("Dotted")>-1?t+="dotted ":e.indexOf("Dashed")>-1?t+="dashed ":t+="solid ",t+n+";"},copy:function(e){let n=window.clipboardData;n||(n=e.originalEvent.clipboardData),h.luckysheet_selection_range=[];let t=[],l=[],a=[],o=!1,s=!1;for(let y=0;y<h.luckysheet_select_save.length;y++){let v=h.luckysheet_select_save[y],b=v.row[0],k=v.row[1],w=v.column[0],x=v.column[1];for(let C=b;C<=k;C++)if(!(h.config.rowhidden!=null&&h.config.rowhidden[C]!=null)){t.includes(C)||t.push(C),h.config.rowlen!=null&&C in h.config.rowlen&&(o=!0);for(let S=w;S<=x;S++){if(h.config.colhidden!=null&&h.config.colhidden[S]!=null)continue;l.includes(S)||l.push(S);let _=h.flowdata[C][S];P(_)=="object"&&"mc"in _&&_.mc.rs!=null&&(s=!0)}}h.luckysheet_selection_range.push({row:v.row,column:v.column}),a.push({row:v.row,column:v.column})}Ot(),h.luckysheet_copy_save={dataSheetIndex:h.currentSheetIndex,copyRange:a,RowlChange:o,HasMC:s};let u=this,f;h.config.borderInfo&&h.config.borderInfo.length>0&&(f=Gr());let d="",m=xe.deepCopyFlowData(h.flowdata),g="";for(let y=0;y<t.length;y++){let v=t[y];if(!(h.config.rowhidden!=null&&h.config.rowhidden[v]!=null)){h.config==null||h.config.rowlen==null||h.config.rowlen[v.toString()]==null?d+='<tr height="19">':d+=`<tr height="${h.config.rowlen[v.toString()]}">`;for(let b=0;b<l.length;b++){let k=l[b];if(v==t[0]&&(h.config==null||h.config.columnlen==null||h.config.columnlen[k.toString()]==null?g+='<col width="72px"></col>':g+='<col width="'+h.config.columnlen[k.toString()]+'px"></col>'),h.config.colhidden!=null&&h.config.colhidden[k]!=null)continue;let w='<td ${span} style="${style}">';if(m[v]!=null&&m[v][k]!=null){let x="",C="",S=/^(w|W)((0?)|(0\.0+))$/,_;if(m[v][k].ct!=null&&m[v][k].ct.fa!=null&&m[v][k].ct.fa.match(S)?_=ze(v,k,m):_=ze(v,k,m,"m"),x+=ke.getStyleByCell(m,v,k),P(m[v][k])=="object"&&"mc"in m[v][k])if("rs"in m[v][k].mc){if(C='rowspan="'+m[v][k].mc.rs+'" colspan="'+m[v][k].mc.cs+'"',f&&f[v+"_"+k]){let T={color:{},style:{}},A={color:{},style:{}},R={color:{},style:{}},I={color:{},style:{}};for(let M=v;M<v+m[v][k].mc.rs;M++)for(let E=k;E<k+m[v][k].mc.cs;E++){if(M==v&&f[M+"_"+E]&&f[M+"_"+E].t){let N=f[M+"_"+E].t.style,L=f[M+"_"+E].t.color;R.style[N]==null?R.style[N]=1:R.style[N]=R.style[N]+1,R.color[L]==null?R.color[L]=1:R.color[L]=R.color[L]+1}if(M==v+m[v][k].mc.rs-1&&f[M+"_"+E]&&f[M+"_"+E].b){let N=f[M+"_"+E].b.style,L=f[M+"_"+E].b.color;I.style[N]==null?I.style[N]=1:I.style[N]=I.style[N]+1,I.color[L]==null?I.color[L]=1:I.color[L]=I.color[L]+1}if(E==k&&f[M+"_"+E]&&f[M+"_"+E].l){let N=f[v+"_"+k].l.style,L=f[M+"_"+E].l.color;T.style[N]==null?T.style[N]=1:T.style[N]=T.style[N]+1,T.color[L]==null?T.color[L]=1:T.color[L]=T.color[L]+1}if(E==k+m[v][k].mc.cs-1&&f[M+"_"+E]&&f[M+"_"+E].r){let N=f[M+"_"+E].r.style,L=f[M+"_"+E].r.color;A.style[N]==null?A.style[N]=1:A.style[N]=A.style[N]+1,A.color[L]==null?A.color[L]=1:A.color[L]=A.color[L]+1}}let F=m[v][k].mc.rs,z=m[v][k].mc.cs;if(JSON.stringify(T).length>23){let M=null,E=null;for(let N in T.color)T.color[N]>=F/2&&(M=N);for(let N in T.style)T.style[N]>=F/2&&(E=N);M!=null&&E!=null&&(x+="border-left:"+u.getHtmlBorderStyle(E,M))}if(JSON.stringify(A).length>23){let M=null,E=null;for(let N in A.color)A.color[N]>=F/2&&(M=N);for(let N in A.style)A.style[N]>=F/2&&(E=N);M!=null&&E!=null&&(x+="border-right:"+u.getHtmlBorderStyle(E,M))}if(JSON.stringify(R).length>23){let M=null,E=null;for(let N in R.color)R.color[N]>=z/2&&(M=N);for(let N in R.style)R.style[N]>=z/2&&(E=N);M!=null&&E!=null&&(x+="border-top:"+u.getHtmlBorderStyle(E,M))}if(JSON.stringify(I).length>23){let M=null,E=null;for(let N in I.color)I.color[N]>=z/2&&(M=N);for(let N in I.style)I.style[N]>=z/2&&(E=N);M!=null&&E!=null&&(x+="border-bottom:"+u.getHtmlBorderStyle(E,M))}}}else continue;else if(f&&f[v+"_"+k]){if(f[v+"_"+k].l){let T=f[v+"_"+k].l.style,A=f[v+"_"+k].l.color;x+="border-left:"+u.getHtmlBorderStyle(T,A)}if(f[v+"_"+k].r){let T=f[v+"_"+k].r.style,A=f[v+"_"+k].r.color;x+="border-right:"+u.getHtmlBorderStyle(T,A)}if(f[v+"_"+k].b){let T=f[v+"_"+k].b.style,A=f[v+"_"+k].b.color;x+="border-bottom:"+u.getHtmlBorderStyle(T,A)}if(f[v+"_"+k].t){let T=f[v+"_"+k].t.style,A=f[v+"_"+k].t.color;x+="border-top:"+u.getHtmlBorderStyle(T,A)}}w=_e(w,{style:x,span:C}),_==null&&(_=ze(v,k,m)),_==null&&m[v][k]&&m[v][k].ct&&m[v][k].ct.t=="inlineStr"&&(_=m[v][k].ct.s.map(T=>{let A=$('<br style="mso-data-placement:same-cell;">');return T.v.split(`\r |
| | | `).map(I=>{if(!I)return"";let F=$("<font></font>");return T.fs&&F.css("font-size",`${T.fs}pt`),T.bl&&F.css("font-weight","bold"),T.it&&F.css("font-style","italic"),T.un&&F.css("text-decoration","underline"),T.fc&&F.css("color",T.fc),T.cl?F.append(`<s>${I}</s>`):F.text(I),F[0].outerHTML}).join(A[0].outerHTML)}).join("")),_==null&&(_=""),_=p.ltGtSignDeal(_),w+=_}else{let x="";if(f&&f[v+"_"+k]){if(f[v+"_"+k].l){let C=f[v+"_"+k].l.style,S=f[v+"_"+k].l.color;x+="border-left:"+u.getHtmlBorderStyle(C,S)}if(f[v+"_"+k].r){let C=f[v+"_"+k].r.style,S=f[v+"_"+k].r.color;x+="border-right:"+u.getHtmlBorderStyle(C,S)}if(f[v+"_"+k].b){let C=f[v+"_"+k].b.style,S=f[v+"_"+k].b.color;x+="border-bottom:"+u.getHtmlBorderStyle(C,S)}if(f[v+"_"+k].t){let C=f[v+"_"+k].t.style,S=f[v+"_"+k].t.color;x+="border-top:"+u.getHtmlBorderStyle(C,S)}}w+="",w=_e(w,{style:x,span:""}),w+=""}w+="</td>",d+=w}d+="</tr>"}}if(d=`<table data-type="luckysheet_copy_action_table"><colgroup>${g}</colgroup>`+d+"</table>",h.iscopyself=!0,n)return n.setData("Text",d),!1;{let y=$("#luckysheet-copy-content");y.html(d),y.focus(),y.select(),document.execCommand("selectAll"),document.execCommand("Copy"),setTimeout(function(){$("#luckysheet-copy-content").blur()},10)}},copybyformat:function(e,n){let t=window.clipboardData;t||(t=e.originalEvent&&e.originalEvent.clipboardData),h.luckysheet_selection_range=[{row:h.luckysheet_select_save[0].row,column:h.luckysheet_select_save[0].column}],Ot();let l=n;if(h.iscopyself=!0,t)return t.setData("Text",l),!1;{let a=$("#luckysheet-copy-content");a.text(l),a.focus(),a.select(),document.execCommand("selectAll"),document.execCommand("Copy"),setTimeout(function(){a.blur()},10)}},isPasteAction:!1,paste:function(e,n){let t=this;if(h.allowEdit===!1)return;let a=Q().drag,o=$("#luckysheet-copy-content");o.focus(),o.select(),setTimeout(function(){let s=o.html();s.indexOf("luckysheet_copy_action_table")>-1&&h.luckysheet_copy_save.copyRange!=null&&h.luckysheet_copy_save.copyRange.length>0?h.luckysheet_paste_iscut?(h.luckysheet_paste_iscut=!1,t.pasteHandlerOfCutPaste(h.luckysheet_copy_save),t.clearcopy(e)):t.pasteHandlerOfCopyPaste(h.luckysheet_copy_save):s.indexOf("luckysheet_copy_action_image")>-1?Re.pasteImgItem():n!="btn"?t.pasteHandler(s):fe()?alert(a.pasteMustKeybordAlert):U.info(a.pasteMustKeybordAlertHTMLTitle,a.pasteMustKeybordAlertHTML)},10)},pasteHandler:function(e,n){if(!vr(h.luckysheet_select_save,h.currentSheetIndex)||h.allowEdit===!1)return;let l=Q().paste;if(h.luckysheet_select_save.length>1&&(fe()?alert(l.errorNotAllowMulti):U.info(`<i class="fa fa-exclamation-triangle"></i>${l.warning}`,l.errorNotAllowMulti)),typeof e=="object"){if(e.length==0)return;let a=$.extend(!0,{},h.config);a.merge==null&&(a.merge={}),JSON.stringify(n).length>2&&a.borderInfo==null&&(a.borderInfo=[]);let o=e.length,s=e[0].length,u=h.luckysheet_select_save[0].row[0],f=u+o-1,d=h.luckysheet_select_save[0].column[0],m=d+s-1,g=!1;if(a.merge!=null&&(g=Mt(a,u,f,d,m)),g){fe()?alert(l.errorNotAllowMerged):U.info(`<i class="fa fa-exclamation-triangle"></i>${l.warning}`,l.errorNotAllowMerged);return}let y=xe.deepCopyFlowData(h.flowdata),v=y.length,b=y[0].length,k=f-v+1,w=m-b+1;(k>0||w>0)&&(y=cl([].concat(y),k,w,!0)),a.rowlen==null&&(a.rowlen={});let x=!1,C={};for(let S=u;S<=f;S++){let _=[].concat(y[S]),T=h.defaultrowlen;a.rowlen[S]!=null&&(T=a.rowlen[S]);for(let A=d;A<=m;A++){P(_[A])=="object"&&"mc"in _[A]&&("rs"in _[A].mc&&delete a.merge[_[A].mc.r+"_"+_[A].mc.c],delete _[A].mc);let R=null;if(e[S-u]!=null&&e[S-u][A-d]!=null&&(R=e[S-u][A-d]),_[A]=$.extend(!0,{},R),R!=null&&"mc"in _[A]&&(_[A].mc.rs!=null?(_[A].mc.r=S,_[A].mc.c=A,a.merge[_[A].mc.r+"_"+_[A].mc.c]=_[A].mc,C[R.mc.r+"_"+R.mc.c]=[_[A].mc.r,_[A].mc.c]):_[A]={mc:{r:C[R.mc.r+"_"+R.mc.c][0],c:C[R.mc.r+"_"+R.mc.c][1]}}),n[S-u+"_"+(A-d)]){let z={rangeType:"cell",value:{row_index:S,col_index:A,l:n[S-u+"_"+(A-d)].l,r:n[S-u+"_"+(A-d)].r,t:n[S-u+"_"+(A-d)].t,b:n[S-u+"_"+(A-d)].b}};a.borderInfo.push(z)}let I=oa(_[A]),F=ke.getTextSize("\u7530",I)[1];F>T&&(T=F,x=!0)}y[S]=_,T!=h.defaultrowlen&&(a.rowlen[S]=T)}if(h.luckysheet_select_save=[{row:[u,f],column:[d,m]}],k>0||w>0||x){let S={cfg:a,RowlChange:!0};Ze(y,h.luckysheet_select_save,S)}else{let S={cfg:a};Ze(y,h.luckysheet_select_save,S),lt()}}else{e=e.replace(/\r/g,"");let a=[],o=e.split(` |
| | | `),s=o[0].split(" ").length;for(let w=0;w<o.length;w++)o[w].split(" ").length<s||a.push(o[w].split(" "));let u=xe.deepCopyFlowData(h.flowdata),f=h.luckysheet_select_save[h.luckysheet_select_save.length-1],d=f.row==null?0:f.row[0],m=f.column==null?0:f.column[0],g=a.length,y=a[0].length,v=!1;if(h.config.merge!=null&&(v=Mt(h.config,d,d+g-1,m,m+y-1)),v){fe()?alert(l.errorNotAllowMerged):U.info(`<i class="fa fa-exclamation-triangle"></i>${l.warning}`,l.errorNotAllowMerged);return}let b=d+g-u.length,k=m+y-u[0].length;(b>0||k>0)&&(u=cl([].concat(u),b,k,!0));for(let w=0;w<g;w++){let x=[].concat(u[w+d]);for(let C=0;C<y;C++){let S=x[C+m],_=a[w][C];if(B(_)&&(S&&S.ct&&S.ct.fa==="@"?_=String(_):_=parseFloat(_)),S instanceof Object)S.v=_,S.ct!=null&&S.ct.fa!=null?S.m=mt(S.ct.fa,_):S.m=_,S.f!=null&&S.f.length>0&&(S.f="",p.delFunctionGroup(w+d,C+m,h.currentSheetIndex));else{let T={},A=at(_);T.v=A[2],T.ct=A[1],T.m=A[0],x[C+m]=T}}u[w+d]=x}if(f.row=[d,d+g-1],f.column=[m,m+y-1],b>0||k>0){let w={RowlChange:!0};Ze(u,h.luckysheet_select_save,w)}else Ze(u,h.luckysheet_select_save),lt()}},pasteHandlerOfCutPaste:function(e){if(!vr(h.luckysheet_select_save,h.currentSheetIndex)||h.allowEdit===!1)return;let t=Q().paste,l=$.extend(!0,{},h.config);l.merge==null&&(l.merge={});let a=e.HasMC,o=e.RowlChange,s=e.dataSheetIndex,u=e.copyRange[0].row[0],f=e.copyRange[0].row[1],d=e.copyRange[0].column[0],m=e.copyRange[0].column[1],g=$.extend(!0,[],Pt({row:[u,f],column:[d,m]},s)),y=g.length,v=g[0].length,b=h.luckysheet_select_save[h.luckysheet_select_save.length-1],k=b.row_focus,w=k+y-1,x=b.column_focus,C=x+v-1,S=!1;if(l.merge!=null&&(S=Mt(l,k,w,x,C)),S){fe()?alert(t.errorNotAllowMerged):U.info(`<i class="fa fa-exclamation-triangle"></i>${t.warning}`,t.errorNotAllowMerged);return}let _=xe.deepCopyFlowData(h.flowdata),T=_.length,A=_[0].length,R=y+k-T,I=v+x-A;(R>0||I>0)&&(_=cl([].concat(_),R,I,!0));let F=Gr(s),z=$.extend(!0,{},h.luckysheetfile[Z(s)].dataVerification),M=$.extend(!0,{},h.luckysheetfile[Z(h.currentSheetIndex)].dataVerification);if(h.currentSheetIndex==s){for(let O=u;O<=f;O++)for(let V=d;V<=m;V++){let q=_[O][V];P(q)=="object"&&"mc"in q&&("rs"in q.mc&&delete l.merge[q.mc.r+"_"+q.mc.c],delete q.mc),_[O][V]=null,delete M[O+"_"+V]}if(l.borderInfo&&l.borderInfo.length>0){let O=[];for(let V=0;V<l.borderInfo.length;V++){let q=l.borderInfo[V].rangeType;if(q=="range"){let W=l.borderInfo[V].range,X=[];for(let te=0;te<W.length;te++)X=X.concat($e.CFSplitRange(W[te],{row:[u,f],column:[d,m]},{row:[k,w],column:[x,C]},"restPart"));l.borderInfo[V].range=X,O.push(l.borderInfo[V])}else if(q=="cell"){let W=l.borderInfo[V].value.row_index,X=l.borderInfo[V].value.col_index;W>=u&&W<=f&&X>=d&&X<=m||O.push(l.borderInfo[V])}}l.borderInfo=O}}let E={};for(let O=k;O<=w;O++){let V=[].concat(_[O]);for(let q=x;q<=C;q++){if(F[u+O-k+"_"+(d+q-x)]){let X={rangeType:"cell",value:{row_index:O,col_index:q,l:F[u+O-k+"_"+(d+q-x)].l,r:F[u+O-k+"_"+(d+q-x)].r,t:F[u+O-k+"_"+(d+q-x)].t,b:F[u+O-k+"_"+(d+q-x)].b}};l.borderInfo==null&&(l.borderInfo=[]),l.borderInfo.push(X)}else if(F[O+"_"+q]){let X={rangeType:"cell",value:{row_index:O,col_index:q,l:null,r:null,t:null,b:null}};l.borderInfo==null&&(l.borderInfo=[]),l.borderInfo.push(X)}z[u+O-k+"_"+(d+q-x)]&&(M[O+"_"+q]=z[u+O-k+"_"+(d+q-x)]),P(V[q])=="object"&&"mc"in V[q]&&("rs"in V[q].mc&&delete l.merge[V[q].mc.r+"_"+V[q].mc.c],delete V[q].mc);let W=null;g[O-k]!=null&&g[O-k][q-x]!=null&&(W=g[O-k][q-x]),V[q]=$.extend(!0,{},W),W!=null&&a&&"mc"in V[q]&&(V[q].mc.rs!=null?(V[q].mc.r=O,V[q].mc.c=q,l.merge[V[q].mc.r+"_"+V[q].mc.c]=V[q].mc,E[W.mc.r+"_"+W.mc.c]=[V[q].mc.r,V[q].mc.c]):V[q]={mc:{r:E[W.mc.r+"_"+W.mc.c][0],c:E[W.mc.r+"_"+W.mc.c][1]}})}_[O]=V}b.row=[k,w],b.column=[x,C],o&&(h.currentSheetIndex!=s?l=yl(_,k,w,l):(l=yl(_,u,f,l),l=yl(_,k,w,l)));let N,L;if(h.currentSheetIndex!=s){let O=$.extend(!0,[],h.luckysheetfile[Z(s)].data),V=$.extend(!0,{},h.luckysheetfile[Z(s)].config),q=$.extend(!0,[],O),W=$.extend(!0,{},V);W.merge==null&&(W.merge={});for(let ce=u;ce<=f;ce++)for(let he=d;he<=m;he++){let ue=q[ce][he];P(ue)=="object"&&"mc"in ue&&("rs"in ue.mc&&delete W.merge[ue.mc.r+"_"+ue.mc.c],delete ue.mc),q[ce][he]=null}if(o&&(W=yl(q,u,f,W)),W.borderInfo&&W.borderInfo.length>0){let ce=[];for(let he=0;he<W.borderInfo.length;he++){let ue=W.borderInfo[he].rangeType;if(ue=="range"){let K=W.borderInfo[he].range,G=[];for(let ee=0;ee<K.length;ee++)G=G.concat($e.CFSplitRange(K[ee],{row:[u,f],column:[d,m]},{row:[k,w],column:[x,C]},"restPart"));W.borderInfo[he].range=G,ce.push(W.borderInfo[he])}else if(ue=="cell"){let K=W.borderInfo[he].value.row_index,G=W.borderInfo[he].value.col_index;K>=u&&K<=f&&G>=d&&G<=m||ce.push(W.borderInfo[he])}}W.borderInfo=ce}let X=$.extend(!0,[],h.luckysheetfile[Z(s)].luckysheet_conditionformat_save),te=$.extend(!0,[],X),le=[];if(te!=null&&te.length>0)for(let ce=0;ce<te.length;ce++){let he=te[ce].cellrange,ue=[],K=[];for(let G=0;G<he.length;G++){let ee=$e.CFSplitRange(he[G],{row:[u,f],column:[d,m]},{row:[k,w],column:[x,C]},"restPart");ue=ue.concat(ee);let pe=$e.CFSplitRange(he[G],{row:[u,f],column:[d,m]},{row:[k,w],column:[x,C]},"operatePart");pe.length>0&&(K=K.concat(pe))}if(te[ce].cellrange=ue,K.length>0){let G=$.extend(!0,{},te[ce]);G.cellrange=K,le.push(G)}}let oe=$.extend(!0,[],h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save),se=$.extend(!0,[],oe);le.length>0&&(se=se.concat(le));for(let ce=u;ce<=f;ce++)for(let he=d;he<=m;he++)delete z[ce+"_"+he];N={sheetIndex:s,data:O,curData:q,config:V,curConfig:W,cdformat:X,curCdformat:te,dataVerification:$.extend(!0,{},h.luckysheetfile[Z(s)].dataVerification),curDataVerification:z,range:{row:[u,f],column:[d,m]}},L={sheetIndex:h.currentSheetIndex,data:h.flowdata,curData:_,config:$.extend(!0,{},h.config),curConfig:l,cdformat:oe,curCdformat:se,dataVerification:$.extend(!0,{},h.luckysheetfile[Z(h.currentSheetIndex)].dataVerification),curDataVerification:M,range:{row:[k,w],column:[x,C]}}}else{let O=$.extend(!0,[],h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save),V=$.extend(!0,[],O);if(V!=null&&V.length>0)for(let q=0;q<V.length;q++){let W=V[q].cellrange,X=[];for(let te=0;te<W.length;te++){let le=$e.CFSplitRange(W[te],{row:[u,f],column:[d,m]},{row:[k,w],column:[x,C]},"allPart");X=X.concat(le)}V[q].cellrange=X}N={sheetIndex:h.currentSheetIndex,data:h.flowdata,curData:_,config:$.extend(!0,{},h.config),curConfig:l,cdformat:O,curCdformat:V,dataVerification:$.extend(!0,{},h.luckysheetfile[Z(h.currentSheetIndex)].dataVerification),curDataVerification:M,range:{row:[u,f],column:[d,m]}},L={sheetIndex:h.currentSheetIndex,data:h.flowdata,curData:_,config:$.extend(!0,{},h.config),curConfig:l,cdformat:O,curCdformat:V,dataVerification:$.extend(!0,{},h.luckysheetfile[Z(h.currentSheetIndex)].dataVerification),curDataVerification:M,range:{row:[k,w],column:[x,C]}}}R>0||I>0?Ga(N,L,!0):Ga(N,L,o)},pasteHandlerOfCopyPaste:function(e){if(!vr(h.luckysheet_select_save,h.currentSheetIndex))return;let t=Q().paste,l=$.extend(!0,{},h.config);l.merge==null&&(l.merge={});let a=e.HasMC,o=e.RowlChange,s=e.dataSheetIndex,u=e.copyRange[0].row[0],f=e.copyRange[0].row[1],d=e.copyRange[0].column[0],m=e.copyRange[0].column[1],g=[],y=!1;for(let se=0;se<e.copyRange.length;se++){let ce=Pt({row:e.copyRange[se].row,column:e.copyRange[se].column},s);e.copyRange.length>1?u==e.copyRange[1].row[0]&&f==e.copyRange[1].row[1]?(ce=ce[0].map(function(he,ue){return ce.map(function(K){return K[ue]})}),g=g.concat(ce),y=!0):d==e.copyRange[1].column[0]&&m==e.copyRange[1].column[1]&&(g=g.concat(ce)):g=ce}y&&(g=g[0].map(function(se,ce){return g.map(function(he){return he[ce]})}));let v=$.extend(!0,[],g);if(e.copyRange.length>1)for(let se=0;se<v.length;se++)for(let ce=0;ce<v[se].length;ce++)v[se][ce]!=null&&v[se][ce].f!=null&&(delete v[se][ce].f,delete v[se][ce].spl);let b=v.length,k=v[0].length,w=h.luckysheet_select_save[h.luckysheet_select_save.length-1],x=w.row[0],C=w.row[1],S=w.column[0],_=w.column[1],T=(C-x+1)%b,A=(_-S+1)%k;(T!=0||A!=0)&&(C=x+b-1,_=S+k-1);let R=!1;if(l.merge!=null&&(R=Mt(l,x,C,S,_)),R){fe()?alert(t.errorNotAllowMerged):U.info(`<i class="fa fa-exclamation-triangle"></i>${t.warning}`,t.errorNotAllowMerged);return}let I=(C-x+1)/b,F=(_-S+1)/k,z=xe.deepCopyFlowData(h.flowdata),M=z.length,E=z[0].length,N=b+x-M,L=k+S-E;(N>0||L>0)&&(z=cl([].concat(z),N,L,!0));let O=Gr(s),V=$.extend(!0,{},h.luckysheetfile[Z(s)].dataVerification),q=null,W=0,X=0,te=0,le=0;for(let se=1;se<=I;se++)for(let ce=1;ce<=F;ce++){W=x+(se-1)*b,X=S+(ce-1)*k,le=x+se*b,te=S+ce*k;let he=W-u,ue=X-d,K={};for(let G=W;G<le;G++){let ee=[].concat(z[G]);for(let pe=X;pe<te;pe++){if(O[u+G-W+"_"+(d+pe-X)]){let Te={rangeType:"cell",value:{row_index:G,col_index:pe,l:O[u+G-W+"_"+(d+pe-X)].l,r:O[u+G-W+"_"+(d+pe-X)].r,t:O[u+G-W+"_"+(d+pe-X)].t,b:O[u+G-W+"_"+(d+pe-X)].b}};l.borderInfo==null&&(l.borderInfo=[]),l.borderInfo.push(Te)}else if(O[G+"_"+pe]){let Te={rangeType:"cell",value:{row_index:G,col_index:pe,l:null,r:null,t:null,b:null}};l.borderInfo==null&&(l.borderInfo=[]),l.borderInfo.push(Te)}V[u+G-W+"_"+(d+pe-X)]&&(q==null&&(q=$.extend(!0,{},h.luckysheetfile[Z(h.currentSheetIndex)].dataVerification)),q[G+"_"+pe]=V[u+G-W+"_"+(d+pe-X)]),P(ee[pe])=="object"&&"mc"in ee[pe]&&("rs"in ee[pe].mc&&delete l.merge[ee[pe].mc.r+"_"+ee[pe].mc.c],delete ee[pe].mc);let ae=null;if(v[G-W]!=null&&v[G-W][pe-X]!=null&&(ae=$.extend(!0,{},v[G-W][pe-X])),ae!=null&&ae.f!=null){let Te=ae.f;he>0&&(Te="="+p.functionCopy(Te,"down",he)),he<0&&(Te="="+p.functionCopy(Te,"up",Math.abs(he))),ue>0&&(Te="="+p.functionCopy(Te,"right",ue)),ue<0&&(Te="="+p.functionCopy(Te,"left",Math.abs(ue)));let ie=p.execfunction(Te,G,pe,void 0,!0);ae.spl!=null?(ae.f=ie[2],ae.v=ie[1],ae.spl=ie[3].data):(ae.f=ie[2],ae.v=ie[1],ae.ct!=null&&ae.ct.fa!=null&&(ae.m=mt(ae.ct.fa,ie[1])))}ee[pe]=$.extend(!0,{},ae),ae!=null&&a&&"mc"in ee[pe]&&(ee[pe].mc.rs!=null?(ee[pe].mc.r=G,ee[pe].mc.c=pe,l.merge[ee[pe].mc.r+"_"+ee[pe].mc.c]=ee[pe].mc,K[ae.mc.r+"_"+ae.mc.c]=[ee[pe].mc.r,ee[pe].mc.c]):ee[pe]={mc:{r:K[ae.mc.r+"_"+ae.mc.c][0],c:K[ae.mc.r+"_"+ae.mc.c][1]}})}z[G]=ee}}let oe=null;if(e.copyRange.length==1){let se=h.luckysheetfile[Z(s)],ce=h.luckysheetfile[Z(h.currentSheetIndex)],he=$.extend(!0,[],se.luckysheet_conditionformat_save);if(he!=null&&he.length>0){oe=$.extend(!0,[],ce.luckysheet_conditionformat_save);for(let ue=0;ue<he.length;ue++){let K=he[ue].cellrange,G=[];for(let ee=1;ee<=I;ee++)for(let pe=1;pe<=F;pe++){W=x+(ee-1)*b,X=S+(pe-1)*k,le=x+ee*b,te=S+pe*k;for(let ae=0;ae<K.length;ae++){let Te=$e.CFSplitRange(K[ae],{row:[u,f],column:[d,m]},{row:[W,le-1],column:[X,te-1]},"operatePart");Te.length>0&&(G=G.concat(Te))}}G.length>0&&(he[ue].cellrange=G,oe.push(he[ue]))}}}if(w.row=[x,C],w.column=[S,_],o||N>0||L>0){l=yl(z,x,C,l);let se={cfg:l,RowlChange:!0,cdformat:oe,dataVerification:q};Ze(z,h.luckysheet_select_save,se)}else{let se={cfg:l,cdformat:oe,dataVerification:q};Ze(z,h.luckysheet_select_save,se),lt()}},pasteHandlerOfPaintModel:function(e){if(!vr(h.luckysheet_select_save,h.currentSheetIndex))return;let t=Q().paste,l=$.extend(!0,{},h.config);l.merge==null&&(l.merge={});let a=e.HasMC,o=e.RowlChange,s=e.dataSheetIndex,u=e.copyRange[0].row[0],f=e.copyRange[0].row[1],d=e.copyRange[0].column[0],m=e.copyRange[0].column[1],g=$.extend(!0,[],Pt({row:[u,f],column:[d,m]},s)),y=h.luckysheet_select_save[h.luckysheet_select_save.length-1],v=y.row[0],b=y.row[1],k=y.column[0],w=y.column[1],x=g.length,C=g[0].length;if(v==b&&k==w){let q=!1;if(l.merge!=null&&(q=Mt(l,v,v+x-1,k,k+C-1)),q){fe()?alert(t.errorNotAllowMerged):U.info(`<i class="fa fa-exclamation-triangle"></i>${t.warning}`,t.errorNotAllowMerged);return}b=v+x-1,w=k+C-1}let S=Math.ceil((b-v+1)/x),_=Math.ceil((w-k+1)/C),T=xe.deepCopyFlowData(h.flowdata),A=T[0].length,R=T.length,I=Gr(s),F=$.extend(!0,{},h.luckysheetfile[Z(s)].dataVerification),z=null,M=0,E=0,N=0,L=0;for(let q=1;q<=S;q++)for(let W=1;W<=_;W++){M=v+(q-1)*x,E=k+(W-1)*C,L=v+q*x>R?R:v+q*x,L>b+1&&(L=b+1),N=k+W*C>A?A:k+W*C,N>w+1&&(N=w+1);let X={};for(let te=M;te<L;te++){let le=[].concat(T[te]);for(let oe=E;oe<N;oe++){if(I[u+te-M+"_"+(d+oe-E)]){let ce={rangeType:"cell",value:{row_index:te,col_index:oe,l:I[u+te-M+"_"+(d+oe-E)].l,r:I[u+te-M+"_"+(d+oe-E)].r,t:I[u+te-M+"_"+(d+oe-E)].t,b:I[u+te-M+"_"+(d+oe-E)].b}};l.borderInfo==null&&(l.borderInfo=[]),l.borderInfo.push(ce)}else if(I[te+"_"+oe]){let ce={rangeType:"cell",value:{row_index:te,col_index:oe,l:null,r:null,t:null,b:null}};l.borderInfo==null&&(l.borderInfo=[]),l.borderInfo.push(ce)}F[u+te-M+"_"+(d+oe-E)]&&(z==null&&(z=$.extend(!0,{},h.luckysheetfile[Z(h.currentSheetIndex)].dataVerification)),z[te+"_"+oe]=F[u+te-M+"_"+(d+oe-E)]),P(le[oe])=="object"&&"mc"in le[oe]&&("rs"in le[oe].mc&&delete l.merge[le[oe].mc.r+"_"+le[oe].mc.c],delete le[oe].mc);let se=null;if(g[te-M]!=null&&g[te-M][oe-E]!=null&&(se=g[te-M][oe-E]),se!=null&&(delete se.v,delete se.m,delete se.f,delete se.spl,se.ct&&se.ct.t=="inlineStr"&&delete se.ct,P(le[oe])=="object"?le[oe].ct&&le[oe].ct.t==="inlineStr"?delete se.ct:["bg","fc","ct","ht","vt","bl","it","cl","un","fs","ff","tb"].forEach(he=>{Reflect.deleteProperty(le[oe],he)}):le[oe]={v:le[oe]},le[oe]=$.extend(!0,le[oe],se),le[oe].ct&&le[oe].ct.t==="inlineStr"&&le[oe].ct.s.forEach(ce=>ce=$.extend(!0,ce,se)),a&&"mc"in le[oe]&&(le[oe].mc.rs!=null?(le[oe].mc.r=te,le[oe].mc.rs+te>=L&&(le[oe].mc.rs=L-te),le[oe].mc.c=oe,le[oe].mc.cs+oe>=N&&(le[oe].mc.cs=N-oe),l.merge[le[oe].mc.r+"_"+le[oe].mc.c]=le[oe].mc,X[se.mc.r+"_"+se.mc.c]=[le[oe].mc.r,le[oe].mc.c]):le[oe]={mc:{r:X[se.mc.r+"_"+se.mc.c][0],c:X[se.mc.r+"_"+se.mc.c][1]}}),le[oe].v!=null&&se.ct!=null&&se.ct.fa!=null)){let ce=mt(se.ct.fa,le[oe].v);le[oe].m=ce}}T[te]=le}}let O=null,V=$.extend(!0,[],h.luckysheetfile[Z(s)].luckysheet_conditionformat_save);if(V!=null&&V.length>0){O=$.extend(!0,[],h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save);for(let q=0;q<V.length;q++){let W=V[q].cellrange,X=[];for(let te=0;te<W.length;te++){let le=$e.CFSplitRange(W[te],{row:[u,f],column:[d,m]},{row:[v,b],column:[k,w]},"operatePart");le.length>0&&(X=X.concat(le))}X.length>0&&(V[q].cellrange=[{row:[v,b],column:[k,w]}],O.push(V[q]))}}if(y.row=[v,b],y.column=[k,w],o){l=yl(T,v,b,l);let q={cfg:l,RowlChange:!0,cdformat:O,dataVerification:z};Ze(T,h.luckysheet_select_save,q)}else{b>=T.length&&(b=T.length-1),l=yl(T,v,b,l);let q={cfg:l,RowlChange:!0,cdformat:O,dataVerification:z};Ze(T,h.luckysheet_select_save,q),lt()}},matchcopy:function(e,n){let t=[],l=[],a,o;if(typeof e=="object")t=e;else{t=e.split(` |
| | | `);for(let s=0;s<t.length;s++)t[s]=t[s].split(" ")}if(a=t.length,typeof n=="object")l=n;else{l=n.split(` |
| | | `);for(let s=0;s<l.length;s++)l[s]=l[s].split(" ")}if(o=l.length,a!=o)return!1;for(let s=0;s<a;s++)if(!(h.config.rowhidden!=null&&h.config.rowhidden[s]!=null)){for(let u=0;u<o;u++)if(t[s].length!=l[u].length)return!1}for(let s=0;s<a;s++)if(!(h.config.rowhidden!=null&&h.config.rowhidden[s]!=null)){for(let u=0;u<t[0].length;u++)if(ze(s,u,t)!=ze(s,u,l))return!1}return!0}},Ct=mv});function rl(e){$("#luckysheet-cols-h-hover").hide(),$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-cell-selected-boxs .luckysheet-cell-selected").hide(),$("#luckysheet-cols-h-selected .luckysheet-cols-h-selected").hide(),$("#luckysheet-rows-h-selected .luckysheet-rows-h-selected").hide(),$("#luckysheet-cell-selected-focus").hide(),$("#luckysheet-rows-h-hover").hide(),$("#luckysheet-selection-copy .luckysheet-selection-copy").hide(),$("#luckysheet-cols-menu-btn").hide(),$("#luckysheet-row-count-show, #luckysheet-column-count-show").hide(),e||Ct.clearcopy(e),$("#luckysheet-dropCell-icon").is(":visible")&&e&&$("#luckysheet-dropCell-icon").remove(),ke.luckysheetPaintModelOn&&!e&&ke.cancelPaintModel()}var Vr=Ie(()=>{Wa();il()});function pc(e,n,t,l,a){let o=bu();o=_e(o,{logotitle:a}),o=_e(o,{menu:Nu()});let s=ku;h.config==null&&(h.config={}),yn(n,e);let d=Q().info,f='<button id="luckysheet-bottom-add-row" class="btn btn-default">'+d.add+'</button><input id="luckysheet-bottom-add-row-input" type="text" class="luckysheet-datavisual-config-input luckysheet-mousedown-cancel" placeholder="'+(fe.addRowCount||100)+'"><span style="font-size: 14px;">'+d.row+'</span><span style="font-size: 14px;color: #9c9c9c;">('+d.addLast+")</span>",m=' <button id="luckysheet-bottom-bottom-top" class="btn btn-default" style="">'+d.backTop+"</button>",g=_e(d.pageInfo,{total:fe.total?fe.total:"",totalPage:fe.pageInfo.totalPage?fe.pageInfo.totalPage:"",currentPage:fe.pageInfo.currentPage?fe.pageInfo.currentPage:""}),y=' <span id="luckysheet-bottom-page-info" style="font-size: 14px;color: #f34141;">'+g+'</span> <button id="luckysheet-bottom-page-next" class="btn btn-danger" style="">\u4E0B\u4E00\u9875</button>',v=' <span id="luckysheet-bottom-page-info" style="font-size: 14px;color: #f34141;">'+g+"</span>",b="";fe.enableAddRow&&(b+=f),fe.enablePage&&(parseInt(fe.pageInfo.totalPage)==1?b+=v:b+=y),fe.enableAddBackTop&&(b+=m);let k=_e('<div id="luckysheetcoltable_0" class="luckysheet-cell-flow-col"> <div id ="luckysheet-sheettable_0" class="luckysheet-cell-sheettable" style="height:${height}px;width:${width}px;"></div><div id="luckysheet-bottom-controll-row" class="luckysheet-bottom-controll-row"> '+b+" </div> </div>",{height:h.rh_height,width:h.ch_width-1}),w=_e(Tu,{width:h.ch_width,index:0,column:""});s=_e(s,{width:h.ch_width,flow:k,index:0}),o=_e(o,{flow:s,rowHeader:"<div style='height:"+h.rh_height+"px' id='luckysheetrowHeader_0' class='luckysheetsheetchange'></div>",columnHeader:w,functionButton:fe.functionButton}),$("#"+h.container).append(o),$("#luckysheet-scrollbar-x div").width(h.ch_width),$("#luckysheet-scrollbar-y div").height(h.rh_height+h.columnHeaderHeight-h.cellMainSrollBarSize-3),$("body").append(Ru),$("body").append(wu),$("body").append(xu()),$("body").append(Iu),$("body").append(_e(Gi(),{menuid:"filter"})),$("body").append(_e(Wi(),{menuid:"filter"})),$("body").append(Au()),$("#luckysheet-rows-h").width(h.rowHeaderWidth-1.5),$("#luckysheet-cols-h-c").height(h.columnHeaderHeight-1.5),$("#luckysheet-left-top").css({width:h.rowHeaderWidth-1.5,height:h.columnHeaderHeight-1.5}),$("#luckysheet_info_detail_input").val(fe.title)}var xf=Ie(()=>{Gt();xl();Ur();Kt();Jt();Ii();dt();Xe();bt()});function _f(e){e==null&&(e="chart");for(var n=window.navigator.userAgent.replace(/[^a-zA-Z0-9]/g,"").split(""),t="",l=0;l<12;l++)t+=n[Math.round(Math.random()*(n.length-1))];var a=new Date().getTime();return e+"_"+t+"_"+a}function gc(e,n){return e.replace(/\$\{([\w]+)\}/g,function(t,l){var a=n[l];return typeof a!="undefined"?a:t})}var Cf=Ie(()=>{});var br,_n,pv,D,Li=Ie(()=>{dt();Ft();Al();Ut();br=Fl(vn()),_n={v:"#VALUE!",n:"#NAME?",na:"#N/A",r:"#REF!",d:"#DIV/0!",nm:"#NUM!",nl:"#NULL!",sp:"#SPILL!"},pv={getCellDataArr:function(e,n,t){let l=[];if(e.data==null)t||(n==="number"?l.push(0):n==="text"&&l.push(""));else if(P(e.data)==="array")for(let a=0;a<e.data.length;a++)for(let o=0;o<e.data[a].length;o++){let s=e.data[a][o],u=s;P(s)==="object"&&(u=s.v),u==null?t||(n==="number"?u=0:n==="text"&&(u=""),l.push(u)):l.push(u)}else me(e.data.v)?t||(n=="number"?l.push(0):n=="text"&&l.push("")):l.push(e.data.v);return l},getCellDataDyadicArr:function(e,n){let t=[];if(e.data==null){let l=[];n=="number"?l.push(0):n=="text"&&l.push(""),t.push(l)}else if(P(e.data)=="array")for(let l=0;l<e.data.length;l++){let a=[];for(let o=0;o<e.data[l].length;o++){let s=e.data[l][o],u=s;P(s)==="object"&&(u=s.v),u==null&&(n==="number"?u=0:n==="text"&&(u="")),a.push(u)}t.push(a)}else{let l=[],a=e.data.v;me(a)&&(n=="number"?a=0:n=="text"&&(a="")),l.push(a),t.push(l)}return t},getDataArr:function(e,n){let t=[];if(n==null&&(n=!1),P(e[0])=="array")for(let l=0;l<e.length;l++)for(let a=0;a<e[l].length;a++)n&&!B(e[l][a])||t.push(e[l][a]);else for(let l=0;l<e.length;l++)n&&!B(e[l])||t.push(e[l]);return t},getDataDyadicArr:function(e){let n=[];if(P(e[0])=="array")for(let t=0;t<e.length;t++){let l=[];for(let a=0;a<e[t].length;a++)l.push(e[t][a]);n.push(l)}else{let t=[];for(let l=0;l<e.length;l++)t.push(e[l]);n.push(t)}return n},isDyadicArr:function(e){let n=!0;if(e.length>1){let t=e[0].length;for(let l=1;l<e.length;l++)if(e[l].length!=t){n=!1;break}}return n},getFirstValue:function(e,n){let t=this;n==null&&(n="number");let l;if(P(e)=="array")if(P(e[0])=="array"){if(!t.isDyadicArr(e))return _n.v;l=e[0][0]}else l=e[0];else if(P(e)=="object"&&e.startCell!=null)if(e.data==null)n=="number"?l=0:n=="text"&&(l="");else{let a=window.luckysheetCurrentRow,o=window.luckysheetCurrentColumn;if(e.rowl==1&&e.coll==1)l=e.data,l==null||me(l.v)?n=="number"?l=0:n=="text"&&(l=""):l=l.v;else if(e.data[0][0].mc!=null&&e.data[0][0].mc.rs==e.rowl&&e.data[0][0].mc.cs==e.coll)l=e.data[0][0],l==null||me(l.v)?n=="number"?l=0:n=="text"&&(l=""):l=l.v;else if(e.rowl==1||e.coll==1){let s=p.getcellrange(e.startCell),u=s.row[0],d=u+e.rowl-1,f=s.column[0],m=f+e.coll-1;if(e.rowl==1){if(o<f||o>m)return _n.v;l=e.data[0][o-f]}else if(e.coll==1){if(a<u||a>d)return _n.v;l=e.data[a-u][0]}l==null||me(l.v)||l.mc!=null?n=="number"?l=0:n=="text"&&(l=""):l=l.v}else return _n.v}else l=e;return l},getCellBoolen:function(e){let t=this.getFirstValue(e);if(H(t))return t;if(P(t)!="boolean")if(P(t)=="string"&&(t.toLowerCase()=="true"||t.toLowerCase()=="false"))t.toLowerCase()=="true"?t=!0:t.toLowerCase()=="false"&&(t=!1);else if(B(t))t=parseFloat(t),t=t!=0;else return _n.v;return t},getCellDate:function(e){let n=this,t;if(P(e)=="array")if(P(e[0])=="array"){if(!n.isDyadicArr(e))return _n.v;t=e[0][0]}else t=e[0];else if(P(e)=="object"&&e.startCell!=null){if(e.data==null||P(e.data)=="array"||me(e.data.v))return _n.v;t=e.data.v,e.data.ct!=null&&e.data.ct.t=="d"&&(t=mt("YYYY-MM-DD h:mm:ss",t))}else t=e;return t},getCellrangeDate:function(e){let n=this,t=[];if(P(e)=="array"){if(P(e[0])=="array"&&!n.isDyadicArr(e))return _n.v;t=t.concat(n.getDataArr(e,!1))}else if(P(e)=="object"&&e.startCell!=null)if(e.data==null)t.push(0);else if(P(e.data)=="array")for(let l=0;l<e.data.length;l++)for(let a=0;a<e.data[l].length;a++)if(e.data[l][a]!=null&&!me(e.data[l][a].v)){let o=e.data[l][a].v;e.data[l][a].ct!=null&&e.data[l][a].ct.t=="d"&&(o=mt("YYYY-MM-DD h:mm:ss",o)),t.push(o)}else t.push(0);else{let l=e.data.v;e.data.ct!=null&&e.data.ct.t=="d"&&(l=mt("YYYY-MM-DD h:mm:ss",l)),t.push(l)}else t.push(e);return t},getRegExpStr:function(e){return e.replace("~*","\\*").replace("~?","\\?").replace(".","\\.").replace("*",".*").replace("?",".")},factorial:function(e){return e==0||e==1?1:e*this.factorial(e-1)},factorialDouble:function(e){return e<=0?1:e*this.factorialDouble(e-2)},variance:function(e){let n=0,t=0;for(let o=0;o<e.length;o++)n+=e[o],t++;let l=n/t,a=0;for(let o=0;o<e.length;o++){let s=e[o];a+=(s-l)*(s-l)}return a/t},variance_s:function(e){let n=0,t=0;for(let o=0;o<e.length;o++)n+=e[o],t++;let l=n/t,a=0;for(let o=0;o<e.length;o++){let s=e[o];a+=(s-l)*(s-l)}return a/(t-1)},standardDeviation:function(e){let n=0,t=0;for(let o=0;o<e.length;o++)n+=e[o],t++;let l=n/t,a=0;for(let o=0;o<e.length;o++){let s=e[o];a+=(s-l)*(s-l)}return Math.sqrt(a/t)},standardDeviation_s:function(e){let n=0,t=0;for(let o=0;o<e.length;o++)n+=e[o],t++;let l=n/t,a=0;for(let o=0;o<e.length;o++){let s=e[o];a+=(s-l)*(s-l)}return Math.sqrt(a/(t-1))},isLeapYear:function(e){return new Date(e,1,29).getMonth()===1},feb29Between:function(e,n){let t=this,l=(0,br.default)(e).year(),a=(0,br.default)().set({year:l,month:2,date:1});if(t.isLeapYear(l)&&(0,br.default)(e)<(0,br.default)(a)&&(0,br.default)(n)>=(0,br.default)(a))return!0;let o=(0,br.default)(n).year(),s=(0,br.default)().set({year:o,month:2,date:1});return t.isLeapYear(o)&&(0,br.default)(n)>=(0,br.default)(s)&&(0,br.default)(e)<(0,br.default)(s)},findResultIndex:function(e,n){let t={};for(let o=1;o<e[0].length;++o)t[o]=!0;let l=n[0].length;for(i=1;i<n.length;++i)n[i].length>l&&(l=n[i].length);for(let o=1;o<e.length;++o)for(let s=1;s<e[o].length;++s){let u=!1,d=!1;for(let f=0;f<n.length;++f){let m=n[f];if(m.length<l)continue;let g=m[0];if(e[o][0]===g){d=!0;for(let y=1;y<m.length;++y)u=u||new Function("return "+e[o][s]+m[y])()}}d&&(t[s]=t[s]&&u)}let a=[];for(let o=0;o<e[0].length;++o)t[o]&&a.push(o-1);return a},findField:function(e,n){let t=null;for(let l=0;l<e.length;l++)if(e[l][0]==n){t=l;break}return t==null?_n.v:t},rest:function(e,n){return n=n||1,!e||typeof e.slice!="function"?e:e.slice(n)},compact:function(e){if(!e)return e;let n=[];for(let t=0;t<e.length;++t)!e[t]||n.push(e[t]);return n}},D=pv});function So(e){var n=Tf.sylvester_matrix.create(e);return n.inverse().elements}var Tf,gv,yc=Ie(()=>{Tf={},gv=function(n){var t=function(){};t.precision=1e-6,t.create=function(a){var o=new t;return o.setElements(a)};var l=t.create;t.I=function(a){for(var o=[],s=a,u;s--;)for(u=a,o[s]=[];u--;)o[s][u]=s===u?1:0;return t.create(o)},t.prototype={e:function(a,o){return a<1||a>this.elements.length||o<1||o>this.elements[0].length?null:this.elements[a-1][o-1]},dimensions:function(){var a=this.elements.length===0?0:this.elements[0].length;return{rows:this.elements.length,cols:a}},rows:function(){return this.elements.length},cols:function(){return this.elements.length===0?0:this.elements[0].length},eql:function(a){var o=a.elements||a;if((!o[0]||typeof o[0][0]=="undefined")&&(o=t.create(o).elements),this.elements.length===0||o.length===0)return this.elements.length===o.length;if(this.elements.length!==o.length||this.elements[0].length!==o[0].length)return!1;for(var s=this.elements.length,u=this.elements[0].length,d;s--;)for(d=u;d--;)if(Math.abs(this.elements[s][d]-o[s][d])>t.precision)return!1;return!0},dup:function(){return t.create(this.elements)},map:function(a,o){if(this.elements.length===0)return t.create([]);for(var s=[],u=this.elements.length,d=this.elements[0].length,f;u--;)for(f=d,s[u]=[];f--;)s[u][f]=a.call(o,this.elements[u][f],u+1,f+1);return t.create(s)},isSameSizeAs:function(a){var o=a.elements||a;return typeof o[0][0]=="undefined"&&(o=t.create(o).elements),this.elements.length===0?o.length===0:this.elements.length===o.length&&this.elements[0].length===o[0].length},add:function(a){if(this.elements.length===0)return this.map(function(s){return s});var o=a.elements||a;return typeof o[0][0]=="undefined"&&(o=t.create(o).elements),this.isSameSizeAs(o)?this.map(function(s,u,d){return s+o[u-1][d-1]}):null},subtract:function(a){if(this.elements.length===0)return this.map(function(s){return s});var o=a.elements||a;return typeof o[0][0]=="undefined"&&(o=t.create(o).elements),this.isSameSizeAs(o)?this.map(function(s,u,d){return s-o[u-1][d-1]}):null},canMultiplyFromLeft:function(a){if(this.elements.length===0)return!1;var o=a.elements||a;return typeof o[0][0]=="undefined"&&(o=t.create(o).elements),this.elements[0].length===o.length},multiply:function(a){if(this.elements.length===0)return null;if(!a.elements)return this.map(function(b){return b*a});var o=!!a.modulus,s=a.elements||a;if(typeof s[0][0]=="undefined"&&(s=t.create(s).elements),!this.canMultiplyFromLeft(s))return null;for(var u=this.elements.length,d=s[0].length,f,m=this.elements[0].length,g,y=[],v;u--;)for(f=d,y[u]=[];f--;){for(g=m,v=0;g--;)v+=this.elements[u][g]*s[g][f];y[u][f]=v}var s=t.create(y);return o?s.col(1):s},minor:function(a,o,s,u){if(this.elements.length===0)return null;for(var d=[],f=s,m,g,y,v=this.elements.length,b=this.elements[0].length;f--;)for(m=s-f-1,d[m]=[],g=u;g--;)y=u-g-1,d[m][y]=this.elements[(a+m-1)%v][(o+y-1)%b];return t.create(d)},transpose:function(){if(this.elements.length===0)return t.create([]);for(var a=this.elements.length,o,s=this.elements[0].length,u,d=[],o=s;o--;)for(u=a,d[o]=[];u--;)d[o][u]=this.elements[u][o];return t.create(d)},isSquare:function(){var a=this.elements.length===0?0:this.elements[0].length;return this.elements.length===a},max:function(){if(this.elements.length===0)return null;for(var a=0,o=this.elements.length,s=this.elements[0].length,u;o--;)for(u=s;u--;)Math.abs(this.elements[o][u])>Math.abs(a)&&(a=this.elements[o][u]);return a},indexOf:function(a){if(this.elements.length===0)return null;var o=null,s=this.elements.length,u,d=this.elements[0].length,f;for(u=0;u<s;u++)for(f=0;f<d;f++)if(this.elements[u][f]===a)return{i:u+1,j:f+1};return null},diagonal:function(){if(!this.isSquare)return null;for(var a=[],o=this.elements.length,s=0;s<o;s++)a.push(this.elements[s][s]);return t.create(a)},toRightTriangular:function(){if(this.elements.length===0)return t.create([]);var a=this.dup(),o,s=this.elements.length,u,d,f=this.elements[0].length,m;for(u=0;u<s;u++){if(a.elements[u][u]===0){for(d=u+1;d<s;d++)if(a.elements[d][u]!==0){for(o=[],m=0;m<f;m++)o.push(a.elements[u][m]+a.elements[d][m]);a.elements[u]=o;break}}if(a.elements[u][u]!==0)for(d=u+1;d<s;d++){var g=a.elements[d][u]/a.elements[u][u];for(o=[],m=0;m<f;m++)o.push(m<=u?0:a.elements[d][m]-a.elements[u][m]*g);a.elements[d]=o}}return a},determinant:function(){if(this.elements.length===0)return 1;if(!this.isSquare())return null;for(var a=this.toRightTriangular(),o=a.elements[0][0],s=a.elements.length,u=1;u<s;u++)o=o*a.elements[u][u];return o},isSingular:function(){return this.isSquare()&&this.determinant()===0},trace:function(){if(this.elements.length===0)return 0;if(!this.isSquare())return null;for(var a=this.elements[0][0],o=this.elements.length,s=1;s<o;s++)a+=this.elements[s][s];return a},rank:function(){if(this.elements.length===0)return 0;for(var a=this.toRightTriangular(),o=0,s=this.elements.length,u=this.elements[0].length,d;s--;)for(d=u;d--;)if(Math.abs(a.elements[s][d])>t.precision){o++;break}return o},augment:function(a){if(this.elements.length===0)return this.dup();var o=a.elements||a;typeof o[0][0]=="undefined"&&(o=t.create(o).elements);var s=this.dup(),u=s.elements[0].length,d=s.elements.length,f=o[0].length,m;if(d!==o.length)return null;for(;d--;)for(m=f;m--;)s.elements[d][u+m]=o[d][m];return s},inverse:function(){if(this.elements.length===0||!this.isSquare()||this.isSingular())return null;for(var a=this.elements.length,o=a,s,u=this.augment(t.I(a)).toRightTriangular(),d=u.elements[0].length,f,m,g,y=[],v;o--;){for(m=[],y[o]=[],g=u.elements[o][o],f=0;f<d;f++)v=u.elements[o][f]/g,m.push(v),f>=a&&y[o].push(v);for(u.elements[o]=m,s=o;s--;){for(m=[],f=0;f<d;f++)m.push(u.elements[s][f]-u.elements[o][f]*u.elements[s][o]);u.elements[s]=m}}return t.create(y)},round:function(){return this.map(function(a){return Math.round(a)})},snapTo:function(a){return this.map(function(o){return Math.abs(o-a)<=t.precision?a:o})},setElements:function(a){var o,s,u=a.elements||a;if(u[0]&&typeof u[0][0]!="undefined"){for(o=u.length,this.elements=[];o--;)for(s=u[o].length,this.elements[o]=[];s--;)this.elements[o][s]=u[o][s];return this}var d=u.length;for(this.elements=[],o=0;o<d;o++)this.elements.push([u[o]]);return this}},n.sylvester_matrix=t};gv(Tf)});function Ya(){let e=arguments[1],n=arguments[0],t;P(n)=="object"&&n.startCell!=null?(e=="&"?t=D.getCellDataDyadicArr(n,"text"):t=D.getCellDataDyadicArr(n,"number"),t.length==1&&t[0].length==1&&(t=t[0][0])):t=n;let l=arguments[2],a;if(P(l)=="object"&&l.startCell!=null?(e=="&"?a=D.getCellDataDyadicArr(l,"text"):a=D.getCellDataDyadicArr(l,"number"),a.length==1&&a[0].length==1&&(a=a[0][0])):a=l,H(t))return t;if(H(a))return a;if(P(t)=="array"&&P(t[0])=="array"&&!D.isDyadicArr(t))return Me.v;if(P(a)=="array"&&P(a[0])=="array"&&!D.isDyadicArr(a))return Me.v;if(e=="<>"&&(e="!="),e=="="&&(e="=="),t==null&&a==null)return"#INVERSE!";if(t=="#INVERSE!")t=0,e=="-"?e="+":e=="+"&&(e="-");else if(e=="-"&&t==null)t=0;else if(e=="/"&&(a==0||a==null))return Me.d;function o(u,d,f){if(B(u)&&(u=parseFloat(u)),B(f)&&(f=parseFloat(f)),d=="==")return u==f;if(d=="!=")return u!=f;if(d==">=")return u>=f;if(d=="<=")return u<=f;if(d==">")return u>f;if(d=="<")return u<f}function s(u){return u==null?u:u.toString().toLowerCase()=="true"?1:u.toString().toLowerCase()=="false"?0:u}if(e=="*")if(P(t)=="array"&&P(a)=="array"){let u=[];if(P(t[0])=="array"&&P(a[0])=="array")if(t.length==a.length&&t[0].length==a[0].length)for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){t[d][m]=s(t[d][m]),a[d][m]=s(a[d][m]);let g;B(t[d][m])&&B(a[d][m])?g=Tt(t[d][m],e,a[d][m]):g=Me.v,f.push(g)}u.push(f)}else if(t[0].length==a.length){let d=t.length,f=a[0].length;for(let m=0;m<d;m++){let g=[];for(let y=0;y<f;y++){let v=0;for(let b=0;b<t[0].length;b++)t[m][b]=s(t[m][b]),a[b][y]=s(a[b][y]),B(t[m][b])&&B(a[b][y])?v+=Tt(t[m][b],e,a[b][y]):v+=Me.v;v.toString()=="NaN"&&(v=Me.v),g.push(v)}u.push(g)}}else if(t.length==a[0].length){let d=a.length,f=t[0].length;for(let m=0;m<d;m++){let g=[];for(let y=0;y<f;y++){let v=0;for(let b=0;b<a[0].length;b++)t[b][y]=s(t[b][y]),a[m][b]=s(a[m][b]),B(a[m][b])&&B(t[b][y])?v+=Tt(t[b][y],e,a[m][b]):v+=Me.v;v.toString()=="NaN"&&(v=Me.v),g.push(v)}u.push(g)}}else return Me.na;else if(P(t[0])=="array")if(t[0].length==a.length)for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){t[d][m]=s(t[d][m]),a[m]=s(a[m]);let g;B(t[d][m])&&B(a[m])?g=Tt(t[d][m],e,a[m]):g=Me.v,f.push(g)}u.push(f)}else if(t[0].length==1){let d=t.length,f=a.length;for(let m=0;m<d;m++){let g=[];for(let y=0;y<f;y++){t[m][0]=s(t[m][0]),a[y]=s(a[y]);let v;B(t[m][0])&&B(a[y])?v=Tt(t[m][0],e,a[y]):v=Me.v,g.push(v)}u.push(g)}}else return Me.na;else if(P(a[0])=="array")if(a[0].length==t.length)for(let d=0;d<a.length;d++){let f=[];for(let m=0;m<a[d].length;m++){t[m]=s(t[m]),a[d][m]=s(a[d][m]);let g;B(t[m])&&B(a[d][m])?g=Tt(t[m],e,a[d][m]):g=Me.v,f.push(g)}u.push(f)}else if(a[0].length==1){let d=a.length,f=t.length;for(let m=0;m<d;m++){let g=[];for(let y=0;y<f;y++){t[y]=s(t[y]),a[m][0]=s(a[m][0]);let v;B(t[y])&&B(a[m][0])?v=Tt(t[y],e,a[m][0]):v=Me.v,g.push(v)}u.push(g)}}else return Me.na;else{if(t.length!=a.length)return Me.na;for(let d=0;d<t.length;d++){t[d]=s(t[d]),a[d]=s(a[d]);let f;B(t[d])&&B(a[d])?f=Tt(t[d],e,a[d]):f=Me.v,u.push(f)}}return u}else if(P(t)=="array"){a=s(a);let u=[];if(P(t[0])=="array")for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){t[d][m]=s(t[d][m]);let g;B(t[d][m])&&B(a)?g=Tt(t[d][m],e,a):g=Me.v,f.push(g)}u.push(f)}else for(let d=0;d<t.length;d++){t[d]=s(t[d]);let f;B(t[d])&&B(a)?f=Tt(t[d],e,a):f=Me.v,u.push(f)}return u}else if(P(a)=="array"){t=s(t);let u=[];if(P(a[0])=="array")for(let d=0;d<a.length;d++){let f=[];for(let m=0;m<a[d].length;m++){a[d][m]=s(a[d][m]);let g;B(t)&&B(a[d][m])?g=Tt(t,e,a[d][m]):g=Me.v,f.push(g)}u.push(f)}else for(let d=0;d<a.length;d++){a[d]=s(a[d]);let f;B(t)&&B(a[d])?f=Tt(t,e,a[d]):f=Me.v,u.push(f)}return u}else{t=s(t),a=s(a);let u;return B(t)&&B(a)?u=Tt(t,e,a):u=Me.v,u}else if(e=="/")if(P(t)=="array"&&P(a)=="array"){let u=[];if(P(t[0])=="array"&&P(a[0])=="array")if(t.length==a.length&&t[0].length==a[0].length)for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){t[d][m]=s(t[d][m]),a[d][m]=s(a[d][m]);let g;B(t[d][m])&&B(a[d][m])?parseFloat(a[d][m])==0?g=Me.d:g=Tt(t[d][m],e,a[d][m]):g=Me.v,f.push(g)}u.push(f)}else if(t[0].length==a.length){let d=So(a),f=t.length,m=d[0].length;for(let g=0;g<f;g++){let y=[];for(let v=0;v<m;v++){let b=0;for(let k=0;k<t[0].length;k++)t[g][k]=s(t[g][k]),d[k][v]=s(d[k][v]),B(t[g][k])&&B(d[k][v])?b+=Tt(t[g][k],"*",d[k][v]):b+=Me.v;b.toString()=="NaN"&&(b=Me.v),y.push(b)}u.push(y)}}else return Me.na;else if(P(t[0])=="array")if(t[0].length==a.length)for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){t[d][m]=s(t[d][m]),a[m]=s(a[m]);let g;B(t[d][m])&&B(a[m])?parseFloat(a[m])==0?g=Me.d:g=Tt(t[d][m],e,a[m]):g=Me.v,f.push(g)}u.push(f)}else if(t[0].length==1){let d=t.length,f=a.length;for(let m=0;m<d;m++){let g=[];for(let y=0;y<f;y++){t[m][0]=s(t[m][0]),a[y]=s(a[y]);let v;B(t[m][0])&&B(a[y])?parseFloat(a[y])==0?v=Me.d:v=Tt(t[m][0],e,a[y]):v=Me.v,g.push(v)}u.push(g)}}else return Me.na;else if(P(a[0])=="array")if(a[0].length==t.length)for(let d=0;d<a.length;d++){let f=[];for(let m=0;m<a[d].length;m++){t[m]=s(t[m]),a[d][m]=s(a[d][m]);let g;B(t[m])&&B(a[d][m])?parseFloat(a[d][m])==0?g=Me.d:g=Tt(t[m],e,a[d][m]):g=Me.v,f.push(g)}u.push(f)}else if(a[0].length==1){let d=a.length,f=t.length;for(let m=0;m<d;m++){let g=[];for(let y=0;y<f;y++){t[y]=s(t[y]),a[m][0]=s(a[m][0]);let v;B(t[y])&&B(a[m][0])?parseFloat(a[m][0])==0?v=Me.d:v=Tt(t[y],e,a[m][0]):v=Me.v,g.push(v)}u.push(g)}}else return Me.na;else{if(t.length!=a.length)return Me.na;for(let d=0;d<t.length;d++){t[d]=s(t[d]),a[d]=s(a[d]);let f;B(t[d])&&B(a[d])?parseFloat(a[d])==0?f=Me.d:f=Tt(t[d],e,a[d]):f=Me.v,u.push(f)}}return u}else if(P(t)=="array"){a=s(a);let u=[];if(P(t[0])=="array")for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){t[d][m]=s(t[d][m]);let g;B(t[d][m])&&B(a)?parseFloat(a)==0?g=Me.d:g=Tt(t[d][m],e,a):g=Me.v,f.push(g)}u.push(f)}else for(let d=0;d<t.length;d++){t[d]=s(t[d]);let f;B(t[d])&&B(a)?parseFloat(a)==0?f=Me.d:f=Tt(t[d],e,a):f=Me.v,u.push(f)}return u}else if(P(a)=="array"){t=s(t);let u=[];if(P(a[0])=="array")for(let d=0;d<a.length;d++){let f=[];for(let m=0;m<a[d].length;m++){a[d][m]=s(a[d][m]);let g;B(t)&&B(a[d][m])?parseFloat(a[d][m])==0?g=Me.d:g=Tt(t,e,a[d][m]):g=Me.v,f.push(g)}u.push(f)}else for(let d=0;d<a.length;d++){a[d]=s(a[d]);let f;B(t)&&B(a[d])?parseFloat(a[d])==0?f=Me.d:f=Tt(t,e,a[d]):f=Me.v,u.push(f)}return u}else{t=s(t),a=s(a);let u;return B(t)&&B(a)?parseFloat(a)==0?u=Me.d:u=Tt(t,e,a):u=Me.v,u}else if(e=="+"||e=="-"||e=="%")if(P(t)=="array"&&P(a)=="array"){let u=[];if(P(t[0])=="array"&&P(a[0])=="array"){if(t.length!=a.length&&t[0].length!=a[0].length)return Me.na;for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){t[d][m]=s(t[d][m]),a[d][m]=s(a[d][m]);let g;B(t[d][m])&&B(a[d][m])?e=="%"&&parseFloat(a[d][m])==0?g=Me.d:g=Tt(t[d][m],e,a[d][m]):g=Me.v,f.push(g)}u.push(f)}}else if(P(t[0])=="array"){if(t[0].length!=a.length)return Me.na;for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){t[d][m]=s(t[d][m]),a[m]=s(a[m]);let g;B(t[d][m])&&B(a[m])?e=="%"&&parseFloat(a[m])==0?g=Me.d:g=Tt(t[d][m],e,a[m]):g=Me.v,f.push(g)}u.push(f)}}else if(P(a[0])=="array"){if(a[0].length!=t.length)return Me.na;for(let d=0;d<a.length;d++){let f=[];for(let m=0;m<a[d].length;m++){t[m]=s(t[m]),a[d][m]=s(a[d][m]);let g;B(t[m])&&B(a[d][m])?e=="%"&&parseFloat(a[d][m])==0?g=Me.d:g=Tt(t[m],e,a[d][m]):g=Me.v,f.push(g)}u.push(f)}}else{if(t.length!=a.length)return Me.na;for(let d=0;d<t.length;d++){t[d]=s(t[d]),a[d]=s(a[d]);let f;B(t[d])&&B(a[d])?e=="%"&&parseFloat(a[d])==0?f=Me.d:f=Tt(t[d],e,a[d]):f=Me.v,u.push(f)}}return u}else if(P(t)=="array"){a=s(a);let u=[];if(P(t[0])=="array")for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){t[d][m]=s(t[d][m]);let g;B(t[d][m])&&B(a)?e=="%"&&parseFloat(a)==0?g=Me.d:g=Tt(t[d][m],e,a):g=Me.v,f.push(g)}u.push(f)}else for(let d=0;d<t.length;d++){t[d]=s(t[d]);let f;B(t[d])&&B(a)?e=="%"&&parseFloat(a)==0?f=Me.d:f=Tt(t[d],e,a):f=Me.v,u.push(f)}return u}else if(P(a)=="array"){t=s(t);let u=[];if(P(a[0])=="array")for(let d=0;d<a.length;d++){let f=[];for(let m=0;m<a[d].length;m++){a[d][m]=s(a[d][m]);let g;B(t)&&B(a[d][m])?e=="%"&&parseFloat(a[d][m])==0?g=Me.d:g=Tt(t,e,a[d][m]):g=Me.v,f.push(g)}u.push(f)}else for(let d=0;d<a.length;d++){a[d]=s(a[d]);let f;B(t)&&B(a[d])?e=="%"&&parseFloat(a[d])==0?f=Me.d:f=Tt(t,e,a[d]):f=Me.v,u.push(f)}return u}else{t=s(t),a=s(a);let u;return B(t)&&B(a)?e=="%"&&parseFloat(a)==0?u=Me.d:u=Tt(t,e,a):u=Me.v,u}else if(e=="=="||e=="!="||e==">="||e=="<="||e==">"||e=="<")if(P(t)=="array"&&P(a)=="array"){let u=[];if(P(t[0])=="array"&&P(a[0])=="array"){if(t.length!=a.length&&t[0].length!=a[0].length)return Me.na;for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){let g=o(t[d][m],e,a[d][m]);f.push(g)}u.push(f)}}else if(P(t[0])=="array"){if(t[0].length!=a.length)return Me.na;for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){let g=o(t[d][m],e,a[m]);f.push(g)}u.push(f)}}else if(P(a[0])=="array"){if(a[0].length!=t.length)return Me.na;for(let d=0;d<a.length;d++){let f=[];for(let m=0;m<a[d].length;m++){let g=o(t[m],e,a[d][m]);f.push(g)}u.push(f)}}else{if(t.length!=a.length)return Me.na;for(let d=0;d<t.length;d++){let f=o(t[d],e,a[d]);u.push(f)}}return u}else if(P(t)=="array"){let u=[];if(P(t[0])=="array")for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){let g=o(t[d][m],e,a);f.push(g)}u.push(f)}else for(let d=0;d<t.length;d++){let f=o(t[d],e,a);u.push(f)}return u}else if(P(a)=="array"){let u=[];if(P(a[0])=="array")for(let d=0;d<a.length;d++){let f=[];for(let m=0;m<a[d].length;m++){let g=o(t,e,a[d][m]);f.push(g)}u.push(f)}else for(let d=0;d<a.length;d++){let f=o(t,e,a[d]);u.push(f)}return u}else return o(t,e,a);else if(e=="&")if(P(t)=="array"&&P(a)=="array"){let u=[];if(P(t[0])=="array"&&P(a[0])=="array"){if(t.length!=a.length&&t[0].length!=a[0].length)return Me.na;for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++)f.push(t[d][m]+""+a[d][m]);u.push(f)}}else if(P(t[0])=="array"){if(t[0].length!=a.length)return Me.na;for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++)f.push(t[d][m]+""+a[m]);u.push(f)}}else if(P(a[0])=="array"){if(a[0].length!=t.length)return Me.na;for(let d=0;d<a.length;d++){let f=[];for(let m=0;m<a[d].length;m++)f.push(t[m]+""+a[d][m]);u.push(f)}}else{if(t.length!=a.length)return Me.na;for(let d=0;d<t.length;d++)u.push(t[d]+""+a[d])}return u}else if(P(t)=="array"){let u=[];if(P(t[0])=="array")for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++)f.push(t[d][m]+""+a);u.push(f)}else for(let d=0;d<t.length;d++)u.push(t[d]+""+a);return u}else if(P(a)=="array"){let u=[];if(P(a[0])=="array")for(let d=0;d<a.length;d++){let f=[];for(let m=0;m<a[d].length;m++)f.push(t+""+a[d][m]);u.push(f)}else for(let d=0;d<a.length;d++)u.push(t+""+a[d]);return u}else return t+""+a;else if(e=="^")if(P(t)=="array"&&P(a)=="array"){let u=[];if(P(t[0])=="array"&&P(a[0])=="array"){if(t.length!=a.length&&t[0].length!=a[0].length)return Me.na;for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){t[d][m]=s(t[d][m]),a[d][m]=s(a[d][m]);let g;B(t[d][m])&&B(a[d][m])?g=Math.pow(parseFloat(t[d][m]),parseFloat(a[d][m])):g=Me.v,f.push(g)}u.push(f)}}else if(P(t[0])=="array"){if(t[0].length!=a.length)return Me.na;for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){t[d][m]=s(t[d][m]),a[m]=s(a[m]);let g;B(t[d][m])&&B(a[m])?g=Math.pow(parseFloat(t[d][m]),parseFloat(a[m])):g=Me.v,f.push(g)}u.push(f)}}else if(P(a[0])=="array"){if(a[0].length!=t.length)return Me.na;for(let d=0;d<a.length;d++){let f=[];for(let m=0;m<a[d].length;m++){t[m]=s(t[m]),a[d][m]=s(a[d][m]);let g;B(t[m])&&B(a[d][m])?g=Math.pow(parseFloat(t[m]),parseFloat(a[d][m])):g=Me.v,f.push(g)}u.push(f)}}else{if(t.length!=a.length)return Me.na;for(let d=0;d<t.length;d++){t[d]=s(t[d]),a[d]=s(a[d]);let f;B(t[d])&&B(a[d])?f=Math.pow(parseFloat(t[d]),parseFloat(a[d])):f=Me.v,u.push(f)}}return u}else if(P(t)=="array"){a=s(a);let u=[];if(P(t[0])=="array")for(let d=0;d<t.length;d++){let f=[];for(let m=0;m<t[d].length;m++){t[d][m]=s(t[d][m]);let g;B(t[d][m])&&B(a)?g=Math.pow(parseFloat(t[d][m]),parseFloat(a)):g=Me.v,f.push(g)}u.push(f)}else for(let d=0;d<t.length;d++){t[d]=s(t[d]);let f;B(t[d])&&B(a)?f=Math.pow(parseFloat(t[d]),parseFloat(a)):f=Me.v,u.push(f)}return u}else if(P(a)=="array"){t=s(t);let u=[];if(P(a[0])=="array")for(let d=0;d<a.length;d++){let f=[];for(let m=0;m<a[d].length;m++){a[d][m]=s(a[d][m]);let g;B(t)&&B(a[d][m])?g=Math.pow(parseFloat(t),parseFloat(a[d][m])):g=Me.v,f.push(g)}u.push(f)}else for(let d=0;d<a.length;d++){a[d]=s(a[d]);let f;B(t)&&B(a[d])?f=Math.pow(parseFloat(t),parseFloat(a[d])):f=Me.v,u.push(f)}return u}else{t=s(t),a=s(a);let u;return B(t)&&B(a)?u=Math.pow(parseFloat(t),parseFloat(a)):u=Me.v,u}}function vc(){let e=arguments[0];e=e.replace("{","").replace("}","").replace(/\"/g,"");let n=[];if(e.indexOf(";")>-1){n=e.split(";");for(let t=0;t<n.length;t++)n[t]=n[t].split(",")}else n=e.split(",");return n}function Tt(e,n,t){let l;return n=="+"?l=(0,zi.default)(e).add(t).value():n=="-"?l=(0,zi.default)(e).subtract(t).value():n=="%"?l=new Function("return "+parseFloat(e)+n+"("+parseFloat(t)+")")():n=="/"?l=(0,zi.default)(e).divide(t).value():n=="*"&&(l=(0,zi.default)(e).multiply(t).value()),l}function ar(e){if(window.luckysheet_getcelldata_cache==null&&(window.luckysheet_getcelldata_cache={}),e in window.luckysheet_getcelldata_cache)return window.luckysheet_getcelldata_cache[e];let n=Et(),t=e.split("!"),l="",a="",o=-1,s=null;if(t.length>1){l=t[0].replace(/''/g,"'"),a=t[1],l.substr(0,1)=="'"&&l.substr(l.length-1,1)=="'"&&(l=l.substring(1,l.length-1));for(let u in n)if(l==n[u].name){o=n[u].index,s=n[u].data;break}o==-1&&(o=0)}else{let u=Z(h.calculateSheetIndex);l=n[u].name,o=n[u].index,s=n[u].data,a=t[0]}if(a.indexOf(":")==-1){let u=parseInt(a.replace(/[^0-9]/g,""))-1,d=hl(a.replace(/[^A-Za-z]/g,""));if(!isNaN(u)&&!isNaN(d)){let f=Si(s,{row:[u,u],column:[d,d]})[0][0];if(p.execFunctionGlobalData!=null){let v=p.execFunctionGlobalData[u+"_"+d+"_"+o];v!=null&&(f=v)}let y={sheetName:l,startCell:a,rowl:1,coll:1,data:f};return window.luckysheet_getcelldata_cache[e]=y,y}else return[]}else{a=a.split(":");let u=[],d=[];if(u[0]=parseInt(a[0].replace(/[^0-9]/g,""))-1,u[1]=parseInt(a[1].replace(/[^0-9]/g,""))-1,isNaN(u[0])&&(u[0]=0),isNaN(u[1])&&(u[1]=s.length-1),u[0]>u[1])return U.info("\u9009\u62E9\u5931\u8D25","\u8F93\u5165\u8303\u56F4\u9519\u8BEF\uFF01"),[];if(d[0]=hl(a[0].replace(/[^A-Za-z]/g,"")),d[1]=hl(a[1].replace(/[^A-Za-z]/g,"")),isNaN(d[0])&&(d[0]=0),isNaN(d[1])&&(d[1]=s[0].length-1),d[0]>d[1])return U.info("\u9009\u62E9\u5931\u8D25","\u8F93\u5165\u8303\u56F4\u9519\u8BEF\uFF01"),[];let f=Si(s,{row:u,column:d});if(p.execFunctionGlobalData!=null)for(let v=u[0];v<=u[1];v++)for(let b=d[0];b<=d[1];b++){let k=p.execFunctionGlobalData[v+"_"+b+"_"+o];k!=null&&(f[v-u[0]][b-d[0]]=k)}let m=u[1]-u[0]+1,g=d[1]-d[0]+1,y={sheetName:l,startCell:a[0],rowl:m,coll:g,data:f};return window.luckysheet_getcelldata_cache[e]=y,y}}function Xa(e){if(typeof e=="object")return e==null?"":Array.isArray(e)?at(e[0])[2]:Array.isArray(e.data)?Me.v:e.data.v===void 0?"":e.data.v;if(p.isCompareOperator(e).flag){if(typeof e=="string"||typeof e=="number")return e}else return at(e)[2];return Me.v}function Wn(){let e=arguments[0];for(let n=0;n<e.length;n++){let t=e[n];typeof t=="object"?t==null?t="":Array.isArray(t)?t=at(t[0])[2]:Array.isArray(t.data)?t=t.data:t.data.v===void 0?t="":t=t.data.v:p.isCompareOperator(t).flag||(t=at(t)[2]),e[n]=t}}function bc(){let e=arguments[0];return e==null||e.length==0?null:e}function kc(e){return e}function wc(){if(!(P(arguments[0])=="object"&&arguments[0].startCell!=null))return p.error.v;var e=arguments[0].startCell,n=D.getFirstValue(arguments[1]);if(H(n))return n;if(!B(n))return p.error.v;n=parseInt(n);var t=D.getFirstValue(arguments[2]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=arguments[0].rowl;if(arguments.length>=4){if(l=D.getFirstValue(arguments[3]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}var a=arguments[0].coll;if(arguments.length==5){if(a=D.getFirstValue(arguments[4]),H(a))return a;if(!B(a))return p.error.v;a=parseInt(a)}if(l<1||a<1)return p.error.r;var o=p.getcellrange(e),s=o.row[0],u=o.column[0];s+=n,u+=t;var d=s+l-1,f=u+a-1;return s<0||d>=h.flowdata.length||u<0||f>=h.flowdata[0].length?p.error.r:xt(h.calculateSheetIndex,{row:[s,d],column:[u,f]})}function xc(e,n,t){let l,a;if(e?(a=n,l=t):(l=n,a=t),l.startCell.indexOf(":")>-1||a.indexOf(":")>-1)return Me.v;if(e)return ar(a+":"+l.startCell);{let o=a,s="";if(a.indexOf("!")>-1){let u=a.split("!");s=u[0]+"!",o=u[1]}return ar(s+l.startCell+":"+o)}}var zi,Oi=Ie(()=>{Li();Ut();ll();Ft();Kt();Al();yc();Nt();dt();Xe();zi=Fl(sa())});function If(e,n){Ro(vv),Io(yv,null,function(){let t=new Vuex.Store;console.info("chartmix::",chartmix.default),Vue.use(chartmix.default,{store:t});let l=document.getElementsByTagName("body")[0];chartmix.default.initChart(l,h.lang),$(".chartSetting").css({top:"1px",bottom:"1px",position:"absolute",right:"0px",width:"350px",background:"#fff",border:"1px solid #E5E5E5","z-index":1004,"box-shadow":"0px 2px 4px rgba(0,0,0,0.2)","-webkit-box-shadow":"0px 2px 4px rgba(0,0,0,0.2)","-moz-box-shadow":"0px 2px 4px rgba(0,0,0,0.2)","-moz-user-select":"none","-khtml-user-select":"none","-webkit-user-select":"none","-ms-user-select":"none","user-select":"none","padding-left":"30px",display:"none"}),h.createChart=chartmix.default.createChart,h.highlightChart=chartmix.default.highlightChart,h.deleteChart=chartmix.default.deleteChart,h.resizeChart=chartmix.default.resizeChart,h.changeChartRange=chartmix.default.changeChartRange,h.changeChartCellData=chartmix.default.changeChartCellData,h.getChartJson=chartmix.default.getChartJson,h.chart_selection=wv(),h.chartparam.jfrefreshchartall=kv,h.chartparam.changeChartCellData=chartmix.default.changeChartCellData,h.chartparam.renderChart=chartmix.default.renderChart,h.chartparam.getChartJson=chartmix.default.getChartJson,h.chartparam.insertToStore=chartmix.default.insertToStore;for(let a=0;a<e.length;a++)bv(e[a].chart,n);for(let a=0;a<e.length;a++)e[a].status=="1"&&Tc(e[a].index);Ao(h.asyncLoad,"chart")})}function bv(e,n){if(e!=null)for(let t=0;t<e.length;t++){let l=e[t];n&&h.chartparam.insertToStore({chart_id:l.chart_id,chartOptions:l.chartOptions});let a=l.chart_id,o=a+"_c",s='<div id="${id}"class="luckysheet-modal-dialog luckysheet-modal-dialog-chart ${addclass}"tabindex="0"role="dialog"aria-labelledby=":41e"dir="ltr"><div class="luckysheet-modal-dialog-resize"><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-lt"data-type="lt"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-mt"data-type="mt"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-lm"data-type="lm"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-rm"data-type="rm"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-rt"data-type="rt"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-lb"data-type="lb"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-mb"data-type="mb"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-rb"data-type="rb"></div></div><div class="luckysheet-modal-dialog-controll"><span class="luckysheet-modal-controll-btn luckysheet-modal-controll-update"role="button"tabindex="0"aria-label="\u4FEE\u6539\u56FE\u8868"title="\u4FEE\u6539\u56FE\u8868"><i class="fa fa-pencil"aria-hidden="true"></i></span><span class="luckysheet-modal-controll-btn luckysheet-modal-controll-max"role="butluckysheet_chartIns_indexton"tabindex="0"aria-label="\u6700\u5927\u5316"title="\u6700\u5927\u5316"><i class="fa fa-window-maximize"aria-hidden="true"></i></span><span class="luckysheet-modal-controll-btn luckysheet-modal-controll-del"role="button"tabindex="0"aria-label="\u5220\u9664"title="\u5220\u9664"><i class="fa fa-trash"aria-hidden="true"></i></span></div><div class="luckysheet-modal-dialog-content">${content}</div></div>',u=$(gc(s,{id:o,addclass:"luckysheet-data-visualization-chart",title:"\u56FE\u8868\u751F\u6210",content:""})).appendTo($(".luckysheet-cell-main"));Rf(u),$(`#${o}`).children(".luckysheet-modal-dialog-content")[0].id=a;let d=document.getElementById(o),f;f=h.chartparam.getChartJson(l.chart_id),h.chartparam.renderChart({chart_id:l.chart_id,chartOptions:f}),h.currentChart=f,Ka(a),$(`#${a}_c .luckysheet-modal-controll-del`).click(function(b){Af(a)}),$(`#${a}_c .luckysheet-modal-controll-update`).click(function(b){Ff()}),u.children(".luckysheet-modal-dialog-content").mousedown(function(b){h.chartparam.luckysheetCurrentChartMaxState||Ka(a),b.stopPropagation()}),u.mousedown(function(b){if(!h.chartparam.luckysheetCurrentChartMaxState){Ka(a),Qr(!0),!$(b.target).is(".luckysheet-modal-dialog-controll")&&!$(b.target).is(".luckysheet-modal-controll-btn")&&!$(b.target).is("i")&&(h.chartparam.luckysheetCurrentChartMoveTimeout=setTimeout(function(){h.chartparam.luckysheetCurrentChartMove=!0},100));var k=h.chartparam.luckysheetCurrentChartMoveObj.offset(),w=h.chartparam.luckysheetCurrentChartMoveObj.position();h.chartparam.luckysheetCurrentChartMoveXy=[b.pageX-k.left,b.pageY-k.top,w.left,w.top,$("#luckysheet-scrollbar-x").scrollLeft(),$("#luckysheet-scrollbar-y").scrollTop()],h.chartparam.luckysheetCurrentChartMoveWinH=$("#luckysheet-cell-main")[0].scrollHeight,h.chartparam.luckysheetCurrentChartMoveWinW=$("#luckysheet-cell-main")[0].scrollWidth,!$(b.target).hasClass("luckysheet-mousedown-cancel")&&$(b.target).filter("[class*='sp-palette']").length==0&&$(b.target).filter("[class*='sp-thumb']").length==0&&$(b.target).filter("[class*='sp-']").length==0&&($("#luckysheet-rightclick-menu").hide(),$("#luckysheet-cols-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide(),$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu, #luckysheet-user-menu").hide(),$("body > .luckysheet-filter-menu, body > .luckysheet-filter-submenu, body > .luckysheet-cols-menu").hide()),b.stopPropagation()}}).find(".luckysheet-modal-dialog-resize-item").mousedown(function(b){if(h.chartparam.luckysheetCurrentChartActive){h.chartparam.luckysheetCurrentChartResize=$(this).data("type");var k=nt(b.pageX,b.pageY),w=$("#luckysheet-scrollbar-x").scrollLeft(),x=$("#luckysheet-scrollbar-y").scrollTop(),C=k[0]+w,S=k[1]+x,_=h.chartparam.luckysheetCurrentChartResizeObj.position();h.chartparam.luckysheetCurrentChartResizeXy=[C,S,u.width(),u.height(),_.left+w,_.top+x,w,x],h.chartparam.luckysheetCurrentChartResizeWinH=$("#luckysheet-cell-main")[0].scrollHeight,h.chartparam.luckysheetCurrentChartResizeWinW=$("#luckysheet-cell-main")[0].scrollWidth,h.chartparam.luckysheetCurrentChart=a,b.stopPropagation()}});let m=l.width,g=l.height,y=l.left,v=l.top;d.style.width=m+"px",d.style.height=g+"px",d.style.position="absolute",d.style.background="#fff",d.style.left=y+"px",d.style.top=v+"px",d.style.zIndex=h.zIndex?h.zIndex:15,h.zIndex++}}function kv(e,n,t,l,a){let o=h.currentChart;if(!!o&&o.rangeArray.length==1){var s=o.rangeArray[0].row,u=o.rangeArray[0].column;if(n>s[1]||t<s[0]||l>u[1]||a<u[0])return;var d=p.getcellrange(o.rangeTxt),f=d.sheetIndex==-1?0:d.sheetIndex,m={row:d.row,column:d.column,dataSheetIndex:f},g=ar(o.rangeTxt);if(typeof g=="object"&&g.length!=0&&g.data.length!=null){var y=g.data;h.chartparam.changeChartCellData(o.chart_id,y)}}}function wv(){return{create:function(){var e=h.currentChart;if(e.rangeArray.length>1)return;$("#luckysheet-chart-rangeShow").empty(),$("#luckysheet-cell-selected-boxs").hide(),$("#luckysheet-cell-selected-focus").hide(),$("#luckysheet-rows-h-selected").empty(),$("#luckysheet-cols-h-selected").empty(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide();var n=e.rangeArray[0].row[0],t=e.rangeArray[0].column[0],l=e.rangeSplitArray,a=e.rangeRowCheck;if(a.exits)var o=f("rowtitle",l.rowtitle.row[0]+n,l.rowtitle.row[1]+n,l.rowtitle.column[0]+t,l.rowtitle.column[1]+t);else var o="";var s=e.rangeColCheck;if(s.exits)var u=f("coltitle",l.coltitle.row[0]+n,l.coltitle.row[1]+n,l.coltitle.column[0]+t,l.coltitle.column[1]+t);else var u="";var d=f("content",l.content.row[0]+n,l.content.row[1]+n,l.content.column[0]+t,l.content.column[1]+t);$("#luckysheet-chart-rangeShow").append(o+u+d);function f(m,g,y,v,b){var k=Yi(),w=Xi(),x=k[y],C=g-1==-1?0:k[g-1],S=w[b],_=v-1==-1?0:w[v-1];if(m=="rowtitle")var T="#C65151";if(m=="coltitle")var T="#9667C0";if(m=="content")var T="#4970D1";var A='<div id="luckysheet-chart-rangeShow-'+m+'" style="left: '+_+"px;width: "+(S-_-1)+"px;top: "+C+"px;height: "+(x-C-1)+'px;border: none;margin: 0;position: absolute;z-index: 14;"><div class="luckysheet-chart-rangeShow-move" data-type="top" style="height: 2px;border-top: 2px solid #fff;border-bottom: 2px solid #fff;background: '+T+';position: absolute;left: 0;right: 0;top: -2px;z-index: 18;opacity: 0.9;cursor: move;"></div><div class="luckysheet-chart-rangeShow-move" data-type="right" style="width: 2px;border-left: 2px solid #fff;border-right: 2px solid #fff;background: '+T+';position: absolute;top: 0;bottom: 0;right: -2px;z-index: 18;opacity: 0.9;cursor: move;"></div><div class="luckysheet-chart-rangeShow-move" data-type="bottom" style="height: 2px;border-top: 2px solid #fff;border-bottom: 2px solid #fff;background: '+T+';position: absolute;left: 0;right: 0;bottom: -2px;z-index: 18;opacity: 0.9;cursor: move;"></div><div class="luckysheet-chart-rangeShow-move" data-type="left" style="width: 2px;border-left: 2px solid #fff;border-right: 2px solid #fff;background: '+T+';position: absolute;top: 0;bottom: 0;left: -2px;z-index: 18;opacity: 0.9;cursor: move;"></div><div style="border: 2px solid #85c0fc;background: '+T+';position: absolute;top: 0;right: 0;bottom: 0;left: 0;z-index: 15;opacity: 0.1;"></div><div class="luckysheet-chart-rangeShow-resize" data-type="lt" style="width: 6px;height: 6px;border: 1px solid #fff;background: '+T+';position: absolute;left: -3px;top: -3px;z-index: 19;cursor: se-resize;"></div><div class="luckysheet-chart-rangeShow-resize" data-type="rt" style="width: 6px;height: 6px;border: 1px solid #fff;background: '+T+';position: absolute;right: -3px;top: -3px;z-index: 19;cursor: ne-resize;"></div><div class="luckysheet-chart-rangeShow-resize" data-type="lb" style="width: 6px;height: 6px;border: 1px solid #fff;background: '+T+';position: absolute;left: -3px;bottom: -3px;z-index: 19;cursor: ne-resize;"></div><div class="luckysheet-chart-rangeShow-resize" data-type="rb" style="width: 6px;height: 6px;border: 1px solid #fff;background: '+T+';position: absolute;right: -3px;bottom: -3px;z-index: 19;cursor: se-resize;"></div></div>';return A}},rangeMove:!1,rangeMovexy:null,rangeMoveIndex:null,rangeMoveObj:null,rangeMoveDraging:function(e,n,t){var l=h.currentChart,a=l.rangeArray[0].row[0],o=l.rangeArray[0].column[0],s=l.rangeRowCheck,u=l.rangeColCheck,d=l.rangeSplitArray,f=nt(e.pageX,e.pageY),m=$("#luckysheet-cell-main").scrollLeft(),g=$("#luckysheet-cell-main").scrollTop(),y=f[0]+m,v=f[1]+g,b=$(window).height()+g-n-t,k=$(window).width()+m,w=Sf(v),x=w[2],C=$f(y),S=C[2],_=Yi(),T=Xi(),A=h.chart_selection.rangeMoveObj.attr("id");if(A=="luckysheet-chart-rangeShow-content"){var R=h.chart_selection.rangeMoveIndex[0]-h.chart_selection.rangeMovexy[0]+x;s.exits?(R<a+s.range[1]+1||v<0)&&(R=a+s.range[1]+1):(R<0||v<0)&&(R=0);var I=d.content.row[1]-d.content.row[0]+R;(I>=_.length-1||v>b)&&(R=_.length-1-d.content.row[1]+d.content.row[0],I=_.length-1);var F=h.chart_selection.rangeMoveIndex[1]-h.chart_selection.rangeMovexy[1]+S;u.exits?(F<o+u.range[1]+1||y<0)&&(F=o+u.range[1]+1):(F<0||y<0)&&(F=0);var z=d.content.column[1]-d.content.column[0]+F;(z>=T.length-1||y>k)&&(F=T.length-1-d.content.column[1]+d.content.column[0],z=T.length-1),s.exits&&u.exits?(l.rangeArray=[{row:[a,I],column:[o,z]}],l.rangeSplitArray.range={row:[a,I],column:[o,z]},l.rangeSplitArray.content={row:[R-a,I-a],column:[F-o,z-o]},l.rangeSplitArray.rowtitle={row:l.rangeSplitArray.rowtitle.row,column:[F-o,z-o]},l.rangeSplitArray.coltitle={row:[R-a,I-a],column:l.rangeSplitArray.coltitle.column}):s.exits?(l.rangeArray=[{row:[a,I],column:[F,z]}],l.rangeSplitArray.range={row:[a,I],column:[F,z]},l.rangeSplitArray.content={row:[R-a,I-a],column:l.rangeSplitArray.content.column}):u.exits?(l.rangeArray=[{row:[R,I],column:[o,z]}],l.rangeSplitArray.range={row:[R,I],column:[o,z]},l.rangeSplitArray.content={row:l.rangeSplitArray.content.row,column:[F-o,z-o]}):(l.rangeArray=[{row:[R,I],column:[F,z]}],l.rangeSplitArray.range={row:[R,I],column:[F,z]})}else if(A=="luckysheet-chart-rangeShow-rowtitle"){var F=h.chart_selection.rangeMoveIndex[1]-h.chart_selection.rangeMovexy[1]+S;u.exits?(F<o+u.range[1]+1||y<0)&&(F=o+u.range[1]+1):(F<0||y<0)&&(F=0);var z=d.rowtitle.column[1]-d.rowtitle.column[0]+F;(z>=T.length-1||y>k)&&(F=T.length-1-d.rowtitle.column[1]+d.rowtitle.column[0],z=T.length-1),u.exits?(l.rangeArray=[{row:l.rangeArray[0].row,column:[o,z]}],l.rangeSplitArray.range={row:l.rangeArray[0].row,column:[o,z]},l.rangeSplitArray.rowtitle={row:l.rangeSplitArray.rowtitle.row,column:[F-o,z-o]},l.rangeSplitArray.content={row:l.rangeSplitArray.content.row,column:[F-o,z-o]}):(l.rangeArray=[{row:l.rangeArray[0].row,column:[F,z]}],l.rangeSplitArray.range={row:l.rangeArray[0].row,column:[F,z]})}else if(A=="luckysheet-chart-rangeShow-coltitle"){var R=h.chart_selection.rangeMoveIndex[0]-h.chart_selection.rangeMovexy[0]+x;s.exits?(R<a+s.range[1]+1||v<0)&&(R=a+s.range[1]+1):(R<0||v<0)&&(R=0);var I=d.coltitle.row[1]-d.coltitle.row[0]+R;(I>=_.length-1||v>b)&&(R=_.length-1-d.coltitle.row[1]+d.coltitle.row[0],I=_.length-1),s.exits?(l.rangeArray=[{row:[a,I],column:l.rangeArray[0].column}],l.rangeSplitArray.range={row:[a,I],column:l.rangeArray[0].column},l.rangeSplitArray.coltitle={row:[R-a,I-a],column:l.rangeSplitArray.coltitle.column},l.rangeSplitArray.content={row:[R-a,I-a],column:l.rangeSplitArray.content.column}):(l.rangeArray=[{row:[R,I],column:l.rangeArray[0].column}],l.rangeSplitArray.range={row:[R,I],column:l.rangeArray[0].column})}h.chart_selection.create()},rangeMoveDragged:function(){h.chart_selection.rangeMove=!1;var e=h.currentChart;e.rangeTxt=xt(h.currentSheetIndex,e.rangeArray[0],h.currentSheetIndex),e.chartData=Pt(e.rangeArray[0],h.currentSheetIndex),h.changeChartRange(e.chart_id,e.chartData,e.rangeArray,e.rangeTxt)},rangeResize:!1,rangeResizexy:null,rangeResizeIndex:null,rangeResizeObj:null,rangeResizeDraging:function(e,n,t){var l=h.currentChart,a=l.rangeArray[0].row[0],o=l.rangeArray[0].column[0],s=l.rangeRowCheck,u=l.rangeColCheck,d=l.rangeSplitArray,f=nt(e.pageX,e.pageY),m=$("#luckysheet-cell-main").scrollLeft(),g=$("#luckysheet-cell-main").scrollTop(),y=f[0]+m,v=f[1]+g,b=$(window).height()+g-n-t,k=$(window).width()+m,w=Sf(v),x=w[2],C=$f(y),S=C[2],_=Yi(),T=Xi(),A=h.chart_selection.rangeResizeObj.attr("id");if(A=="luckysheet-chart-rangeShow-content"){var R,I,F,z;if(h.chart_selection.rangeResize=="lt"?(R=h.chart_selection.rangeResizeIndex.row[0],F=h.chart_selection.rangeResizeIndex.column[0],I=h.chart_selection.rangeResizeIndex.row[1],z=h.chart_selection.rangeResizeIndex.column[1]):h.chart_selection.rangeResize=="lb"?(R=h.chart_selection.rangeResizeIndex.row[1],F=h.chart_selection.rangeResizeIndex.column[0],I=h.chart_selection.rangeResizeIndex.row[0],z=h.chart_selection.rangeResizeIndex.column[1]):h.chart_selection.rangeResize=="rt"?(R=h.chart_selection.rangeResizeIndex.row[0],F=h.chart_selection.rangeResizeIndex.column[1],I=h.chart_selection.rangeResizeIndex.row[1],z=h.chart_selection.rangeResizeIndex.column[0]):h.chart_selection.rangeResize=="rb"&&(R=h.chart_selection.rangeResizeIndex.row[1],F=h.chart_selection.rangeResizeIndex.column[1],I=h.chart_selection.rangeResizeIndex.row[0],z=h.chart_selection.rangeResizeIndex.column[0]),s.exits){var M=R-h.chart_selection.rangeResizexy[0]+x;M<a+s.range[1]+1||v<0?M=a+s.range[1]+1:(M>=_.length-1||v>b)&&(M=_.length-1)}else{var M=a-h.chart_selection.rangeResizexy[0]+x;M<0||v<0?M=0:(M>=_.length-1||v>b)&&(M=_.length-1)}if(u.exits){var E=F-h.chart_selection.rangeResizexy[1]+S;E<o+u.range[1]+1||y<0?E=o+u.range[1]+1:(E>=T.length-1||y>k)&&(E=T.length-1)}else{var E=o-h.chart_selection.rangeResizexy[1]+S;E<0||y<0?E=0:(E>=T.length-1||y>k)&&(E=T.length-1)}var N,L,O,V;M>I?(N=I,L=M):(N=M,L=I),E>z?(O=z,V=E):(O=E,V=z),!s.exits&&!u.exits?(l.rangeArray=[{row:[N,L],column:[O,V]}],l.rangeSplitArray.range={row:[N,L],column:[O,V]}):(l.rangeArray=[{row:[a,L],column:[o,V]}],l.rangeSplitArray.range={row:[a,L],column:[o,V]},l.rangeSplitArray.content={row:[N-a,L-a],column:[O-o,V-o]},s.exits&&(l.rangeSplitArray.rowtitle={row:l.rangeSplitArray.rowtitle.row,column:[O-o,V-o]}),u.exits&&(l.rangeSplitArray.coltitle={row:[N-a,L-a],column:l.rangeSplitArray.coltitle.column}))}else if(A=="luckysheet-chart-rangeShow-rowtitle"){var F,z;if(h.chart_selection.rangeResize=="lt"||h.chart_selection.rangeResize=="lb"?(F=h.chart_selection.rangeResizeIndex.column[0],z=h.chart_selection.rangeResizeIndex.column[1]):(h.chart_selection.rangeResize=="rt"||h.chart_selection.rangeResize=="rb")&&(F=h.chart_selection.rangeResizeIndex.column[1],z=h.chart_selection.rangeResizeIndex.column[0]),u.exits){var E=F-h.chart_selection.rangeResizexy[1]+S;E<o+u.range[1]+1||y<0?E=o+u.range[1]+1:(E>=T.length-1||y>k)&&(E=T.length-1)}else{var E=o-h.chart_selection.rangeResizexy[1]+S;E<0||y<0?E=0:(E>=T.length-1||y>k)&&(E=T.length-1)}var O,V;E>z?(O=z,V=E):(O=E,V=z),u.exits?(l.rangeArray=[{row:l.rangeArray[0].row,column:[o,V]}],l.rangeSplitArray.range={row:l.rangeArray[0].row,column:[o,V]},l.rangeSplitArray.rowtitle={row:l.rangeSplitArray.rowtitle.row,column:[O-o,V-o]},l.rangeSplitArray.content={row:l.rangeSplitArray.content.row,column:[O-o,V-o]}):(l.rangeArray=[{row:l.rangeArray[0].row,column:[O,V]}],l.rangeSplitArray.range={row:l.rangeArray[0].row,column:[O,V]})}else if(A=="luckysheet-chart-rangeShow-coltitle"){var R,I;if(h.chart_selection.rangeResize=="lt"||h.chart_selection.rangeResize=="rt"?(R=h.chart_selection.rangeResizeIndex.row[0],I=h.chart_selection.rangeResizeIndex.row[1]):(h.chart_selection.rangeResize=="lb"||h.chart_selection.rangeResize=="rb")&&(R=h.chart_selection.rangeResizeIndex.row[1],I=h.chart_selection.rangeResizeIndex.row[0]),s.exits){var M=R-h.chart_selection.rangeResizexy[0]+x;M<a+s.range[1]+1||v<0?M=a+s.range[1]+1:(M>=_.length-1||v>b)&&(M=_.length-1)}else{var M=a-h.chart_selection.rangeResizexy[0]+x;M<0||v<0?M=0:(M>=_.length-1||v>b)&&(M=_.length-1)}var N,L;M>I?(N=I,L=M):(N=M,L=I),s.exits?(l.rangeArray=[{row:[a,L],column:l.rangeArray[0].column}],l.rangeSplitArray.range={row:[a,L],column:l.rangeArray[0].column},l.rangeSplitArray.coltitle={row:[N-a,L-a],column:l.rangeSplitArray.coltitle.column},l.rangeSplitArray.content={row:[N-a,L-a],column:l.rangeSplitArray.content.column}):(l.rangeArray=[{row:[N,L],column:l.rangeArray[0].column}],l.rangeSplitArray.range={row:[N,L],column:l.rangeArray[0].column})}h.chart_selection.create()},rangeResizeDragged:function(){h.chart_selection.rangeResize=null;var e=h.currentChart;e.rangeTxt=xt(h.currentSheetIndex,e.rangeArray[0],h.currentSheetIndex),e.chartData=Pt(e.rangeArray[0],h.currentSheetIndex),h.changeChartRange(e.chart_id,e.chartData,e.rangeArray,e.rangeTxt)}}}function _c(e,n,t,l){var a=luckysheet.getluckysheet_select_save();a.length==1&&a[0].row[0]==a[0].row[1]&&a[0].column[0]==a[0].column[1]&&(an("right","rangeOfSelect"),an("down","rangeOfSelect"),a=luckysheet.getluckysheet_select_save());for(var o=-1,s=a[0].row[1]-a[0].row[0],u=a[0].row[0];u<=a[0].row[1];u++){for(var d=a[0].column[0];d<=a[0].column[1];d++){var f=ze(u,d,luckysheet.flowdata());if(f!=null&&f.toString().length>0){o=u;break}}if(o!==-1)break}o==-1&&(o=0),a[0].row=[o,o],a[0].row_focus=o,luckysheet.setluckysheet_select_save(a),h.luckysheet_shiftpositon=$.extend(!0,{},a[0]),La("down","range",!1,s),a=luckysheet.getluckysheet_select_save();for(var m=-1,g=a[0].column[1]-a[0].column[0],d=a[0].column[0];d<=a[0].column[1];d++){for(var u=a[0].row[0];u<=a[0].row[1];u++){var f=ze(u,d,luckysheet.flowdata());if(f!=null&&f.toString().length>0){m=d;break}}if(m!==-1)break}m==-1&&(m=0),a[0].column=[m,m],a[0].column_focus=m,luckysheet.setluckysheet_select_save(a),h.luckysheet_shiftpositon=$.extend(!0,{},a[0]),La("right","range",!1,g),a=luckysheet.getluckysheet_select_save();var y=$.extend(!0,[],a),v=xt(h.currentSheetIndex,y[0],h.currentSheetIndex);let b=Pt();console.dir(b);let k=_f("chart"),w=k+"_c",x='<div id="${id}"class="luckysheet-modal-dialog luckysheet-modal-dialog-chart ${addclass}"tabindex="0"role="dialog"aria-labelledby=":41e"dir="ltr"><div class="luckysheet-modal-dialog-resize"><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-lt"data-type="lt"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-mt"data-type="mt"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-lm"data-type="lm"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-rm"data-type="rm"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-rt"data-type="rt"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-lb"data-type="lb"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-mb"data-type="mb"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-rb"data-type="rb"></div></div><div class="luckysheet-modal-dialog-controll"><span class="luckysheet-modal-controll-btn luckysheet-modal-controll-update"role="button"tabindex="0"aria-label="\u4FEE\u6539\u56FE\u8868"title="\u4FEE\u6539\u56FE\u8868"><i class="fa fa-pencil"aria-hidden="true"></i></span><span class="luckysheet-modal-controll-btn luckysheet-modal-controll-max"role="butluckysheet_chartIns_indexton"tabindex="0"aria-label="\u6700\u5927\u5316"title="\u6700\u5927\u5316"><i class="fa fa-window-maximize"aria-hidden="true"></i></span><span class="luckysheet-modal-controll-btn luckysheet-modal-controll-del"role="button"tabindex="0"aria-label="\u5220\u9664"title="\u5220\u9664"><i class="fa fa-trash"aria-hidden="true"></i></span></div><div class="luckysheet-modal-dialog-content">${content}</div></div>',C=$(gc(x,{id:w,addclass:"luckysheet-data-visualization-chart",title:"\u56FE\u8868\u751F\u6210",content:""})).appendTo($(".luckysheet-cell-main")),S=document.getElementById(w),{render:_,chart_json:T}=h.createChart($(`#${w}`).children(".luckysheet-modal-dialog-content")[0],b,k,y,v);console.dir(JSON.stringify(T)),e=e||400,n=n||250,t=t||0,l=l||0,S.style.width=e+"px",S.style.height=n+"px",S.style.position="absolute",S.style.background="#fff",S.style.left=t+"px",S.style.top=l+"px",_.style.width="100%",_.style.height="100%",S.style.zIndex=h.zIndex?h.zIndex:15,h.zIndex++;let A=h.luckysheetfile[Z(h.currentSheetIndex)];A.chart||(A.chart=[]),A.chart.push({chart_id:k,width:e,height:n,left:t,top:l,sheetIndex:A.index}),Ka(k),$(`#${k}_c .luckysheet-modal-controll-del`).click(function(R){Af(k)}),Rf(C),$(`#${k}_c .luckysheet-modal-controll-update`).click(function(R){Ff()}),C.children(".luckysheet-modal-dialog-content").mousedown(function(R){h.chartparam.luckysheetCurrentChartMaxState||Ka(k),R.stopPropagation()}),C.mousedown(function(R){if(!h.chartparam.luckysheetCurrentChartMaxState){Ka(k),Qr(!0),!$(R.target).is(".luckysheet-modal-dialog-controll")&&!$(R.target).is(".luckysheet-modal-controll-btn")&&!$(R.target).is("i")&&(h.chartparam.luckysheetCurrentChartMoveTimeout=setTimeout(function(){h.chartparam.luckysheetCurrentChartMove=!0},100));var I=h.chartparam.luckysheetCurrentChartMoveObj.offset(),F=h.chartparam.luckysheetCurrentChartMoveObj.position();h.chartparam.luckysheetCurrentChartMoveXy=[R.pageX-I.left,R.pageY-I.top,F.left,F.top,$("#luckysheet-scrollbar-x").scrollLeft(),$("#luckysheet-scrollbar-y").scrollTop()],h.chartparam.luckysheetCurrentChartMoveWinH=$("#luckysheet-cell-main")[0].scrollHeight,h.chartparam.luckysheetCurrentChartMoveWinW=$("#luckysheet-cell-main")[0].scrollWidth,!$(R.target).hasClass("luckysheet-mousedown-cancel")&&$(R.target).filter("[class*='sp-palette']").length==0&&$(R.target).filter("[class*='sp-thumb']").length==0&&$(R.target).filter("[class*='sp-']").length==0&&($("#luckysheet-rightclick-menu").hide(),$("#luckysheet-cols-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide(),$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu, #luckysheet-user-menu").hide(),$("body > .luckysheet-filter-menu, body > .luckysheet-filter-submenu, body > .luckysheet-cols-menu").hide()),R.stopPropagation()}}).find(".luckysheet-modal-dialog-resize-item").mousedown(function(R){if(h.chartparam.luckysheetCurrentChartActive){h.chartparam.luckysheetCurrentChartResize=$(this).data("type");var I=nt(R.pageX,R.pageY),F=$("#luckysheet-scrollbar-x").scrollLeft(),z=$("#luckysheet-scrollbar-y").scrollTop(),M=I[0]+F,E=I[1]+z,N=h.chartparam.luckysheetCurrentChartResizeObj.position();h.chartparam.luckysheetCurrentChartResizeXy=[M,E,C.width(),C.height(),N.left+F,N.top+z,F,z],h.chartparam.luckysheetCurrentChartResizeWinH=$("#luckysheet-cell-main")[0].scrollHeight,h.chartparam.luckysheetCurrentChartResizeWinW=$("#luckysheet-cell-main")[0].scrollWidth,h.chartparam.luckysheetCurrentChart=k,R.stopPropagation()}})}function Rf(e){e.find(".luckysheet-modal-dialog-content").hover(function(){e.removeClass("chart-moveable")},function(){e.addClass("chart-moveable")}),e.hover(function(){e.addClass("chart-moveable")},function(){e.removeClass("chart-moveable")})}function Af(e){$(`.luckysheet-cell-main #${e}_c`).remove(),Cc();let n=h.luckysheetfile[Z(h.currentSheetIndex)],t=n.chart.findIndex(l=>l.chart_id==e);n.chart.splice(t,1),h.deleteChart(e)}function Ka(e){let n=h.luckysheetfile[Z(h.currentSheetIndex)].chart;for(let t in n)n[t].needRangeShow=!1,n[t].chart_id==e&&(n[t].needRangeShow=!0,h.currentChart=h.getChartJson(e));Df(e)}function Cc(){let e=h.luckysheetfile[Z(h.currentSheetIndex)].chart;for(let n in e)e[n].needRangeShow=!1;Mf()}function Df(e){let n=$("#"+e+"_c");h.chart_selection.create(),h.chartparam.luckysheetCurrentChartActive=!0,h.chartparam.luckysheetCurrentChartMoveObj=n,h.chartparam.luckysheetCurrentChartResizeObj=n,h.chartparam.luckysheetCurrentChart=e,$("#luckysheet-cell-main").find(".luckysheet-modal-dialog-chart .luckysheet-modal-dialog-resize").hide(),$("#luckysheet-cell-main").find(".luckysheet-modal-dialog-chart .luckysheet-modal-dialog-controll").hide(),n.css("z-index",h.chartparam.luckysheetCurrentChartZIndexRank++),n.find(".luckysheet-modal-dialog-resize").show(),n.find(".luckysheet-modal-dialog-controll").show(),($(".chartSetting").is(":visible")||h.chartparam.luckysheet_chart_redo_click)&&e!=h.chartparam.luckysheetCurrentChart&&$("body .luckysheet-cols-menu").hide(),h.currentChart=h.highlightChart(e)}function Mf(e){$("#luckysheet-cell-main .luckysheet-modal-dialog-chart .luckysheet-modal-dialog-resize, #luckysheet-cell-main .luckysheet-modal-dialog-chart .luckysheet-modal-dialog-controll").hide(),$("#luckysheet-cell-main").find(".luckysheet-datavisual-selection-set div").remove(),h.chartparam.luckysheetCurrentChartActive=!1,$("#luckysheet-chart-rangeShow").empty(),!e&&$(".chartSetting").is(":visible")&&!de()&&xv()}function Ff(e,n){$(".chartSetting").is(":visible")||($(".chartSetting").show(),$("#luckysheet-cell-main").find(".luckysheet-datavisual-selection-set div").show(),h.chartparam.luckysheetCurrentChartActive=!0,setTimeout(function(){zt()},0))}function xv(e){$(".chartSetting").is(":visible")&&($(".chartSetting").hide(),$("#luckysheet-cell-main .luckysheet-modal-dialog-chart .luckysheet-modal-dialog-resize, #luckysheet-cell-main .luckysheet-modal-dialog-chart .luckysheet-modal-dialog-controll").hide(),$("#luckysheet-cell-main").find(".luckysheet-datavisual-selection-set div").remove(),h.chartparam.luckysheetCurrentChartActive=!1,!de()&&!e&&setTimeout(function(){zt()},0))}function Tc(e){Mf("true"),h.luckysheetfile.forEach(t=>{t.index==e?(t.chart||[]).forEach(a=>{a.isShow=!0,$("#"+a.chart_id+"_c").show(),h.resizeChart(a.chart_id),a.needRangeShow==!0&&(h.currentChart=h.getChartJson(a.chart_id),Df(a.chart_id))}):(t.chart||[]).forEach(a=>{a.isShow=!1,$("#"+a.chart_id+"_c").hide()})})}var Sf,$f,yv,vv,$o=Ie(()=>{dt();Cf();Kt();Xe();Ut();Oi();Nt();Ol();An();za();Ft();pr();Sf=_t,$f=wt,yv=["https://cdn.jsdelivr.net/npm/vue@2.6.11","https://unpkg.com/vuex@3.4.0","https://cdn.bootcdn.net/ajax/libs/element-ui/2.13.2/index.js","https://cdn.bootcdn.net/ajax/libs/echarts/4.8.0/echarts.min.js","expendPlugins/chart/chartmix.umd.min.js"],vv=["https://cdn.bootcdn.net/ajax/libs/element-ui/2.13.2/theme-chalk/index.css","expendPlugins/chart/chartmix.css"]});function Cn(e){h.flowdata==null||h.flowdata.length==0||(clearTimeout(Ef),Ef=setTimeout(()=>{h.clearjfundo&&h.jfredo.push({type:"zoomChange",zoomRatio:h.zoomRatio,curZoomRatio:e,sheetIndex:h.currentSheetIndex}),Wr=null,h.zoomRatio=e;let n=ve.getSheetByIndex();He.buildAllPs(n.data),Re.images=n.images,Re.allImagesShow(),Re.init(),n.config==null&&(n.config={}),n.config.sheetViewZoom==null&&(n.config.sheetViewZoom={});let t=n.config.curentsheetView;t==null&&(t="viewNormal"),n.config.sheetViewZoom[t+"ZoomScale"]=e,ne.saveParam("all",h.currentSheetIndex,h.zoomRatio,{k:"zoomRatio"}),ne.saveParam("cg",h.currentSheetIndex,n.config.sheetViewZoom,{k:"sheetViewZoom"}),Za()},100))}function Za(){St(h.flowdata.length,h.flowdata[0].length),Zs()}function Nf(){let e=.02,n=.1,t=4,l=.1;$("#luckysheet-zoom-minus").click(function(){let a;h.zoomRatio==null?a=h.zoomRatio=1:a=Math.ceil(h.zoomRatio*10)/10,a=a-n,a==h.zoomRatio&&(a=a-n),a<=l&&(a=l),Cn(a),ir(a)}),$("#luckysheet-zoom-plus").click(function(){let a;h.zoomRatio==null?a=h.zoomRatio=1:a=Math.floor(h.zoomRatio*10)/10,a=a+n,a==h.zoomRatio&&(a=a+n),a>=t&&(a=t),Cn(a),ir(a)}),$("#luckysheet-zoom-slider").mousedown(function(a){let o=$(this).offset().left,s=a.pageX,u=Pf(s-o);Cn(u),ir(u)}),$("#luckysheet-zoom-cursor").mousedown(function(a){let o=a.pageX,s=parseFloat($("#luckysheet-zoom-cursor").css("left"));$("#luckysheet-zoom-cursor").css("transition","none"),$(document).off("mousemove.zoomCursor").on("mousemove.zoomCursor",function(u){let f=u.pageX-o,m=s+f,g=Pf(m);g>t&&(g=t,m=100),g<l&&(g=l,m=0),Cn(g);let y=Math.round(g*100)+"%";$("#luckysheet-zoom-ratioText").html(y),$("#luckysheet-zoom-cursor").css("left",m-4)}),$(document).off("mouseup.zoomCursor").on("mouseup.zoomCursor",function(u){$(document).off(".zoomCursor"),$("#luckysheet-zoom-cursor").css("transition","all 0.3s")}),a.stopPropagation()}).click(function(a){a.stopPropagation()}),$("#luckysheet-zoom-ratioText").click(function(){Cn(1),ir(1)}),ir(h.zoomRatio),Wr=null,document.addEventListener("wheel",function(a){!a.ctrlKey||!a.deltaY||(Wr===null&&(Wr=h.zoomRatio||1),Wr+=a.deltaY<0?e:-e,Wr>=t?Wr=t:Wr<l&&(Wr=l),Cn(Wr),ir(Wr),a.preventDefault(),a.stopPropagation())},{capture:!0,passive:!1}),document.addEventListener("keydown",function(a){if(!a.ctrlKey)return;let o=!1,s=h.zoomRatio||1;a.key==="-"||a.which===189?(s-=n,o=!0):a.key==="+"||a.which===187?(s+=n,o=!0):(a.key==="0"||a.which===48)&&(s=1,o=!0),o&&(a.preventDefault(),s>=t?s=t:s<l&&(s=l),Cn(s),ir(s))},{capture:!0})}function Pf(e){let n=1;return e<50?n=Math.round((e*1.8/100+.1)*100)/100:e>50&&(n=Math.round(((e-50)*6/100+1)*100)/100),n}function _v(e){let n=50;e<1?n=Math.round((e-.1)*100/.18)/10:e>1&&(n=Math.round((e-1)*100/.6)/10+50),$("#luckysheet-zoom-cursor").css("left",n-4)}function ir(e){let n=Math.round(e*100)+"%";$("#luckysheet-zoom-ratioText").html(n),_v(e)}var Ef,Wr,Ja=Ie(()=>{Xe();bt();dt();fl();pr();Yt();Qt();Ur();qr();Ef=null;Wr=null});var Cv,ve,fl=Ie(()=>{Ft();Vr();Kt();$r();xf();ll();Ut();Yt();Ii();Jt();da();Ft();dt();Gt();Qt();xl();on();pr();Ur();qr();yr();Ua();Vl();kn();Zt();Xe();bt();$o();pr();Ja();il();Ll();Cv={generateRandomSheetIndex:function(e){e==null&&(e="Sheet");let n=window.navigator.userAgent.replace(/[^a-zA-Z0-9]/g,"").split(""),t="";for(let a=0;a<12;a++)t+=n[Math.round(Math.random()*(n.length-1))];let l=new Date().getTime();return e+"_"+t+"_"+l},generateRandomSheetName:function(e,n){let t=e.length,a=Q().pivotTable.title;for(let o=0;o<e.length;o++)if(e[o].name.indexOf("Sheet")>-1||e[o].name.indexOf(a)>-1){let s=parseFloat(e[o].name.replace("Sheet","").replace(a,""));s!="NaN"&&Math.ceil(s)>t&&(t=Math.ceil(s))}return n?a+(t+1):"Sheet"+(t+1)},generateCopySheetName:function(e,n){let l=Q().info,a="("+l.copy,o=n.toString().indexOf(a);~o&&(n=n.toString().substring(0,o));let s="",u=n+a,d=[];for(let m=0;m<e.length;m++){let g=e[m].name.toString();d.push(g);let y=g.indexOf(u);if(y===0){s=s||2;let v=g.indexOf(")",y+u.length),b=g.substring(y+u.length,v);B(b)&&parseInt(b)>=s&&(s=parseInt(b)+1)}}let f;do{let m=a+s+")",g=31-m.length;f=n,f.length>g&&(f=f.slice(0,g-1)+"\u2026"),f=f+m}while(~d.indexOf(f)&&(s=(s||1)+1));return f},getSheetByIndex:function(e){let n=this;e==null&&(e=h.currentSheetIndex);let t=n.getSheetIndex(e);return h.luckysheetfile[t]},getSheetByName:function(e){let n=this;if(e==null)return null;for(let t=0;t<h.luckysheetfile.length;t++){let l=h.luckysheetfile[t];if(l.name==e)return l}return null},getCurSheetnoset:function(){let e=0;for(let n=0;n<h.luckysheetfile.length;n++)if(h.luckysheetfile[n].status==1){e=h.luckysheetfile[n].index;break}return e},getCurSheet:function(){if(h.luckysheetfile.length){let e=!1,n=[];h.luckysheetfile.forEach(t=>{typeof t.index=="undefined"&&(t.index=this.generateRandomSheetIndex()),n.includes(t.index)?t.index=this.generateRandomSheetIndex():n.push(t.index),typeof t.status=="undefined"&&(t.status=0),t.status==1&&(e?t.status=0:e=!0)}),e||(h.luckysheetfile[0].status=1)}h.currentSheetIndex=h.luckysheetfile[0].index;for(let e=0;e<h.luckysheetfile.length;e++)if(h.luckysheetfile[e].status==1){h.currentSheetIndex=h.luckysheetfile[e].index;break}return h.currentSheetIndex},addNewSheet:function(e,n){if(de()||h.allowEdit===!1||!Je.createHookFunction("sheetCreateBefore"))return;let t=this,l=h.luckysheetfile.length,a=t.generateRandomSheetIndex(),o=t.generateRandomSheetName(h.luckysheetfile,n);$("#luckysheet-sheet-container-c").append(_e(Ql,{index:a,active:"",name:o,style:"",colorset:""}));let s={name:o,color:"",status:"0",order:l,index:a,celldata:[],row:h.defaultrowNum,column:h.defaultcolumnNum,config:{},pivotTable:null,isPivotTable:!!n};if(h.luckysheetfile.push(s),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),$("#luckysheet-sheets-item"+a).addClass("luckysheet-sheets-item-active"),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+a+'" class="luckysheet-datavisual-selection-set"></div>'),rl(e),ne.saveParam("sha",null,$.extend(!0,{},s)),h.clearjfundo){h.jfundo.length=0;let u={};u.type="addSheet",u.sheetconfig=$.extend(!0,{},s),u.index=a,u.currentSheetIndex=h.currentSheetIndex,h.jfredo.push(u)}t.changeSheetExec(a,n,!0)},setSheetHide:function(e,n){let t=this,l=t.getSheetIndex(e);if(!n&&!Je.createHookFunction("sheetHideBefore",{sheet:h.luckysheetfile[l]}))return;h.luckysheetfile[l].hide=1;let a=$("#luckysheet-sheets-item"+e);a.hide(),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active");let o;if(fe.showsheetbarConfig.sheet)o=a.nextAll(":visible"),a.nextAll(":visible").length>0?o=o.eq(0).data("index"):o=a.prevAll(":visible").eq(0).data("index");else{let s,u=[];h.luckysheetfile.forEach((f,m)=>{f.hide!==1&&u.push(m)});let d=u.length;d===1?s=u[0]:s=u[d-1]>l?u.find(f=>f>l):u[d-1],o=h.luckysheetfile[s].index}$("#luckysheet-sheets-item"+o).addClass("luckysheet-sheets-item-active"),t.changeSheetExec(o),t.locationSheet(),ne.saveParam("sh",a.data("index"),1,{op:"hide",cur:o}),n||Je.createHookFunction("sheetHideAfter",{sheet:h.luckysheetfile[l]})},setSheetShow:function(e){let n=this,t=h.luckysheetfile[n.getSheetIndex(e)];!Je.createHookFunction("sheetShowBefore",{sheet:t})||(t.hide=0,n.changeSheetExec(e),ne.saveParam("sh",e,0,{op:"show",cur:null}),Je.createHookFunction("sheetShowAfter",{sheet:t}))},sheetMaxIndex:0,ordersheet:function(e){return function(n,t){let l=n[e],a=t[e];return l-a}},getCurrentOrder:function(){let e={};return $("#luckysheet-sheet-area div.luckysheet-sheets-item").each(function(n){let t=$(this).data("index");for(let l=0;l<h.luckysheetfile.length;l++)if(h.luckysheetfile[l].index==t){e[t.toString()]=n;break}}),e},reOrderAllSheet:function(){let e={};$("#luckysheet-sheet-area div.luckysheet-sheets-item").each(function(n){let t=$(this).data("index");for(let l=0;l<h.luckysheetfile.length;l++)if(h.luckysheetfile[l].index==t){h.luckysheetfile[l].order=n,e[t.toString()]=n;break}}),ne.saveParam("shr",null,e),h.luckysheetfile.sort((n,t)=>{let l=n.order,a=t.order;return l!=null&&a!=null?l-a:l!=null?-1:(a!=null,1)})},createSheet:function(){let e=this,n=[];h.luckysheetfile.sort(e.ordersheet("order"));for(let t=0;t<h.luckysheetfile.length;t++){let l="",a=h.luckysheetfile[t].index,o="";h.luckysheetfile[t].color!=null&&(o='<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+h.luckysheetfile[t].color+';"></div>'),h.currentSheetIndex==a?n.push(_e(Ql,{index:a,active:"luckysheet-sheets-item-active",name:h.luckysheetfile[t].name,style:"",colorset:o})):(h.luckysheetfile[t].hide==1?n.push(_e(Ql,{index:a,active:"",name:h.luckysheetfile[t].name,style:"display:none;",colorset:o})):n.push(_e(Ql,{index:a,active:"",name:h.luckysheetfile[t].name,style:"",colorset:o})),l="style='display:none;'"),$("#luckysheet-cell-main").append("<div "+l+' id="luckysheet-datavisual-selection-set-'+a+'" class="luckysheet-datavisual-selection-set"></div>')}$("#luckysheet-sheet-container-c").append(n.join("")),e.locationSheet()},locationSheet:function(){let e=$("#luckysheet-sheet-container-c"),n=$("#"+h.container).width(),t=$("#luckysheet-sheet-container-c > div.luckysheet-sheets-item-active").eq(0),l=0,a=0;$("#luckysheet-sheet-container-c > div.luckysheet-sheets-item:visible").each(function(){$(this).hasClass("luckysheet-sheets-item-active")&&(l=a),a+=$(this).outerWidth()}),setTimeout(function(){e.scrollLeft(l-10),fe.showsheetbarConfig.sheet&&(a>=n*.7?($("#luckysheet-sheet-area .luckysheet-sheets-scroll").css("display","inline-block"),$("#luckysheet-sheet-container .docs-sheet-fade-left").show()):($("#luckysheet-sheet-area .luckysheet-sheets-scroll").css("display","none"),$("#luckysheet-sheet-container .docs-sheet-fade-left").hide()))},1)},copySheet:function(e,n){if(de()||h.allowEdit===!1)return;let t=this,l=h.luckysheetfile.length,a=t.generateRandomSheetIndex(),o=t.getSheetIndex(e),s=$.extend(!0,{},h.luckysheetfile[o]);if(s.order=l,s.index=a,s.name=t.generateCopySheetName(h.luckysheetfile,s.name),!Je.createHookFunction("sheetCopyBefore",{targetSheet:h.luckysheetfile[o],copySheet:s}))return;let u="";s.color!=null&&(u='<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+s.color+';"></div>');let d=$("#luckysheet-sheets-item"+e);if($("#luckysheet-sheet-container-c").append(_e(Ql,{index:s.index,active:"",name:s.name,order:s.order,style:"",colorset:u})),$("#luckysheet-sheets-item"+s.index).insertAfter(d),h.luckysheetfile.splice(o+1,0,s),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),$("#luckysheet-sheets-item"+a).addClass("luckysheet-sheets-item-active"),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+a+'" class="luckysheet-datavisual-selection-set"></div>'),rl(n),ne.saveParam("shc",a,{copyindex:e,name:s.name}),t.changeSheetExec(a,void 0,void 0,!0),t.reOrderAllSheet(),h.clearjfundo)h.jfredo.push({type:"copySheet",copyindex:e,index:s.index,sheetIndex:s.index});else if(h.jfredo.length>0){let f=h.jfredo[h.jfredo.length-1];f.type=="copySheet"&&(f.index=s.index,f.sheetIndex=s.index)}},hasSheet:function(e){return!(e==null||(e=this.getSheetIndex(e),e==null))},createSheetbydata:function(e,n,t=!0){let l=this,a="";if(e.color!=null&&(a='<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+e.color+';"></div>'),$("#luckysheet-sheet-container-c").append(_e(Ql,{index:e.index,active:"",name:e.name,order:e.order,style:"",colorset:a})),t){let o=e.order;o>=h.luckysheetfile.length?(o=h.luckysheetfile.length-1,$("#luckysheet-sheets-item"+e.index).insertAfter($("#luckysheet-sheets-item"+h.luckysheetfile[o].index))):$("#luckysheet-sheets-item"+e.index).insertBefore($("#luckysheet-sheets-item"+h.luckysheetfile[o].index))}h.luckysheetfile.push(e),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),$("#luckysheet-sheets-item"+e.index).addClass("luckysheet-sheets-item-active"),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+e.index+'" class="luckysheet-datavisual-selection-set"></div>'),rl(),n!=null?(ne.saveParam("shre",null,{reIndex:e.index}),e.hide=0,ne.saveParam("sh",e.index,0,{op:"show",cur:null})):ne.saveParam("sha",null,e),l.changeSheetExec(e.index,e.isPivotTable,!0),l.reOrderAllSheet()},deleteSheet:function(e){let n=this;if(h.allowEdit===!1)return;let t=n.getSheetIndex(e),l=h.luckysheetfile[t];if(!Je.createHookFunction("sheetDeleteBefore",{sheet:l}))return;n.setSheetHide(e,!0),$("#luckysheet-sheets-item"+e).remove(),$("#luckysheet-datavisual-selection-set-"+e).remove();let a=h.luckysheetfile.splice(t,1);n.reOrderAllSheet(),ne.saveParam("shd",null,{deleIndex:e}),h.clearjfundo&&(a[0].type="deleteSheet",h.jfredo.push(a[0])),Je.createHookFunction("sheetDeleteAfter",{sheet:l})},nulldata:null,getGridData:function(e){let n=[];for(let t=0;t<e.length;t++)for(let l=0;l<e[0].length;l++)e[t][l]!=null&&n.push({r:t,c:l,v:e[t][l]});return n},buildGridData:function(e){let n=e.row==null?h.defaultrowNum:e.row,t=e.column==null?h.defaultcolumnNum:e.column,l=e.data&&e.data.length>0?e.data:cl([],n,t),a=e.celldata;if(e.data&&e.data.length>0)for(let o=0;o<l.length;o++)for(let s=0;s<l[0].length;s++)Ht(o,s,l,l[o][s]);else if(a&&a.length>0)for(let o=0;o<a.length;o++){let s=a[o],u=s.r,d=s.c,f=s.v;u>=l.length&&(l=cl(l,u-l.length+1,0)),d>=l[0].length&&(l=cl(l,0,d-l[0].length+1)),Ht(u,d,l,f)}return fe.autoFormatw=!1,fe.accuracy=void 0,l},cutGridData:function(e){let n=0;for(let t=e.length-1;t>=0;t--){let l=!0;for(let a=0;a<e[0].length;a++){let o=ze(t,a);if(o!=null&&$.trim(o).length>0){l=!1;break}}if(l)n=t;else break}return e.slice(0,n)},addGridData:function(e,n,t){let l=cl([],n,t);if(e!=null)for(let a=0;a<e.length;a++){let o=e[a],s=o.r,u=o.c,d=o.v;s>=l.length&&(l=cl(l,s-l.length+1,0)),u>=l[0].length&&(l=cl(l,0,u-l[0].length+1)),Ht(s,u,l,d)}return l},sheetParamRestore:function(e,n){if(h.luckysheet_select_save=e.luckysheet_select_save,(h.luckysheet_select_save==null||h.luckysheet_select_save.length==0)&&(n[0]!=null&&n[0][0]!=null&&n[0][0].mc!=null?h.luckysheet_select_save=[{row:[0,n[0][0].mc.rs-1],column:[0,n[0][0].mc.cs-1]}]:h.luckysheet_select_save=[{row:[0,0],column:[0,0]}]),h.luckysheet_selection_range=e.luckysheet_selection_range==null?[]:e.luckysheet_selection_range,h.config=e.config==null?{}:e.config,h.zoomRatio=e.zoomRatio==null?1:e.zoomRatio,e.defaultRowHeight!=null?h.defaultrowlen=parseFloat(e.defaultRowHeight):h.defaultrowlen=fe.defaultRowHeight,e.defaultColWidth!=null?h.defaultcollen=parseFloat(e.defaultColWidth):h.defaultcollen=fe.defaultColWidth,e.showGridLines!=null){let t=e.showGridLines;t==0||t==!1?h.showGridLines=!1:h.showGridLines=!0}else h.showGridLines=!0},initialjfFile:function(e,n){let t=this;t.getCurSheet();let l=h.luckysheetfile[t.getSheetIndex(h.currentSheetIndex)];t.nulldata=cl([],h.defaultrowNum,h.defaultcolumnNum);let a=t.buildGridData(l),o=[];l.jfgird_select_save=l.jfgird_select_save||[],l.jfgird_select_save.forEach(m=>o.push({row:m.row,column:m.column})),l.luckysheet_select_save=o,this.sheetParamRestore(l,a);let s=h.luckysheet_select_save[0].row[1],u=h.luckysheet_select_save[0].column[1];if(h.luckysheet_select_save.length>1)for(let m=0;m<h.luckysheet_select_save.length;m++)h.luckysheet_select_save[m].row[1]>s&&(s=h.luckysheet_select_save[m].row[1]),h.luckysheet_select_save[m].column[1]>u&&(u=h.luckysheet_select_save[m].column[1]);ke.fontInitial(h.fontList),l.data=a;let d=a.length;s>d-1&&(d=s+1);let f=a[0].length;u>f-1&&(f=u+1),typeof fe.beforeCreateDom=="function"&&fe.beforeCreateDom(luckysheet),typeof fe.workbookCreateBefore=="function"&&fe.workbookCreateBefore(luckysheet),pc(f,d,a,e,n),setTimeout(function(){U.createHoverTip("#luckysheet_info_detail",".luckysheet_info_detail_back, .luckysheet_info_detail_input, .luckysheet_info_detail_update"),U.createHoverTip("#luckysheet-wa-editor",".luckysheet-toolbar-menu-button, .luckysheet-toolbar-button, .luckysheet-toolbar-combo-button"),h.luckysheetTableContentHW=[$("#luckysheet-cell-main").width()+h.rowHeaderWidth-h.cellMainSrollBarSize,$("#luckysheet-cell-main").height()+h.columnHeaderHeight-h.cellMainSrollBarSize],$("#luckysheetTableContent, #luckysheetTableContentF").attr({width:Math.ceil(h.luckysheetTableContentHW[0]*h.devicePixelRatio),height:Math.ceil(h.luckysheetTableContentHW[1]*h.devicePixelRatio)}).css({width:h.luckysheetTableContentHW[0],height:h.luckysheetTableContentHW[1]}).get(0).getContext("2d");let m=Q().info,y=ne.gridKey+"__qkcache",v=function(){l.load="1",t.createSheet();let b=function(){t.mergeCalculation(l.index),t.setSheetParam(!1),t.storeSheetParam(),t.restoreselect(),t.CacheNotLoadControll=[],t.restoreCache(),p.execFunctionGroupForce(fe.forceCalculation),t.restoreSheetAll(h.currentSheetIndex),$("#luckysheet_info_detail_save").html(m.detailSave),l.isPivotTable?h.luckysheetcurrentisPivotTable=!0:(h.luckysheetcurrentisPivotTable=!1,$("#luckysheet-modal-dialog-slider-pivot").hide()),Zd(),zt(),l.scrollLeft!=null&&l.scrollLeft>0?$("#luckysheet-scrollbar-x").scrollLeft(l.scrollLeft):$("#luckysheet-scrollbar-x").scrollLeft(0),l.scrollTop!=null&&l.scrollTop>0?$("#luckysheet-scrollbar-y").scrollTop(l.scrollTop):$("#luckysheet-scrollbar-y").scrollTop(0),Ao(h.asyncLoad,"core"),fe.pointEdit?setTimeout(function(){h.loadingObj.close()},0):setTimeout(function(){h.loadingObj.close()},500)},k=ne.loadSheetUrl;if(k=="")t.loadOtherFile(l),b();else{let w=t.checkLoadSheetIndex(l),x=[];for(let C=0;C<w.length;C++){let S=w[C];S!=l.index&&x.push(S)}if(x.length===0){b();return}$.post(k,{gridKey:ne.gridKey,index:x.join(",")},function(C){let S=new Function("return "+C)();for(let _ in S){if(_==l.index)continue;let T=h.luckysheetfile[t.getSheetIndex(_)];(T.load==null||T.load=="0")&&(T.celldata=S[_.toString()],T.data=t.buildGridData(T),T.load="1")}b()})}};try{localforage.getItem(y).then(function(b){b!=null&&(t.CacheNotLoadControll=b),ne.clearcachelocaldata(function(){v()})})}catch(b){v(),console.log("\u7F13\u5B58\u64CD\u4F5C\u5931\u8D25")}},1)},storeSheetParam:function(){let e=this.getSheetIndex(h.currentSheetIndex),n=h.luckysheetfile[e];n.config=h.config,n.visibledatarow=h.visibledatarow,n.visibledatacolumn=h.visibledatacolumn,n.ch_width=h.ch_width,n.rh_height=h.rh_height,n.luckysheet_select_save=$.extend(!0,[],h.luckysheet_select_save),n.luckysheet_selection_range=$.extend(!0,[],h.luckysheet_selection_range),$("#luckysheet-scrollbar-x")[0].scrollWidth>$("#luckysheet-scrollbar-x")[0].offsetWidth&&(n.scrollLeft=$("#luckysheet-scrollbar-x").scrollLeft()),$("#luckysheet-scrollbar-y")[0].scrollHeight>$("#luckysheet-scrollbar-y")[0].offsetHeight&&(n.scrollTop=$("#luckysheet-scrollbar-y").scrollTop()),n.zoomRatio=h.zoomRatio},setSheetParam:function(e=!0){let n=this.getSheetIndex(h.currentSheetIndex),t=h.luckysheetfile[n];h.flowdata=t.data,xe.webWorkerFlowDataCache(h.flowdata),p.execFunctionGlobalData=null,window.luckysheet_getcelldata_cache=null,this.sheetParamRestore(t,h.flowdata),t.freezen==null?(Y.freezenhorizontaldata=null,Y.freezenverticaldata=null):(Y.freezenhorizontaldata=t.freezen.horizontal==null?null:t.freezen.horizontal.freezenhorizontaldata,Y.freezenverticaldata=t.freezen.vertical==null?null:t.freezen.vertical.freezenverticaldata),e&&yn(h.flowdata.length,h.flowdata[0].length),He.buildAllPs(h.flowdata),Re.currentImgId=null,Re.images=t.images,Re.allImagesShow(),Re.init(),Ye.dataVerification=t.dataVerification,Ye.init(),Cl.hyperlink=t.hyperlink,Cl.init(),Dl(t.filter_select,t.filter)},restoreselect:function(){let e=this.getSheetIndex(h.currentSheetIndex),n=h.luckysheetfile[e];lt(!0),Ot(),n.scrollLeft!=null&&n.scrollLeft>0?$("#luckysheet-scrollbar-x").scrollLeft(n.scrollLeft):$("#luckysheet-scrollbar-x").scrollLeft(0),n.scrollTop!=null&&n.scrollTop>0?$("#luckysheet-scrollbar-y").scrollTop(n.scrollTop):$("#luckysheet-scrollbar-y").scrollTop(0)},storeSheetParamALL:function(){let e=this;e.storeSheetParam();let n=e.getSheetIndex(h.currentSheetIndex);h.luckysheetfile[n].data=h.flowdata,h.luckysheetfile[n].config=$.extend(!0,{},h.config)},mergeCalculationSheet:{},mergeCalculation:function(e){let n=h.luckysheetfile[this.getSheetIndex(e)],t=n.config,l=n.data;if(t==null)return;let a=t.merge;if(!(a==null||e in this.mergeCalculationSheet||n.autoCalculationMerge===!1)){this.mergeCalculationSheet[e]=1;for(let o in a){let s=parseInt(o.substr(0,o.indexOf("_"))),u=parseInt(o.substr(o.indexOf("_")+1)),d=a[o];l[s][u]==null&&(l[s][u]={}),l[s][u].mc={r:s,c:u,rs:d.rs,cs:d.cs};for(let f=s;f<s+d.rs;f++)for(let m=u;m<u+d.cs;m++)f==s&&m==u||(l[f][m]==null&&(l[f][m]={}),l[f][m].mc={r:s,c:u})}}},loadOtherFile:function(e){let n=this;for(let t=0;t<h.luckysheetfile.length;t++){let l=h.luckysheetfile[t];l.index!=e.index&&(l.load==null||l.load=="0")&&(l.data=n.buildGridData(l),l.load="1")}},changeSheet:function(e,n,t,l){if(de())return;let a=this;if(e==h.currentSheetIndex)return;ne.allowUpdate&&($("#luckysheet-cell-main #luckysheet-multipleRange-show").empty(),ne.multipleIndex=0);let o=h.luckysheetfile[a.getSheetIndex(e)];if(t&&Je.createHookFunction("sheetCreateAfter",{sheet:o}),l&&Je.createHookFunction("sheetCopyAfter",{sheet:o}),Je.createHookFunction("sheetActivate",e,n,t),$("#luckysheet-filter-selected-sheet"+h.currentSheetIndex+", #luckysheet-filter-options-sheet"+h.currentSheetIndex).hide(),$("#luckysheet-filter-selected-sheet"+e+", #luckysheet-filter-options-sheet"+e).show(),a.storeSheetParamALL(),a.setCurSheet(e),o.isPivotTable?(h.luckysheetcurrentisPivotTable=!0,n||Oe.changePivotTable(e)):(h.luckysheetcurrentisPivotTable=!1,$("#luckysheet-modal-dialog-slider-pivot").hide(),zt(!1)),o.load!=null){let u=a.buildGridData(o);o.data=u,a.mergeCalculation(e),a.setSheetParam(!0),a.showSheet(),setTimeout(function(){p.execFunctionGroup(),Be(),ne.saveParam("shs",null,h.currentSheetIndex)},1)}else{let u=ne.loadSheetUrl;if(u==""||h.luckysheetcurrentisPivotTable||!!t){let d=a.buildGridData(o);o.data=d,o.load="1",a.mergeCalculation(e),a.setSheetParam(),a.showSheet(),setTimeout(function(){a.restoreCache(),p.execFunctionGroupForce(fe.forceCalculation),a.restoreSheetAll(h.currentSheetIndex),Be()},1),ne.saveParam("shs",null,h.currentSheetIndex)}else{$("#luckysheet-grid-window-1").append(Er());let d=a.checkLoadSheetIndex(o);$.post(u,{gridKey:ne.gridKey,index:d.join(",")},function(f){let m=new Function("return "+f)();o.celldata=m[e.toString()];let g=a.buildGridData(o);setTimeout(function(){h.loadingObj.close()},500);for(let y in m){if(y==e)continue;let v=h.luckysheetfile[a.getSheetIndex(y)];(v.load==null||v.load=="0")&&(v.celldata=m[y.toString()],v.data=a.buildGridData(v),v.load="1")}o.data=g,o.load="1",a.mergeCalculation(e),a.setSheetParam(),a.showSheet(),setTimeout(function(){a.restoreCache(),p.execFunctionGroupForce(fe.forceCalculation),a.restoreSheetAll(h.currentSheetIndex),Be()},1),ne.saveParam("shs",null,h.currentSheetIndex)})}}$("#luckysheet-cell-main .luckysheet-datavisual-selection-set").hide(),$("#luckysheet-datavisual-selection-set-"+e).show(),Tc(e),Y.initialFreezen(e),a.restoreselect()},checkLoadSheetIndexToDataIndex:{},checkLoadSheetIndex:function(e){let n=p.getAllFunctionGroup(),t=e.chart,l=e.pivotTable,a=[],o={};if(e.index in this.checkLoadSheetIndexToDataIndex)return[];if(a.push(e.index),o[e.index.toString()]=1,this.checkLoadSheetIndexToDataIndex[e.index]=1,n!=null){let s={};for(let u=0;u<n.length;u++){let d=n[u],f=d.index,m=zl(d.r,d.c,f);if(m==null){let g=h.luckysheetfile[this.getSheetIndex(f)];if(g.data=this.buildGridData(g),m=zl(d.r,d.c,f),m==null)continue}if(m.indexOf("!")==-1)p.addToSheetIndexList(m,f);else if(p.formulaContainSheetList!=null&&p.formulaContainSheetList[m]!=null)for(let g in p.formulaContainSheetList[m])s[g]=1;else p.functionParser(m,g=>{if(p.addToCellList(m,g),g.indexOf("!")>-1){let y=g.substr(0,g.indexOf("!")),v=this.getSheetByName(y);if(v!=null){let b=v.index;s[b]=1,p.addToSheetIndexList(m,b)}}}),p.formulaContainSheetList[m]==null&&p.addToSheetIndexList(m,f);f!=null}for(let u in s){let d=u;o[d.toString()]==null&&(a.push(d),o[d.toString()]=1,this.checkLoadSheetIndexToDataIndex[d]=1)}}if(t!=null)for(let s=0;s<t.length;s++){let d=t[s].dataSheetIndex;d!=null&&o[d.toString()]==null&&(a.push(d),o[d.toString()]=1)}if(l!=null){let s=l.pivotDataSheetIndex;s!=null&&o[s.toString()]==null&&(a.push(s),o[s.toString()]=1)}return a},showSheet:function(){$("#luckysheet-cell-flow_0").css({width:h.ch_width,top:"-1px"}),$("#luckysheet-sheettable_0").css({width:h.ch_width-1,height:h.rh_height}),$("#luckysheetrowHeader_0").css("height",h.rh_height),$("#luckysheet-cols-h-cells_0").css("width",h.ch_width),$("#luckysheet-scrollbar-x div").width(h.ch_width),$("#luckysheet-scrollbar-y div").height(h.rh_height+h.columnHeaderHeight-h.cellMainSrollBarSize-3);let e=this.getSheetIndex(h.currentSheetIndex),n=h.luckysheetfile[e];h.scrollRefreshSwitch=!1,n.scrollLeft!=null&&n.scrollLeft>0?$("#luckysheet-scrollbar-x").scrollLeft(n.scrollLeft*h.zoomRatio):$("#luckysheet-scrollbar-x").scrollLeft(0),n.scrollTop!=null&&n.scrollTop>0?$("#luckysheet-scrollbar-y").scrollTop(n.scrollTop*h.zoomRatio):$("#luckysheet-scrollbar-y").scrollTop(0),setTimeout(()=>{h.scrollRefreshSwitch=!0},0),ir(h.zoomRatio)},setCurSheet:function(e){for(let n=0;n<h.luckysheetfile.length;n++)h.luckysheetfile[n].index==e?h.luckysheetfile[n].status=1:h.luckysheetfile[n].status=0;h.currentSheetIndex=e},getSheetIndex:function(e){for(let n=0;n<h.luckysheetfile.length;n++)if(h.luckysheetfile[n].index==e)return n;return null},changeSheetExec:function(e,n,t,l){let a=$("#luckysheet-sheets-item"+e);window.luckysheet_getcelldata_cache=null,$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),a.addClass("luckysheet-sheets-item-active").show(),rl(),this.changeSheet(e,n,t,l),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(),p.rangestart&&p.createRangeHightlight(),this.sheetBarShowAndHide(e)},sheetArrowShowAndHide(){let e=$("#luckysheet-sheet-container-c");if(!!e.length){var n=e[0].scrollWidth,t=Math.ceil(e.width());n>t?fe.showsheetbarConfig.sheet&&($("#luckysheet-sheet-area .luckysheet-sheets-scroll").css("display","inline-block"),$("#luckysheet-sheet-container .docs-sheet-fade-left").show()):($("#luckysheet-sheet-area .luckysheet-sheets-scroll").css("display","none"),$("#luckysheet-sheet-container .docs-sheet-fade-left").hide())}},sheetBarShowAndHide(e){let n=$("#luckysheet-sheet-container-c");if(e!=null){let o=$("#luckysheet-sheets-item"+e);n.scrollLeft(o.offset().left)}let t=n.width(),l=n[0].scrollWidth,a=n.scrollLeft();a<=0?$("#luckysheet-sheet-container .docs-sheet-fade-left").hide():$("#luckysheet-sheet-container .docs-sheet-fade-left").show(),t+a>=l?$("#luckysheet-sheet-container .docs-sheet-fade-right").hide():$("#luckysheet-sheet-container .docs-sheet-fade-right").show()},delChart:function(e,n){let t=this.getSheetIndex(n),l=h.luckysheetfile[t];if(l.chart==null)l.chart=[];else for(let a=0;a<l.chart.length;a++)if(l.chart[a].chart_id==e){h.luckysheetfile[t].chart.splice(a,1);break}},saveChart:function(e){let n=this.getSheetIndex(e.sheetIndex),t=h.luckysheetfile[n];if(t.chart==null)t.chart=[],t.chart.push(e);else{for(let l=0;l<t.chart.length;l++)if(t.chart[l].chart_id==e.chart_id){let a=$.extend(!0,{},t.chart[l]);t.chart[l]=$.extend(!0,{},a,e);return}t.chart.push(e)}},getChart:function(e,n){let t=this.getSheetIndex(e),l=h.luckysheetfile[t];if(l.chart==null)return null;for(let a=0;a<l.chart.length;a++)if(l.chart[a].chart_id==n)return l.chart[a];return null},getRangetxt:function(e,n,t){let l="";t==null&&(t=h.currentSheetIndex),e!=t&&(l=h.luckysheetfile[this.getSheetIndex(e)].name+"!");let a=n.row[0],o=n.row[1],s=n.column[0],u=n.column[1];return a==null&&o==null?l+tt(s)+":"+tt(u):s==null&&u==null?l+(a+1)+":"+(o+1):s==u&&a==o?l+tt(s)+(a+1):l+tt(s)+(a+1)+":"+tt(u)+(o+1)},getSheetName:function(e){return e==null&&(e=h.currentSheetIndex),h.luckysheetfile[this.getSheetIndex(e)].name},getSheetMerge:function(){return h.config.merge==null?null:h.config.merge},getSheetData:function(e){return e==null&&(e=h.currentSheetIndex),h.luckysheetfile[this.getSheetIndex(e)].data},getSheetConfig:function(e){let n=this;return e==null&&(e=h.currentSheetIndex),h.luckysheetfile[n.getSheetIndex(e)].config==null&&(h.luckysheetfile[n.getSheetIndex(e)].config={}),h.luckysheetfile[n.getSheetIndex(e)].config},restoreFilter:function(e){let n=this.getSheetIndex(e),t=h.luckysheetfile[n];if(P(t.filter_select)=="string"&&(t.filter_select=JSON.parse(t.filter_select)),t.filter_select==null||t.filter_select.row==null||t.filter_select.column==null)return;Dl(t.filter_select),P(t.filter)!="object"&&t.filter!=null&&P(t.filter)=="string"&&(t.filter=JSON.parse(t.filter));let l={};t.config!=null&&t.config.rowhidden!=null&&(l=t.config.rowhidden),$("#luckysheet-filter-options-sheet"+e+" .luckysheet-filter-options").each(function(a){if(t.filter==null)return!1;let o=$(this),s=t.filter[a];if(s==null)return!0;P(s)!="object"&&(s=JSON.parse(s)),Vn(o,s.optionstate,s.rowhidden,s.caljs,!1,s.st_r,s.ed_r,s.cindex,s.st_c,s.ed_c),l=$.extend(!0,l,s.rowhidden)}),t.config==null&&(t.config={}),t.config.rowhidden=l,h.config=t.config,St(h.flowdata.length,h.flowdata[0].length,!1)},restorePivot:function(e){let n=this.getSheetIndex(e);!h.luckysheetfile[n].isPivotTable||(Oe.getCellData(e),Oe.initialPivotManage(!0),Oe.refreshPivotTable(!1))},restoreSheetAll:function(e){let n=this;n.restorePivot(e),n.restoreFilter(e),n.restoreFreezen(e)},restoreFreezen:function(e){Y.initialFreezen(e)},restoreCache:function(){let e=this,n=e.CacheNotLoadControll;if(e.CacheNotLoadControll=[],n.length!=0)for(let t=0;t<n.length;t++){let l=n[t];e.execCache(l)}},CacheNotLoadControll:[],execCache:function(e){let n=this,t=e.t,l=e.i,a=e.v,o=h.luckysheetfile[n.getSheetIndex(l)];if(t=="sha")h.luckysheetfile.push(a);else if(t=="shc"){let s=$.extend(!0,{},h.luckysheetfile[n.getSheetIndex(a.copyindex)]);s.index=l,h.luckysheetfile.push(s)}else if(t=="shd")h.luckysheetfile.splice(a.deleIndex,1);else if(t=="shr")for(let s in a)h.luckysheetfile[n.getSheetIndex(s)].order=a[s];if((o==null||o.load!="1")&&!(t in{sha:0,shc:0,shd:0,shr:0})){n.CacheNotLoadControll.push(e);return}if(t=="v"){let s=e.r,u=e.c,d=e.v,f=n.getSheetData(l);o.data[s][u]=d}else if(t=="fc"){let s=e.op,u=e.pos;P(a)!="object"&&(a=new Function("return "+a)());let d=a.r,f=a.c;s=="del"?p.delFunctionGroup(d,f,l):p.insertUpdateFunctionGroup(d,f,l)}else if(t=="cg"){let s=a,u=e.k,d=n.getSheetConfig(l);u in d||(d[u]={});for(let f in s)d[u][f]=s[f];h.config=d}else if(t=="f"){let s=a,u=e.op,d=e.pos,f=o.filter;f==null&&(f={}),u=="upOrAdd"?f[d]=s:u=="del"&&delete f[d]}else if(t=="fsc")o.filter=null,o.filter_select=null;else if(t=="fsr"){let s=a;o.filter=s.filter,o.filter_select=s.filter_select}else if(t=="sh"){let s=e.op,u=e.cur,d=a;if(s=="hide")o.status=0,h.luckysheetfile[n.getSheetIndex(u)].status=1;else if(s=="show"){for(let f=0;f<h.luckysheetfile.length;f++)h.luckysheetfile[f].status=0;o.status=1}}else if(t=="all"){let s=e.k;e.s&&P(a)!="object"?o[s]=JSON.stringify(a):o[s]=a}else if(t=="c"){let s=e.op,u=e.cid;if(s=="add")o.chart.push(a);else if(s=="xy"||s=="wh"||s=="update"){for(let d=0;d<o.chart.length;d++)if(o.chart[d].chart_id==u){for(let f in o.chart[d])for(let m in a)f==m&&(o.chart[d][f]=a[m]);return}}else if(s=="del"){for(let d=0;d<o.chart.length;d++)if(o.chart[d].chart_id==u){o.chart.splice(d,1);return}}}else if(t=="drc"){let s=e.rc,u=a.index,d=a.len,f=o.celldata;if(s=="r"){for(let b=0;f.length==0;b++){let k=f[b];k.r>=u&&k.r<u+d?delete f[b]:k.r>=u+d&&(k.r-=d)}o.row-=d}else{for(let b=0;f.length==0;b++){let k=f[b];k.c>=u&&k.c<u+d?delete f[b]:k.c>=u+d&&(k.c-=d)}o.column-=d}let m=[];for(let b=0;b<f.length;b++)f[b]!=null&&m.push(f[b]);o.celldata=m;let g,y,v;s=="r"?g="row":g="column",y=u,v=u+d-1,qn(g,y,v,!0)}else if(t=="arc"){let s=e.rc,u=a.index,d=a.len,f=o.celldata;if(s=="r"){for(let g=0;g<f.length;g++){let y=f[g];y.r>u&&(y.r+=d)}o.row+=d}else{for(let g=0;g<f.length;g++){let y=f[g];y.c>u&&(y.c+=d)}o.column+=d}let m;s=="r"?m="row":m="column",Ir(m,u,d,!0)}else t=="na"?ne.saveParam("na",null,a):t=="thumb"&&setTimeout(function(){n.imageRequest()},2e3)}},ve=Cv});var Tv,p,Ut=Ie(()=>{dt();Nt();An();Gt();fl();il();Qt();Vl();Ml();yr();Zt();Ft();Or();mr();Kt();$r();Al();Jt();ll();Ol();pn();Yt();gn();Oi();Xe();bt();Ba();Ll();Tv={error:{v:"#VALUE!",n:"#NAME?",na:"#N/A",r:"#REF!",d:"#DIV/0!",nm:"#NUM!",nl:"#NULL!",sp:"#SPILL!"},errorInfo:function(e){return e},errorParamCheck:function(e,n,t){let l,a,s=Q().formulaMore;return t<e.length?(l=e[t].type,a=e[t].require):(l=e[e.length-1].type,a=e[e.length-1].require),a=="o"&&(n==null||n=="")?[!0,s.tipSuccessText]:l.indexOf("all")>-1?[!0,s.tipSuccessText]:l.indexOf("range")>-1&&(P(n)=="object"||P(n)=="array")?[!0,s.tipSuccessText]:l.indexOf("number")>-1&&(B(n)||P(n)=="boolean")?[!0,s.tipSuccessText]:l.indexOf("string")>-1&&P(n)=="string"?[!0,s.tipSuccessText]:l.indexOf("date")>-1&&Lt(n)?[!0,s.tipSuccessText]:[!1,s.tipParamErrorText]},getPureValueByData:function(e){if(e.length==0)return[];let n=[];if(P(e)=="array")if(P(e[0])=="array")for(let t=0;t<e.length;t++){let l=[];for(let a=0;a<e[0].length;a++){let o=e[t][a];P(o)=="object"?l.push(o.v):l.push(o)}n.push(l)}else for(let t=0;t<e.length;t++){let l=e[t];P(l)=="object"?n.push(l.v):n.push(l)}else{let t=e;P(t)=="object"?n.push(t.v):n.push(t)}return n},readCellDataToOneArray:function(e){let n=this;if(e==null)return[];if(P(e)!="object")return[e];let t=[],l=[];if(e!=null&&e.data!=null)l=e.data;else return e!=null&&!me(e.v)?[e.v]:[];if(P(l)=="array")l=n.getPureValueByData(l);else{if(P(l)=="object")return l=l.v,[l];/\{.*?\}/.test(l)&&(l=l.replace(/\{/g,"[").replace(/\}/g,"]")),l=new Function("return "+l)()}if(P(l[0])=="array")for(let a=0;a<l.length;a++)t=t.concat(l[a]);else t=l;return t},getValueByFuncData:function(e,n){if(e==null)return null;let t=this;return P(e)=="array"?n=="avg"?luckysheet_function.AVERAGE.f.apply(luckysheet_function.AVERAGE,e):n=="sum"?luckysheet_function.SUM.f.apply(luckysheet_function.SUM,e):P(e[0])=="object"?luckysheet.mask.getValueByFormat(e[0]):e[0]:P(e)=="object"?luckysheet.mask.getValueByFormat(e):e},sparklinesColorMap:function(e,n){let t=this,l=null;n==null&&(n=5);let a=0;if(e.length>n)for(let o=n;o<e.length;o++){let s=e[o],u=t.readCellDataToOneArray(s);for(let d=0;d<u.length;d++){let f=u[d];if(f.indexOf(":")>-1){l||(l={});let m=f.split(":");m.length==2?l[m[0]]=m[1]:m.length>1&&(l[m[0]+":"+m[1]]=m[2])}else l||(l=[]),l.push(f)}a++}return l},colorList:["#2ec7c9","#fc5c5c","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],classlist:{province:{11:"\u5317\u4EAC",12:"\u5929\u6D25",13:"\u6CB3\u5317",14:"\u5C71\u897F",15:"\u5185\u8499\u53E4",21:"\u8FBD\u5B81",22:"\u5409\u6797",23:"\u9ED1\u9F99\u6C5F",31:"\u4E0A\u6D77",32:"\u6C5F\u82CF",33:"\u6D59\u6C5F",34:"\u5B89\u5FBD",35:"\u798F\u5EFA",36:"\u6C5F\u897F",37:"\u5C71\u4E1C",41:"\u6CB3\u5357",42:"\u6E56\u5317",43:"\u6E56\u5357",44:"\u5E7F\u4E1C",45:"\u5E7F\u897F",46:"\u6D77\u5357",50:"\u91CD\u5E86",51:"\u56DB\u5DDD",52:"\u8D35\u5DDE",53:"\u4E91\u5357",54:"\u897F\u85CF",61:"\u9655\u897F",62:"\u7518\u8083",63:"\u9752\u6D77",64:"\u5B81\u590F",65:"\u65B0\u7586",71:"\u53F0\u6E7E",81:"\u9999\u6E2F",82:"\u6FB3\u95E8",91:"\u56FD\u5916"}},oldvalue:null,dontupdate:function(){let e=this;h.luckysheetCellUpdate.length=0,$("#luckysheet-functionbox-cell, #luckysheet-rich-text-editor").html(e.oldvalue),e.cancelNormalSelected(),e.rangetosheet!=h.currentSheetIndex&&ve.changeSheetExec(e.rangetosheet)},xssDeal:function(e){return typeof e!="string"?e:e.replace(/<script>/g,"<script>").replace(/<\/script>/,"</script>")},ltGtSignDeal:function(e){return typeof e!="string"||e.substr(0,5)==="<span"||e.startsWith("=")?e:e.replace(/</g,"<").replace(/>/g,">")},fucntionboxshow:function(e,n){if(!xo(e,n,h.currentSheetIndex)){$("#luckysheet-functionbox-cell").html("");return}let t=this,l=h.flowdata,a="";if(l[e]!=null&&l[e][n]!=null){let o=$.extend(!0,{},l[e][n]);_l(o)?a=Bd(e,n):o.f!=null?a=ze(e,n,l,"f"):a=bn(e,n,l)}a=this.xssDeal(a),t.oldvalue=a,$("#luckysheet-functionbox-cell").html(a)},cellOffset:function(e,n,t,l,a){let o=e.startCell,s=e.rowl,u=e.coll,d=parseInt(o.replace(/[^0-9]/g,"")),f=hl(o.replace(/[^A-Za-z]/g,"")),m=[],g=[],y;m[0]=d+n,g[0]=f+t,m[1]=m[0]+l-1,g[1]=g[0]+a-1,g[0]=tt(g[0]),g[1]=tt(g[1]);let v=g[0]+m[0],b=g[1]+m[1];return v==b?y=e.sheetName+"!"+v:y=e.sheetName+"!"+v+":"+b,y},parseDatetoNum:function(e){let n=this;if(typeof e=="object"&&typeof e.v=="number")e=e.v;else if(tr(e)=="num")e=parseFloat(e);else if(tr(e)=="date")e=at(e)[2];else return n.error.v;return e},getRangeArray:function(e){let n=[],t="General";if(e.length==1)for(let l=0;l<e[0].length;l++)if(e[0][l]!=null&&e[0][l].v){n.push(e[0][l].v);let a=e[0][l].ct.fa;t=t=="General"?a:t}else n.push(null);else if(e[0].length==1)for(let l=0;l<e.length;l++)if(e[l][0]!=null&&e[l][0].v){n.push(e[l][0].v);let a=e[l][0].ct.fa;t=t=="General"?a:t}else n.push(null);else for(let l=0;l<e.length;l++)for(let a=0;a<e[l].length;a++)if(e[l][a]!=null&&e[l][a].v){n.push(e[l][a].v);let o=e[l][a].ct.fa;t=t=="General"?o:t}else n.push(null);return e=n,[e,t]},getRangeArrayTwo:function(e){let n=$.extend(!0,[],e);if(n.length==1)for(let t=0;t<n[0].length;t++)n[0][t]instanceof Object&&(n[0][t]!=null&&n[0][t]instanceof Object&&!!n[0][t].m?n[0][t]=n[0][t].m:n[0][t]!=null&&n[0][t]instanceof Object&&!!n[0][t].v?n[0][t]=n[0][t].v:n[0][t]=null);else if(n[0].length==1)for(let t=0;t<n.length;t++)n[t][0]instanceof Object&&(n[t][0]!=null&&n[t][0]instanceof Object&&!!n[t][0].m?n[t][0]=n[t][0].m:n[t][0]!=null&&n[t][0]instanceof Object&&!!n[t][0].v?n[t][0]=n[t][0].v:n[t][0]=null);else for(let t=0;t<n.length;t++)for(let l=0;l<n[t].length;l++)n[t][l]instanceof Object&&(n[t][l]!=null&&n[t][l]instanceof Object&&!!n[t][l].m?n[t][l]=n[t][l].m:n[t][l]!=null&&n[t][l]instanceof Object&&!!n[t][l].v?n[t][l]=n[t][l].v:n[t][l]=null);return n},isWildcard:function(e,n){let t=this;e=e.toString(),n=n.toString(),t.isCompareOperator(n).flag&&(n=t.isCompareOperator(n).num);let l="";for(let o=0;o<n.length;o++){let s=n.charAt(o);s=="*"?l+=".*":s=="?"?l+=".":s=="~"?n.charAt(o+1)=="*"?(l+="\\*",o++):n.charAt(o+1)=="?"?(l+="\\?",o++):l+="~":l+=s}let a=new RegExp("^"+l+"$","g");return!!e.match(a)},isCompareOperator:function(e){e=e.toString();let n="",t="",l=e.substr(0,1),a=e.substr(1,1),o=!1,s;return l==">"?a=="="?(n=e.substr(0,2),t=e.substr(2),o=!0):a!="="&&(n=e.substr(0,1),t=e.substr(1),o=!0):l=="<"?a=="="||a==">"?(n=e.substr(0,2),t=e.substr(2),o=!0):a!="="&&a!=">"&&(n=e.substr(0,1),t=e.substr(1),o=!0):l=="="&&a!="="&&(n=e.substr(0,1),t=e.substr(1),o=!0),s={flag:o,ope:n,num:t},s},acompareb:function(e,n){let t=this,l=!1;if(B(n))l=Ya(e,"==",n);else if(typeof n=="string"){if(n.indexOf("*")!=-1||n.indexOf("?")!=-1)return t.isWildcard(e,n);if(t.isCompareOperator(n).flag){let a=t.isCompareOperator(n).ope,o=t.isCompareOperator(n).num;l=Ya(e,a,o)}else l=Ya(e,"==",n)}return l},compareParams:function(e,n,t){let l=!1,a=toString.call(e),o=toString.call(n);if((t==">"&&e>n||t==">="&&e>=n||t=="<"&&e<n||t=="<="&&e<=n||t=="="&&e==n||t=="<>"&&e!=n)&&(l=!0),a=="[object Object]"&&o=="[object Object]"){let s=Object.getOwnPropertyNames(e),u=Object.getOwnPropertyNames(n);if(s.length!=u.length)return!1;for(let d=0;d<s.length;d++){let f=s[d];if(e[f]!==n[f])return!1}return!0}return a=="[object Array]"&&o=="[object Array]"?e.toString()==n.toString():l},parseDecimal:function(e){e=parseFloat(e);let n=parseInt(e,10);return n==0||(e=e%n),e},getcellrange:function(e,n){if(e==null||e.length==0)return;let t="",l="",a=null,o=null,s=Et();if(e.indexOf("!")>-1){if(e in this.cellTextToIndexList)return this.cellTextToIndexList[e];let u=e.split("!");t=u[0],l=u[1],t=t.replace(/\\'/g,"'").replace(/''/g,"'"),t.substr(0,1)=="'"&&t.substr(t.length-1,1)=="'"&&(t=t.substring(1,t.length-1));for(let d in s)if(t==s[d].name){a=s[d].index,o=s[d].data;break}}else{let u=n;if(u==null&&(u=h.currentSheetIndex),e+"_"+u in this.cellTextToIndexList)return this.cellTextToIndexList[e+"_"+u];let d=Z(u);t=s[d].name,a=s[d].index,o=h.flowdata,l=e}if(l.indexOf(":")==-1){let u=parseInt(l.replace(/[^0-9]/g,""))-1,d=hl(l.replace(/[^A-Za-z]/g,""));if(!isNaN(u)&&!isNaN(d)){let f={row:[u,u],column:[d,d],sheetIndex:a};return this.addToCellIndexList(e,f),f}else return null}else{l=l.split(":");let u=[],d=[];if(u[0]=parseInt(l[0].replace(/[^0-9]/g,""))-1,u[1]=parseInt(l[1].replace(/[^0-9]/g,""))-1,isNaN(u[0])&&(u[0]=0),isNaN(u[1])&&(u[1]=o.length-1),u[0]>u[1]||(d[0]=hl(l[0].replace(/[^A-Za-z]/g,"")),d[1]=hl(l[1].replace(/[^A-Za-z]/g,"")),isNaN(d[0])&&(d[0]=0),isNaN(d[1])&&(d[1]=o[0].length-1),d[0]>d[1]))return null;let f={row:u,column:d,sheetIndex:a};return this.addToCellIndexList(e,f),f}},rangeHightlightHTML:'<div id="luckysheet-formula-functionrange-highlight-${id}" rangeindex="${id}" class="luckysheet-selection-highlight luckysheet-formula-functionrange-highlight"><div data-type="top" class="luckysheet-selection-copy-top luckysheet-copy"></div><div data-type="right" class="luckysheet-selection-copy-right luckysheet-copy"></div><div data-type="bottom" class="luckysheet-selection-copy-bottom luckysheet-copy"></div><div data-type="left" class="luckysheet-selection-copy-left luckysheet-copy"></div><div class="luckysheet-selection-copy-hc"></div><div data-type="lt" class="luckysheet-selection-highlight-topleft luckysheet-highlight"></div><div data-type="rt" class="luckysheet-selection-highlight-topright luckysheet-highlight"></div><div data-type="lb" class="luckysheet-selection-highlight-bottomleft luckysheet-highlight"></div><div data-type="rb" class="luckysheet-selection-highlight-bottomright luckysheet-highlight"></div></div>',createRangeHightlight:function(){let e=this,n=$("#luckysheet-rich-text-editor").find("span.luckysheet-formula-functionrange-cell");$("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove(),n.each(function(){let t=$(this).attr("rangeindex"),l=$(this).text();$("#luckysheet-formula-functionrange").append(_e(e.rangeHightlightHTML,{id:t}));let a=e.getcellrange(l),o="luckysheet-formula-functionrange-highlight-"+t;a==null||(a.sheetIndex==h.currentSheetIndex||a.sheetIndex==-1&&e.rangetosheet==h.currentSheetIndex)&&($("#"+o).data("range",a).find(".luckysheet-copy").css({background:Yl[t]}).end().find(".luckysheet-highlight").css({background:Yl[t]}).end().find(".luckysheet-selection-copy-hc").css({background:Yl[t]}),Lf(o,a.row[0],a.row[1],a.column[0],a.column[1]))}),$("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").show()},searchHTML:'<div id="luckysheet-formula-search-c" class="luckysheet-formula-search-c"></div>',helpHTML:'<div id="luckysheet-formula-help-c" class="luckysheet-formula-help-c"> <div class="luckysheet-formula-help-close" title="${helpClose}"><i class="fa fa-times" aria-hidden="true"></i></div> <div class="luckysheet-formula-help-collapse" title="${helpCollapse}"><i class="fa fa-angle-up" aria-hidden="true"></i></div> <div class="luckysheet-formula-help-title"><div class="luckysheet-formula-help-title-formula"> <span class="luckysheet-arguments-help-function-name">SUM</span> <span class="luckysheet-arguments-paren">(</span> <span class="luckysheet-arguments-parameter-holder"> <span class="luckysheet-arguments-help-parameter luckysheet-arguments-help-parameter-active" dir="auto">A2:A100</span>, <span class="luckysheet-arguments-help-parameter" dir="auto">101</span> </span> <span class="luckysheet-arguments-paren">)</span> </div></div> <div class="luckysheet-formula-help-content"> <div class="luckysheet-formula-help-content-example"> <div class="luckysheet-arguments-help-section-title">${helpExample}</div> <div class="luckysheet-arguments-help-formula"> <span class="luckysheet-arguments-help-function-name">SUM</span> <span class="luckysheet-arguments-paren">(</span> <span class="luckysheet-arguments-parameter-holder"> <span class="luckysheet-arguments-help-parameter luckysheet-arguments-help-parameter-active" dir="auto">A2:A100</span>, <span class="luckysheet-arguments-help-parameter" dir="auto">101</span> </span> <span class="luckysheet-arguments-paren">)</span> </div> </div> <div class="luckysheet-formula-help-content-detail"> <div class="luckysheet-arguments-help-section"> <div class="luckysheet-arguments-help-section-title luckysheet-arguments-help-parameter-name">${helpAbstract}</div> <span class="luckysheet-arguments-help-parameter-content">${helpAbstract}</span> </div> </div> <div class="luckysheet-formula-help-content-param"> ${param} </div> </div> <div class="luckysheet-formula-help-foot"></div></div>',getrangeseleciton:function(){let e=window.getSelection(),n=$(e.anchorNode),t=e.anchorOffset;if(n.parent().is("span")&&t!=0){let l=$.trim(n.text()),a="";if(l.length==0&&n.parent().prev().length>0){let o=n.parent().prev();return l=$.trim(o.text()),a=l.substr(l.length-1,1),o}else return a=l.substr(t-1,1),n.parent()}else if(n.is("#luckysheet-rich-text-editor")||n.is("#luckysheet-functionbox-cell")){let l=$.trim(n.find("span").last().text());if(l.length==0&&n.find("span").length>1){let a=n.find("span");return l=$.trim(a.eq(a.length-2).text()),a}else return n.find("span").last()}else if((n.parent().is("#luckysheet-rich-text-editor")||n.parent().is("#luckysheet-functionbox-cell")||t==0)&&(t==0&&(n=n.parent()),n.prev().length>0)){let l=$.trim(n.prev().text()),a=l.substr(l.length-1,1);return n.prev()}return null},searchFunctionPosition:function(e,n,t,l,a){let o=$(window).height(),s=$(window).width(),u=e.outerWidth(),d=e.outerHeight();a==null&&(a=!1);let f=t;t+u>s?f=t-u+n.outerWidth():f=t;let m=l;l+d>o?m=l-d:(m=l+n.outerHeight(),a||e.html(e.find(".luckysheet-formula-search-item").get().reverse())),m<0&&(m=0),f<0&&(f=0),e.css({top:m,left:f}).show()},searchFunctionCell:null,searchFunction:function(e){let n=this,t=h.functionlist,l=n.getrangeseleciton();if(n.searchFunctionCell=l,l==null||e==null)return;let a=e.text(),o=l.text().toUpperCase();if(!/^[a-zA-Z]|[a-zA-Z_]+$/.test(o)||a.substr(0,1)!="=")return;let u={f:[],s:[],t:[]},d=0;for(let v=0;v<t.length;v++){let b=t[v],k=b.n;if(k==o?(u.f.unshift(b),d++):k.substr(0,o.length)==o?(u.s.unshift(b),d++):k.indexOf(o)>-1&&(u.t.unshift(b),d++),d>=10)break}let f=u.t.concat(u.s.concat(u.f));if(f.length<=0)return;let m=n.searchFunctionHTML(f);$("#luckysheet-formula-search-c").html(m).show(),$("#luckysheet-formula-help-c").hide();let g=e.parent(),y=g.offset();n.searchFunctionPosition($("#luckysheet-formula-search-c"),g,y.left,y.top)},searchFunctionEnter:function(e){let n=this,t=e.data("func");n.searchFunctionCell.text(t).after('<span dir="auto" class="luckysheet-formula-text-color">(</span>'),n.setCaretPosition(n.searchFunctionCell.next().get(0),0,1),$("#luckysheet-formula-search-c").hide(),n.helpFunctionExe(n.searchFunctionCell.closest("div"),n.searchFunctionCell.next())},searchFunctionHTML:function(e){let n=this;$("#luckysheet-formula-search-c").length==0&&($("body").append(n.searchHTML),$("#luckysheet-formula-search-c").on("mouseover",".luckysheet-formula-search-item",function(){$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"),$(this).addClass("luckysheet-formula-search-item-active")}).on("mouseout",".luckysheet-formula-search-item",function(){}).on("click",".luckysheet-formula-search-item",function(){n.searchFunctionCell!=null&&n.searchFunctionEnter($(this))}));let t='<div data-func="${n}" class="luckysheet-formula-search-item ${class}"><div class="luckysheet-formula-search-func">${n}</div><div class="luckysheet-formula-search-detail">${a}</div></div>',l="";for(let a=0;a<e.length;a++){let o=e[a];a==e.length-1?l+=_e(t,{class:"luckysheet-formula-search-item-active",n:o.n,a:o.a}):l+=_e(t,{class:"",n:o.n,a:o.a})}return l},functionlistPosition:{},helpFunction:function(e,n,t){let l=this,o=h.functionlist[l.functionlistPosition[$.trim(n).toUpperCase()]];if(o==null)return;let u=Q().formulaMore;$("#luckysheet-formula-help-c .luckysheet-arguments-help-function-name").html(o.n),$("#luckysheet-formula-help-c .luckysheet-arguments-help-parameter-content").html(o.d);let d='<span class="luckysheet-arguments-help-function-name">${name}</span> <span class="luckysheet-arguments-paren">(</span> <span class="luckysheet-arguments-parameter-holder"> ${param} </span> <span class="luckysheet-arguments-paren">)</span>',f='<span class="luckysheet-arguments-help-parameter" dir="auto">${param}</span>',m='<div class="luckysheet-arguments-help-section"><div class="luckysheet-arguments-help-section-title">${param}</div><span class="luckysheet-arguments-help-parameter-content">${content}</span></div>',g="",y="",v="";for(let w=0;w<o.p.length;w++){let x=o.p[w],C=x.name,S=x.name;x.repeat=="y"&&(C+=", ...",S+='<span class="luckysheet-arguments-help-argument-info">...-'+u.allowRepeatText+"</span>"),x.require=="o"&&(C="["+C+"]",S+='<span class="luckysheet-arguments-help-argument-info">-['+u.allowOptionText+"]</span>"),g+='<span class="luckysheet-arguments-help-parameter" dir="auto">'+C+"</span>, ",y+='<span class="luckysheet-arguments-help-parameter" dir="auto">'+x.example+"</span>, ",v+=_e(m,{param:S,content:x.detail})}if(g=g.substr(0,g.length-2),y=y.substr(0,y.length-2),$("#luckysheet-formula-help-c .luckysheet-formula-help-title .luckysheet-arguments-parameter-holder").html(g),$("#luckysheet-formula-help-c .luckysheet-arguments-help-formula .luckysheet-arguments-parameter-holder").html(y),$("#luckysheet-formula-help-c .luckysheet-formula-help-content-param").html(v),t==null)$("#luckysheet-formula-help-c .luckysheet-formula-help-title-formula .luckysheet-arguments-help-function-name").css("font-weight","bold");else{$("#luckysheet-formula-help-c .luckysheet-formula-help-title-formula .luckysheet-arguments-help-function-name").css("font-weight","normal");let w=t>=o.p.length?o.p.length-1:t;$("#luckysheet-formula-help-c .luckysheet-formula-help-title .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").removeClass("luckysheet-arguments-help-parameter-active"),$("#luckysheet-formula-help-c .luckysheet-formula-help-title .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").eq(w).addClass("luckysheet-arguments-help-parameter-active"),$("#luckysheet-formula-help-c .luckysheet-arguments-help-formula .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").removeClass("luckysheet-arguments-help-parameter-active"),$("#luckysheet-formula-help-c .luckysheet-arguments-help-formula .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").eq(w).addClass("luckysheet-arguments-help-parameter-active"),$("#luckysheet-formula-help-c .luckysheet-formula-help-content-param .luckysheet-arguments-help-section").removeClass("luckysheet-arguments-help-parameter-active"),$("#luckysheet-formula-help-c .luckysheet-formula-help-content-param .luckysheet-arguments-help-section").eq(w).addClass("luckysheet-arguments-help-parameter-active")}let b=e.parent(),k=b.offset();l.searchFunctionPosition($("#luckysheet-formula-help-c"),b,k.left,k.top,!0)},helpFunctionExe:function(e,n){let t=this,l=h.functionlist,o=Q().formulaMore;if($("#luckysheet-formula-help-c").length==0){$("body").after(_e(t.helpHTML,{helpClose:o.helpClose,helpCollapse:o.helpCollapse,helpExample:o.helpExample,helpAbstract:o.helpAbstract})),$("#luckysheet-formula-help-c .luckysheet-formula-help-close").click(function(){$("#luckysheet-formula-help-c").hide()}),$("#luckysheet-formula-help-c .luckysheet-formula-help-collapse").click(function(){let v=$("#luckysheet-formula-help-c .luckysheet-formula-help-content");v.slideToggle(100,function(){let b=t.rangeResizeTo.parent(),k=b.offset();t.searchFunctionPosition($("#luckysheet-formula-help-c"),b,k.left,k.top,!0)}),v.is(":hidden")?$(this).html('<i class="fa fa-angle-up" aria-hidden="true"></i>'):$(this).html('<i class="fa fa-angle-down" aria-hidden="true"></i>')});for(let v=0;v<l.length;v++)t.functionlistPosition[l[v].n]=v}if(!n)return;let s=n,u=e.length,d=e.find("span"),f=n.index(),m=f;if(s==null)return;let g=null,y=null;if(d.eq(m).is(".luckysheet-formula-text-func"))g=d.eq(m).text();else{let v=null,b=[-1,-1];for(;--m>0;)if(v=d.eq(m),v.is(".luckysheet-formula-text-func")||$.trim(v.text()).toUpperCase()in t.functionlistPosition){g=v.text(),y=null;let k=!0;for(let w=m;w<=f;w++)if(y||(y=0),!(w>=b[0]&&w<=b[1])){if(v=d.eq(w),v.is(".luckysheet-formula-text-rpar")){b=[m,w],g=null,k=!1;break}v.is(".luckysheet-formula-text-comma")&&y++}if(k)break}}g!=null&&t.helpFunction(e,g,y)},rangeHightlightselected:function(e,n){let t=this,l=t.getrangeseleciton();if($("#luckysheet-formula-search-c, #luckysheet-formula-help-c").hide(),$("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight .luckysheet-selection-copy-hc").css("opacity","0.03"),$("#luckysheet-formula-search-c, #luckysheet-formula-help-c").hide(),t.helpFunctionExe(e,l),$(l).closest(".luckysheet-formula-functionrange-cell").length==0){t.searchFunction(e);return}let o=$(l).closest(".luckysheet-formula-functionrange-cell").attr("rangeindex"),s="luckysheet-formula-functionrange-highlight-"+o;$("#"+s).find(".luckysheet-selection-copy-hc").css({opacity:"0.13"})},updatecell:function(e,n,t,l=!0){let a=this,o=$("#luckysheet-rich-text-editor"),s=o.text(),u=o.html();if(a.rangetosheet!=null&&a.rangetosheet!=h.currentSheetIndex&&ve.changeSheetExec(a.rangetosheet),!wn(e,n,h.currentSheetIndex))return;if(Ye.dataVerification!=null){let _=Ye.dataVerification[e+"_"+n];if(_!=null&&_.prohibitInput&&!Ye.validateCellData(s,_)){let T=Ye.getFailureText(_);U.info(T,""),a.cancelNormalSelected();return}}let d=h.flowdata[e][n],f=JSON.stringify(d),m=_l(d),g=s.slice(0,1)!="="&&u.substr(0,5)=="<span",y=!1;if(!g&&s&&s.length>0){let _=s.replace(/\r\n/g,"_x000D_").replace(/ /g,"_x000D_").replace(/\r/g,"_x000D_").replace(/\n/g,"_x000D_").split("_x000D_");_.length>1&&(y=!0,g=!0,s=_.join(`\r |
| | | `))}if(!t&&!g&&m?(delete d.ct.s,d.ct.t="g",d.ct.fa="General",t=""):g&&(P(d)!="object"&&(d={}),delete d.f,delete d.v,delete d.m,d.ct==null&&(d.ct={},d.ct.fa="General"),d.ct.t="inlineStr",d.ct.s=Pd(o.find("span")),y&&(d.ct.s=[{v:s}])),t=t||o.text(),!Je.createHookFunction("cellUpdateBefore",e,n,t,l)){a.cancelNormalSelected();return}if(!g){if(me(t)&&!m){if(d==null||me(d.v)&&d.spl==null&&d.f==null){a.cancelNormalSelected();return}}else if(d!=null&&d.qp!=1){if(P(d)=="object"&&(t==d.f||t==d.v||t==d.m)){a.cancelNormalSelected();return}else if(t==d){a.cancelNormalSelected();return}}P(t)=="string"&&t.slice(0,1)=="="&&t.length>1||P(d)=="object"&&d.ct!=null&&d.ct.fa!=null&&d.ct.fa!="@"&&!me(t)&&(delete d.m,d.f!=null&&(delete d.f,delete d.spl))}window.luckysheet_getcelldata_cache=null;let v=!0,b=xe.deepCopyFlowData(h.flowdata),k=null;if(P(d)=="object"){if(!g)if(P(t)=="string"&&t.slice(0,1)=="="&&t.length>1){let _=a.execfunction(t,e,n,void 0,!0);if(v=!1,d=$.extend(!0,{},b[e][n]),d.v=_[1],d.f=_[2],_.length==4&&_[3].type=="sparklines"){delete d.m,delete d.v;let T=_[3].data;P(T)=="array"&&P(T[0])!="object"?d.v=T[0]:d.spl=_[3].data}else _.length==4&&_[3].type=="dynamicArrayItem"&&(k=_[3].data)}else if(P(t)=="object"){let _=t.f;if(P(_)=="string"&&_.slice(0,1)=="="&&_.length>1){let T=a.execfunction(_,e,n,void 0,!0);if(v=!1,d=$.extend(!0,{},b[e][n]),d.v=T[1],d.f=T[2],T.length==4&&T[3].type=="sparklines"){delete d.m,delete d.v;let A=T[3].data;P(A)=="array"&&P(A[0])!="object"?d.v=A[0]:d.spl=T[3].data}else T.length==4&&T[3].type=="dynamicArrayItem"&&(k=T[3].data)}else for(let T in t)d[T]=t[T]}else a.delFunctionGroup(e,n),a.execFunctionGroup(e,n,t),v=!1,d=$.extend(!0,{},b[e][n]),d.v=t,delete d.f,delete d.spl,d.qp==1&&(""+t).substr(0,1)!="'"&&(d.qp=0,d.ct!=null&&(d.ct.fa="General",d.ct.t="n"));t=d}else if(P(t)=="string"&&t.slice(0,1)=="="&&t.length>1){let _=a.execfunction(t,e,n,void 0,!0);if(v=!1,t={v:_[1],f:_[2]},_.length==4&&_[3].type=="sparklines"){let T=_[3].data;P(T)=="array"&&P(T[0])!="object"?t.v=T[0]:t.spl=_[3].data}else _.length==4&&_[3].type=="dynamicArrayItem"&&(k=_[3].data)}else if(P(t)=="object"){let _=t.f;if(P(_)=="string"&&_.slice(0,1)=="="&&_.length>1){let T=a.execfunction(_,e,n,void 0,!0);if(v=!1,t.v=T[1],t.f=T[2],T.length==4&&T[3].type=="sparklines"){let A=T[3].data;P(A)=="array"&&P(A[0])!="object"?t.v=A[0]:t.spl=T[3].data}else T.length==4&&T[3].type=="dynamicArrayItem"&&(k=T[3].data)}else{let T=d;t.v==null&&(t.v=T)}}else a.delFunctionGroup(e,n),a.execFunctionGroup(e,n,t),v=!1;Ht(e,n,b,t),a.cancelNormalSelected();let w=!1,x=$.extend(!0,{},Et()[Z(h.currentSheetIndex)].config);if(x.rowlen==null&&(x.rowlen={}),b[e][n].tb=="2"&&b[e][n].v!=null||_l(b[e][n])&&typeof b[e][n].mc=="undefined"){let _=h.defaultrowlen,T=$("#luckysheetTableContent").get(0).getContext("2d");if(!(x.customHeight&&x.customHeight[e]==1)){let A=At(n)[1]-At(n)[0]-2,R=Sr(b[e][n],T,{r:e,c:n,cellWidth:A}),I=_;R!=null&&(I=R.textHeightAll+2),I>_&&(x.rowlen[e]=I,w=!0)}}let C=null;k&&(C=$.extend(!0,[],this.insertUpdateDynamicArray(k)));let S={dynamicArray:C};if(w&&(S={cfg:x,dynamicArray:C,RowlChange:w}),setTimeout(()=>{Je.createHookFunction("cellUpdated",e,n,JSON.parse(f),h.flowdata[e][n],l)},0),l)Ze(b,[{row:[e,e],column:[n,n]}],S,v),a.execFunctionGlobalData=null;else return{data:b,allParam:S}},cancelNormalSelected:function(){let e=this;e.canceFunctionrangeSelected(),$("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove(),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-input-box-index").hide(),$("#luckysheet-wa-functionbox-cancel, #luckysheet-wa-functionbox-confirm").removeClass("luckysheet-wa-calculate-active"),e.rangestart=!1,e.rangedrag_column_start=!1,e.rangedrag_row_start=!1},canceFunctionrangeSelected:function(){$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-row-count-show, #luckysheet-column-count-show").hide(),$("#luckysheet-formula-search-c, #luckysheet-formula-help-c").hide()},iscellformat:function(e){let n=/[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][123456789]/},iscelldata:function(e){let n=e.split("!"),t;n.length>1?t=n[1]:t=n[0];let l=/^(([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+))$/g,a=/^(((([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+)))|((([a-zA-Z]+)|([$][a-zA-Z]+))))$/g;if(t.indexOf(":")==-1){let o=parseInt(t.replace(/[^0-9]/g,""))-1,s=hl(t.replace(/[^A-Za-z]/g,""));return!isNaN(o)&&!isNaN(s)&&t.toString().match(l)?!0:(isNaN(o)&&isNaN(s),!1)}else{a=/^(((([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+)))|((([a-zA-Z]+)|([$][a-zA-Z]+)))|((([0-9]+)|([$][0-9]+s))))$/g,t=t.split(":");let o=[],s=[];return o[0]=parseInt(t[0].replace(/[^0-9]/g,""))-1,o[1]=parseInt(t[1].replace(/[^0-9]/g,""))-1,o[0]>o[1]||(s[0]=hl(t[0].replace(/[^A-Za-z]/g,"")),s[1]=hl(t[1].replace(/[^A-Za-z]/g,"")),s[0]>s[1])?!1:!!(t[0].toString().match(a)&&t[1].toString().match(a))}},operator:"==|!=|<>|<=|>=|=|+|-|>|<|/|*|%|&|^",operatorjson:null,functionCopy:function(e,n,t){let l=this;if(l.operatorjson==null){let m=l.operator.split("|"),g={};for(let y=0;y<m.length;y++)g[m[y].toString()]=1;l.operatorjson=g}n==null&&(n="down"),t==null&&(t=1),e.substr(0,1)=="="&&(e=e.substr(1));let a=e.split(""),o=0,s="",u="",d=!0,f={bracket:0,comma:0,squote:0,dquote:0};for(;o<a.length;){let m=a[o];if(m=="("&&f.dquote==0)f.bracket+=1,s.length>0?u+=s+"(":u+="(",s="";else if(m==")"&&f.dquote==0)f.bracket-=1,u+=l.functionCopy(s,n,t)+")",s="";else if(m=='"'&&f.squote==0)f.dquote>0?(u+=s+'"',f.dquote-=1,s=""):(f.dquote+=1,s+='"');else if(m==","&&f.dquote==0)u+=l.functionCopy(s,n,t)+",",s="";else if(m=="&"&&f.dquote==0)s.length>0?(u+=l.functionCopy(s,n,t)+"&",s=""):u+="&";else if(m in l.operatorjson&&f.dquote==0){let g="";o+1<a.length&&(g=a[o+1]);let y=o-1,v=null;if(y>=0)do v=a[y--];while(y>=0&&v==" ");m+g in l.operatorjson?(s.length>0?(u+=l.functionCopy(s,n,t)+m+g,s=""):u+=m+g,o++):!/[^0-9]/.test(g)&&m=="-"&&(v=="("||v==null||v==","||v==" "||v in l.operatorjson)?s+=m:s.length>0?(u+=l.functionCopy(s,n,t)+m,s=""):u+=m}else s+=m;o==a.length-1&&(l.iscelldata($.trim(s))?n=="down"?u+=l.downparam($.trim(s),t):n=="up"?u+=l.upparam($.trim(s),t):n=="left"?u+=l.leftparam($.trim(s),t):n=="right"&&(u+=l.rightparam($.trim(s),t)):u+=$.trim(s)),o++}return u},isfreezonFuc:function(e){let n=e.replace(/[^0-9]/g,""),t=e.replace(/[^A-Za-z]/g,""),l=e.substr(e.indexOf(n)-1,1),a=e.substr(e.indexOf(t)-1,1),o=[!1,!1];return l=="$"&&(o[0]=!0),a=="$"&&(o[1]=!0),o},setfreezonFuceExe:function(e){let n=parseInt(e.replace(/[^0-9]/g,"")),t=hl(e.replace(/[^A-Za-z]/g,"")),l="$",a="$";return!isNaN(n)&&!isNaN(t)?a+tt(t)+l+n:isNaN(n)?isNaN(t)?e:a+tt(t):l+n},setfreezonFuc:function(e){let n=this,t=n.getrangeseleciton();if(!n.iscelldata(t.text()))return;let l=t.text(),a=window.getSelection().anchorOffset,o=l.split("!"),s,u="";o.length>1?(s=o[1],u=o[0]+"!"):s=o[0];let d="",f="",m=s.indexOf(":");if(m==-1)d=u+n.setfreezonFuceExe(s),f=d.length;else if(s=s.split(":"),a>m){let g=u+s[0]+":"+n.setfreezonFuceExe(s[1]);d=g,f=g.length}else{let g=u+n.setfreezonFuceExe(s[0]);d=g+":"+s[1],f=g.length}t.text(u+d),n.setCaretPosition(t.get(0),0,f)},updateparam:function(e,n,t){let l=this,a=n.split("!"),o,s="";if(a.length>1?(o=a[1],s=a[0]+"!"):o=a[0],o.indexOf(":")==-1){let u=parseInt(o.replace(/[^0-9]/g,"")),d=hl(o.replace(/[^A-Za-z]/g,"")),f=l.isfreezonFuc(o),m=f[0]?"$":"",g=f[1]?"$":"";return e=="u"&&!f[0]?u-=t:e=="r"&&!f[1]?d+=t:e=="l"&&!f[1]?d-=t:e=="d"&&!f[0]&&(u+=t),u[0]<0||d[0]<0?l.error.r:!isNaN(u)&&!isNaN(d)?s+g+tt(d)+m+u:isNaN(u)?isNaN(d)?n:s+g+tt(d):s+m+u}else{o=o.split(":");let u=[],d=[];if(u[0]=parseInt(o[0].replace(/[^0-9]/g,"")),u[1]=parseInt(o[1].replace(/[^0-9]/g,"")),u[0]>u[1]||(d[0]=hl(o[0].replace(/[^A-Za-z]/g,"")),d[1]=hl(o[1].replace(/[^A-Za-z]/g,"")),d[0]>d[1]))return n;let f=l.isfreezonFuc(o[0]),m=l.isfreezonFuc(o[1]),g=f[0]?"$":"",y=f[1]?"$":"",v=m[0]?"$":"",b=m[1]?"$":"";return e=="u"?(f[0]||(u[0]-=t),m[0]||(u[1]-=t)):e=="r"?(f[1]||(d[0]+=t),m[1]||(d[1]+=t)):e=="l"?(f[1]||(d[0]-=t),m[1]||(d[1]-=t)):e=="d"&&(f[0]||(u[0]+=t),m[0]||(u[1]+=t)),u[0]<0||d[0]<0?l.error.r:isNaN(d[0])&&isNaN(d[1])?s+g+u[0]+":"+v+u[1]:isNaN(u[0])&&isNaN(u[1])?s+y+tt(d[0])+":"+b+tt(d[1]):s+y+tt(d[0])+g+u[0]+":"+b+tt(d[1])+v+u[1]}},downparam:function(e,n){return this.updateparam("d",e,n)},upparam:function(e,n){return this.updateparam("u",e,n)},leftparam:function(e,n){return this.updateparam("l",e,n)},rightparam:function(e,n){return this.updateparam("r",e,n)},functionStrChange:function(e,n,t,l,a,o){let s=this;if(s.operatorjson==null){let v=s.operator.split("|"),b={};for(let k=0;k<v.length;k++)b[v[k].toString()]=1;s.operatorjson=b}e.substr(0,1)=="="&&(e=e.substr(1));let u=e.split(""),d=0,f="",m="",g=!0,y={bracket:0,comma:0,squote:0,dquote:0};for(;d<u.length;){let v=u[d];if(v=="("&&y.dquote==0)y.bracket+=1,f.length>0?m+=f+"(":m+="(",f="";else if(v==")"&&y.dquote==0)y.bracket-=1,m+=s.functionStrChange(f,n,t,l,a,o)+")",f="";else if(v=='"'&&y.squote==0)y.dquote>0?(m+=f+'"',y.dquote-=1,f=""):(y.dquote+=1,f+='"');else if(v==","&&y.dquote==0)m+=s.functionStrChange(f,n,t,l,a,o)+",",f="";else if(v=="&"&&y.dquote==0)f.length>0?(m+=s.functionStrChange(f,n,t,l,a,o)+"&",f=""):m+="&";else if(v in s.operatorjson&&y.dquote==0){let b="";d+1<u.length&&(b=u[d+1]);let k=d-1,w=null;if(k>=0)do w=u[k--];while(k>=0&&w==" ");v+b in s.operatorjson?(f.length>0?(m+=s.functionStrChange(f,n,t,l,a,o)+v+b,f=""):m+=v+b,d++):!/[^0-9]/.test(b)&&v=="-"&&(w=="("||w==null||w==","||w==" "||w in s.operatorjson)?f+=v:f.length>0?(m+=s.functionStrChange(f,n,t,l,a,o)+v,f=""):m+=v}else f+=v;d==u.length-1&&(s.iscelldata($.trim(f))?m+=s.functionStrChange_range($.trim(f),n,t,l,a,o):m+=$.trim(f)),d++}return m},functionStrChange_range:function(e,n,t,l,a,o){let s=this,u=e.split("!"),d,f="";u.length>1?(d=u[1],f=u[0]+"!"):d=u[0];let m,g,y,v,b,k,w,x;if(d.indexOf(":")==-1){m=g=parseInt(d.replace(/[^0-9]/g,""))-1,y=v=hl(d.replace(/[^A-Za-z]/g,""));let C=s.isfreezonFuc(d);b=k=C[0]?"$":"",w=x=C[1]?"$":""}else{if(d=d.split(":"),m=parseInt(d[0].replace(/[^0-9]/g,""))-1,g=parseInt(d[1].replace(/[^0-9]/g,""))-1,m>g||(y=hl(d[0].replace(/[^A-Za-z]/g,"")),v=hl(d[1].replace(/[^A-Za-z]/g,"")),y>v))return e;let C=s.isfreezonFuc(d[0]);b=C[0]?"$":"",w=C[1]?"$":"";let S=s.isfreezonFuc(d[1]);k=S[0]?"$":"",x=S[1]?"$":""}if(n=="del"){if(t=="row"){if(m>=a&&g<=a+o-1)return s.error.r;m>a+o-1?m-=o:m>=a&&(m=a),g>a+o-1?g-=o:g>=a&&(g=a-1),m<0&&(m=0),g<m&&(g=m)}else if(t=="col"){if(y>=a&&v<=a+o-1)return s.error.r;y>a+o-1?y-=o:y>=a&&(y=a),v>a+o-1?v-=o:v>=a&&(v=a-1),y<0&&(y=0),v<y&&(v=y)}return m==g&&y==v?!isNaN(m)&&!isNaN(y)?f+w+tt(y)+b+(m+1):isNaN(m)?isNaN(y)?e:f+w+tt(y):f+b+(m+1):isNaN(y)&&isNaN(v)?f+b+(m+1)+":"+k+(g+1):isNaN(m)&&isNaN(g)?f+w+tt(y)+":"+x+tt(v):f+w+tt(y)+b+(m+1)+":"+x+tt(v)+k+(g+1)}else if(n=="add")return t=="row"?l=="lefttop"?(m>=a&&(m+=o),g>=a&&(g+=o)):l=="rightbottom"&&(m>a&&(m+=o),g>a&&(g+=o)):t=="col"&&(l=="lefttop"?(y>=a&&(y+=o),v>=a&&(v+=o)):l=="rightbottom"&&(y>a&&(y+=o),v>a&&(v+=o))),m==g&&y==v?!isNaN(m)&&!isNaN(y)?f+w+tt(y)+b+(m+1):isNaN(m)?isNaN(y)?e:f+w+tt(y):f+b+(m+1):isNaN(y)&&isNaN(v)?f+b+(m+1)+":"+k+(g+1):isNaN(m)&&isNaN(g)?f+w+tt(y)+":"+x+tt(v):f+w+tt(y)+b+(m+1)+":"+x+tt(v)+k+(g+1)},israngeseleciton:function(e){let n=this;if(n.operatorjson==null){let o=n.operator.split("|"),s={};for(let u=0;u<o.length;u++)s[o[u].toString()]=1;n.operatorjson=s}e==null&&(e=!1);let t=window.getSelection(),l=$(t.anchorNode),a=t.anchorOffset;if(l.parent().is("span")&&a!=0){let o=$.trim(l.text()),s="";if(o.length==0&&l.parent().prev().length>0){let u=l.parent().prev();o=$.trim(u.text()),s=o.substr(o.length-1,1),n.rangeSetValueTo=u}else s=o.substr(a-1,1),n.rangeSetValueTo=l.parent();if(e&&(s=="("||s==",")||!e&&(s=="("||s==","||s=="="||s in n.operatorjson||s=="&"))return!0}else if(l.is("#luckysheet-rich-text-editor")||l.is("#luckysheet-functionbox-cell")){let o=$.trim(l.find("span").last().text()),s;if(n.rangeSetValueTo=l.find("span").last(),o.length==0&&l.find("span").length>1){let u=l.find("span");o=$.trim(u.eq(u.length-2).text()),n.rangeSetValueTo=u}if(s=o.substr(o.length-1,1),e&&(s=="("||s==",")||!e&&(s=="("||s==","||s=="="||s in n.operatorjson||s=="&"))return!0}else if((l.parent().is("#luckysheet-rich-text-editor")||l.parent().is("#luckysheet-functionbox-cell")||a==0)&&(a==0&&(l=l.parent()),l.prev().length>0)){let o=$.trim(l.prev().text()),s=o.substr(o.length-1,1);if(n.rangeSetValueTo=l.prev(),e&&(s=="("||s==",")||!e&&(s=="("||s==","||s=="="||s in n.operatorjson||s=="&"))return!0}return!1},rangechangeindex:null,rangestart:!1,rangetosheet:null,rangeSetValueTo:null,func_selectedrange:{},rangeSetValue:function(e,n){let t=this,l="",a=e.row[0],o=e.column[0];h.config.merge!=null&&a+"_"+o in h.config.merge?l=xt(h.currentSheetIndex,{column:[o,o],row:[a,a]},t.rangetosheet):l=xt(h.currentSheetIndex,e,t.rangetosheet);let s;if(t.rangestart||t.rangedrag_column_start||t.rangedrag_row_start)if($("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible")){s=$("#luckysheet-rich-text-editor"),$("#luckysheet-search-formula-parm-select-input").val(l),$("#luckysheet-search-formula-parm .parmBox").eq(t.data_parm_index).find(".txt input").val(l);let u=ar(l).data;if(u instanceof Array){let v=[];for(let b=0;b<u.length;b++)for(let k=0;k<u[b].length;k++)u[b][k]==null?v.push(null):v.push(u[b][k].v);$("#luckysheet-search-formula-parm .parmBox").eq(t.data_parm_index).find(".val").text(" = {"+v.join(",")+"}")}else $("#luckysheet-search-formula-parm .parmBox").eq(t.data_parm_index).find(".val").text(" = {"+u.v+"}");let d=!0,f=[],m=-1;$("#luckysheet-search-formula-parm .parmBox").each(function(v,b){let k=$(b).find(".txt input").val();k==""&&$(b).find(".txt input").attr("data_parm_require")=="m"&&(d=!1),k!=""&&(m=v)});let g;if(m==-1)g="="+$("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text()+"()";else if(m==0)g="="+$("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text()+"("+$("#luckysheet-search-formula-parm .parmBox").eq(0).find(".txt input").val()+")";else{for(let v=0;v<=m;v++)f.push($("#luckysheet-search-formula-parm .parmBox").eq(v).find(".txt input").val());g="="+$("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text()+"("+f.join(",")+")"}let y=t.functionHTMLGenerate(g);if($("#luckysheet-rich-text-editor").html(y),$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()),d){let v=$.trim(t.functionParserExe($("#luckysheet-rich-text-editor").text())),b=new Function("return "+v)();$("#luckysheet-search-formula-parm .result span").text(b)}}else{let d=window.getSelection().anchorNode;s=$(d).closest("div");let f=s.find("span[rangeindex='"+t.rangechangeindex+"']").html(l);t.setCaretPosition(f.get(0),0,l.length)}else{let u='<span class="luckysheet-formula-functionrange-cell" rangeindex="'+t.functionHTMLIndex+'" dir="auto" style="color:'+Yl[t.functionHTMLIndex]+';">'+l+"</span>",d=$(u).insertAfter(t.rangeSetValueTo);t.rangechangeindex=t.functionHTMLIndex,s=$(t.rangeSetValueTo).closest("div"),t.setCaretPosition(s.find("span[rangeindex='"+t.rangechangeindex+"']").get(0),0,l.length),t.functionHTMLIndex++}s.attr("id")=="luckysheet-rich-text-editor"?$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()):$("#luckysheet-rich-text-editor").html($("#luckysheet-functionbox-cell").html())},rangedrag:function(e){let n=this,t=nt(e.pageX,e.pageY),l=t[0]+$("#luckysheet-cell-main").scrollLeft(),a=t[1]+$("#luckysheet-cell-main").scrollTop(),o=_t(a),s=o[1],u=o[0],d=o[2],f=wt(l),m=f[1],g=f[0],y=f[2],v=0,b=0,k=[];n.func_selectedrange.top>u?(v=u,b=n.func_selectedrange.top+n.func_selectedrange.height-u,k=[d,n.func_selectedrange.row[1]]):n.func_selectedrange.top==u?(v=u,b=n.func_selectedrange.top+n.func_selectedrange.height-u,k=[d,n.func_selectedrange.row[0]]):(v=n.func_selectedrange.top,b=s-n.func_selectedrange.top-1,k=[n.func_selectedrange.row[0],d]);let w=0,x=0,C=[];n.func_selectedrange.left>g?(w=g,x=n.func_selectedrange.left+n.func_selectedrange.width-g,C=[y,n.func_selectedrange.column[1]]):n.func_selectedrange.left==g?(w=g,x=n.func_selectedrange.left+n.func_selectedrange.width-g,C=[y,n.func_selectedrange.column[0]]):(w=n.func_selectedrange.left,x=m-n.func_selectedrange.left-1,C=[n.func_selectedrange.column[0],y]),k[0]=Y.changeFreezenIndex(k[0],"h"),k[1]=Y.changeFreezenIndex(k[1],"h"),C[0]=Y.changeFreezenIndex(C[0],"v"),C[1]=Y.changeFreezenIndex(C[1],"v");let S=ke.mergeMoveMain(C,k,n.func_selectedrange,v,b,w,x);if(S!=null&&(C=S[0],k=S[1],v=S[2],b=S[3],w=S[4],x=S[5]),n.func_selectedrange.row=k,n.func_selectedrange.column=C,n.func_selectedrange.left_move=w,n.func_selectedrange.width_move=x,n.func_selectedrange.top_move=v,n.func_selectedrange.height_move=b,or(w,v,x,b,k,C),$("#luckysheet-formula-functionrange-select").css({left:w,width:x,top:v,height:b}).show(),$("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){let _=xt(h.currentSheetIndex,{row:k,column:C},h.currentSheetIndex);$("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(_)}else n.rangeSetValue({row:k,column:C});Y.scrollFreezen(k,C)},rangedrag_column_start:!1,rangedrag_row_start:!1,rangedrag_column:function(e){let n=this,t=nt(e.pageX,e.pageY),l=t[0]+$("#luckysheet-cell-main").scrollLeft(),a=t[1]+$("#luckysheet-cell-main").scrollTop(),o=h.visibledatarow,s=o.length-1,u=o[s],d=0,f=wt(l),m=f[1],g=f[0],y=f[2],v=0,b=0,k=[];n.func_selectedrange.left>g?(v=g,b=n.func_selectedrange.left+n.func_selectedrange.width-g,k=[y,n.func_selectedrange.column[1]]):n.func_selectedrange.left==g?(v=g,b=n.func_selectedrange.left+n.func_selectedrange.width-g,k=[y,n.func_selectedrange.column[0]]):(v=n.func_selectedrange.left,b=m-n.func_selectedrange.left-1,k=[n.func_selectedrange.column[0],y]),k[0]=Y.changeFreezenIndex(k[0],"v"),k[1]=Y.changeFreezenIndex(k[1],"v");let w=ke.mergeMoveMain(k,[0,s],n.func_selectedrange,d,u-d-1,v,b);w!=null&&(k=w[0],v=w[4],b=w[5]),n.func_selectedrange.column=k,n.func_selectedrange.left_move=v,n.func_selectedrange.width_move=b,or(v,d,b,u-d-1,[0,s],k),n.rangeSetValue({row:[null,null],column:k}),$("#luckysheet-formula-functionrange-select").css({left:v,width:b,top:d,height:u-d-1}).show(),Y.scrollFreezen([0,s],k)},rangedrag_row:function(e){let n=this,t=nt(e.pageX,e.pageY),l=t[0]+$("#luckysheet-cell-main").scrollLeft(),a=t[1]+$("#luckysheet-cell-main").scrollTop(),o=_t(a),s=o[1],u=o[0],d=o[2],f=h.visibledatacolumn,m=f.length-1,g=f[m],y=0,v=0,b=0,k=[];n.func_selectedrange.top>u?(v=u,b=n.func_selectedrange.top+n.func_selectedrange.height-u,k=[d,n.func_selectedrange.row[1]]):n.func_selectedrange.top==u?(v=u,b=n.func_selectedrange.top+n.func_selectedrange.height-u,k=[d,n.func_selectedrange.row[0]]):(v=n.func_selectedrange.top,b=s-n.func_selectedrange.top-1,k=[n.func_selectedrange.row[0],d]),k[0]=Y.changeFreezenIndex(k[0],"h"),k[1]=Y.changeFreezenIndex(k[1],"h");let w=ke.mergeMoveMain([0,m],k,n.func_selectedrange,v,b,y,g-y-1);w!=null&&(k=w[1],v=w[2],b=w[3]),n.func_selectedrange.row=k,n.func_selectedrange.top_move=v,n.func_selectedrange.height_move=b,or(y,v,g-y-1,b,k,[0,m]),n.rangeSetValue({row:k,column:[null,null]}),$("#luckysheet-formula-functionrange-select").css({left:y,width:g-y-1,top:v,height:b}).show(),Y.scrollFreezen(k,[0,m])},rangedragged:function(){},rangeResizeObj:null,rangeResize:null,rangeResizeIndex:null,rangeResizexy:null,rangeResizeWinH:null,rangeResizeWinW:null,rangeResizeTo:null,rangeResizeDraging:function(e,n,t,l,a,o,s,u){let d=this,f=$("#luckysheet-scrollbar-y").scrollTop(),m=$("#luckysheet-scrollbar-x").scrollLeft(),g=nt(e.pageX,e.pageY),y=g[0]+m,v=g[1]+f,b=_t(v),k=b[1],w=b[0],x=b[2],C=wt(y),S=C[1],_=C[0],T=C[2];if(y<0||v<0)return!1;let A=w-t[1],R=_-t[0],I=t[5],F=t[3],z=t[4],M=t[2];if(l=="lt"||l=="lb"){if(t[0]+t[2]<_)return;z=_,M=t[2]-R,z>t[2]+t[4]-S+_?(z=t[2]+t[4]-S+_,M=t[2]-(t[2]+t[4]-S+_-t[0])):z<=0&&(z=0,M=t[2]+t[0])}if(l=="rt"||l=="rb"){if(t[6]-t[2]>S)return;M=t[2]+S-t[6],M<S-_-1?M=S-_-1:M>=s-z&&(M=s-z)}if(l=="lt"||l=="rt"){if(t[1]+t[3]<w)return;I=w,F=t[3]-A,I>t[3]+t[5]-k+w?(I=t[3]+t[5]-k+w,F=t[3]-(t[3]+t[5]-k+w-t[1])):I<=0&&(I=0,F=t[3]+t[1])}if(l=="lb"||l=="rb"){if(t[7]-t[3]>k)return;F=t[3]+k-t[7],F<k-w-1?F=k-w-1:F>=u-I&&(F=u-I)}let E=d.rangeResizeIndex,N={top:I,left:z,height:F,width:M},L=d.getSelectedFromRange(N),O=xt(h.currentSheetIndex,L,d.rangetosheet),V=d.rangeResizeTo.find("span[rangeindex='"+E+"']").html(O);_r(d.rangeResizeTo[0]),n.css(N).data("range",L)},getSelectedFromRange:function(e){let n=e.top+2,t=e.top+e.height-2,l=e.left+2,a=e.left+e.width-2;return{row:[_t(n)[2],_t(t)[2]],column:[wt(l)[2],wt(a)[2]]}},rangeResizeDragged:function(e,n,t,l,a,o){let s=this;s.rangeResize=null,$("#luckysheet-formula-functionrange-highlight-"+s.rangeResizeIndex).find(".luckysheet-selection-copy-hc").css("opacity",.03)},rangeMovexy:null,rangeMove:!1,rangeMoveObj:null,rangeMoveIndex:null,rangeMoveRangedata:null,rangeMoveDraging:function(e,n,t,l,a,o){let s=this,u=nt(e.pageX,e.pageY),d=$("#luckysheet-scrollbar-x").scrollLeft(),f=$("#luckysheet-scrollbar-y").scrollTop(),m=u[0]+d,g=u[1]+f,y=$(window).height()+f-a-o,v=$(window).width()+d,b=n[0],k=n[1],w=t.row[0]-b+_t(g)[2],x=t.row[1]-b+_t(g)[2],C=t.column[0]-k+wt(m)[2],S=t.column[1]-k+wt(m)[2];(w<0||g<0)&&(w=0,x=t.row[1]-t.row[0]),(C<0||m<0)&&(C=0,S=t.column[1]-t.column[0]);let _=h.visibledatarow;(x>=_[_.length-1]||g>y)&&(w=_.length-1-t.row[1]+t.row[0],x=_.length-1);let T=h.visibledatacolumn;(S>=T[T.length-1]||m>v)&&(C=T.length-1-t.column[1]+t.column[0],S=T.length-1);let A=C-1==-1?0:T[C-1],R=T[S],I=w-1==-1?0:_[w-1],F=_[x],z=s.rangeMoveIndex,M={left:A,width:R-A-2,top:I,height:F-I-2,display:"block"},E=s.getSelectedFromRange(M),N=xt(h.currentSheetIndex,E,s.rangetosheet),L=s.rangeResizeTo.find("span[rangeindex='"+z+"']").html(N);_r(s.rangeResizeTo[0]),s.rangeMoveRangedata=E,l.css(M)},rangeMoveDragged:function(e){let n=this;n.rangeMove=!1,$("#luckysheet-formula-functionrange-highlight-"+n.rangeMoveIndex).data("range",n.rangeMoveRangedata).find(".luckysheet-selection-copy-hc").css("opacity",.03)},functionHTMLIndex:0,functionRangeIndex:null,findrangeindex:function(e,n){let t=this,l=/<span.*?>/g,a=e.replace(l,""),o=n.replace(l,"");a=a.split("</span>"),o=o.split("</span>"),a.pop(),o.pop();let s=t.functionRangeIndex,u=0,d=o.length>a.length?a.length:o.length,f=o.length,m=a.length;if(f==m){let g=s[0],y=o[g],v=a[g];if(y==null)return o.length<=g?s=[o.length-1,o.length-1]:a.length<=g&&(s=[a.length-1,a.length-1]),s;if(y.length==v.length)return o[g+1]!=null&&a[g+1]!=null&&o[g+1].length<a[g+1].length&&(s[0]=s[0]+1,s[1]=1),s;if(y.length>v.length)return y!=null&&a[g+1]!=null&&a[g+1].substr(0,1)=='"'&&(y.indexOf("{")>-1||y.indexOf("}")>-1)&&(s[0]=s[0]+1,s[1]=1),s;if(y.length<v.length)return s[1]>v.length&&(s[1]=v.length),s}else if(f>m){let g=s[0],y=o[g],v=a[g];if(v==null)if(a[g-1].indexOf("{")>-1){s[0]=s[0]-1;let b=a[g-1].search("{");s[1]=s[1]+b}else s[0]=0,s[1]=0;else{if(y.length==v.length)return a[g+1]!=null&&(a[g+1].substr(0,1)=='"'||a[g+1].substr(0,1)=="{"||a[g+1].substr(0,1)=="}")?(s[0]=s[0]+1,s[1]=1):y!=null&&y.length>2&&y.substr(0,1)=='"'&&y.substr(y.length-1,1)=='"'||(a[g]!=null&&a[g]=='")'||a[g]!=null&&a[g]=='"}'||a[g]!=null&&a[g]=="{)"?s[1]=1:s[1]=v.length),s;if(y.length>v.length)return a[g+1]!=null&&(a[g+1].substr(0,1)=='"'||a[g+1].substr(0,1)=="{"||a[g+1].substr(0,1)=="}")&&(s[0]=s[0]+1,s[1]=1),s;if(y.length<v.length)return s}return s}else if(f<m){let g=s[0],y=o[g],v=a[g];if(y==null)s[0]=a.length-1,v!=null?s[1]=v.length:s[1]=1;else{if(y.length==v.length)return o[g+1]!=null&&(o[g+1].substr(0,1)=='"'||o[g+1].substr(0,1)=="{"||o[g+1].substr(0,1)=="}")?s[1]=v.length:a[g+1]!=null&&a[g+1].substr(0,1)=='"'&&(a[g+1].substr(0,1)=="{"||a[g+1].substr(0,1)=="}")?(s[0]=s[0]+1,s[1]=1):v!=null&&v.substr(0,1)=='"'&&v.substr(v.length-1,1)=='"'&&y.substr(0,1)=='"'&&y.substr(y.length-1,1)==")"||v!=null&&v.substr(0,1)=="{"&&v.substr(v.length-1,1)=="}"&&y.substr(0,1)=="{"&&y.substr(y.length-1,1)==")"?s[1]=v.length:(s[0]=s[0]+m-f,a.length>o.length?s[1]=a[g+1].length:s[1]=1),s;if(y.length>v.length)return y!=null&&y.substr(0,1)=='"'?s[1]=v.length:a[g+1]!=null&&/{.*?}/.test(a[g+1])?(s[0]=s[0]+1,s[1]=a[g+1].length):y!=null&&a[g+1].substr(0,1)=='"'&&(y.indexOf("{")>-1||y.indexOf("}")>-1)?(s[0]=s[0]+1,s[1]=1):y!=null&&(y.indexOf("{")>-1||y.indexOf("}")>-1)||(s[0]=s[0]+m-f-1,s[1]=a[g-1].length),s;if(y.length<v.length)return s}return s}return null},setCaretPosition:function(e,n,t){try{let l=e,a=document.createRange(),o=window.getSelection();a.setStart(l.childNodes[n],t),a.collapse(!0),o.removeAllRanges(),o.addRange(a),l.focus()}catch(l){_r(this.rangeResizeTo[0])}},functionRange:function(e,n,t){let l=this;if(window.getSelection){let a=window.getSelection(),o=l.findrangeindex(n,t);o==null?(a.selectAllChildren(e.get(0)),a.collapseToEnd()):l.setCaretPosition(e.find("span").get(o[0]),0,o[1])}else document.selection&&(l.functionRangeIndex.moveToElementText(e),l.functionRangeIndex.collapse(!1),l.functionRangeIndex.select())},functionInputHanddler:function(e,n,t){if(de())return;let l=this,a=e,o=n,s=o.html(),u=o.text(),d=this.xssDeal;setTimeout(function(){let f=o.text(),m=f;if(f=d(f),f.length>0&&f.substr(0,1)=="="&&(t!=229||f.length==1)){if(f=l.functionHTMLGenerate(f),s=l.functionHTMLGenerate(u),window.getSelection){let g=window.getSelection();if($(g.anchorNode).is("div")){let y=$("#luckysheet-rich-text-editor span").length;l.functionRangeIndex=[y-1,$("#luckysheet-rich-text-editor").find("span").eq(y-1).text().length]}else l.functionRangeIndex=[$(g.anchorNode).parent().index(),g.anchorOffset]}else{let g=document.selection.createRange();l.functionRangeIndex=g}o.html(f),l.functionRange(o,f,s),l.canceFunctionrangeSelected(),t!=46&&l.createRangeHightlight(),a.html(f),l.rangestart=!1,l.rangedrag_column_start=!1,l.rangedrag_row_start=!1,l.rangeHightlightselected(o,t)}else u.substr(0,1)!="="&&(a.attr("id")=="luckysheet-rich-text-editor"&&a.html().substr(0,5)=="<span"||(f=l.ltGtSignDeal(f),a.html(f)))},1)},functionHTMLGenerate:function(e){let n=this;return e.length==0||e.substr(0,1)!="="?e:(n.functionHTMLIndex=0,'<span dir="auto" class="luckysheet-formula-text-color">=</span>'+n.functionHTML(e))},functionHTML:function(e){let n=this;if(n.operatorjson==null){let d=n.operator.split("|"),f={};for(let m=0;m<d.length;m++)f[d[m].toString()]=1;n.operatorjson=f}e.substr(0,1)=="="&&(e=e.substr(1));let t=e.split(""),l=0,a="",o="",s=!0,u={bracket:0,comma:0,squote:0,dquote:0,braces:0};for(;l<t.length;){let d=t[l];if(d=="("&&u.squote==0&&u.dquote==0&&u.braces==0)u.bracket+=1,a.length>0?o+='<span dir="auto" class="luckysheet-formula-text-func">'+a+'</span><span dir="auto" class="luckysheet-formula-text-lpar">(</span>':o+='<span dir="auto" class="luckysheet-formula-text-lpar">(</span>',a="";else if(d==")"&&u.squote==0&&u.dquote==0&&u.braces==0)u.bracket-=1,o+=n.functionHTML(a)+'<span dir="auto" class="luckysheet-formula-text-rpar">)</span>',a="";else if(d=="{"&&u.squote==0&&u.dquote==0)a+="{",u.braces+=1;else if(d=="}"&&u.squote==0&&u.dquote==0)a+="}",u.braces-=1;else if(d=='"'&&u.squote==0)u.dquote>0?(a.length>0?o+=a+'"</span>':o+='"</span>',u.dquote-=1,a=""):(u.dquote+=1,a.length>0?o+=n.functionHTML(a)+'<span dir="auto" class="luckysheet-formula-text-string">"':o+='<span dir="auto" class="luckysheet-formula-text-string">"',a="");else if(d=="'"&&u.dquote==0)a+="'",u.squote=u.squote==0?1:0;else if(d==","&&u.squote==0&&u.dquote==0&&u.braces==0)o+=n.functionHTML(a)+'<span dir="auto" class="luckysheet-formula-text-comma">,</span>',a="";else if(d=="&"&&u.squote==0&&u.dquote==0&&u.braces==0)a.length>0?(o+=n.functionHTML(a)+'<span dir="auto" class="luckysheet-formula-text-calc">&</span>',a=""):o+='<span dir="auto" class="luckysheet-formula-text-calc">&</span>';else if(d in n.operatorjson&&u.squote==0&&u.dquote==0&&u.braces==0){let f="";l+1<t.length&&(f=t[l+1]);let m=l-1,g=null;if(m>=0)do g=t[m--];while(m>=0&&g==" ");d+f in n.operatorjson?(a.length>0?(o+=n.functionHTML(a)+'<span dir="auto" class="luckysheet-formula-text-calc">'+d+f+"</span>",a=""):o+='<span dir="auto" class="luckysheet-formula-text-calc">'+d+f+"</span>",l++):!/[^0-9]/.test(f)&&d=="-"&&(g=="("||g==null||g==","||g==" "||g in n.operatorjson)?a+=d:a.length>0?(o+=n.functionHTML(a)+'<span dir="auto" class="luckysheet-formula-text-calc">'+d+"</span>",a=""):o+='<span dir="auto" class="luckysheet-formula-text-calc">'+d+"</span>"}else a+=d;if(l==t.length-1){if(n.iscelldata($.trim(a)))o+='<span class="luckysheet-formula-functionrange-cell" rangeindex="'+n.functionHTMLIndex+'" dir="auto" style="color:'+Yl[n.functionHTMLIndex]+';">'+a+"</span>",n.functionHTMLIndex++;else if(u.dquote>0)o+=a+"</span>";else if(a.indexOf("</span>")==-1&&a.length>0){let f=/{.*?}/;if(f.test($.trim(a))){let m=f.exec(a)[0],g=a.search(f),y="";g>0&&(y+='<span dir="auto" class="luckysheet-formula-text-color">'+a.substr(0,g)+"</span>"),y+='<span dir="auto" style="color:#959a05" class="luckysheet-formula-text-array">'+m+"</span>",g+m.length<a.length&&(y+='<span dir="auto" class="luckysheet-formula-text-color">'+a.substr(g+m.length,a.length)+"</span>"),o+=y}else o+='<span dir="auto" class="luckysheet-formula-text-color">'+a+"</span>"}}l++}return o},getfunctionParam:function(e){let n=this;if(n.operatorjson==null){let m=n.operator.split("|"),g={};for(let y=0;y<m.length;y++)g[m[y].toString()]=1;n.operatorjson=g}e.substr(0,1)=="="&&(e=e.substr(1));let t=e.split(""),l=0,a="",o="",s={bracket:0,comma:0,squote:0,dquote:0,compare:0},u=null,d=[],f=[];for(;l<t.length;){let m=t[l];if(m=="("&&s.dquote==0)a.length>0&&f.length==0?(u=a.toUpperCase(),f.push(1),a=""):f.length==0?(f.push(0),a=""):(f.push(0),a+=m);else if(m==")"&&s.dquote==0){let g=f.pop();f.length==0?(d.push(a),a=""):a+=m}else if(m=='"')a+='"',s.dquote>0?(s.dquote-=1,a=""):s.dquote+=1;else if(m==","&&s.dquote==0)f.length<=1?(d.push(a),a=""):a+=",";else if(m in n.operatorjson&&s.dquote==0){let g="";l+1<t.length&&(g=t[l+1]);let y=l-1,v=null;if(y>=0)do v=t[y--];while(y>=0&&v==" ");!/[^0-9]/.test(g)&&m=="-"&&(v=="("||v==null||v==","||v==" "||v in n.operatorjson)?s.dquote==0?a+=$.trim(m):a+=m:(o="",a="")}else s.dquote==0?a+=$.trim(m):a+=m;l++}return{fn:u,param:d}},calPostfixExpression:function(e){if(e.length==0)return"";let n=[];for(let t=e.length-1;t>=0;t--){let l=e[t];if(l in this.operatorjson){let a=n.pop(),o=n.pop(),s="luckysheet_compareWith("+o+",'"+l+"', "+a+")";n.push(s)}else n.push(l)}return n.length>0?n[0]:""},checkBracketNum:function(e){let n=e.match(/\(/g),t=e.match(/\)/g),l=e.match(/(['"])(?:(?!\1).)*?\1/g),a=e.match(/(['"])(?:(?!\1).)*?\1/g),o=0,s=0;n!=null&&(o+=n.length),t!=null&&(s+=t.length);let u=0,d=0;if(l!=null)for(let f=0;f<l.length;f++){let m=l[f].match(/\(/g);m!=null&&(u+=m.length)}if(a!=null)for(let f=0;f<a.length;f++){let m=a[f].match(/\)/g);m!=null&&(d+=m.length)}return o-=u,s-=d,o==s},operatorPriority:{"^":0,"%":1,"*":1,"/":1,"+":2,"-":2},functionParserExe:function(e){let n=this;return this.functionParser(e)},functionParser:function(e,n){let t=this;if(t.operatorjson==null){let y=t.operator.split("|"),v={};for(let b=0;b<y.length;b++)v[y[b].toString()]=1;t.operatorjson=v}if(e==null)return"";e.substr(0,2)=="=+"?e=e.substr(2):e.substr(0,1)=="="&&(e=e.substr(1));let l=e.split(""),a=0,o="",s="",u={bracket:0,comma:0,squote:0,dquote:0,compare:0,braces:0},d=[],f=[],m=[],g=-1;for(;a<l.length;){let y=l[a];if(y=="("&&u.squote==0&&u.dquote==0&&u.braces==0)if(o.length>0&&m.length==0){if(o=o.toUpperCase(),o.indexOf(":")>-1){let v=o.split(":");s+="luckysheet_getSpecialReference(true,'"+$.trim(v[0]).replace(/'/g,"\\'")+"', luckysheet_function."+v[1]+".f(#lucky#"}else s+="luckysheet_function."+o+".f(";m.push(1),o=""}else m.length==0?(s+="(",m.push(0),o=""):(m.push(0),o+=y);else if(y==")"&&u.squote==0&&u.dquote==0&&u.braces==0){let v=m.pop();if(m.length==0){let b=t.functionParser(o,n);b.indexOf("#lucky#")>-1&&(b=b.replace(/#lucky#/g,"")+")"),s+=b+")",o=""}else o+=y}else if(y=="{"&&u.squote==0&&u.dquote==0)o+="{",u.braces+=1;else if(y=="}"&&u.squote==0&&u.dquote==0)o+="}",u.braces-=1;else if(y=='"'&&u.squote==0)u.dquote>0?a<l.length-1&&l[a+1]=='"'?(a++,o+="\x7F"):(u.dquote-=1,o+='"'):(u.dquote+=1,o+='"');else if(y=="'"&&u.dquote==0)if(o+="'",u.squote>0){if(g==a-1)return"";if(a<l.length-1&&l[a+1]=="'")a++,o+="'";else{if(l[a-1]=="'")return"";u.squote-=1}}else u.squote+=1,g=a;else if(y==","&&u.squote==0&&u.dquote==0&&u.braces==0)if(m.length<=1){let v=t.functionParser(o,n);v.indexOf("#lucky#")>-1&&(v=v.replace(/#lucky#/g,"")+")"),s+=v+",",o=""}else o+=",";else if(y in t.operatorjson&&u.squote==0&&u.dquote==0&&u.braces==0){let v="",b=t.operatorPriority;if(a+1<l.length&&(v=l[a+1]),y+v in t.operatorjson){if(m.length==0){if($.trim(o).length>0?f.unshift(t.functionParser($.trim(o),n)):$.trim(s).length>0&&f.unshift($.trim(s)),d[0]in t.operatorjson){let k=b[d[0]];for(;d.length>0&&k!=null;)f.unshift(d.shift()),k=b[d[0]]}d.unshift(y+v),s="",o=""}else o+=y+v;a++}else if(m.length==0){if($.trim(o).length>0?f.unshift(t.functionParser($.trim(o),n)):$.trim(s).length>0&&f.unshift($.trim(s)),d[0]in t.operatorjson){let k=b[d[0]];k=k==null?1e3:k;let w=b[y];for(w=w==null?1e3:w;d.length>0&&w>=k;)f.unshift(d.shift()),k=b[d[0]],k=k==null?1e3:k}d.unshift(y),s="",o=""}else o+=y}else u.dquote==0&&u.squote==0,o+=y;if(a==l.length-1){let v="",b=$.trim(o).replace(/'/g,"\\'");if(t.iscelldata(b)&&b.substr(0,1)!=":")v="luckysheet_getcelldata('"+b+"')",typeof n=="function"&&n(b);else if(b.substr(0,1)==":")b=b.substr(1),t.iscelldata(b)&&(v="luckysheet_getSpecialReference(false,"+s+",'"+b+"')");else{o=$.trim(o);let k=/{.*?}/;if(k.test(o)&&o.substr(0,1)!='"'&&o.substr(o.length-1,1)!='"'){let w=k.exec(o)[0],x=o.search(k),C="";x>0&&(v+=o.substr(0,x)),v+="luckysheet_getarraydata('"+w+"')",x+w.length<o.length&&(v+=o.substr(x+w.length,o.length))}else v=o}if(v.length>0&&f.unshift(v),d.length>0)for(s.length>0&&(f.unshift(s),s="");d.length>0;)f.unshift(d.shift());f.length>0?s=t.calPostfixExpression(f):s+=v}a++}return s},insertUpdateDynamicArray:function(e){let n=e.r,t=e.c,l=e.index;l==null&&(l=h.currentSheetIndex);let s=Et()[Z(l)].dynamicArray;s==null&&(s=[]);for(let u=0;u<s.length;u++){let d=s[u];if(d.r==n&&d.c==t&&d.index==l)return d.data=e.data,d.f=e.f,s}return s.push(e),s},addFunctionGroup:function(e,n,t,l){l==null&&(l=h.currentSheetIndex);let a=Et(),o=a[Z(l)];o.calcChain==null&&(o.calcChain=[]);let s={r:e,c:n,index:l,func:t};o.calcChain.push(s),ne.saveParam("fc",l,JSON.stringify(s),{op:"add",pos:o.calcChain.length-1}),Jn(a)},getAllFunctionGroup:function(){let e=Et(),n=[];for(let t=0;t<e.length;t++){let l=e[t],a=l.calcChain;if(a){let s=[];a.forEach((u,d)=>{typeof u=="string"?s.push(JSON.parse(u)):s.push(u)}),a=l.calcChain=s}let o=l.dynamicArray_compute;a==null&&(a=[]),o==null&&(o=[]),n=n.concat(a);for(let s=0;s<o.length;s++){let u=o[0];n.push({r:u.r,c:u.c,index:u.index})}}return n},getFunctionGroup:function(e){e==null&&(e=h.currentSheetIndex);let t=Et()[Z(e)];return t.calcChain==null?[]:t.calcChain},updateFunctionGroup:function(e,n,t){t==null&&(t=h.currentSheetIndex);let l=Et(),o=l[Z(t)].calcChain;if(o!=null)for(let s=0;s<o.length;s++){let u=o[s];if(u.r==e&&u.c==n&&u.index==t){ne.saveParam("fc",t,JSON.stringify(u),{op:"update",pos:s});break}}Jn(l)},insertUpdateFunctionGroup:function(e,n,t){t==null&&(t=h.currentSheetIndex);let l=Et(),a=l[Z(t)],o=a.calcChain;o==null&&(o=[]);for(let u=0;u<o.length;u++){let d=o[u];if(d.r==e&&d.c==n&&d.index==t){ne.saveParam("fc",t,JSON.stringify(d),{op:"update",pos:u});return}}let s={r:e,c:n,index:t};o.push(s),a.calcChain=o,ne.saveParam("fc",t,JSON.stringify(s),{op:"add",pos:a.calcChain.length-1}),Jn(l)},isFunctionRangeSave:!1,isFunctionRangeSimple:function(e,n,t,l,a){if(e==null||e.length==0)return;let o=e.split(/==|!=|<>|<=|>=|[,()=+-\/*%&^><]/g);if(o.length>0)for(let s=0;s<o.length;s++){let u=o[s];u.length<=1||u.substr(0,1)=='"'&&u.substr(u.length-1,1)=='"'||this.isFunctionRangeSaveChange(u,n,t,l,a)}},isFunctionRangeSimple1:function(e,n,t,l,a){let o=this;if(o.operatorjson==null){let v=o.operator.split("|"),b={};for(let k=0;k<v.length;k++)b[v[k].toString()]=1;o.operatorjson=b}e.substr(0,1)=="="&&(e=e.substr(1));let s=e.split(""),u=0,d="",f="",m=!0,g={bracket:0,comma:0,squote:0,dquote:0},y=Et();for(;u<s.length;){let v=s[u];if(v=="("&&g.dquote==0)g.bracket+=1,d.length>0?f+="luckysheet_function."+d.toUpperCase()+".f(":f+="(",d="";else if(v==")"&&g.dquote==0)g.bracket-=1,f+=o.isFunctionRangeSimple(d,n,t,l,a)+")",d="";else if(v==","&&g.dquote==0)f+=o.isFunctionRangeSimple(d,n,t,l,a)+",",d="";else if(v in o.operatorjson&&g.dquote==0){let b="";u+1<s.length&&(b=s[u+1]),v+b in o.operatorjson?(d.length>0?(f+=o.isFunctionRangeSimple(d,n,t,l,a)+v+b,d=""):f+=v+b,u++):d.length>0?(f+=o.isFunctionRangeSimple(d,n,t,l,a)+v,d=""):f+=v}else d+=v;u==s.length-1&&o.iscelldata($.trim(d))&&o.isFunctionRangeSaveChange(d,n,t,l,a),u++}return f},isFunctionRangeSelect:function(e,n,t,l,a){if(e==null||e=="")return;l==null&&(l=h.currentSheetIndex),a==null&&(a={});let o=this,s=e.toUpperCase(),u=s.indexOf("INDIRECT(")>-1||s.indexOf("OFFSET(")>-1||s.indexOf("INDEX(")>-1;if(e in this.formulaContainCellList){let d=this.formulaContainCellList[e];if(u)if(d.__LuckyisOff__==!0)for(let m in d)m!="__LuckyisOff__"&&this.isFunctionRangeSaveChange(m,n,t,l,a);else this.isFunctionRange(e,n,t,l,a,function(m){o.addToCellList(e,m)}),d.__LuckyisOff__=!0;else for(let f in d)f!="__LuckyisOff__"&&this.isFunctionRangeSaveChange(f,n,t,l,a);return}u?this.isFunctionRange(e,n,t,l,a):this.isFunctionRangeSimple(e,n,t,l,a)},isFunctionRange:function(e,n,t,l,a,o){let s=this;if(s.operatorjson==null){let x=s.operator.split("|"),C={};for(let S=0;S<x.length;S++)C[x[S].toString()]=1;s.operatorjson=C}e.substr(0,1)=="="&&(e=e.substr(1));let u=e.split(""),d=0,f="",m="",g=!0,y={bracket:0,comma:0,squote:0,dquote:0,compare:0,braces:0},v=[],b=[],k=[],w=-1;for(;d<u.length;){let x=u[d];if(x=="("&&y.squote==0&&y.dquote==0&&y.braces==0)if(f.length>0&&k.length==0){if(f=f.toUpperCase(),f.indexOf(":")>-1){let C=f.split(":");m+="luckysheet_getSpecialReference(true,'"+$.trim(C[0]).replace(/'/g,"\\'")+"', luckysheet_function."+C[1]+".f(#lucky#"}else m+="luckysheet_function."+f+".f(";k.push(1),f=""}else k.length==0?(m+="(",k.push(0),f=""):(k.push(0),f+=x);else if(x==")"&&y.squote==0&&y.dquote==0&&y.braces==0){let C=k.pop();if(k.length==0){let S=s.isFunctionRange(f,n,t,l,a,o);S.indexOf("#lucky#")>-1&&(S=S.replace(/#lucky#/g,"")+")"),m+=S+")",f=""}else f+=x}else if(x=="{"&&y.squote==0&&y.dquote==0)f+="{",y.braces+=1;else if(x=="}"&&y.squote==0&&y.dquote==0)f+="}",y.braces-=1;else if(x=='"'&&y.squote==0)y.dquote>0?d<u.length-1&&u[d+1]=='"'?(d++,f+="\x7F"):(y.dquote-=1,f+='"'):(y.dquote+=1,f+='"');else if(x=="'"&&y.dquote==0)f+="'",y.squote>0?d<u.length-1&&u[d+1]=="'"?(d++,f+="'"):y.squote-=1:(y.squote+=1,w=d);else if(x==","&&y.squote==0&&y.dquote==0&&y.braces==0)if(k.length<=1){let C=s.isFunctionRange(f,n,t,l,a,o);C.indexOf("#lucky#")>-1&&(C=C.replace(/#lucky#/g,"")+")"),m+=C+",",f=""}else f+=",";else if(x in s.operatorjson&&y.squote==0&&y.dquote==0&&y.braces==0){let C="",S=s.operatorPriority;if(d+1<u.length&&(C=u[d+1]),x+C in s.operatorjson){if(k.length==0){if($.trim(f).length>0?b.unshift(s.isFunctionRange($.trim(f),n,t,l,a,o)):$.trim(m).length>0&&b.unshift($.trim(m)),v[0]in s.operatorjson){let _=S[v[0]];for(;v.length>0&&_!=null;)b.unshift(v.shift()),_=S[v[0]]}v.unshift(x+C),m="",f=""}else f+=x+C;d++}else if(k.length==0){if($.trim(f).length>0?b.unshift(s.isFunctionRange($.trim(f),n,t,l,a,o)):$.trim(m).length>0&&b.unshift($.trim(m)),v[0]in s.operatorjson){let _=S[v[0]];_=_==null?1e3:_;let T=S[x];for(T=T==null?1e3:T;v.length>0&&T>=_;)b.unshift(v.shift()),_=S[v[0]],_=_==null?1e3:_}v.unshift(x),m="",f=""}else f+=x}else y.dquote==0&&y.squote==0?f+=$.trim(x):f+=x;if(d==u.length-1){let C="",S=$.trim(f).replace(/'/g,"\\'");if(s.iscelldata(S)&&S.substr(0,1)!=":")C="luckysheet_getcelldata('"+S+"')",s.isFunctionRangeSaveChange(f,n,t,l,a);else if(S.substr(0,1)==":")S=S.substr(1),s.iscelldata(S)&&(C="luckysheet_getSpecialReference(false,"+m+",'"+S+"')");else{f=$.trim(f);let _=/{.*?}/;if(_.test(f)&&f.substr(0,1)!='"'&&f.substr(f.length-1,1)!='"'){let T=_.exec(f)[0],A=f.search(_),R="";A>0&&(C+=f.substr(0,A)),C+="luckysheet_getarraydata('"+T+"')",A+T.length<f.length&&(C+=f.substr(A+T.length,f.length))}else C=f}if(C.length>0&&b.unshift(C),v.length>0)for(m.length>0&&(b.unshift(m),m="");v.length>0;)b.unshift(v.shift());b.length>0?m=s.calPostfixExpression(b):m+=C}d++}return s.checkSpecialFunctionRange(m,n,t,l,a,o),m},isFunctionRangeSaveChange:function(e,n,t,l,a){let o=this;if(n!=null&&t!=null){let s=o.getcellrange($.trim(e),l);if(s==null)return;let u=s.row,d=s.column,f=s.sheetIndex;if(n+"_"+t in a&&(l==f||l==null)){let m=!1;for(let g=u[0];g<=u[1];g++)for(let y=d[0];y<=d[1];y++)g+"_"+y in a&&a[g+"_"+y].r==n&&a[g+"_"+y].c==t&&(m=!0);m?o.isFunctionRangeSave=o.isFunctionRangeSave||!0:o.isFunctionRangeSave=o.isFunctionRangeSave||!1}else n>=u[0]&&n<=u[1]&&t>=d[0]&&t<=d[1]&&(l==f||l==null)?o.isFunctionRangeSave=o.isFunctionRangeSave||!0:o.isFunctionRangeSave=o.isFunctionRangeSave||!1}else o.isFunctionRangeSave=o.isFunctionRangeSave||!1},checkSpecialFunctionRange:function(e,n,t,l,a,o){if(e.substr(0,30)=="luckysheet_getSpecialReference"||e.substr(0,20)=="luckysheet_function."){if(e.substr(0,20)=="luckysheet_function."){let s=e.split(".")[1];if(s!=null&&(s=s.toUpperCase(),s!="INDIRECT"&&s!="OFFSET"&&s!="INDEX"))return}try{h.calculateSheetIndex=l;let s=new Function("return "+e)();s instanceof Object&&s.startCell!=null&&(s=s.startCell);let u=$.trim(s);this.iscelldata(u)&&typeof o=="function"&&o(u)}catch(s){}}},execvertex:{},execFunctionGroupData:null,execFunctionExist:null,formulaContainSheetList:{},formulaContainCellList:{},cellTextToIndexList:{},addToCellList:function(e,n){e==null||e.length==0||n==null||n.length==0||(this.formulaContainCellList==null&&(this.formulaContainCellList={}),this.formulaContainCellList[e]==null&&(this.formulaContainCellList[e]={}),this.formulaContainCellList[e][n]=1)},addToCellIndexList:function(e,n){e==null||e.length==0||n==null||(this.cellTextToIndexList==null&&(this.cellTextToIndexList={}),e.indexOf("!")>-1?(e=e.replace(/\\'/g,"'").replace(/''/g,"'"),this.cellTextToIndexList[e]=n):this.cellTextToIndexList[e+"_"+n.sheetIndex]=n)},addToSheetIndexList:function(e,n,t){e==null||e.length==0||((n==null||n.length==0)&&(n=h.currentSheetIndex),(t==null||t.length==0)&&(t=""),this.formulaContainSheetList==null&&(this.formulaContainSheetList={}),this.formulaContainSheetList[e]==null&&(this.formulaContainSheetList[e]={}),this.formulaContainSheetList[e][n]=t)},execFunctionGlobalData:{},execFunctionGroupForce:function(e){e?this.execFunctionGroup(void 0,void 0,void 0,void 0,void 0,!0):this.execFunctionGroup()},execFunctionGroup:function(e,n,t,l,a,o=!1){let s=this;if(a==null&&(a=h.flowdata),window.luckysheet_compareWith||(window.luckysheet_compareWith=Ya,window.luckysheet_getarraydata=vc,window.luckysheet_getcelldata=ar,window.luckysheet_parseData=Xa,window.luckysheet_getValue=Wn,window.luckysheet_indirect_check=bc,window.luckysheet_indirect_check_return=kc,window.luckysheet_offset_check=wc,window.luckysheet_calcADPMM=Tt,window.luckysheet_getSpecialReference=xc),s.execFunctionGlobalData==null&&(s.execFunctionGlobalData={}),l==null&&(l=h.currentSheetIndex),t!=null){let _=[[{v:null}]];Ht(0,0,_,t),s.execFunctionGlobalData[e+"_"+n+"_"+l]=_[0][0]}let u=s.getAllFunctionGroup(),d={},f=Et(),m={};for(let _=0;_<f.length;_++){let T=f[_];m[T.index]=T.data}let g={},y=[];if(s.execFunctionExist==null){let _="r"+e+"c"+n+"i"+l;g[_]=1}else for(let _=0;_<s.execFunctionExist.length;_++){let T=s.execFunctionExist[_],A="r"+T.r+"c"+T.c+"i"+T.i;g[A]=1}let v={},b=function(_,T,A,R){for(let I=0;I<_.length;I++){let F=_[I],z="r"+F.row[0]+""+F.row[1]+"c"+F.column[0]+""+F.column[1]+"index"+F.sheetIndex;if(z in v)v[z].forEach(E=>{R(E.key,E.r,E.c,E.sheetIndex)});else{let M=[];for(let E=F.row[0];E<=F.row[1];E++)for(let N=F.column[0];N<=F.column[1];N++){let L="r"+E+"c"+N+"i"+F.sheetIndex;R(L,E,N,F.sheetIndex),(T&&L in T||A&&L in A)&&M.push({key:L,r:E,c:N,sheetIndex:F.sheetIndex})}(T||A)&&(v[z]=M)}}},k={},w=0;for(let _=0;_<u.length;_++){let T=u[_],A="r"+T.r+"c"+T.c+"i"+T.index,R=zl(T.r,T.c,T.index);if(R==null)continue;let I=R.toUpperCase(),F=I.indexOf("INDIRECT(")>-1||I.indexOf("OFFSET(")>-1||I.indexOf("INDEX(")>-1,z=[];if(F)this.isFunctionRange(R,null,null,T.index,null,function(E){let N=s.getcellrange($.trim(E),T.index);N!=null&&z.push(N)});else if(!(R.substr(0,2)=='="'&&R.substr(R.length-1,1)=='"')){let E=0,N=-1,L=-1,O=[],V=[],q=R.length;for(let W=0;W<q;W++){let X=R.charAt(W);X=="'"&&L==-1&&(N==-1?(E!=W&&O.push(...R.substring(E,W).split(/==|!=|<>|<=|>=|[,()=+-\/*%&\^><]/)),N=W,E=W):W<q-1&&R.charAt(W+1)=="'"?W++:(E=W+1,O.push(R.substring(N,E)),V.push(O.length-1),N=-1)),X=='"'&&N==-1&&(L==-1?(E!=W&&O.push(...R.substring(E,W).split(/==|!=|<>|<=|>=|[,()=+-\/*%&\^><]/)),L=W,E=W):W<q-1&&R.charAt(W+1)=='"'?W++:(E=W+1,O.push(R.substring(L,E)),L=-1))}E!=q&&O.push(...R.substring(E,q).split(/==|!=|<>|<=|>=|[,()=+-\/*%&\^><]/));for(let W=V.length-1;W>=0;W--)V[W]!=O.length-1&&(O[V[W]]=O[V[W]]+O[V[W]+1],O.splice(V[W]+1,1));for(let W=0;W<O.length;W++){let X=O[W];if(X.length<=1||X.substr(0,1)=='"'&&X.substr(X.length-1,1)=='"'&&!s.iscelldata(X))continue;let te=s.getcellrange($.trim(X),T.index);te!=null&&z.push(te)}}let M={formulaArray:z,calc_funcStr:R,key:A,r:T.r,c:T.c,index:T.index,parents:{},chidren:{},color:"w"};d[A]=M}Object.keys(d).forEach(_=>{let T=d[_];b(T.formulaArray,d,g,function(A){if(A in d){let R=d[A];T.chidren[A]=1,R.parents[_]=1}!o&&A in g&&y.push(T)}),o&&y.push(T)});let x=[],C=y,S={};for(;C.length>0;){let _=C.pop();if(_==null||_.key in S)continue;if(_.color=="b"){x.push(_),S[_.key]=1;continue}let T=[];Object.keys(_.parents).forEach(A=>{let R=d[A];R!=null&&T.push(R)}),w++,T.length==0?(x.push(_),S[_.key]=1):(_.color="b",C.push(_),C=C.concat(T))}x.reverse();for(let _=0;_<x.length;_++){let T=x[_];if(T.level==Math.max)continue;window.luckysheet_getcelldata_cache=null;let A=T.calc_funcStr,R=s.execfunction(A,T.r,T.c,T.index);s.groupValuesRefreshData.push({r:T.r,c:T.c,v:R[1],f:R[2],spe:R[3],index:T.index}),s.execFunctionGlobalData[T.r+"_"+T.c+"_"+T.index]={v:R[1],f:R[2]}}s.execFunctionExist=null},execFunctionGroup1:function(e,n,t,l,a,o=!1){let s=this;a==null&&(a=h.flowdata),window.luckysheet_compareWith||(window.luckysheet_compareWith=Ya,window.luckysheet_getarraydata=vc,window.luckysheet_getcelldata=ar,window.luckysheet_parseData=Xa,window.luckysheet_getValue=Wn,window.luckysheet_indirect_check=bc,window.luckysheet_indirect_check_return=kc,window.luckysheet_offset_check=wc,window.luckysheet_calcADPMM=Tt,window.luckysheet_getSpecialReference=xc),s.execFunctionGlobalData==null&&(s.execFunctionGlobalData={});let u=Et(),d=u[Z(h.currentSheetIndex)].dynamicArray_compute==null?{}:u[Z(h.currentSheetIndex)].dynamicArray_compute;if(l==null&&(l=h.currentSheetIndex),t!=null){let b=[[{v:null}]];Ht(0,0,b,t),s.execFunctionGlobalData[e+"_"+n+"_"+l]=b[0][0]}let f=s.getAllFunctionGroup(),m={},g=[],y=0;if(s.execvertex={},s.execFunctionExist==null)for(let b=0;b<f.length;b++){let k=f[b],w=u[Z(k.index)];if(w==null)continue;let x=w.data[k.r][k.c],C=zl(k.r,k.c,k.index);x!=null&&x.f!=null&&x.f==C&&(k instanceof Object||(k=new Function("return "+k)()),k.color="w",k.parent=null,k.chidren={},k.times=0,m["r"+k.r+"c"+k.c+"i"+k.index]=k,s.isFunctionRangeSave=!1,o?s.isFunctionRangeSave=!0:e!=null&&n!=null&&s.isFunctionRangeSelect(C,e,n,l,d),s.isFunctionRangeSave&&(g.push(k),s.execvertex["r"+k.r+"c"+k.c+"i"+k.index]=k,y++))}else for(let b=0;b<s.execFunctionExist.length;b++){let k=s.execFunctionExist[b];if(!("r"+k.r+"c"+k.c+"i"+k.i in m))for(let w=0;w<f.length;w++){let x=f[w],C=zl(x.r,x.c,x.index);x.color="w",x.parent=null,x.chidren={},x.times=0,m["r"+x.r+"c"+x.c+"i"+x.index]=x,s.isFunctionRangeSave=!1,o?s.isFunctionRangeSave=!0:s.isFunctionRangeSelect(C,k.r,k.c,k.i,d),s.isFunctionRangeSave&&(g.push(x),s.execvertex["r"+x.r+"c"+x.c+"i"+x.index]=x,y++)}}for(;g.length>0;){let b=g.shift(),k={};s.getChildrenVertex(b,m,k);for(let w in m){let x=m[w];if(x==null)continue;let C="r"+b.r+"c"+b.c+"i"+b.index;if(w in k)continue;s.isFunctionRangeSave=!1;let S=zl(x.r,x.c,x.index);s.isFunctionRangeSelect(S,b.r,b.c,b.index,d),s.isFunctionRangeSave&&(w in s.execvertex||(g.push(x),s.execvertex[w]=x),y++,s.execvertex[w].chidren[C]=1)}}s.groupValuesRefreshData=[];let v=0;for(;v<y;)for(let b in s.execvertex){let k=s.execvertex[b];k.color=="w"?s.functionDFS(k):k.color=="b"&&v++}s.execFunctionExist=null},getChildrenVertex:function(e,n,t){let l="r"+e.r+"c"+e.c+"i"+e.index;if(t[l]=1,e.chidren!=null)for(let a in e.chidren)n[a]&&!(a in t)&&this.getChildrenVertex(n[a],n,t)},functionDFS:function(e){let n=this;e.color="g",e.times+=1;for(let a in e.chidren){let o=n.execvertex[a];o.color=="w"&&(o.parent="r"+e.r.toString()+"c"+e.c.toString()+"i"+e.index,n.functionDFS(o))}e.color="b",window.luckysheet_getcelldata_cache=null;let t=zl(e.r,e.c,e.index),l=n.execfunction(t,e.r,e.c,e.index);n.groupValuesRefreshData.push({r:e.r,c:e.c,v:l[1],f:l[2],spe:l[3],index:e.index}),n.execFunctionGlobalData[e.r+"_"+e.c+"_"+e.index]={v:l[1],f:l[2]}},groupValuesRefreshData:[],groupValuesRefresh:function(){let e=this,n=Et();if(e.groupValuesRefreshData.length>0){for(let t=0;t<e.groupValuesRefreshData.length;t++){let l=e.groupValuesRefreshData[t],a=n[Z(l.index)],o=a.data;if(o==null)continue;let s={};l.spe!=null&&(l.spe.type=="sparklines"?s.spl=l.spe.data:l.spe.type=="dynamicArrayItem"&&(a.dynamicArray=e.insertUpdateDynamicArray(l.spe.data))),s.v=l.v,s.f=l.f,Ht(l.r,l.c,o,s),ne.saveParam("v",l.index,l.v,{r:l.r,c:l.c})}xe.webWorkerFlowDataCache(h.flowdata),e.groupValuesRefreshData=[]}},delFunctionGroup:function(e,n,t){t==null&&(t=h.currentSheetIndex);let l=Et(),a=l[Z(t)],o=a.calcChain;if(o!=null)for(let u=0;u<o.length;u++){let d=o[u];if(d.r==e&&d.c==n&&d.index==t){o.splice(u,1),ne.saveParam("fc",t,null,{op:"del",pos:u});break}}let s=a.dynamicArray;if(s!=null)for(let u=0;u<s.length;u++){let d=s[u];if(d.r==e&&d.c==n&&(d.index==null||d.index==t)){s.splice(u,1),ne.saveParam("ac",t,null,{op:"del",pos:u});break}}Jn(l)},execfunction:function(e,n,t,l,a,o){let s=this,d=Q().formulaMore;if(e.indexOf(s.error.r)>-1)return[!1,s.error.r,e];s.checkBracketNum(e)||(e+=")"),l==null&&(l=h.currentSheetIndex),h.calculateSheetIndex=l;let f=$.trim(s.functionParserExe(e));if((f.substr(0,20)=="luckysheet_function."||f.substr(0,22)=="luckysheet_compareWith")&&(s.functionHTMLIndex=0),!s.testFunction(e,f)||f=="")return U.info("",d.execfunctionError),[!1,s.error.n,e];let m=null;window.luckysheetCurrentRow=n,window.luckysheetCurrentColumn=t,window.luckysheetCurrentIndex=l,window.luckysheetCurrentFunction=e;let g=null;try{if(f.indexOf("luckysheet_getcelldata")>-1){let v=f.split("luckysheet_getcelldata('");for(let b=1;b<v.length;b++){let k=v[b].split("')")[0],w=s.getcellrange(k);if(w.row[0]<0||w.column[0]<0)return[!0,s.error.r,e];if(w.sheetIndex==h.calculateSheetIndex&&n>=w.row[0]&&n<=w.row[1]&&t>=w.column[0]&&t<=w.column[1])return de()?alert(d.execfunctionSelfError):U.info("",d.execfunctionSelfErrorResult),[!1,0,e]}}m=new Function("return "+f)(),typeof m=="string"&&(m=m.replace(/\x7F/g,'"')),f.indexOf("SPLINES")>-1&&(g=m,m="")}catch(v){let b=v;console.log(v,f),b=s.errorInfo(b),m=[s.error.n,b]}P(m)=="object"&&m.startCell!=null&&(P(m.data)=="array"?m=s.error.v:P(m.data)=="object"&&!me(m.data.v)?m=m.data.v:me(m.data)?m=0:m.cell>1||m.rowl>1?m=m.data:m=0);let y=null;if(P(m)=="array"){let v=!1;P(m[0])!="array"&&m.length==2&&(v=H(m[0])),v?m=m[0]:P(m[0])=="array"&&m.length==1&&m[0].length==1?m=m[0][0]:(y={r:n,c:t,f:e,index:l,data:m},m="")}return window.luckysheetCurrentRow=null,window.luckysheetCurrentColumn=null,window.luckysheetCurrentIndex=null,window.luckysheetCurrentFunction=null,n!=null&&t!=null&&(a&&s.execFunctionGroup(n,t,m,l),o||s.insertUpdateFunctionGroup(n,t,l)),g?[!0,m,e,{type:"sparklines",data:g}]:y?[!0,m,e,{type:"dynamicArrayItem",data:y}]:[!0,m,e]},testFunction:function(e,n){return e.substr(0,1)=="="},execstringformula:function(e,n,t,l){let a=this;return this.execfunction(e,n,t,l)},functionResizeData:{},functionResizeStatus:!1,functionResizeTimeout:null,data_parm_index:0},p=Tv});function Do(e,n="redo"){if(e==null)return;let t=e.data;n=="undo"&&(t=e.curdata);for(let l=0;l<e.range.length;l++){let a=e.range[l].row[0],o=e.range[l].row[1],s=e.range[l].column[0],u=e.range[l].column[1];for(let d=a;d<o+1;d++)for(let f=s;f<u+1&&!(d>t.length-1);f++)t[d][f]==null||t[d][f].f==null||t[d][f].f==""?p.delFunctionGroup(d,f,e.sheetIndex):t[d][f]!=null&&t[d][f].f!=null&&t[d][f].f.length>0&&p.insertUpdateFunctionGroup(d,f,e.sheetIndex)}}var Sv,Tn,Mo=Ie(()=>{fl();Qt();on();gr();Ur();qr();yr();Ua();Ja();kn();Ut();Ba();Vr();Yt();Nt();Xe();Zt();Ll();Sv={redo:function(e){if(h.jfredo.length==0)return;let n=h.jfredo.pop();if(h.jfundo.push(n),h.clearjfundo=!1,ve.hasSheet(n.sheetIndex)&&h.currentSheetIndex!=n.sheetIndex&&ve.changeSheetExec(n.sheetIndex),n.type=="datachange"){Do(n);let l={cfg:n.config,RowlChange:n.RowlChange,cdformat:n.cdformat,dataVerification:n.dataVerification,dynamicArray:n.dynamicArray,hyperlink:n.hyperlink};Ze(n.data,n.dataRange,l)}else if(n.type=="pasteCut"){let l={sheetIndex:n.source.sheetIndex,data:n.source.curData,curData:n.source.data,config:n.source.curConfig,curConfig:n.source.config,cdformat:n.source.curCdformat,curCdformat:n.source.cdformat,dataVerification:n.source.curDataVerification,curDataVerification:n.source.dataVerification,range:n.source.range},a={sheetIndex:n.target.sheetIndex,data:n.target.curData,curData:n.target.data,config:n.target.curConfig,curConfig:n.target.config,cdformat:n.target.curCdformat,curCdformat:n.target.cdformat,dataVerification:n.target.curDataVerification,curDataVerification:n.target.dataVerification,range:n.target.range};Ga(l,a,n.RowlChange)}else if(n.type=="rangechange")Do(n),Ea(n.data,n.range,n.cdformat);else if(n.type=="resize"){h.config=n.config,h.luckysheetfile[Z(n.sheetIndex)].config=h.config,n.ctrlType=="resizeR"?ne.saveParam("cg",n.sheetIndex,n.config.rowlen,{k:"rowlen"}):n.ctrlType=="resizeC"&&ne.saveParam("cg",n.sheetIndex,n.config.columnlen,{k:"columnlen"});let l=$.extend(!0,{},n.images);h.luckysheetfile[Z(n.sheetIndex)].images=l,ne.saveParam("all",n.sheetIndex,l,{k:"images"}),Re.images=l,Re.allImagesShow(),St(h.flowdata.length,h.flowdata[0].length)}else if(n.type=="cellRowChange")Zl(n.data[0].length,n.data.length,n.data,n.config,n.range,n.ctrlType,n.ctrlValue,n.cdformat);else if(n.type=="extend")Zl(n.data[0].length,n.data.length,n.data,n.config,n.range,"dele",n.ctrlValue);else if(n.type=="dele"){let l=$.extend(!0,{},n.ctrlValue);l.restore=!0,Zl(n.data[0].length,n.data.length,n.data,n.config,n.range,"extend",l)}else if(n.type=="addRC"){let l=$.extend(!0,{},n.ctrlValue);l.direction=="rightbottom"&&(l.index=l.index+1),jn(n.data,n.config,"delRC",l,n.calc,n.filterObj,n.cf,n.af,n.freezen,n.dataVerification,n.hyperlink)}else if(n.type=="delRC"){let l=$.extend(!0,{},n.ctrlValue);l.restore=!0,l.direction="lefttop",jn(n.data,n.config,"addRC",l,n.calc,n.filterObj,n.cf,n.af,n.freezen,n.dataVerification,n.hyperlink)}else if(n.type=="deleteCell")Ai(n.data,n.config,n.ctrl,n.calc,n.filterObj,n.cf,n.dataVerification,n.hyperlink);else if(n.type=="showHidRows")h.config=n.config,h.luckysheetfile[Z(n.sheetIndex)].config=n.config,ne.saveParam("cg",n.sheetIndex,n.config.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length);else if(n.type=="showHidCols")h.config=n.config,h.luckysheetfile[Z(n.sheetIndex)].config=n.config,ne.saveParam("cg",n.sheetIndex,n.config.colhidden,{k:"colhidden"}),St(h.flowdata.length,h.flowdata[0].length);else if(n.type=="datachangeAll")p.execFunctionGroup(),Zl(n.data[0].length,n.data.length,n.data,null,n.range,"datachangeAll",n.ctrlValue);else if(n.type=="datachangeAll_filter_clear")Dl(n.filter_save),$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").each(function(l){let a=$(this),o=n.optiongroups[l];Vn(a,o.optionstate,o.rowhidden,o.caljs,!1,o.st_r,o.ed_r,o.cindex,o.st_c,o.ed_c)}),ne.saveParam("fsr",h.currentSheetIndex,{filter:n.optiongroups,filter_select:n.filter_save}),h.config=n.config,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,h.config.rowhidden==null&&(h.config.rowhidden={}),ne.saveParam("cg",h.currentSheetIndex,h.config.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide();else if(n.type=="datachangeAll_filter"){let l=$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").eq(n.optionsindex),a=l.data("str"),o=l.data("edr"),s=l.data("cindex"),u=l.data("stc"),d=l.data("edc");Vn(l,Hn.hasKey(n.rowhidenPre),n.rowhidenPre,n.caljs,!0,a,o,s,u,d),h.config=n.config,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,h.config.rowhidden==null&&(h.config.rowhidden={}),ne.saveParam("cg",h.currentSheetIndex,h.config.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide()}else if(n.type=="filtershow")$("#luckysheet-filter-selected-sheet"+n.sheetIndex+", #luckysheet-filter-options-sheet"+n.sheetIndex).remove(),ne.allowUpdate&&ne.saveParam("all",n.sheetIndex,null,{k:"filter_select"});else if(n.type=="pivotTable_change")h.luckysheetfile[Z(n.sheetIndex)].pivotTable=n.pivotTable,Oe.getCellData(n.sheetIndex),Oe.initialPivotManage(!0),Oe.refreshPivotTable();else if(n.type=="addSheet")ve.deleteSheet(n.index),ve.changeSheetExec(n.currentSheetIndex),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide();else if(n.type=="copySheet")ve.deleteSheet(n.index),ve.changeSheetExec(n.copyindex);else if(n.type=="deleteSheet"){let l=!1;for(let a=0;a<h.luckysheetfile.length;a++)h.luckysheetfile[a].name==n.name&&(l=!0);l||(ve.createSheetbydata(n,"isrenew"),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide())}else if(n.type=="sheetName")h.luckysheetfile[Z(n.sheetIndex)].name=n.oldtxt,$("#luckysheet-sheets-item"+n.sheetIndex).find(".luckysheet-sheets-item-name").html(n.oldtxt),ne.saveParam("all",n.sheetIndex,n.oldtxt,{k:"name"});else if(n.type=="sheetColor"){h.luckysheetfile[Z(n.sheetIndex)].color=n.oldcolor;let l=$("#luckysheet-sheets-item"+n.sheetIndex);l.find(".luckysheet-sheets-item-color").remove(),n.oldcolor!=null&&l.append('<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+n.oldcolor+';"></div>'),ne.saveParam("all",n.sheetIndex,n.oldcolor,{k:"color"})}else if(n.type=="mergeChange"){let l={cfg:n.config};Ze(n.data,n.range,l)}else if(n.type=="updateDataVerification")Ye.ref(n.currentDataVerification,n.historyDataVerification,n.sheetIndex);else if(n.type=="updateDataVerificationOfCheckbox")Ye.refOfCheckbox(n.currentDataVerification,n.historyDataVerification,n.sheetIndex,n.data,n.range);else if(n.type=="updateHyperlink")Cl.ref(n.currentHyperlink,n.historyHyperlink,n.sheetIndex,n.data,n.range);else if(n.type=="updateCF"){let l=n.data.historyRules;for(let a=0;a<l.length;a++){let o=l[a].sheetIndex;h.luckysheetfile[Z(o)].luckysheet_conditionformat_save=l[a].luckysheet_conditionformat_save,ne.allowUpdate&&ne.saveParam("all",o,l[a].luckysheet_conditionformat_save,{k:"luckysheet_conditionformat_save"})}$e.ref()}else if(n.type=="updateAF"){let l=n.data.historyRules,a=Z(n.sheetIndex);h.luckysheetfile[a].luckysheet_alternateformat_save=$.extend(!0,[],l),setTimeout(function(){Be()},1)}else if(n.type=="borderChange")n.config.borderInfo==null?ne.saveParam("cg",n.sheetIndex,[],{k:"borderInfo"}):ne.saveParam("cg",n.sheetIndex,n.config.borderInfo,{k:"borderInfo"}),h.config=n.config,h.luckysheetfile[Z(n.sheetIndex)].config=h.config,setTimeout(function(){Be()},1);else if(n.type=="postil"){He.ref(n.data,n.rc);for(let l=0;l<n.rc.length;l++){let a=n.rc[l].split("_")[0],o=n.rc[l].split("_")[1];n.data[a][o]!=null&&n.data[a][o].ps!=null?He.buildPs(a,o,n.data[a][o].ps):He.buildPs(a,o,null)}}else n.type=="imageCtrl"?(Re.images=$.extend(!0,{},n.images),Re.allImagesShow(),Re.ref()):n.type=="zoomChange"&&(h.zoomRatio=n.zoomRatio,ne.saveParam("all",n.currentSheetIndex,n.zoomRatio,{k:"zoomRatio"}),ir(),Za());rl(e),n.range&&(h.luckysheet_select_save=n.range,lt()),h.clearjfundo=!0;let t=au(Ue({},n),{data:n.curdata,curdata:n.data});Je.createHookFunction("updated",t)},undo:function(){if(h.jfundo.length==0)return;let e=h.jfundo.pop();if(h.jfredo.push(e),h.clearjfundo=!1,ve.hasSheet(e.sheetIndex)&&h.currentSheetIndex!=e.sheetIndex&&ve.changeSheetExec(e.sheetIndex),e.type=="datachange"){p.execFunctionGroup();let n={cfg:e.curConfig,RowlChange:e.RowlChange,cdformat:e.curCdformat,dataVerification:e.curDataVerification,dynamicArray:e.curDynamicArray,hyperlink:e.curHyperlink};Do(e,"undo"),Ze(e.curdata,e.range,n)}else if(e.type=="pasteCut")Ga(e.source,e.target,e.RowlChange);else if(e.type=="rangechange")Do(e,"undo"),Ea(e.curdata,e.range,e.curCdformat);else if(e.type=="resize"){h.config=e.curconfig,h.luckysheetfile[Z(e.sheetIndex)].config=h.config,e.ctrlType=="resizeR"?ne.saveParam("cg",e.sheetIndex,e.curconfig.rowlen,{k:"rowlen"}):e.ctrlType=="resizeC"&&ne.saveParam("cg",e.sheetIndex,e.curconfig.columnlen,{k:"columnlen"});let n=$.extend(!0,{},e.curImages);h.luckysheetfile[Z(e.sheetIndex)].images=n,ne.saveParam("all",e.sheetIndex,n,{k:"images"}),Re.images=n,Re.allImagesShow(),St(h.flowdata.length,h.flowdata[0].length)}else if(e.type=="cellRowChange")Zl(e.curdata[0].length,e.curdata.length,e.curdata,e.curconfig,e.currange,e.ctrlType,e.ctrlValue,e.curCdformat);else if(e.type=="extend")Zl(e.curdata[0].length,e.curdata.length,e.curdata,e.curconfig,e.currange,e.ctrlType,e.ctrlValue);else if(e.type=="dele"){let n=$.extend(!0,{},e.ctrlValue);n.restore=!0,Zl(e.curdata[0].length,e.curdata.length,e.curdata,e.curconfig,e.currange,e.ctrlType,e.ctrlValue)}else if(e.type=="addRC")jn(e.curData,e.curConfig,"addRC",e.ctrlValue,e.curCalc,e.curFilterObj,e.curCf,e.curAf,e.curFreezen,e.curDataVerification,e.curHyperlink);else if(e.type=="delRC")jn(e.curData,e.curConfig,"delRC",e.ctrlValue,e.curCalc,e.curFilterObj,e.curCf,e.curAf,e.curFreezen,e.curDataVerification,e.curHyperlink);else if(e.type=="deleteCell")Ai(e.curData,e.curConfig,e.ctrl,e.curCalc,e.curFilterObj,e.curCf,e.curDataVerification,e.curHyperlink);else if(e.type=="showHidRows")h.config=e.curconfig,h.luckysheetfile[Z(e.sheetIndex)].config=e.curconfig,ne.saveParam("cg",e.sheetIndex,e.curconfig.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length);else if(e.type=="showHidCols")h.config=e.curconfig,h.luckysheetfile[Z(e.sheetIndex)].config=e.curconfig,ne.saveParam("cg",e.sheetIndex,e.curconfig.colhidden,{k:"colhidden"}),St(h.flowdata.length,h.flowdata[0].length);else if(e.type=="datachangeAll")p.execFunctionGroup(),Zl(e.curdata[0].length,e.curdata.length,e.curdata,null,e.currange,"datachangeAll",e.ctrlValue);else if(e.type=="datachangeAll_filter_clear")ne.saveParam("fsc",h.currentSheetIndex,null),h.config=e.curconfig,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,{},{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length),$("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide().find("input").val(),$("#luckysheet-filter-selected span").data("type","0").data("type",null).text("\u65E0"),$("#luckysheet-filter-selected-sheet"+h.currentSheetIndex+", #luckysheet-filter-options-sheet"+h.currentSheetIndex).remove(),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide();else if(e.type=="datachangeAll_filter"){let n=$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").eq(e.optionsindex),t=n.data("str"),l=n.data("edr"),a=n.data("cindex"),o=n.data("stc"),s=n.data("edc");Vn(n,Hn.hasKey(e.rowhidden),e.rowhidden,e.caljs,!0,t,l,a,o,s),h.config=e.curconfig,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,h.config.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide()}else if(e.type=="filtershow")h.luckysheet_select_save=[e.filter_save],h.filterchage=!1,Ri(),h.filterchage=!0,ne.saveParam("all",e.sheetIndex,e.filter_save,{k:"filter_select"});else if(e.type=="pivotTable_change")h.luckysheetfile[Z(e.sheetIndex)].pivotTable=e.pivotTablecur,Oe.getCellData(e.sheetIndex),Oe.initialPivotManage(!0),Oe.refreshPivotTable();else if(e.type=="addSheet")ve.createSheetbydata(e.sheetconfig),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide();else if(e.type=="copySheet")ve.copySheet(e.copyindex);else if(e.type=="deleteSheet")ve.deleteSheet(e.index),e.order==0?ve.changeSheetExec(h.luckysheetfile[0].index):ve.changeSheetExec(h.luckysheetfile[e.order-1].index),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide();else if(e.type=="sheetName")h.luckysheetfile[Z(e.sheetIndex)].name=e.txt,$("#luckysheet-sheets-item"+e.sheetIndex).find(".luckysheet-sheets-item-name").html(e.txt),ne.saveParam("all",e.sheetIndex,e.txt,{k:"name"});else if(e.type=="sheetColor"){h.luckysheetfile[Z(e.sheetIndex)].color=e.color;let n=$("#luckysheet-sheets-item"+e.sheetIndex);n.find(".luckysheet-sheets-item-color").remove(),e.color!=null&&n.append('<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+e.color+';"></div>'),ne.saveParam("all",e.sheetIndex,e.color,{k:"color"})}else if(e.type=="mergeChange"){let n={cfg:e.curConfig};Ze(e.curData,e.range,n)}else if(e.type=="updateDataVerification")Ye.ref(e.historyDataVerification,e.currentDataVerification,e.sheetIndex);else if(e.type=="updateDataVerificationOfCheckbox")Ye.refOfCheckbox(e.historyDataVerification,e.currentDataVerification,e.sheetIndex,e.curData,e.range);else if(e.type=="updateHyperlink")Cl.ref(e.historyHyperlink,e.currentHyperlink,e.sheetIndex,e.curData,e.range);else if(e.type=="updateCF"){let n=e.data.currentRules;for(let t=0;t<n.length;t++){let l=n[t].sheetIndex;h.luckysheetfile[Z(l)].luckysheet_conditionformat_save=n[t].luckysheet_conditionformat_save,ne.allowUpdate&&ne.saveParam("all",l,n[t].luckysheet_conditionformat_save,{k:"luckysheet_conditionformat_save"})}$e.ref()}else if(e.type=="updateAF"){let n=e.data.currentRules,t=Z(e.sheetIndex);h.luckysheetfile[t].luckysheet_alternateformat_save=$.extend(!0,[],n),setTimeout(function(){Be()},1)}else if(e.type=="borderChange")ne.saveParam("cg",e.sheetIndex,e.curconfig.borderInfo,{k:"borderInfo"}),h.config=e.curconfig,h.luckysheetfile[Z(e.sheetIndex)].config=h.config,setTimeout(function(){Be()},1);else if(e.type=="postil"){He.ref(e.curdata,e.rc);for(let n=0;n<e.rc.length;n++){let t=e.rc[n].split("_")[0],l=e.rc[n].split("_")[1];e.curdata[t][l]!=null&&e.curdata[t][l].ps!=null?He.buildPs(t,l,e.curdata[t][l].ps):He.buildPs(t,l,null)}}else e.type=="imageCtrl"?(Re.images=$.extend(!0,{},e.curImages),Re.allImagesShow(),Re.ref()):e.type=="zoomChange"&&(h.zoomRatio=e.curZoomRatio,ne.saveParam("all",e.currentSheetIndex,e.curZoomRatio,{k:"zoomRatio"}),ir(),Za());e.range&&(h.luckysheet_select_save=e.range,lt()),h.clearjfundo=!0}},Tn=Sv});var Fo,Yn,Sc=Ie(()=>{Fo=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Yn={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return typeof console!="undefined"&&console.warn(e)},getWeek:function(e){var n=new Date(e.getTime());n.setHours(0,0,0,0),n.setDate(n.getDate()+3-(n.getDay()+6)%7);var t=new Date(n.getFullYear(),0,4);return 1+Math.round(((n.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1}});var Eo,No,$c=Ie(()=>{Eo={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var n=e%100;if(n>3&&n<21)return"th";switch(n%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},No=Eo});function Ic(e,n){var t;return function(){var l=this,a=arguments;clearTimeout(t),t=setTimeout(function(){return e.apply(l,a)},n)}}var ql,sr,Po,Rc=Ie(()=>{ql=function(e,n){return n===void 0&&(n=2),("000"+e).slice(n*-1)},sr=function(e){return e===!0?1:0};Po=function(e){return e instanceof Array?e:[e]}});function jl(e,n,t){if(t===!0)return e.classList.add(n);e.classList.remove(n)}function Xt(e,n,t){var l=window.document.createElement(e);return n=n||"",t=t||"",l.className=n,t!==void 0&&(l.textContent=t),l}function Bi(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function Ac(e,n){if(n(e))return e;if(e.parentNode)return Ac(e.parentNode,n)}function Hi(e,n){var t=Xt("div","numInputWrapper"),l=Xt("input","numInput "+e),a=Xt("span","arrowUp"),o=Xt("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?l.type="number":(l.type="text",l.pattern="\\d*"),n!==void 0)for(var s in n)l.setAttribute(s,n[s]);return t.appendChild(l),t.appendChild(a),t.appendChild(o),t}function cr(e){try{if(typeof e.composedPath=="function"){var n=e.composedPath();return n[0]}return e.target}catch(t){return e.target}}var zf=Ie(()=>{});var Dc,Vi,Of,Sn,Qa,Mc=Ie(()=>{Rc();Dc=function(){},Vi=function(e,n,t){return t.months[n?"shorthand":"longhand"][e]},Of={D:Dc,F:function(e,n,t){e.setMonth(t.months.longhand.indexOf(n))},G:function(e,n){e.setHours((e.getHours()>=12?12:0)+parseFloat(n))},H:function(e,n){e.setHours(parseFloat(n))},J:function(e,n){e.setDate(parseFloat(n))},K:function(e,n,t){e.setHours(e.getHours()%12+12*sr(new RegExp(t.amPM[1],"i").test(n)))},M:function(e,n,t){e.setMonth(t.months.shorthand.indexOf(n))},S:function(e,n){e.setSeconds(parseFloat(n))},U:function(e,n){return new Date(parseFloat(n)*1e3)},W:function(e,n,t){var l=parseInt(n),a=new Date(e.getFullYear(),0,2+(l-1)*7,0,0,0,0);return a.setDate(a.getDate()-a.getDay()+t.firstDayOfWeek),a},Y:function(e,n){e.setFullYear(parseFloat(n))},Z:function(e,n){return new Date(n)},d:function(e,n){e.setDate(parseFloat(n))},h:function(e,n){e.setHours((e.getHours()>=12?12:0)+parseFloat(n))},i:function(e,n){e.setMinutes(parseFloat(n))},j:function(e,n){e.setDate(parseFloat(n))},l:Dc,m:function(e,n){e.setMonth(parseFloat(n)-1)},n:function(e,n){e.setMonth(parseFloat(n)-1)},s:function(e,n){e.setSeconds(parseFloat(n))},u:function(e,n){return new Date(parseFloat(n))},w:Dc,y:function(e,n){e.setFullYear(2e3+parseFloat(n))}},Sn={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Qa={Z:function(e){return e.toISOString()},D:function(e,n,t){return n.weekdays.shorthand[Qa.w(e,n,t)]},F:function(e,n,t){return Vi(Qa.n(e,n,t)-1,!1,n)},G:function(e,n,t){return ql(Qa.h(e,n,t))},H:function(e){return ql(e.getHours())},J:function(e,n){return n.ordinal!==void 0?e.getDate()+n.ordinal(e.getDate()):e.getDate()},K:function(e,n){return n.amPM[sr(e.getHours()>11)]},M:function(e,n){return Vi(e.getMonth(),!0,n)},S:function(e){return ql(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,n,t){return t.getWeek(e)},Y:function(e){return ql(e.getFullYear(),4)},d:function(e){return ql(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return ql(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,n){return n.weekdays.longhand[e.getDay()]},m:function(e){return ql(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}}});function ur(e,n,t){return t===void 0&&(t=!0),t!==!1?new Date(e.getTime()).setHours(0,0,0,0)-new Date(n.getTime()).setHours(0,0,0,0):e.getTime()-n.getTime()}function Oo(e){var n=e.defaultHour,t=e.defaultMinute,l=e.defaultSeconds;if(e.minDate!==void 0){var a=e.minDate.getHours(),o=e.minDate.getMinutes(),s=e.minDate.getSeconds();n<a&&(n=a),n===a&&t<o&&(t=o),n===a&&t===o&&l<s&&(l=e.minDate.getSeconds())}if(e.maxDate!==void 0){var u=e.maxDate.getHours(),d=e.maxDate.getMinutes();n=Math.min(n,u),n===u&&(t=Math.min(d,t)),n===u&&t===d&&(l=e.maxDate.getSeconds())}return{hours:n,minutes:t,seconds:l}}var Fc,Lo,Bf,zo,Hf,Vf,qf=Ie(()=>{Mc();Sc();$c();Fc=function(e){var n=e.config,t=n===void 0?Yn:n,l=e.l10n,a=l===void 0?Eo:l,o=e.isMobile,s=o===void 0?!1:o;return function(u,d,f){var m=f||a;return t.formatDate!==void 0&&!s?t.formatDate(u,d,m):d.split("").map(function(g,y,v){return Qa[g]&&v[y-1]!=="\\"?Qa[g](u,m,t):g!=="\\"?g:""}).join("")}},Lo=function(e){var n=e.config,t=n===void 0?Yn:n,l=e.l10n,a=l===void 0?Eo:l;return function(o,s,u,d){if(!(o!==0&&!o)){var f=d||a,m,g=o;if(o instanceof Date)m=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)m=new Date(o);else if(typeof o=="string"){var y=s||(t||Yn).dateFormat,v=String(o).trim();if(v==="today")m=new Date,u=!0;else if(t&&t.parseDate)m=t.parseDate(o,y);else if(/Z$/.test(v)||/GMT$/.test(v))m=new Date(o);else{for(var b=void 0,k=[],w=0,x=0,C="";w<y.length;w++){var S=y[w],_=S==="\\",T=y[w-1]==="\\"||_;if(Sn[S]&&!T){C+=Sn[S];var A=new RegExp(C).exec(o);A&&(b=!0)&&k[S!=="Y"?"push":"unshift"]({fn:Of[S],val:A[++x]})}else _||(C+=".")}m=!t||!t.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),k.forEach(function(R){var I=R.fn,F=R.val;return m=I(m,F,f)||m}),m=b?m:void 0}}if(!(m instanceof Date&&!isNaN(m.getTime()))){t.errorHandler(new Error("Invalid date provided: "+g));return}return u===!0&&m.setHours(0,0,0,0),m}}};Bf=function(e,n,t){return e>Math.min(n,t)&&e<Math.max(n,t)},zo=function(e,n,t){return e*3600+n*60+t},Hf=function(e){var n=Math.floor(e/3600),t=(e-n*3600)/60;return[n,t,e-n*3600-t*60]},Vf={DAY:864e5}});var jf=Ie(()=>{"use strict";typeof Object.assign!="function"&&(Object.assign=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var l=function(u){u&&Object.keys(u).forEach(function(d){return e[d]=u[d]})},a=0,o=n;a<o.length;a++){var s=o[a];l(s)}return e})});function Iv(e,n){var t={config:Ul(Ul({},Yn),Tl.defaultConfig),l10n:No};t.parseDate=Lo({config:t.config,l10n:t.l10n}),t._handlers=[],t.pluginElements=[],t.loadedPlugins=[],t._bind=k,t._setHoursFromDate=y,t._positionCalendar=Ne,t.changeMonth=le,t.changeYear=K,t.clear=oe,t.close=se,t.onMouseOver=Te,t._createElement=Xt,t.createDay=A,t.destroy=ce,t.isEnabled=G,t.jumpToDate=C,t.updateValue=Gl,t.open=Ee,t.redraw=It,t.set=Se,t.setDate=Fe,t.toggle=Dt;function l(){t.utils={getDaysInMonth:function(J,re){return J===void 0&&(J=t.currentMonth),re===void 0&&(re=t.currentYear),J===1&&(re%4==0&&re%100!=0||re%400==0)?29:t.l10n.daysInMonth[J]}}}function a(){t.element=t.input=e,t.isOpen=!1,Ce(),Ge(),ht(),be(),l(),t.isMobile||T(),x(),(t.selectedDates.length||t.config.noCalendar)&&(t.config.enableTime&&y(t.config.noCalendar?t.latestSelectedDateObj:void 0),Gl(!1)),u();var J=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!t.isMobile&&J&&Ne(),gt("onReady")}function o(){var J;return((J=t.calendarContainer)===null||J===void 0?void 0:J.getRootNode()).activeElement||document.activeElement}function s(J){return J.bind(t)}function u(){var J=t.config;J.weekNumbers===!1&&J.showMonths===1||J.noCalendar!==!0&&window.requestAnimationFrame(function(){if(t.calendarContainer!==void 0&&(t.calendarContainer.style.visibility="hidden",t.calendarContainer.style.display="block"),t.daysContainer!==void 0){var re=(t.days.offsetWidth+1)*J.showMonths;t.daysContainer.style.width=re+"px",t.calendarContainer.style.width=re+(t.weekWrapper!==void 0?t.weekWrapper.offsetWidth:0)+"px",t.calendarContainer.style.removeProperty("visibility"),t.calendarContainer.style.removeProperty("display")}})}function d(J){if(t.selectedDates.length===0){var re=t.config.minDate===void 0||ur(new Date,t.config.minDate)>=0?new Date:new Date(t.config.minDate.getTime()),ge=Oo(t.config);re.setHours(ge.hours,ge.minutes,ge.seconds,re.getMilliseconds()),t.selectedDates=[re],t.latestSelectedDateObj=re}J!==void 0&&J.type!=="blur"&&Kn(J);var we=t._input.value;g(),Gl(),t._input.value!==we&&t._debouncedChange()}function f(J,re){return J%12+12*sr(re===t.l10n.amPM[1])}function m(J){switch(J%24){case 0:case 12:return 12;default:return J%12}}function g(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var J=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,re=(parseInt(t.minuteElement.value,10)||0)%60,ge=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(J=f(J,t.amPM.textContent));var we=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&ur(t.latestSelectedDateObj,t.config.minDate,!0)===0,Ve=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&ur(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Qe=zo(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Rt=zo(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),ut=zo(J,re,ge);if(ut>Rt&&ut<Qe){var Bt=Hf(Qe);J=Bt[0],re=Bt[1],ge=Bt[2]}}else{if(Ve){var ct=t.config.maxTime!==void 0?t.config.maxTime:t.config.maxDate;J=Math.min(J,ct.getHours()),J===ct.getHours()&&(re=Math.min(re,ct.getMinutes())),re===ct.getMinutes()&&(ge=Math.min(ge,ct.getSeconds()))}if(we){var yt=t.config.minTime!==void 0?t.config.minTime:t.config.minDate;J=Math.max(J,yt.getHours()),J===yt.getHours()&&re<yt.getMinutes()&&(re=yt.getMinutes()),re===yt.getMinutes()&&(ge=Math.max(ge,yt.getSeconds()))}}v(J,re,ge)}}function y(J){var re=J||t.latestSelectedDateObj;re&&re instanceof Date&&v(re.getHours(),re.getMinutes(),re.getSeconds())}function v(J,re,ge){t.latestSelectedDateObj!==void 0&&t.latestSelectedDateObj.setHours(J%24,re,ge||0,0),!(!t.hourElement||!t.minuteElement||t.isMobile)&&(t.hourElement.value=ql(t.config.time_24hr?J:(12+J)%12+12*sr(J%12==0)),t.minuteElement.value=ql(re),t.amPM!==void 0&&(t.amPM.textContent=t.l10n.amPM[sr(J>=12)]),t.secondElement!==void 0&&(t.secondElement.value=ql(ge)))}function b(J){var re=cr(J),ge=parseInt(re.value)+(J.delta||0);(ge/1e3>1||J.key==="Enter"&&!/[^\d]/.test(ge.toString()))&&K(ge)}function k(J,re,ge,we){if(re instanceof Array)return re.forEach(function(Ve){return k(J,Ve,ge,we)});if(J instanceof Array)return J.forEach(function(Ve){return k(Ve,re,ge,we)});J.addEventListener(re,ge,we),t._handlers.push({remove:function(){return J.removeEventListener(re,ge,we)}})}function w(){gt("onChange")}function x(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(ge){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+ge+"]"),function(we){return k(we,"click",t[ge])})}),t.isMobile){Pe();return}var J=Ic(ie,50);if(t._debouncedChange=Ic(w,$v),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&k(t.daysContainer,"mouseover",function(ge){t.config.mode==="range"&&Te(cr(ge))}),k(t._input,"keydown",ae),t.calendarContainer!==void 0&&k(t.calendarContainer,"keydown",ae),!t.config.inline&&!t.config.static&&k(window,"resize",J),window.ontouchstart!==void 0?k(window.document,"touchstart",ue):k(window.document,"mousedown",ue),k(window.document,"focus",ue,{capture:!0}),t.config.clickOpens===!0&&(k(t._input,"focus",t.open),k(t._input,"click",t.open)),t.daysContainer!==void 0&&(k(t.monthNav,"click",Wl),k(t.monthNav,["keyup","increment"],b),k(t.daysContainer,"click",kt)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var re=function(ge){return cr(ge).select()};k(t.timeContainer,["increment"],d),k(t.timeContainer,"blur",d,{capture:!0}),k(t.timeContainer,"click",S),k([t.hourElement,t.minuteElement],["focus","click"],re),t.secondElement!==void 0&&k(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&k(t.amPM,"click",function(ge){d(ge)})}t.config.allowInput&&k(t._input,"blur",pe)}function C(J,re){var ge=J!==void 0?t.parseDate(J):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate<t.now?t.config.maxDate:t.now),we=t.currentYear,Ve=t.currentMonth;try{ge!==void 0&&(t.currentYear=ge.getFullYear(),t.currentMonth=ge.getMonth())}catch(Qe){Qe.message="Invalid date supplied: "+ge,t.config.errorHandler(Qe)}re&&t.currentYear!==we&&(gt("onYearChange"),N()),re&&(t.currentYear!==we||t.currentMonth!==Ve)&>("onMonthChange"),t.redraw()}function S(J){var re=cr(J);~re.className.indexOf("arrow")&&_(J,re.classList.contains("arrowUp")?1:-1)}function _(J,re,ge){var we=J&&cr(J),Ve=ge||we&&we.parentNode&&we.parentNode.firstChild,Qe=ol("increment");Qe.delta=re,Ve&&Ve.dispatchEvent(Qe)}function T(){var J=window.document.createDocumentFragment();if(t.calendarContainer=Xt("div","flatpickr-calendar"),t.calendarContainer.tabIndex=-1,!t.config.noCalendar){if(J.appendChild(V()),t.innerContainer=Xt("div","flatpickr-innerContainer"),t.config.weekNumbers){var re=te(),ge=re.weekWrapper,we=re.weekNumbers;t.innerContainer.appendChild(ge),t.weekNumbers=we,t.weekWrapper=ge}t.rContainer=Xt("div","flatpickr-rContainer"),t.rContainer.appendChild(W()),t.daysContainer||(t.daysContainer=Xt("div","flatpickr-days"),t.daysContainer.tabIndex=-1),E(),t.rContainer.appendChild(t.daysContainer),t.innerContainer.appendChild(t.rContainer),J.appendChild(t.innerContainer)}t.config.enableTime&&J.appendChild(q()),jl(t.calendarContainer,"rangeMode",t.config.mode==="range"),jl(t.calendarContainer,"animate",t.config.animate===!0),jl(t.calendarContainer,"multiMonth",t.config.showMonths>1),t.calendarContainer.appendChild(J);var Ve=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Ve&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Qe=Xt("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Qe,t.element),Qe.appendChild(t.element),t.altInput&&Qe.appendChild(t.altInput),Qe.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function A(J,re,ge,we){var Ve=G(re,!0),Qe=Xt("span",J,re.getDate().toString());return Qe.dateObj=re,Qe.$i=we,Qe.setAttribute("aria-label",t.formatDate(re,t.config.ariaDateFormat)),J.indexOf("hidden")===-1&&ur(re,t.now)===0&&(t.todayDateElem=Qe,Qe.classList.add("today"),Qe.setAttribute("aria-current","date")),Ve?(Qe.tabIndex=-1,sl(re)&&(Qe.classList.add("selected"),t.selectedDateElem=Qe,t.config.mode==="range"&&(jl(Qe,"startRange",t.selectedDates[0]&&ur(re,t.selectedDates[0],!0)===0),jl(Qe,"endRange",t.selectedDates[1]&&ur(re,t.selectedDates[1],!0)===0),J==="nextMonthDay"&&Qe.classList.add("inRange")))):Qe.classList.add("flatpickr-disabled"),t.config.mode==="range"&&Vt(re)&&!sl(re)&&Qe.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&J!=="prevMonthDay"&&we%7==6&&t.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+t.config.getWeek(re)+"</span>"),gt("onDayCreate",Qe),Qe}function R(J){J.focus(),t.config.mode==="range"&&Te(J)}function I(J){for(var re=J>0?0:t.config.showMonths-1,ge=J>0?t.config.showMonths:-1,we=re;we!=ge;we+=J)for(var Ve=t.daysContainer.children[we],Qe=J>0?0:Ve.children.length-1,Rt=J>0?Ve.children.length:-1,ut=Qe;ut!=Rt;ut+=J){var Bt=Ve.children[ut];if(Bt.className.indexOf("hidden")===-1&&G(Bt.dateObj))return Bt}}function F(J,re){for(var ge=J.className.indexOf("Month")===-1?J.dateObj.getMonth():t.currentMonth,we=re>0?t.config.showMonths:-1,Ve=re>0?1:-1,Qe=ge-t.currentMonth;Qe!=we;Qe+=Ve)for(var Rt=t.daysContainer.children[Qe],ut=ge-t.currentMonth===Qe?J.$i+re:re<0?Rt.children.length-1:0,Bt=Rt.children.length,ct=ut;ct>=0&&ct<Bt&&ct!=(re>0?Bt:-1);ct+=Ve){var yt=Rt.children[ct];if(yt.className.indexOf("hidden")===-1&&G(yt.dateObj)&&Math.abs(J.$i-ct)>=Math.abs(re))return R(yt)}t.changeMonth(Ve),z(I(Ve),0)}function z(J,re){var ge=o(),we=ee(ge||document.body),Ve=J!==void 0?J:we?ge:t.selectedDateElem!==void 0&&ee(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&ee(t.todayDateElem)?t.todayDateElem:I(re>0?1:-1);Ve===void 0?t._input.focus():we?F(Ve,re):R(Ve)}function M(J,re){for(var ge=(new Date(J,re,1).getDay()-t.l10n.firstDayOfWeek+7)%7,we=t.utils.getDaysInMonth((re-1+12)%12,J),Ve=t.utils.getDaysInMonth(re,J),Qe=window.document.createDocumentFragment(),Rt=t.config.showMonths>1,ut=Rt?"prevMonthDay hidden":"prevMonthDay",Bt=Rt?"nextMonthDay hidden":"nextMonthDay",ct=we+1-ge,yt=0;ct<=we;ct++,yt++)Qe.appendChild(A("flatpickr-day "+ut,new Date(J,re-1,ct),ct,yt));for(ct=1;ct<=Ve;ct++,yt++)Qe.appendChild(A("flatpickr-day",new Date(J,re,ct),ct,yt));for(var al=Ve+1;al<=42-ge&&(t.config.showMonths===1||yt%7!=0);al++,yt++)Qe.appendChild(A("flatpickr-day "+Bt,new Date(J,re+1,al%Ve),al,yt));var Zr=Xt("div","dayContainer");return Zr.appendChild(Qe),Zr}function E(){if(t.daysContainer!==void 0){Bi(t.daysContainer),t.weekNumbers&&Bi(t.weekNumbers);for(var J=document.createDocumentFragment(),re=0;re<t.config.showMonths;re++){var ge=new Date(t.currentYear,t.currentMonth,1);ge.setMonth(t.currentMonth+re),J.appendChild(M(ge.getFullYear(),ge.getMonth()))}t.daysContainer.appendChild(J),t.days=t.daysContainer.firstChild,t.config.mode==="range"&&t.selectedDates.length===1&&Te()}}function N(){if(!(t.config.showMonths>1||t.config.monthSelectorType!=="dropdown")){var J=function(we){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&we<t.config.minDate.getMonth()?!1:!(t.config.maxDate!==void 0&&t.currentYear===t.config.maxDate.getFullYear()&&we>t.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var re=0;re<12;re++)if(!!J(re)){var ge=Xt("option","flatpickr-monthDropdown-month");ge.value=new Date(t.currentYear,re).getMonth().toString(),ge.textContent=Vi(re,t.config.shorthandCurrentMonth,t.l10n),ge.tabIndex=-1,t.currentMonth===re&&(ge.selected=!0),t.monthsDropdownContainer.appendChild(ge)}}}function L(){var J=Xt("div","flatpickr-month"),re=window.document.createDocumentFragment(),ge;t.config.showMonths>1||t.config.monthSelectorType==="static"?ge=Xt("span","cur-month"):(t.monthsDropdownContainer=Xt("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),k(t.monthsDropdownContainer,"change",function(Rt){var ut=cr(Rt),Bt=parseInt(ut.value,10);t.changeMonth(Bt-t.currentMonth),gt("onMonthChange")}),N(),ge=t.monthsDropdownContainer);var we=Hi("cur-year",{tabindex:"-1"}),Ve=we.getElementsByTagName("input")[0];Ve.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Ve.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Ve.setAttribute("max",t.config.maxDate.getFullYear().toString()),Ve.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Qe=Xt("div","flatpickr-current-month");return Qe.appendChild(ge),Qe.appendChild(we),re.appendChild(Qe),J.appendChild(re),{container:J,yearElement:Ve,monthElement:ge}}function O(){Bi(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var J=t.config.showMonths;J--;){var re=L();t.yearElements.push(re.yearElement),t.monthElements.push(re.monthElement),t.monthNav.appendChild(re.container)}t.monthNav.appendChild(t.nextMonthNav)}function V(){return t.monthNav=Xt("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=Xt("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=Xt("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,O(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(J){t.__hidePrevMonthArrow!==J&&(jl(t.prevMonthNav,"flatpickr-disabled",J),t.__hidePrevMonthArrow=J)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(J){t.__hideNextMonthArrow!==J&&(jl(t.nextMonthNav,"flatpickr-disabled",J),t.__hideNextMonthArrow=J)}}),t.currentYearElement=t.yearElements[0],Kr(),t.monthNav}function q(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var J=Oo(t.config);t.timeContainer=Xt("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var re=Xt("span","flatpickr-time-separator",":"),ge=Hi("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=ge.getElementsByTagName("input")[0];var we=Hi("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=we.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=ql(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?J.hours:m(J.hours)),t.minuteElement.value=ql(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():J.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ge),t.timeContainer.appendChild(re),t.timeContainer.appendChild(we),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Ve=Hi("flatpickr-second");t.secondElement=Ve.getElementsByTagName("input")[0],t.secondElement.value=ql(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():J.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(Xt("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Ve)}return t.config.time_24hr||(t.amPM=Xt("span","flatpickr-am-pm",t.l10n.amPM[sr((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function W(){t.weekdayContainer?Bi(t.weekdayContainer):t.weekdayContainer=Xt("div","flatpickr-weekdays");for(var J=t.config.showMonths;J--;){var re=Xt("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(re)}return X(),t.weekdayContainer}function X(){if(!!t.weekdayContainer){var J=t.l10n.firstDayOfWeek,re=Uf(t.l10n.weekdays.shorthand);J>0&&J<re.length&&(re=Uf(re.splice(J,re.length),re.splice(0,J)));for(var ge=t.config.showMonths;ge--;)t.weekdayContainer.children[ge].innerHTML=` |
| | | `);for(let s=0;s<l.length;s++)l[s]=l[s].split(" ")}if(o=l.length,a!=o)return!1;for(let s=0;s<a;s++)if(!(h.config.rowhidden!=null&&h.config.rowhidden[s]!=null)){for(let u=0;u<o;u++)if(t[s].length!=l[u].length)return!1}for(let s=0;s<a;s++)if(!(h.config.rowhidden!=null&&h.config.rowhidden[s]!=null)){for(let u=0;u<t[0].length;u++)if(ze(s,u,t)!=ze(s,u,l))return!1}return!0}},Ct=mv});function rl(e){$("#luckysheet-cols-h-hover").hide(),$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-cell-selected-boxs .luckysheet-cell-selected").hide(),$("#luckysheet-cols-h-selected .luckysheet-cols-h-selected").hide(),$("#luckysheet-rows-h-selected .luckysheet-rows-h-selected").hide(),$("#luckysheet-cell-selected-focus").hide(),$("#luckysheet-rows-h-hover").hide(),$("#luckysheet-selection-copy .luckysheet-selection-copy").hide(),$("#luckysheet-cols-menu-btn").hide(),$("#luckysheet-row-count-show, #luckysheet-column-count-show").hide(),e||Ct.clearcopy(e),$("#luckysheet-dropCell-icon").is(":visible")&&e&&$("#luckysheet-dropCell-icon").remove(),ke.luckysheetPaintModelOn&&!e&&ke.cancelPaintModel()}var Vr=Ie(()=>{Wa();il()});function pc(e,n,t,l,a){let o=bu();o=_e(o,{logotitle:a}),o=_e(o,{menu:Nu()});let s=ku;h.config==null&&(h.config={}),yn(n,e);let f=Q().info,d='<button id="luckysheet-bottom-add-row" class="btn btn-default">'+f.add+'</button><input id="luckysheet-bottom-add-row-input" type="text" class="luckysheet-datavisual-config-input luckysheet-mousedown-cancel" placeholder="'+(de.addRowCount||100)+'"><span style="font-size: 14px;">'+f.row+'</span><span style="font-size: 14px;color: #9c9c9c;">('+f.addLast+")</span>",m=' <button id="luckysheet-bottom-bottom-top" class="btn btn-default" style="">'+f.backTop+"</button>",g=_e(f.pageInfo,{total:de.total?de.total:"",totalPage:de.pageInfo.totalPage?de.pageInfo.totalPage:"",currentPage:de.pageInfo.currentPage?de.pageInfo.currentPage:""}),y=' <span id="luckysheet-bottom-page-info" style="font-size: 14px;color: #f34141;">'+g+'</span> <button id="luckysheet-bottom-page-next" class="btn btn-danger" style="">\u4E0B\u4E00\u9875</button>',v=' <span id="luckysheet-bottom-page-info" style="font-size: 14px;color: #f34141;">'+g+"</span>",b="";de.enableAddRow&&(b+=d),de.enablePage&&(parseInt(de.pageInfo.totalPage)==1?b+=v:b+=y),de.enableAddBackTop&&(b+=m);let k=_e('<div id="luckysheetcoltable_0" class="luckysheet-cell-flow-col"> <div id ="luckysheet-sheettable_0" class="luckysheet-cell-sheettable" style="height:${height}px;width:${width}px;"></div><div id="luckysheet-bottom-controll-row" class="luckysheet-bottom-controll-row"> '+b+" </div> </div>",{height:h.rh_height,width:h.ch_width-1}),w=_e(Tu,{width:h.ch_width,index:0,column:""});s=_e(s,{width:h.ch_width,flow:k,index:0}),o=_e(o,{flow:s,rowHeader:"<div style='height:"+h.rh_height+"px' id='luckysheetrowHeader_0' class='luckysheetsheetchange'></div>",columnHeader:w,functionButton:de.functionButton}),$("#"+h.container).append(o),$("#luckysheet-scrollbar-x div").width(h.ch_width),$("#luckysheet-scrollbar-y div").height(h.rh_height+h.columnHeaderHeight-h.cellMainSrollBarSize-3),$("body").append(Ru),$("body").append(wu),$("body").append(xu()),$("body").append(Iu),$("body").append(_e(Gi(),{menuid:"filter"})),$("body").append(_e(Wi(),{menuid:"filter"})),$("body").append(Au()),$("#luckysheet-rows-h").width(h.rowHeaderWidth-1.5),$("#luckysheet-cols-h-c").height(h.columnHeaderHeight-1.5),$("#luckysheet-left-top").css({width:h.rowHeaderWidth-1.5,height:h.columnHeaderHeight-1.5}),$("#luckysheet_info_detail_input").val(de.title)}var xd=Ie(()=>{Gt();xl();Ur();Kt();Jt();Ii();ft();Xe();bt()});function _d(e){e==null&&(e="chart");for(var n=window.navigator.userAgent.replace(/[^a-zA-Z0-9]/g,"").split(""),t="",l=0;l<12;l++)t+=n[Math.round(Math.random()*(n.length-1))];var a=new Date().getTime();return e+"_"+t+"_"+a}function gc(e,n){return e.replace(/\$\{([\w]+)\}/g,function(t,l){var a=n[l];return typeof a!="undefined"?a:t})}var Cd=Ie(()=>{});var br,_n,pv,D,Li=Ie(()=>{ft();Ft();Al();Ut();br=Fl(vn()),_n={v:"#VALUE!",n:"#NAME?",na:"#N/A",r:"#REF!",d:"#DIV/0!",nm:"#NUM!",nl:"#NULL!",sp:"#SPILL!"},pv={getCellDataArr:function(e,n,t){let l=[];if(e.data==null)t||(n==="number"?l.push(0):n==="text"&&l.push(""));else if(P(e.data)==="array")for(let a=0;a<e.data.length;a++)for(let o=0;o<e.data[a].length;o++){let s=e.data[a][o],u=s;P(s)==="object"&&(u=s.v),u==null?t||(n==="number"?u=0:n==="text"&&(u=""),l.push(u)):l.push(u)}else me(e.data.v)?t||(n=="number"?l.push(0):n=="text"&&l.push("")):l.push(e.data.v);return l},getCellDataDyadicArr:function(e,n){let t=[];if(e.data==null){let l=[];n=="number"?l.push(0):n=="text"&&l.push(""),t.push(l)}else if(P(e.data)=="array")for(let l=0;l<e.data.length;l++){let a=[];for(let o=0;o<e.data[l].length;o++){let s=e.data[l][o],u=s;P(s)==="object"&&(u=s.v),u==null&&(n==="number"?u=0:n==="text"&&(u="")),a.push(u)}t.push(a)}else{let l=[],a=e.data.v;me(a)&&(n=="number"?a=0:n=="text"&&(a="")),l.push(a),t.push(l)}return t},getDataArr:function(e,n){let t=[];if(n==null&&(n=!1),P(e[0])=="array")for(let l=0;l<e.length;l++)for(let a=0;a<e[l].length;a++)n&&!B(e[l][a])||t.push(e[l][a]);else for(let l=0;l<e.length;l++)n&&!B(e[l])||t.push(e[l]);return t},getDataDyadicArr:function(e){let n=[];if(P(e[0])=="array")for(let t=0;t<e.length;t++){let l=[];for(let a=0;a<e[t].length;a++)l.push(e[t][a]);n.push(l)}else{let t=[];for(let l=0;l<e.length;l++)t.push(e[l]);n.push(t)}return n},isDyadicArr:function(e){let n=!0;if(e.length>1){let t=e[0].length;for(let l=1;l<e.length;l++)if(e[l].length!=t){n=!1;break}}return n},getFirstValue:function(e,n){let t=this;n==null&&(n="number");let l;if(P(e)=="array")if(P(e[0])=="array"){if(!t.isDyadicArr(e))return _n.v;l=e[0][0]}else l=e[0];else if(P(e)=="object"&&e.startCell!=null)if(e.data==null)n=="number"?l=0:n=="text"&&(l="");else{let a=window.luckysheetCurrentRow,o=window.luckysheetCurrentColumn;if(e.rowl==1&&e.coll==1)l=e.data,l==null||me(l.v)?n=="number"?l=0:n=="text"&&(l=""):l=l.v;else if(e.data[0][0].mc!=null&&e.data[0][0].mc.rs==e.rowl&&e.data[0][0].mc.cs==e.coll)l=e.data[0][0],l==null||me(l.v)?n=="number"?l=0:n=="text"&&(l=""):l=l.v;else if(e.rowl==1||e.coll==1){let s=p.getcellrange(e.startCell),u=s.row[0],f=u+e.rowl-1,d=s.column[0],m=d+e.coll-1;if(e.rowl==1){if(o<d||o>m)return _n.v;l=e.data[0][o-d]}else if(e.coll==1){if(a<u||a>f)return _n.v;l=e.data[a-u][0]}l==null||me(l.v)||l.mc!=null?n=="number"?l=0:n=="text"&&(l=""):l=l.v}else return _n.v}else l=e;return l},getCellBoolen:function(e){let t=this.getFirstValue(e);if(H(t))return t;if(P(t)!="boolean")if(P(t)=="string"&&(t.toLowerCase()=="true"||t.toLowerCase()=="false"))t.toLowerCase()=="true"?t=!0:t.toLowerCase()=="false"&&(t=!1);else if(B(t))t=parseFloat(t),t=t!=0;else return _n.v;return t},getCellDate:function(e){let n=this,t;if(P(e)=="array")if(P(e[0])=="array"){if(!n.isDyadicArr(e))return _n.v;t=e[0][0]}else t=e[0];else if(P(e)=="object"&&e.startCell!=null){if(e.data==null||P(e.data)=="array"||me(e.data.v))return _n.v;t=e.data.v,e.data.ct!=null&&e.data.ct.t=="d"&&(t=mt("YYYY-MM-DD h:mm:ss",t))}else t=e;return t},getCellrangeDate:function(e){let n=this,t=[];if(P(e)=="array"){if(P(e[0])=="array"&&!n.isDyadicArr(e))return _n.v;t=t.concat(n.getDataArr(e,!1))}else if(P(e)=="object"&&e.startCell!=null)if(e.data==null)t.push(0);else if(P(e.data)=="array")for(let l=0;l<e.data.length;l++)for(let a=0;a<e.data[l].length;a++)if(e.data[l][a]!=null&&!me(e.data[l][a].v)){let o=e.data[l][a].v;e.data[l][a].ct!=null&&e.data[l][a].ct.t=="d"&&(o=mt("YYYY-MM-DD h:mm:ss",o)),t.push(o)}else t.push(0);else{let l=e.data.v;e.data.ct!=null&&e.data.ct.t=="d"&&(l=mt("YYYY-MM-DD h:mm:ss",l)),t.push(l)}else t.push(e);return t},getRegExpStr:function(e){return e.replace("~*","\\*").replace("~?","\\?").replace(".","\\.").replace("*",".*").replace("?",".")},factorial:function(e){return e==0||e==1?1:e*this.factorial(e-1)},factorialDouble:function(e){return e<=0?1:e*this.factorialDouble(e-2)},variance:function(e){let n=0,t=0;for(let o=0;o<e.length;o++)n+=e[o],t++;let l=n/t,a=0;for(let o=0;o<e.length;o++){let s=e[o];a+=(s-l)*(s-l)}return a/t},variance_s:function(e){let n=0,t=0;for(let o=0;o<e.length;o++)n+=e[o],t++;let l=n/t,a=0;for(let o=0;o<e.length;o++){let s=e[o];a+=(s-l)*(s-l)}return a/(t-1)},standardDeviation:function(e){let n=0,t=0;for(let o=0;o<e.length;o++)n+=e[o],t++;let l=n/t,a=0;for(let o=0;o<e.length;o++){let s=e[o];a+=(s-l)*(s-l)}return Math.sqrt(a/t)},standardDeviation_s:function(e){let n=0,t=0;for(let o=0;o<e.length;o++)n+=e[o],t++;let l=n/t,a=0;for(let o=0;o<e.length;o++){let s=e[o];a+=(s-l)*(s-l)}return Math.sqrt(a/(t-1))},isLeapYear:function(e){return new Date(e,1,29).getMonth()===1},feb29Between:function(e,n){let t=this,l=(0,br.default)(e).year(),a=(0,br.default)().set({year:l,month:2,date:1});if(t.isLeapYear(l)&&(0,br.default)(e)<(0,br.default)(a)&&(0,br.default)(n)>=(0,br.default)(a))return!0;let o=(0,br.default)(n).year(),s=(0,br.default)().set({year:o,month:2,date:1});return t.isLeapYear(o)&&(0,br.default)(n)>=(0,br.default)(s)&&(0,br.default)(e)<(0,br.default)(s)},findResultIndex:function(e,n){let t={};for(let o=1;o<e[0].length;++o)t[o]=!0;let l=n[0].length;for(i=1;i<n.length;++i)n[i].length>l&&(l=n[i].length);for(let o=1;o<e.length;++o)for(let s=1;s<e[o].length;++s){let u=!1,f=!1;for(let d=0;d<n.length;++d){let m=n[d];if(m.length<l)continue;let g=m[0];if(e[o][0]===g){f=!0;for(let y=1;y<m.length;++y)u=u||new Function("return "+e[o][s]+m[y])()}}f&&(t[s]=t[s]&&u)}let a=[];for(let o=0;o<e[0].length;++o)t[o]&&a.push(o-1);return a},findField:function(e,n){let t=null;for(let l=0;l<e.length;l++)if(e[l][0]==n){t=l;break}return t==null?_n.v:t},rest:function(e,n){return n=n||1,!e||typeof e.slice!="function"?e:e.slice(n)},compact:function(e){if(!e)return e;let n=[];for(let t=0;t<e.length;++t)!e[t]||n.push(e[t]);return n}},D=pv});function So(e){var n=Td.sylvester_matrix.create(e);return n.inverse().elements}var Td,gv,yc=Ie(()=>{Td={},gv=function(n){var t=function(){};t.precision=1e-6,t.create=function(a){var o=new t;return o.setElements(a)};var l=t.create;t.I=function(a){for(var o=[],s=a,u;s--;)for(u=a,o[s]=[];u--;)o[s][u]=s===u?1:0;return t.create(o)},t.prototype={e:function(a,o){return a<1||a>this.elements.length||o<1||o>this.elements[0].length?null:this.elements[a-1][o-1]},dimensions:function(){var a=this.elements.length===0?0:this.elements[0].length;return{rows:this.elements.length,cols:a}},rows:function(){return this.elements.length},cols:function(){return this.elements.length===0?0:this.elements[0].length},eql:function(a){var o=a.elements||a;if((!o[0]||typeof o[0][0]=="undefined")&&(o=t.create(o).elements),this.elements.length===0||o.length===0)return this.elements.length===o.length;if(this.elements.length!==o.length||this.elements[0].length!==o[0].length)return!1;for(var s=this.elements.length,u=this.elements[0].length,f;s--;)for(f=u;f--;)if(Math.abs(this.elements[s][f]-o[s][f])>t.precision)return!1;return!0},dup:function(){return t.create(this.elements)},map:function(a,o){if(this.elements.length===0)return t.create([]);for(var s=[],u=this.elements.length,f=this.elements[0].length,d;u--;)for(d=f,s[u]=[];d--;)s[u][d]=a.call(o,this.elements[u][d],u+1,d+1);return t.create(s)},isSameSizeAs:function(a){var o=a.elements||a;return typeof o[0][0]=="undefined"&&(o=t.create(o).elements),this.elements.length===0?o.length===0:this.elements.length===o.length&&this.elements[0].length===o[0].length},add:function(a){if(this.elements.length===0)return this.map(function(s){return s});var o=a.elements||a;return typeof o[0][0]=="undefined"&&(o=t.create(o).elements),this.isSameSizeAs(o)?this.map(function(s,u,f){return s+o[u-1][f-1]}):null},subtract:function(a){if(this.elements.length===0)return this.map(function(s){return s});var o=a.elements||a;return typeof o[0][0]=="undefined"&&(o=t.create(o).elements),this.isSameSizeAs(o)?this.map(function(s,u,f){return s-o[u-1][f-1]}):null},canMultiplyFromLeft:function(a){if(this.elements.length===0)return!1;var o=a.elements||a;return typeof o[0][0]=="undefined"&&(o=t.create(o).elements),this.elements[0].length===o.length},multiply:function(a){if(this.elements.length===0)return null;if(!a.elements)return this.map(function(b){return b*a});var o=!!a.modulus,s=a.elements||a;if(typeof s[0][0]=="undefined"&&(s=t.create(s).elements),!this.canMultiplyFromLeft(s))return null;for(var u=this.elements.length,f=s[0].length,d,m=this.elements[0].length,g,y=[],v;u--;)for(d=f,y[u]=[];d--;){for(g=m,v=0;g--;)v+=this.elements[u][g]*s[g][d];y[u][d]=v}var s=t.create(y);return o?s.col(1):s},minor:function(a,o,s,u){if(this.elements.length===0)return null;for(var f=[],d=s,m,g,y,v=this.elements.length,b=this.elements[0].length;d--;)for(m=s-d-1,f[m]=[],g=u;g--;)y=u-g-1,f[m][y]=this.elements[(a+m-1)%v][(o+y-1)%b];return t.create(f)},transpose:function(){if(this.elements.length===0)return t.create([]);for(var a=this.elements.length,o,s=this.elements[0].length,u,f=[],o=s;o--;)for(u=a,f[o]=[];u--;)f[o][u]=this.elements[u][o];return t.create(f)},isSquare:function(){var a=this.elements.length===0?0:this.elements[0].length;return this.elements.length===a},max:function(){if(this.elements.length===0)return null;for(var a=0,o=this.elements.length,s=this.elements[0].length,u;o--;)for(u=s;u--;)Math.abs(this.elements[o][u])>Math.abs(a)&&(a=this.elements[o][u]);return a},indexOf:function(a){if(this.elements.length===0)return null;var o=null,s=this.elements.length,u,f=this.elements[0].length,d;for(u=0;u<s;u++)for(d=0;d<f;d++)if(this.elements[u][d]===a)return{i:u+1,j:d+1};return null},diagonal:function(){if(!this.isSquare)return null;for(var a=[],o=this.elements.length,s=0;s<o;s++)a.push(this.elements[s][s]);return t.create(a)},toRightTriangular:function(){if(this.elements.length===0)return t.create([]);var a=this.dup(),o,s=this.elements.length,u,f,d=this.elements[0].length,m;for(u=0;u<s;u++){if(a.elements[u][u]===0){for(f=u+1;f<s;f++)if(a.elements[f][u]!==0){for(o=[],m=0;m<d;m++)o.push(a.elements[u][m]+a.elements[f][m]);a.elements[u]=o;break}}if(a.elements[u][u]!==0)for(f=u+1;f<s;f++){var g=a.elements[f][u]/a.elements[u][u];for(o=[],m=0;m<d;m++)o.push(m<=u?0:a.elements[f][m]-a.elements[u][m]*g);a.elements[f]=o}}return a},determinant:function(){if(this.elements.length===0)return 1;if(!this.isSquare())return null;for(var a=this.toRightTriangular(),o=a.elements[0][0],s=a.elements.length,u=1;u<s;u++)o=o*a.elements[u][u];return o},isSingular:function(){return this.isSquare()&&this.determinant()===0},trace:function(){if(this.elements.length===0)return 0;if(!this.isSquare())return null;for(var a=this.elements[0][0],o=this.elements.length,s=1;s<o;s++)a+=this.elements[s][s];return a},rank:function(){if(this.elements.length===0)return 0;for(var a=this.toRightTriangular(),o=0,s=this.elements.length,u=this.elements[0].length,f;s--;)for(f=u;f--;)if(Math.abs(a.elements[s][f])>t.precision){o++;break}return o},augment:function(a){if(this.elements.length===0)return this.dup();var o=a.elements||a;typeof o[0][0]=="undefined"&&(o=t.create(o).elements);var s=this.dup(),u=s.elements[0].length,f=s.elements.length,d=o[0].length,m;if(f!==o.length)return null;for(;f--;)for(m=d;m--;)s.elements[f][u+m]=o[f][m];return s},inverse:function(){if(this.elements.length===0||!this.isSquare()||this.isSingular())return null;for(var a=this.elements.length,o=a,s,u=this.augment(t.I(a)).toRightTriangular(),f=u.elements[0].length,d,m,g,y=[],v;o--;){for(m=[],y[o]=[],g=u.elements[o][o],d=0;d<f;d++)v=u.elements[o][d]/g,m.push(v),d>=a&&y[o].push(v);for(u.elements[o]=m,s=o;s--;){for(m=[],d=0;d<f;d++)m.push(u.elements[s][d]-u.elements[o][d]*u.elements[s][o]);u.elements[s]=m}}return t.create(y)},round:function(){return this.map(function(a){return Math.round(a)})},snapTo:function(a){return this.map(function(o){return Math.abs(o-a)<=t.precision?a:o})},setElements:function(a){var o,s,u=a.elements||a;if(u[0]&&typeof u[0][0]!="undefined"){for(o=u.length,this.elements=[];o--;)for(s=u[o].length,this.elements[o]=[];s--;)this.elements[o][s]=u[o][s];return this}var f=u.length;for(this.elements=[],o=0;o<f;o++)this.elements.push([u[o]]);return this}},n.sylvester_matrix=t};gv(Td)});function Ya(){let e=arguments[1],n=arguments[0],t;P(n)=="object"&&n.startCell!=null?(e=="&"?t=D.getCellDataDyadicArr(n,"text"):t=D.getCellDataDyadicArr(n,"number"),t.length==1&&t[0].length==1&&(t=t[0][0])):t=n;let l=arguments[2],a;if(P(l)=="object"&&l.startCell!=null?(e=="&"?a=D.getCellDataDyadicArr(l,"text"):a=D.getCellDataDyadicArr(l,"number"),a.length==1&&a[0].length==1&&(a=a[0][0])):a=l,H(t))return t;if(H(a))return a;if(P(t)=="array"&&P(t[0])=="array"&&!D.isDyadicArr(t))return Me.v;if(P(a)=="array"&&P(a[0])=="array"&&!D.isDyadicArr(a))return Me.v;if(e=="<>"&&(e="!="),e=="="&&(e="=="),t==null&&a==null)return"#INVERSE!";if(t=="#INVERSE!")t=0,e=="-"?e="+":e=="+"&&(e="-");else if(e=="-"&&t==null)t=0;else if(e=="/"&&(a==0||a==null))return Me.d;function o(u,f,d){if(B(u)&&(u=parseFloat(u)),B(d)&&(d=parseFloat(d)),f=="==")return u==d;if(f=="!=")return u!=d;if(f==">=")return u>=d;if(f=="<=")return u<=d;if(f==">")return u>d;if(f=="<")return u<d}function s(u){return u==null?u:u.toString().toLowerCase()=="true"?1:u.toString().toLowerCase()=="false"?0:u}if(e=="*")if(P(t)=="array"&&P(a)=="array"){let u=[];if(P(t[0])=="array"&&P(a[0])=="array")if(t.length==a.length&&t[0].length==a[0].length)for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){t[f][m]=s(t[f][m]),a[f][m]=s(a[f][m]);let g;B(t[f][m])&&B(a[f][m])?g=Tt(t[f][m],e,a[f][m]):g=Me.v,d.push(g)}u.push(d)}else if(t[0].length==a.length){let f=t.length,d=a[0].length;for(let m=0;m<f;m++){let g=[];for(let y=0;y<d;y++){let v=0;for(let b=0;b<t[0].length;b++)t[m][b]=s(t[m][b]),a[b][y]=s(a[b][y]),B(t[m][b])&&B(a[b][y])?v+=Tt(t[m][b],e,a[b][y]):v+=Me.v;v.toString()=="NaN"&&(v=Me.v),g.push(v)}u.push(g)}}else if(t.length==a[0].length){let f=a.length,d=t[0].length;for(let m=0;m<f;m++){let g=[];for(let y=0;y<d;y++){let v=0;for(let b=0;b<a[0].length;b++)t[b][y]=s(t[b][y]),a[m][b]=s(a[m][b]),B(a[m][b])&&B(t[b][y])?v+=Tt(t[b][y],e,a[m][b]):v+=Me.v;v.toString()=="NaN"&&(v=Me.v),g.push(v)}u.push(g)}}else return Me.na;else if(P(t[0])=="array")if(t[0].length==a.length)for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){t[f][m]=s(t[f][m]),a[m]=s(a[m]);let g;B(t[f][m])&&B(a[m])?g=Tt(t[f][m],e,a[m]):g=Me.v,d.push(g)}u.push(d)}else if(t[0].length==1){let f=t.length,d=a.length;for(let m=0;m<f;m++){let g=[];for(let y=0;y<d;y++){t[m][0]=s(t[m][0]),a[y]=s(a[y]);let v;B(t[m][0])&&B(a[y])?v=Tt(t[m][0],e,a[y]):v=Me.v,g.push(v)}u.push(g)}}else return Me.na;else if(P(a[0])=="array")if(a[0].length==t.length)for(let f=0;f<a.length;f++){let d=[];for(let m=0;m<a[f].length;m++){t[m]=s(t[m]),a[f][m]=s(a[f][m]);let g;B(t[m])&&B(a[f][m])?g=Tt(t[m],e,a[f][m]):g=Me.v,d.push(g)}u.push(d)}else if(a[0].length==1){let f=a.length,d=t.length;for(let m=0;m<f;m++){let g=[];for(let y=0;y<d;y++){t[y]=s(t[y]),a[m][0]=s(a[m][0]);let v;B(t[y])&&B(a[m][0])?v=Tt(t[y],e,a[m][0]):v=Me.v,g.push(v)}u.push(g)}}else return Me.na;else{if(t.length!=a.length)return Me.na;for(let f=0;f<t.length;f++){t[f]=s(t[f]),a[f]=s(a[f]);let d;B(t[f])&&B(a[f])?d=Tt(t[f],e,a[f]):d=Me.v,u.push(d)}}return u}else if(P(t)=="array"){a=s(a);let u=[];if(P(t[0])=="array")for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){t[f][m]=s(t[f][m]);let g;B(t[f][m])&&B(a)?g=Tt(t[f][m],e,a):g=Me.v,d.push(g)}u.push(d)}else for(let f=0;f<t.length;f++){t[f]=s(t[f]);let d;B(t[f])&&B(a)?d=Tt(t[f],e,a):d=Me.v,u.push(d)}return u}else if(P(a)=="array"){t=s(t);let u=[];if(P(a[0])=="array")for(let f=0;f<a.length;f++){let d=[];for(let m=0;m<a[f].length;m++){a[f][m]=s(a[f][m]);let g;B(t)&&B(a[f][m])?g=Tt(t,e,a[f][m]):g=Me.v,d.push(g)}u.push(d)}else for(let f=0;f<a.length;f++){a[f]=s(a[f]);let d;B(t)&&B(a[f])?d=Tt(t,e,a[f]):d=Me.v,u.push(d)}return u}else{t=s(t),a=s(a);let u;return B(t)&&B(a)?u=Tt(t,e,a):u=Me.v,u}else if(e=="/")if(P(t)=="array"&&P(a)=="array"){let u=[];if(P(t[0])=="array"&&P(a[0])=="array")if(t.length==a.length&&t[0].length==a[0].length)for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){t[f][m]=s(t[f][m]),a[f][m]=s(a[f][m]);let g;B(t[f][m])&&B(a[f][m])?parseFloat(a[f][m])==0?g=Me.d:g=Tt(t[f][m],e,a[f][m]):g=Me.v,d.push(g)}u.push(d)}else if(t[0].length==a.length){let f=So(a),d=t.length,m=f[0].length;for(let g=0;g<d;g++){let y=[];for(let v=0;v<m;v++){let b=0;for(let k=0;k<t[0].length;k++)t[g][k]=s(t[g][k]),f[k][v]=s(f[k][v]),B(t[g][k])&&B(f[k][v])?b+=Tt(t[g][k],"*",f[k][v]):b+=Me.v;b.toString()=="NaN"&&(b=Me.v),y.push(b)}u.push(y)}}else return Me.na;else if(P(t[0])=="array")if(t[0].length==a.length)for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){t[f][m]=s(t[f][m]),a[m]=s(a[m]);let g;B(t[f][m])&&B(a[m])?parseFloat(a[m])==0?g=Me.d:g=Tt(t[f][m],e,a[m]):g=Me.v,d.push(g)}u.push(d)}else if(t[0].length==1){let f=t.length,d=a.length;for(let m=0;m<f;m++){let g=[];for(let y=0;y<d;y++){t[m][0]=s(t[m][0]),a[y]=s(a[y]);let v;B(t[m][0])&&B(a[y])?parseFloat(a[y])==0?v=Me.d:v=Tt(t[m][0],e,a[y]):v=Me.v,g.push(v)}u.push(g)}}else return Me.na;else if(P(a[0])=="array")if(a[0].length==t.length)for(let f=0;f<a.length;f++){let d=[];for(let m=0;m<a[f].length;m++){t[m]=s(t[m]),a[f][m]=s(a[f][m]);let g;B(t[m])&&B(a[f][m])?parseFloat(a[f][m])==0?g=Me.d:g=Tt(t[m],e,a[f][m]):g=Me.v,d.push(g)}u.push(d)}else if(a[0].length==1){let f=a.length,d=t.length;for(let m=0;m<f;m++){let g=[];for(let y=0;y<d;y++){t[y]=s(t[y]),a[m][0]=s(a[m][0]);let v;B(t[y])&&B(a[m][0])?parseFloat(a[m][0])==0?v=Me.d:v=Tt(t[y],e,a[m][0]):v=Me.v,g.push(v)}u.push(g)}}else return Me.na;else{if(t.length!=a.length)return Me.na;for(let f=0;f<t.length;f++){t[f]=s(t[f]),a[f]=s(a[f]);let d;B(t[f])&&B(a[f])?parseFloat(a[f])==0?d=Me.d:d=Tt(t[f],e,a[f]):d=Me.v,u.push(d)}}return u}else if(P(t)=="array"){a=s(a);let u=[];if(P(t[0])=="array")for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){t[f][m]=s(t[f][m]);let g;B(t[f][m])&&B(a)?parseFloat(a)==0?g=Me.d:g=Tt(t[f][m],e,a):g=Me.v,d.push(g)}u.push(d)}else for(let f=0;f<t.length;f++){t[f]=s(t[f]);let d;B(t[f])&&B(a)?parseFloat(a)==0?d=Me.d:d=Tt(t[f],e,a):d=Me.v,u.push(d)}return u}else if(P(a)=="array"){t=s(t);let u=[];if(P(a[0])=="array")for(let f=0;f<a.length;f++){let d=[];for(let m=0;m<a[f].length;m++){a[f][m]=s(a[f][m]);let g;B(t)&&B(a[f][m])?parseFloat(a[f][m])==0?g=Me.d:g=Tt(t,e,a[f][m]):g=Me.v,d.push(g)}u.push(d)}else for(let f=0;f<a.length;f++){a[f]=s(a[f]);let d;B(t)&&B(a[f])?parseFloat(a[f])==0?d=Me.d:d=Tt(t,e,a[f]):d=Me.v,u.push(d)}return u}else{t=s(t),a=s(a);let u;return B(t)&&B(a)?parseFloat(a)==0?u=Me.d:u=Tt(t,e,a):u=Me.v,u}else if(e=="+"||e=="-"||e=="%")if(P(t)=="array"&&P(a)=="array"){let u=[];if(P(t[0])=="array"&&P(a[0])=="array"){if(t.length!=a.length&&t[0].length!=a[0].length)return Me.na;for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){t[f][m]=s(t[f][m]),a[f][m]=s(a[f][m]);let g;B(t[f][m])&&B(a[f][m])?e=="%"&&parseFloat(a[f][m])==0?g=Me.d:g=Tt(t[f][m],e,a[f][m]):g=Me.v,d.push(g)}u.push(d)}}else if(P(t[0])=="array"){if(t[0].length!=a.length)return Me.na;for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){t[f][m]=s(t[f][m]),a[m]=s(a[m]);let g;B(t[f][m])&&B(a[m])?e=="%"&&parseFloat(a[m])==0?g=Me.d:g=Tt(t[f][m],e,a[m]):g=Me.v,d.push(g)}u.push(d)}}else if(P(a[0])=="array"){if(a[0].length!=t.length)return Me.na;for(let f=0;f<a.length;f++){let d=[];for(let m=0;m<a[f].length;m++){t[m]=s(t[m]),a[f][m]=s(a[f][m]);let g;B(t[m])&&B(a[f][m])?e=="%"&&parseFloat(a[f][m])==0?g=Me.d:g=Tt(t[m],e,a[f][m]):g=Me.v,d.push(g)}u.push(d)}}else{if(t.length!=a.length)return Me.na;for(let f=0;f<t.length;f++){t[f]=s(t[f]),a[f]=s(a[f]);let d;B(t[f])&&B(a[f])?e=="%"&&parseFloat(a[f])==0?d=Me.d:d=Tt(t[f],e,a[f]):d=Me.v,u.push(d)}}return u}else if(P(t)=="array"){a=s(a);let u=[];if(P(t[0])=="array")for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){t[f][m]=s(t[f][m]);let g;B(t[f][m])&&B(a)?e=="%"&&parseFloat(a)==0?g=Me.d:g=Tt(t[f][m],e,a):g=Me.v,d.push(g)}u.push(d)}else for(let f=0;f<t.length;f++){t[f]=s(t[f]);let d;B(t[f])&&B(a)?e=="%"&&parseFloat(a)==0?d=Me.d:d=Tt(t[f],e,a):d=Me.v,u.push(d)}return u}else if(P(a)=="array"){t=s(t);let u=[];if(P(a[0])=="array")for(let f=0;f<a.length;f++){let d=[];for(let m=0;m<a[f].length;m++){a[f][m]=s(a[f][m]);let g;B(t)&&B(a[f][m])?e=="%"&&parseFloat(a[f][m])==0?g=Me.d:g=Tt(t,e,a[f][m]):g=Me.v,d.push(g)}u.push(d)}else for(let f=0;f<a.length;f++){a[f]=s(a[f]);let d;B(t)&&B(a[f])?e=="%"&&parseFloat(a[f])==0?d=Me.d:d=Tt(t,e,a[f]):d=Me.v,u.push(d)}return u}else{t=s(t),a=s(a);let u;return B(t)&&B(a)?e=="%"&&parseFloat(a)==0?u=Me.d:u=Tt(t,e,a):u=Me.v,u}else if(e=="=="||e=="!="||e==">="||e=="<="||e==">"||e=="<")if(P(t)=="array"&&P(a)=="array"){let u=[];if(P(t[0])=="array"&&P(a[0])=="array"){if(t.length!=a.length&&t[0].length!=a[0].length)return Me.na;for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){let g=o(t[f][m],e,a[f][m]);d.push(g)}u.push(d)}}else if(P(t[0])=="array"){if(t[0].length!=a.length)return Me.na;for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){let g=o(t[f][m],e,a[m]);d.push(g)}u.push(d)}}else if(P(a[0])=="array"){if(a[0].length!=t.length)return Me.na;for(let f=0;f<a.length;f++){let d=[];for(let m=0;m<a[f].length;m++){let g=o(t[m],e,a[f][m]);d.push(g)}u.push(d)}}else{if(t.length!=a.length)return Me.na;for(let f=0;f<t.length;f++){let d=o(t[f],e,a[f]);u.push(d)}}return u}else if(P(t)=="array"){let u=[];if(P(t[0])=="array")for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){let g=o(t[f][m],e,a);d.push(g)}u.push(d)}else for(let f=0;f<t.length;f++){let d=o(t[f],e,a);u.push(d)}return u}else if(P(a)=="array"){let u=[];if(P(a[0])=="array")for(let f=0;f<a.length;f++){let d=[];for(let m=0;m<a[f].length;m++){let g=o(t,e,a[f][m]);d.push(g)}u.push(d)}else for(let f=0;f<a.length;f++){let d=o(t,e,a[f]);u.push(d)}return u}else return o(t,e,a);else if(e=="&")if(P(t)=="array"&&P(a)=="array"){let u=[];if(P(t[0])=="array"&&P(a[0])=="array"){if(t.length!=a.length&&t[0].length!=a[0].length)return Me.na;for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++)d.push(t[f][m]+""+a[f][m]);u.push(d)}}else if(P(t[0])=="array"){if(t[0].length!=a.length)return Me.na;for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++)d.push(t[f][m]+""+a[m]);u.push(d)}}else if(P(a[0])=="array"){if(a[0].length!=t.length)return Me.na;for(let f=0;f<a.length;f++){let d=[];for(let m=0;m<a[f].length;m++)d.push(t[m]+""+a[f][m]);u.push(d)}}else{if(t.length!=a.length)return Me.na;for(let f=0;f<t.length;f++)u.push(t[f]+""+a[f])}return u}else if(P(t)=="array"){let u=[];if(P(t[0])=="array")for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++)d.push(t[f][m]+""+a);u.push(d)}else for(let f=0;f<t.length;f++)u.push(t[f]+""+a);return u}else if(P(a)=="array"){let u=[];if(P(a[0])=="array")for(let f=0;f<a.length;f++){let d=[];for(let m=0;m<a[f].length;m++)d.push(t+""+a[f][m]);u.push(d)}else for(let f=0;f<a.length;f++)u.push(t+""+a[f]);return u}else return t+""+a;else if(e=="^")if(P(t)=="array"&&P(a)=="array"){let u=[];if(P(t[0])=="array"&&P(a[0])=="array"){if(t.length!=a.length&&t[0].length!=a[0].length)return Me.na;for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){t[f][m]=s(t[f][m]),a[f][m]=s(a[f][m]);let g;B(t[f][m])&&B(a[f][m])?g=Math.pow(parseFloat(t[f][m]),parseFloat(a[f][m])):g=Me.v,d.push(g)}u.push(d)}}else if(P(t[0])=="array"){if(t[0].length!=a.length)return Me.na;for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){t[f][m]=s(t[f][m]),a[m]=s(a[m]);let g;B(t[f][m])&&B(a[m])?g=Math.pow(parseFloat(t[f][m]),parseFloat(a[m])):g=Me.v,d.push(g)}u.push(d)}}else if(P(a[0])=="array"){if(a[0].length!=t.length)return Me.na;for(let f=0;f<a.length;f++){let d=[];for(let m=0;m<a[f].length;m++){t[m]=s(t[m]),a[f][m]=s(a[f][m]);let g;B(t[m])&&B(a[f][m])?g=Math.pow(parseFloat(t[m]),parseFloat(a[f][m])):g=Me.v,d.push(g)}u.push(d)}}else{if(t.length!=a.length)return Me.na;for(let f=0;f<t.length;f++){t[f]=s(t[f]),a[f]=s(a[f]);let d;B(t[f])&&B(a[f])?d=Math.pow(parseFloat(t[f]),parseFloat(a[f])):d=Me.v,u.push(d)}}return u}else if(P(t)=="array"){a=s(a);let u=[];if(P(t[0])=="array")for(let f=0;f<t.length;f++){let d=[];for(let m=0;m<t[f].length;m++){t[f][m]=s(t[f][m]);let g;B(t[f][m])&&B(a)?g=Math.pow(parseFloat(t[f][m]),parseFloat(a)):g=Me.v,d.push(g)}u.push(d)}else for(let f=0;f<t.length;f++){t[f]=s(t[f]);let d;B(t[f])&&B(a)?d=Math.pow(parseFloat(t[f]),parseFloat(a)):d=Me.v,u.push(d)}return u}else if(P(a)=="array"){t=s(t);let u=[];if(P(a[0])=="array")for(let f=0;f<a.length;f++){let d=[];for(let m=0;m<a[f].length;m++){a[f][m]=s(a[f][m]);let g;B(t)&&B(a[f][m])?g=Math.pow(parseFloat(t),parseFloat(a[f][m])):g=Me.v,d.push(g)}u.push(d)}else for(let f=0;f<a.length;f++){a[f]=s(a[f]);let d;B(t)&&B(a[f])?d=Math.pow(parseFloat(t),parseFloat(a[f])):d=Me.v,u.push(d)}return u}else{t=s(t),a=s(a);let u;return B(t)&&B(a)?u=Math.pow(parseFloat(t),parseFloat(a)):u=Me.v,u}}function vc(){let e=arguments[0];e=e.replace("{","").replace("}","").replace(/\"/g,"");let n=[];if(e.indexOf(";")>-1){n=e.split(";");for(let t=0;t<n.length;t++)n[t]=n[t].split(",")}else n=e.split(",");return n}function Tt(e,n,t){let l;return n=="+"?l=(0,zi.default)(e).add(t).value():n=="-"?l=(0,zi.default)(e).subtract(t).value():n=="%"?l=new Function("return "+parseFloat(e)+n+"("+parseFloat(t)+")")():n=="/"?l=(0,zi.default)(e).divide(t).value():n=="*"&&(l=(0,zi.default)(e).multiply(t).value()),l}function ar(e){if(window.luckysheet_getcelldata_cache==null&&(window.luckysheet_getcelldata_cache={}),e in window.luckysheet_getcelldata_cache)return window.luckysheet_getcelldata_cache[e];let n=Et(),t=e.split("!"),l="",a="",o=-1,s=null;if(t.length>1){l=t[0].replace(/''/g,"'"),a=t[1],l.substr(0,1)=="'"&&l.substr(l.length-1,1)=="'"&&(l=l.substring(1,l.length-1));for(let u in n)if(l==n[u].name){o=n[u].index,s=n[u].data;break}o==-1&&(o=0)}else{let u=Z(h.calculateSheetIndex);l=n[u].name,o=n[u].index,s=n[u].data,a=t[0]}if(a.indexOf(":")==-1){let u=parseInt(a.replace(/[^0-9]/g,""))-1,f=hl(a.replace(/[^A-Za-z]/g,""));if(!isNaN(u)&&!isNaN(f)){let d=Si(s,{row:[u,u],column:[f,f]})[0][0];if(p.execFunctionGlobalData!=null){let v=p.execFunctionGlobalData[u+"_"+f+"_"+o];v!=null&&(d=v)}let y={sheetName:l,startCell:a,rowl:1,coll:1,data:d};return window.luckysheet_getcelldata_cache[e]=y,y}else return[]}else{a=a.split(":");let u=[],f=[];if(u[0]=parseInt(a[0].replace(/[^0-9]/g,""))-1,u[1]=parseInt(a[1].replace(/[^0-9]/g,""))-1,isNaN(u[0])&&(u[0]=0),isNaN(u[1])&&(u[1]=s.length-1),u[0]>u[1])return U.info("\u9009\u62E9\u5931\u8D25","\u8F93\u5165\u8303\u56F4\u9519\u8BEF\uFF01"),[];if(f[0]=hl(a[0].replace(/[^A-Za-z]/g,"")),f[1]=hl(a[1].replace(/[^A-Za-z]/g,"")),isNaN(f[0])&&(f[0]=0),isNaN(f[1])&&(f[1]=s[0].length-1),f[0]>f[1])return U.info("\u9009\u62E9\u5931\u8D25","\u8F93\u5165\u8303\u56F4\u9519\u8BEF\uFF01"),[];let d=Si(s,{row:u,column:f});if(p.execFunctionGlobalData!=null)for(let v=u[0];v<=u[1];v++)for(let b=f[0];b<=f[1];b++){let k=p.execFunctionGlobalData[v+"_"+b+"_"+o];k!=null&&(d[v-u[0]][b-f[0]]=k)}let m=u[1]-u[0]+1,g=f[1]-f[0]+1,y={sheetName:l,startCell:a[0],rowl:m,coll:g,data:d};return window.luckysheet_getcelldata_cache[e]=y,y}}function Xa(e){if(typeof e=="object")return e==null?"":Array.isArray(e)?at(e[0])[2]:Array.isArray(e.data)?Me.v:e.data.v===void 0?"":e.data.v;if(p.isCompareOperator(e).flag){if(typeof e=="string"||typeof e=="number")return e}else return at(e)[2];return Me.v}function Wn(){let e=arguments[0];for(let n=0;n<e.length;n++){let t=e[n];typeof t=="object"?t==null?t="":Array.isArray(t)?t=at(t[0])[2]:Array.isArray(t.data)?t=t.data:t.data.v===void 0?t="":t=t.data.v:p.isCompareOperator(t).flag||(t=at(t)[2]),e[n]=t}}function bc(){let e=arguments[0];return e==null||e.length==0?null:e}function kc(e){return e}function wc(){if(!(P(arguments[0])=="object"&&arguments[0].startCell!=null))return p.error.v;var e=arguments[0].startCell,n=D.getFirstValue(arguments[1]);if(H(n))return n;if(!B(n))return p.error.v;n=parseInt(n);var t=D.getFirstValue(arguments[2]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=arguments[0].rowl;if(arguments.length>=4){if(l=D.getFirstValue(arguments[3]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}var a=arguments[0].coll;if(arguments.length==5){if(a=D.getFirstValue(arguments[4]),H(a))return a;if(!B(a))return p.error.v;a=parseInt(a)}if(l<1||a<1)return p.error.r;var o=p.getcellrange(e),s=o.row[0],u=o.column[0];s+=n,u+=t;var f=s+l-1,d=u+a-1;return s<0||f>=h.flowdata.length||u<0||d>=h.flowdata[0].length?p.error.r:xt(h.calculateSheetIndex,{row:[s,f],column:[u,d]})}function xc(e,n,t){let l,a;if(e?(a=n,l=t):(l=n,a=t),l.startCell.indexOf(":")>-1||a.indexOf(":")>-1)return Me.v;if(e)return ar(a+":"+l.startCell);{let o=a,s="";if(a.indexOf("!")>-1){let u=a.split("!");s=u[0]+"!",o=u[1]}return ar(s+l.startCell+":"+o)}}var zi,Oi=Ie(()=>{Li();Ut();ll();Ft();Kt();Al();yc();Nt();ft();Xe();zi=Fl(sa())});function Id(e,n){Ro(vv),Io(yv,null,function(){let t=new Vuex.Store;console.info("chartmix::",chartmix.default),Vue.use(chartmix.default,{store:t});let l=document.getElementsByTagName("body")[0];chartmix.default.initChart(l,h.lang),$(".chartSetting").css({top:"1px",bottom:"1px",position:"absolute",right:"0px",width:"350px",background:"#fff",border:"1px solid #E5E5E5","z-index":1004,"box-shadow":"0px 2px 4px rgba(0,0,0,0.2)","-webkit-box-shadow":"0px 2px 4px rgba(0,0,0,0.2)","-moz-box-shadow":"0px 2px 4px rgba(0,0,0,0.2)","-moz-user-select":"none","-khtml-user-select":"none","-webkit-user-select":"none","-ms-user-select":"none","user-select":"none","padding-left":"30px",display:"none"}),h.createChart=chartmix.default.createChart,h.highlightChart=chartmix.default.highlightChart,h.deleteChart=chartmix.default.deleteChart,h.resizeChart=chartmix.default.resizeChart,h.changeChartRange=chartmix.default.changeChartRange,h.changeChartCellData=chartmix.default.changeChartCellData,h.getChartJson=chartmix.default.getChartJson,h.chart_selection=wv(),h.chartparam.jfrefreshchartall=kv,h.chartparam.changeChartCellData=chartmix.default.changeChartCellData,h.chartparam.renderChart=chartmix.default.renderChart,h.chartparam.getChartJson=chartmix.default.getChartJson,h.chartparam.insertToStore=chartmix.default.insertToStore;for(let a=0;a<e.length;a++)bv(e[a].chart,n);for(let a=0;a<e.length;a++)e[a].status=="1"&&Tc(e[a].index);Ao(h.asyncLoad,"chart")})}function bv(e,n){if(e!=null)for(let t=0;t<e.length;t++){let l=e[t];n&&h.chartparam.insertToStore({chart_id:l.chart_id,chartOptions:l.chartOptions});let a=l.chart_id,o=a+"_c",s='<div id="${id}"class="luckysheet-modal-dialog luckysheet-modal-dialog-chart ${addclass}"tabindex="0"role="dialog"aria-labelledby=":41e"dir="ltr"><div class="luckysheet-modal-dialog-resize"><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-lt"data-type="lt"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-mt"data-type="mt"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-lm"data-type="lm"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-rm"data-type="rm"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-rt"data-type="rt"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-lb"data-type="lb"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-mb"data-type="mb"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-rb"data-type="rb"></div></div><div class="luckysheet-modal-dialog-controll"><span class="luckysheet-modal-controll-btn luckysheet-modal-controll-update"role="button"tabindex="0"aria-label="\u4FEE\u6539\u56FE\u8868"title="\u4FEE\u6539\u56FE\u8868"><i class="fa fa-pencil"aria-hidden="true"></i></span><span class="luckysheet-modal-controll-btn luckysheet-modal-controll-max"role="butluckysheet_chartIns_indexton"tabindex="0"aria-label="\u6700\u5927\u5316"title="\u6700\u5927\u5316"><i class="fa fa-window-maximize"aria-hidden="true"></i></span><span class="luckysheet-modal-controll-btn luckysheet-modal-controll-del"role="button"tabindex="0"aria-label="\u5220\u9664"title="\u5220\u9664"><i class="fa fa-trash"aria-hidden="true"></i></span></div><div class="luckysheet-modal-dialog-content">${content}</div></div>',u=$(gc(s,{id:o,addclass:"luckysheet-data-visualization-chart",title:"\u56FE\u8868\u751F\u6210",content:""})).appendTo($(".luckysheet-cell-main"));Rd(u),$(`#${o}`).children(".luckysheet-modal-dialog-content")[0].id=a;let f=document.getElementById(o),d;d=h.chartparam.getChartJson(l.chart_id),h.chartparam.renderChart({chart_id:l.chart_id,chartOptions:d}),h.currentChart=d,Ka(a),$(`#${a}_c .luckysheet-modal-controll-del`).click(function(b){Ad(a)}),$(`#${a}_c .luckysheet-modal-controll-update`).click(function(b){Fd()}),u.children(".luckysheet-modal-dialog-content").mousedown(function(b){h.chartparam.luckysheetCurrentChartMaxState||Ka(a),b.stopPropagation()}),u.mousedown(function(b){if(!h.chartparam.luckysheetCurrentChartMaxState){Ka(a),Qr(!0),!$(b.target).is(".luckysheet-modal-dialog-controll")&&!$(b.target).is(".luckysheet-modal-controll-btn")&&!$(b.target).is("i")&&(h.chartparam.luckysheetCurrentChartMoveTimeout=setTimeout(function(){h.chartparam.luckysheetCurrentChartMove=!0},100));var k=h.chartparam.luckysheetCurrentChartMoveObj.offset(),w=h.chartparam.luckysheetCurrentChartMoveObj.position();h.chartparam.luckysheetCurrentChartMoveXy=[b.pageX-k.left,b.pageY-k.top,w.left,w.top,$("#luckysheet-scrollbar-x").scrollLeft(),$("#luckysheet-scrollbar-y").scrollTop()],h.chartparam.luckysheetCurrentChartMoveWinH=$("#luckysheet-cell-main")[0].scrollHeight,h.chartparam.luckysheetCurrentChartMoveWinW=$("#luckysheet-cell-main")[0].scrollWidth,!$(b.target).hasClass("luckysheet-mousedown-cancel")&&$(b.target).filter("[class*='sp-palette']").length==0&&$(b.target).filter("[class*='sp-thumb']").length==0&&$(b.target).filter("[class*='sp-']").length==0&&($("#luckysheet-rightclick-menu").hide(),$("#luckysheet-cols-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide(),$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu, #luckysheet-user-menu").hide(),$("body > .luckysheet-filter-menu, body > .luckysheet-filter-submenu, body > .luckysheet-cols-menu").hide()),b.stopPropagation()}}).find(".luckysheet-modal-dialog-resize-item").mousedown(function(b){if(h.chartparam.luckysheetCurrentChartActive){h.chartparam.luckysheetCurrentChartResize=$(this).data("type");var k=nt(b.pageX,b.pageY),w=$("#luckysheet-scrollbar-x").scrollLeft(),x=$("#luckysheet-scrollbar-y").scrollTop(),C=k[0]+w,S=k[1]+x,_=h.chartparam.luckysheetCurrentChartResizeObj.position();h.chartparam.luckysheetCurrentChartResizeXy=[C,S,u.width(),u.height(),_.left+w,_.top+x,w,x],h.chartparam.luckysheetCurrentChartResizeWinH=$("#luckysheet-cell-main")[0].scrollHeight,h.chartparam.luckysheetCurrentChartResizeWinW=$("#luckysheet-cell-main")[0].scrollWidth,h.chartparam.luckysheetCurrentChart=a,b.stopPropagation()}});let m=l.width,g=l.height,y=l.left,v=l.top;f.style.width=m+"px",f.style.height=g+"px",f.style.position="absolute",f.style.background="#fff",f.style.left=y+"px",f.style.top=v+"px",f.style.zIndex=h.zIndex?h.zIndex:15,h.zIndex++}}function kv(e,n,t,l,a){let o=h.currentChart;if(!!o&&o.rangeArray.length==1){var s=o.rangeArray[0].row,u=o.rangeArray[0].column;if(n>s[1]||t<s[0]||l>u[1]||a<u[0])return;var f=p.getcellrange(o.rangeTxt),d=f.sheetIndex==-1?0:f.sheetIndex,m={row:f.row,column:f.column,dataSheetIndex:d},g=ar(o.rangeTxt);if(typeof g=="object"&&g.length!=0&&g.data.length!=null){var y=g.data;h.chartparam.changeChartCellData(o.chart_id,y)}}}function wv(){return{create:function(){var e=h.currentChart;if(e.rangeArray.length>1)return;$("#luckysheet-chart-rangeShow").empty(),$("#luckysheet-cell-selected-boxs").hide(),$("#luckysheet-cell-selected-focus").hide(),$("#luckysheet-rows-h-selected").empty(),$("#luckysheet-cols-h-selected").empty(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide();var n=e.rangeArray[0].row[0],t=e.rangeArray[0].column[0],l=e.rangeSplitArray,a=e.rangeRowCheck;if(a.exits)var o=d("rowtitle",l.rowtitle.row[0]+n,l.rowtitle.row[1]+n,l.rowtitle.column[0]+t,l.rowtitle.column[1]+t);else var o="";var s=e.rangeColCheck;if(s.exits)var u=d("coltitle",l.coltitle.row[0]+n,l.coltitle.row[1]+n,l.coltitle.column[0]+t,l.coltitle.column[1]+t);else var u="";var f=d("content",l.content.row[0]+n,l.content.row[1]+n,l.content.column[0]+t,l.content.column[1]+t);$("#luckysheet-chart-rangeShow").append(o+u+f);function d(m,g,y,v,b){var k=Yi(),w=Xi(),x=k[y],C=g-1==-1?0:k[g-1],S=w[b],_=v-1==-1?0:w[v-1];if(m=="rowtitle")var T="#C65151";if(m=="coltitle")var T="#9667C0";if(m=="content")var T="#4970D1";var A='<div id="luckysheet-chart-rangeShow-'+m+'" style="left: '+_+"px;width: "+(S-_-1)+"px;top: "+C+"px;height: "+(x-C-1)+'px;border: none;margin: 0;position: absolute;z-index: 14;"><div class="luckysheet-chart-rangeShow-move" data-type="top" style="height: 2px;border-top: 2px solid #fff;border-bottom: 2px solid #fff;background: '+T+';position: absolute;left: 0;right: 0;top: -2px;z-index: 18;opacity: 0.9;cursor: move;"></div><div class="luckysheet-chart-rangeShow-move" data-type="right" style="width: 2px;border-left: 2px solid #fff;border-right: 2px solid #fff;background: '+T+';position: absolute;top: 0;bottom: 0;right: -2px;z-index: 18;opacity: 0.9;cursor: move;"></div><div class="luckysheet-chart-rangeShow-move" data-type="bottom" style="height: 2px;border-top: 2px solid #fff;border-bottom: 2px solid #fff;background: '+T+';position: absolute;left: 0;right: 0;bottom: -2px;z-index: 18;opacity: 0.9;cursor: move;"></div><div class="luckysheet-chart-rangeShow-move" data-type="left" style="width: 2px;border-left: 2px solid #fff;border-right: 2px solid #fff;background: '+T+';position: absolute;top: 0;bottom: 0;left: -2px;z-index: 18;opacity: 0.9;cursor: move;"></div><div style="border: 2px solid #85c0fc;background: '+T+';position: absolute;top: 0;right: 0;bottom: 0;left: 0;z-index: 15;opacity: 0.1;"></div><div class="luckysheet-chart-rangeShow-resize" data-type="lt" style="width: 6px;height: 6px;border: 1px solid #fff;background: '+T+';position: absolute;left: -3px;top: -3px;z-index: 19;cursor: se-resize;"></div><div class="luckysheet-chart-rangeShow-resize" data-type="rt" style="width: 6px;height: 6px;border: 1px solid #fff;background: '+T+';position: absolute;right: -3px;top: -3px;z-index: 19;cursor: ne-resize;"></div><div class="luckysheet-chart-rangeShow-resize" data-type="lb" style="width: 6px;height: 6px;border: 1px solid #fff;background: '+T+';position: absolute;left: -3px;bottom: -3px;z-index: 19;cursor: ne-resize;"></div><div class="luckysheet-chart-rangeShow-resize" data-type="rb" style="width: 6px;height: 6px;border: 1px solid #fff;background: '+T+';position: absolute;right: -3px;bottom: -3px;z-index: 19;cursor: se-resize;"></div></div>';return A}},rangeMove:!1,rangeMovexy:null,rangeMoveIndex:null,rangeMoveObj:null,rangeMoveDraging:function(e,n,t){var l=h.currentChart,a=l.rangeArray[0].row[0],o=l.rangeArray[0].column[0],s=l.rangeRowCheck,u=l.rangeColCheck,f=l.rangeSplitArray,d=nt(e.pageX,e.pageY),m=$("#luckysheet-cell-main").scrollLeft(),g=$("#luckysheet-cell-main").scrollTop(),y=d[0]+m,v=d[1]+g,b=$(window).height()+g-n-t,k=$(window).width()+m,w=Sd(v),x=w[2],C=$d(y),S=C[2],_=Yi(),T=Xi(),A=h.chart_selection.rangeMoveObj.attr("id");if(A=="luckysheet-chart-rangeShow-content"){var R=h.chart_selection.rangeMoveIndex[0]-h.chart_selection.rangeMovexy[0]+x;s.exits?(R<a+s.range[1]+1||v<0)&&(R=a+s.range[1]+1):(R<0||v<0)&&(R=0);var I=f.content.row[1]-f.content.row[0]+R;(I>=_.length-1||v>b)&&(R=_.length-1-f.content.row[1]+f.content.row[0],I=_.length-1);var F=h.chart_selection.rangeMoveIndex[1]-h.chart_selection.rangeMovexy[1]+S;u.exits?(F<o+u.range[1]+1||y<0)&&(F=o+u.range[1]+1):(F<0||y<0)&&(F=0);var z=f.content.column[1]-f.content.column[0]+F;(z>=T.length-1||y>k)&&(F=T.length-1-f.content.column[1]+f.content.column[0],z=T.length-1),s.exits&&u.exits?(l.rangeArray=[{row:[a,I],column:[o,z]}],l.rangeSplitArray.range={row:[a,I],column:[o,z]},l.rangeSplitArray.content={row:[R-a,I-a],column:[F-o,z-o]},l.rangeSplitArray.rowtitle={row:l.rangeSplitArray.rowtitle.row,column:[F-o,z-o]},l.rangeSplitArray.coltitle={row:[R-a,I-a],column:l.rangeSplitArray.coltitle.column}):s.exits?(l.rangeArray=[{row:[a,I],column:[F,z]}],l.rangeSplitArray.range={row:[a,I],column:[F,z]},l.rangeSplitArray.content={row:[R-a,I-a],column:l.rangeSplitArray.content.column}):u.exits?(l.rangeArray=[{row:[R,I],column:[o,z]}],l.rangeSplitArray.range={row:[R,I],column:[o,z]},l.rangeSplitArray.content={row:l.rangeSplitArray.content.row,column:[F-o,z-o]}):(l.rangeArray=[{row:[R,I],column:[F,z]}],l.rangeSplitArray.range={row:[R,I],column:[F,z]})}else if(A=="luckysheet-chart-rangeShow-rowtitle"){var F=h.chart_selection.rangeMoveIndex[1]-h.chart_selection.rangeMovexy[1]+S;u.exits?(F<o+u.range[1]+1||y<0)&&(F=o+u.range[1]+1):(F<0||y<0)&&(F=0);var z=f.rowtitle.column[1]-f.rowtitle.column[0]+F;(z>=T.length-1||y>k)&&(F=T.length-1-f.rowtitle.column[1]+f.rowtitle.column[0],z=T.length-1),u.exits?(l.rangeArray=[{row:l.rangeArray[0].row,column:[o,z]}],l.rangeSplitArray.range={row:l.rangeArray[0].row,column:[o,z]},l.rangeSplitArray.rowtitle={row:l.rangeSplitArray.rowtitle.row,column:[F-o,z-o]},l.rangeSplitArray.content={row:l.rangeSplitArray.content.row,column:[F-o,z-o]}):(l.rangeArray=[{row:l.rangeArray[0].row,column:[F,z]}],l.rangeSplitArray.range={row:l.rangeArray[0].row,column:[F,z]})}else if(A=="luckysheet-chart-rangeShow-coltitle"){var R=h.chart_selection.rangeMoveIndex[0]-h.chart_selection.rangeMovexy[0]+x;s.exits?(R<a+s.range[1]+1||v<0)&&(R=a+s.range[1]+1):(R<0||v<0)&&(R=0);var I=f.coltitle.row[1]-f.coltitle.row[0]+R;(I>=_.length-1||v>b)&&(R=_.length-1-f.coltitle.row[1]+f.coltitle.row[0],I=_.length-1),s.exits?(l.rangeArray=[{row:[a,I],column:l.rangeArray[0].column}],l.rangeSplitArray.range={row:[a,I],column:l.rangeArray[0].column},l.rangeSplitArray.coltitle={row:[R-a,I-a],column:l.rangeSplitArray.coltitle.column},l.rangeSplitArray.content={row:[R-a,I-a],column:l.rangeSplitArray.content.column}):(l.rangeArray=[{row:[R,I],column:l.rangeArray[0].column}],l.rangeSplitArray.range={row:[R,I],column:l.rangeArray[0].column})}h.chart_selection.create()},rangeMoveDragged:function(){h.chart_selection.rangeMove=!1;var e=h.currentChart;e.rangeTxt=xt(h.currentSheetIndex,e.rangeArray[0],h.currentSheetIndex),e.chartData=Pt(e.rangeArray[0],h.currentSheetIndex),h.changeChartRange(e.chart_id,e.chartData,e.rangeArray,e.rangeTxt)},rangeResize:!1,rangeResizexy:null,rangeResizeIndex:null,rangeResizeObj:null,rangeResizeDraging:function(e,n,t){var l=h.currentChart,a=l.rangeArray[0].row[0],o=l.rangeArray[0].column[0],s=l.rangeRowCheck,u=l.rangeColCheck,f=l.rangeSplitArray,d=nt(e.pageX,e.pageY),m=$("#luckysheet-cell-main").scrollLeft(),g=$("#luckysheet-cell-main").scrollTop(),y=d[0]+m,v=d[1]+g,b=$(window).height()+g-n-t,k=$(window).width()+m,w=Sd(v),x=w[2],C=$d(y),S=C[2],_=Yi(),T=Xi(),A=h.chart_selection.rangeResizeObj.attr("id");if(A=="luckysheet-chart-rangeShow-content"){var R,I,F,z;if(h.chart_selection.rangeResize=="lt"?(R=h.chart_selection.rangeResizeIndex.row[0],F=h.chart_selection.rangeResizeIndex.column[0],I=h.chart_selection.rangeResizeIndex.row[1],z=h.chart_selection.rangeResizeIndex.column[1]):h.chart_selection.rangeResize=="lb"?(R=h.chart_selection.rangeResizeIndex.row[1],F=h.chart_selection.rangeResizeIndex.column[0],I=h.chart_selection.rangeResizeIndex.row[0],z=h.chart_selection.rangeResizeIndex.column[1]):h.chart_selection.rangeResize=="rt"?(R=h.chart_selection.rangeResizeIndex.row[0],F=h.chart_selection.rangeResizeIndex.column[1],I=h.chart_selection.rangeResizeIndex.row[1],z=h.chart_selection.rangeResizeIndex.column[0]):h.chart_selection.rangeResize=="rb"&&(R=h.chart_selection.rangeResizeIndex.row[1],F=h.chart_selection.rangeResizeIndex.column[1],I=h.chart_selection.rangeResizeIndex.row[0],z=h.chart_selection.rangeResizeIndex.column[0]),s.exits){var M=R-h.chart_selection.rangeResizexy[0]+x;M<a+s.range[1]+1||v<0?M=a+s.range[1]+1:(M>=_.length-1||v>b)&&(M=_.length-1)}else{var M=a-h.chart_selection.rangeResizexy[0]+x;M<0||v<0?M=0:(M>=_.length-1||v>b)&&(M=_.length-1)}if(u.exits){var E=F-h.chart_selection.rangeResizexy[1]+S;E<o+u.range[1]+1||y<0?E=o+u.range[1]+1:(E>=T.length-1||y>k)&&(E=T.length-1)}else{var E=o-h.chart_selection.rangeResizexy[1]+S;E<0||y<0?E=0:(E>=T.length-1||y>k)&&(E=T.length-1)}var N,L,O,V;M>I?(N=I,L=M):(N=M,L=I),E>z?(O=z,V=E):(O=E,V=z),!s.exits&&!u.exits?(l.rangeArray=[{row:[N,L],column:[O,V]}],l.rangeSplitArray.range={row:[N,L],column:[O,V]}):(l.rangeArray=[{row:[a,L],column:[o,V]}],l.rangeSplitArray.range={row:[a,L],column:[o,V]},l.rangeSplitArray.content={row:[N-a,L-a],column:[O-o,V-o]},s.exits&&(l.rangeSplitArray.rowtitle={row:l.rangeSplitArray.rowtitle.row,column:[O-o,V-o]}),u.exits&&(l.rangeSplitArray.coltitle={row:[N-a,L-a],column:l.rangeSplitArray.coltitle.column}))}else if(A=="luckysheet-chart-rangeShow-rowtitle"){var F,z;if(h.chart_selection.rangeResize=="lt"||h.chart_selection.rangeResize=="lb"?(F=h.chart_selection.rangeResizeIndex.column[0],z=h.chart_selection.rangeResizeIndex.column[1]):(h.chart_selection.rangeResize=="rt"||h.chart_selection.rangeResize=="rb")&&(F=h.chart_selection.rangeResizeIndex.column[1],z=h.chart_selection.rangeResizeIndex.column[0]),u.exits){var E=F-h.chart_selection.rangeResizexy[1]+S;E<o+u.range[1]+1||y<0?E=o+u.range[1]+1:(E>=T.length-1||y>k)&&(E=T.length-1)}else{var E=o-h.chart_selection.rangeResizexy[1]+S;E<0||y<0?E=0:(E>=T.length-1||y>k)&&(E=T.length-1)}var O,V;E>z?(O=z,V=E):(O=E,V=z),u.exits?(l.rangeArray=[{row:l.rangeArray[0].row,column:[o,V]}],l.rangeSplitArray.range={row:l.rangeArray[0].row,column:[o,V]},l.rangeSplitArray.rowtitle={row:l.rangeSplitArray.rowtitle.row,column:[O-o,V-o]},l.rangeSplitArray.content={row:l.rangeSplitArray.content.row,column:[O-o,V-o]}):(l.rangeArray=[{row:l.rangeArray[0].row,column:[O,V]}],l.rangeSplitArray.range={row:l.rangeArray[0].row,column:[O,V]})}else if(A=="luckysheet-chart-rangeShow-coltitle"){var R,I;if(h.chart_selection.rangeResize=="lt"||h.chart_selection.rangeResize=="rt"?(R=h.chart_selection.rangeResizeIndex.row[0],I=h.chart_selection.rangeResizeIndex.row[1]):(h.chart_selection.rangeResize=="lb"||h.chart_selection.rangeResize=="rb")&&(R=h.chart_selection.rangeResizeIndex.row[1],I=h.chart_selection.rangeResizeIndex.row[0]),s.exits){var M=R-h.chart_selection.rangeResizexy[0]+x;M<a+s.range[1]+1||v<0?M=a+s.range[1]+1:(M>=_.length-1||v>b)&&(M=_.length-1)}else{var M=a-h.chart_selection.rangeResizexy[0]+x;M<0||v<0?M=0:(M>=_.length-1||v>b)&&(M=_.length-1)}var N,L;M>I?(N=I,L=M):(N=M,L=I),s.exits?(l.rangeArray=[{row:[a,L],column:l.rangeArray[0].column}],l.rangeSplitArray.range={row:[a,L],column:l.rangeArray[0].column},l.rangeSplitArray.coltitle={row:[N-a,L-a],column:l.rangeSplitArray.coltitle.column},l.rangeSplitArray.content={row:[N-a,L-a],column:l.rangeSplitArray.content.column}):(l.rangeArray=[{row:[N,L],column:l.rangeArray[0].column}],l.rangeSplitArray.range={row:[N,L],column:l.rangeArray[0].column})}h.chart_selection.create()},rangeResizeDragged:function(){h.chart_selection.rangeResize=null;var e=h.currentChart;e.rangeTxt=xt(h.currentSheetIndex,e.rangeArray[0],h.currentSheetIndex),e.chartData=Pt(e.rangeArray[0],h.currentSheetIndex),h.changeChartRange(e.chart_id,e.chartData,e.rangeArray,e.rangeTxt)}}}function _c(e,n,t,l){var a=luckysheet.getluckysheet_select_save();a.length==1&&a[0].row[0]==a[0].row[1]&&a[0].column[0]==a[0].column[1]&&(an("right","rangeOfSelect"),an("down","rangeOfSelect"),a=luckysheet.getluckysheet_select_save());for(var o=-1,s=a[0].row[1]-a[0].row[0],u=a[0].row[0];u<=a[0].row[1];u++){for(var f=a[0].column[0];f<=a[0].column[1];f++){var d=ze(u,f,luckysheet.flowdata());if(d!=null&&d.toString().length>0){o=u;break}}if(o!==-1)break}o==-1&&(o=0),a[0].row=[o,o],a[0].row_focus=o,luckysheet.setluckysheet_select_save(a),h.luckysheet_shiftpositon=$.extend(!0,{},a[0]),La("down","range",!1,s),a=luckysheet.getluckysheet_select_save();for(var m=-1,g=a[0].column[1]-a[0].column[0],f=a[0].column[0];f<=a[0].column[1];f++){for(var u=a[0].row[0];u<=a[0].row[1];u++){var d=ze(u,f,luckysheet.flowdata());if(d!=null&&d.toString().length>0){m=f;break}}if(m!==-1)break}m==-1&&(m=0),a[0].column=[m,m],a[0].column_focus=m,luckysheet.setluckysheet_select_save(a),h.luckysheet_shiftpositon=$.extend(!0,{},a[0]),La("right","range",!1,g),a=luckysheet.getluckysheet_select_save();var y=$.extend(!0,[],a),v=xt(h.currentSheetIndex,y[0],h.currentSheetIndex);let b=Pt();console.dir(b);let k=_d("chart"),w=k+"_c",x='<div id="${id}"class="luckysheet-modal-dialog luckysheet-modal-dialog-chart ${addclass}"tabindex="0"role="dialog"aria-labelledby=":41e"dir="ltr"><div class="luckysheet-modal-dialog-resize"><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-lt"data-type="lt"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-mt"data-type="mt"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-lm"data-type="lm"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-rm"data-type="rm"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-rt"data-type="rt"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-lb"data-type="lb"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-mb"data-type="mb"></div><div class="luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-rb"data-type="rb"></div></div><div class="luckysheet-modal-dialog-controll"><span class="luckysheet-modal-controll-btn luckysheet-modal-controll-update"role="button"tabindex="0"aria-label="\u4FEE\u6539\u56FE\u8868"title="\u4FEE\u6539\u56FE\u8868"><i class="fa fa-pencil"aria-hidden="true"></i></span><span class="luckysheet-modal-controll-btn luckysheet-modal-controll-max"role="butluckysheet_chartIns_indexton"tabindex="0"aria-label="\u6700\u5927\u5316"title="\u6700\u5927\u5316"><i class="fa fa-window-maximize"aria-hidden="true"></i></span><span class="luckysheet-modal-controll-btn luckysheet-modal-controll-del"role="button"tabindex="0"aria-label="\u5220\u9664"title="\u5220\u9664"><i class="fa fa-trash"aria-hidden="true"></i></span></div><div class="luckysheet-modal-dialog-content">${content}</div></div>',C=$(gc(x,{id:w,addclass:"luckysheet-data-visualization-chart",title:"\u56FE\u8868\u751F\u6210",content:""})).appendTo($(".luckysheet-cell-main")),S=document.getElementById(w),{render:_,chart_json:T}=h.createChart($(`#${w}`).children(".luckysheet-modal-dialog-content")[0],b,k,y,v);console.dir(JSON.stringify(T)),e=e||400,n=n||250,t=t||0,l=l||0,S.style.width=e+"px",S.style.height=n+"px",S.style.position="absolute",S.style.background="#fff",S.style.left=t+"px",S.style.top=l+"px",_.style.width="100%",_.style.height="100%",S.style.zIndex=h.zIndex?h.zIndex:15,h.zIndex++;let A=h.luckysheetfile[Z(h.currentSheetIndex)];A.chart||(A.chart=[]),A.chart.push({chart_id:k,width:e,height:n,left:t,top:l,sheetIndex:A.index}),Ka(k),$(`#${k}_c .luckysheet-modal-controll-del`).click(function(R){Ad(k)}),Rd(C),$(`#${k}_c .luckysheet-modal-controll-update`).click(function(R){Fd()}),C.children(".luckysheet-modal-dialog-content").mousedown(function(R){h.chartparam.luckysheetCurrentChartMaxState||Ka(k),R.stopPropagation()}),C.mousedown(function(R){if(!h.chartparam.luckysheetCurrentChartMaxState){Ka(k),Qr(!0),!$(R.target).is(".luckysheet-modal-dialog-controll")&&!$(R.target).is(".luckysheet-modal-controll-btn")&&!$(R.target).is("i")&&(h.chartparam.luckysheetCurrentChartMoveTimeout=setTimeout(function(){h.chartparam.luckysheetCurrentChartMove=!0},100));var I=h.chartparam.luckysheetCurrentChartMoveObj.offset(),F=h.chartparam.luckysheetCurrentChartMoveObj.position();h.chartparam.luckysheetCurrentChartMoveXy=[R.pageX-I.left,R.pageY-I.top,F.left,F.top,$("#luckysheet-scrollbar-x").scrollLeft(),$("#luckysheet-scrollbar-y").scrollTop()],h.chartparam.luckysheetCurrentChartMoveWinH=$("#luckysheet-cell-main")[0].scrollHeight,h.chartparam.luckysheetCurrentChartMoveWinW=$("#luckysheet-cell-main")[0].scrollWidth,!$(R.target).hasClass("luckysheet-mousedown-cancel")&&$(R.target).filter("[class*='sp-palette']").length==0&&$(R.target).filter("[class*='sp-thumb']").length==0&&$(R.target).filter("[class*='sp-']").length==0&&($("#luckysheet-rightclick-menu").hide(),$("#luckysheet-cols-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide(),$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu, #luckysheet-user-menu").hide(),$("body > .luckysheet-filter-menu, body > .luckysheet-filter-submenu, body > .luckysheet-cols-menu").hide()),R.stopPropagation()}}).find(".luckysheet-modal-dialog-resize-item").mousedown(function(R){if(h.chartparam.luckysheetCurrentChartActive){h.chartparam.luckysheetCurrentChartResize=$(this).data("type");var I=nt(R.pageX,R.pageY),F=$("#luckysheet-scrollbar-x").scrollLeft(),z=$("#luckysheet-scrollbar-y").scrollTop(),M=I[0]+F,E=I[1]+z,N=h.chartparam.luckysheetCurrentChartResizeObj.position();h.chartparam.luckysheetCurrentChartResizeXy=[M,E,C.width(),C.height(),N.left+F,N.top+z,F,z],h.chartparam.luckysheetCurrentChartResizeWinH=$("#luckysheet-cell-main")[0].scrollHeight,h.chartparam.luckysheetCurrentChartResizeWinW=$("#luckysheet-cell-main")[0].scrollWidth,h.chartparam.luckysheetCurrentChart=k,R.stopPropagation()}})}function Rd(e){e.find(".luckysheet-modal-dialog-content").hover(function(){e.removeClass("chart-moveable")},function(){e.addClass("chart-moveable")}),e.hover(function(){e.addClass("chart-moveable")},function(){e.removeClass("chart-moveable")})}function Ad(e){$(`.luckysheet-cell-main #${e}_c`).remove(),Cc();let n=h.luckysheetfile[Z(h.currentSheetIndex)],t=n.chart.findIndex(l=>l.chart_id==e);n.chart.splice(t,1),h.deleteChart(e)}function Ka(e){let n=h.luckysheetfile[Z(h.currentSheetIndex)].chart;for(let t in n)n[t].needRangeShow=!1,n[t].chart_id==e&&(n[t].needRangeShow=!0,h.currentChart=h.getChartJson(e));Dd(e)}function Cc(){let e=h.luckysheetfile[Z(h.currentSheetIndex)].chart;for(let n in e)e[n].needRangeShow=!1;Md()}function Dd(e){let n=$("#"+e+"_c");h.chart_selection.create(),h.chartparam.luckysheetCurrentChartActive=!0,h.chartparam.luckysheetCurrentChartMoveObj=n,h.chartparam.luckysheetCurrentChartResizeObj=n,h.chartparam.luckysheetCurrentChart=e,$("#luckysheet-cell-main").find(".luckysheet-modal-dialog-chart .luckysheet-modal-dialog-resize").hide(),$("#luckysheet-cell-main").find(".luckysheet-modal-dialog-chart .luckysheet-modal-dialog-controll").hide(),n.css("z-index",h.chartparam.luckysheetCurrentChartZIndexRank++),n.find(".luckysheet-modal-dialog-resize").show(),n.find(".luckysheet-modal-dialog-controll").show(),($(".chartSetting").is(":visible")||h.chartparam.luckysheet_chart_redo_click)&&e!=h.chartparam.luckysheetCurrentChart&&$("body .luckysheet-cols-menu").hide(),h.currentChart=h.highlightChart(e)}function Md(e){$("#luckysheet-cell-main .luckysheet-modal-dialog-chart .luckysheet-modal-dialog-resize, #luckysheet-cell-main .luckysheet-modal-dialog-chart .luckysheet-modal-dialog-controll").hide(),$("#luckysheet-cell-main").find(".luckysheet-datavisual-selection-set div").remove(),h.chartparam.luckysheetCurrentChartActive=!1,$("#luckysheet-chart-rangeShow").empty(),!e&&$(".chartSetting").is(":visible")&&!fe()&&xv()}function Fd(e,n){$(".chartSetting").is(":visible")||($(".chartSetting").show(),$("#luckysheet-cell-main").find(".luckysheet-datavisual-selection-set div").show(),h.chartparam.luckysheetCurrentChartActive=!0,setTimeout(function(){zt()},0))}function xv(e){$(".chartSetting").is(":visible")&&($(".chartSetting").hide(),$("#luckysheet-cell-main .luckysheet-modal-dialog-chart .luckysheet-modal-dialog-resize, #luckysheet-cell-main .luckysheet-modal-dialog-chart .luckysheet-modal-dialog-controll").hide(),$("#luckysheet-cell-main").find(".luckysheet-datavisual-selection-set div").remove(),h.chartparam.luckysheetCurrentChartActive=!1,!fe()&&!e&&setTimeout(function(){zt()},0))}function Tc(e){Md("true"),h.luckysheetfile.forEach(t=>{t.index==e?(t.chart||[]).forEach(a=>{a.isShow=!0,$("#"+a.chart_id+"_c").show(),h.resizeChart(a.chart_id),a.needRangeShow==!0&&(h.currentChart=h.getChartJson(a.chart_id),Dd(a.chart_id))}):(t.chart||[]).forEach(a=>{a.isShow=!1,$("#"+a.chart_id+"_c").hide()})})}var Sd,$d,yv,vv,$o=Ie(()=>{ft();Cd();Kt();Xe();Ut();Oi();Nt();Ol();An();za();Ft();pr();Sd=_t,$d=wt,yv=["https://cdn.jsdelivr.net/npm/vue@2.6.11","https://unpkg.com/vuex@3.4.0","https://cdn.bootcdn.net/ajax/libs/element-ui/2.13.2/index.js","https://cdn.bootcdn.net/ajax/libs/echarts/4.8.0/echarts.min.js","expendPlugins/chart/chartmix.umd.min.js"],vv=["https://cdn.bootcdn.net/ajax/libs/element-ui/2.13.2/theme-chalk/index.css","expendPlugins/chart/chartmix.css"]});function Cn(e){h.flowdata==null||h.flowdata.length==0||(clearTimeout(Ed),Ed=setTimeout(()=>{h.clearjfundo&&h.jfredo.push({type:"zoomChange",zoomRatio:h.zoomRatio,curZoomRatio:e,sheetIndex:h.currentSheetIndex}),Wr=null,h.zoomRatio=e;let n=ve.getSheetByIndex();He.buildAllPs(n.data),Re.images=n.images,Re.allImagesShow(),Re.init(),n.config==null&&(n.config={}),n.config.sheetViewZoom==null&&(n.config.sheetViewZoom={});let t=n.config.curentsheetView;t==null&&(t="viewNormal"),n.config.sheetViewZoom[t+"ZoomScale"]=e,ne.saveParam("all",h.currentSheetIndex,h.zoomRatio,{k:"zoomRatio"}),ne.saveParam("cg",h.currentSheetIndex,n.config.sheetViewZoom,{k:"sheetViewZoom"}),Za()},100))}function Za(){St(h.flowdata.length,h.flowdata[0].length),Zs()}function Nd(){let e=.02,n=.1,t=4,l=.1;$("#luckysheet-zoom-minus").click(function(){let a;h.zoomRatio==null?a=h.zoomRatio=1:a=Math.ceil(h.zoomRatio*10)/10,a=a-n,a==h.zoomRatio&&(a=a-n),a<=l&&(a=l),Cn(a),ir(a)}),$("#luckysheet-zoom-plus").click(function(){let a;h.zoomRatio==null?a=h.zoomRatio=1:a=Math.floor(h.zoomRatio*10)/10,a=a+n,a==h.zoomRatio&&(a=a+n),a>=t&&(a=t),Cn(a),ir(a)}),$("#luckysheet-zoom-slider").mousedown(function(a){let o=$(this).offset().left,s=a.pageX,u=Pd(s-o);Cn(u),ir(u)}),$("#luckysheet-zoom-cursor").mousedown(function(a){let o=a.pageX,s=parseFloat($("#luckysheet-zoom-cursor").css("left"));$("#luckysheet-zoom-cursor").css("transition","none"),$(document).off("mousemove.zoomCursor").on("mousemove.zoomCursor",function(u){let d=u.pageX-o,m=s+d,g=Pd(m);g>t&&(g=t,m=100),g<l&&(g=l,m=0),Cn(g);let y=Math.round(g*100)+"%";$("#luckysheet-zoom-ratioText").html(y),$("#luckysheet-zoom-cursor").css("left",m-4)}),$(document).off("mouseup.zoomCursor").on("mouseup.zoomCursor",function(u){$(document).off(".zoomCursor"),$("#luckysheet-zoom-cursor").css("transition","all 0.3s")}),a.stopPropagation()}).click(function(a){a.stopPropagation()}),$("#luckysheet-zoom-ratioText").click(function(){Cn(1),ir(1)}),ir(h.zoomRatio),Wr=null,document.addEventListener("wheel",function(a){!a.ctrlKey||!a.deltaY||(Wr===null&&(Wr=h.zoomRatio||1),Wr+=a.deltaY<0?e:-e,Wr>=t?Wr=t:Wr<l&&(Wr=l),Cn(Wr),ir(Wr),a.preventDefault(),a.stopPropagation())},{capture:!0,passive:!1}),document.addEventListener("keydown",function(a){if(!a.ctrlKey)return;let o=!1,s=h.zoomRatio||1;a.key==="-"||a.which===189?(s-=n,o=!0):a.key==="+"||a.which===187?(s+=n,o=!0):(a.key==="0"||a.which===48)&&(s=1,o=!0),o&&(a.preventDefault(),s>=t?s=t:s<l&&(s=l),Cn(s),ir(s))},{capture:!0})}function Pd(e){let n=1;return e<50?n=Math.round((e*1.8/100+.1)*100)/100:e>50&&(n=Math.round(((e-50)*6/100+1)*100)/100),n}function _v(e){let n=50;e<1?n=Math.round((e-.1)*100/.18)/10:e>1&&(n=Math.round((e-1)*100/.6)/10+50),$("#luckysheet-zoom-cursor").css("left",n-4)}function ir(e){let n=Math.round(e*100)+"%";$("#luckysheet-zoom-ratioText").html(n),_v(e)}var Ed,Wr,Ja=Ie(()=>{Xe();bt();ft();dl();pr();Yt();Qt();Ur();qr();Ed=null;Wr=null});var Cv,ve,dl=Ie(()=>{Ft();Vr();Kt();$r();xd();ll();Ut();Yt();Ii();Jt();fa();Ft();ft();Gt();Qt();xl();on();pr();Ur();qr();yr();Ua();Vl();kn();Zt();Xe();bt();$o();pr();Ja();il();Ll();Cv={generateRandomSheetIndex:function(e){e==null&&(e="Sheet");let n=window.navigator.userAgent.replace(/[^a-zA-Z0-9]/g,"").split(""),t="";for(let a=0;a<12;a++)t+=n[Math.round(Math.random()*(n.length-1))];let l=new Date().getTime();return e+"_"+t+"_"+l},generateRandomSheetName:function(e,n){let t=e.length,a=Q().pivotTable.title;for(let o=0;o<e.length;o++)if(e[o].name.indexOf("Sheet")>-1||e[o].name.indexOf(a)>-1){let s=parseFloat(e[o].name.replace("Sheet","").replace(a,""));s!="NaN"&&Math.ceil(s)>t&&(t=Math.ceil(s))}return n?a+(t+1):"Sheet"+(t+1)},generateCopySheetName:function(e,n){let l=Q().info,a="("+l.copy,o=n.toString().indexOf(a);~o&&(n=n.toString().substring(0,o));let s="",u=n+a,f=[];for(let m=0;m<e.length;m++){let g=e[m].name.toString();f.push(g);let y=g.indexOf(u);if(y===0){s=s||2;let v=g.indexOf(")",y+u.length),b=g.substring(y+u.length,v);B(b)&&parseInt(b)>=s&&(s=parseInt(b)+1)}}let d;do{let m=a+s+")",g=31-m.length;d=n,d.length>g&&(d=d.slice(0,g-1)+"\u2026"),d=d+m}while(~f.indexOf(d)&&(s=(s||1)+1));return d},getSheetByIndex:function(e){let n=this;e==null&&(e=h.currentSheetIndex);let t=n.getSheetIndex(e);return h.luckysheetfile[t]},getSheetByName:function(e){let n=this;if(e==null)return null;for(let t=0;t<h.luckysheetfile.length;t++){let l=h.luckysheetfile[t];if(l.name==e)return l}return null},getCurSheetnoset:function(){let e=0;for(let n=0;n<h.luckysheetfile.length;n++)if(h.luckysheetfile[n].status==1){e=h.luckysheetfile[n].index;break}return e},getCurSheet:function(){if(h.luckysheetfile.length){let e=!1,n=[];h.luckysheetfile.forEach(t=>{typeof t.index=="undefined"&&(t.index=this.generateRandomSheetIndex()),n.includes(t.index)?t.index=this.generateRandomSheetIndex():n.push(t.index),typeof t.status=="undefined"&&(t.status=0),t.status==1&&(e?t.status=0:e=!0)}),e||(h.luckysheetfile[0].status=1)}h.currentSheetIndex=h.luckysheetfile[0].index;for(let e=0;e<h.luckysheetfile.length;e++)if(h.luckysheetfile[e].status==1){h.currentSheetIndex=h.luckysheetfile[e].index;break}return h.currentSheetIndex},addNewSheet:function(e,n){if(fe()||h.allowEdit===!1||!Je.createHookFunction("sheetCreateBefore"))return;let t=this,l=h.luckysheetfile.length,a=t.generateRandomSheetIndex(),o=t.generateRandomSheetName(h.luckysheetfile,n);$("#luckysheet-sheet-container-c").append(_e(Ql,{index:a,active:"",name:o,style:"",colorset:""}));let s={name:o,color:"",status:"0",order:l,index:a,celldata:[],row:h.defaultrowNum,column:h.defaultcolumnNum,config:{},pivotTable:null,isPivotTable:!!n};if(h.luckysheetfile.push(s),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),$("#luckysheet-sheets-item"+a).addClass("luckysheet-sheets-item-active"),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+a+'" class="luckysheet-datavisual-selection-set"></div>'),rl(e),ne.saveParam("sha",null,$.extend(!0,{},s)),h.clearjfundo){h.jfundo.length=0;let u={};u.type="addSheet",u.sheetconfig=$.extend(!0,{},s),u.index=a,u.currentSheetIndex=h.currentSheetIndex,h.jfredo.push(u)}t.changeSheetExec(a,n,!0)},setSheetHide:function(e,n){let t=this,l=t.getSheetIndex(e);if(!n&&!Je.createHookFunction("sheetHideBefore",{sheet:h.luckysheetfile[l]}))return;h.luckysheetfile[l].hide=1;let a=$("#luckysheet-sheets-item"+e);a.hide(),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active");let o;if(de.showsheetbarConfig.sheet)o=a.nextAll(":visible"),a.nextAll(":visible").length>0?o=o.eq(0).data("index"):o=a.prevAll(":visible").eq(0).data("index");else{let s,u=[];h.luckysheetfile.forEach((d,m)=>{d.hide!==1&&u.push(m)});let f=u.length;f===1?s=u[0]:s=u[f-1]>l?u.find(d=>d>l):u[f-1],o=h.luckysheetfile[s].index}$("#luckysheet-sheets-item"+o).addClass("luckysheet-sheets-item-active"),t.changeSheetExec(o),t.locationSheet(),ne.saveParam("sh",a.data("index"),1,{op:"hide",cur:o}),n||Je.createHookFunction("sheetHideAfter",{sheet:h.luckysheetfile[l]})},setSheetShow:function(e){let n=this,t=h.luckysheetfile[n.getSheetIndex(e)];!Je.createHookFunction("sheetShowBefore",{sheet:t})||(t.hide=0,n.changeSheetExec(e),ne.saveParam("sh",e,0,{op:"show",cur:null}),Je.createHookFunction("sheetShowAfter",{sheet:t}))},sheetMaxIndex:0,ordersheet:function(e){return function(n,t){let l=n[e],a=t[e];return l-a}},getCurrentOrder:function(){let e={};return $("#luckysheet-sheet-area div.luckysheet-sheets-item").each(function(n){let t=$(this).data("index");for(let l=0;l<h.luckysheetfile.length;l++)if(h.luckysheetfile[l].index==t){e[t.toString()]=n;break}}),e},reOrderAllSheet:function(){let e={};$("#luckysheet-sheet-area div.luckysheet-sheets-item").each(function(n){let t=$(this).data("index");for(let l=0;l<h.luckysheetfile.length;l++)if(h.luckysheetfile[l].index==t){h.luckysheetfile[l].order=n,e[t.toString()]=n;break}}),ne.saveParam("shr",null,e),h.luckysheetfile.sort((n,t)=>{let l=n.order,a=t.order;return l!=null&&a!=null?l-a:l!=null?-1:(a!=null,1)})},createSheet:function(){let e=this,n=[];h.luckysheetfile.sort(e.ordersheet("order"));for(let t=0;t<h.luckysheetfile.length;t++){let l="",a=h.luckysheetfile[t].index,o="";h.luckysheetfile[t].color!=null&&(o='<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+h.luckysheetfile[t].color+';"></div>'),h.currentSheetIndex==a?n.push(_e(Ql,{index:a,active:"luckysheet-sheets-item-active",name:h.luckysheetfile[t].name,style:"",colorset:o})):(h.luckysheetfile[t].hide==1?n.push(_e(Ql,{index:a,active:"",name:h.luckysheetfile[t].name,style:"display:none;",colorset:o})):n.push(_e(Ql,{index:a,active:"",name:h.luckysheetfile[t].name,style:"",colorset:o})),l="style='display:none;'"),$("#luckysheet-cell-main").append("<div "+l+' id="luckysheet-datavisual-selection-set-'+a+'" class="luckysheet-datavisual-selection-set"></div>')}$("#luckysheet-sheet-container-c").append(n.join("")),e.locationSheet()},locationSheet:function(){let e=$("#luckysheet-sheet-container-c"),n=$("#"+h.container).width(),t=$("#luckysheet-sheet-container-c > div.luckysheet-sheets-item-active").eq(0),l=0,a=0;$("#luckysheet-sheet-container-c > div.luckysheet-sheets-item:visible").each(function(){$(this).hasClass("luckysheet-sheets-item-active")&&(l=a),a+=$(this).outerWidth()}),setTimeout(function(){e.scrollLeft(l-10),de.showsheetbarConfig.sheet&&(a>=n*.7?($("#luckysheet-sheet-area .luckysheet-sheets-scroll").css("display","inline-block"),$("#luckysheet-sheet-container .docs-sheet-fade-left").show()):($("#luckysheet-sheet-area .luckysheet-sheets-scroll").css("display","none"),$("#luckysheet-sheet-container .docs-sheet-fade-left").hide()))},1)},copySheet:function(e,n){if(fe()||h.allowEdit===!1)return;let t=this,l=h.luckysheetfile.length,a=t.generateRandomSheetIndex(),o=t.getSheetIndex(e),s=$.extend(!0,{},h.luckysheetfile[o]);if(s.order=l,s.index=a,s.name=t.generateCopySheetName(h.luckysheetfile,s.name),!Je.createHookFunction("sheetCopyBefore",{targetSheet:h.luckysheetfile[o],copySheet:s}))return;let u="";s.color!=null&&(u='<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+s.color+';"></div>');let f=$("#luckysheet-sheets-item"+e);if($("#luckysheet-sheet-container-c").append(_e(Ql,{index:s.index,active:"",name:s.name,order:s.order,style:"",colorset:u})),$("#luckysheet-sheets-item"+s.index).insertAfter(f),h.luckysheetfile.splice(o+1,0,s),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),$("#luckysheet-sheets-item"+a).addClass("luckysheet-sheets-item-active"),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+a+'" class="luckysheet-datavisual-selection-set"></div>'),rl(n),ne.saveParam("shc",a,{copyindex:e,name:s.name}),t.changeSheetExec(a,void 0,void 0,!0),t.reOrderAllSheet(),h.clearjfundo)h.jfredo.push({type:"copySheet",copyindex:e,index:s.index,sheetIndex:s.index});else if(h.jfredo.length>0){let d=h.jfredo[h.jfredo.length-1];d.type=="copySheet"&&(d.index=s.index,d.sheetIndex=s.index)}},hasSheet:function(e){return!(e==null||(e=this.getSheetIndex(e),e==null))},createSheetbydata:function(e,n,t=!0){let l=this,a="";if(e.color!=null&&(a='<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+e.color+';"></div>'),$("#luckysheet-sheet-container-c").append(_e(Ql,{index:e.index,active:"",name:e.name,order:e.order,style:"",colorset:a})),t){let o=e.order;o>=h.luckysheetfile.length?(o=h.luckysheetfile.length-1,$("#luckysheet-sheets-item"+e.index).insertAfter($("#luckysheet-sheets-item"+h.luckysheetfile[o].index))):$("#luckysheet-sheets-item"+e.index).insertBefore($("#luckysheet-sheets-item"+h.luckysheetfile[o].index))}h.luckysheetfile.push(e),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),$("#luckysheet-sheets-item"+e.index).addClass("luckysheet-sheets-item-active"),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+e.index+'" class="luckysheet-datavisual-selection-set"></div>'),rl(),n!=null?(ne.saveParam("shre",null,{reIndex:e.index}),e.hide=0,ne.saveParam("sh",e.index,0,{op:"show",cur:null})):ne.saveParam("sha",null,e),l.changeSheetExec(e.index,e.isPivotTable,!0),l.reOrderAllSheet()},deleteSheet:function(e){let n=this;if(h.allowEdit===!1)return;let t=n.getSheetIndex(e),l=h.luckysheetfile[t];if(!Je.createHookFunction("sheetDeleteBefore",{sheet:l}))return;n.setSheetHide(e,!0),$("#luckysheet-sheets-item"+e).remove(),$("#luckysheet-datavisual-selection-set-"+e).remove();let a=h.luckysheetfile.splice(t,1);n.reOrderAllSheet(),ne.saveParam("shd",null,{deleIndex:e}),h.clearjfundo&&(a[0].type="deleteSheet",h.jfredo.push(a[0])),Je.createHookFunction("sheetDeleteAfter",{sheet:l})},nulldata:null,getGridData:function(e){let n=[];for(let t=0;t<e.length;t++)for(let l=0;l<e[0].length;l++)e[t][l]!=null&&n.push({r:t,c:l,v:e[t][l]});return n},buildGridData:function(e){let n=e.row==null?h.defaultrowNum:e.row,t=e.column==null?h.defaultcolumnNum:e.column,l=e.data&&e.data.length>0?e.data:cl([],n,t),a=e.celldata;if(e.data&&e.data.length>0)for(let o=0;o<l.length;o++)for(let s=0;s<l[0].length;s++)Ht(o,s,l,l[o][s]);else if(a&&a.length>0)for(let o=0;o<a.length;o++){let s=a[o],u=s.r,f=s.c,d=s.v;u>=l.length&&(l=cl(l,u-l.length+1,0)),f>=l[0].length&&(l=cl(l,0,f-l[0].length+1)),Ht(u,f,l,d)}return de.autoFormatw=!1,de.accuracy=void 0,l},cutGridData:function(e){let n=0;for(let t=e.length-1;t>=0;t--){let l=!0;for(let a=0;a<e[0].length;a++){let o=ze(t,a);if(o!=null&&$.trim(o).length>0){l=!1;break}}if(l)n=t;else break}return e.slice(0,n)},addGridData:function(e,n,t){let l=cl([],n,t);if(e!=null)for(let a=0;a<e.length;a++){let o=e[a],s=o.r,u=o.c,f=o.v;s>=l.length&&(l=cl(l,s-l.length+1,0)),u>=l[0].length&&(l=cl(l,0,u-l[0].length+1)),Ht(s,u,l,f)}return l},sheetParamRestore:function(e,n){if(h.luckysheet_select_save=e.luckysheet_select_save,(h.luckysheet_select_save==null||h.luckysheet_select_save.length==0)&&(n[0]!=null&&n[0][0]!=null&&n[0][0].mc!=null?h.luckysheet_select_save=[{row:[0,n[0][0].mc.rs-1],column:[0,n[0][0].mc.cs-1]}]:h.luckysheet_select_save=[{row:[0,0],column:[0,0]}]),h.luckysheet_selection_range=e.luckysheet_selection_range==null?[]:e.luckysheet_selection_range,h.config=e.config==null?{}:e.config,h.zoomRatio=e.zoomRatio==null?1:e.zoomRatio,e.defaultRowHeight!=null?h.defaultrowlen=parseFloat(e.defaultRowHeight):h.defaultrowlen=de.defaultRowHeight,e.defaultColWidth!=null?h.defaultcollen=parseFloat(e.defaultColWidth):h.defaultcollen=de.defaultColWidth,e.showGridLines!=null){let t=e.showGridLines;t==0||t==!1?h.showGridLines=!1:h.showGridLines=!0}else h.showGridLines=!0},initialjfFile:function(e,n){let t=this;t.getCurSheet();let l=h.luckysheetfile[t.getSheetIndex(h.currentSheetIndex)];t.nulldata=cl([],h.defaultrowNum,h.defaultcolumnNum);let a=t.buildGridData(l),o=[];l.jfgird_select_save=l.jfgird_select_save||[],l.jfgird_select_save.forEach(m=>o.push({row:m.row,column:m.column})),l.luckysheet_select_save=o,this.sheetParamRestore(l,a);let s=h.luckysheet_select_save[0].row[1],u=h.luckysheet_select_save[0].column[1];if(h.luckysheet_select_save.length>1)for(let m=0;m<h.luckysheet_select_save.length;m++)h.luckysheet_select_save[m].row[1]>s&&(s=h.luckysheet_select_save[m].row[1]),h.luckysheet_select_save[m].column[1]>u&&(u=h.luckysheet_select_save[m].column[1]);ke.fontInitial(h.fontList),l.data=a;let f=a.length;s>f-1&&(f=s+1);let d=a[0].length;u>d-1&&(d=u+1),typeof de.beforeCreateDom=="function"&&de.beforeCreateDom(luckysheet),typeof de.workbookCreateBefore=="function"&&de.workbookCreateBefore(luckysheet),pc(d,f,a,e,n),setTimeout(function(){U.createHoverTip("#luckysheet_info_detail",".luckysheet_info_detail_back, .luckysheet_info_detail_input, .luckysheet_info_detail_update"),U.createHoverTip("#luckysheet-wa-editor",".luckysheet-toolbar-menu-button, .luckysheet-toolbar-button, .luckysheet-toolbar-combo-button"),h.luckysheetTableContentHW=[$("#luckysheet-cell-main").width()+h.rowHeaderWidth-h.cellMainSrollBarSize,$("#luckysheet-cell-main").height()+h.columnHeaderHeight-h.cellMainSrollBarSize],$("#luckysheetTableContent, #luckysheetTableContentF").attr({width:Math.ceil(h.luckysheetTableContentHW[0]*h.devicePixelRatio),height:Math.ceil(h.luckysheetTableContentHW[1]*h.devicePixelRatio)}).css({width:h.luckysheetTableContentHW[0],height:h.luckysheetTableContentHW[1]}).get(0).getContext("2d");let m=Q().info,y=ne.gridKey+"__qkcache",v=function(){l.load="1",t.createSheet();let b=function(){t.mergeCalculation(l.index),t.setSheetParam(!1),t.storeSheetParam(),t.restoreselect(),t.CacheNotLoadControll=[],t.restoreCache(),p.execFunctionGroupForce(de.forceCalculation),t.restoreSheetAll(h.currentSheetIndex),$("#luckysheet_info_detail_save").html(m.detailSave),l.isPivotTable?h.luckysheetcurrentisPivotTable=!0:(h.luckysheetcurrentisPivotTable=!1,$("#luckysheet-modal-dialog-slider-pivot").hide()),Jf(),zt(),l.scrollLeft!=null&&l.scrollLeft>0?$("#luckysheet-scrollbar-x").scrollLeft(l.scrollLeft):$("#luckysheet-scrollbar-x").scrollLeft(0),l.scrollTop!=null&&l.scrollTop>0?$("#luckysheet-scrollbar-y").scrollTop(l.scrollTop):$("#luckysheet-scrollbar-y").scrollTop(0),Ao(h.asyncLoad,"core"),de.pointEdit?setTimeout(function(){h.loadingObj.close()},0):setTimeout(function(){h.loadingObj.close()},500)},k=ne.loadSheetUrl;if(k=="")t.loadOtherFile(l),b();else{let w=t.checkLoadSheetIndex(l),x=[];for(let C=0;C<w.length;C++){let S=w[C];S!=l.index&&x.push(S)}if(x.length===0){b();return}$.post(k,{gridKey:ne.gridKey,index:x.join(",")},function(C){let S=new Function("return "+C)();for(let _ in S){if(_==l.index)continue;let T=h.luckysheetfile[t.getSheetIndex(_)];(T.load==null||T.load=="0")&&(T.celldata=S[_.toString()],T.data=t.buildGridData(T),T.load="1")}b()})}};try{localforage.getItem(y).then(function(b){b!=null&&(t.CacheNotLoadControll=b),ne.clearcachelocaldata(function(){v()})})}catch(b){v(),console.log("\u7F13\u5B58\u64CD\u4F5C\u5931\u8D25")}},1)},storeSheetParam:function(){let e=this.getSheetIndex(h.currentSheetIndex),n=h.luckysheetfile[e];n.config=h.config,n.visibledatarow=h.visibledatarow,n.visibledatacolumn=h.visibledatacolumn,n.ch_width=h.ch_width,n.rh_height=h.rh_height,n.luckysheet_select_save=$.extend(!0,[],h.luckysheet_select_save),n.luckysheet_selection_range=$.extend(!0,[],h.luckysheet_selection_range),$("#luckysheet-scrollbar-x")[0].scrollWidth>$("#luckysheet-scrollbar-x")[0].offsetWidth&&(n.scrollLeft=$("#luckysheet-scrollbar-x").scrollLeft()),$("#luckysheet-scrollbar-y")[0].scrollHeight>$("#luckysheet-scrollbar-y")[0].offsetHeight&&(n.scrollTop=$("#luckysheet-scrollbar-y").scrollTop()),n.zoomRatio=h.zoomRatio},setSheetParam:function(e=!0){let n=this.getSheetIndex(h.currentSheetIndex),t=h.luckysheetfile[n];h.flowdata=t.data,xe.webWorkerFlowDataCache(h.flowdata),p.execFunctionGlobalData=null,window.luckysheet_getcelldata_cache=null,this.sheetParamRestore(t,h.flowdata),t.freezen==null?(Y.freezenhorizontaldata=null,Y.freezenverticaldata=null):(Y.freezenhorizontaldata=t.freezen.horizontal==null?null:t.freezen.horizontal.freezenhorizontaldata,Y.freezenverticaldata=t.freezen.vertical==null?null:t.freezen.vertical.freezenverticaldata),e&&yn(h.flowdata.length,h.flowdata[0].length),He.buildAllPs(h.flowdata),Re.currentImgId=null,Re.images=t.images,Re.allImagesShow(),Re.init(),Ye.dataVerification=t.dataVerification,Ye.init(),Cl.hyperlink=t.hyperlink,Cl.init(),Dl(t.filter_select,t.filter)},restoreselect:function(){let e=this.getSheetIndex(h.currentSheetIndex),n=h.luckysheetfile[e];lt(!0),Ot(),n.scrollLeft!=null&&n.scrollLeft>0?$("#luckysheet-scrollbar-x").scrollLeft(n.scrollLeft):$("#luckysheet-scrollbar-x").scrollLeft(0),n.scrollTop!=null&&n.scrollTop>0?$("#luckysheet-scrollbar-y").scrollTop(n.scrollTop):$("#luckysheet-scrollbar-y").scrollTop(0)},storeSheetParamALL:function(){let e=this;e.storeSheetParam();let n=e.getSheetIndex(h.currentSheetIndex);h.luckysheetfile[n].data=h.flowdata,h.luckysheetfile[n].config=$.extend(!0,{},h.config)},mergeCalculationSheet:{},mergeCalculation:function(e){let n=h.luckysheetfile[this.getSheetIndex(e)],t=n.config,l=n.data;if(t==null)return;let a=t.merge;if(!(a==null||e in this.mergeCalculationSheet||n.autoCalculationMerge===!1)){this.mergeCalculationSheet[e]=1;for(let o in a){let s=parseInt(o.substr(0,o.indexOf("_"))),u=parseInt(o.substr(o.indexOf("_")+1)),f=a[o];l[s][u]==null&&(l[s][u]={}),l[s][u].mc={r:s,c:u,rs:f.rs,cs:f.cs};for(let d=s;d<s+f.rs;d++)for(let m=u;m<u+f.cs;m++)d==s&&m==u||(l[d][m]==null&&(l[d][m]={}),l[d][m].mc={r:s,c:u})}}},loadOtherFile:function(e){let n=this;for(let t=0;t<h.luckysheetfile.length;t++){let l=h.luckysheetfile[t];l.index!=e.index&&(l.load==null||l.load=="0")&&(l.data=n.buildGridData(l),l.load="1")}},changeSheet:function(e,n,t,l){if(fe())return;let a=this;if(e==h.currentSheetIndex)return;ne.allowUpdate&&($("#luckysheet-cell-main #luckysheet-multipleRange-show").empty(),ne.multipleIndex=0);let o=h.luckysheetfile[a.getSheetIndex(e)];if(t&&Je.createHookFunction("sheetCreateAfter",{sheet:o}),l&&Je.createHookFunction("sheetCopyAfter",{sheet:o}),Je.createHookFunction("sheetActivate",e,n,t),$("#luckysheet-filter-selected-sheet"+h.currentSheetIndex+", #luckysheet-filter-options-sheet"+h.currentSheetIndex).hide(),$("#luckysheet-filter-selected-sheet"+e+", #luckysheet-filter-options-sheet"+e).show(),a.storeSheetParamALL(),a.setCurSheet(e),o.isPivotTable?(h.luckysheetcurrentisPivotTable=!0,n||Oe.changePivotTable(e)):(h.luckysheetcurrentisPivotTable=!1,$("#luckysheet-modal-dialog-slider-pivot").hide(),zt(!1)),o.load!=null){let u=a.buildGridData(o);o.data=u,a.mergeCalculation(e),a.setSheetParam(!0),a.showSheet(),setTimeout(function(){p.execFunctionGroup(),Be(),ne.saveParam("shs",null,h.currentSheetIndex)},1)}else{let u=ne.loadSheetUrl;if(u==""||h.luckysheetcurrentisPivotTable||!!t){let f=a.buildGridData(o);o.data=f,o.load="1",a.mergeCalculation(e),a.setSheetParam(),a.showSheet(),setTimeout(function(){a.restoreCache(),p.execFunctionGroupForce(de.forceCalculation),a.restoreSheetAll(h.currentSheetIndex),Be()},1),ne.saveParam("shs",null,h.currentSheetIndex)}else{$("#luckysheet-grid-window-1").append(Er());let f=a.checkLoadSheetIndex(o);$.post(u,{gridKey:ne.gridKey,index:f.join(",")},function(d){let m=new Function("return "+d)();o.celldata=m[e.toString()];let g=a.buildGridData(o);setTimeout(function(){h.loadingObj.close()},500);for(let y in m){if(y==e)continue;let v=h.luckysheetfile[a.getSheetIndex(y)];(v.load==null||v.load=="0")&&(v.celldata=m[y.toString()],v.data=a.buildGridData(v),v.load="1")}o.data=g,o.load="1",a.mergeCalculation(e),a.setSheetParam(),a.showSheet(),setTimeout(function(){a.restoreCache(),p.execFunctionGroupForce(de.forceCalculation),a.restoreSheetAll(h.currentSheetIndex),Be()},1),ne.saveParam("shs",null,h.currentSheetIndex)})}}$("#luckysheet-cell-main .luckysheet-datavisual-selection-set").hide(),$("#luckysheet-datavisual-selection-set-"+e).show(),Tc(e),Y.initialFreezen(e),a.restoreselect()},checkLoadSheetIndexToDataIndex:{},checkLoadSheetIndex:function(e){let n=p.getAllFunctionGroup(),t=e.chart,l=e.pivotTable,a=[],o={};if(e.index in this.checkLoadSheetIndexToDataIndex)return[];if(a.push(e.index),o[e.index.toString()]=1,this.checkLoadSheetIndexToDataIndex[e.index]=1,n!=null){let s={};for(let u=0;u<n.length;u++){let f=n[u],d=f.index,m=zl(f.r,f.c,d);if(m==null){let g=h.luckysheetfile[this.getSheetIndex(d)];if(g.data=this.buildGridData(g),m=zl(f.r,f.c,d),m==null)continue}if(m.indexOf("!")==-1)p.addToSheetIndexList(m,d);else if(p.formulaContainSheetList!=null&&p.formulaContainSheetList[m]!=null)for(let g in p.formulaContainSheetList[m])s[g]=1;else p.functionParser(m,g=>{if(p.addToCellList(m,g),g.indexOf("!")>-1){let y=g.substr(0,g.indexOf("!")),v=this.getSheetByName(y);if(v!=null){let b=v.index;s[b]=1,p.addToSheetIndexList(m,b)}}}),p.formulaContainSheetList[m]==null&&p.addToSheetIndexList(m,d);d!=null}for(let u in s){let f=u;o[f.toString()]==null&&(a.push(f),o[f.toString()]=1,this.checkLoadSheetIndexToDataIndex[f]=1)}}if(t!=null)for(let s=0;s<t.length;s++){let f=t[s].dataSheetIndex;f!=null&&o[f.toString()]==null&&(a.push(f),o[f.toString()]=1)}if(l!=null){let s=l.pivotDataSheetIndex;s!=null&&o[s.toString()]==null&&(a.push(s),o[s.toString()]=1)}return a},showSheet:function(){$("#luckysheet-cell-flow_0").css({width:h.ch_width,top:"-1px"}),$("#luckysheet-sheettable_0").css({width:h.ch_width-1,height:h.rh_height}),$("#luckysheetrowHeader_0").css("height",h.rh_height),$("#luckysheet-cols-h-cells_0").css("width",h.ch_width),$("#luckysheet-scrollbar-x div").width(h.ch_width),$("#luckysheet-scrollbar-y div").height(h.rh_height+h.columnHeaderHeight-h.cellMainSrollBarSize-3);let e=this.getSheetIndex(h.currentSheetIndex),n=h.luckysheetfile[e];h.scrollRefreshSwitch=!1,n.scrollLeft!=null&&n.scrollLeft>0?$("#luckysheet-scrollbar-x").scrollLeft(n.scrollLeft*h.zoomRatio):$("#luckysheet-scrollbar-x").scrollLeft(0),n.scrollTop!=null&&n.scrollTop>0?$("#luckysheet-scrollbar-y").scrollTop(n.scrollTop*h.zoomRatio):$("#luckysheet-scrollbar-y").scrollTop(0),setTimeout(()=>{h.scrollRefreshSwitch=!0},0),ir(h.zoomRatio)},setCurSheet:function(e){for(let n=0;n<h.luckysheetfile.length;n++)h.luckysheetfile[n].index==e?h.luckysheetfile[n].status=1:h.luckysheetfile[n].status=0;h.currentSheetIndex=e},getSheetIndex:function(e){for(let n=0;n<h.luckysheetfile.length;n++)if(h.luckysheetfile[n].index==e)return n;return null},changeSheetExec:function(e,n,t,l){let a=$("#luckysheet-sheets-item"+e);window.luckysheet_getcelldata_cache=null,$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),a.addClass("luckysheet-sheets-item-active").show(),rl(),this.changeSheet(e,n,t,l),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(),p.rangestart&&p.createRangeHightlight(),this.sheetBarShowAndHide(e)},sheetArrowShowAndHide(){let e=$("#luckysheet-sheet-container-c");if(!!e.length){var n=e[0].scrollWidth,t=Math.ceil(e.width());n>t?de.showsheetbarConfig.sheet&&($("#luckysheet-sheet-area .luckysheet-sheets-scroll").css("display","inline-block"),$("#luckysheet-sheet-container .docs-sheet-fade-left").show()):($("#luckysheet-sheet-area .luckysheet-sheets-scroll").css("display","none"),$("#luckysheet-sheet-container .docs-sheet-fade-left").hide())}},sheetBarShowAndHide(e){let n=$("#luckysheet-sheet-container-c");if(e!=null){let o=$("#luckysheet-sheets-item"+e);n.scrollLeft(o.offset().left)}let t=n.width(),l=n[0].scrollWidth,a=n.scrollLeft();a<=0?$("#luckysheet-sheet-container .docs-sheet-fade-left").hide():$("#luckysheet-sheet-container .docs-sheet-fade-left").show(),t+a>=l?$("#luckysheet-sheet-container .docs-sheet-fade-right").hide():$("#luckysheet-sheet-container .docs-sheet-fade-right").show()},delChart:function(e,n){let t=this.getSheetIndex(n),l=h.luckysheetfile[t];if(l.chart==null)l.chart=[];else for(let a=0;a<l.chart.length;a++)if(l.chart[a].chart_id==e){h.luckysheetfile[t].chart.splice(a,1);break}},saveChart:function(e){let n=this.getSheetIndex(e.sheetIndex),t=h.luckysheetfile[n];if(t.chart==null)t.chart=[],t.chart.push(e);else{for(let l=0;l<t.chart.length;l++)if(t.chart[l].chart_id==e.chart_id){let a=$.extend(!0,{},t.chart[l]);t.chart[l]=$.extend(!0,{},a,e);return}t.chart.push(e)}},getChart:function(e,n){let t=this.getSheetIndex(e),l=h.luckysheetfile[t];if(l.chart==null)return null;for(let a=0;a<l.chart.length;a++)if(l.chart[a].chart_id==n)return l.chart[a];return null},getRangetxt:function(e,n,t){let l="";t==null&&(t=h.currentSheetIndex),e!=t&&(l=h.luckysheetfile[this.getSheetIndex(e)].name+"!");let a=n.row[0],o=n.row[1],s=n.column[0],u=n.column[1];return a==null&&o==null?l+tt(s)+":"+tt(u):s==null&&u==null?l+(a+1)+":"+(o+1):s==u&&a==o?l+tt(s)+(a+1):l+tt(s)+(a+1)+":"+tt(u)+(o+1)},getSheetName:function(e){return e==null&&(e=h.currentSheetIndex),h.luckysheetfile[this.getSheetIndex(e)].name},getSheetMerge:function(){return h.config.merge==null?null:h.config.merge},getSheetData:function(e){return e==null&&(e=h.currentSheetIndex),h.luckysheetfile[this.getSheetIndex(e)].data},getSheetConfig:function(e){let n=this;return e==null&&(e=h.currentSheetIndex),h.luckysheetfile[n.getSheetIndex(e)].config==null&&(h.luckysheetfile[n.getSheetIndex(e)].config={}),h.luckysheetfile[n.getSheetIndex(e)].config},restoreFilter:function(e){let n=this.getSheetIndex(e),t=h.luckysheetfile[n];if(P(t.filter_select)=="string"&&(t.filter_select=JSON.parse(t.filter_select)),t.filter_select==null||t.filter_select.row==null||t.filter_select.column==null)return;Dl(t.filter_select),P(t.filter)!="object"&&t.filter!=null&&P(t.filter)=="string"&&(t.filter=JSON.parse(t.filter));let l={};t.config!=null&&t.config.rowhidden!=null&&(l=t.config.rowhidden),$("#luckysheet-filter-options-sheet"+e+" .luckysheet-filter-options").each(function(a){if(t.filter==null)return!1;let o=$(this),s=t.filter[a];if(s==null)return!0;P(s)!="object"&&(s=JSON.parse(s)),Vn(o,s.optionstate,s.rowhidden,s.caljs,!1,s.st_r,s.ed_r,s.cindex,s.st_c,s.ed_c),l=$.extend(!0,l,s.rowhidden)}),t.config==null&&(t.config={}),t.config.rowhidden=l,h.config=t.config,St(h.flowdata.length,h.flowdata[0].length,!1)},restorePivot:function(e){let n=this.getSheetIndex(e);!h.luckysheetfile[n].isPivotTable||(Oe.getCellData(e),Oe.initialPivotManage(!0),Oe.refreshPivotTable(!1))},restoreSheetAll:function(e){let n=this;n.restorePivot(e),n.restoreFilter(e),n.restoreFreezen(e)},restoreFreezen:function(e){Y.initialFreezen(e)},restoreCache:function(){let e=this,n=e.CacheNotLoadControll;if(e.CacheNotLoadControll=[],n.length!=0)for(let t=0;t<n.length;t++){let l=n[t];e.execCache(l)}},CacheNotLoadControll:[],execCache:function(e){let n=this,t=e.t,l=e.i,a=e.v,o=h.luckysheetfile[n.getSheetIndex(l)];if(t=="sha")h.luckysheetfile.push(a);else if(t=="shc"){let s=$.extend(!0,{},h.luckysheetfile[n.getSheetIndex(a.copyindex)]);s.index=l,h.luckysheetfile.push(s)}else if(t=="shd")h.luckysheetfile.splice(a.deleIndex,1);else if(t=="shr")for(let s in a)h.luckysheetfile[n.getSheetIndex(s)].order=a[s];if((o==null||o.load!="1")&&!(t in{sha:0,shc:0,shd:0,shr:0})){n.CacheNotLoadControll.push(e);return}if(t=="v"){let s=e.r,u=e.c,f=e.v,d=n.getSheetData(l);o.data[s][u]=f}else if(t=="fc"){let s=e.op,u=e.pos;P(a)!="object"&&(a=new Function("return "+a)());let f=a.r,d=a.c;s=="del"?p.delFunctionGroup(f,d,l):p.insertUpdateFunctionGroup(f,d,l)}else if(t=="cg"){let s=a,u=e.k,f=n.getSheetConfig(l);u in f||(f[u]={});for(let d in s)f[u][d]=s[d];h.config=f}else if(t=="f"){let s=a,u=e.op,f=e.pos,d=o.filter;d==null&&(d={}),u=="upOrAdd"?d[f]=s:u=="del"&&delete d[f]}else if(t=="fsc")o.filter=null,o.filter_select=null;else if(t=="fsr"){let s=a;o.filter=s.filter,o.filter_select=s.filter_select}else if(t=="sh"){let s=e.op,u=e.cur,f=a;if(s=="hide")o.status=0,h.luckysheetfile[n.getSheetIndex(u)].status=1;else if(s=="show"){for(let d=0;d<h.luckysheetfile.length;d++)h.luckysheetfile[d].status=0;o.status=1}}else if(t=="all"){let s=e.k;e.s&&P(a)!="object"?o[s]=JSON.stringify(a):o[s]=a}else if(t=="c"){let s=e.op,u=e.cid;if(s=="add")o.chart.push(a);else if(s=="xy"||s=="wh"||s=="update"){for(let f=0;f<o.chart.length;f++)if(o.chart[f].chart_id==u){for(let d in o.chart[f])for(let m in a)d==m&&(o.chart[f][d]=a[m]);return}}else if(s=="del"){for(let f=0;f<o.chart.length;f++)if(o.chart[f].chart_id==u){o.chart.splice(f,1);return}}}else if(t=="drc"){let s=e.rc,u=a.index,f=a.len,d=o.celldata;if(s=="r"){for(let b=0;d.length==0;b++){let k=d[b];k.r>=u&&k.r<u+f?delete d[b]:k.r>=u+f&&(k.r-=f)}o.row-=f}else{for(let b=0;d.length==0;b++){let k=d[b];k.c>=u&&k.c<u+f?delete d[b]:k.c>=u+f&&(k.c-=f)}o.column-=f}let m=[];for(let b=0;b<d.length;b++)d[b]!=null&&m.push(d[b]);o.celldata=m;let g,y,v;s=="r"?g="row":g="column",y=u,v=u+f-1,qn(g,y,v,!0)}else if(t=="arc"){let s=e.rc,u=a.index,f=a.len,d=o.celldata;if(s=="r"){for(let g=0;g<d.length;g++){let y=d[g];y.r>u&&(y.r+=f)}o.row+=f}else{for(let g=0;g<d.length;g++){let y=d[g];y.c>u&&(y.c+=f)}o.column+=f}let m;s=="r"?m="row":m="column",Ir(m,u,f,!0)}else t=="na"?ne.saveParam("na",null,a):t=="thumb"&&setTimeout(function(){n.imageRequest()},2e3)}},ve=Cv});var Tv,p,Ut=Ie(()=>{ft();Nt();An();Gt();dl();il();Qt();Vl();Ml();yr();Zt();Ft();Or();mr();Kt();$r();Al();Jt();ll();Ol();pn();Yt();gn();Oi();Xe();bt();Ba();Ll();Tv={error:{v:"#VALUE!",n:"#NAME?",na:"#N/A",r:"#REF!",d:"#DIV/0!",nm:"#NUM!",nl:"#NULL!",sp:"#SPILL!"},errorInfo:function(e){return e},errorParamCheck:function(e,n,t){let l,a,s=Q().formulaMore;return t<e.length?(l=e[t].type,a=e[t].require):(l=e[e.length-1].type,a=e[e.length-1].require),a=="o"&&(n==null||n=="")?[!0,s.tipSuccessText]:l.indexOf("all")>-1?[!0,s.tipSuccessText]:l.indexOf("range")>-1&&(P(n)=="object"||P(n)=="array")?[!0,s.tipSuccessText]:l.indexOf("number")>-1&&(B(n)||P(n)=="boolean")?[!0,s.tipSuccessText]:l.indexOf("string")>-1&&P(n)=="string"?[!0,s.tipSuccessText]:l.indexOf("date")>-1&&Lt(n)?[!0,s.tipSuccessText]:[!1,s.tipParamErrorText]},getPureValueByData:function(e){if(e.length==0)return[];let n=[];if(P(e)=="array")if(P(e[0])=="array")for(let t=0;t<e.length;t++){let l=[];for(let a=0;a<e[0].length;a++){let o=e[t][a];P(o)=="object"?l.push(o.v):l.push(o)}n.push(l)}else for(let t=0;t<e.length;t++){let l=e[t];P(l)=="object"?n.push(l.v):n.push(l)}else{let t=e;P(t)=="object"?n.push(t.v):n.push(t)}return n},readCellDataToOneArray:function(e){let n=this;if(e==null)return[];if(P(e)!="object")return[e];let t=[],l=[];if(e!=null&&e.data!=null)l=e.data;else return e!=null&&!me(e.v)?[e.v]:[];if(P(l)=="array")l=n.getPureValueByData(l);else{if(P(l)=="object")return l=l.v,[l];/\{.*?\}/.test(l)&&(l=l.replace(/\{/g,"[").replace(/\}/g,"]")),l=new Function("return "+l)()}if(P(l[0])=="array")for(let a=0;a<l.length;a++)t=t.concat(l[a]);else t=l;return t},getValueByFuncData:function(e,n){if(e==null)return null;let t=this;return P(e)=="array"?n=="avg"?luckysheet_function.AVERAGE.f.apply(luckysheet_function.AVERAGE,e):n=="sum"?luckysheet_function.SUM.f.apply(luckysheet_function.SUM,e):P(e[0])=="object"?luckysheet.mask.getValueByFormat(e[0]):e[0]:P(e)=="object"?luckysheet.mask.getValueByFormat(e):e},sparklinesColorMap:function(e,n){let t=this,l=null;n==null&&(n=5);let a=0;if(e.length>n)for(let o=n;o<e.length;o++){let s=e[o],u=t.readCellDataToOneArray(s);for(let f=0;f<u.length;f++){let d=u[f];if(d.indexOf(":")>-1){l||(l={});let m=d.split(":");m.length==2?l[m[0]]=m[1]:m.length>1&&(l[m[0]+":"+m[1]]=m[2])}else l||(l=[]),l.push(d)}a++}return l},colorList:["#2ec7c9","#fc5c5c","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],classlist:{province:{11:"\u5317\u4EAC",12:"\u5929\u6D25",13:"\u6CB3\u5317",14:"\u5C71\u897F",15:"\u5185\u8499\u53E4",21:"\u8FBD\u5B81",22:"\u5409\u6797",23:"\u9ED1\u9F99\u6C5F",31:"\u4E0A\u6D77",32:"\u6C5F\u82CF",33:"\u6D59\u6C5F",34:"\u5B89\u5FBD",35:"\u798F\u5EFA",36:"\u6C5F\u897F",37:"\u5C71\u4E1C",41:"\u6CB3\u5357",42:"\u6E56\u5317",43:"\u6E56\u5357",44:"\u5E7F\u4E1C",45:"\u5E7F\u897F",46:"\u6D77\u5357",50:"\u91CD\u5E86",51:"\u56DB\u5DDD",52:"\u8D35\u5DDE",53:"\u4E91\u5357",54:"\u897F\u85CF",61:"\u9655\u897F",62:"\u7518\u8083",63:"\u9752\u6D77",64:"\u5B81\u590F",65:"\u65B0\u7586",71:"\u53F0\u6E7E",81:"\u9999\u6E2F",82:"\u6FB3\u95E8",91:"\u56FD\u5916"}},oldvalue:null,dontupdate:function(){let e=this;h.luckysheetCellUpdate.length=0,$("#luckysheet-functionbox-cell, #luckysheet-rich-text-editor").html(e.oldvalue),e.cancelNormalSelected(),e.rangetosheet!=h.currentSheetIndex&&ve.changeSheetExec(e.rangetosheet)},xssDeal:function(e){return typeof e!="string"?e:e.replace(/<script>/g,"<script>").replace(/<\/script>/,"</script>")},ltGtSignDeal:function(e){return typeof e!="string"||e.substr(0,5)==="<span"||e.startsWith("=")?e:e.replace(/</g,"<").replace(/>/g,">")},fucntionboxshow:function(e,n){if(!xo(e,n,h.currentSheetIndex)){$("#luckysheet-functionbox-cell").html("");return}let t=this,l=h.flowdata,a="";if(l[e]!=null&&l[e][n]!=null){let o=$.extend(!0,{},l[e][n]);_l(o)?a=Hf(e,n):o.f!=null?a=ze(e,n,l,"f"):a=bn(e,n,l)}a=this.xssDeal(a),t.oldvalue=a,$("#luckysheet-functionbox-cell").html(a)},cellOffset:function(e,n,t,l,a){let o=e.startCell,s=e.rowl,u=e.coll,f=parseInt(o.replace(/[^0-9]/g,"")),d=hl(o.replace(/[^A-Za-z]/g,"")),m=[],g=[],y;m[0]=f+n,g[0]=d+t,m[1]=m[0]+l-1,g[1]=g[0]+a-1,g[0]=tt(g[0]),g[1]=tt(g[1]);let v=g[0]+m[0],b=g[1]+m[1];return v==b?y=e.sheetName+"!"+v:y=e.sheetName+"!"+v+":"+b,y},parseDatetoNum:function(e){let n=this;if(typeof e=="object"&&typeof e.v=="number")e=e.v;else if(tr(e)=="num")e=parseFloat(e);else if(tr(e)=="date")e=at(e)[2];else return n.error.v;return e},getRangeArray:function(e){let n=[],t="General";if(e.length==1)for(let l=0;l<e[0].length;l++)if(e[0][l]!=null&&e[0][l].v){n.push(e[0][l].v);let a=e[0][l].ct.fa;t=t=="General"?a:t}else n.push(null);else if(e[0].length==1)for(let l=0;l<e.length;l++)if(e[l][0]!=null&&e[l][0].v){n.push(e[l][0].v);let a=e[l][0].ct.fa;t=t=="General"?a:t}else n.push(null);else for(let l=0;l<e.length;l++)for(let a=0;a<e[l].length;a++)if(e[l][a]!=null&&e[l][a].v){n.push(e[l][a].v);let o=e[l][a].ct.fa;t=t=="General"?o:t}else n.push(null);return e=n,[e,t]},getRangeArrayTwo:function(e){let n=$.extend(!0,[],e);if(n.length==1)for(let t=0;t<n[0].length;t++)n[0][t]instanceof Object&&(n[0][t]!=null&&n[0][t]instanceof Object&&!!n[0][t].m?n[0][t]=n[0][t].m:n[0][t]!=null&&n[0][t]instanceof Object&&!!n[0][t].v?n[0][t]=n[0][t].v:n[0][t]=null);else if(n[0].length==1)for(let t=0;t<n.length;t++)n[t][0]instanceof Object&&(n[t][0]!=null&&n[t][0]instanceof Object&&!!n[t][0].m?n[t][0]=n[t][0].m:n[t][0]!=null&&n[t][0]instanceof Object&&!!n[t][0].v?n[t][0]=n[t][0].v:n[t][0]=null);else for(let t=0;t<n.length;t++)for(let l=0;l<n[t].length;l++)n[t][l]instanceof Object&&(n[t][l]!=null&&n[t][l]instanceof Object&&!!n[t][l].m?n[t][l]=n[t][l].m:n[t][l]!=null&&n[t][l]instanceof Object&&!!n[t][l].v?n[t][l]=n[t][l].v:n[t][l]=null);return n},isWildcard:function(e,n){let t=this;e=e.toString(),n=n.toString(),t.isCompareOperator(n).flag&&(n=t.isCompareOperator(n).num);let l="";for(let o=0;o<n.length;o++){let s=n.charAt(o);s=="*"?l+=".*":s=="?"?l+=".":s=="~"?n.charAt(o+1)=="*"?(l+="\\*",o++):n.charAt(o+1)=="?"?(l+="\\?",o++):l+="~":l+=s}let a=new RegExp("^"+l+"$","g");return!!e.match(a)},isCompareOperator:function(e){e=e.toString();let n="",t="",l=e.substr(0,1),a=e.substr(1,1),o=!1,s;return l==">"?a=="="?(n=e.substr(0,2),t=e.substr(2),o=!0):a!="="&&(n=e.substr(0,1),t=e.substr(1),o=!0):l=="<"?a=="="||a==">"?(n=e.substr(0,2),t=e.substr(2),o=!0):a!="="&&a!=">"&&(n=e.substr(0,1),t=e.substr(1),o=!0):l=="="&&a!="="&&(n=e.substr(0,1),t=e.substr(1),o=!0),s={flag:o,ope:n,num:t},s},acompareb:function(e,n){let t=this,l=!1;if(B(n))l=Ya(e,"==",n);else if(typeof n=="string"){if(n.indexOf("*")!=-1||n.indexOf("?")!=-1)return t.isWildcard(e,n);if(t.isCompareOperator(n).flag){let a=t.isCompareOperator(n).ope,o=t.isCompareOperator(n).num;l=Ya(e,a,o)}else l=Ya(e,"==",n)}return l},compareParams:function(e,n,t){let l=!1,a=toString.call(e),o=toString.call(n);if((t==">"&&e>n||t==">="&&e>=n||t=="<"&&e<n||t=="<="&&e<=n||t=="="&&e==n||t=="<>"&&e!=n)&&(l=!0),a=="[object Object]"&&o=="[object Object]"){let s=Object.getOwnPropertyNames(e),u=Object.getOwnPropertyNames(n);if(s.length!=u.length)return!1;for(let f=0;f<s.length;f++){let d=s[f];if(e[d]!==n[d])return!1}return!0}return a=="[object Array]"&&o=="[object Array]"?e.toString()==n.toString():l},parseDecimal:function(e){e=parseFloat(e);let n=parseInt(e,10);return n==0||(e=e%n),e},getcellrange:function(e,n){if(e==null||e.length==0)return;let t="",l="",a=null,o=null,s=Et();if(e.indexOf("!")>-1){if(e in this.cellTextToIndexList)return this.cellTextToIndexList[e];let u=e.split("!");t=u[0],l=u[1],t=t.replace(/\\'/g,"'").replace(/''/g,"'"),t.substr(0,1)=="'"&&t.substr(t.length-1,1)=="'"&&(t=t.substring(1,t.length-1));for(let f in s)if(t==s[f].name){a=s[f].index,o=s[f].data;break}}else{let u=n;if(u==null&&(u=h.currentSheetIndex),e+"_"+u in this.cellTextToIndexList)return this.cellTextToIndexList[e+"_"+u];let f=Z(u);t=s[f].name,a=s[f].index,o=h.flowdata,l=e}if(l.indexOf(":")==-1){let u=parseInt(l.replace(/[^0-9]/g,""))-1,f=hl(l.replace(/[^A-Za-z]/g,""));if(!isNaN(u)&&!isNaN(f)){let d={row:[u,u],column:[f,f],sheetIndex:a};return this.addToCellIndexList(e,d),d}else return null}else{l=l.split(":");let u=[],f=[];if(u[0]=parseInt(l[0].replace(/[^0-9]/g,""))-1,u[1]=parseInt(l[1].replace(/[^0-9]/g,""))-1,isNaN(u[0])&&(u[0]=0),isNaN(u[1])&&(u[1]=o.length-1),u[0]>u[1]||(f[0]=hl(l[0].replace(/[^A-Za-z]/g,"")),f[1]=hl(l[1].replace(/[^A-Za-z]/g,"")),isNaN(f[0])&&(f[0]=0),isNaN(f[1])&&(f[1]=o[0].length-1),f[0]>f[1]))return null;let d={row:u,column:f,sheetIndex:a};return this.addToCellIndexList(e,d),d}},rangeHightlightHTML:'<div id="luckysheet-formula-functionrange-highlight-${id}" rangeindex="${id}" class="luckysheet-selection-highlight luckysheet-formula-functionrange-highlight"><div data-type="top" class="luckysheet-selection-copy-top luckysheet-copy"></div><div data-type="right" class="luckysheet-selection-copy-right luckysheet-copy"></div><div data-type="bottom" class="luckysheet-selection-copy-bottom luckysheet-copy"></div><div data-type="left" class="luckysheet-selection-copy-left luckysheet-copy"></div><div class="luckysheet-selection-copy-hc"></div><div data-type="lt" class="luckysheet-selection-highlight-topleft luckysheet-highlight"></div><div data-type="rt" class="luckysheet-selection-highlight-topright luckysheet-highlight"></div><div data-type="lb" class="luckysheet-selection-highlight-bottomleft luckysheet-highlight"></div><div data-type="rb" class="luckysheet-selection-highlight-bottomright luckysheet-highlight"></div></div>',createRangeHightlight:function(){let e=this,n=$("#luckysheet-rich-text-editor").find("span.luckysheet-formula-functionrange-cell");$("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove(),n.each(function(){let t=$(this).attr("rangeindex"),l=$(this).text();$("#luckysheet-formula-functionrange").append(_e(e.rangeHightlightHTML,{id:t}));let a=e.getcellrange(l),o="luckysheet-formula-functionrange-highlight-"+t;a==null||(a.sheetIndex==h.currentSheetIndex||a.sheetIndex==-1&&e.rangetosheet==h.currentSheetIndex)&&($("#"+o).data("range",a).find(".luckysheet-copy").css({background:Yl[t]}).end().find(".luckysheet-highlight").css({background:Yl[t]}).end().find(".luckysheet-selection-copy-hc").css({background:Yl[t]}),Ld(o,a.row[0],a.row[1],a.column[0],a.column[1]))}),$("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").show()},searchHTML:'<div id="luckysheet-formula-search-c" class="luckysheet-formula-search-c"></div>',helpHTML:'<div id="luckysheet-formula-help-c" class="luckysheet-formula-help-c"> <div class="luckysheet-formula-help-close" title="${helpClose}"><i class="fa fa-times" aria-hidden="true"></i></div> <div class="luckysheet-formula-help-collapse" title="${helpCollapse}"><i class="fa fa-angle-up" aria-hidden="true"></i></div> <div class="luckysheet-formula-help-title"><div class="luckysheet-formula-help-title-formula"> <span class="luckysheet-arguments-help-function-name">SUM</span> <span class="luckysheet-arguments-paren">(</span> <span class="luckysheet-arguments-parameter-holder"> <span class="luckysheet-arguments-help-parameter luckysheet-arguments-help-parameter-active" dir="auto">A2:A100</span>, <span class="luckysheet-arguments-help-parameter" dir="auto">101</span> </span> <span class="luckysheet-arguments-paren">)</span> </div></div> <div class="luckysheet-formula-help-content"> <div class="luckysheet-formula-help-content-example"> <div class="luckysheet-arguments-help-section-title">${helpExample}</div> <div class="luckysheet-arguments-help-formula"> <span class="luckysheet-arguments-help-function-name">SUM</span> <span class="luckysheet-arguments-paren">(</span> <span class="luckysheet-arguments-parameter-holder"> <span class="luckysheet-arguments-help-parameter luckysheet-arguments-help-parameter-active" dir="auto">A2:A100</span>, <span class="luckysheet-arguments-help-parameter" dir="auto">101</span> </span> <span class="luckysheet-arguments-paren">)</span> </div> </div> <div class="luckysheet-formula-help-content-detail"> <div class="luckysheet-arguments-help-section"> <div class="luckysheet-arguments-help-section-title luckysheet-arguments-help-parameter-name">${helpAbstract}</div> <span class="luckysheet-arguments-help-parameter-content">${helpAbstract}</span> </div> </div> <div class="luckysheet-formula-help-content-param"> ${param} </div> </div> <div class="luckysheet-formula-help-foot"></div></div>',getrangeseleciton:function(){let e=window.getSelection(),n=$(e.anchorNode),t=e.anchorOffset;if(n.parent().is("span")&&t!=0){let l=$.trim(n.text()),a="";if(l.length==0&&n.parent().prev().length>0){let o=n.parent().prev();return l=$.trim(o.text()),a=l.substr(l.length-1,1),o}else return a=l.substr(t-1,1),n.parent()}else if(n.is("#luckysheet-rich-text-editor")||n.is("#luckysheet-functionbox-cell")){let l=$.trim(n.find("span").last().text());if(l.length==0&&n.find("span").length>1){let a=n.find("span");return l=$.trim(a.eq(a.length-2).text()),a}else return n.find("span").last()}else if((n.parent().is("#luckysheet-rich-text-editor")||n.parent().is("#luckysheet-functionbox-cell")||t==0)&&(t==0&&(n=n.parent()),n.prev().length>0)){let l=$.trim(n.prev().text()),a=l.substr(l.length-1,1);return n.prev()}return null},searchFunctionPosition:function(e,n,t,l,a){let o=$(window).height(),s=$(window).width(),u=e.outerWidth(),f=e.outerHeight();a==null&&(a=!1);let d=t;t+u>s?d=t-u+n.outerWidth():d=t;let m=l;l+f>o?m=l-f:(m=l+n.outerHeight(),a||e.html(e.find(".luckysheet-formula-search-item").get().reverse())),m<0&&(m=0),d<0&&(d=0),e.css({top:m,left:d}).show()},searchFunctionCell:null,searchFunction:function(e){let n=this,t=h.functionlist,l=n.getrangeseleciton();if(n.searchFunctionCell=l,l==null||e==null)return;let a=e.text(),o=l.text().toUpperCase();if(!/^[a-zA-Z]|[a-zA-Z_]+$/.test(o)||a.substr(0,1)!="=")return;let u={f:[],s:[],t:[]},f=0;for(let v=0;v<t.length;v++){let b=t[v],k=b.n;if(k==o?(u.f.unshift(b),f++):k.substr(0,o.length)==o?(u.s.unshift(b),f++):k.indexOf(o)>-1&&(u.t.unshift(b),f++),f>=10)break}let d=u.t.concat(u.s.concat(u.f));if(d.length<=0)return;let m=n.searchFunctionHTML(d);$("#luckysheet-formula-search-c").html(m).show(),$("#luckysheet-formula-help-c").hide();let g=e.parent(),y=g.offset();n.searchFunctionPosition($("#luckysheet-formula-search-c"),g,y.left,y.top)},searchFunctionEnter:function(e){let n=this,t=e.data("func");n.searchFunctionCell.text(t).after('<span dir="auto" class="luckysheet-formula-text-color">(</span>'),n.setCaretPosition(n.searchFunctionCell.next().get(0),0,1),$("#luckysheet-formula-search-c").hide(),n.helpFunctionExe(n.searchFunctionCell.closest("div"),n.searchFunctionCell.next())},searchFunctionHTML:function(e){let n=this;$("#luckysheet-formula-search-c").length==0&&($("body").append(n.searchHTML),$("#luckysheet-formula-search-c").on("mouseover",".luckysheet-formula-search-item",function(){$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"),$(this).addClass("luckysheet-formula-search-item-active")}).on("mouseout",".luckysheet-formula-search-item",function(){}).on("click",".luckysheet-formula-search-item",function(){n.searchFunctionCell!=null&&n.searchFunctionEnter($(this))}));let t='<div data-func="${n}" class="luckysheet-formula-search-item ${class}"><div class="luckysheet-formula-search-func">${n}</div><div class="luckysheet-formula-search-detail">${a}</div></div>',l="";for(let a=0;a<e.length;a++){let o=e[a];a==e.length-1?l+=_e(t,{class:"luckysheet-formula-search-item-active",n:o.n,a:o.a}):l+=_e(t,{class:"",n:o.n,a:o.a})}return l},functionlistPosition:{},helpFunction:function(e,n,t){let l=this,o=h.functionlist[l.functionlistPosition[$.trim(n).toUpperCase()]];if(o==null)return;let u=Q().formulaMore;$("#luckysheet-formula-help-c .luckysheet-arguments-help-function-name").html(o.n),$("#luckysheet-formula-help-c .luckysheet-arguments-help-parameter-content").html(o.d);let f='<span class="luckysheet-arguments-help-function-name">${name}</span> <span class="luckysheet-arguments-paren">(</span> <span class="luckysheet-arguments-parameter-holder"> ${param} </span> <span class="luckysheet-arguments-paren">)</span>',d='<span class="luckysheet-arguments-help-parameter" dir="auto">${param}</span>',m='<div class="luckysheet-arguments-help-section"><div class="luckysheet-arguments-help-section-title">${param}</div><span class="luckysheet-arguments-help-parameter-content">${content}</span></div>',g="",y="",v="";for(let w=0;w<o.p.length;w++){let x=o.p[w],C=x.name,S=x.name;x.repeat=="y"&&(C+=", ...",S+='<span class="luckysheet-arguments-help-argument-info">...-'+u.allowRepeatText+"</span>"),x.require=="o"&&(C="["+C+"]",S+='<span class="luckysheet-arguments-help-argument-info">-['+u.allowOptionText+"]</span>"),g+='<span class="luckysheet-arguments-help-parameter" dir="auto">'+C+"</span>, ",y+='<span class="luckysheet-arguments-help-parameter" dir="auto">'+x.example+"</span>, ",v+=_e(m,{param:S,content:x.detail})}if(g=g.substr(0,g.length-2),y=y.substr(0,y.length-2),$("#luckysheet-formula-help-c .luckysheet-formula-help-title .luckysheet-arguments-parameter-holder").html(g),$("#luckysheet-formula-help-c .luckysheet-arguments-help-formula .luckysheet-arguments-parameter-holder").html(y),$("#luckysheet-formula-help-c .luckysheet-formula-help-content-param").html(v),t==null)$("#luckysheet-formula-help-c .luckysheet-formula-help-title-formula .luckysheet-arguments-help-function-name").css("font-weight","bold");else{$("#luckysheet-formula-help-c .luckysheet-formula-help-title-formula .luckysheet-arguments-help-function-name").css("font-weight","normal");let w=t>=o.p.length?o.p.length-1:t;$("#luckysheet-formula-help-c .luckysheet-formula-help-title .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").removeClass("luckysheet-arguments-help-parameter-active"),$("#luckysheet-formula-help-c .luckysheet-formula-help-title .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").eq(w).addClass("luckysheet-arguments-help-parameter-active"),$("#luckysheet-formula-help-c .luckysheet-arguments-help-formula .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").removeClass("luckysheet-arguments-help-parameter-active"),$("#luckysheet-formula-help-c .luckysheet-arguments-help-formula .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").eq(w).addClass("luckysheet-arguments-help-parameter-active"),$("#luckysheet-formula-help-c .luckysheet-formula-help-content-param .luckysheet-arguments-help-section").removeClass("luckysheet-arguments-help-parameter-active"),$("#luckysheet-formula-help-c .luckysheet-formula-help-content-param .luckysheet-arguments-help-section").eq(w).addClass("luckysheet-arguments-help-parameter-active")}let b=e.parent(),k=b.offset();l.searchFunctionPosition($("#luckysheet-formula-help-c"),b,k.left,k.top,!0)},helpFunctionExe:function(e,n){let t=this,l=h.functionlist,o=Q().formulaMore;if($("#luckysheet-formula-help-c").length==0){$("body").after(_e(t.helpHTML,{helpClose:o.helpClose,helpCollapse:o.helpCollapse,helpExample:o.helpExample,helpAbstract:o.helpAbstract})),$("#luckysheet-formula-help-c .luckysheet-formula-help-close").click(function(){$("#luckysheet-formula-help-c").hide()}),$("#luckysheet-formula-help-c .luckysheet-formula-help-collapse").click(function(){let v=$("#luckysheet-formula-help-c .luckysheet-formula-help-content");v.slideToggle(100,function(){let b=t.rangeResizeTo.parent(),k=b.offset();t.searchFunctionPosition($("#luckysheet-formula-help-c"),b,k.left,k.top,!0)}),v.is(":hidden")?$(this).html('<i class="fa fa-angle-up" aria-hidden="true"></i>'):$(this).html('<i class="fa fa-angle-down" aria-hidden="true"></i>')});for(let v=0;v<l.length;v++)t.functionlistPosition[l[v].n]=v}if(!n)return;let s=n,u=e.length,f=e.find("span"),d=n.index(),m=d;if(s==null)return;let g=null,y=null;if(f.eq(m).is(".luckysheet-formula-text-func"))g=f.eq(m).text();else{let v=null,b=[-1,-1];for(;--m>0;)if(v=f.eq(m),v.is(".luckysheet-formula-text-func")||$.trim(v.text()).toUpperCase()in t.functionlistPosition){g=v.text(),y=null;let k=!0;for(let w=m;w<=d;w++)if(y||(y=0),!(w>=b[0]&&w<=b[1])){if(v=f.eq(w),v.is(".luckysheet-formula-text-rpar")){b=[m,w],g=null,k=!1;break}v.is(".luckysheet-formula-text-comma")&&y++}if(k)break}}g!=null&&t.helpFunction(e,g,y)},rangeHightlightselected:function(e,n){let t=this,l=t.getrangeseleciton();if($("#luckysheet-formula-search-c, #luckysheet-formula-help-c").hide(),$("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight .luckysheet-selection-copy-hc").css("opacity","0.03"),$("#luckysheet-formula-search-c, #luckysheet-formula-help-c").hide(),t.helpFunctionExe(e,l),$(l).closest(".luckysheet-formula-functionrange-cell").length==0){t.searchFunction(e);return}let o=$(l).closest(".luckysheet-formula-functionrange-cell").attr("rangeindex"),s="luckysheet-formula-functionrange-highlight-"+o;$("#"+s).find(".luckysheet-selection-copy-hc").css({opacity:"0.13"})},updatecell:function(e,n,t,l=!0){let a=this,o=$("#luckysheet-rich-text-editor"),s=o.text(),u=o.html();if(a.rangetosheet!=null&&a.rangetosheet!=h.currentSheetIndex&&ve.changeSheetExec(a.rangetosheet),!wn(e,n,h.currentSheetIndex))return;if(Ye.dataVerification!=null){let _=Ye.dataVerification[e+"_"+n];if(_!=null&&_.prohibitInput&&!Ye.validateCellData(s,_)){let T=Ye.getFailureText(_);U.info(T,""),a.cancelNormalSelected();return}}let f=h.flowdata[e][n],d=JSON.stringify(f),m=_l(f),g=s.slice(0,1)!="="&&u.substr(0,5)=="<span",y=!1;if(!g&&s&&s.length>0){let _=s.replace(/\r\n/g,"_x000D_").replace(/ /g,"_x000D_").replace(/\r/g,"_x000D_").replace(/\n/g,"_x000D_").split("_x000D_");_.length>1&&(y=!0,g=!0,s=_.join(`\r |
| | | `))}if(!t&&!g&&m?(delete f.ct.s,f.ct.t="g",f.ct.fa="General",t=""):g&&(P(f)!="object"&&(f={}),delete f.f,delete f.v,delete f.m,f.ct==null&&(f.ct={},f.ct.fa="General"),f.ct.t="inlineStr",f.ct.s=Lf(o.find("span")),y&&(f.ct.s=[{v:s}])),t=t||o.text(),!Je.createHookFunction("cellUpdateBefore",e,n,t,l)){a.cancelNormalSelected();return}if(!g){if(me(t)&&!m){if(f==null||me(f.v)&&f.spl==null&&f.f==null){a.cancelNormalSelected();return}}else if(f!=null&&f.qp!=1){if(P(f)=="object"&&(t==f.f||t==f.v||t==f.m)){a.cancelNormalSelected();return}else if(t==f){a.cancelNormalSelected();return}}P(t)=="string"&&t.slice(0,1)=="="&&t.length>1||P(f)=="object"&&f.ct!=null&&f.ct.fa!=null&&f.ct.fa!="@"&&!me(t)&&(delete f.m,f.f!=null&&(delete f.f,delete f.spl))}window.luckysheet_getcelldata_cache=null;let v=!0,b=xe.deepCopyFlowData(h.flowdata),k=null;if(P(f)=="object"){if(!g)if(P(t)=="string"&&t.slice(0,1)=="="&&t.length>1){let _=a.execfunction(t,e,n,void 0,!0);if(v=!1,f=$.extend(!0,{},b[e][n]),f.v=_[1],f.f=_[2],_.length==4&&_[3].type=="sparklines"){delete f.m,delete f.v;let T=_[3].data;P(T)=="array"&&P(T[0])!="object"?f.v=T[0]:f.spl=_[3].data}else _.length==4&&_[3].type=="dynamicArrayItem"&&(k=_[3].data)}else if(P(t)=="object"){let _=t.f;if(P(_)=="string"&&_.slice(0,1)=="="&&_.length>1){let T=a.execfunction(_,e,n,void 0,!0);if(v=!1,f=$.extend(!0,{},b[e][n]),f.v=T[1],f.f=T[2],T.length==4&&T[3].type=="sparklines"){delete f.m,delete f.v;let A=T[3].data;P(A)=="array"&&P(A[0])!="object"?f.v=A[0]:f.spl=T[3].data}else T.length==4&&T[3].type=="dynamicArrayItem"&&(k=T[3].data)}else for(let T in t)f[T]=t[T]}else a.delFunctionGroup(e,n),a.execFunctionGroup(e,n,t),v=!1,f=$.extend(!0,{},b[e][n]),f.v=t,delete f.f,delete f.spl,f.qp==1&&(""+t).substr(0,1)!="'"&&(f.qp=0,f.ct!=null&&(f.ct.fa="General",f.ct.t="n"));t=f}else if(P(t)=="string"&&t.slice(0,1)=="="&&t.length>1){let _=a.execfunction(t,e,n,void 0,!0);if(v=!1,t={v:_[1],f:_[2]},_.length==4&&_[3].type=="sparklines"){let T=_[3].data;P(T)=="array"&&P(T[0])!="object"?t.v=T[0]:t.spl=_[3].data}else _.length==4&&_[3].type=="dynamicArrayItem"&&(k=_[3].data)}else if(P(t)=="object"){let _=t.f;if(P(_)=="string"&&_.slice(0,1)=="="&&_.length>1){let T=a.execfunction(_,e,n,void 0,!0);if(v=!1,t.v=T[1],t.f=T[2],T.length==4&&T[3].type=="sparklines"){let A=T[3].data;P(A)=="array"&&P(A[0])!="object"?t.v=A[0]:t.spl=T[3].data}else T.length==4&&T[3].type=="dynamicArrayItem"&&(k=T[3].data)}else{let T=f;t.v==null&&(t.v=T)}}else a.delFunctionGroup(e,n),a.execFunctionGroup(e,n,t),v=!1;Ht(e,n,b,t),a.cancelNormalSelected();let w=!1,x=$.extend(!0,{},Et()[Z(h.currentSheetIndex)].config);if(x.rowlen==null&&(x.rowlen={}),b[e][n].tb=="2"&&b[e][n].v!=null||_l(b[e][n])&&typeof b[e][n].mc=="undefined"){let _=h.defaultrowlen,T=$("#luckysheetTableContent").get(0).getContext("2d");if(!(x.customHeight&&x.customHeight[e]==1)){let A=At(n)[1]-At(n)[0]-2,R=Sr(b[e][n],T,{r:e,c:n,cellWidth:A}),I=_;R!=null&&(I=R.textHeightAll+2),I>_&&(x.rowlen[e]=I,w=!0)}}let C=null;k&&(C=$.extend(!0,[],this.insertUpdateDynamicArray(k)));let S={dynamicArray:C};if(w&&(S={cfg:x,dynamicArray:C,RowlChange:w}),setTimeout(()=>{Je.createHookFunction("cellUpdated",e,n,JSON.parse(d),h.flowdata[e][n],l)},0),l)Ze(b,[{row:[e,e],column:[n,n]}],S,v),a.execFunctionGlobalData=null;else return{data:b,allParam:S}},cancelNormalSelected:function(){let e=this;e.canceFunctionrangeSelected(),$("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove(),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-input-box-index").hide(),$("#luckysheet-wa-functionbox-cancel, #luckysheet-wa-functionbox-confirm").removeClass("luckysheet-wa-calculate-active"),e.rangestart=!1,e.rangedrag_column_start=!1,e.rangedrag_row_start=!1},canceFunctionrangeSelected:function(){$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-row-count-show, #luckysheet-column-count-show").hide(),$("#luckysheet-formula-search-c, #luckysheet-formula-help-c").hide()},iscellformat:function(e){let n=/[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][123456789]/},iscelldata:function(e){let n=e.split("!"),t;n.length>1?t=n[1]:t=n[0];let l=/^(([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+))$/g,a=/^(((([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+)))|((([a-zA-Z]+)|([$][a-zA-Z]+))))$/g;if(t.indexOf(":")==-1){let o=parseInt(t.replace(/[^0-9]/g,""))-1,s=hl(t.replace(/[^A-Za-z]/g,""));return!isNaN(o)&&!isNaN(s)&&t.toString().match(l)?!0:(isNaN(o)&&isNaN(s),!1)}else{a=/^(((([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+)))|((([a-zA-Z]+)|([$][a-zA-Z]+)))|((([0-9]+)|([$][0-9]+s))))$/g,t=t.split(":");let o=[],s=[];return o[0]=parseInt(t[0].replace(/[^0-9]/g,""))-1,o[1]=parseInt(t[1].replace(/[^0-9]/g,""))-1,o[0]>o[1]||(s[0]=hl(t[0].replace(/[^A-Za-z]/g,"")),s[1]=hl(t[1].replace(/[^A-Za-z]/g,"")),s[0]>s[1])?!1:!!(t[0].toString().match(a)&&t[1].toString().match(a))}},operator:"==|!=|<>|<=|>=|=|+|-|>|<|/|*|%|&|^",operatorjson:null,functionCopy:function(e,n,t){let l=this;if(l.operatorjson==null){let m=l.operator.split("|"),g={};for(let y=0;y<m.length;y++)g[m[y].toString()]=1;l.operatorjson=g}n==null&&(n="down"),t==null&&(t=1),e.substr(0,1)=="="&&(e=e.substr(1));let a=e.split(""),o=0,s="",u="",f=!0,d={bracket:0,comma:0,squote:0,dquote:0};for(;o<a.length;){let m=a[o];if(m=="("&&d.dquote==0)d.bracket+=1,s.length>0?u+=s+"(":u+="(",s="";else if(m==")"&&d.dquote==0)d.bracket-=1,u+=l.functionCopy(s,n,t)+")",s="";else if(m=='"'&&d.squote==0)d.dquote>0?(u+=s+'"',d.dquote-=1,s=""):(d.dquote+=1,s+='"');else if(m==","&&d.dquote==0)u+=l.functionCopy(s,n,t)+",",s="";else if(m=="&"&&d.dquote==0)s.length>0?(u+=l.functionCopy(s,n,t)+"&",s=""):u+="&";else if(m in l.operatorjson&&d.dquote==0){let g="";o+1<a.length&&(g=a[o+1]);let y=o-1,v=null;if(y>=0)do v=a[y--];while(y>=0&&v==" ");m+g in l.operatorjson?(s.length>0?(u+=l.functionCopy(s,n,t)+m+g,s=""):u+=m+g,o++):!/[^0-9]/.test(g)&&m=="-"&&(v=="("||v==null||v==","||v==" "||v in l.operatorjson)?s+=m:s.length>0?(u+=l.functionCopy(s,n,t)+m,s=""):u+=m}else s+=m;o==a.length-1&&(l.iscelldata($.trim(s))?n=="down"?u+=l.downparam($.trim(s),t):n=="up"?u+=l.upparam($.trim(s),t):n=="left"?u+=l.leftparam($.trim(s),t):n=="right"&&(u+=l.rightparam($.trim(s),t)):u+=$.trim(s)),o++}return u},isfreezonFuc:function(e){let n=e.replace(/[^0-9]/g,""),t=e.replace(/[^A-Za-z]/g,""),l=e.substr(e.indexOf(n)-1,1),a=e.substr(e.indexOf(t)-1,1),o=[!1,!1];return l=="$"&&(o[0]=!0),a=="$"&&(o[1]=!0),o},setfreezonFuceExe:function(e){let n=parseInt(e.replace(/[^0-9]/g,"")),t=hl(e.replace(/[^A-Za-z]/g,"")),l="$",a="$";return!isNaN(n)&&!isNaN(t)?a+tt(t)+l+n:isNaN(n)?isNaN(t)?e:a+tt(t):l+n},setfreezonFuc:function(e){let n=this,t=n.getrangeseleciton();if(!n.iscelldata(t.text()))return;let l=t.text(),a=window.getSelection().anchorOffset,o=l.split("!"),s,u="";o.length>1?(s=o[1],u=o[0]+"!"):s=o[0];let f="",d="",m=s.indexOf(":");if(m==-1)f=u+n.setfreezonFuceExe(s),d=f.length;else if(s=s.split(":"),a>m){let g=u+s[0]+":"+n.setfreezonFuceExe(s[1]);f=g,d=g.length}else{let g=u+n.setfreezonFuceExe(s[0]);f=g+":"+s[1],d=g.length}t.text(u+f),n.setCaretPosition(t.get(0),0,d)},updateparam:function(e,n,t){let l=this,a=n.split("!"),o,s="";if(a.length>1?(o=a[1],s=a[0]+"!"):o=a[0],o.indexOf(":")==-1){let u=parseInt(o.replace(/[^0-9]/g,"")),f=hl(o.replace(/[^A-Za-z]/g,"")),d=l.isfreezonFuc(o),m=d[0]?"$":"",g=d[1]?"$":"";return e=="u"&&!d[0]?u-=t:e=="r"&&!d[1]?f+=t:e=="l"&&!d[1]?f-=t:e=="d"&&!d[0]&&(u+=t),u[0]<0||f[0]<0?l.error.r:!isNaN(u)&&!isNaN(f)?s+g+tt(f)+m+u:isNaN(u)?isNaN(f)?n:s+g+tt(f):s+m+u}else{o=o.split(":");let u=[],f=[];if(u[0]=parseInt(o[0].replace(/[^0-9]/g,"")),u[1]=parseInt(o[1].replace(/[^0-9]/g,"")),u[0]>u[1]||(f[0]=hl(o[0].replace(/[^A-Za-z]/g,"")),f[1]=hl(o[1].replace(/[^A-Za-z]/g,"")),f[0]>f[1]))return n;let d=l.isfreezonFuc(o[0]),m=l.isfreezonFuc(o[1]),g=d[0]?"$":"",y=d[1]?"$":"",v=m[0]?"$":"",b=m[1]?"$":"";return e=="u"?(d[0]||(u[0]-=t),m[0]||(u[1]-=t)):e=="r"?(d[1]||(f[0]+=t),m[1]||(f[1]+=t)):e=="l"?(d[1]||(f[0]-=t),m[1]||(f[1]-=t)):e=="d"&&(d[0]||(u[0]+=t),m[0]||(u[1]+=t)),u[0]<0||f[0]<0?l.error.r:isNaN(f[0])&&isNaN(f[1])?s+g+u[0]+":"+v+u[1]:isNaN(u[0])&&isNaN(u[1])?s+y+tt(f[0])+":"+b+tt(f[1]):s+y+tt(f[0])+g+u[0]+":"+b+tt(f[1])+v+u[1]}},downparam:function(e,n){return this.updateparam("d",e,n)},upparam:function(e,n){return this.updateparam("u",e,n)},leftparam:function(e,n){return this.updateparam("l",e,n)},rightparam:function(e,n){return this.updateparam("r",e,n)},functionStrChange:function(e,n,t,l,a,o){let s=this;if(s.operatorjson==null){let v=s.operator.split("|"),b={};for(let k=0;k<v.length;k++)b[v[k].toString()]=1;s.operatorjson=b}typeof e!="string"&&(console.warn("txt",e),e+=""),e.substr(0,1)=="="&&(e=e.substr(1));let u=e.split(""),f=0,d="",m="",g=!0,y={bracket:0,comma:0,squote:0,dquote:0};for(;f<u.length;){let v=u[f];if(v=="("&&y.dquote==0)y.bracket+=1,d.length>0?m+=d+"(":m+="(",d="";else if(v==")"&&y.dquote==0)y.bracket-=1,m+=s.functionStrChange(d,n,t,l,a,o)+")",d="";else if(v=='"'&&y.squote==0)y.dquote>0?(m+=d+'"',y.dquote-=1,d=""):(y.dquote+=1,d+='"');else if(v==","&&y.dquote==0)m+=s.functionStrChange(d,n,t,l,a,o)+",",d="";else if(v=="&"&&y.dquote==0)d.length>0?(m+=s.functionStrChange(d,n,t,l,a,o)+"&",d=""):m+="&";else if(v in s.operatorjson&&y.dquote==0){let b="";f+1<u.length&&(b=u[f+1]);let k=f-1,w=null;if(k>=0)do w=u[k--];while(k>=0&&w==" ");v+b in s.operatorjson?(d.length>0?(m+=s.functionStrChange(d,n,t,l,a,o)+v+b,d=""):m+=v+b,f++):!/[^0-9]/.test(b)&&v=="-"&&(w=="("||w==null||w==","||w==" "||w in s.operatorjson)?d+=v:d.length>0?(m+=s.functionStrChange(d,n,t,l,a,o)+v,d=""):m+=v}else d+=v;f==u.length-1&&(s.iscelldata($.trim(d))?m+=s.functionStrChange_range($.trim(d),n,t,l,a,o):m+=$.trim(d)),f++}return m},functionStrChange_range:function(e,n,t,l,a,o){let s=this,u=e.split("!"),f,d="";u.length>1?(f=u[1],d=u[0]+"!"):f=u[0];let m,g,y,v,b,k,w,x;if(f.indexOf(":")==-1){m=g=parseInt(f.replace(/[^0-9]/g,""))-1,y=v=hl(f.replace(/[^A-Za-z]/g,""));let C=s.isfreezonFuc(f);b=k=C[0]?"$":"",w=x=C[1]?"$":""}else{if(f=f.split(":"),m=parseInt(f[0].replace(/[^0-9]/g,""))-1,g=parseInt(f[1].replace(/[^0-9]/g,""))-1,m>g||(y=hl(f[0].replace(/[^A-Za-z]/g,"")),v=hl(f[1].replace(/[^A-Za-z]/g,"")),y>v))return e;let C=s.isfreezonFuc(f[0]);b=C[0]?"$":"",w=C[1]?"$":"";let S=s.isfreezonFuc(f[1]);k=S[0]?"$":"",x=S[1]?"$":""}if(n=="del"){if(t=="row"){if(m>=a&&g<=a+o-1)return s.error.r;m>a+o-1?m-=o:m>=a&&(m=a),g>a+o-1?g-=o:g>=a&&(g=a-1),m<0&&(m=0),g<m&&(g=m)}else if(t=="col"){if(y>=a&&v<=a+o-1)return s.error.r;y>a+o-1?y-=o:y>=a&&(y=a),v>a+o-1?v-=o:v>=a&&(v=a-1),y<0&&(y=0),v<y&&(v=y)}return m==g&&y==v?!isNaN(m)&&!isNaN(y)?d+w+tt(y)+b+(m+1):isNaN(m)?isNaN(y)?e:d+w+tt(y):d+b+(m+1):isNaN(y)&&isNaN(v)?d+b+(m+1)+":"+k+(g+1):isNaN(m)&&isNaN(g)?d+w+tt(y)+":"+x+tt(v):d+w+tt(y)+b+(m+1)+":"+x+tt(v)+k+(g+1)}else if(n=="add")return t=="row"?l=="lefttop"?(m>=a&&(m+=o),g>=a&&(g+=o)):l=="rightbottom"&&(m>a&&(m+=o),g>a&&(g+=o)):t=="col"&&(l=="lefttop"?(y>=a&&(y+=o),v>=a&&(v+=o)):l=="rightbottom"&&(y>a&&(y+=o),v>a&&(v+=o))),m==g&&y==v?!isNaN(m)&&!isNaN(y)?d+w+tt(y)+b+(m+1):isNaN(m)?isNaN(y)?e:d+w+tt(y):d+b+(m+1):isNaN(y)&&isNaN(v)?d+b+(m+1)+":"+k+(g+1):isNaN(m)&&isNaN(g)?d+w+tt(y)+":"+x+tt(v):d+w+tt(y)+b+(m+1)+":"+x+tt(v)+k+(g+1)},israngeseleciton:function(e){let n=this;if(n.operatorjson==null){let o=n.operator.split("|"),s={};for(let u=0;u<o.length;u++)s[o[u].toString()]=1;n.operatorjson=s}e==null&&(e=!1);let t=window.getSelection(),l=$(t.anchorNode),a=t.anchorOffset;if(l.parent().is("span")&&a!=0){let o=$.trim(l.text()),s="";if(o.length==0&&l.parent().prev().length>0){let u=l.parent().prev();o=$.trim(u.text()),s=o.substr(o.length-1,1),n.rangeSetValueTo=u}else s=o.substr(a-1,1),n.rangeSetValueTo=l.parent();if(e&&(s=="("||s==",")||!e&&(s=="("||s==","||s=="="||s in n.operatorjson||s=="&"))return!0}else if(l.is("#luckysheet-rich-text-editor")||l.is("#luckysheet-functionbox-cell")){let o=$.trim(l.find("span").last().text()),s;if(n.rangeSetValueTo=l.find("span").last(),o.length==0&&l.find("span").length>1){let u=l.find("span");o=$.trim(u.eq(u.length-2).text()),n.rangeSetValueTo=u}if(s=o.substr(o.length-1,1),e&&(s=="("||s==",")||!e&&(s=="("||s==","||s=="="||s in n.operatorjson||s=="&"))return!0}else if((l.parent().is("#luckysheet-rich-text-editor")||l.parent().is("#luckysheet-functionbox-cell")||a==0)&&(a==0&&(l=l.parent()),l.prev().length>0)){let o=$.trim(l.prev().text()),s=o.substr(o.length-1,1);if(n.rangeSetValueTo=l.prev(),e&&(s=="("||s==",")||!e&&(s=="("||s==","||s=="="||s in n.operatorjson||s=="&"))return!0}return!1},rangechangeindex:null,rangestart:!1,rangetosheet:null,rangeSetValueTo:null,func_selectedrange:{},rangeSetValue:function(e,n){let t=this,l="",a=e.row[0],o=e.column[0];h.config.merge!=null&&a+"_"+o in h.config.merge?l=xt(h.currentSheetIndex,{column:[o,o],row:[a,a]},t.rangetosheet):l=xt(h.currentSheetIndex,e,t.rangetosheet);let s;if(t.rangestart||t.rangedrag_column_start||t.rangedrag_row_start)if($("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible")){s=$("#luckysheet-rich-text-editor"),$("#luckysheet-search-formula-parm-select-input").val(l),$("#luckysheet-search-formula-parm .parmBox").eq(t.data_parm_index).find(".txt input").val(l);let u=ar(l).data;if(u instanceof Array){let v=[];for(let b=0;b<u.length;b++)for(let k=0;k<u[b].length;k++)u[b][k]==null?v.push(null):v.push(u[b][k].v);$("#luckysheet-search-formula-parm .parmBox").eq(t.data_parm_index).find(".val").text(" = {"+v.join(",")+"}")}else $("#luckysheet-search-formula-parm .parmBox").eq(t.data_parm_index).find(".val").text(" = {"+u.v+"}");let f=!0,d=[],m=-1;$("#luckysheet-search-formula-parm .parmBox").each(function(v,b){let k=$(b).find(".txt input").val();k==""&&$(b).find(".txt input").attr("data_parm_require")=="m"&&(f=!1),k!=""&&(m=v)});let g;if(m==-1)g="="+$("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text()+"()";else if(m==0)g="="+$("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text()+"("+$("#luckysheet-search-formula-parm .parmBox").eq(0).find(".txt input").val()+")";else{for(let v=0;v<=m;v++)d.push($("#luckysheet-search-formula-parm .parmBox").eq(v).find(".txt input").val());g="="+$("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text()+"("+d.join(",")+")"}let y=t.functionHTMLGenerate(g);if($("#luckysheet-rich-text-editor").html(y),$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()),f){let v=$.trim(t.functionParserExe($("#luckysheet-rich-text-editor").text())),b=new Function("return "+v)();$("#luckysheet-search-formula-parm .result span").text(b)}}else{let f=window.getSelection().anchorNode;s=$(f).closest("div");let d=s.find("span[rangeindex='"+t.rangechangeindex+"']").html(l);t.setCaretPosition(d.get(0),0,l.length)}else{let u='<span class="luckysheet-formula-functionrange-cell" rangeindex="'+t.functionHTMLIndex+'" dir="auto" style="color:'+Yl[t.functionHTMLIndex]+';">'+l+"</span>",f=$(u).insertAfter(t.rangeSetValueTo);t.rangechangeindex=t.functionHTMLIndex,s=$(t.rangeSetValueTo).closest("div"),t.setCaretPosition(s.find("span[rangeindex='"+t.rangechangeindex+"']").get(0),0,l.length),t.functionHTMLIndex++}s.attr("id")=="luckysheet-rich-text-editor"?$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()):$("#luckysheet-rich-text-editor").html($("#luckysheet-functionbox-cell").html())},rangedrag:function(e){let n=this,t=nt(e.pageX,e.pageY),l=t[0]+$("#luckysheet-cell-main").scrollLeft(),a=t[1]+$("#luckysheet-cell-main").scrollTop(),o=_t(a),s=o[1],u=o[0],f=o[2],d=wt(l),m=d[1],g=d[0],y=d[2],v=0,b=0,k=[];n.func_selectedrange.top>u?(v=u,b=n.func_selectedrange.top+n.func_selectedrange.height-u,k=[f,n.func_selectedrange.row[1]]):n.func_selectedrange.top==u?(v=u,b=n.func_selectedrange.top+n.func_selectedrange.height-u,k=[f,n.func_selectedrange.row[0]]):(v=n.func_selectedrange.top,b=s-n.func_selectedrange.top-1,k=[n.func_selectedrange.row[0],f]);let w=0,x=0,C=[];n.func_selectedrange.left>g?(w=g,x=n.func_selectedrange.left+n.func_selectedrange.width-g,C=[y,n.func_selectedrange.column[1]]):n.func_selectedrange.left==g?(w=g,x=n.func_selectedrange.left+n.func_selectedrange.width-g,C=[y,n.func_selectedrange.column[0]]):(w=n.func_selectedrange.left,x=m-n.func_selectedrange.left-1,C=[n.func_selectedrange.column[0],y]),k[0]=Y.changeFreezenIndex(k[0],"h"),k[1]=Y.changeFreezenIndex(k[1],"h"),C[0]=Y.changeFreezenIndex(C[0],"v"),C[1]=Y.changeFreezenIndex(C[1],"v");let S=ke.mergeMoveMain(C,k,n.func_selectedrange,v,b,w,x);if(S!=null&&(C=S[0],k=S[1],v=S[2],b=S[3],w=S[4],x=S[5]),n.func_selectedrange.row=k,n.func_selectedrange.column=C,n.func_selectedrange.left_move=w,n.func_selectedrange.width_move=x,n.func_selectedrange.top_move=v,n.func_selectedrange.height_move=b,or(w,v,x,b,k,C),$("#luckysheet-formula-functionrange-select").css({left:w,width:x,top:v,height:b}).show(),$("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){let _=xt(h.currentSheetIndex,{row:k,column:C},h.currentSheetIndex);$("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(_)}else n.rangeSetValue({row:k,column:C});Y.scrollFreezen(k,C)},rangedrag_column_start:!1,rangedrag_row_start:!1,rangedrag_column:function(e){let n=this,t=nt(e.pageX,e.pageY),l=t[0]+$("#luckysheet-cell-main").scrollLeft(),a=t[1]+$("#luckysheet-cell-main").scrollTop(),o=h.visibledatarow,s=o.length-1,u=o[s],f=0,d=wt(l),m=d[1],g=d[0],y=d[2],v=0,b=0,k=[];n.func_selectedrange.left>g?(v=g,b=n.func_selectedrange.left+n.func_selectedrange.width-g,k=[y,n.func_selectedrange.column[1]]):n.func_selectedrange.left==g?(v=g,b=n.func_selectedrange.left+n.func_selectedrange.width-g,k=[y,n.func_selectedrange.column[0]]):(v=n.func_selectedrange.left,b=m-n.func_selectedrange.left-1,k=[n.func_selectedrange.column[0],y]),k[0]=Y.changeFreezenIndex(k[0],"v"),k[1]=Y.changeFreezenIndex(k[1],"v");let w=ke.mergeMoveMain(k,[0,s],n.func_selectedrange,f,u-f-1,v,b);w!=null&&(k=w[0],v=w[4],b=w[5]),n.func_selectedrange.column=k,n.func_selectedrange.left_move=v,n.func_selectedrange.width_move=b,or(v,f,b,u-f-1,[0,s],k),n.rangeSetValue({row:[null,null],column:k}),$("#luckysheet-formula-functionrange-select").css({left:v,width:b,top:f,height:u-f-1}).show(),Y.scrollFreezen([0,s],k)},rangedrag_row:function(e){let n=this,t=nt(e.pageX,e.pageY),l=t[0]+$("#luckysheet-cell-main").scrollLeft(),a=t[1]+$("#luckysheet-cell-main").scrollTop(),o=_t(a),s=o[1],u=o[0],f=o[2],d=h.visibledatacolumn,m=d.length-1,g=d[m],y=0,v=0,b=0,k=[];n.func_selectedrange.top>u?(v=u,b=n.func_selectedrange.top+n.func_selectedrange.height-u,k=[f,n.func_selectedrange.row[1]]):n.func_selectedrange.top==u?(v=u,b=n.func_selectedrange.top+n.func_selectedrange.height-u,k=[f,n.func_selectedrange.row[0]]):(v=n.func_selectedrange.top,b=s-n.func_selectedrange.top-1,k=[n.func_selectedrange.row[0],f]),k[0]=Y.changeFreezenIndex(k[0],"h"),k[1]=Y.changeFreezenIndex(k[1],"h");let w=ke.mergeMoveMain([0,m],k,n.func_selectedrange,v,b,y,g-y-1);w!=null&&(k=w[1],v=w[2],b=w[3]),n.func_selectedrange.row=k,n.func_selectedrange.top_move=v,n.func_selectedrange.height_move=b,or(y,v,g-y-1,b,k,[0,m]),n.rangeSetValue({row:k,column:[null,null]}),$("#luckysheet-formula-functionrange-select").css({left:y,width:g-y-1,top:v,height:b}).show(),Y.scrollFreezen(k,[0,m])},rangedragged:function(){},rangeResizeObj:null,rangeResize:null,rangeResizeIndex:null,rangeResizexy:null,rangeResizeWinH:null,rangeResizeWinW:null,rangeResizeTo:null,rangeResizeDraging:function(e,n,t,l,a,o,s,u){let f=this,d=$("#luckysheet-scrollbar-y").scrollTop(),m=$("#luckysheet-scrollbar-x").scrollLeft(),g=nt(e.pageX,e.pageY),y=g[0]+m,v=g[1]+d,b=_t(v),k=b[1],w=b[0],x=b[2],C=wt(y),S=C[1],_=C[0],T=C[2];if(y<0||v<0)return!1;let A=w-t[1],R=_-t[0],I=t[5],F=t[3],z=t[4],M=t[2];if(l=="lt"||l=="lb"){if(t[0]+t[2]<_)return;z=_,M=t[2]-R,z>t[2]+t[4]-S+_?(z=t[2]+t[4]-S+_,M=t[2]-(t[2]+t[4]-S+_-t[0])):z<=0&&(z=0,M=t[2]+t[0])}if(l=="rt"||l=="rb"){if(t[6]-t[2]>S)return;M=t[2]+S-t[6],M<S-_-1?M=S-_-1:M>=s-z&&(M=s-z)}if(l=="lt"||l=="rt"){if(t[1]+t[3]<w)return;I=w,F=t[3]-A,I>t[3]+t[5]-k+w?(I=t[3]+t[5]-k+w,F=t[3]-(t[3]+t[5]-k+w-t[1])):I<=0&&(I=0,F=t[3]+t[1])}if(l=="lb"||l=="rb"){if(t[7]-t[3]>k)return;F=t[3]+k-t[7],F<k-w-1?F=k-w-1:F>=u-I&&(F=u-I)}let E=f.rangeResizeIndex,N={top:I,left:z,height:F,width:M},L=f.getSelectedFromRange(N),O=xt(h.currentSheetIndex,L,f.rangetosheet),V=f.rangeResizeTo.find("span[rangeindex='"+E+"']").html(O);_r(f.rangeResizeTo[0]),n.css(N).data("range",L)},getSelectedFromRange:function(e){let n=e.top+2,t=e.top+e.height-2,l=e.left+2,a=e.left+e.width-2;return{row:[_t(n)[2],_t(t)[2]],column:[wt(l)[2],wt(a)[2]]}},rangeResizeDragged:function(e,n,t,l,a,o){let s=this;s.rangeResize=null,$("#luckysheet-formula-functionrange-highlight-"+s.rangeResizeIndex).find(".luckysheet-selection-copy-hc").css("opacity",.03)},rangeMovexy:null,rangeMove:!1,rangeMoveObj:null,rangeMoveIndex:null,rangeMoveRangedata:null,rangeMoveDraging:function(e,n,t,l,a,o){let s=this,u=nt(e.pageX,e.pageY),f=$("#luckysheet-scrollbar-x").scrollLeft(),d=$("#luckysheet-scrollbar-y").scrollTop(),m=u[0]+f,g=u[1]+d,y=$(window).height()+d-a-o,v=$(window).width()+f,b=n[0],k=n[1],w=t.row[0]-b+_t(g)[2],x=t.row[1]-b+_t(g)[2],C=t.column[0]-k+wt(m)[2],S=t.column[1]-k+wt(m)[2];(w<0||g<0)&&(w=0,x=t.row[1]-t.row[0]),(C<0||m<0)&&(C=0,S=t.column[1]-t.column[0]);let _=h.visibledatarow;(x>=_[_.length-1]||g>y)&&(w=_.length-1-t.row[1]+t.row[0],x=_.length-1);let T=h.visibledatacolumn;(S>=T[T.length-1]||m>v)&&(C=T.length-1-t.column[1]+t.column[0],S=T.length-1);let A=C-1==-1?0:T[C-1],R=T[S],I=w-1==-1?0:_[w-1],F=_[x],z=s.rangeMoveIndex,M={left:A,width:R-A-2,top:I,height:F-I-2,display:"block"},E=s.getSelectedFromRange(M),N=xt(h.currentSheetIndex,E,s.rangetosheet),L=s.rangeResizeTo.find("span[rangeindex='"+z+"']").html(N);_r(s.rangeResizeTo[0]),s.rangeMoveRangedata=E,l.css(M)},rangeMoveDragged:function(e){let n=this;n.rangeMove=!1,$("#luckysheet-formula-functionrange-highlight-"+n.rangeMoveIndex).data("range",n.rangeMoveRangedata).find(".luckysheet-selection-copy-hc").css("opacity",.03)},functionHTMLIndex:0,functionRangeIndex:null,findrangeindex:function(e,n){let t=this,l=/<span.*?>/g,a=e.replace(l,""),o=n.replace(l,"");a=a.split("</span>"),o=o.split("</span>"),a.pop(),o.pop();let s=t.functionRangeIndex,u=0,f=o.length>a.length?a.length:o.length,d=o.length,m=a.length;if(d==m){let g=s[0],y=o[g],v=a[g];if(y==null)return o.length<=g?s=[o.length-1,o.length-1]:a.length<=g&&(s=[a.length-1,a.length-1]),s;if(y.length==v.length)return o[g+1]!=null&&a[g+1]!=null&&o[g+1].length<a[g+1].length&&(s[0]=s[0]+1,s[1]=1),s;if(y.length>v.length)return y!=null&&a[g+1]!=null&&a[g+1].substr(0,1)=='"'&&(y.indexOf("{")>-1||y.indexOf("}")>-1)&&(s[0]=s[0]+1,s[1]=1),s;if(y.length<v.length)return s[1]>v.length&&(s[1]=v.length),s}else if(d>m){let g=s[0],y=o[g],v=a[g];if(v==null)if(a[g-1].indexOf("{")>-1){s[0]=s[0]-1;let b=a[g-1].search("{");s[1]=s[1]+b}else s[0]=0,s[1]=0;else{if(y.length==v.length)return a[g+1]!=null&&(a[g+1].substr(0,1)=='"'||a[g+1].substr(0,1)=="{"||a[g+1].substr(0,1)=="}")?(s[0]=s[0]+1,s[1]=1):y!=null&&y.length>2&&y.substr(0,1)=='"'&&y.substr(y.length-1,1)=='"'||(a[g]!=null&&a[g]=='")'||a[g]!=null&&a[g]=='"}'||a[g]!=null&&a[g]=="{)"?s[1]=1:s[1]=v.length),s;if(y.length>v.length)return a[g+1]!=null&&(a[g+1].substr(0,1)=='"'||a[g+1].substr(0,1)=="{"||a[g+1].substr(0,1)=="}")&&(s[0]=s[0]+1,s[1]=1),s;if(y.length<v.length)return s}return s}else if(d<m){let g=s[0],y=o[g],v=a[g];if(y==null)s[0]=a.length-1,v!=null?s[1]=v.length:s[1]=1;else{if(y.length==v.length)return o[g+1]!=null&&(o[g+1].substr(0,1)=='"'||o[g+1].substr(0,1)=="{"||o[g+1].substr(0,1)=="}")?s[1]=v.length:a[g+1]!=null&&a[g+1].substr(0,1)=='"'&&(a[g+1].substr(0,1)=="{"||a[g+1].substr(0,1)=="}")?(s[0]=s[0]+1,s[1]=1):v!=null&&v.substr(0,1)=='"'&&v.substr(v.length-1,1)=='"'&&y.substr(0,1)=='"'&&y.substr(y.length-1,1)==")"||v!=null&&v.substr(0,1)=="{"&&v.substr(v.length-1,1)=="}"&&y.substr(0,1)=="{"&&y.substr(y.length-1,1)==")"?s[1]=v.length:(s[0]=s[0]+m-d,a.length>o.length?s[1]=a[g+1].length:s[1]=1),s;if(y.length>v.length)return y!=null&&y.substr(0,1)=='"'?s[1]=v.length:a[g+1]!=null&&/{.*?}/.test(a[g+1])?(s[0]=s[0]+1,s[1]=a[g+1].length):y!=null&&a[g+1].substr(0,1)=='"'&&(y.indexOf("{")>-1||y.indexOf("}")>-1)?(s[0]=s[0]+1,s[1]=1):y!=null&&(y.indexOf("{")>-1||y.indexOf("}")>-1)||(s[0]=s[0]+m-d-1,s[1]=a[g-1].length),s;if(y.length<v.length)return s}return s}return null},setCaretPosition:function(e,n,t){try{let l=e,a=document.createRange(),o=window.getSelection();a.setStart(l.childNodes[n],t),a.collapse(!0),o.removeAllRanges(),o.addRange(a),l.focus()}catch(l){_r(this.rangeResizeTo[0])}},functionRange:function(e,n,t){let l=this;if(window.getSelection){let a=window.getSelection(),o=l.findrangeindex(n,t);o==null?(a.selectAllChildren(e.get(0)),a.collapseToEnd()):l.setCaretPosition(e.find("span").get(o[0]),0,o[1])}else document.selection&&(l.functionRangeIndex.moveToElementText(e),l.functionRangeIndex.collapse(!1),l.functionRangeIndex.select())},functionInputHanddler:function(e,n,t){if(fe())return;let l=this,a=e,o=n,s=o.html(),u=o.text(),f=this.xssDeal;setTimeout(function(){let d=o.text(),m=d;if(d=f(d),d.length>0&&d.substr(0,1)=="="&&(t!=229||d.length==1)){if(d=l.functionHTMLGenerate(d),s=l.functionHTMLGenerate(u),window.getSelection){let g=window.getSelection();if($(g.anchorNode).is("div")){let y=$("#luckysheet-rich-text-editor span").length;l.functionRangeIndex=[y-1,$("#luckysheet-rich-text-editor").find("span").eq(y-1).text().length]}else l.functionRangeIndex=[$(g.anchorNode).parent().index(),g.anchorOffset]}else{let g=document.selection.createRange();l.functionRangeIndex=g}o.html(d),l.functionRange(o,d,s),l.canceFunctionrangeSelected(),t!=46&&l.createRangeHightlight(),a.html(d),l.rangestart=!1,l.rangedrag_column_start=!1,l.rangedrag_row_start=!1,l.rangeHightlightselected(o,t)}else u.substr(0,1)!="="&&(a.attr("id")=="luckysheet-rich-text-editor"&&a.html().substr(0,5)=="<span"||(d=l.ltGtSignDeal(d),a.html(d)))},1)},functionHTMLGenerate:function(e){let n=this;return e.length==0||e.substr(0,1)!="="?e:(n.functionHTMLIndex=0,'<span dir="auto" class="luckysheet-formula-text-color">=</span>'+n.functionHTML(e))},functionHTML:function(e){let n=this;if(n.operatorjson==null){let f=n.operator.split("|"),d={};for(let m=0;m<f.length;m++)d[f[m].toString()]=1;n.operatorjson=d}e.substr(0,1)=="="&&(e=e.substr(1));let t=e.split(""),l=0,a="",o="",s=!0,u={bracket:0,comma:0,squote:0,dquote:0,braces:0};for(;l<t.length;){let f=t[l];if(f=="("&&u.squote==0&&u.dquote==0&&u.braces==0)u.bracket+=1,a.length>0?o+='<span dir="auto" class="luckysheet-formula-text-func">'+a+'</span><span dir="auto" class="luckysheet-formula-text-lpar">(</span>':o+='<span dir="auto" class="luckysheet-formula-text-lpar">(</span>',a="";else if(f==")"&&u.squote==0&&u.dquote==0&&u.braces==0)u.bracket-=1,o+=n.functionHTML(a)+'<span dir="auto" class="luckysheet-formula-text-rpar">)</span>',a="";else if(f=="{"&&u.squote==0&&u.dquote==0)a+="{",u.braces+=1;else if(f=="}"&&u.squote==0&&u.dquote==0)a+="}",u.braces-=1;else if(f=='"'&&u.squote==0)u.dquote>0?(a.length>0?o+=a+'"</span>':o+='"</span>',u.dquote-=1,a=""):(u.dquote+=1,a.length>0?o+=n.functionHTML(a)+'<span dir="auto" class="luckysheet-formula-text-string">"':o+='<span dir="auto" class="luckysheet-formula-text-string">"',a="");else if(f=="'"&&u.dquote==0)a+="'",u.squote=u.squote==0?1:0;else if(f==","&&u.squote==0&&u.dquote==0&&u.braces==0)o+=n.functionHTML(a)+'<span dir="auto" class="luckysheet-formula-text-comma">,</span>',a="";else if(f=="&"&&u.squote==0&&u.dquote==0&&u.braces==0)a.length>0?(o+=n.functionHTML(a)+'<span dir="auto" class="luckysheet-formula-text-calc">&</span>',a=""):o+='<span dir="auto" class="luckysheet-formula-text-calc">&</span>';else if(f in n.operatorjson&&u.squote==0&&u.dquote==0&&u.braces==0){let d="";l+1<t.length&&(d=t[l+1]);let m=l-1,g=null;if(m>=0)do g=t[m--];while(m>=0&&g==" ");f+d in n.operatorjson?(a.length>0?(o+=n.functionHTML(a)+'<span dir="auto" class="luckysheet-formula-text-calc">'+f+d+"</span>",a=""):o+='<span dir="auto" class="luckysheet-formula-text-calc">'+f+d+"</span>",l++):!/[^0-9]/.test(d)&&f=="-"&&(g=="("||g==null||g==","||g==" "||g in n.operatorjson)?a+=f:a.length>0?(o+=n.functionHTML(a)+'<span dir="auto" class="luckysheet-formula-text-calc">'+f+"</span>",a=""):o+='<span dir="auto" class="luckysheet-formula-text-calc">'+f+"</span>"}else a+=f;if(l==t.length-1){if(n.iscelldata($.trim(a)))o+='<span class="luckysheet-formula-functionrange-cell" rangeindex="'+n.functionHTMLIndex+'" dir="auto" style="color:'+Yl[n.functionHTMLIndex]+';">'+a+"</span>",n.functionHTMLIndex++;else if(u.dquote>0)o+=a+"</span>";else if(a.indexOf("</span>")==-1&&a.length>0){let d=/{.*?}/;if(d.test($.trim(a))){let m=d.exec(a)[0],g=a.search(d),y="";g>0&&(y+='<span dir="auto" class="luckysheet-formula-text-color">'+a.substr(0,g)+"</span>"),y+='<span dir="auto" style="color:#959a05" class="luckysheet-formula-text-array">'+m+"</span>",g+m.length<a.length&&(y+='<span dir="auto" class="luckysheet-formula-text-color">'+a.substr(g+m.length,a.length)+"</span>"),o+=y}else o+='<span dir="auto" class="luckysheet-formula-text-color">'+a+"</span>"}}l++}return o},getfunctionParam:function(e){let n=this;if(n.operatorjson==null){let m=n.operator.split("|"),g={};for(let y=0;y<m.length;y++)g[m[y].toString()]=1;n.operatorjson=g}e.substr(0,1)=="="&&(e=e.substr(1));let t=e.split(""),l=0,a="",o="",s={bracket:0,comma:0,squote:0,dquote:0,compare:0},u=null,f=[],d=[];for(;l<t.length;){let m=t[l];if(m=="("&&s.dquote==0)a.length>0&&d.length==0?(u=a.toUpperCase(),d.push(1),a=""):d.length==0?(d.push(0),a=""):(d.push(0),a+=m);else if(m==")"&&s.dquote==0){let g=d.pop();d.length==0?(f.push(a),a=""):a+=m}else if(m=='"')a+='"',s.dquote>0?(s.dquote-=1,a=""):s.dquote+=1;else if(m==","&&s.dquote==0)d.length<=1?(f.push(a),a=""):a+=",";else if(m in n.operatorjson&&s.dquote==0){let g="";l+1<t.length&&(g=t[l+1]);let y=l-1,v=null;if(y>=0)do v=t[y--];while(y>=0&&v==" ");!/[^0-9]/.test(g)&&m=="-"&&(v=="("||v==null||v==","||v==" "||v in n.operatorjson)?s.dquote==0?a+=$.trim(m):a+=m:(o="",a="")}else s.dquote==0?a+=$.trim(m):a+=m;l++}return{fn:u,param:f}},calPostfixExpression:function(e){if(e.length==0)return"";let n=[];for(let t=e.length-1;t>=0;t--){let l=e[t];if(l in this.operatorjson){let a=n.pop(),o=n.pop(),s="luckysheet_compareWith("+o+",'"+l+"', "+a+")";n.push(s)}else n.push(l)}return n.length>0?n[0]:""},checkBracketNum:function(e){let n=e.match(/\(/g),t=e.match(/\)/g),l=e.match(/(['"])(?:(?!\1).)*?\1/g),a=e.match(/(['"])(?:(?!\1).)*?\1/g),o=0,s=0;n!=null&&(o+=n.length),t!=null&&(s+=t.length);let u=0,f=0;if(l!=null)for(let d=0;d<l.length;d++){let m=l[d].match(/\(/g);m!=null&&(u+=m.length)}if(a!=null)for(let d=0;d<a.length;d++){let m=a[d].match(/\)/g);m!=null&&(f+=m.length)}return o-=u,s-=f,o==s},operatorPriority:{"^":0,"%":1,"*":1,"/":1,"+":2,"-":2},functionParserExe:function(e){let n=this;return this.functionParser(e)},functionParser:function(e,n){let t=this;if(t.operatorjson==null){let y=t.operator.split("|"),v={};for(let b=0;b<y.length;b++)v[y[b].toString()]=1;t.operatorjson=v}if(e==null)return"";e.substr(0,2)=="=+"?e=e.substr(2):e.substr(0,1)=="="&&(e=e.substr(1));let l=e.split(""),a=0,o="",s="",u={bracket:0,comma:0,squote:0,dquote:0,compare:0,braces:0},f=[],d=[],m=[],g=-1;for(;a<l.length;){let y=l[a];if(y=="("&&u.squote==0&&u.dquote==0&&u.braces==0)if(o.length>0&&m.length==0){if(o=o.toUpperCase(),o.indexOf(":")>-1){let v=o.split(":");s+="luckysheet_getSpecialReference(true,'"+$.trim(v[0]).replace(/'/g,"\\'")+"', luckysheet_function."+v[1]+".f(#lucky#"}else s+="luckysheet_function."+o+".f(";m.push(1),o=""}else m.length==0?(s+="(",m.push(0),o=""):(m.push(0),o+=y);else if(y==")"&&u.squote==0&&u.dquote==0&&u.braces==0){let v=m.pop();if(m.length==0){let b=t.functionParser(o,n);b.indexOf("#lucky#")>-1&&(b=b.replace(/#lucky#/g,"")+")"),s+=b+")",o=""}else o+=y}else if(y=="{"&&u.squote==0&&u.dquote==0)o+="{",u.braces+=1;else if(y=="}"&&u.squote==0&&u.dquote==0)o+="}",u.braces-=1;else if(y=='"'&&u.squote==0)u.dquote>0?a<l.length-1&&l[a+1]=='"'?(a++,o+="\x7F"):(u.dquote-=1,o+='"'):(u.dquote+=1,o+='"');else if(y=="'"&&u.dquote==0)if(o+="'",u.squote>0){if(g==a-1)return"";if(a<l.length-1&&l[a+1]=="'")a++,o+="'";else{if(l[a-1]=="'")return"";u.squote-=1}}else u.squote+=1,g=a;else if(y==","&&u.squote==0&&u.dquote==0&&u.braces==0)if(m.length<=1){let v=t.functionParser(o,n);v.indexOf("#lucky#")>-1&&(v=v.replace(/#lucky#/g,"")+")"),s+=v+",",o=""}else o+=",";else if(y in t.operatorjson&&u.squote==0&&u.dquote==0&&u.braces==0){let v="",b=t.operatorPriority;if(a+1<l.length&&(v=l[a+1]),y+v in t.operatorjson){if(m.length==0){if($.trim(o).length>0?d.unshift(t.functionParser($.trim(o),n)):$.trim(s).length>0&&d.unshift($.trim(s)),f[0]in t.operatorjson){let k=b[f[0]];for(;f.length>0&&k!=null;)d.unshift(f.shift()),k=b[f[0]]}f.unshift(y+v),s="",o=""}else o+=y+v;a++}else if(m.length==0){if($.trim(o).length>0?d.unshift(t.functionParser($.trim(o),n)):$.trim(s).length>0&&d.unshift($.trim(s)),f[0]in t.operatorjson){let k=b[f[0]];k=k==null?1e3:k;let w=b[y];for(w=w==null?1e3:w;f.length>0&&w>=k;)d.unshift(f.shift()),k=b[f[0]],k=k==null?1e3:k}f.unshift(y),s="",o=""}else o+=y}else u.dquote==0&&u.squote==0,o+=y;if(a==l.length-1){let v="",b=$.trim(o).replace(/'/g,"\\'");if(t.iscelldata(b)&&b.substr(0,1)!=":")v="luckysheet_getcelldata('"+b+"')",typeof n=="function"&&n(b);else if(b.substr(0,1)==":")b=b.substr(1),t.iscelldata(b)&&(v="luckysheet_getSpecialReference(false,"+s+",'"+b+"')");else{o=$.trim(o);let k=/{.*?}/;if(k.test(o)&&o.substr(0,1)!='"'&&o.substr(o.length-1,1)!='"'){let w=k.exec(o)[0],x=o.search(k),C="";x>0&&(v+=o.substr(0,x)),v+="luckysheet_getarraydata('"+w+"')",x+w.length<o.length&&(v+=o.substr(x+w.length,o.length))}else v=o}if(v.length>0&&d.unshift(v),f.length>0)for(s.length>0&&(d.unshift(s),s="");f.length>0;)d.unshift(f.shift());d.length>0?s=t.calPostfixExpression(d):s+=v}a++}return s},insertUpdateDynamicArray:function(e){let n=e.r,t=e.c,l=e.index;l==null&&(l=h.currentSheetIndex);let s=Et()[Z(l)].dynamicArray;s==null&&(s=[]);for(let u=0;u<s.length;u++){let f=s[u];if(f.r==n&&f.c==t&&f.index==l)return f.data=e.data,f.f=e.f,s}return s.push(e),s},addFunctionGroup:function(e,n,t,l){l==null&&(l=h.currentSheetIndex);let a=Et(),o=a[Z(l)];o.calcChain==null&&(o.calcChain=[]);let s={r:e,c:n,index:l,func:t};o.calcChain.push(s),ne.saveParam("fc",l,JSON.stringify(s),{op:"add",pos:o.calcChain.length-1}),Jn(a)},getAllFunctionGroup:function(){let e=Et(),n=[];for(let t=0;t<e.length;t++){let l=e[t],a=l.calcChain;if(a){let s=[];a.forEach((u,f)=>{typeof u=="string"?s.push(JSON.parse(u)):s.push(u)}),a=l.calcChain=s}let o=l.dynamicArray_compute;a==null&&(a=[]),o==null&&(o=[]),n=n.concat(a);for(let s=0;s<o.length;s++){let u=o[0];n.push({r:u.r,c:u.c,index:u.index})}}return n},getFunctionGroup:function(e){e==null&&(e=h.currentSheetIndex);let t=Et()[Z(e)];return t.calcChain==null?[]:t.calcChain},updateFunctionGroup:function(e,n,t){t==null&&(t=h.currentSheetIndex);let l=Et(),o=l[Z(t)].calcChain;if(o!=null)for(let s=0;s<o.length;s++){let u=o[s];if(u.r==e&&u.c==n&&u.index==t){ne.saveParam("fc",t,JSON.stringify(u),{op:"update",pos:s});break}}Jn(l)},insertUpdateFunctionGroup:function(e,n,t){t==null&&(t=h.currentSheetIndex);let l=Et(),a=l[Z(t)],o=a.calcChain;o==null&&(o=[]);for(let u=0;u<o.length;u++){let f=o[u];if(f.r==e&&f.c==n&&f.index==t){ne.saveParam("fc",t,JSON.stringify(f),{op:"update",pos:u});return}}let s={r:e,c:n,index:t};o.push(s),a.calcChain=o,ne.saveParam("fc",t,JSON.stringify(s),{op:"add",pos:a.calcChain.length-1}),Jn(l)},isFunctionRangeSave:!1,isFunctionRangeSimple:function(e,n,t,l,a){if(e==null||e.length==0)return;let o=e.split(/==|!=|<>|<=|>=|[,()=+-\/*%&^><]/g);if(o.length>0)for(let s=0;s<o.length;s++){let u=o[s];u.length<=1||u.substr(0,1)=='"'&&u.substr(u.length-1,1)=='"'||this.isFunctionRangeSaveChange(u,n,t,l,a)}},isFunctionRangeSimple1:function(e,n,t,l,a){let o=this;if(o.operatorjson==null){let v=o.operator.split("|"),b={};for(let k=0;k<v.length;k++)b[v[k].toString()]=1;o.operatorjson=b}e.substr(0,1)=="="&&(e=e.substr(1));let s=e.split(""),u=0,f="",d="",m=!0,g={bracket:0,comma:0,squote:0,dquote:0},y=Et();for(;u<s.length;){let v=s[u];if(v=="("&&g.dquote==0)g.bracket+=1,f.length>0?d+="luckysheet_function."+f.toUpperCase()+".f(":d+="(",f="";else if(v==")"&&g.dquote==0)g.bracket-=1,d+=o.isFunctionRangeSimple(f,n,t,l,a)+")",f="";else if(v==","&&g.dquote==0)d+=o.isFunctionRangeSimple(f,n,t,l,a)+",",f="";else if(v in o.operatorjson&&g.dquote==0){let b="";u+1<s.length&&(b=s[u+1]),v+b in o.operatorjson?(f.length>0?(d+=o.isFunctionRangeSimple(f,n,t,l,a)+v+b,f=""):d+=v+b,u++):f.length>0?(d+=o.isFunctionRangeSimple(f,n,t,l,a)+v,f=""):d+=v}else f+=v;u==s.length-1&&o.iscelldata($.trim(f))&&o.isFunctionRangeSaveChange(f,n,t,l,a),u++}return d},isFunctionRangeSelect:function(e,n,t,l,a){if(e==null||e=="")return;l==null&&(l=h.currentSheetIndex),a==null&&(a={});let o=this,s=e.toUpperCase(),u=s.indexOf("INDIRECT(")>-1||s.indexOf("OFFSET(")>-1||s.indexOf("INDEX(")>-1;if(e in this.formulaContainCellList){let f=this.formulaContainCellList[e];if(u)if(f.__LuckyisOff__==!0)for(let m in f)m!="__LuckyisOff__"&&this.isFunctionRangeSaveChange(m,n,t,l,a);else this.isFunctionRange(e,n,t,l,a,function(m){o.addToCellList(e,m)}),f.__LuckyisOff__=!0;else for(let d in f)d!="__LuckyisOff__"&&this.isFunctionRangeSaveChange(d,n,t,l,a);return}u?this.isFunctionRange(e,n,t,l,a):this.isFunctionRangeSimple(e,n,t,l,a)},isFunctionRange:function(e,n,t,l,a,o){let s=this;if(s.operatorjson==null){let x=s.operator.split("|"),C={};for(let S=0;S<x.length;S++)C[x[S].toString()]=1;s.operatorjson=C}e.substr(0,1)=="="&&(e=e.substr(1));let u=e.split(""),f=0,d="",m="",g=!0,y={bracket:0,comma:0,squote:0,dquote:0,compare:0,braces:0},v=[],b=[],k=[],w=-1;for(;f<u.length;){let x=u[f];if(x=="("&&y.squote==0&&y.dquote==0&&y.braces==0)if(d.length>0&&k.length==0){if(d=d.toUpperCase(),d.indexOf(":")>-1){let C=d.split(":");m+="luckysheet_getSpecialReference(true,'"+$.trim(C[0]).replace(/'/g,"\\'")+"', luckysheet_function."+C[1]+".f(#lucky#"}else m+="luckysheet_function."+d+".f(";k.push(1),d=""}else k.length==0?(m+="(",k.push(0),d=""):(k.push(0),d+=x);else if(x==")"&&y.squote==0&&y.dquote==0&&y.braces==0){let C=k.pop();if(k.length==0){let S=s.isFunctionRange(d,n,t,l,a,o);S.indexOf("#lucky#")>-1&&(S=S.replace(/#lucky#/g,"")+")"),m+=S+")",d=""}else d+=x}else if(x=="{"&&y.squote==0&&y.dquote==0)d+="{",y.braces+=1;else if(x=="}"&&y.squote==0&&y.dquote==0)d+="}",y.braces-=1;else if(x=='"'&&y.squote==0)y.dquote>0?f<u.length-1&&u[f+1]=='"'?(f++,d+="\x7F"):(y.dquote-=1,d+='"'):(y.dquote+=1,d+='"');else if(x=="'"&&y.dquote==0)d+="'",y.squote>0?f<u.length-1&&u[f+1]=="'"?(f++,d+="'"):y.squote-=1:(y.squote+=1,w=f);else if(x==","&&y.squote==0&&y.dquote==0&&y.braces==0)if(k.length<=1){let C=s.isFunctionRange(d,n,t,l,a,o);C.indexOf("#lucky#")>-1&&(C=C.replace(/#lucky#/g,"")+")"),m+=C+",",d=""}else d+=",";else if(x in s.operatorjson&&y.squote==0&&y.dquote==0&&y.braces==0){let C="",S=s.operatorPriority;if(f+1<u.length&&(C=u[f+1]),x+C in s.operatorjson){if(k.length==0){if($.trim(d).length>0?b.unshift(s.isFunctionRange($.trim(d),n,t,l,a,o)):$.trim(m).length>0&&b.unshift($.trim(m)),v[0]in s.operatorjson){let _=S[v[0]];for(;v.length>0&&_!=null;)b.unshift(v.shift()),_=S[v[0]]}v.unshift(x+C),m="",d=""}else d+=x+C;f++}else if(k.length==0){if($.trim(d).length>0?b.unshift(s.isFunctionRange($.trim(d),n,t,l,a,o)):$.trim(m).length>0&&b.unshift($.trim(m)),v[0]in s.operatorjson){let _=S[v[0]];_=_==null?1e3:_;let T=S[x];for(T=T==null?1e3:T;v.length>0&&T>=_;)b.unshift(v.shift()),_=S[v[0]],_=_==null?1e3:_}v.unshift(x),m="",d=""}else d+=x}else y.dquote==0&&y.squote==0?d+=$.trim(x):d+=x;if(f==u.length-1){let C="",S=$.trim(d).replace(/'/g,"\\'");if(s.iscelldata(S)&&S.substr(0,1)!=":")C="luckysheet_getcelldata('"+S+"')",s.isFunctionRangeSaveChange(d,n,t,l,a);else if(S.substr(0,1)==":")S=S.substr(1),s.iscelldata(S)&&(C="luckysheet_getSpecialReference(false,"+m+",'"+S+"')");else{d=$.trim(d);let _=/{.*?}/;if(_.test(d)&&d.substr(0,1)!='"'&&d.substr(d.length-1,1)!='"'){let T=_.exec(d)[0],A=d.search(_),R="";A>0&&(C+=d.substr(0,A)),C+="luckysheet_getarraydata('"+T+"')",A+T.length<d.length&&(C+=d.substr(A+T.length,d.length))}else C=d}if(C.length>0&&b.unshift(C),v.length>0)for(m.length>0&&(b.unshift(m),m="");v.length>0;)b.unshift(v.shift());b.length>0?m=s.calPostfixExpression(b):m+=C}f++}return s.checkSpecialFunctionRange(m,n,t,l,a,o),m},isFunctionRangeSaveChange:function(e,n,t,l,a){let o=this;if(n!=null&&t!=null){let s=o.getcellrange($.trim(e),l);if(s==null)return;let u=s.row,f=s.column,d=s.sheetIndex;if(n+"_"+t in a&&(l==d||l==null)){let m=!1;for(let g=u[0];g<=u[1];g++)for(let y=f[0];y<=f[1];y++)g+"_"+y in a&&a[g+"_"+y].r==n&&a[g+"_"+y].c==t&&(m=!0);m?o.isFunctionRangeSave=o.isFunctionRangeSave||!0:o.isFunctionRangeSave=o.isFunctionRangeSave||!1}else n>=u[0]&&n<=u[1]&&t>=f[0]&&t<=f[1]&&(l==d||l==null)?o.isFunctionRangeSave=o.isFunctionRangeSave||!0:o.isFunctionRangeSave=o.isFunctionRangeSave||!1}else o.isFunctionRangeSave=o.isFunctionRangeSave||!1},checkSpecialFunctionRange:function(e,n,t,l,a,o){if(e.substr(0,30)=="luckysheet_getSpecialReference"||e.substr(0,20)=="luckysheet_function."){if(e.substr(0,20)=="luckysheet_function."){let s=e.split(".")[1];if(s!=null&&(s=s.toUpperCase(),s!="INDIRECT"&&s!="OFFSET"&&s!="INDEX"))return}try{h.calculateSheetIndex=l;let s=new Function("return "+e)();s instanceof Object&&s.startCell!=null&&(s=s.startCell);let u=$.trim(s);this.iscelldata(u)&&typeof o=="function"&&o(u)}catch(s){}}},execvertex:{},execFunctionGroupData:null,execFunctionExist:null,formulaContainSheetList:{},formulaContainCellList:{},cellTextToIndexList:{},addToCellList:function(e,n){e==null||e.length==0||n==null||n.length==0||(this.formulaContainCellList==null&&(this.formulaContainCellList={}),this.formulaContainCellList[e]==null&&(this.formulaContainCellList[e]={}),this.formulaContainCellList[e][n]=1)},addToCellIndexList:function(e,n){e==null||e.length==0||n==null||(this.cellTextToIndexList==null&&(this.cellTextToIndexList={}),e.indexOf("!")>-1?(e=e.replace(/\\'/g,"'").replace(/''/g,"'"),this.cellTextToIndexList[e]=n):this.cellTextToIndexList[e+"_"+n.sheetIndex]=n)},addToSheetIndexList:function(e,n,t){e==null||e.length==0||((n==null||n.length==0)&&(n=h.currentSheetIndex),(t==null||t.length==0)&&(t=""),this.formulaContainSheetList==null&&(this.formulaContainSheetList={}),this.formulaContainSheetList[e]==null&&(this.formulaContainSheetList[e]={}),this.formulaContainSheetList[e][n]=t)},execFunctionGlobalData:{},execFunctionGroupForce:function(e){e?this.execFunctionGroup(void 0,void 0,void 0,void 0,void 0,!0):this.execFunctionGroup()},execFunctionGroup:function(e,n,t,l,a,o=!1){let s=this;if(a==null&&(a=h.flowdata),window.luckysheet_compareWith||(window.luckysheet_compareWith=Ya,window.luckysheet_getarraydata=vc,window.luckysheet_getcelldata=ar,window.luckysheet_parseData=Xa,window.luckysheet_getValue=Wn,window.luckysheet_indirect_check=bc,window.luckysheet_indirect_check_return=kc,window.luckysheet_offset_check=wc,window.luckysheet_calcADPMM=Tt,window.luckysheet_getSpecialReference=xc),s.execFunctionGlobalData==null&&(s.execFunctionGlobalData={}),l==null&&(l=h.currentSheetIndex),t!=null){let _=[[{v:null}]];Ht(0,0,_,t),s.execFunctionGlobalData[e+"_"+n+"_"+l]=_[0][0]}let u=s.getAllFunctionGroup(),f={},d=Et(),m={};for(let _=0;_<d.length;_++){let T=d[_];m[T.index]=T.data}let g={},y=[];if(s.execFunctionExist==null){let _="r"+e+"c"+n+"i"+l;g[_]=1}else for(let _=0;_<s.execFunctionExist.length;_++){let T=s.execFunctionExist[_],A="r"+T.r+"c"+T.c+"i"+T.i;g[A]=1}let v={},b=function(_,T,A,R){for(let I=0;I<_.length;I++){let F=_[I],z="r"+F.row[0]+""+F.row[1]+"c"+F.column[0]+""+F.column[1]+"index"+F.sheetIndex;if(z in v)v[z].forEach(E=>{R(E.key,E.r,E.c,E.sheetIndex)});else{let M=[];for(let E=F.row[0];E<=F.row[1];E++)for(let N=F.column[0];N<=F.column[1];N++){let L="r"+E+"c"+N+"i"+F.sheetIndex;R(L,E,N,F.sheetIndex),(T&&L in T||A&&L in A)&&M.push({key:L,r:E,c:N,sheetIndex:F.sheetIndex})}(T||A)&&(v[z]=M)}}},k={},w=0;for(let _=0;_<u.length;_++){let T=u[_],A="r"+T.r+"c"+T.c+"i"+T.index,R=zl(T.r,T.c,T.index);if(R==null)continue;let I=R.toUpperCase(),F=I.indexOf("INDIRECT(")>-1||I.indexOf("OFFSET(")>-1||I.indexOf("INDEX(")>-1,z=[];if(F)this.isFunctionRange(R,null,null,T.index,null,function(E){let N=s.getcellrange($.trim(E),T.index);N!=null&&z.push(N)});else if(!(R.substr(0,2)=='="'&&R.substr(R.length-1,1)=='"')){let E=0,N=-1,L=-1,O=[],V=[],q=R.length;for(let W=0;W<q;W++){let X=R.charAt(W);X=="'"&&L==-1&&(N==-1?(E!=W&&O.push(...R.substring(E,W).split(/==|!=|<>|<=|>=|[,()=+-\/*%&\^><]/)),N=W,E=W):W<q-1&&R.charAt(W+1)=="'"?W++:(E=W+1,O.push(R.substring(N,E)),V.push(O.length-1),N=-1)),X=='"'&&N==-1&&(L==-1?(E!=W&&O.push(...R.substring(E,W).split(/==|!=|<>|<=|>=|[,()=+-\/*%&\^><]/)),L=W,E=W):W<q-1&&R.charAt(W+1)=='"'?W++:(E=W+1,O.push(R.substring(L,E)),L=-1))}E!=q&&O.push(...R.substring(E,q).split(/==|!=|<>|<=|>=|[,()=+-\/*%&\^><]/));for(let W=V.length-1;W>=0;W--)V[W]!=O.length-1&&(O[V[W]]=O[V[W]]+O[V[W]+1],O.splice(V[W]+1,1));for(let W=0;W<O.length;W++){let X=O[W];if(X.length<=1||X.substr(0,1)=='"'&&X.substr(X.length-1,1)=='"'&&!s.iscelldata(X))continue;let te=s.getcellrange($.trim(X),T.index);te!=null&&z.push(te)}}let M={formulaArray:z,calc_funcStr:R,key:A,r:T.r,c:T.c,index:T.index,parents:{},chidren:{},color:"w"};f[A]=M}Object.keys(f).forEach(_=>{let T=f[_];b(T.formulaArray,f,g,function(A){if(A in f){let R=f[A];T.chidren[A]=1,R.parents[_]=1}!o&&A in g&&y.push(T)}),o&&y.push(T)});let x=[],C=y,S={};for(;C.length>0;){let _=C.pop();if(_==null||_.key in S)continue;if(_.color=="b"){x.push(_),S[_.key]=1;continue}let T=[];Object.keys(_.parents).forEach(A=>{let R=f[A];R!=null&&T.push(R)}),w++,T.length==0?(x.push(_),S[_.key]=1):(_.color="b",C.push(_),C=C.concat(T))}x.reverse();for(let _=0;_<x.length;_++){let T=x[_];if(T.level==Math.max)continue;window.luckysheet_getcelldata_cache=null;let A=T.calc_funcStr,R=s.execfunction(A,T.r,T.c,T.index);s.groupValuesRefreshData.push({r:T.r,c:T.c,v:R[1],f:R[2],spe:R[3],index:T.index}),s.execFunctionGlobalData[T.r+"_"+T.c+"_"+T.index]={v:R[1],f:R[2]}}s.execFunctionExist=null},execFunctionGroup1:function(e,n,t,l,a,o=!1){let s=this;a==null&&(a=h.flowdata),window.luckysheet_compareWith||(window.luckysheet_compareWith=Ya,window.luckysheet_getarraydata=vc,window.luckysheet_getcelldata=ar,window.luckysheet_parseData=Xa,window.luckysheet_getValue=Wn,window.luckysheet_indirect_check=bc,window.luckysheet_indirect_check_return=kc,window.luckysheet_offset_check=wc,window.luckysheet_calcADPMM=Tt,window.luckysheet_getSpecialReference=xc),s.execFunctionGlobalData==null&&(s.execFunctionGlobalData={});let u=Et(),f=u[Z(h.currentSheetIndex)].dynamicArray_compute==null?{}:u[Z(h.currentSheetIndex)].dynamicArray_compute;if(l==null&&(l=h.currentSheetIndex),t!=null){let b=[[{v:null}]];Ht(0,0,b,t),s.execFunctionGlobalData[e+"_"+n+"_"+l]=b[0][0]}let d=s.getAllFunctionGroup(),m={},g=[],y=0;if(s.execvertex={},s.execFunctionExist==null)for(let b=0;b<d.length;b++){let k=d[b],w=u[Z(k.index)];if(w==null)continue;let x=w.data[k.r][k.c],C=zl(k.r,k.c,k.index);x!=null&&x.f!=null&&x.f==C&&(k instanceof Object||(k=new Function("return "+k)()),k.color="w",k.parent=null,k.chidren={},k.times=0,m["r"+k.r+"c"+k.c+"i"+k.index]=k,s.isFunctionRangeSave=!1,o?s.isFunctionRangeSave=!0:e!=null&&n!=null&&s.isFunctionRangeSelect(C,e,n,l,f),s.isFunctionRangeSave&&(g.push(k),s.execvertex["r"+k.r+"c"+k.c+"i"+k.index]=k,y++))}else for(let b=0;b<s.execFunctionExist.length;b++){let k=s.execFunctionExist[b];if(!("r"+k.r+"c"+k.c+"i"+k.i in m))for(let w=0;w<d.length;w++){let x=d[w],C=zl(x.r,x.c,x.index);x.color="w",x.parent=null,x.chidren={},x.times=0,m["r"+x.r+"c"+x.c+"i"+x.index]=x,s.isFunctionRangeSave=!1,o?s.isFunctionRangeSave=!0:s.isFunctionRangeSelect(C,k.r,k.c,k.i,f),s.isFunctionRangeSave&&(g.push(x),s.execvertex["r"+x.r+"c"+x.c+"i"+x.index]=x,y++)}}for(;g.length>0;){let b=g.shift(),k={};s.getChildrenVertex(b,m,k);for(let w in m){let x=m[w];if(x==null)continue;let C="r"+b.r+"c"+b.c+"i"+b.index;if(w in k)continue;s.isFunctionRangeSave=!1;let S=zl(x.r,x.c,x.index);s.isFunctionRangeSelect(S,b.r,b.c,b.index,f),s.isFunctionRangeSave&&(w in s.execvertex||(g.push(x),s.execvertex[w]=x),y++,s.execvertex[w].chidren[C]=1)}}s.groupValuesRefreshData=[];let v=0;for(;v<y;)for(let b in s.execvertex){let k=s.execvertex[b];k.color=="w"?s.functionDFS(k):k.color=="b"&&v++}s.execFunctionExist=null},getChildrenVertex:function(e,n,t){let l="r"+e.r+"c"+e.c+"i"+e.index;if(t[l]=1,e.chidren!=null)for(let a in e.chidren)n[a]&&!(a in t)&&this.getChildrenVertex(n[a],n,t)},functionDFS:function(e){let n=this;e.color="g",e.times+=1;for(let a in e.chidren){let o=n.execvertex[a];o.color=="w"&&(o.parent="r"+e.r.toString()+"c"+e.c.toString()+"i"+e.index,n.functionDFS(o))}e.color="b",window.luckysheet_getcelldata_cache=null;let t=zl(e.r,e.c,e.index),l=n.execfunction(t,e.r,e.c,e.index);n.groupValuesRefreshData.push({r:e.r,c:e.c,v:l[1],f:l[2],spe:l[3],index:e.index}),n.execFunctionGlobalData[e.r+"_"+e.c+"_"+e.index]={v:l[1],f:l[2]}},groupValuesRefreshData:[],groupValuesRefresh:function(){let e=this,n=Et();if(e.groupValuesRefreshData.length>0){for(let t=0;t<e.groupValuesRefreshData.length;t++){let l=e.groupValuesRefreshData[t],a=n[Z(l.index)],o=a.data;if(o==null)continue;let s={};l.spe!=null&&(l.spe.type=="sparklines"?s.spl=l.spe.data:l.spe.type=="dynamicArrayItem"&&(a.dynamicArray=e.insertUpdateDynamicArray(l.spe.data))),s.v=l.v,s.f=l.f,Ht(l.r,l.c,o,s),ne.saveParam("v",l.index,l.v,{r:l.r,c:l.c})}xe.webWorkerFlowDataCache(h.flowdata),e.groupValuesRefreshData=[]}},delFunctionGroup:function(e,n,t){t==null&&(t=h.currentSheetIndex);let l=Et(),a=l[Z(t)],o=a.calcChain;if(o!=null)for(let u=0;u<o.length;u++){let f=o[u];if(f.r==e&&f.c==n&&f.index==t){o.splice(u,1),ne.saveParam("fc",t,null,{op:"del",pos:u});break}}let s=a.dynamicArray;if(s!=null)for(let u=0;u<s.length;u++){let f=s[u];if(f.r==e&&f.c==n&&(f.index==null||f.index==t)){s.splice(u,1),ne.saveParam("ac",t,null,{op:"del",pos:u});break}}Jn(l)},execfunction:function(e,n,t,l,a,o){let s=this,f=Q().formulaMore;if(e.indexOf(s.error.r)>-1)return[!1,s.error.r,e];s.checkBracketNum(e)||(e+=")"),l==null&&(l=h.currentSheetIndex),h.calculateSheetIndex=l;let d=$.trim(s.functionParserExe(e));if((d.substr(0,20)=="luckysheet_function."||d.substr(0,22)=="luckysheet_compareWith")&&(s.functionHTMLIndex=0),!s.testFunction(e,d)||d=="")return U.info("",f.execfunctionError),[!1,s.error.n,e];let m=null;window.luckysheetCurrentRow=n,window.luckysheetCurrentColumn=t,window.luckysheetCurrentIndex=l,window.luckysheetCurrentFunction=e;let g=null;try{if(d.indexOf("luckysheet_getcelldata")>-1){let v=d.split("luckysheet_getcelldata('");for(let b=1;b<v.length;b++){let k=v[b].split("')")[0],w=s.getcellrange(k);if(w.row[0]<0||w.column[0]<0)return[!0,s.error.r,e];if(w.sheetIndex==h.calculateSheetIndex&&n>=w.row[0]&&n<=w.row[1]&&t>=w.column[0]&&t<=w.column[1])return fe()?alert(f.execfunctionSelfError):U.info("",f.execfunctionSelfErrorResult),[!1,0,e]}}m=new Function("return "+d)(),typeof m=="string"&&(m=m.replace(/\x7F/g,'"')),d.indexOf("SPLINES")>-1&&(g=m,m="")}catch(v){let b=v;console.log(v,d),b=s.errorInfo(b),m=[s.error.n,b]}P(m)=="object"&&m.startCell!=null&&(P(m.data)=="array"?m=s.error.v:P(m.data)=="object"&&!me(m.data.v)?m=m.data.v:me(m.data)?m=0:m.cell>1||m.rowl>1?m=m.data:m=0);let y=null;if(P(m)=="array"){let v=!1;P(m[0])!="array"&&m.length==2&&(v=H(m[0])),v?m=m[0]:P(m[0])=="array"&&m.length==1&&m[0].length==1?m=m[0][0]:(y={r:n,c:t,f:e,index:l,data:m},m="")}return window.luckysheetCurrentRow=null,window.luckysheetCurrentColumn=null,window.luckysheetCurrentIndex=null,window.luckysheetCurrentFunction=null,n!=null&&t!=null&&(a&&s.execFunctionGroup(n,t,m,l),o||s.insertUpdateFunctionGroup(n,t,l)),g?[!0,m,e,{type:"sparklines",data:g}]:y?[!0,m,e,{type:"dynamicArrayItem",data:y}]:[!0,m,e]},testFunction:function(e,n){return e.substr(0,1)=="="},execstringformula:function(e,n,t,l){let a=this;return this.execfunction(e,n,t,l)},functionResizeData:{},functionResizeStatus:!1,functionResizeTimeout:null,data_parm_index:0},p=Tv});function Do(e,n="redo"){if(e==null)return;let t=e.data;n=="undo"&&(t=e.curdata);for(let l=0;l<e.range.length;l++){let a=e.range[l].row[0],o=e.range[l].row[1],s=e.range[l].column[0],u=e.range[l].column[1];for(let f=a;f<o+1;f++)for(let d=s;d<u+1&&!(f>t.length-1);d++)t[f][d]==null||t[f][d].f==null||t[f][d].f==""?p.delFunctionGroup(f,d,e.sheetIndex):t[f][d]!=null&&t[f][d].f!=null&&t[f][d].f.length>0&&p.insertUpdateFunctionGroup(f,d,e.sheetIndex)}}var Sv,Tn,Mo=Ie(()=>{dl();Qt();on();gr();Ur();qr();yr();Ua();Ja();kn();Ut();Ba();Vr();Yt();Nt();Xe();Zt();Ll();Sv={redo:function(e){if(h.jfredo.length==0)return;let n=h.jfredo.pop();if(h.jfundo.push(n),h.clearjfundo=!1,ve.hasSheet(n.sheetIndex)&&h.currentSheetIndex!=n.sheetIndex&&ve.changeSheetExec(n.sheetIndex),n.type=="datachange"){Do(n);let l={cfg:n.config,RowlChange:n.RowlChange,cdformat:n.cdformat,dataVerification:n.dataVerification,dynamicArray:n.dynamicArray,hyperlink:n.hyperlink};Ze(n.data,n.dataRange,l)}else if(n.type=="pasteCut"){let l={sheetIndex:n.source.sheetIndex,data:n.source.curData,curData:n.source.data,config:n.source.curConfig,curConfig:n.source.config,cdformat:n.source.curCdformat,curCdformat:n.source.cdformat,dataVerification:n.source.curDataVerification,curDataVerification:n.source.dataVerification,range:n.source.range},a={sheetIndex:n.target.sheetIndex,data:n.target.curData,curData:n.target.data,config:n.target.curConfig,curConfig:n.target.config,cdformat:n.target.curCdformat,curCdformat:n.target.cdformat,dataVerification:n.target.curDataVerification,curDataVerification:n.target.dataVerification,range:n.target.range};Ga(l,a,n.RowlChange)}else if(n.type=="rangechange")Do(n),Ea(n.data,n.range,n.cdformat);else if(n.type=="resize"){h.config=n.config,h.luckysheetfile[Z(n.sheetIndex)].config=h.config,n.ctrlType=="resizeR"?ne.saveParam("cg",n.sheetIndex,n.config.rowlen,{k:"rowlen"}):n.ctrlType=="resizeC"&&ne.saveParam("cg",n.sheetIndex,n.config.columnlen,{k:"columnlen"});let l=$.extend(!0,{},n.images);h.luckysheetfile[Z(n.sheetIndex)].images=l,ne.saveParam("all",n.sheetIndex,l,{k:"images"}),Re.images=l,Re.allImagesShow(),St(h.flowdata.length,h.flowdata[0].length)}else if(n.type=="cellRowChange")Zl(n.data[0].length,n.data.length,n.data,n.config,n.range,n.ctrlType,n.ctrlValue,n.cdformat);else if(n.type=="extend")Zl(n.data[0].length,n.data.length,n.data,n.config,n.range,"dele",n.ctrlValue);else if(n.type=="dele"){let l=$.extend(!0,{},n.ctrlValue);l.restore=!0,Zl(n.data[0].length,n.data.length,n.data,n.config,n.range,"extend",l)}else if(n.type=="addRC"){let l=$.extend(!0,{},n.ctrlValue);l.direction=="rightbottom"&&(l.index=l.index+1),jn(n.data,n.config,"delRC",l,n.calc,n.filterObj,n.cf,n.af,n.freezen,n.dataVerification,n.hyperlink)}else if(n.type=="delRC"){let l=$.extend(!0,{},n.ctrlValue);l.restore=!0,l.direction="lefttop",jn(n.data,n.config,"addRC",l,n.calc,n.filterObj,n.cf,n.af,n.freezen,n.dataVerification,n.hyperlink)}else if(n.type=="deleteCell")Ai(n.data,n.config,n.ctrl,n.calc,n.filterObj,n.cf,n.dataVerification,n.hyperlink);else if(n.type=="showHidRows")h.config=n.config,h.luckysheetfile[Z(n.sheetIndex)].config=n.config,ne.saveParam("cg",n.sheetIndex,n.config.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length);else if(n.type=="showHidCols")h.config=n.config,h.luckysheetfile[Z(n.sheetIndex)].config=n.config,ne.saveParam("cg",n.sheetIndex,n.config.colhidden,{k:"colhidden"}),St(h.flowdata.length,h.flowdata[0].length);else if(n.type=="datachangeAll")p.execFunctionGroup(),Zl(n.data[0].length,n.data.length,n.data,null,n.range,"datachangeAll",n.ctrlValue);else if(n.type=="datachangeAll_filter_clear")Dl(n.filter_save),$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").each(function(l){let a=$(this),o=n.optiongroups[l];Vn(a,o.optionstate,o.rowhidden,o.caljs,!1,o.st_r,o.ed_r,o.cindex,o.st_c,o.ed_c)}),ne.saveParam("fsr",h.currentSheetIndex,{filter:n.optiongroups,filter_select:n.filter_save}),h.config=n.config,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,h.config.rowhidden==null&&(h.config.rowhidden={}),ne.saveParam("cg",h.currentSheetIndex,h.config.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide();else if(n.type=="datachangeAll_filter"){let l=$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").eq(n.optionsindex),a=l.data("str"),o=l.data("edr"),s=l.data("cindex"),u=l.data("stc"),f=l.data("edc");Vn(l,Hn.hasKey(n.rowhidenPre),n.rowhidenPre,n.caljs,!0,a,o,s,u,f),h.config=n.config,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,h.config.rowhidden==null&&(h.config.rowhidden={}),ne.saveParam("cg",h.currentSheetIndex,h.config.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide()}else if(n.type=="filtershow")$("#luckysheet-filter-selected-sheet"+n.sheetIndex+", #luckysheet-filter-options-sheet"+n.sheetIndex).remove(),ne.allowUpdate&&ne.saveParam("all",n.sheetIndex,null,{k:"filter_select"});else if(n.type=="pivotTable_change")h.luckysheetfile[Z(n.sheetIndex)].pivotTable=n.pivotTable,Oe.getCellData(n.sheetIndex),Oe.initialPivotManage(!0),Oe.refreshPivotTable();else if(n.type=="addSheet")ve.deleteSheet(n.index),ve.changeSheetExec(n.currentSheetIndex),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide();else if(n.type=="copySheet")ve.deleteSheet(n.index),ve.changeSheetExec(n.copyindex);else if(n.type=="deleteSheet"){let l=!1;for(let a=0;a<h.luckysheetfile.length;a++)h.luckysheetfile[a].name==n.name&&(l=!0);l||(ve.createSheetbydata(n,"isrenew"),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide())}else if(n.type=="sheetName")h.luckysheetfile[Z(n.sheetIndex)].name=n.oldtxt,$("#luckysheet-sheets-item"+n.sheetIndex).find(".luckysheet-sheets-item-name").html(n.oldtxt),ne.saveParam("all",n.sheetIndex,n.oldtxt,{k:"name"});else if(n.type=="sheetColor"){h.luckysheetfile[Z(n.sheetIndex)].color=n.oldcolor;let l=$("#luckysheet-sheets-item"+n.sheetIndex);l.find(".luckysheet-sheets-item-color").remove(),n.oldcolor!=null&&l.append('<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+n.oldcolor+';"></div>'),ne.saveParam("all",n.sheetIndex,n.oldcolor,{k:"color"})}else if(n.type=="mergeChange"){let l={cfg:n.config};Ze(n.data,n.range,l)}else if(n.type=="updateDataVerification")Ye.ref(n.currentDataVerification,n.historyDataVerification,n.sheetIndex);else if(n.type=="updateDataVerificationOfCheckbox")Ye.refOfCheckbox(n.currentDataVerification,n.historyDataVerification,n.sheetIndex,n.data,n.range);else if(n.type=="updateHyperlink")Cl.ref(n.currentHyperlink,n.historyHyperlink,n.sheetIndex,n.data,n.range);else if(n.type=="updateCF"){let l=n.data.historyRules;for(let a=0;a<l.length;a++){let o=l[a].sheetIndex;h.luckysheetfile[Z(o)].luckysheet_conditionformat_save=l[a].luckysheet_conditionformat_save,ne.allowUpdate&&ne.saveParam("all",o,l[a].luckysheet_conditionformat_save,{k:"luckysheet_conditionformat_save"})}$e.ref()}else if(n.type=="updateAF"){let l=n.data.historyRules,a=Z(n.sheetIndex);h.luckysheetfile[a].luckysheet_alternateformat_save=$.extend(!0,[],l),setTimeout(function(){Be()},1)}else if(n.type=="borderChange")n.config.borderInfo==null?ne.saveParam("cg",n.sheetIndex,[],{k:"borderInfo"}):ne.saveParam("cg",n.sheetIndex,n.config.borderInfo,{k:"borderInfo"}),h.config=n.config,h.luckysheetfile[Z(n.sheetIndex)].config=h.config,setTimeout(function(){Be()},1);else if(n.type=="postil"){He.ref(n.data,n.rc);for(let l=0;l<n.rc.length;l++){let a=n.rc[l].split("_")[0],o=n.rc[l].split("_")[1];n.data[a][o]!=null&&n.data[a][o].ps!=null?He.buildPs(a,o,n.data[a][o].ps):He.buildPs(a,o,null)}}else n.type=="imageCtrl"?(Re.images=$.extend(!0,{},n.images),Re.allImagesShow(),Re.ref()):n.type=="zoomChange"&&(h.zoomRatio=n.zoomRatio,ne.saveParam("all",n.currentSheetIndex,n.zoomRatio,{k:"zoomRatio"}),ir(),Za());rl(e),n.range&&(h.luckysheet_select_save=n.range,lt()),h.clearjfundo=!0;let t=au(Ue({},n),{data:n.curdata,curdata:n.data});Je.createHookFunction("updated",t)},undo:function(){if(h.jfundo.length==0)return;let e=h.jfundo.pop();if(h.jfredo.push(e),h.clearjfundo=!1,ve.hasSheet(e.sheetIndex)&&h.currentSheetIndex!=e.sheetIndex&&ve.changeSheetExec(e.sheetIndex),e.type=="datachange"){p.execFunctionGroup();let n={cfg:e.curConfig,RowlChange:e.RowlChange,cdformat:e.curCdformat,dataVerification:e.curDataVerification,dynamicArray:e.curDynamicArray,hyperlink:e.curHyperlink};Do(e,"undo"),Ze(e.curdata,e.range,n)}else if(e.type=="pasteCut")Ga(e.source,e.target,e.RowlChange);else if(e.type=="rangechange")Do(e,"undo"),Ea(e.curdata,e.range,e.curCdformat);else if(e.type=="resize"){h.config=e.curconfig,h.luckysheetfile[Z(e.sheetIndex)].config=h.config,e.ctrlType=="resizeR"?ne.saveParam("cg",e.sheetIndex,e.curconfig.rowlen,{k:"rowlen"}):e.ctrlType=="resizeC"&&ne.saveParam("cg",e.sheetIndex,e.curconfig.columnlen,{k:"columnlen"});let n=$.extend(!0,{},e.curImages);h.luckysheetfile[Z(e.sheetIndex)].images=n,ne.saveParam("all",e.sheetIndex,n,{k:"images"}),Re.images=n,Re.allImagesShow(),St(h.flowdata.length,h.flowdata[0].length)}else if(e.type=="cellRowChange")Zl(e.curdata[0].length,e.curdata.length,e.curdata,e.curconfig,e.currange,e.ctrlType,e.ctrlValue,e.curCdformat);else if(e.type=="extend")Zl(e.curdata[0].length,e.curdata.length,e.curdata,e.curconfig,e.currange,e.ctrlType,e.ctrlValue);else if(e.type=="dele"){let n=$.extend(!0,{},e.ctrlValue);n.restore=!0,Zl(e.curdata[0].length,e.curdata.length,e.curdata,e.curconfig,e.currange,e.ctrlType,e.ctrlValue)}else if(e.type=="addRC")jn(e.curData,e.curConfig,"addRC",e.ctrlValue,e.curCalc,e.curFilterObj,e.curCf,e.curAf,e.curFreezen,e.curDataVerification,e.curHyperlink);else if(e.type=="delRC")jn(e.curData,e.curConfig,"delRC",e.ctrlValue,e.curCalc,e.curFilterObj,e.curCf,e.curAf,e.curFreezen,e.curDataVerification,e.curHyperlink);else if(e.type=="deleteCell")Ai(e.curData,e.curConfig,e.ctrl,e.curCalc,e.curFilterObj,e.curCf,e.curDataVerification,e.curHyperlink);else if(e.type=="showHidRows")h.config=e.curconfig,h.luckysheetfile[Z(e.sheetIndex)].config=e.curconfig,ne.saveParam("cg",e.sheetIndex,e.curconfig.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length);else if(e.type=="showHidCols")h.config=e.curconfig,h.luckysheetfile[Z(e.sheetIndex)].config=e.curconfig,ne.saveParam("cg",e.sheetIndex,e.curconfig.colhidden,{k:"colhidden"}),St(h.flowdata.length,h.flowdata[0].length);else if(e.type=="datachangeAll")p.execFunctionGroup(),Zl(e.curdata[0].length,e.curdata.length,e.curdata,null,e.currange,"datachangeAll",e.ctrlValue);else if(e.type=="datachangeAll_filter_clear")ne.saveParam("fsc",h.currentSheetIndex,null),h.config=e.curconfig,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,{},{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length),$("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide().find("input").val(),$("#luckysheet-filter-selected span").data("type","0").data("type",null).text("\u65E0"),$("#luckysheet-filter-selected-sheet"+h.currentSheetIndex+", #luckysheet-filter-options-sheet"+h.currentSheetIndex).remove(),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide();else if(e.type=="datachangeAll_filter"){let n=$("#luckysheet-filter-options-sheet"+h.currentSheetIndex+" .luckysheet-filter-options").eq(e.optionsindex),t=n.data("str"),l=n.data("edr"),a=n.data("cindex"),o=n.data("stc"),s=n.data("edc");Vn(n,Hn.hasKey(e.rowhidden),e.rowhidden,e.caljs,!0,t,l,a,o,s),h.config=e.curconfig,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,h.config.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide()}else if(e.type=="filtershow")h.luckysheet_select_save=[e.filter_save],h.filterchage=!1,Ri(),h.filterchage=!0,ne.saveParam("all",e.sheetIndex,e.filter_save,{k:"filter_select"});else if(e.type=="pivotTable_change")h.luckysheetfile[Z(e.sheetIndex)].pivotTable=e.pivotTablecur,Oe.getCellData(e.sheetIndex),Oe.initialPivotManage(!0),Oe.refreshPivotTable();else if(e.type=="addSheet")ve.createSheetbydata(e.sheetconfig),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide();else if(e.type=="copySheet")ve.copySheet(e.copyindex);else if(e.type=="deleteSheet")ve.deleteSheet(e.index),e.order==0?ve.changeSheetExec(h.luckysheetfile[0].index):ve.changeSheetExec(h.luckysheetfile[e.order-1].index),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide();else if(e.type=="sheetName")h.luckysheetfile[Z(e.sheetIndex)].name=e.txt,$("#luckysheet-sheets-item"+e.sheetIndex).find(".luckysheet-sheets-item-name").html(e.txt),ne.saveParam("all",e.sheetIndex,e.txt,{k:"name"});else if(e.type=="sheetColor"){h.luckysheetfile[Z(e.sheetIndex)].color=e.color;let n=$("#luckysheet-sheets-item"+e.sheetIndex);n.find(".luckysheet-sheets-item-color").remove(),e.color!=null&&n.append('<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+e.color+';"></div>'),ne.saveParam("all",e.sheetIndex,e.color,{k:"color"})}else if(e.type=="mergeChange"){let n={cfg:e.curConfig};Ze(e.curData,e.range,n)}else if(e.type=="updateDataVerification")Ye.ref(e.historyDataVerification,e.currentDataVerification,e.sheetIndex);else if(e.type=="updateDataVerificationOfCheckbox")Ye.refOfCheckbox(e.historyDataVerification,e.currentDataVerification,e.sheetIndex,e.curData,e.range);else if(e.type=="updateHyperlink")Cl.ref(e.historyHyperlink,e.currentHyperlink,e.sheetIndex,e.curData,e.range);else if(e.type=="updateCF"){let n=e.data.currentRules;for(let t=0;t<n.length;t++){let l=n[t].sheetIndex;h.luckysheetfile[Z(l)].luckysheet_conditionformat_save=n[t].luckysheet_conditionformat_save,ne.allowUpdate&&ne.saveParam("all",l,n[t].luckysheet_conditionformat_save,{k:"luckysheet_conditionformat_save"})}$e.ref()}else if(e.type=="updateAF"){let n=e.data.currentRules,t=Z(e.sheetIndex);h.luckysheetfile[t].luckysheet_alternateformat_save=$.extend(!0,[],n),setTimeout(function(){Be()},1)}else if(e.type=="borderChange")ne.saveParam("cg",e.sheetIndex,e.curconfig.borderInfo,{k:"borderInfo"}),h.config=e.curconfig,h.luckysheetfile[Z(e.sheetIndex)].config=h.config,setTimeout(function(){Be()},1);else if(e.type=="postil"){He.ref(e.curdata,e.rc);for(let n=0;n<e.rc.length;n++){let t=e.rc[n].split("_")[0],l=e.rc[n].split("_")[1];e.curdata[t][l]!=null&&e.curdata[t][l].ps!=null?He.buildPs(t,l,e.curdata[t][l].ps):He.buildPs(t,l,null)}}else e.type=="imageCtrl"?(Re.images=$.extend(!0,{},e.curImages),Re.allImagesShow(),Re.ref()):e.type=="zoomChange"&&(h.zoomRatio=e.curZoomRatio,ne.saveParam("all",e.currentSheetIndex,e.curZoomRatio,{k:"zoomRatio"}),ir(),Za());e.range&&(h.luckysheet_select_save=e.range,lt()),h.clearjfundo=!0}},Tn=Sv});var Fo,Yn,Sc=Ie(()=>{Fo=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Yn={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return typeof console!="undefined"&&console.warn(e)},getWeek:function(e){var n=new Date(e.getTime());n.setHours(0,0,0,0),n.setDate(n.getDate()+3-(n.getDay()+6)%7);var t=new Date(n.getFullYear(),0,4);return 1+Math.round(((n.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1}});var Eo,No,$c=Ie(()=>{Eo={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var n=e%100;if(n>3&&n<21)return"th";switch(n%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},No=Eo});function Ic(e,n){var t;return function(){var l=this,a=arguments;clearTimeout(t),t=setTimeout(function(){return e.apply(l,a)},n)}}var ql,sr,Po,Rc=Ie(()=>{ql=function(e,n){return n===void 0&&(n=2),("000"+e).slice(n*-1)},sr=function(e){return e===!0?1:0};Po=function(e){return e instanceof Array?e:[e]}});function jl(e,n,t){if(t===!0)return e.classList.add(n);e.classList.remove(n)}function Xt(e,n,t){var l=window.document.createElement(e);return n=n||"",t=t||"",l.className=n,t!==void 0&&(l.textContent=t),l}function Bi(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function Ac(e,n){if(n(e))return e;if(e.parentNode)return Ac(e.parentNode,n)}function Hi(e,n){var t=Xt("div","numInputWrapper"),l=Xt("input","numInput "+e),a=Xt("span","arrowUp"),o=Xt("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?l.type="number":(l.type="text",l.pattern="\\d*"),n!==void 0)for(var s in n)l.setAttribute(s,n[s]);return t.appendChild(l),t.appendChild(a),t.appendChild(o),t}function cr(e){try{if(typeof e.composedPath=="function"){var n=e.composedPath();return n[0]}return e.target}catch(t){return e.target}}var zd=Ie(()=>{});var Dc,Vi,Od,Sn,Qa,Mc=Ie(()=>{Rc();Dc=function(){},Vi=function(e,n,t){return t.months[n?"shorthand":"longhand"][e]},Od={D:Dc,F:function(e,n,t){e.setMonth(t.months.longhand.indexOf(n))},G:function(e,n){e.setHours((e.getHours()>=12?12:0)+parseFloat(n))},H:function(e,n){e.setHours(parseFloat(n))},J:function(e,n){e.setDate(parseFloat(n))},K:function(e,n,t){e.setHours(e.getHours()%12+12*sr(new RegExp(t.amPM[1],"i").test(n)))},M:function(e,n,t){e.setMonth(t.months.shorthand.indexOf(n))},S:function(e,n){e.setSeconds(parseFloat(n))},U:function(e,n){return new Date(parseFloat(n)*1e3)},W:function(e,n,t){var l=parseInt(n),a=new Date(e.getFullYear(),0,2+(l-1)*7,0,0,0,0);return a.setDate(a.getDate()-a.getDay()+t.firstDayOfWeek),a},Y:function(e,n){e.setFullYear(parseFloat(n))},Z:function(e,n){return new Date(n)},d:function(e,n){e.setDate(parseFloat(n))},h:function(e,n){e.setHours((e.getHours()>=12?12:0)+parseFloat(n))},i:function(e,n){e.setMinutes(parseFloat(n))},j:function(e,n){e.setDate(parseFloat(n))},l:Dc,m:function(e,n){e.setMonth(parseFloat(n)-1)},n:function(e,n){e.setMonth(parseFloat(n)-1)},s:function(e,n){e.setSeconds(parseFloat(n))},u:function(e,n){return new Date(parseFloat(n))},w:Dc,y:function(e,n){e.setFullYear(2e3+parseFloat(n))}},Sn={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Qa={Z:function(e){return e.toISOString()},D:function(e,n,t){return n.weekdays.shorthand[Qa.w(e,n,t)]},F:function(e,n,t){return Vi(Qa.n(e,n,t)-1,!1,n)},G:function(e,n,t){return ql(Qa.h(e,n,t))},H:function(e){return ql(e.getHours())},J:function(e,n){return n.ordinal!==void 0?e.getDate()+n.ordinal(e.getDate()):e.getDate()},K:function(e,n){return n.amPM[sr(e.getHours()>11)]},M:function(e,n){return Vi(e.getMonth(),!0,n)},S:function(e){return ql(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,n,t){return t.getWeek(e)},Y:function(e){return ql(e.getFullYear(),4)},d:function(e){return ql(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return ql(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,n){return n.weekdays.longhand[e.getDay()]},m:function(e){return ql(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}}});function ur(e,n,t){return t===void 0&&(t=!0),t!==!1?new Date(e.getTime()).setHours(0,0,0,0)-new Date(n.getTime()).setHours(0,0,0,0):e.getTime()-n.getTime()}function Oo(e){var n=e.defaultHour,t=e.defaultMinute,l=e.defaultSeconds;if(e.minDate!==void 0){var a=e.minDate.getHours(),o=e.minDate.getMinutes(),s=e.minDate.getSeconds();n<a&&(n=a),n===a&&t<o&&(t=o),n===a&&t===o&&l<s&&(l=e.minDate.getSeconds())}if(e.maxDate!==void 0){var u=e.maxDate.getHours(),f=e.maxDate.getMinutes();n=Math.min(n,u),n===u&&(t=Math.min(f,t)),n===u&&t===f&&(l=e.maxDate.getSeconds())}return{hours:n,minutes:t,seconds:l}}var Fc,Lo,Bd,zo,Hd,Vd,qd=Ie(()=>{Mc();Sc();$c();Fc=function(e){var n=e.config,t=n===void 0?Yn:n,l=e.l10n,a=l===void 0?Eo:l,o=e.isMobile,s=o===void 0?!1:o;return function(u,f,d){var m=d||a;return t.formatDate!==void 0&&!s?t.formatDate(u,f,m):f.split("").map(function(g,y,v){return Qa[g]&&v[y-1]!=="\\"?Qa[g](u,m,t):g!=="\\"?g:""}).join("")}},Lo=function(e){var n=e.config,t=n===void 0?Yn:n,l=e.l10n,a=l===void 0?Eo:l;return function(o,s,u,f){if(!(o!==0&&!o)){var d=f||a,m,g=o;if(o instanceof Date)m=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)m=new Date(o);else if(typeof o=="string"){var y=s||(t||Yn).dateFormat,v=String(o).trim();if(v==="today")m=new Date,u=!0;else if(t&&t.parseDate)m=t.parseDate(o,y);else if(/Z$/.test(v)||/GMT$/.test(v))m=new Date(o);else{for(var b=void 0,k=[],w=0,x=0,C="";w<y.length;w++){var S=y[w],_=S==="\\",T=y[w-1]==="\\"||_;if(Sn[S]&&!T){C+=Sn[S];var A=new RegExp(C).exec(o);A&&(b=!0)&&k[S!=="Y"?"push":"unshift"]({fn:Od[S],val:A[++x]})}else _||(C+=".")}m=!t||!t.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),k.forEach(function(R){var I=R.fn,F=R.val;return m=I(m,F,d)||m}),m=b?m:void 0}}if(!(m instanceof Date&&!isNaN(m.getTime()))){t.errorHandler(new Error("Invalid date provided: "+g));return}return u===!0&&m.setHours(0,0,0,0),m}}};Bd=function(e,n,t){return e>Math.min(n,t)&&e<Math.max(n,t)},zo=function(e,n,t){return e*3600+n*60+t},Hd=function(e){var n=Math.floor(e/3600),t=(e-n*3600)/60;return[n,t,e-n*3600-t*60]},Vd={DAY:864e5}});var jd=Ie(()=>{"use strict";typeof Object.assign!="function"&&(Object.assign=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var l=function(u){u&&Object.keys(u).forEach(function(f){return e[f]=u[f]})},a=0,o=n;a<o.length;a++){var s=o[a];l(s)}return e})});function Iv(e,n){var t={config:Ul(Ul({},Yn),Tl.defaultConfig),l10n:No};t.parseDate=Lo({config:t.config,l10n:t.l10n}),t._handlers=[],t.pluginElements=[],t.loadedPlugins=[],t._bind=k,t._setHoursFromDate=y,t._positionCalendar=Ne,t.changeMonth=le,t.changeYear=K,t.clear=oe,t.close=se,t.onMouseOver=Te,t._createElement=Xt,t.createDay=A,t.destroy=ce,t.isEnabled=G,t.jumpToDate=C,t.updateValue=Gl,t.open=Ee,t.redraw=It,t.set=Se,t.setDate=Fe,t.toggle=Dt;function l(){t.utils={getDaysInMonth:function(J,re){return J===void 0&&(J=t.currentMonth),re===void 0&&(re=t.currentYear),J===1&&(re%4==0&&re%100!=0||re%400==0)?29:t.l10n.daysInMonth[J]}}}function a(){t.element=t.input=e,t.isOpen=!1,Ce(),Ge(),ht(),be(),l(),t.isMobile||T(),x(),(t.selectedDates.length||t.config.noCalendar)&&(t.config.enableTime&&y(t.config.noCalendar?t.latestSelectedDateObj:void 0),Gl(!1)),u();var J=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!t.isMobile&&J&&Ne(),gt("onReady")}function o(){var J;return((J=t.calendarContainer)===null||J===void 0?void 0:J.getRootNode()).activeElement||document.activeElement}function s(J){return J.bind(t)}function u(){var J=t.config;J.weekNumbers===!1&&J.showMonths===1||J.noCalendar!==!0&&window.requestAnimationFrame(function(){if(t.calendarContainer!==void 0&&(t.calendarContainer.style.visibility="hidden",t.calendarContainer.style.display="block"),t.daysContainer!==void 0){var re=(t.days.offsetWidth+1)*J.showMonths;t.daysContainer.style.width=re+"px",t.calendarContainer.style.width=re+(t.weekWrapper!==void 0?t.weekWrapper.offsetWidth:0)+"px",t.calendarContainer.style.removeProperty("visibility"),t.calendarContainer.style.removeProperty("display")}})}function f(J){if(t.selectedDates.length===0){var re=t.config.minDate===void 0||ur(new Date,t.config.minDate)>=0?new Date:new Date(t.config.minDate.getTime()),ge=Oo(t.config);re.setHours(ge.hours,ge.minutes,ge.seconds,re.getMilliseconds()),t.selectedDates=[re],t.latestSelectedDateObj=re}J!==void 0&&J.type!=="blur"&&Kn(J);var we=t._input.value;g(),Gl(),t._input.value!==we&&t._debouncedChange()}function d(J,re){return J%12+12*sr(re===t.l10n.amPM[1])}function m(J){switch(J%24){case 0:case 12:return 12;default:return J%12}}function g(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var J=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,re=(parseInt(t.minuteElement.value,10)||0)%60,ge=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(J=d(J,t.amPM.textContent));var we=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&ur(t.latestSelectedDateObj,t.config.minDate,!0)===0,Ve=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&ur(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Qe=zo(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Rt=zo(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),ut=zo(J,re,ge);if(ut>Rt&&ut<Qe){var Bt=Hd(Qe);J=Bt[0],re=Bt[1],ge=Bt[2]}}else{if(Ve){var ct=t.config.maxTime!==void 0?t.config.maxTime:t.config.maxDate;J=Math.min(J,ct.getHours()),J===ct.getHours()&&(re=Math.min(re,ct.getMinutes())),re===ct.getMinutes()&&(ge=Math.min(ge,ct.getSeconds()))}if(we){var yt=t.config.minTime!==void 0?t.config.minTime:t.config.minDate;J=Math.max(J,yt.getHours()),J===yt.getHours()&&re<yt.getMinutes()&&(re=yt.getMinutes()),re===yt.getMinutes()&&(ge=Math.max(ge,yt.getSeconds()))}}v(J,re,ge)}}function y(J){var re=J||t.latestSelectedDateObj;re&&re instanceof Date&&v(re.getHours(),re.getMinutes(),re.getSeconds())}function v(J,re,ge){t.latestSelectedDateObj!==void 0&&t.latestSelectedDateObj.setHours(J%24,re,ge||0,0),!(!t.hourElement||!t.minuteElement||t.isMobile)&&(t.hourElement.value=ql(t.config.time_24hr?J:(12+J)%12+12*sr(J%12==0)),t.minuteElement.value=ql(re),t.amPM!==void 0&&(t.amPM.textContent=t.l10n.amPM[sr(J>=12)]),t.secondElement!==void 0&&(t.secondElement.value=ql(ge)))}function b(J){var re=cr(J),ge=parseInt(re.value)+(J.delta||0);(ge/1e3>1||J.key==="Enter"&&!/[^\d]/.test(ge.toString()))&&K(ge)}function k(J,re,ge,we){if(re instanceof Array)return re.forEach(function(Ve){return k(J,Ve,ge,we)});if(J instanceof Array)return J.forEach(function(Ve){return k(Ve,re,ge,we)});J.addEventListener(re,ge,we),t._handlers.push({remove:function(){return J.removeEventListener(re,ge,we)}})}function w(){gt("onChange")}function x(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(ge){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+ge+"]"),function(we){return k(we,"click",t[ge])})}),t.isMobile){Pe();return}var J=Ic(ie,50);if(t._debouncedChange=Ic(w,$v),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&k(t.daysContainer,"mouseover",function(ge){t.config.mode==="range"&&Te(cr(ge))}),k(t._input,"keydown",ae),t.calendarContainer!==void 0&&k(t.calendarContainer,"keydown",ae),!t.config.inline&&!t.config.static&&k(window,"resize",J),window.ontouchstart!==void 0?k(window.document,"touchstart",ue):k(window.document,"mousedown",ue),k(window.document,"focus",ue,{capture:!0}),t.config.clickOpens===!0&&(k(t._input,"focus",t.open),k(t._input,"click",t.open)),t.daysContainer!==void 0&&(k(t.monthNav,"click",Wl),k(t.monthNav,["keyup","increment"],b),k(t.daysContainer,"click",kt)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var re=function(ge){return cr(ge).select()};k(t.timeContainer,["increment"],f),k(t.timeContainer,"blur",f,{capture:!0}),k(t.timeContainer,"click",S),k([t.hourElement,t.minuteElement],["focus","click"],re),t.secondElement!==void 0&&k(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&k(t.amPM,"click",function(ge){f(ge)})}t.config.allowInput&&k(t._input,"blur",pe)}function C(J,re){var ge=J!==void 0?t.parseDate(J):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate<t.now?t.config.maxDate:t.now),we=t.currentYear,Ve=t.currentMonth;try{ge!==void 0&&(t.currentYear=ge.getFullYear(),t.currentMonth=ge.getMonth())}catch(Qe){Qe.message="Invalid date supplied: "+ge,t.config.errorHandler(Qe)}re&&t.currentYear!==we&&(gt("onYearChange"),N()),re&&(t.currentYear!==we||t.currentMonth!==Ve)&>("onMonthChange"),t.redraw()}function S(J){var re=cr(J);~re.className.indexOf("arrow")&&_(J,re.classList.contains("arrowUp")?1:-1)}function _(J,re,ge){var we=J&&cr(J),Ve=ge||we&&we.parentNode&&we.parentNode.firstChild,Qe=ol("increment");Qe.delta=re,Ve&&Ve.dispatchEvent(Qe)}function T(){var J=window.document.createDocumentFragment();if(t.calendarContainer=Xt("div","flatpickr-calendar"),t.calendarContainer.tabIndex=-1,!t.config.noCalendar){if(J.appendChild(V()),t.innerContainer=Xt("div","flatpickr-innerContainer"),t.config.weekNumbers){var re=te(),ge=re.weekWrapper,we=re.weekNumbers;t.innerContainer.appendChild(ge),t.weekNumbers=we,t.weekWrapper=ge}t.rContainer=Xt("div","flatpickr-rContainer"),t.rContainer.appendChild(W()),t.daysContainer||(t.daysContainer=Xt("div","flatpickr-days"),t.daysContainer.tabIndex=-1),E(),t.rContainer.appendChild(t.daysContainer),t.innerContainer.appendChild(t.rContainer),J.appendChild(t.innerContainer)}t.config.enableTime&&J.appendChild(q()),jl(t.calendarContainer,"rangeMode",t.config.mode==="range"),jl(t.calendarContainer,"animate",t.config.animate===!0),jl(t.calendarContainer,"multiMonth",t.config.showMonths>1),t.calendarContainer.appendChild(J);var Ve=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Ve&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Qe=Xt("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Qe,t.element),Qe.appendChild(t.element),t.altInput&&Qe.appendChild(t.altInput),Qe.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function A(J,re,ge,we){var Ve=G(re,!0),Qe=Xt("span",J,re.getDate().toString());return Qe.dateObj=re,Qe.$i=we,Qe.setAttribute("aria-label",t.formatDate(re,t.config.ariaDateFormat)),J.indexOf("hidden")===-1&&ur(re,t.now)===0&&(t.todayDateElem=Qe,Qe.classList.add("today"),Qe.setAttribute("aria-current","date")),Ve?(Qe.tabIndex=-1,sl(re)&&(Qe.classList.add("selected"),t.selectedDateElem=Qe,t.config.mode==="range"&&(jl(Qe,"startRange",t.selectedDates[0]&&ur(re,t.selectedDates[0],!0)===0),jl(Qe,"endRange",t.selectedDates[1]&&ur(re,t.selectedDates[1],!0)===0),J==="nextMonthDay"&&Qe.classList.add("inRange")))):Qe.classList.add("flatpickr-disabled"),t.config.mode==="range"&&Vt(re)&&!sl(re)&&Qe.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&J!=="prevMonthDay"&&we%7==6&&t.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+t.config.getWeek(re)+"</span>"),gt("onDayCreate",Qe),Qe}function R(J){J.focus(),t.config.mode==="range"&&Te(J)}function I(J){for(var re=J>0?0:t.config.showMonths-1,ge=J>0?t.config.showMonths:-1,we=re;we!=ge;we+=J)for(var Ve=t.daysContainer.children[we],Qe=J>0?0:Ve.children.length-1,Rt=J>0?Ve.children.length:-1,ut=Qe;ut!=Rt;ut+=J){var Bt=Ve.children[ut];if(Bt.className.indexOf("hidden")===-1&&G(Bt.dateObj))return Bt}}function F(J,re){for(var ge=J.className.indexOf("Month")===-1?J.dateObj.getMonth():t.currentMonth,we=re>0?t.config.showMonths:-1,Ve=re>0?1:-1,Qe=ge-t.currentMonth;Qe!=we;Qe+=Ve)for(var Rt=t.daysContainer.children[Qe],ut=ge-t.currentMonth===Qe?J.$i+re:re<0?Rt.children.length-1:0,Bt=Rt.children.length,ct=ut;ct>=0&&ct<Bt&&ct!=(re>0?Bt:-1);ct+=Ve){var yt=Rt.children[ct];if(yt.className.indexOf("hidden")===-1&&G(yt.dateObj)&&Math.abs(J.$i-ct)>=Math.abs(re))return R(yt)}t.changeMonth(Ve),z(I(Ve),0)}function z(J,re){var ge=o(),we=ee(ge||document.body),Ve=J!==void 0?J:we?ge:t.selectedDateElem!==void 0&&ee(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&ee(t.todayDateElem)?t.todayDateElem:I(re>0?1:-1);Ve===void 0?t._input.focus():we?F(Ve,re):R(Ve)}function M(J,re){for(var ge=(new Date(J,re,1).getDay()-t.l10n.firstDayOfWeek+7)%7,we=t.utils.getDaysInMonth((re-1+12)%12,J),Ve=t.utils.getDaysInMonth(re,J),Qe=window.document.createDocumentFragment(),Rt=t.config.showMonths>1,ut=Rt?"prevMonthDay hidden":"prevMonthDay",Bt=Rt?"nextMonthDay hidden":"nextMonthDay",ct=we+1-ge,yt=0;ct<=we;ct++,yt++)Qe.appendChild(A("flatpickr-day "+ut,new Date(J,re-1,ct),ct,yt));for(ct=1;ct<=Ve;ct++,yt++)Qe.appendChild(A("flatpickr-day",new Date(J,re,ct),ct,yt));for(var al=Ve+1;al<=42-ge&&(t.config.showMonths===1||yt%7!=0);al++,yt++)Qe.appendChild(A("flatpickr-day "+Bt,new Date(J,re+1,al%Ve),al,yt));var Zr=Xt("div","dayContainer");return Zr.appendChild(Qe),Zr}function E(){if(t.daysContainer!==void 0){Bi(t.daysContainer),t.weekNumbers&&Bi(t.weekNumbers);for(var J=document.createDocumentFragment(),re=0;re<t.config.showMonths;re++){var ge=new Date(t.currentYear,t.currentMonth,1);ge.setMonth(t.currentMonth+re),J.appendChild(M(ge.getFullYear(),ge.getMonth()))}t.daysContainer.appendChild(J),t.days=t.daysContainer.firstChild,t.config.mode==="range"&&t.selectedDates.length===1&&Te()}}function N(){if(!(t.config.showMonths>1||t.config.monthSelectorType!=="dropdown")){var J=function(we){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&we<t.config.minDate.getMonth()?!1:!(t.config.maxDate!==void 0&&t.currentYear===t.config.maxDate.getFullYear()&&we>t.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var re=0;re<12;re++)if(!!J(re)){var ge=Xt("option","flatpickr-monthDropdown-month");ge.value=new Date(t.currentYear,re).getMonth().toString(),ge.textContent=Vi(re,t.config.shorthandCurrentMonth,t.l10n),ge.tabIndex=-1,t.currentMonth===re&&(ge.selected=!0),t.monthsDropdownContainer.appendChild(ge)}}}function L(){var J=Xt("div","flatpickr-month"),re=window.document.createDocumentFragment(),ge;t.config.showMonths>1||t.config.monthSelectorType==="static"?ge=Xt("span","cur-month"):(t.monthsDropdownContainer=Xt("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),k(t.monthsDropdownContainer,"change",function(Rt){var ut=cr(Rt),Bt=parseInt(ut.value,10);t.changeMonth(Bt-t.currentMonth),gt("onMonthChange")}),N(),ge=t.monthsDropdownContainer);var we=Hi("cur-year",{tabindex:"-1"}),Ve=we.getElementsByTagName("input")[0];Ve.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Ve.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Ve.setAttribute("max",t.config.maxDate.getFullYear().toString()),Ve.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Qe=Xt("div","flatpickr-current-month");return Qe.appendChild(ge),Qe.appendChild(we),re.appendChild(Qe),J.appendChild(re),{container:J,yearElement:Ve,monthElement:ge}}function O(){Bi(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var J=t.config.showMonths;J--;){var re=L();t.yearElements.push(re.yearElement),t.monthElements.push(re.monthElement),t.monthNav.appendChild(re.container)}t.monthNav.appendChild(t.nextMonthNav)}function V(){return t.monthNav=Xt("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=Xt("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=Xt("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,O(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(J){t.__hidePrevMonthArrow!==J&&(jl(t.prevMonthNav,"flatpickr-disabled",J),t.__hidePrevMonthArrow=J)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(J){t.__hideNextMonthArrow!==J&&(jl(t.nextMonthNav,"flatpickr-disabled",J),t.__hideNextMonthArrow=J)}}),t.currentYearElement=t.yearElements[0],Kr(),t.monthNav}function q(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var J=Oo(t.config);t.timeContainer=Xt("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var re=Xt("span","flatpickr-time-separator",":"),ge=Hi("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=ge.getElementsByTagName("input")[0];var we=Hi("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=we.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=ql(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?J.hours:m(J.hours)),t.minuteElement.value=ql(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():J.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ge),t.timeContainer.appendChild(re),t.timeContainer.appendChild(we),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Ve=Hi("flatpickr-second");t.secondElement=Ve.getElementsByTagName("input")[0],t.secondElement.value=ql(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():J.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(Xt("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Ve)}return t.config.time_24hr||(t.amPM=Xt("span","flatpickr-am-pm",t.l10n.amPM[sr((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function W(){t.weekdayContainer?Bi(t.weekdayContainer):t.weekdayContainer=Xt("div","flatpickr-weekdays");for(var J=t.config.showMonths;J--;){var re=Xt("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(re)}return X(),t.weekdayContainer}function X(){if(!!t.weekdayContainer){var J=t.l10n.firstDayOfWeek,re=Ud(t.l10n.weekdays.shorthand);J>0&&J<re.length&&(re=Ud(re.splice(J,re.length),re.splice(0,J)));for(var ge=t.config.showMonths;ge--;)t.weekdayContainer.children[ge].innerHTML=` |
| | | <span class='flatpickr-weekday'> |
| | | `+re.join("</span><span class='flatpickr-weekday'>")+` |
| | | </span> |
| | | `}}function te(){t.calendarContainer.classList.add("hasWeeks");var J=Xt("div","flatpickr-weekwrapper");J.appendChild(Xt("span","flatpickr-weekday",t.l10n.weekAbbreviation));var re=Xt("div","flatpickr-weeks");return J.appendChild(re),{weekWrapper:J,weekNumbers:re}}function le(J,re){re===void 0&&(re=!0);var ge=re?J:J-t.currentMonth;ge<0&&t._hidePrevMonthArrow===!0||ge>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ge,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,gt("onYearChange"),N()),E(),gt("onMonthChange"),Kr())}function oe(J,re){if(J===void 0&&(J=!0),re===void 0&&(re=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,re===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ge=Oo(t.config),we=ge.hours,Ve=ge.minutes,Qe=ge.seconds;v(we,Ve,Qe)}t.redraw(),J&>("onChange")}function se(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),gt("onClose")}function ce(){t.config!==void 0&>("onDestroy");for(var J=t._handlers.length;J--;)t._handlers[J].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var re=t.calendarContainer.parentNode;if(re.lastChild&&re.removeChild(re.lastChild),re.parentNode){for(;re.firstChild;)re.parentNode.insertBefore(re.firstChild,re);re.parentNode.removeChild(re)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(ge){try{delete t[ge]}catch(we){}})}function he(J){return t.calendarContainer.contains(J)}function ue(J){if(t.isOpen&&!t.config.inline){var re=cr(J),ge=he(re),we=re===t.input||re===t.altInput||t.element.contains(re)||J.path&&J.path.indexOf&&(~J.path.indexOf(t.input)||~J.path.indexOf(t.altInput)),Ve=!we&&!ge&&!he(J.relatedTarget),Qe=!t.config.ignoredFocusElements.some(function(Rt){return Rt.contains(re)});Ve&&Qe&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&d(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function K(J){if(!(!J||t.config.minDate&&J<t.config.minDate.getFullYear()||t.config.maxDate&&J>t.config.maxDate.getFullYear())){var re=J,ge=t.currentYear!==re;t.currentYear=re||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),ge&&(t.redraw(),gt("onYearChange"),N())}}function G(J,re){var ge;re===void 0&&(re=!0);var we=t.parseDate(J,void 0,re);if(t.config.minDate&&we&&ur(we,t.config.minDate,re!==void 0?re:!t.minDateHasTime)<0||t.config.maxDate&&we&&ur(we,t.config.maxDate,re!==void 0?re:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(we===void 0)return!1;for(var Ve=!!t.config.enable,Qe=(ge=t.config.enable)!==null&&ge!==void 0?ge:t.config.disable,Rt=0,ut=void 0;Rt<Qe.length;Rt++){if(ut=Qe[Rt],typeof ut=="function"&&ut(we))return Ve;if(ut instanceof Date&&we!==void 0&&ut.getTime()===we.getTime())return Ve;if(typeof ut=="string"){var Bt=t.parseDate(ut,void 0,!0);return Bt&&Bt.getTime()===we.getTime()?Ve:!Ve}else if(typeof ut=="object"&&we!==void 0&&ut.from&&ut.to&&we.getTime()>=ut.from.getTime()&&we.getTime()<=ut.to.getTime())return Ve}return!Ve}function ee(J){return t.daysContainer!==void 0?J.className.indexOf("hidden")===-1&&J.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(J):!1}function pe(J){var re=J.target===t._input,ge=t._input.value.trimEnd()!==Xn();re&&ge&&!(J.relatedTarget&&he(J.relatedTarget))&&t.setDate(t._input.value,!0,J.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function ae(J){var re=cr(J),ge=t.config.wrap?e.contains(re):re===t._input,we=t.config.allowInput,Ve=t.isOpen&&(!we||!ge),Qe=t.config.inline&&ge&&!we;if(J.keyCode===13&&ge){if(we)return t.setDate(t._input.value,!0,re===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),re.blur();t.open()}else if(he(re)||Ve||Qe){var Rt=!!t.timeContainer&&t.timeContainer.contains(re);switch(J.keyCode){case 13:Rt?(J.preventDefault(),d(),ot()):kt(J);break;case 27:J.preventDefault(),ot();break;case 8:case 46:ge&&!t.config.allowInput&&(J.preventDefault(),t.clear());break;case 37:case 39:if(!Rt&&!ge){J.preventDefault();var ut=o();if(t.daysContainer!==void 0&&(we===!1||ut&&ee(ut))){var Bt=J.keyCode===39?1:-1;J.ctrlKey?(J.stopPropagation(),le(Bt),z(I(1),0)):z(void 0,Bt)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:J.preventDefault();var ct=J.keyCode===40?1:-1;t.daysContainer&&re.$i!==void 0||re===t.input||re===t.altInput?J.ctrlKey?(J.stopPropagation(),K(t.currentYear-ct),z(I(1),0)):Rt||z(void 0,ct*7):re===t.currentYearElement?K(t.currentYear-ct):t.config.enableTime&&(!Rt&&t.hourElement&&t.hourElement.focus(),d(J),t._debouncedChange());break;case 9:if(Rt){var yt=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(hr){return hr}),al=yt.indexOf(re);if(al!==-1){var Zr=yt[al+(J.shiftKey?-1:1)];J.preventDefault(),(Zr||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(re)&&J.shiftKey&&(J.preventDefault(),t._input.focus());break;default:break}}if(t.amPM!==void 0&&re===t.amPM)switch(J.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],g(),Gl();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],g(),Gl();break}(ge||he(re))&>("onKeyDown",J)}function Te(J,re){if(re===void 0&&(re="flatpickr-day"),!(t.selectedDates.length!==1||J&&(!J.classList.contains(re)||J.classList.contains("flatpickr-disabled")))){for(var ge=J?J.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),we=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Ve=Math.min(ge,t.selectedDates[0].getTime()),Qe=Math.max(ge,t.selectedDates[0].getTime()),Rt=!1,ut=0,Bt=0,ct=Ve;ct<Qe;ct+=Vf.DAY)G(new Date(ct),!0)||(Rt=Rt||ct>Ve&&ct<Qe,ct<we&&(!ut||ct>ut)?ut=ct:ct>we&&(!Bt||ct<Bt)&&(Bt=ct));var yt=Array.from(t.rContainer.querySelectorAll("*:nth-child(-n+"+t.config.showMonths+") > ."+re));yt.forEach(function(al){var Zr=al.dateObj,hr=Zr.getTime(),ni=ut>0&&hr<ut||Bt>0&&hr>Bt;if(ni){al.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(ka){al.classList.remove(ka)});return}else if(Rt&&!ni)return;["startRange","inRange","endRange","notAllowed"].forEach(function(ka){al.classList.remove(ka)}),J!==void 0&&(J.classList.add(ge<=t.selectedDates[0].getTime()?"startRange":"endRange"),we<ge&&hr===we?al.classList.add("startRange"):we>ge&&hr===we&&al.classList.add("endRange"),hr>=ut&&(Bt===0||hr<=Bt)&&Bf(hr,we,ge)&&al.classList.add("inRange"))})}}function ie(){t.isOpen&&!t.config.static&&!t.config.inline&&Ne()}function Ee(J,re){if(re===void 0&&(re=t._positionElement),t.isMobile===!0){if(J){J.preventDefault();var ge=cr(J);ge&&ge.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),gt("onOpen");return}else if(t._input.disabled||t.config.inline)return;var we=t.isOpen;t.isOpen=!0,we||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),gt("onOpen"),Ne(re)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(J===void 0||!t.timeContainer.contains(J.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function je(J){return function(re){var ge=t.config["_"+J+"Date"]=t.parseDate(re,t.config.dateFormat),we=t.config["_"+(J==="min"?"max":"min")+"Date"];ge!==void 0&&(t[J==="min"?"minDateHasTime":"maxDateHasTime"]=ge.getHours()>0||ge.getMinutes()>0||ge.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Ve){return G(Ve)}),!t.selectedDates.length&&J==="min"&&y(ge),Gl()),t.daysContainer&&(It(),ge!==void 0?t.currentYearElement[J]=ge.getFullYear().toString():t.currentYearElement.removeAttribute(J),t.currentYearElement.disabled=!!we&&ge!==void 0&&we.getFullYear()===ge.getFullYear())}}function Ce(){var J=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],re=Ul(Ul({},JSON.parse(JSON.stringify(e.dataset||{}))),n),ge={};t.config.parseDate=re.parseDate,t.config.formatDate=re.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(yt){t.config._enable=ye(yt)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(yt){t.config._disable=ye(yt)}});var we=re.mode==="time";if(!re.dateFormat&&(re.enableTime||we)){var Ve=Tl.defaultConfig.dateFormat||Yn.dateFormat;ge.dateFormat=re.noCalendar||we?"H:i"+(re.enableSeconds?":S":""):Ve+" H:i"+(re.enableSeconds?":S":"")}if(re.altInput&&(re.enableTime||we)&&!re.altFormat){var Qe=Tl.defaultConfig.altFormat||Yn.altFormat;ge.altFormat=re.noCalendar||we?"h:i"+(re.enableSeconds?":S K":" K"):Qe+(" h:i"+(re.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:je("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:je("max")});var Rt=function(yt){return function(al){t.config[yt==="min"?"_minTime":"_maxTime"]=t.parseDate(al,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Rt("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Rt("max")}),re.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,ge,re);for(var ut=0;ut<J.length;ut++)t.config[J[ut]]=t.config[J[ut]]===!0||t.config[J[ut]]==="true";Fo.filter(function(yt){return t.config[yt]!==void 0}).forEach(function(yt){t.config[yt]=Po(t.config[yt]||[]).map(s)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var ut=0;ut<t.config.plugins.length;ut++){var Bt=t.config.plugins[ut](t)||{};for(var ct in Bt)Fo.indexOf(ct)>-1?t.config[ct]=Po(Bt[ct]).map(s).concat(t.config[ct]):typeof re[ct]=="undefined"&&(t.config[ct]=Bt[ct])}re.altInputClass||(t.config.altInputClass=Le().className+" "+t.config.altInputClass),gt("onParseConfig")}function Le(){return t.config.wrap?e.querySelector("[data-input]"):e}function Ge(){typeof t.config.locale!="object"&&typeof Tl.l10ns[t.config.locale]=="undefined"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=Ul(Ul({},Tl.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Tl.l10ns[t.config.locale]:void 0),Sn.D="("+t.l10n.weekdays.shorthand.join("|")+")",Sn.l="("+t.l10n.weekdays.longhand.join("|")+")",Sn.M="("+t.l10n.months.shorthand.join("|")+")",Sn.F="("+t.l10n.months.longhand.join("|")+")",Sn.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var J=Ul(Ul({},n),JSON.parse(JSON.stringify(e.dataset||{})));J.time_24hr===void 0&&Tl.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=Fc(t),t.parseDate=Lo({config:t.config,l10n:t.l10n})}function Ne(J){if(typeof t.config.position=="function")return void t.config.position(t,J);if(t.calendarContainer!==void 0){gt("onPreCalendarPosition");var re=J||t._positionElement,ge=Array.prototype.reduce.call(t.calendarContainer.children,function(fp,mp){return fp+mp.offsetHeight},0),we=t.calendarContainer.offsetWidth,Ve=t.config.position.split(" "),Qe=Ve[0],Rt=Ve.length>1?Ve[1]:null,ut=re.getBoundingClientRect(),Bt=window.innerHeight-ut.bottom,ct=Qe==="above"||Qe!=="below"&&Bt<ge&&ut.top>ge,yt=window.pageYOffset+ut.top+(ct?-ge-2:re.offsetHeight+2);if(jl(t.calendarContainer,"arrowTop",!ct),jl(t.calendarContainer,"arrowBottom",ct),!t.config.inline){var al=window.pageXOffset+ut.left,Zr=!1,hr=!1;Rt==="center"?(al-=(we-ut.width)/2,Zr=!0):Rt==="right"&&(al-=we-ut.width,hr=!0),jl(t.calendarContainer,"arrowLeft",!Zr&&!hr),jl(t.calendarContainer,"arrowCenter",Zr),jl(t.calendarContainer,"arrowRight",hr);var ni=window.document.body.offsetWidth-(window.pageXOffset+ut.right),ka=al+we>window.document.body.offsetWidth,ip=ni+we>window.document.body.offsetWidth;if(jl(t.calendarContainer,"rightMost",ka),!t.config.static)if(t.calendarContainer.style.top=yt+"px",!ka)t.calendarContainer.style.left=al+"px",t.calendarContainer.style.right="auto";else if(!ip)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=ni+"px";else{var Qo=et();if(Qo===void 0)return;var op=window.document.body.offsetWidth,sp=Math.max(0,op/2-we/2),cp=".flatpickr-calendar.centerMost:before",up=".flatpickr-calendar.centerMost:after",hp=Qo.cssRules.length,dp="{left:"+ut.left+"px;right:auto;}";jl(t.calendarContainer,"rightMost",!1),jl(t.calendarContainer,"centerMost",!0),Qo.insertRule(cp+","+up+dp,hp),t.calendarContainer.style.left=sp+"px",t.calendarContainer.style.right="auto"}}}}function et(){for(var J=null,re=0;re<document.styleSheets.length;re++){var ge=document.styleSheets[re];if(!!ge.cssRules){try{ge.cssRules}catch(we){continue}J=ge;break}}return J!=null?J:vt()}function vt(){var J=document.createElement("style");return document.head.appendChild(J),J.sheet}function It(){t.config.noCalendar||t.isMobile||(N(),Kr(),E())}function ot(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function kt(J){J.preventDefault(),J.stopPropagation();var re=function(yt){return yt.classList&&yt.classList.contains("flatpickr-day")&&!yt.classList.contains("flatpickr-disabled")&&!yt.classList.contains("notAllowed")},ge=Ac(cr(J),re);if(ge!==void 0){var we=ge,Ve=t.latestSelectedDateObj=new Date(we.dateObj.getTime()),Qe=(Ve.getMonth()<t.currentMonth||Ve.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=we,t.config.mode==="single")t.selectedDates=[Ve];else if(t.config.mode==="multiple"){var Rt=sl(Ve);Rt?t.selectedDates.splice(parseInt(Rt),1):t.selectedDates.push(Ve)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Ve,t.selectedDates.push(Ve),ur(Ve,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(yt,al){return yt.getTime()-al.getTime()}));if(g(),Qe){var ut=t.currentYear!==Ve.getFullYear();t.currentYear=Ve.getFullYear(),t.currentMonth=Ve.getMonth(),ut&&(gt("onYearChange"),N()),gt("onMonthChange")}if(Kr(),E(),Gl(),!Qe&&t.config.mode!=="range"&&t.config.showMonths===1?R(we):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Bt=t.config.mode==="single"&&!t.config.enableTime,ct=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Bt||ct)&&ot()}w()}}var qe={locale:[Ge,X],showMonths:[O,u,W],minDate:[C],maxDate:[C],positionElement:[De],clickOpens:[function(){t.config.clickOpens===!0?(k(t._input,"focus",t.open),k(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function Se(J,re){if(J!==null&&typeof J=="object"){Object.assign(t.config,J);for(var ge in J)qe[ge]!==void 0&&qe[ge].forEach(function(we){return we()})}else t.config[J]=re,qe[J]!==void 0?qe[J].forEach(function(we){return we()}):Fo.indexOf(J)>-1&&(t.config[J]=Po(re));t.redraw(),Gl(!0)}function Ke(J,re){var ge=[];if(J instanceof Array)ge=J.map(function(we){return t.parseDate(we,re)});else if(J instanceof Date||typeof J=="number")ge=[t.parseDate(J,re)];else if(typeof J=="string")switch(t.config.mode){case"single":case"time":ge=[t.parseDate(J,re)];break;case"multiple":ge=J.split(t.config.conjunction).map(function(we){return t.parseDate(we,re)});break;case"range":ge=J.split(t.l10n.rangeSeparator).map(function(we){return t.parseDate(we,re)});break;default:break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(J)));t.selectedDates=t.config.allowInvalidPreload?ge:ge.filter(function(we){return we instanceof Date&&G(we,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(we,Ve){return we.getTime()-Ve.getTime()})}function Fe(J,re,ge){if(re===void 0&&(re=!1),ge===void 0&&(ge=t.config.dateFormat),J!==0&&!J||J instanceof Array&&J.length===0)return t.clear(re);Ke(J,ge),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),C(void 0,re),y(),t.selectedDates.length===0&&t.clear(!1),Gl(re),re&>("onChange")}function ye(J){return J.slice().map(function(re){return typeof re=="string"||typeof re=="number"||re instanceof Date?t.parseDate(re,void 0,!0):re&&typeof re=="object"&&re.from&&re.to?{from:t.parseDate(re.from,void 0),to:t.parseDate(re.to,void 0)}:re}).filter(function(re){return re})}function be(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var J=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);J&&Ke(J,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function ht(){if(t.input=Le(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=Xt(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),De()}function De(){t._positionElement=t.config.positionElement||t._input}function Pe(){var J=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=Xt("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=J,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=J==="datetime-local"?"Y-m-d\\TH:i:S":J==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch(re){}k(t.mobileInput,"change",function(re){t.setDate(cr(re).value,!1,t.mobileFormatStr),gt("onChange"),gt("onClose")})}function Dt(J){if(t.isOpen===!0)return t.close();t.open(J)}function gt(J,re){if(t.config!==void 0){var ge=t.config[J];if(ge!==void 0&&ge.length>0)for(var we=0;ge[we]&&we<ge.length;we++)ge[we](t.selectedDates,t.input.value,t,re);J==="onChange"&&(t.input.dispatchEvent(ol("change")),t.input.dispatchEvent(ol("input")))}}function ol(J){var re=document.createEvent("Event");return re.initEvent(J,!0,!0),re}function sl(J){for(var re=0;re<t.selectedDates.length;re++){var ge=t.selectedDates[re];if(ge instanceof Date&&ur(ge,J)===0)return""+re}return!1}function Vt(J){return t.config.mode!=="range"||t.selectedDates.length<2?!1:ur(J,t.selectedDates[0])>=0&&ur(J,t.selectedDates[1])<=0}function Kr(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(J,re){var ge=new Date(t.currentYear,t.currentMonth,1);ge.setMonth(t.currentMonth+re),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[re].textContent=Vi(ge.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=ge.getMonth().toString(),J.value=ge.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Xn(J){var re=J||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(ge){return t.formatDate(ge,re)}).filter(function(ge,we,Ve){return t.config.mode!=="range"||t.config.enableTime||Ve.indexOf(ge)===we}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function Gl(J){J===void 0&&(J=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Xn(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Xn(t.config.altFormat)),J!==!1&>("onValueUpdate")}function Wl(J){var re=cr(J),ge=t.prevMonthNav.contains(re),we=t.nextMonthNav.contains(re);ge||we?le(ge?-1:1):t.yearElements.indexOf(re)>=0?re.select():re.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):re.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Kn(J){J.preventDefault();var re=J.type==="keydown",ge=cr(J),we=ge;t.amPM!==void 0&&ge===t.amPM&&(t.amPM.textContent=t.l10n.amPM[sr(t.amPM.textContent===t.l10n.amPM[0])]);var Ve=parseFloat(we.getAttribute("min")),Qe=parseFloat(we.getAttribute("max")),Rt=parseFloat(we.getAttribute("step")),ut=parseInt(we.value,10),Bt=J.delta||(re?J.which===38?1:-1:0),ct=ut+Rt*Bt;if(typeof we.value!="undefined"&&we.value.length===2){var yt=we===t.hourElement,al=we===t.minuteElement;ct<Ve?(ct=Qe+ct+sr(!yt)+(sr(yt)&&sr(!t.amPM)),al&&_(void 0,-1,t.hourElement)):ct>Qe&&(ct=we===t.hourElement?ct-Qe-sr(!t.amPM):Ve,al&&_(void 0,1,t.hourElement)),t.amPM&&yt&&(Rt===1?ct+ut===23:Math.abs(ct-ut)>Rt)&&(t.amPM.textContent=t.l10n.amPM[sr(t.amPM.textContent===t.l10n.amPM[0])]),we.value=ql(ct)}}return a(),t}function ei(e,n){for(var t=Array.prototype.slice.call(e).filter(function(s){return s instanceof HTMLElement}),l=[],a=0;a<t.length;a++){var o=t[a];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=Iv(o,n||{}),l.push(o._flatpickr)}catch(s){console.error(s)}}return l.length===1?l[0]:l}var Ul,Uf,$v,Tl,Bo,Ec=Ie(()=>{Sc();$c();Rc();zf();qf();Mc();jf();Ul=function(){return Ul=Object.assign||function(e){for(var n,t=1,l=arguments.length;t<l;t++){n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ul.apply(this,arguments)},Uf=function(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;for(var l=Array(e),a=0,n=0;n<t;n++)for(var o=arguments[n],s=0,u=o.length;s<u;s++,a++)l[a]=o[s];return l},$v=300;typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return ei(this,e)},HTMLElement.prototype.flatpickr=function(e){return ei([this],e)});Tl=function(e,n){return typeof e=="string"?ei(window.document.querySelectorAll(e),n):e instanceof Node?ei([e],n):ei(e,n)};Tl.defaultConfig={};Tl.l10ns={en:Ul({},No),default:Ul({},No)};Tl.localize=function(e){Tl.l10ns.default=Ul(Ul({},Tl.l10ns.default),e)};Tl.setDefaults=function(e){Tl.defaultConfig=Ul(Ul({},Tl.defaultConfig),e)};Tl.parseDate=Lo({});Tl.formatDate=Fc({});Tl.compareDates=ur;typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(e){return ei(this,e)});Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof e=="string"?parseInt(e,10):e))};typeof window!="undefined"&&(window.flatpickr=Tl);Bo=Tl});var Ho,Rv,Av,Gf,Wf=Ie(()=>{il();Ut();Xe();Ec();Ho=Fl(vn());Al();va();Rv=e=>{let n=e.replace(/y/g,"Y");return n=n.replace(/d/g,"D"),n=n.replace(/h/g,"H"),n=n.replace(/上午\/下午/g,"A"),n=n.replace(/上午/g,"A"),n=n.replace(/下午/g,"A"),n=n.replace(/AM\/PM/g,"A"),n=n.replace(/AM/g,"A"),n=n.replace(/PM/g,"A"),n=n.replace(/\"/g,""),n.includes("A")&&(n=n.replace(/H/g,"h")),n},Av={cellFocus:function(e,n,t){let l=h.visibledatarow[e],a=e==0?0:h.visibledatarow[e-1],o=h.visibledatacolumn[n],s=n==0?0:h.visibledatacolumn[n-1],u=ke.mergeborer(h.flowdata,e,n),d=t.ct.fa||"YYYY-MM-DD",f=mt("yyyy-MM-dd hh:mm:ss",t.v),m=Rv(d),g=!1,y=!1,v=!1,b=!0,k=!1;u&&(l=u.row[1],a=u.row[0],o=u.column[1],s=u.column[0]),$(".cell-date-picker").show().css({width:o-s+1,height:l-a+1,left:s,top:a}),/[上午下午]/.test(d)&&(k=!0),/[Hhms]/.test(m)&&(g=!0),/[YMD]/.test(m)||(y=!0),/s/.test(m)&&(v=!0),/A/.test(m)&&(b=!1);let w=Bo("#luckysheet-input-box",{allowInput:!1,noCalendar:y,enableSeconds:v,enableTime:g,dateFormat:m,time_24hr:b,defaultDate:f,onClose(){setTimeout(()=>{w.destroy()},0)},parseDate:(x,C)=>(0,Ho.default)(x).toDate(),formatDate:(x,C,S)=>k?(0,Ho.default)(x).format(C).replace("AM","\u4E0A\u5348").replace("PM","\u4E0B\u5348"):(0,Ho.default)(x).format(C),onChange:function(x,C){let S=Us(new Date(x));$("#luckysheet-rich-text-editor").html(C),ti(e,n,S,{isRefresh:!1}),Nc(e,n,"ct",t.ct),g||p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1])}});$("#luckysheet-input-box").click()}},Gf=Av});function Rl(e,n,t,l,a){if(!wn(e,n,h.currentSheetIndex)){$("#luckysheet-functionbox-cell").blur();return}if(de()||h.allowEdit===!1||!Je.createHookFunction("cellEditBefore",h.luckysheet_select_save))return;if(ne.saveParam("mv",h.currentSheetIndex,{op:"enterEdit",range:h.luckysheet_select_save}),Ye.dataVerification!=null&&Ye.dataVerification[e+"_"+n]!=null){let z=Ye.dataVerification[e+"_"+n];if(z.type=="dropdown")Ye.dropdownListShow();else if(z.type=="checkbox")return}let o=Xf(e,n,t),s=o.row,u=o.row_pre,d=o.col,f=o.col_pre,m=o.row_index,g=o.col_index;$("#luckysheet-dropCell-icon").is(":visible")&&$("#luckysheet-dropCell-icon").remove();let y=$(window).height(),v=$(window).width(),b=$("#"+h.container).offset(),k=$("#luckysheet-cell-main").scrollLeft(),w=$("#luckysheet-cell-main").scrollTop();if(Oe.isPivotRange(m,g))return;let x=f+b.left+h.rowHeaderWidth-k-2;Y.freezenverticaldata!=null&&n<=Y.freezenverticaldata[1]&&(x=f+b.left+h.rowHeaderWidth-2);let C=u+b.top+h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight-w-2;Y.freezenhorizontaldata!=null&&e<=Y.freezenhorizontaldata[1]&&(C=u+b.top+h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight-2);let S={"min-width":d-f+1-8,"min-height":s-u+1-4,"max-width":v+k-f-20-h.rowHeaderWidth,"max-height":y+w-u-20-15-h.toolbarHeight-h.infobarHeight-h.calculatebarHeight-h.sheetBarHeight-h.statisticBarHeight,left:x,top:C},_={transform:"scale("+h.zoomRatio+")","transform-origin":"left top",width:100/h.zoomRatio+"%",height:100/h.zoomRatio+"%"};h.luckysheetCellUpdate=[m,g],a||$("#luckysheet-rich-text-editor").focus().select(),$("#luckysheet-input-box").removeAttr("style").css({"background-color":"rgb(255, 255, 255)",padding:"0px 2px","font-size":`${h.defaultFontSize}pt`,right:"auto","overflow-y":"auto","box-sizing":"initial",display:"flex"}),(Y.freezenverticaldata!=null||Y.freezenhorizontaldata!=null)&&$("#luckysheet-input-box").css("z-index",10002),$("#luckysheet-input-box-index").html(tt(g)+(m+1)).hide(),$("#luckysheet-wa-functionbox-cancel, #luckysheet-wa-functionbox-confirm").addClass("luckysheet-wa-calculate-active");let T="",A=!1;if(t[m]!=null&&t[m][g]!=null){let z=t[m][g],M=z.ht,E="left",N="top";M=="0"?(S={"min-width":d-f+1-8,"min-height":s-u+1-4,"max-width":v*2/3,"max-height":y+w-u-20-15-h.toolbarHeight-h.infobarHeight-h.calculatebarHeight-h.sheetBarHeight-h.statisticBarHeight,left:f+b.left+h.rowHeaderWidth-k-2,top:u+b.top+h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight-w-2},h.zoomRatio<1&&(E="center"),A=!0):M=="2"&&(S={"min-width":d-f+1-8,"min-height":s-u+1-4,"max-width":d+b.left-k-8,"max-height":y+w-u-20-15-h.toolbarHeight-h.infobarHeight-h.calculatebarHeight-h.sheetBarHeight-h.statisticBarHeight,right:v-(b.left+(h.rowHeaderWidth-1)-k)-d,top:u+b.top+h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight-w-2},h.zoomRatio<1&&(E="right")),z.vt=="0"?N="center":z.vt=="2"&&(N="bottom"),_["transform-origin"]=E+" "+N,l||(_l(z)?T=Hd(m,g,t):z.f!=null?T=ze(m,g,t,"f"):(T=bn(m,g,t),z.qp=="1"&&(T=T&&""+T)));let L=ke.getStyleByCell(t,m,g);L=$("#luckysheet-input-box").get(0).style.cssText+L,$("#luckysheet-input-box").get(0).style.cssText=L,$("#luckysheet-input-box").get(0).style.backgroundColor=="rgba(0, 0, 0, 0)"&&($("#luckysheet-input-box").get(0).style.background="rgb(255,255,255)")}else{let z=el.getComputeMap();var R=el.checksAF(m,g,z),I=$e.getComputeMap(),F=$e.checksCF(m,g,I);F!=null&&F.cellColor!=null?$("#luckysheet-input-box").get(0).style.background=F.cellColor:R!=null&&($("#luckysheet-input-box").get(0).style.background=R[1])}if(S["min-height"]>S["max-height"]&&(S["min-height"]=S["max-height"]),S["min-width"]>S["max-width"]&&(S["min-width"]=S["max-width"]),T=p.xssDeal(T),!xo(m,g,h.currentSheetIndex)&&T.length>0&&T.substr(0,63)=='<span dir="auto" class="luckysheet-formula-text-color">=</span>'?$("#luckysheet-rich-text-editor").html(""):(T=p.ltGtSignDeal(T),$("#luckysheet-rich-text-editor").html(T),a||_r($("#luckysheet-rich-text-editor")[0])),A){let z=$("#luckysheet-input-box").width();z>S["max-width"]&&(z=S["max-width"]),z<S["min-width"]&&(z=S["min-width"]);let M=S.left-z/2+(d-f)/2;M<2&&(M=2),S.left=M-2}$("#luckysheet-input-box").css(S),$("#luckysheet-rich-text-editor").css(_),t[e][n]&&t[e][n].ct&&t[e][n].ct.t=="d"&&Gf.cellFocus(e,n,t[e][n]),p.rangetosheet=h.currentSheetIndex,p.createRangeHightlight(),p.rangeResizeTo=$("#luckysheet-rich-text-editor"),rl()}function Yf(e,n,t){if(e==null||n==null)return;let l=t[e][n];if(l==null)return;let a=l.ht;if(l!=null&&a!="0")return;let o=Xf(e,n,t),s=o.row,u=o.row_pre,d=o.col,f=o.col_pre,m=$(window).height(),g=$(window).width(),y=$("#"+h.container).offset(),v=$("#luckysheet-cell-main").scrollLeft(),b=$("#luckysheet-cell-main").scrollTop(),k={"min-width":d-f+1-8,"max-width":g*2/3,left:f+y.left+h.rowHeaderWidth-v-2},w=$("#luckysheet-input-box").width();w>k["max-width"]&&(w=k["max-width"]),w<k["min-width"]&&(w=k["min-width"]);let x=k.left-w/2+(d-f)/2;x<2&&(x=2),k.left=x-2,$("#luckysheet-input-box").css(k)}function Xf(e,n,t){let l=h.visibledatarow[e],a=e-1==-1?0:h.visibledatarow[e-1],o=h.visibledatacolumn[n],s=n-1==-1?0:h.visibledatacolumn[n-1];t==null&&(t=h.flowdata);let u=ke.mergeborer(t,e,n);return u&&(l=u.row[1],a=u.row[0],e=u.row[2],o=u.column[1],s=u.column[0],n=u.column[2]),{row:l,row_pre:a,row_index:e,col:o,col_pre:s,col_index:n}}var ba=Ie(()=>{on();Vl();il();gr();Oa();Wf();yr();Ml();dt();Ft();Kt();Al();Ut();pn();Vr();gn();Xe();Qt();Ll()});var jc={};_p(jc,{cancelFrozen:()=>jo,cancelRangeMerge:()=>tm,changLang:()=>rb,checkTheStatusOfTheSelectedCells:()=>li,clearCell:()=>Mv,clearRange:()=>k0,closeWebsocket:()=>nb,deleteCell:()=>Fv,deleteColumn:()=>Uv,deleteDataVerification:()=>Z0,deleteImage:()=>Q0,deleteRange:()=>w0,deleteRangeConditionalFormat:()=>b0,deleteRow:()=>jv,deleteRowOrColumn:()=>zc,enterEditMode:()=>Pv,exitEditMode:()=>Nv,find:()=>Kf,frozenColumnRange:()=>Jf,frozenFirstColumn:()=>qo,frozenFirstRow:()=>Vo,frozenRowRange:()=>Zf,getAllSheets:()=>lm,getCellValue:()=>Dv,getColumnWidth:()=>Qv,getConfig:()=>W0,getDefaultColWidth:()=>t0,getDefaultRowHeight:()=>e0,getImageOption:()=>eb,getLuckysheetfile:()=>X0,getRange:()=>Qf,getRangeArray:()=>i0,getRangeAxis:()=>r0,getRangeBoolean:()=>c0,getRangeByTxt:()=>ab,getRangeDiagonal:()=>s0,getRangeHtml:()=>a0,getRangeJson:()=>o0,getRangeValue:()=>n0,getRangeValuesWithFlatte:()=>l0,getRangeWithFlatten:()=>Hc,getRowHeight:()=>Jv,getScreenshot:()=>B0,getSheet:()=>U0,getSheetData:()=>G0,getTxtByRange:()=>ib,getWorkbookName:()=>V0,hideColumn:()=>Yv,hideGridLines:()=>P0,hideRow:()=>Gv,hideRowOrColumn:()=>Oc,insertColumn:()=>Vv,insertColumnRight:()=>qv,insertImage:()=>J0,insertRow:()=>Bv,insertRowBottom:()=>Hv,insertRowBottomOrColumnRight:()=>Lc,insertRowOrColumn:()=>Pc,matrixCalculation:()=>_0,matrixOperation:()=>x0,pagerInit:()=>Vc,redo:()=>j0,refresh:()=>L0,refreshFormula:()=>ob,refreshMenuButtonFocus:()=>qc,replace:()=>Ev,resize:()=>O0,scroll:()=>z0,setBothFrozen:()=>Ov,setCellFormat:()=>Nc,setCellValue:()=>ti,setColumnWidth:()=>Zv,setConfig:()=>Y0,setDataVerification:()=>K0,setHorizontalFrozen:()=>Lv,setRangeConditionalFormat:()=>v0,setRangeConditionalFormatDefault:()=>y0,setRangeFilter:()=>f0,setRangeFormat:()=>d0,setRangeMerge:()=>m0,setRangeShow:()=>u0,setRangeSort:()=>p0,setRangeSortMulti:()=>g0,setRangeValue:()=>h0,setRowHeight:()=>Kv,setSheetActive:()=>R0,setSheetAdd:()=>C0,setSheetColor:()=>D0,setSheetCopy:()=>S0,setSheetDelete:()=>T0,setSheetHide:()=>$0,setSheetMove:()=>M0,setSheetName:()=>A0,setSheetOrder:()=>F0,setSheetShow:()=>I0,setSheetZoom:()=>E0,setSingleRangeFormat:()=>em,setVerticalFrozen:()=>zv,setWorkbookName:()=>H0,showColumn:()=>Xv,showGridLines:()=>N0,showRow:()=>Wv,showRowOrColumn:()=>Bc,toJson:()=>Uo,transToCellData:()=>tb,transToData:()=>lb,undo:()=>q0,updataSheet:()=>sb});function Dv(e,n,t={}){if(!B(e)||!B(n))return U.info("Arguments row or column cannot be null or undefined.","");let l=Z(h.currentSheetIndex),{type:a="v",order:o=l}=Ue({},t),u=h.luckysheetfile[o].data[e][n],d;if(P(u)=="object"){if(d=u[a],a=="f"&&d!=null)d=p.functionHTMLGenerate(d);else if(a=="f")d=u.v;else if(u&&u.ct){if(u.ct.fa=="yyyy-MM-dd")d=u.m;else if(u.ct.hasOwnProperty("t")&&u.ct.t==="inlineStr"){let f=u.ct.s;f&&(d=f.map(m=>m.v).join(""))}}}return d==null&&(d=null),d}function ti(e,n,t,l={}){let a=h.flowdata[e][n],o=JSON.stringify(a);if(!B(e)||!B(n))return U.info("The row or column parameter is invalid.","");let{order:s=Z(h.currentSheetIndex),isRefresh:u=!0,success:d}=Ue({},l),f=h.luckysheetfile[s];if(f==null)return U.info("The order parameter is invalid.","");if(!Je.createHookFunction("cellUpdateBefore",e,n,t,u))return;let m=f.data;u&&(m=$.extend(!0,[],f.data)),m.length==0&&(m=ve.buildGridData(f));let g={bg:1,ff:1,fc:1,bl:1,it:1,fs:1,cl:1,un:1,vt:1,ht:1,mc:1,tr:1,tb:1,rt:1,qp:1};if(t==null||t.toString().length==0)p.delFunctionGroup(e,n),Ht(e,n,m,t);else if(t instanceof Object){let y={};me(m[e][n])&&(m[e][n]={});let v=m[e][n];t.f!=null&&t.v==null?(y.f=t.f,t.ct!=null&&(y.ct=t.ct),m=p.updatecell(e,n,y,!1).data):(t.ct!=null&&(y.ct=t.ct),t.f!=null&&(y.f=t.f),t.v!=null?y.v=t.v:y.v=v.v,t.m!=null&&(y.m=t.m),p.delFunctionGroup(e,n),Ht(e,n,m,y));for(let b in t){let k=t[b];b in g?ke.updateFormatCell(m,b,k,e,e,n,n):v[b]=k}m[e][n]=v}else t.toString().substr(0,1)=="="||t.toString().substr(0,5)=="<span"?m=p.updatecell(e,n,t,!1).data:(p.delFunctionGroup(e,n),Ht(e,n,m,t));setTimeout(()=>{Je.createHookFunction("cellUpdated",e,n,JSON.parse(o),h.flowdata[e][n],u)},0),f.index==h.currentSheetIndex&&u?Ze(m,[{row:[e,e],column:[n,n]}]):f.data=m,d&&typeof d=="function"&&d(m)}function Mv(e,n,t={}){if(!B(e)||!B(n))return U.info("Arguments row and column cannot be null or undefined.","");let l=Z(h.currentSheetIndex),{order:a=l,success:o}=Ue({},t),s=$.extend(!0,[],h.luckysheetfile[a].data),u=s[e][n];P(u)=="object"?(delete u.m,delete u.v,u.f!=null&&(delete u.f,p.delFunctionGroup(e,n,a),delete u.spl)):u=null,a===l?Ze(s,[{row:[e,e],column:[n,n]}]):h.luckysheetfile[a].data=s,o&&typeof o=="function"&&o(u)}function Fv(e,n,t,l={}){if(!e||["left","up"].indexOf(e)<0)return U.info("Arguments move cannot be null or undefined and its value must be 'left' or 'up'","");if(!B(n)||!B(t))return U.info("Arguments row and column cannot be null or undefined.","");let o=Z(h.currentSheetIndex),{order:s=o,success:u}=Ue({},l),d="move"+e.replace(e[0],e[0].toUpperCase()),f;s&&h.luckysheetfile[s]&&(f=h.luckysheetfile[s].index),ha(d,n,n,t,t,f),u&&typeof u=="function"&&u()}function Nc(e,n,t,l,a={}){if(!B(e)||!B(n))return U.info("Arguments row or column cannot be null or undefined.","");if(!t)return U.info("Arguments attr cannot be null or undefined.","");let o=Z(h.currentSheetIndex),{order:s=o,success:u}=Ue({},a),d=h.luckysheetfile[s];if(d==null)return U.info("The order parameter is invalid.","");let f=$.extend(!0,[],d.data);f.length==0&&(f=ve.buildGridData(d));let m=f[e][n]||{},g=$.extend(!0,{},d.config);if(t=="ct"&&(!l||!l.hasOwnProperty("fa")||!l.hasOwnProperty("t")))return new TypeError("While set attribute 'ct' to cell, the value must have property 'fa' and 't'");if(t=="bd"){g.borderInfo==null&&(g.borderInfo=[]);let y=Ue({rangeType:"range",borderType:"border-all",color:"#000",style:"1",range:[{column:[n,n],row:[e,e]}]},l);g.borderInfo.push(y)}else m[t]=l;f[e][n]=m,d.index==h.currentSheetIndex?(d.config=g,h.config=g,Ze(f,[{row:[e,e],column:[n,n]}])):(d.config=g,d.data=f),u&&typeof u=="function"&&u(m)}function Kf(e,n={}){if(!e&&e!=0)return U.info("Search content cannot be null or empty","");let t=Z(h.currentSheetIndex),{isRegularExpression:l=!1,isWholeWord:a=!1,isCaseSensitive:o=!1,order:s=t,type:u="m"}=Ue({},n),d=h.luckysheetfile[s].data,f=[];for(let m=0;m<d.length;m++){let g=d[m];for(let y=0;y<g.length;y++){let v=g[y];if(!!v)if(v.row=m,v.column=y,a)o?e.toString()==v[u]&&f.push(v):v[u]&&e.toString().toLowerCase()==v[u].toLowerCase()&&f.push(v);else if(l){let b;o?b=new RegExp(D.getRegExpStr(e),"g"):b=new RegExp(D.getRegExpStr(e),"ig"),b.test(v[u])&&f.push(v)}else o?new RegExp(D.getRegExpStr(e),"g").test(v[u])&&f.push(v):new RegExp(D.getRegExpStr(e),"ig").test(v[u])&&f.push(v)}}return f}function Ev(e,n,t={}){let l=Kf(e,t),a=Z(h.currentSheetIndex),{order:o=a}=Ue({},t),s=h.luckysheetfile[o];if(s==null)return U.info("The order parameter is invalid.","");let u=$.extend(!0,[],s.data);l.forEach(f=>{f.m=n,ti(f.row,f.column,n,{order:o,isRefresh:!1})});let d=$.extend(!0,[],s.data);return s.data.length=0,s.data.push(...u),s.index==h.currentSheetIndex&&Ze(d,void 0,void 0,!0,!1),Be(),t.success&&typeof t.success=="function"&&t.success(l),l}function Nv(e={}){parseInt($("#luckysheet-input-box").css("top"))>0&&($("#luckysheet-formula-search-c").is(":visible")&&p.searchFunctionCell!=null?p.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")):(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),h.luckysheet_select_save=[{row:[h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[0]],column:[h.luckysheetCellUpdate[1],h.luckysheetCellUpdate[1]],row_focus:h.luckysheetCellUpdate[0],column_focus:h.luckysheetCellUpdate[1]}]),$("#luckysheet-search-formula-parm").is(":visible")&&$("#luckysheet-search-formula-parm").hide(),$("#luckysheet-search-formula-parm-select").is(":visible")&&$("#luckysheet-search-formula-parm-select").hide()),e.success&&typeof e.success=="function"&&e.success()}function Pv(e={}){if(!$("#luckysheet-conditionformat-dialog").is(":visible")){if($("#luckysheet-cell-selected").is(":visible")){let n=h.luckysheet_select_save[h.luckysheet_select_save.length-1],t=n.row_focus,l=n.column_focus;Rl(t,l,h.flowdata)}e.success&&typeof e.success=="function"&&e.success()}}function Vo(e){if(Y.saveFrozen("freezenRow",e),!e||e==Z(h.currentSheetIndex)){let n,t,l;if(Y.freezenRealFirstRowColumn){let a=0;l=h.visibledatarow[a]-2+h.columnHeaderHeight,n=[h.visibledatarow[a],a+1,0,Y.cutVolumn(h.visibledatarow,a+1),l]}else{let a=$("#luckysheet-cell-main").scrollTop();t=st(h.visibledatarow,a),t==-1&&(t=0),l=h.visibledatarow[t]-2-a+h.columnHeaderHeight,n=[h.visibledatarow[t],t+1,a,Y.cutVolumn(h.visibledatarow,t+1),l]}Y.saveFreezen(n,l,null,null),Y.freezenverticaldata!=null&&(Y.cancelFreezenVertical(),Y.createAssistCanvas(),Be()),Y.createFreezenHorizontal(n,l),Y.createAssistCanvas(),Be()}}function qo(e){if(Y.saveFrozen("freezenColumn",e),!e||e==Z(h.currentSheetIndex)){let n,t,l;if(Y.freezenRealFirstRowColumn)t=0,l=h.visibledatacolumn[t]-2+h.rowHeaderWidth,n=[h.visibledatacolumn[t],t+1,0,Y.cutVolumn(h.visibledatacolumn,t+1),l];else{let a=$("#luckysheet-cell-main").scrollLeft();t=st(h.visibledatacolumn,a),t==-1&&(t=0),l=h.visibledatacolumn[t]-2-a+h.rowHeaderWidth,n=[h.visibledatacolumn[t],t+1,a,Y.cutVolumn(h.visibledatacolumn,t+1),l]}Y.saveFreezen(null,null,n,l),Y.freezenhorizontaldata!=null&&(Y.cancelFreezenHorizontal(),Y.createAssistCanvas(),Be()),Y.createFreezenVertical(n,l),Y.createAssistCanvas(),Be()}}function Zf(e,n){let t=Q().freezen;if(!e||!e.hasOwnProperty("row_focus")&&!p.iscelldata(e)){de()?alert(t.noSeletionError):U.info(t.noSeletionError,"");return}if(typeof e=="string"&&p.iscelldata(e)&&(e=p.getcellrange(e),e={row_focus:e.row[0],column_focus:e.column[0]}),Y.saveFrozen("freezenRowRange",n,e),!n||n==Z(h.currentSheetIndex)){let l=$("#luckysheet-cell-main").scrollTop(),a=st(h.visibledatarow,l),o=e.row_focus;o>a&&(a=o),a==-1&&(a=0);let s=h.visibledatarow[a]-2-l+h.columnHeaderHeight,u=[h.visibledatarow[a],a+1,l,Y.cutVolumn(h.visibledatarow,a+1),s];Y.saveFreezen(u,s,null,null),Y.freezenverticaldata!=null&&(Y.cancelFreezenVertical(),Y.createAssistCanvas(),Be()),Y.createFreezenHorizontal(u,s),Y.createAssistCanvas(),Be()}}function Jf(e,n){let t=Q().freezen,l=typeof e=="string"&&p.iscelldata(e);if(!e||!e.hasOwnProperty("column_focus")&&!l){de()?alert(t.noSeletionError):U.info(t.noSeletionError,"");return}if(l&&(e=p.getcellrange(e),e={row_focus:e.row[0],column_focus:e.column[0]}),Y.saveFrozen("freezenColumnRange",n,e),!n||n==Z(h.currentSheetIndex)){let a=$("#luckysheet-cell-main").scrollLeft(),o=st(h.visibledatacolumn,a),s=e.column_focus;s>o&&(o=s),o==-1&&(o=0);let u=h.visibledatacolumn[o]-2-a+h.rowHeaderWidth,d=[h.visibledatacolumn[o],o+1,a,Y.cutVolumn(h.visibledatacolumn,o+1),u];Y.saveFreezen(null,null,d,u),Y.freezenhorizontaldata!=null&&(Y.cancelFreezenHorizontal(),Y.createAssistCanvas(),Be()),Y.createFreezenVertical(d,u),Y.createAssistCanvas(),Be()}}function jo(e){Y.saveFrozen("freezenCancel",e),(!e||e==Z(h.currentSheetIndex))&&(Y.freezenverticaldata!=null&&Y.cancelFreezenVertical(),Y.freezenhorizontaldata!=null&&Y.cancelFreezenHorizontal(),Y.createAssistCanvas(),Be())}function Lv(e,n={}){let t=Z(h.currentSheetIndex),{range:l,order:a=t,success:o}=Ue({},n);jo(a),e?Zf(l,a):Vo(a),o&&typeof o=="function"&&o()}function zv(e,n={}){let t=Z(h.currentSheetIndex),{range:l,order:a=t,success:o}=Ue({},n);jo(a),e?Jf(l,a):qo(a),o&&typeof o=="function"&&o()}function Ov(e,n={}){let t=Z(h.currentSheetIndex),{range:l,order:a=t,success:o}=Ue({},n),s=!a||a==Z(h.currentSheetIndex),u=Q().freezen;if(jo(a),e){Y.saveFrozen("freezenRCRange",a,l);let d=typeof l=="string"&&p.iscelldata(l);if(s){if((!l||!(l.hasOwnProperty("column_focus")&&l.hasOwnProperty("row_focus")))&&!d){de()?alert(u.noSeletionError):U.info(u.noSeletionError,"");return}d&&(l=p.getcellrange(l),l={row_focus:l.row[0],column_focus:l.column[0]});let f=$("#luckysheet-cell-main").scrollTop(),m=st(h.visibledatarow,f),g=l.row_focus;g>m&&(m=g),m==-1&&(m=0);let y=h.visibledatarow[m]-2-f+h.columnHeaderHeight,v=[h.visibledatarow[m],m+1,f,Y.cutVolumn(h.visibledatarow,m+1),y];Y.saveFreezen(v,y,null,null),Y.createFreezenHorizontal(v,y);let b=$("#luckysheet-cell-main").scrollLeft(),k=st(h.visibledatacolumn,b),w=l.column_focus;w>k&&(k=w),k==-1&&(k=0);let x=h.visibledatacolumn[k]-2-b+h.rowHeaderWidth,C=[h.visibledatacolumn[k],k+1,b,Y.cutVolumn(h.visibledatacolumn,k+1),x];Y.saveFreezen(null,null,C,x),Y.createFreezenVertical(C,x),Y.createAssistCanvas(),Be()}}else if(Y.saveFrozen("freezenRC",a),s){let d=$("#luckysheet-cell-main").scrollTop(),f=st(h.visibledatarow,d);f==-1&&(f=0);let m=h.visibledatarow[f]-2-d+h.columnHeaderHeight,g=[h.visibledatarow[f],f+1,d,Y.cutVolumn(h.visibledatarow,f+1),m];Y.saveFreezen(g,m,null,null),Y.createFreezenHorizontal(g,m);let y=$("#luckysheet-cell-main").scrollLeft(),v=st(h.visibledatacolumn,y);v==-1&&(v=0);let b=h.visibledatacolumn[v]-2-y+h.rowHeaderWidth,k=[h.visibledatacolumn[v],v+1,y,Y.cutVolumn(h.visibledatacolumn,v+1),b];Y.saveFreezen(null,null,k,b),Y.createFreezenVertical(k,b),Y.createAssistCanvas(),Be()}}function Pc(e,n=0,t={}){if(!B(n))return U.info("The index parameter is invalid.","");let l=Z(h.currentSheetIndex),{number:a=1,order:o=l,success:s}=Ue({},t),d=Q().info;if(!B(a)){de()?alert(d.tipInputNumber):U.info(d.tipInputNumber,"");return}if(a=parseInt(a),a<1||a>100){de()?alert(d.tipInputNumberLimit):U.info(d.tipInputNumberLimit,"");return}let f;o&&h.luckysheetfile[o]&&(f=h.luckysheetfile[o].index),Ir(e,n,a,"lefttop",f),s&&typeof s=="function"&&s()}function Lc(e,n=0,t={}){if(!B(n))return U.info("The index parameter is invalid.","");let l=Z(h.currentSheetIndex),{number:a=1,order:o=l,success:s}=Ue({},t),d=Q().info;if(!B(a)){de()?alert(d.tipInputNumber):U.info(d.tipInputNumber,"");return}if(a=parseInt(a),a<1||a>100){de()?alert(d.tipInputNumberLimit):U.info(d.tipInputNumberLimit,"");return}let f;o&&h.luckysheetfile[o]&&(f=h.luckysheetfile[o].index),Ir(e,n,a,"rightbottom",f),s&&typeof s=="function"&&s()}function Bv(e=0,n={}){Pc("row",e,n)}function Hv(e=0,n={}){Lc("row",e,n)}function Vv(e=0,n={}){Pc("column",e,n)}function qv(e=0,n={}){Lc("column",e,n)}function zc(e,n,t,l={}){if(!B(n)||!B(t))return U.info("Please enter the index for deleting rows or columns correctly.","");let a=Z(h.currentSheetIndex),{order:o=a,success:s}=Ue({},l),u;o&&h.luckysheetfile[o]&&(u=h.luckysheetfile[o].index),qn(e,n,t,u),s&&typeof s=="function"&&s()}function jv(e,n,t={}){zc("row",e,n,t)}function Uv(e,n,t={}){zc("column",e,n,t)}function Oc(e,n,t,l={}){if(!B(n)||!B(t))return U.info("Please enter the index for deleting rows or columns correctly.","");let a=Z(h.currentSheetIndex),{order:o=a,saveParam:s=!0,success:u}=Ue({},l),d=h.luckysheetfile[o],f=e==="row"?"rowhidden":"colhidden",m=$.extend(!0,{},d.config);m[f]==null&&(m[f]={});for(let g=n;g<=t;g++)m[f][g]=0;if(h.clearjfundo){let g={};g.type=e==="row"?"showHidRows":"showHidCols",g.sheetIndex=d.index,g.config=$.extend(!0,{},d.config),g.curconfig=m,h.jfundo.length=0,h.jfredo.push(g)}h.luckysheetfile[o].config=m,s&&ne.saveParam("cg",d.index,m[f],{k:f}),o==a&&(h.config=m,St(h.flowdata.length,h.flowdata[0].length)),u&&typeof u=="function"&&u()}function Bc(e,n,t,l={}){if(!B(n)||!B(t))return U.info("Please enter the index for deleting rows or columns correctly.","");let a=Z(h.currentSheetIndex),{order:o=a,saveParam:s=!0,success:u}=Ue({},l),d=h.luckysheetfile[o],f=e==="row"?"rowhidden":"colhidden",m=$.extend(!0,{},d.config);if(m[f]!=null){for(let g=n;g<=t;g++)delete m[f][g];if(h.clearjfundo){let g={};g.type=e==="row"?"showHidRows":"showHidCols",g.sheetIndex=d.index,g.config=$.extend(!0,{},d.config),g.curconfig=m,h.jfundo.length=0,h.jfredo.push(g)}h.luckysheetfile[o].config=h.config,s&&ne.saveParam("cg",d.index,m[f],{k:f}),o===a&&(h.config=m,St(h.flowdata.length,h.flowdata[0].length)),u&&typeof u=="function"&&u()}}function Gv(e,n,t={}){Oc("row",e,n,t)}function Wv(e,n,t={}){Bc("row",e,n,t)}function Yv(e,n,t={}){Oc("column",e,n,t)}function Xv(e,n,t={}){Bc("column",e,n,t)}function Kv(e,n={}){if(P(e)!="object")return U.info("The rowInfo parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=$.extend(!0,{},a.config);o.rowlen==null&&(o.rowlen={});for(let s in e)if(parseInt(s)>=0){let u=e[s];u==="auto"?o.rowlen[parseInt(s)]=u:Number(u)>=0&&(o.rowlen[parseInt(s)]=Number(u))}a.config=o,ne.saveParam("cg",a.index,o.rowlen,{k:"rowlen"}),a.index==h.currentSheetIndex&&(h.config=o,St(h.flowdata.length,h.flowdata[0].length)),l&&typeof l=="function"&&l()}function Zv(e,n={}){if(P(e)!="object")return U.info("The columnInfo parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=$.extend(!0,{},a.config);o.columnlen==null&&(o.columnlen={});for(let s in e)if(parseInt(s)>=0){let u=e[s];u==="auto"?o.columnlen[parseInt(s)]=u:Number(u)>=0&&(o.columnlen[parseInt(s)]=Number(u))}a.config=o,ne.saveParam("cg",a.index,o.columnlen,{k:"columnlen"}),a.index==h.currentSheetIndex&&(h.config=o,St(h.flowdata.length,h.flowdata[0].length)),l&&typeof l=="function"&&l()}function Jv(e,n={}){if(P(e)!="array"||e.length==0)return U.info("The rowInfo parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let s=$.extend(!0,{},a.config).rowlen||{},u={};return e.forEach(d=>{if(parseInt(d)>=0){let f=s[parseInt(d)]||h.defaultrowlen;u[parseInt(d)]=f}}),setTimeout(()=>{l&&typeof l=="function"&&l()},1),u}function Qv(e,n={}){if(P(e)!="array"||e.length==0)return U.info("The columnInfo parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let s=$.extend(!0,{},a.config).columnlen||{},u={};return e.forEach(d=>{if(parseInt(d)>=0){let f=s[parseInt(d)]||h.defaultcollen;u[parseInt(d)]=f}}),setTimeout(()=>{l&&typeof l=="function"&&l()},1),u}function e0(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e);return setTimeout(()=>{t&&typeof t=="function"&&t()},1),h.luckysheetfile[n].defaultRowHeight||h.defaultrowlen}function t0(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e);return setTimeout(()=>{t&&typeof t=="function"&&t()},1),h.luckysheetfile[n].defaultColWidth||h.defaultcollen}function Qf(){let e=JSON.parse(JSON.stringify(h.luckysheet_select_save)),n=[];for(let t=0;t<e.length;t++){let l=e[t],a={row:l.row,column:l.column};n.push(a)}return n}function Hc(e){e=e||Qf();let n=[];return e.forEach(t=>{let l=t.row,a=t.column;for(let o=l[0];o<=l[1];o++)for(let s=a[0];s<=a[1];s++)n.push({r:o,c:s})}),n}function l0(e){e=e||Hc();let n=[];return e.forEach(t=>{n.push(h.flowdata[t.r][t.c])}),n}function r0(){let e=[],n=JSON.parse(JSON.stringify(h.luckysheet_select_save)),t=h.currentSheetIndex;return n.forEach(l=>{let a=xt(t,{column:l.column,row:l.row});e.push(a)}),e}function n0(e={}){let n=Z(h.currentSheetIndex),{range:t,order:l=n}=Ue({},e),a=h.luckysheetfile[l];if(!t||typeof t=="object")return Pt(t,a.index);if(typeof t=="string"){if(p.iscelldata(t))return Pt(p.getcellrange(t),a.index);U.info("The range is invalid, please check range parameter.","")}}function a0(e={}){let{range:n=h.luckysheet_select_save,order:t=Z(h.currentSheetIndex),success:l}=Ue({},e);if(n=JSON.parse(JSON.stringify(n)),P(n)=="string"){if(!p.iscelldata(n))return U.info("The range parameter is invalid.","");let v=p.getcellrange(n);n=[{row:v.row,column:v.column}]}else if(P(n)=="object"){if(n.row==null||n.column==null)return U.info("The range parameter is invalid.","");n=[{row:n.row,column:n.column}]}if(P(n)!="array")return U.info("The range parameter is invalid.","");let a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=$.extend(!0,{},a.config);if(o.merge!=null){let v=!1;for(let b=0;b<n.length;b++){let k=n[b].row[0],w=n[b].row[1],x=n[b].column[0],C=n[b].column[1];if(v=Mt(o,k,w,x,C),v)break}if(v)return U.info("Cannot perform this operation on partially merged cells","")}let s=$.extend(!0,[],a.luckysheet_conditionformat_save);if(n.length>1&&s.length>0){let v=!1,b=$e.getComputeMap(a.index);for(let k=0;k<n.length;k++){let w=n[k].row[0],x=n[k].row[1],C=n[k].column[0],S=n[k].column[1];for(let _=w;_<=x;_++){for(let T=C;T<=S;T++)if($e.checksCF(_,T,b)!=null){v=!0;break}if(v)break}if(v)break}if(v)return U.info("Cannot perform this operation on multiple selection areas, please select a single area","")}if(n.length>1){let v=!0,b=n[0].row[0],k=n[0].row[1],w=!0,x=n[0].column[0],C=n[0].column[1];for(let S=1;S<n.length;S++)(n[S].row[0]!=b||n[S].row[1]!=k)&&(v=!1),(n[S].column[0]!=x||n[S].column[1]!=C)&&(w=!1);if(!v&&!w||Yr(n))return U.info("Cannot perform this operation on multiple selection areas, please select a single area","")}let u=[],d=[];for(let v=0;v<n.length;v++){let b=n[v].row[0],k=n[v].row[1],w=n[v].column[0],x=n[v].column[1];for(let C=b;C<=k;C++)if(!(o.rowhidden!=null&&o.rowhidden[C]!=null)){u.includes(C)||u.push(C);for(let S=w;S<=x;S++)o.colhidden!=null&&o.colhidden[S]!=null||d.includes(S)||d.push(S)}}let f;o.borderInfo&&o.borderInfo.length>0&&(f=Gr(a.index));let m=a.data;(m==null||m.length==0)&&(m=ve.buildGridData(a));let g="",y="";u=u.sort((v,b)=>v-b),d=d.sort((v,b)=>v-b);for(let v=0;v<u.length;v++){let b=u[v];if(!(o.rowhidden!=null&&o.rowhidden[b]!=null)){g+="<tr>";for(let k=0;k<d.length;k++){let w=d[k];if(o.colhidden!=null&&o.colhidden[w]!=null)continue;let x='<td ${span} style="${style}">';if(m[b]!=null&&m[b][w]!=null){let C="",S="";b==u[0]&&(o.columnlen==null||o.columnlen[w.toString()]==null?y+='<colgroup width="72px"></colgroup>':y+='<colgroup width="'+o.columnlen[w.toString()]+'px"></colgroup>'),w==d[0]&&(o.rowlen==null||o.rowlen[b.toString()]==null?C+="height:19px;":C+="height:"+o.rowlen[b.toString()]+"px;");let _=/^(w|W)((0?)|(0\.0+))$/,T;if(m[b][w].ct!=null&&m[b][w].ct.fa!=null&&m[b][w].ct.fa.match(_)?T=ze(b,w,m):T=ze(b,w,m,"m"),C+=ke.getStyleByCell(m,b,w),P(m[b][w])=="object"&&"mc"in m[b][w])if("rs"in m[b][w].mc){if(S='rowspan="'+m[b][w].mc.rs+'" colspan="'+m[b][w].mc.cs+'"',f&&f[b+"_"+w]){let A={color:{},style:{}},R={color:{},style:{}},I={color:{},style:{}},F={color:{},style:{}};for(let E=b;E<b+m[b][w].mc.rs;E++)for(let N=w;N<w+m[b][w].mc.cs;N++){if(E==b&&f[E+"_"+N]&&f[E+"_"+N].t){let L=f[E+"_"+N].t.style,O=f[E+"_"+N].t.color;I.style[L]==null?I.style[L]=1:I.style[L]=I.style[L]+1,I.color[O]==null?I.color[O]=1:I.color[O]=I.color[O]+1}if(E==b+m[b][w].mc.rs-1&&f[E+"_"+N]&&f[E+"_"+N].b){let L=f[E+"_"+N].b.style,O=f[E+"_"+N].b.color;F.style[L]==null?F.style[L]=1:F.style[L]=F.style[L]+1,F.color[O]==null?F.color[O]=1:F.color[O]=F.color[O]+1}if(N==w&&f[E+"_"+N]&&f[E+"_"+N].l){let L=f[b+"_"+w].l.style,O=f[E+"_"+N].l.color;A.style[L]==null?A.style[L]=1:A.style[L]=A.style[L]+1,A.color[O]==null?A.color[O]=1:A.color[O]=A.color[O]+1}if(N==w+m[b][w].mc.cs-1&&f[E+"_"+N]&&f[E+"_"+N].r){let L=f[E+"_"+N].r.style,O=f[E+"_"+N].r.color;R.style[L]==null?R.style[L]=1:R.style[L]=R.style[L]+1,R.color[O]==null?R.color[O]=1:R.color[O]=R.color[O]+1}}let z=m[b][w].mc.rs,M=m[b][w].mc.cs;if(JSON.stringify(A).length>23){let E=null,N=null;for(let L in A.color)A.color[L]>=z/2&&(E=L);for(let L in A.style)A.style[L]>=z/2&&(N=L);E!=null&&N!=null&&(C+="border-left:"+Ct.getHtmlBorderStyle(N,E))}if(JSON.stringify(R).length>23){let E=null,N=null;for(let L in R.color)R.color[L]>=z/2&&(E=L);for(let L in R.style)R.style[L]>=z/2&&(N=L);E!=null&&N!=null&&(C+="border-right:"+Ct.getHtmlBorderStyle(N,E))}if(JSON.stringify(I).length>23){let E=null,N=null;for(let L in I.color)I.color[L]>=M/2&&(E=L);for(let L in I.style)I.style[L]>=M/2&&(N=L);E!=null&&N!=null&&(C+="border-top:"+Ct.getHtmlBorderStyle(N,E))}if(JSON.stringify(F).length>23){let E=null,N=null;for(let L in F.color)F.color[L]>=M/2&&(E=L);for(let L in F.style)F.style[L]>=M/2&&(N=L);E!=null&&N!=null&&(C+="border-bottom:"+Ct.getHtmlBorderStyle(N,E))}}}else continue;else if(f&&f[b+"_"+w]){if(f[b+"_"+w].l){let A=f[b+"_"+w].l.style,R=f[b+"_"+w].l.color;C+="border-left:"+Ct.getHtmlBorderStyle(A,R)}if(f[b+"_"+w].r){let A=f[b+"_"+w].r.style,R=f[b+"_"+w].r.color;C+="border-right:"+Ct.getHtmlBorderStyle(A,R)}if(f[b+"_"+w].b){let A=f[b+"_"+w].b.style,R=f[b+"_"+w].b.color;C+="border-bottom:"+Ct.getHtmlBorderStyle(A,R)}if(f[b+"_"+w].t){let A=f[b+"_"+w].t.style,R=f[b+"_"+w].t.color;C+="border-top:"+Ct.getHtmlBorderStyle(A,R)}}x=_e(x,{style:C,span:S}),T==null&&(T=ze(b,w,m)),T==null&&(T=" "),x+=T}else{let C="";if(f&&f[b+"_"+w]){if(f[b+"_"+w].l){let S=f[b+"_"+w].l.style,_=f[b+"_"+w].l.color;C+="border-left:"+Ct.getHtmlBorderStyle(S,_)}if(f[b+"_"+w].r){let S=f[b+"_"+w].r.style,_=f[b+"_"+w].r.color;C+="border-right:"+Ct.getHtmlBorderStyle(S,_)}if(f[b+"_"+w].b){let S=f[b+"_"+w].b.style,_=f[b+"_"+w].b.color;C+="border-bottom:"+Ct.getHtmlBorderStyle(S,_)}if(f[b+"_"+w].t){let S=f[b+"_"+w].t.style,_=f[b+"_"+w].t.color;C+="border-top:"+Ct.getHtmlBorderStyle(S,_)}}x+="",b==u[0]&&(o.columnlen==null||o.columnlen[w.toString()]==null?y+='<colgroup width="72px"></colgroup>':y+='<colgroup width="'+o.columnlen[w.toString()]+'px"></colgroup>'),w==d[0]&&(o.rowlen==null||o.rowlen[b.toString()]==null?C+="height:19px;":C+="height:"+o.rowlen[b.toString()]+"px;"),x=_e(x,{style:C,span:""}),x+=" "}x+="</td>",g+=x}g+="</tr>"}}return g='<table data-type="luckysheet_copy_action_table">'+y+g+"</table>",g}function i0(e,n={}){if(!["oneDimensional","twoDimensional"].includes(e))return U.info("The dimensional parameter is invalid.","");let{range:l=h.luckysheet_select_save[h.luckysheet_select_save.length-1],order:a=Z(h.currentSheetIndex)}=Ue({},n),o=h.luckysheetfile[a];if(o==null)return U.info("The order parameter is invalid.","");if(P(l)=="string"){if(!p.iscelldata(l))return U.info("The range parameter is invalid.","");l=p.getcellrange(l)}if(P(l)!="object"||l.row==null||l.column==null)return U.info("The range parameter is invalid.","");let s=l.row[0],u=l.row[1],d=l.column[0],f=l.column[1],m=$.extend(!0,{},o.config);if(m.merge!=null&&Mt(m,s,u,d,f))return U.info("Cannot perform this operation on partially merged cells","");let g=o.data;(g==null||g.length==0)&&(g=ve.buildGridData(o));let y=[];if(e=="oneDimensional")for(let v=s;v<=u;v++)for(let b=d;b<=f;b++){let k=g[v][b];k==null||k.v==null?y.push(null):y.push(k.v)}else if(e=="twoDimensional")for(let v=s;v<=u;v++){let b=[];for(let k=d;k<=f;k++){let w=g[v][k];w==null||w.v==null?b.push(null):b.push(w.v)}y.push(b)}return y}function o0(e,n={}){let t=h.luckysheet_select_save[0],l=Z(h.currentSheetIndex),{range:a=t,order:o=l}=Ue({},n),s=h.luckysheetfile[o],u=s.config;if(a&&typeof a=="string"&&p.iscelldata(a)&&(a=p.getcellrange(a)),!a||a.length>1){de()?alert(locale_drag.noMulti):U.info(locale_drag.noMulti,"");return}if(u.merge!=null){let m=!1,g=a.row[0],y=a.row[1],v=a.column[0],b=a.column[1];if(m=Mt(u,g,y,v,b),m){de()?alert(Q().drag.noPartMerge):U.info(Q().drag.noPartMerge,"");return}}let d=Pt(a,s.index),f=[];if(d.length!==0){if(e)if(d.length===1){let m={};for(let g=0;g<d[0].length;g++)m[ze(0,g,d)]="";f.push(m)}else for(let m=1;m<d.length;m++){let g={};for(let y=0;y<d[0].length;y++)ze(0,y,d)==null?g[""]=ze(m,y,d):g[ze(0,y,d)]=ze(m,y,d);f.push(g)}else{let m=a.column[0];for(let g=0;g<d.length;g++){let y={};for(let v=0;v<d[0].length;v++)y[tt(v+m)]=ze(g,v,d);f.push(y)}}return f}}function s0(e,n={}){if(["normal","anti","offset"].indexOf(e)<0)return U.info("The type parameter must be included in ['normal', 'anti', 'offset']","");let l=Z(h.currentSheetIndex),a=JSON.parse(JSON.stringify(h.luckysheet_select_save)),{column:o=1,range:s=a,order:u=l}=Ue({},n),f=h.luckysheetfile[u].config;if(s&&typeof s=="string"&&p.iscelldata(s)&&(s=p.getcellrange(s)),!s||s.length>1){de()?alert(Q().drag.noMulti):U.info(Q().drag.noMulti,"");return}if(f.merge!=null){let v=!1,b=s[0].row[0],k=s[0].row[1],w=s[0].column[0],x=s[0].column[1];if(v=Mt(f,b,k,w,x),v){de()?alert(Q().drag.noPartMerge):U.info(Q().drag.noPartMerge,"");return}}let m=Pt(s,u),g=[];if(m.length===0)return;let y=m[0].length;switch(e){case"normal":for(let v=0;v<m.length&&!(v>=y);v++)g.push(m[v][v]);break;case"anti":for(let v=0;v<m.length&&!(v>=y);v++)g.push(m[v][y-v-1]);break;case"offset":if(o.toString()=="NaN"){de()?alert(Q().drag.inputCorrect):U.info(Q().drag.inputCorrect,"");return}if(o<0){de()?alert(Q().drag.offsetColumnLessZero):U.info(Q().drag.offsetColumnLessZero,"");return}for(let v=0;v<m.length&&!(v+o>=y);v++)g.push(m[v][v+o]);break}Ct.copybyformat(new Event,JSON.stringify(g))}function c0(e={}){let n=Z(h.currentSheetIndex),t=JSON.parse(JSON.stringify(h.luckysheet_select_save)),{range:l=t,order:a=n}=Ue({},e),s=h.luckysheetfile[a].config;if(l&&typeof l=="string"&&p.iscelldata(l)&&(l=p.getcellrange(l)),!l||l.length>1){de()?alert(Q().drag.noMulti):U.info(Q().drag.noMulti,"");return}if(s.merge!=null){let f=!1,m=l[0].row[0],g=l[0].row[1],y=l[0].column[0],v=l[0].column[1];if(f=Mt(s,m,g,y,v),f){de()?alert(Q().drag.noPartMerge):U.info(Q().drag.noPartMerge,"");return}}let u=Pt(l,a),d=[];if(u.length!==0){for(let f=0;f<u.length;f++){let m=[];for(let g=0;g<u[0].length;g++){let y=!1,v;P(u[f][g])=="object"?v=u[f][g].v:v=u[f][g],v==null||v==""?y=!1:(v=parseInt(v),v==null||v>0?y=!0:y=!1),m.push(y)}d.push(m)}Ct.copybyformat(event,JSON.stringify(d))}}function u0(e,n={}){if(P(e)=="string"){if(!p.iscelldata(e))return U.info("The range parameter is invalid.","");let s=p.getcellrange(e);e=[{row:s.row,column:s.column}]}else if(P(e)=="object"){if(e.row==null||e.column==null)return U.info("The range parameter is invalid.","");e=[{row:e.row,column:e.column}]}if(P(e)=="array"){for(let s=0;s<e.length;s++)if(P(e[s])==="string"){if(!p.iscelldata(e[s]))return U.info("The range parameter is invalid.","");let u=p.getcellrange(e[s]);e[s]={row:u.row,column:u.column}}else if(P(e)=="object"){if(e.row==null||e.column==null)return U.info("The range parameter is invalid.","");e={row:e.row,column:e.column}}}if(P(e)!="array")return U.info("The range parameter is invalid.","");let{show:t=!0,order:l=Z(h.currentSheetIndex),success:a}=Ue({},n),o=h.luckysheetfile[l];if(o==null)return U.info("The order parameter is invalid.","");for(let s=0;s<e.length;s++){let u=ke.mergeMoveMain(e[s].column,e[s].row,e[s]);u&&(e[s]={row:u[1],column:u[0]})}o.luckysheet_select_save=e,o.index==h.currentSheetIndex&&(h.luckysheet_select_save=e,lt(),t||($("#luckysheet-cell-selected-boxs").hide(),$("#luckysheet-cell-selected-focus").hide(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide(),$("#luckysheet-rows-h-selected").empty(),$("#luckysheet-cols-h-selected").empty())),a&&typeof a=="function"&&a()}function h0(e,n={}){let t=Z(h.currentSheetIndex),l=h.luckysheet_select_save[h.luckysheet_select_save.length-1],{range:a=l,isRefresh:o=!0,order:s=t,success:u}=Ue({},n);if(e==null)return U.info("The data which will be set to range cannot be null.","");if(a instanceof Array)return U.info("setRangeValue only supports a single selection.","");typeof a=="string"&&p.iscelldata(a)&&(a=p.getcellrange(a));let d=a.row[1]-a.row[0]+1,f=a.column[1]-a.column[0]+1;if(e.length!==d||e[0].length!==f)return U.info("The data to be set does not match the selection.","");let m=h.luckysheetfile[s];if(m==null)return U.info("The order parameter is invalid.","");let g=$.extend(!0,[],m.data);for(let v=0;v<d;v++)for(let b=0;b<f;b++){let k=a.row[0]+v,w=a.column[0]+b;ti(k,w,e[v][b],{order:s,isRefresh:!1})}let y=$.extend(!0,[],m.data);m.data.length=0,m.data.push(...g),m.index==h.currentSheetIndex&&Ze(y,[{row:a.row,column:a.column}],void 0,!0,!1),o&&Be(),u&&typeof u=="function"&&u()}function em(e,n,t={}){let l=Z(h.currentSheetIndex),a=h.luckysheet_select_save[h.luckysheet_select_save.length-1],{range:o=a,order:s=l}=Ue({},t);if(!e)return U.info("Arguments attr cannot be null or undefined.",""),"error";if(o instanceof Array)return U.info("setRangeValue only supports a single selection.",""),"error";if(P(o)=="string"){if(!p.iscelldata(o))return U.info("The range parameter is invalid.",""),"error";o=p.getcellrange(o)}if(P(o)!="object"||o.row==null||o.column==null)return U.info("The range parameter is invalid.",""),"error";for(let u=o.row[0];u<=o.row[1];u++)for(let d=o.column[0];d<=o.column[1];d++)console.log("r",u),console.log("c",d),ti(u,d,{[e]:n},{order:s,isRefresh:!1})}function d0(e,n,t={}){let l=Z(h.currentSheetIndex),a=JSON.parse(JSON.stringify(h.luckysheet_select_save)),{range:o=a,order:s=l,success:u}=Ue({},t);if(P(o)=="string"){if(!p.iscelldata(o))return U.info("The range parameter is invalid.","");let g=p.getcellrange(o);o=[{row:g.row,column:g.column}]}else if(P(o)=="object"){if(o.row==null||o.column==null)return U.info("The range parameter is invalid.","");o=[{row:o.row,column:o.column}]}if(P(o)!="array")return U.info("The range parameter is invalid.","");let d=h.luckysheetfile[s],f=[];for(let g=0;g<o.length;g++)f.push(em(e,n,{range:o[g],order:s}));let m=$.extend(!0,[],d.data);if(f.some(g=>g==="error"))return d.data.length=0,d.data.push(...m),!1;d.data.length=0,d.data.push(...m),d.index==h.currentSheetIndex&&Ze(m,void 0,void 0,!0,!1),Be(),u&&typeof u=="function"}function f0(e,n={}){if(!["open","close"].includes(e))return U.info("The type parameter is invalid.","");let{range:l=h.luckysheet_select_save[h.luckysheet_select_save.length-1],order:a=Z(h.currentSheetIndex),success:o}=Ue({},n),s=h.luckysheetfile[a];if(s==null)return U.info("The order parameter is invalid.","");if(P(l)=="string"){if(!p.iscelldata(l))return U.info("The range parameter is invalid.","");l=p.getcellrange(l)}if(P(l)!="object"||l.row==null||l.column==null)return U.info("The range parameter is invalid.","");if(setTimeout(()=>{o&&typeof o=="function"&&o()},1),e=="open")return s.filter_select=l,s.index==h.currentSheetIndex&&Dl(l,s.filter),{row:l.row,column:l.column};if(e=="close"){let u=$.extend(!0,{},s.filter_select);return s.filter_select=null,$("#luckysheet-filter-selected-sheet"+s.index).remove(),$("#luckysheet-filter-options-sheet"+s.index).remove(),{row:u.row,column:u.column}}}function m0(e,n={}){if(["all","horizontal","vertical"].indexOf(e)<0)return U.info("The type parameter must be included in ['all', 'horizontal', 'vertical']","");let l=Z(h.currentSheetIndex),a=JSON.parse(JSON.stringify(h.luckysheet_select_save)),{range:o=a,order:s=l,success:u}=Ue({},n),d=h.luckysheetfile[s],f=$.extend(!0,{},d.config),m=$.extend(!0,[],d.data);if(m.length==0&&(m=$.extend(!0,[],ve.buildGridData(d))),P(o)=="string"){if(!p.iscelldata(o))return U.info("Incorrect selection format","");let y=p.getcellrange(o);o=[{row:y.row,column:y.column}]}else if(P(o)=="object"){if(!o.hasOwnProperty("row")||!o.hasOwnProperty("column"))return U.info("Incorrect selection format","");o=[{row:o.row,column:o.column}]}if(Yr(o))return U.info("Cannot merge overlapping range","");if(f.merge!=null){let y=!1;for(let v=0;v<o.length;v++){let b=o[v].row[0],k=o[v].row[1],w=o[v].column[0],x=o[v].column[1];if(y=Mt(f,b,k,w,x),y)break}if(y)return U.info("Cannot perform this operation on partially merged cells","")}else f.merge={};let g=!1;for(let y=0;y<o.length;y++){let v=o[y].row[0],b=o[y].row[1],k=o[y].column[0],w=o[y].column[1];for(let x=v;x<=b;x++){for(let C=k;C<=w;C++){let S=m[x][C];if(P(S)=="object"&&"mc"in S){g=!0;break}}if(g)break}}if(g)tm({range:o,order:s});else{for(let y=0;y<o.length;y++){let v=o[y].row[0],b=o[y].row[1],k=o[y].column[0],w=o[y].column[1];if(!(v==b&&k==w)){if(e=="all"){let x={},C=!1;for(let S=v;S<=b;S++)for(let _=k;_<=w;_++){let T=m[S][_];T!=null&&(!me(T.v)||T.f!=null)&&!C&&(x=$.extend(!0,{},T),C=!0),m[S][_]={mc:{r:v,c:k}}}m[v][k]=x,m[v][k].mc={r:v,c:k,rs:b-v+1,cs:w-k+1},f.merge[v+"_"+k]={r:v,c:k,rs:b-v+1,cs:w-k+1}}else if(e=="vertical")for(let x=k;x<=w;x++){let C={},S=!1;for(let _=v;_<=b;_++){let T=m[_][x];T!=null&&(!me(T.v)||T.f!=null)&&!S&&(C=$.extend(!0,{},T),S=!0),m[_][x]={mc:{r:v,c:x}}}m[v][x]=C,m[v][x].mc={r:v,c:x,rs:b-v+1,cs:1},f.merge[v+"_"+x]={r:v,c:x,rs:b-v+1,cs:1}}else if(e=="horizontal")for(let x=v;x<=b;x++){let C={},S=!1;for(let _=k;_<=w;_++){let T=m[x][_];T!=null&&(!me(T.v)||T.f!=null)&&!S&&(C=$.extend(!0,{},T),S=!0),m[x][_]={mc:{r:x,c:k}}}m[x][k]=C,m[x][k].mc={r:x,c:k,rs:1,cs:w-k+1},f.merge[x+"_"+k]={r:x,c:k,rs:1,cs:w-k+1}}}}s==l?(h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"mergeChange",sheetIndex:d.index,data:$.extend(!0,[],d.data),curData:m,range:o,config:$.extend(!0,{},d.config),curConfig:f})),h.clearjfundo=!1,Ze(m,o,{cfg:f}),h.clearjfundo=!0):(d.data=m,d.config=f)}u&&typeof u=="function"&&u()}function tm(e={}){let n=h.luckysheet_select_save,t=Z(h.currentSheetIndex),{range:l=n,order:a=t,success:o}=Ue({},e),s=h.luckysheetfile[a],u=$.extend(!0,{},s.config),d=$.extend(!0,[],s.data);if(d.length==0&&(d=$.extend(!0,[],ve.buildGridData(s))),P(l)=="string"){if(!p.iscelldata(l))return U.info("Incorrect selection format","");let f=p.getcellrange(l);l=[{row:f.row,column:f.column}]}else if(P(l)=="object"){if(!l.hasOwnProperty("row")||!l.hasOwnProperty("column"))return U.info("Incorrect selection format","");l=[{row:l.row,column:l.column}]}if(Yr(l))return U.info("Cannot merge overlapping range","");if(u.merge!=null){let f=!1;for(let m=0;m<l.length;m++){let g=l[m].row[0],y=l[m].row[1],v=l[m].column[0],b=l[m].column[1];if(f=Mt(u,g,y,v,b),f)break}if(f)return U.info("Cannot perform this operation on partially merged cells","")}for(let f=0;f<l.length;f++){let m=l[f].row[0],g=l[f].row[1],y=l[f].column[0],v=l[f].column[1];if(m==g&&y==v)continue;let b={};for(let k=m;k<=g;k++)for(let w=y;w<=v;w++){let x=d[k][w];if(x!=null&&x.mc!=null){let C=x.mc.r,S=x.mc.c;if("rs"in x.mc)delete x.mc,delete u.merge[C+"_"+S],b[C+"_"+S]=$.extend(!0,{},x);else{let _=JSON.parse(JSON.stringify(b[C+"_"+S]));delete _.v,delete _.m,delete _.ct,delete _.f,delete _.spl,d[k][w]=_}}}}a==t?(h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"mergeChange",sheetIndex:s.index,data:$.extend(!0,[],s.data),curData:d,range:l,config:$.extend(!0,{},s.config),curConfig:u})),h.clearjfundo=!1,Ze(d,l,{cfg:u}),h.clearjfundo=!0):(s.data=d,s.config=u)}function p0(e,n={}){if(["asc","desc"].indexOf(e)<0)return U.info("The type parameter must be included in ['asc', 'desc'","");let l=Z(h.currentSheetIndex),a=h.luckysheet_select_save[0],{range:o=a,order:s=l,success:u}=Ue({},n),d=h.luckysheetfile[s],f=$.extend(!0,{},d.config),m=$.extend(!0,[],d.data);if(m.length==0&&(m=$.extend(!0,[],ve.buildGridData(d))),o instanceof Array&&o.length>1){U.info(Q().sort.noRangeError,"");return}o&&typeof o=="string"&&p.iscelldata(o)&&(o=p.getcellrange(o));let g=o.row[0],y=o.row[1],v=o.column[0],b=o.column[1],k=!1,w=[];for(let C=g;C<=y;C++){let S=[];for(let _=v;_<=b;_++){if(m[C][_]!=null&&m[C][_].mc!=null){k=!0;break}S.push(m[C][_])}w.push(S)}if(k){U.info(Q().sort.mergeError,"");return}w=Hr([].concat(w),0,e==="asc");for(let C=g;C<=y;C++)for(let S=v;S<=b;S++)m[C][S]=w[C-g][S-v];let x={};f.rowlen!=null&&(f=yl(m,g,y,f),x={cfg:f,RowlChange:!0}),d.index==h.currentSheetIndex?Ze(m,[{row:[g,y],column:[v,b]}],x):(d.data=m,d.config=f),u&&typeof u=="function"&&u()}function g0(e,n,t={}){if(!n||!(n instanceof Array))return U.info("The sort parameter is invalid.","");let l=Z(h.currentSheetIndex),a=h.luckysheet_select_save[0],{range:o=a,order:s=l,success:u}=Ue({},t),d=h.luckysheetfile[s],f=$.extend(!0,{},d.config),m=$.extend(!0,[],d.data);if(m.length==0&&(m=$.extend(!0,[],ve.buildGridData(d))),o instanceof Array&&o.length>1){U.info(Q().sort.noRangeError,"");return}o&&typeof o=="string"&&p.iscelldata(o)&&(o=p.getcellrange(o));let g=o.row[0],y=o.row[1],v=o.column[0],b=o.column[1],k;e?k=g+1:k=g;let w=!1,x=[];for(let S=k;S<=y;S++){let _=[];for(let T=v;T<=b;T++){if(m[S][T]!=null&&m[S][T].mc!=null){w=!0;break}_.push(m[S][T])}x.push(_)}if(w){U.info(Q().sort.mergeError,"");return}n.forEach(S=>{let _=S.i;_-=v,x=Hr([].concat(x),_,S.sort==="asc")});for(let S=k;S<=y;S++)for(let _=v;_<=b;_++)m[S][_]=x[S-k][_-v];let C={};f.rowlen!=null&&(f=yl(m,k,y,f),C={cfg:f,RowlChange:!0}),d.index===h.currentSheetIndex?Ze(m,[{row:[k,y],column:[v,b]}],C):(d.data=m,d.config=f),u&&typeof u=="function"&&u()}function y0(e,n,t={}){if(!e||!["greaterThan","lessThan","betweenness","equal","textContains","occurrenceDate","duplicateValue","top10","top10%","last10","last10%","AboveAverage","SubAverage"].includes(e))return U.info("The conditionName parameter is invalid.","");if(P(n)!="array"||n.length==0)return U.info("The conditionValue parameter is invalid.","");let{format:a={textColor:"#000000",cellColor:"#ff0000"},cellrange:o=h.luckysheet_select_save,order:s=Z(h.currentSheetIndex),success:u}=Ue({},t);o=JSON.parse(JSON.stringify(o));let d=h.luckysheetfile[s],f=d.data;if((f==null||f.length==0)&&(f=ve.buildGridData(d)),d==null)return U.info("Incorrect worksheet index","");let m=Q().conditionformat,g=[],y=[];if(e=="betweenness"){let S=n[0],_=n[1],T=$e.getRangeByTxt(S);if(T.length>1){$e.infoDialog(m.onlySingleCell,"");return}else if(T.length==1){let R=T[0].row[0],I=T[0].row[1],F=T[0].column[0],z=T[0].column[1];if(R==I&&F==z)S=ze(R,F,f),g.push({row:T[0].row,column:T[0].column}),y.push(S);else{$e.infoDialog(m.onlySingleCell,"");return}}else if(T.length==0)if(isNaN(S)||S==""){$e.infoDialog(m.conditionValueCanOnly,"");return}else y.push(S);let A=$e.getRangeByTxt(_);if(A.length>1){$e.infoDialog(m.onlySingleCell,"");return}else if(A.length==1){let R=A[0].row[0],I=A[0].row[1],F=A[0].column[0],z=A[0].column[1];if(R==I&&F==z)_=ze(R,F,f),g.push({row:A[0].row,column:A[0].column}),y.push(_);else{$e.infoDialog(m.onlySingleCell,"");return}}else if(A.length==0)if(isNaN(_)||_==""){$e.infoDialog(m.conditionValueCanOnly,"");return}else y.push(_)}else if(e=="greaterThan"||e=="lessThan"||e=="equal"){let S=n[0],_=$e.getRangeByTxt(S);if(_.length>1){$e.infoDialog(m.onlySingleCell,"");return}else if(_.length==1){let T=_[0].row[0],A=_[0].row[1],R=_[0].column[0],I=_[0].column[1];if(T==A&&R==I)S=ze(T,R,f),g.push({row:_[0].row,column:_[0].column}),y.push(S);else{$e.infoDialog(m.onlySingleCell,"");return}}else if(_.length==0)if(isNaN(S)||S==""){$e.infoDialog(m.conditionValueCanOnly,"");return}else y.push(S)}else if(e=="textContains"){let S=n[0],_=$e.getRangeByTxt(S);if(_.length>1){$e.infoDialog(m.onlySingleCell,"");return}else if(_.length==1){let T=_[0].row[0],A=_[0].row[1],R=_[0].column[0],I=_[0].column[1];if(T==A&&R==I)S=ze(T,R,f),g.push({row:_[0].row,column:_[0].column}),y.push(S);else{$e.infoDialog(m.onlySingleCell,"");return}}else if(_.length==0)if(S==""){$e.infoDialog(m.conditionValueCanOnly,"");return}else y.push(S)}else if(e=="occurrenceDate"){let S=n[0],_=n[1];if(!Lt(S)||!Lt(_))return U.info("The conditionValue parameter is invalid.","");let T;ul(S,_)>0?T=(0,qi.default)(_).format("YYYY/MM/DD")+"-"+(0,qi.default)(S).format("YYYY/MM/DD"):T=(0,qi.default)(S).format("YYYY/MM/DD")+"-"+(0,qi.default)(_).format("YYYY/MM/DD"),y.push(T)}else if(e=="duplicateValue"){let S=n[0];if(S!="0"||S!="1")return U.info("The conditionValue parameter is invalid.","");y.push(S)}else if(e=="top10"||e=="top10%"||e=="last10"||e=="last10%"){let S=n[0];if(parseInt(S)!=S||parseInt(S)<1||parseInt(S)>1e3){$e.infoDialog(m.pleaseEnterInteger,"");return}y.push(parseInt(S))}else(e=="AboveAverage"||e=="SubAverage")&&y.push(e);if(!a.hasOwnProperty("textColor")||!a.hasOwnProperty("cellColor"))return U.info("The format parameter is invalid.","");if(P(o)=="string"?o=$e.getRangeByTxt(o):P(o)=="object"&&(o=[o]),P(o)!="array")return U.info("The cellrange parameter is invalid.","");let v={type:"default",cellrange:o,format:a,conditionName:e,conditionRange:g,conditionValue:y},b=$.extend(!0,[],h.luckysheetfile),k=$e.getHistoryRules(b),w=d.luckysheet_conditionformat_save||[];w.push(v),d.luckysheet_conditionformat_save=w;let x=$.extend(!0,[],h.luckysheetfile),C=$e.getCurrentRules(x);$e.ref(k,C),ne.allowUpdate&&ne.saveParam("all",d.index,w,{k:"luckysheet_conditionformat_save"}),u&&typeof u=="function"&&u()}function v0(e,n={}){if(!e||!["dataBar","colorGradation","icons"].includes(e))return U.info("The type parameter is invalid.","");let{format:l,cellrange:a=h.luckysheet_select_save,order:o=Z(h.currentSheetIndex),success:s}=Ue({},n);a=JSON.parse(JSON.stringify(a));let u=h.luckysheetfile[o];if(u==null)return U.info("Incorrect worksheet index","");if(e=="dataBar"){if(l==null&&(l=["#638ec6","#ffffff"]),P(l)!="array"||l.length<1||l.length>2)return U.info("The format parameter is invalid.","")}else if(e=="colorGradation"){if(l==null&&(l=["rgb(99, 190, 123)","rgb(255, 235, 132)","rgb(248, 105, 107)"]),P(l)!="array"||l.length<2||l.length>3)return U.info("The format parameter is invalid.","")}else if(e=="icons"){l==null&&(l="threeWayArrowMultiColor");let b=["threeWayArrowMultiColor","threeTriangles","fourWayArrowMultiColor","fiveWayArrowMultiColor","threeWayArrowGrayColor","fourWayArrowGrayColor","fiveWayArrowGrayColor","threeColorTrafficLightRimless","threeSigns","greenRedBlackGradient","threeColorTrafficLightBordered","fourColorTrafficLight","threeSymbolsCircled","tricolorFlag","threeSymbolsnoCircle","threeStars","fiveQuadrantDiagram","fiveBoxes","grade4","grade5"];if(P(l)!="string"||!b.includes(l))return U.info("The format parameter is invalid.","");switch(l){case"threeWayArrowMultiColor":l={len:3,leftMin:0,top:0};break;case"threeTriangles":l={len:3,leftMin:0,top:1};break;case"fourWayArrowMultiColor":l={len:4,leftMin:0,top:2};break;case"fiveWayArrowMultiColor":l={len:5,leftMin:0,top:3};break;case"threeWayArrowGrayColor":l={len:3,leftMin:5,top:0};break;case"fourWayArrowGrayColor":l={len:4,leftMin:5,top:1};break;case"fiveWayArrowGrayColor":l={len:5,leftMin:5,top:2};break;case"threeColorTrafficLightRimless":l={len:3,leftMin:0,top:4};break;case"threeSigns":l={len:3,leftMin:0,top:5};break;case"greenRedBlackGradient":l={len:4,leftMin:0,top:6};break;case"threeColorTrafficLightBordered":l={len:3,leftMin:5,top:4};break;case"fourColorTrafficLight":l={len:4,leftMin:5,top:5};break;case"threeSymbolsCircled":l={len:3,leftMin:0,top:7};break;case"tricolorFlag":l={len:3,leftMin:0,top:8};break;case"threeSymbolsnoCircle":l={len:3,leftMin:5,top:7};break;case"threeStars":l={len:3,leftMin:0,top:9};break;case"fiveQuadrantDiagram":l={len:5,leftMin:0,top:10};break;case"fiveBoxes":l={len:5,leftMin:0,top:11};break;case"grade4":l={len:4,leftMin:5,top:9};break;case"grade5":l={len:5,leftMin:5,top:10};break}}if(P(a)=="string"?a=$e.getRangeByTxt(a):P(a)=="object"&&(a=[a]),P(a)!="array")return U.info("The cellrange parameter is invalid.","");let d={type:e,cellrange:a,format:l},f=$.extend(!0,[],h.luckysheetfile),m=$e.getHistoryRules(f),g=u.luckysheet_conditionformat_save||[];g.push(d),u.luckysheet_conditionformat_save=g;let y=$.extend(!0,[],h.luckysheetfile),v=$e.getCurrentRules(y);$e.ref(m,v),ne.allowUpdate&&ne.saveParam("all",u.index,g,{k:"luckysheet_conditionformat_save"}),s&&typeof s=="function"&&s()}function b0(e,n={}){if(!B(e))return U.info("The itemIndex parameter is invalid.","");e=Number(e);let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=$.extend(!0,[],a.luckysheet_conditionformat_save);if(o.length==0)return U.info("This worksheet has no conditional format to delete","");if(o[e]==null)return U.info("The conditional format of the index cannot be found","");let s=o.splice(e,1),u=$.extend(!0,[],h.luckysheetfile),d=$e.getHistoryRules(u);a.luckysheet_conditionformat_save=o;let f=$.extend(!0,[],h.luckysheetfile),m=$e.getCurrentRules(f);return $e.ref(d,m),ne.allowUpdate&&ne.saveParam("all",a.index,ruleArr,{k:"luckysheet_conditionformat_save"}),setTimeout(()=>{l&&typeof l=="function"&&l()},1),s}function k0(e={}){let{range:n=h.luckysheet_select_save,order:t=Z(h.currentSheetIndex),success:l}=Ue({},e);if(n=JSON.parse(JSON.stringify(n)),P(n)=="string"){if(!p.iscelldata(n))return U.info("The range parameter is invalid.","");let d=p.getcellrange(n);n=[{row:d.row,column:d.column}]}else if(P(n)=="object"){if(n.row==null||n.column==null)return U.info("The range parameter is invalid.","");n=[{row:n.row,column:n.column}]}if(P(n)!="array")return U.info("The range parameter is invalid.","");let a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=$.extend(!0,{},a.config),s=!1;for(let d=0;d<n.length;d++){let f=n[d].row[0],m=n[d].row[1],g=n[d].column[0],y=n[d].column[1];if(s=Mt(o,f,m,g,y),s)break}if(s)return U.info("Cannot perform this operation on partially merged cells","");let u=$.extend(!0,[],a.data);u.length==0&&(u=$.extend(!0,[],ve.buildGridData(a)));for(let d=0;d<n.length;d++){let f=n[d].row[0],m=n[d].row[1],g=n[d].column[0],y=n[d].column[1];for(let v=f;v<=m;v++)for(let b=g;b<=y;b++){let k=u[v][b];P(k)=="object"?(delete k.m,delete k.v,k.f!=null&&(delete k.f,p.delFunctionGroup(v,b,a.index),delete k.spl),k.ct!=null&&k.ct.t=="inlineStr"&&delete k.ct):u[v][b]=null}}a.index==h.currentSheetIndex?Ze(u,n):a.data=u,l&&typeof l=="function"&&l()}function w0(e,n={}){if(!["left","up"].includes(e))return U.info("The move parameter is invalid.","");let{range:l=h.luckysheet_select_save[h.luckysheet_select_save.length-1],order:a=Z(h.currentSheetIndex),success:o}=Ue({},n);if(P(l)=="string"){if(!p.iscelldata(l))return U.info("The range parameter is invalid.","");let g=p.getcellrange(l);l={row:g.row,column:g.column}}if(P(l)!="object"||l.row==null||l.column==null)return U.info("The range parameter is invalid.","");if(h.luckysheetfile[a]==null)return U.info("The order parameter is invalid.","");let u=l.row[0],d=l.row[1],f=l.column[0],m=l.column[1];e=="left"?ha("moveLeft",u,d,f,m,a):e=="up"&&ha("moveUp",u,d,f,m,a),o&&typeof o=="function"&&o()}function x0(e,n={}){if(!e||["flipUpDown","flipLeftRight","flipClockwise","flipCounterClockwise","transpose","deleteZeroByRow","deleteZeroByColumn","removeDuplicateByRow","removeDuplicateByColumn","newMatrix"].indexOf(e)<0)return U.info("The type parameter is invalid.","");let l=h.luckysheet_select_save[0],{range:a=l,success:o}=Ue({},n);if(a instanceof Array&&a.length>1){U.info(Q().drag.noMulti,"");return}a&&typeof a=="string"&&p.iscelldata(a)&&(a=p.getcellrange(a));let s=Pt(a),u=[];if(s.length===0)return;let d,f,m;switch(e){case"flipUpDown":for(let g=s.length-1;g>=0;g--){let y=[];for(let v=0;v<s[0].length;v++){let b="";s[g]!=null&&s[g][v]!=null&&(b=s[g][v]),y.push(b)}u.push(y)}break;case"flipLeftRight":for(let g=0;g<s.length;g++){let y=[];for(let v=s[0].length-1;v>=0;v--){let b="";s[g]!=null&&s[g][v]!=null&&(b=s[g][v]),y.push(b)}u.push(y)}break;case"flipClockwise":for(let g=0;g<s[0].length;g++){let y=[];for(let v=s.length-1;v>=0;v--){let b="";s[v]!=null&&s[v][g]!=null&&(b=s[v][g]),y.push(b)}u.push(y)}break;case"flipCounterClockwise":for(let g=s[0].length-1;g>=0;g--){let y=[];for(let v=0;v<s.length;v++){let b="";s[v]!=null&&s[v][g]!=null&&(b=s[v][g]),y.push(b)}u.push(y)}break;case"transpose":for(let g=0;g<s[0].length;g++){let y=[];for(let v=0;v<s.length;v++){let b="";s[v]!=null&&s[v][g]!=null&&(b=s[v][g]),y.push(b)}u.push(y)}break;case"deleteZeroByRow":d=s[0].length;for(let g=0;g<s.length;g++){let y=[],v=!0,b=!0;for(let w=0;w<d;w++){let x="";if(s[g]!=null&&s[g][w]!=null){if(x=s[g][w],(x.v=="0"||x.v==0)&&v)continue;v=!1}y.push(x)}let k=[];if(y.length==d)k=y;else{for(let x=y.length-1;x>=0;x--){let C="";if(y[x]!=null){if(C=y[x],(C.v=="0"||C.v==0)&&b)continue;b=!1}k.unshift(C)}let w=d-k.length;for(let x=0;x<w;x++)k.push("")}u.push(k)}break;case"deleteZeroByColumn":d=s.length,f=s[0].length;for(let g=0;g<f;g++){let y=[],v=!0,b=!0;for(let w=0;w<d;w++){let x="";if(s[w]!=null&&s[w][g]!=null){if(x=s[w][g],(x.v=="0"||x.v==0)&&v)continue;v=!1}y.push(x)}let k=[];if(y.length==d)k=y;else{for(let x=y.length-1;x>=0;x--){let C="";if(y[x]!=null){if(C=y[x],(C.v=="0"||C.v==0)&&b)continue;b=!1}k.unshift(C)}let w=d-k.length;for(let x=0;x<w;x++)k.push("")}u.push(k)}m=[];for(let g=0;g<u[0].length;g++){let y=[];for(let v=0;v<u.length;v++){let b="";u[v]!=null&&u[v][g]!=null&&(b=u[v][g]),y.push(b)}m.push(y)}break;case"removeDuplicateByRow":d=s[0].length;for(let g=0;g<s.length;g++){let y=[],v={};for(let k=0;k<d;k++){let w=null;s[g]!=null&&s[g][k]!=null&&(w=s[g][k],w.v in v||(v[w.v]=[]),v[w.v].push(w))}for(let k=0;k<d;k++){let w=null;s[g]!=null&&s[g][k]!=null&&(w=s[g][k],v[w.v].length==1&&y.push(w))}let b=d-y.length;for(let k=0;k<b;k++)y.push(null);u.push(y)}break;case"removeDuplicateByColumn":f=s[0].length,d=s.length;for(let g=0;g<f;g++){let y=[],v={};for(let k=0;k<d;k++){let w=null;s[k]!=null&&s[k][g]!=null&&(w=s[k][g],w.v in v||(v[w.v]=[]),v[w.v].push(w))}for(let k=0;k<d;k++){let w=null;s[k]!=null&&s[k][g]!=null&&(w=s[k][g],v[w.v].length==1&&y.push(w))}a1=y;let b=d-a1.length;for(let k=0;k<b;k++)a1.push(null);u.push(a1)}m=[];for(let g=0;g<u[0].length;g++){let y=[];for(let v=0;v<u.length;v++){let b=null;u[v]!=null&&u[v][g]!=null&&(b=u[v][g]),y.push(b)}m.push(y)}break;case"newMatrix":console.log("TODO");break}xe.controlHandler(u,a),o&&typeof o=="function"&&o()}function _0(e,n,t={}){if(!e||["plus","minus","multiply","divided","power","root","log"].indexOf(e)<0)return U.info("The type parameter is invalid.","");if(!B(n))return U.info("The number parameter is invalid.","");let a=h.luckysheet_select_save[0],{range:o=a,success:s}=Ue({},t);if(o instanceof Array&&o.length>1){U.info(Q().drag.noMulti,"");return}o&&typeof o=="string"&&p.iscelldata(o)&&(o=p.getcellrange(o));let u=Pt(o);if(u.length==0)return;let d=[];for(let f=0;f<u.length;f++){let m=[];for(let g=0;g<u[0].length;g++){let y="";u[f]!=null&&u[f][g]!=null&&(y=u[f][g],parseInt(y)!=null&&u[f][g].ct!=null&&u[f][g].ct.t=="n"&&(e=="minus"?y.v=y.v-n:e=="multiply"?y.v=y.v*n:e=="divided"?y.v=numFormat(y.v/n,4):e=="power"?y.v=Math.pow(y.v,n):e=="root"?n==2?y.v=numFormat(Math.sqrt(y.v),4):n==3&&Math.cbrt?y.v=numFormat(Math.cbrt(y.v),4):y.v=numFormat(jfnqrt(y.v,n),4):e=="log"?y.v=numFormat(Math.log(y.v)*1e4/Math.log(Math.abs(n)),4):y.v=y.v+n,y.v==null?y.m="":y.m=y.v.toString())),m.push(y)}d.push(m)}xe.controlHandler(d,o),s&&typeof s=="function"&&s()}function C0(e={}){let n=h.luckysheetfile.length-1,{sheetObject:t={},order:l=n,success:a}=Ue({},e);if(!B(l))return U.info("Parameter is not a table index","");l=Number(l);let o=ve.generateRandomSheetIndex();t.calcChain&&t.calcChain.length>0&&t.calcChain.forEach(f=>{f.index=o});let s=ve.generateRandomSheetName(h.luckysheetfile,!1);if(t.name){let f=!1;for(let m=0;m<h.luckysheetfile.length;m++)if(h.luckysheetfile[m].name==t.name){f=!0;break}f||(s=t.name)}$("#luckysheet-sheet-container-c").append(_e(Ql,{index:o,active:"",name:s,style:"",colorset:""}));let u={name:"",color:"",status:"0",order:"",index:"",celldata:[],row:h.defaultrowNum,column:h.defaultcolumnNum,config:{},pivotTable:null,isPivotTable:!1};if(u=$.extend(!0,u,t),u.index=o,u.name=s,u.order=l,l<=0){let f=h.luckysheetfile[0].index,m=$("#luckysheet-sheets-item"+f);$("#luckysheet-sheets-item"+o).insertBefore(m),h.luckysheetfile.splice(0,0,u)}else{l>h.luckysheetfile.length&&(l=h.luckysheetfile.length);let f=h.luckysheetfile[l-1].index,m=$("#luckysheet-sheets-item"+f);$("#luckysheet-sheets-item"+o).insertAfter(m),h.luckysheetfile.splice(l,0,u)}let d={};if(h.luckysheetfile.forEach((f,m,g)=>{g[m].order=m,d[f.index.toString()]=m}),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),$("#luckysheet-sheets-item"+o).addClass("luckysheet-sheets-item-active"),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+o+'" class="luckysheet-datavisual-selection-set"></div>'),rl(!0),ne.saveParam("sha",null,$.extend(!0,{},u)),ne.saveParam("shr",null,d),h.clearjfundo){h.jfundo.length=0;let f={};f.type="addSheet",f.sheetconfig=$.extend(!0,{},u),f.index=o,f.currentSheetIndex=h.currentSheetIndex,h.jfredo.push(f)}return ve.changeSheetExec(o,!1,!0),a&&typeof a=="function"&&a(),u}function T0(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e),l=h.luckysheetfile[n];return l==null?U.info("The order parameter is invalid.",""):h.luckysheetfile.length===1?U.info(Q().sheetconfig.noMoreSheet,""):(ve.deleteSheet(l.index),setTimeout(()=>{t&&typeof t=="function"&&t()},1),l)}function S0(e={}){let{targetOrder:n,order:t=Z(h.currentSheetIndex),success:l}=Ue({},e),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");if(n==null&&(n=t+1),!B(n))return U.info("The targetOrder parameter is invalid.","");let o=a.index,s=ve.generateRandomSheetIndex(),u=$.extend(!0,{},a);u.order=h.luckysheetfile.length,u.index=s,u.name=ve.generateCopySheetName(h.luckysheetfile,u.name);let d="";u.color!=null&&(d='<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+u.color+';"></div>');let f=$("#luckysheet-sheets-item"+o);if(B(n)&&(f=$("#luckysheet-sheets-item"+h.luckysheetfile[n-1].index)),$("#luckysheet-sheet-container-c").append(_e(Ql,{index:u.index,active:"",name:u.name,order:u.order,style:"",colorset:d})),$("#luckysheet-sheets-item"+u.index).insertAfter(f),h.luckysheetfile.splice(n,0,u),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),$("#luckysheet-sheets-item"+s).addClass("luckysheet-sheets-item-active"),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+s+'" class="luckysheet-datavisual-selection-set"></div>'),rl(!0),ne.saveParam("shc",s,{copyindex:o,name:u.name}),ve.changeSheetExec(s),ve.reOrderAllSheet(),h.clearjfundo)h.jfredo.push({type:"copySheet",copyindex:o,index:u.index,sheetIndex:u.index});else if(h.jfredo.length>0){let m=h.jfredo[h.jfredo.length-1];m.type=="copySheet"&&(m.index=u.index,m.sheetIndex=u.index)}return setTimeout(()=>{l&&typeof l=="function"&&l()},1),u}function $0(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e),l=h.luckysheetfile[n];return l==null?U.info("The order parameter is invalid.",""):(ve.setSheetHide(l.index),setTimeout(()=>{t&&typeof t=="function"&&t()},1),l)}function I0(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e),l=h.luckysheetfile[n];return l==null?U.info("The order parameter is invalid.",""):(ve.setSheetShow(l.index),setTimeout(()=>{t&&typeof t=="function"&&t()},1),l)}function R0(e,n={}){if(e==null||!B(e)||h.luckysheetfile[e]==null)return U.info("The order parameter is invalid.","");let t=h.luckysheetfile[e],{success:l}=Ue({},n);return $("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),$("#luckysheet-sheets-item"+t.index).addClass("luckysheet-sheets-item-active"),ve.changeSheet(t.index),setTimeout(()=>{l&&typeof l=="function"&&l()},1),ne.multipleRangeShow(),t}function A0(e,n={}){if(P(e)!="string"||e.toString().length==0)return U.info("The name parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=a.name;if(a.name=e,$("#luckysheet-sheets-item"+a.index+" .luckysheet-sheets-item-name").text(e),ne.saveParam("all",a.index,e,{k:"name"}),h.clearjfundo){let s={};s.type="sheetName",s.sheetIndex=a.index,s.oldtxt=o,s.txt=e,h.jfundo.length=0,h.jfredo.push(s)}l&&typeof l=="function"&&l()}function D0(e,n={}){if(P(e)!="string"||e.toString().length==0)return U.info("The color parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=a.color;if(a.color=e,$("#luckysheet-sheets-item"+a.index).find(".luckysheet-sheets-item-color").remove(),$("#luckysheet-sheets-item"+a.index).append('<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+e+';"></div>'),ne.saveParam("all",a.index,e,{k:"color"}),h.clearjfundo){let s={};s.type="sheetColor",s.sheetIndex=a.index,s.oldcolor=o,s.color=e,h.jfundo.length=0,h.jfredo.push(s)}l&&typeof l=="function"&&l()}function M0(e,n={}){if(e!="left"&&e!="right"&&!B(e))return U.info("Type parameter not available","");B(e)&&(e=parseInt(e));let t=Z(h.currentSheetIndex),{order:l=t,success:a}=Ue({},n),o=h.luckysheetfile[l];if(o==null)return U.info("ncorrect worksheet index","");let s=o.index;if(e=="left"){if(l==0)return;let d=h.luckysheetfile[l-1].index;$("#luckysheet-sheets-item"+s).insertBefore($("#luckysheet-sheets-item"+d)),h.luckysheetfile.splice(l,1),h.luckysheetfile.splice(l-1,0,o)}else if(e=="right"){if(l==h.luckysheetfile.length-1)return;let d=h.luckysheetfile[l+1].index;$("#luckysheet-sheets-item"+s).insertAfter($("#luckysheet-sheets-item"+d)),h.luckysheetfile.splice(l,1),h.luckysheetfile.splice(l+1,0,o)}else{if(e<0&&(e=0),e>h.luckysheetfile.length-1&&(e=h.luckysheetfile.length-1),e==l)return;if(e<l){let d=h.luckysheetfile[e].index;$("#luckysheet-sheets-item"+s).insertBefore($("#luckysheet-sheets-item"+d))}else{let d=h.luckysheetfile[e].index;$("#luckysheet-sheets-item"+s).insertAfter($("#luckysheet-sheets-item"+d))}h.luckysheetfile.splice(l,1),h.luckysheetfile.splice(e,0,o)}let u={};h.luckysheetfile.forEach((d,f,m)=>{m[f].order=f,u[d.index.toString()]=f}),ne.saveParam("shr",null,u),a&&typeof a=="function"&&a()}function F0(e,n={}){if(e==null||e.length==0)return U.info("Type orderList not available","");let t={};e.forEach(o=>{t[o.index.toString()]=o.order}),h.luckysheetfile.sort((o,s)=>{let u=t[o.index.toString()],d=t[s.index.toString()];return u!=null&&d!=null?u-d:u!=null?-1:(d!=null,1)});let l={};h.luckysheetfile.forEach((o,s,u)=>{if(u[s].order=s,l[o.index.toString()]=s,s>0){let d=u[s-1].index;$("#luckysheet-sheets-item"+o.index).insertAfter($("#luckysheet-sheets-item"+d))}}),ne.saveParam("shr",null,l);let{success:a}=Ue({},n);a&&typeof a=="function"&&a()}function E0(e,n={}){if(!B(e)||e<.1||e>4)return U.info("The zoom parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");if(a.zoomRatio=e,ne.saveParam("all",a.index,e,{k:"zoomRatio"}),a.index==h.currentSheetIndex){h.zoomRatio=e;let o=ve.getSheetByIndex();Re.images=o.images,Re.allImagesShow(),Re.init(),ir(),Za()}l&&typeof l=="function"&&l()}function N0(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e),l=h.luckysheetfile[n];return l==null?U.info("The order parameter is invalid.",""):(l.showGridLines=!0,l.index==h.currentSheetIndex&&(h.showGridLines=!0,setTimeout(function(){Be()},1)),setTimeout(()=>{t&&typeof t=="function"&&t()},1),l)}function P0(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e),l=h.luckysheetfile[n];return l==null?U.info("The order parameter is invalid.",""):(l.showGridLines=!1,l.index==h.currentSheetIndex&&(h.showGridLines=!1,setTimeout(function(){Be()},1)),setTimeout(()=>{t&&typeof t=="function"&&t()},1),l)}function L0(e={}){Ze();let{success:n}=Ue({},e);n&&typeof n=="function"&&n()}function z0(e={}){let{scrollLeft:n,scrollTop:t,targetRow:l,targetColumn:a,success:o}=Ue({},e);if(n!=null){if(!B(n))return U.info("The scrollLeft parameter is invalid.","");$("#luckysheet-scrollbar-x").scrollLeft(n)}else if(a!=null){if(!B(a))return U.info("The targetColumn parameter is invalid.","");let s=h.visibledatacolumn[a],u=a<=0?0:h.visibledatacolumn[a-1];$("#luckysheet-scrollbar-x").scrollLeft(u)}if(t!=null){if(!B(t))return U.info("The scrollTop parameter is invalid.","");$("#luckysheet-scrollbar-y").scrollTop(t)}else if(l!=null){if(!B(l))return U.info("The targetRow parameter is invalid.","");let s=h.visibledatarow[l],u=l<=0?0:h.visibledatarow[l-1];$("#luckysheet-scrollbar-y").scrollTop(u)}o&&typeof o=="function"&&o()}function O0(e={}){zt();let{success:n}=Ue({},e);n&&typeof n=="function"&&n()}function B0(e={}){let{range:n=h.luckysheet_select_save[h.luckysheet_select_save.length-1]}=Ue({},e);if(P(n)=="string"){if(!p.iscelldata(n))return U.info("The range parameter is invalid.","");let w=p.getcellrange(n);n={row:w.row,column:w.column}}if(P(n)!="object"||n.row==null||n.column==null)return U.info("The range parameter is invalid.","");let t=n.row[0],l=n.row[1],a=n.column[0],o=n.column[1];if(Mt(h.config,t,l,a,o))return U.info("Cannot perform this operation on partially merged cells","");let u=h.visibledatarow,d=h.visibledatacolumn,f,m;t-1<0?(f=0,m=u[l]):(f=u[t-1],m=u[l]-u[t-1]);let g,y;a-1<0?(g=0,y=d[o]):(g=d[a-1],y=d[o]-d[a-1]);let v=$("<canvas>").attr({width:Math.ceil(y*h.devicePixelRatio),height:Math.ceil(m*h.devicePixelRatio)}).css({width:y,height:m});nr(g,f,y,m,1,1,null,null,v);let b=v.get(0).getContext("2d");return b.beginPath(),b.moveTo(0,0),b.lineTo(0,h.devicePixelRatio*m),b.lineWidth=h.devicePixelRatio*2,b.strokeStyle=Sl.strokeStyle,b.stroke(),b.closePath(),b.beginPath(),b.moveTo(0,0),b.lineTo(h.devicePixelRatio*y,0),b.lineWidth=h.devicePixelRatio*2,b.strokeStyle=Sl.strokeStyle,b.stroke(),b.closePath(),v.get(0).toDataURL("image/png")}function H0(e,n={}){if(e==null||e.toString().length==0)return U.info("The name parameter is invalid.","");$("#luckysheet_info_detail_input").val(e);let{success:t}=Ue({},n);t&&typeof t=="function"&&t()}function V0(e={}){let n="",t=$("#luckysheet_info_detail_input");if(t.length==0)return U.info("Failed to get workbook name, label loading failed!"),n;n=$.trim(t.val());let{success:l}=Ue({},e);return setTimeout(()=>{l&&typeof l=="function"&&l()},1),n}function q0(e={}){let n=$.extend(!0,{},h.jfredo[h.jfredo.length-1]);Tn.redo(new Event("custom")),Mr();let{success:t}=Ue({},e);return setTimeout(()=>{t&&typeof t=="function"&&t()},1),n}function j0(e={}){let n=$.extend(!0,{},h.jfundo[h.jfundo.length-1]);Tn.undo(new Event("custom")),Mr();let{success:t}=Ue({},e);return setTimeout(()=>{t&&typeof t=="function"&&t()},1),n}function lm(){let e=$.extend(!0,[],h.luckysheetfile);return e.forEach((n,t,l)=>{n.data!=null&&n.data.length>0&&(n.celldata=ve.getGridData(n.data)),delete n.load,delete n.freezen}),e}function U0(e={}){let{index:n,order:t,name:l}=Ue({},e);return n!=null?ve.getSheetByIndex(n):t!=null?h.luckysheetfile[t]:l!=null?ve.getSheetByName(l):ve.getSheetByIndex()}function G0(e={}){let{order:n=Z(h.currentSheetIndex)}=Ue({},e),t=h.luckysheetfile[n];if(t==null)return U.info("The order parameter is invalid.","");let l=$.extend(!0,[],t.data);return(l==null||l.length==0)&&(l=$.extend(!0,[],ve.buildGridData(t))),l}function W0(e={}){let{order:n=Z(h.currentSheetIndex)}=Ue({},e),t=h.luckysheetfile[n];return t==null?U.info("The order parameter is invalid.",""):$.extend(!0,{},t.config)}function Y0(e,n={}){if(P(e)!="object")return U.info("The cfg parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");a.config=e,a.index==h.currentSheetIndex&&(h.config=e,("rowhidden"in e||"colhidden"in e||"rowlen"in e||"columnlen"in e)&&St(h.flowdata.length,h.flowdata[0].length),setTimeout(function(){Be()},1)),l&&typeof l=="function"&&l()}function X0(){return Et()}function K0(e,n={}){if(P(e)!="object")return U.info("The optionItem parameter is invalid.","");let{type:t,type2:l=null,value1:a="",value2:o="",remote:s=!1,prohibitInput:u=!1,hintShow:d=!1,hintText:f="",checked:m=!1}=Ue({},e),g=["dropdown","checkbox","number","number_integer","number_decimal","text_content","text_length","date","validity"],y=["bw","nb","eq","ne","gt","lt","gte","lte"],v=["include","exclude","equal"],b=["bw","nb","eq","ne","bf","nbf","af","naf"],k=["card","phone"];if(!g.includes(t))return U.info("The optionItem.type parameter is invalid.","");let w=Q().dataVerification;if(t=="dropdown"){if(a.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo1);return}}else if(t=="checkbox"){if(a.length==0||o.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo2);return}}else if(t=="number"||t=="number_integer"||t=="number_decimal"){if(!y.includes(l))return U.info("The optionItem.type2 parameter is invalid.","");if(!B(a)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo3);return}if(l=="bw"||l=="nb"){if(!B(o)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo3);return}if(Number(o)<Number(a)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo4);return}}}else if(t=="text_content"){if(!v.includes(l))return U.info("The optionItem.type2 parameter is invalid.","");if(a.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo5);return}}else if(t=="text_length"){if(!y.includes(l))return U.info("The optionItem.type2 parameter is invalid.","");if(!B(a)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo3);return}if(l=="bw"||l=="nb"){if(!B(o)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo3);return}if(Number(o)<Number(a)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo4);return}}}else if(t=="date"){if(!b.includes(l))return U.info("The optionItem.type2 parameter is invalid.","");if(!Lt(a)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo6);return}if(l=="bw"||l=="nb"){if(!Lt(o)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo6);return}if(ul(a,o)>0){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo7);return}}}else if(t=="validity"&&!k.includes(l))return U.info("The optionItem.type2 parameter is invalid.","");if(P(s)!="boolean")return U.info("The optionItem.remote parameter is invalid.","");if(P(u)!="boolean")return U.info("The optionItem.prohibitInput parameter is invalid.","");if(P(d)!="boolean")return U.info("The optionItem.hintShow parameter is invalid.","");let{range:x=h.luckysheet_select_save[h.luckysheet_select_save.length-1],order:C=Z(h.currentSheetIndex),success:S}=Ue({},n);if(P(x)=="string"){if(!p.iscelldata(x))return U.info("The range parameter is invalid.","");let E=p.getcellrange(x);x={row:E.row,column:E.column}}if(P(x)!="object"||x.row==null||x.column==null)return U.info("The range parameter is invalid.","");let _=h.luckysheetfile[C];if(_==null)return U.info("The order parameter is invalid.","");let T={type:t,type2:l,value1:a,value2:o,checked:m,remote:s,prohibitInput:u,hintShow:d,hintText:f},A=$.extend(!0,{},_.dataVerification),R=$.extend(!0,[],_.data);R.length==0&&(R=ve.buildGridData(_));let I=x.row[0],F=x.row[1],z=x.column[0],M=x.column[1];for(let E=I;E<=F;E++)for(let N=z;N<=M;N++)A[E+"_"+N]=T,t=="checkbox"&&(T.checked?Ht(E,N,R,T.value1):Ht(E,N,R,T.value2));if(_.index==h.currentSheetIndex){let E=$.extend(!0,{},_.dataVerification);t=="checkbox"?Ye.refOfCheckbox(E,A,h.currentSheetIndex,R,x):Ye.ref(E,A,h.currentSheetIndex)}else _.dataVerification=A,_.data=R;S&&typeof S=="function"&&S()}function Z0(e={}){let{range:n=h.luckysheet_select_save[h.luckysheet_select_save.length-1],order:t=Z(h.currentSheetIndex),success:l}=Ue({},e);if(P(n)=="string"){if(!p.iscelldata(n))return U.info("The range parameter is invalid.","");let m=p.getcellrange(n);n={row:m.row,column:m.column}}if(P(n)!="object"||n.row==null||n.column==null)return U.info("The range parameter is invalid.","");let a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=$.extend(!0,{},a.dataVerification),s=n.row[0],u=n.row[1],d=n.column[0],f=n.column[1];for(let m=s;m<=u;m++)for(let g=d;g<=f;g++)delete o[m+"_"+g];if(a.index==h.currentSheetIndex){let m=$.extend(!0,{},a.dataVerification);Ye.ref(m,o,h.currentSheetIndex)}else a.dataVerification=o;l&&typeof l=="function"&&l()}function J0(e,n={}){let{order:t=Z(h.currentSheetIndex),rowIndex:l,colIndex:a,success:o}=Ue({},n),s=h.luckysheetfile[t];if(s==null)return U.info("The order parameter is invalid.","");if(s.index==h.currentSheetIndex){let u=h.luckysheet_select_save[h.luckysheet_select_save.length-1];l==null&&(l=u.row_focus||0),l<0&&(l=0),l>h.visibledatarow.length&&(l=h.visibledatarow.length),a==null&&(a=u.column_focus||0),a<0&&(a=0),a>h.visibledatacolumn.length&&(a=h.visibledatacolumn.length);let d=a==0?0:h.visibledatacolumn[a-1],f=l==0?0:h.visibledatarow[l-1],m=new Image;m.onload=function(){let g=m.width,y=m.height,v={src:e,left:d,top:f,originWidth:g,originHeight:y};Re.addImgItem(v),o&&typeof o=="function"&&o()},m.src=e}else{let u=s.images||{},d=s.config,f=s.zoomRatio||1,m=s.row,g=s.visibledatarow||[];if(g.length===0){let x=0;for(let C=0;C<m;C++){let S=h.defaultrowlen;if(d.rowlen!=null&&d.rowlen[C]!=null&&(S=d.rowlen[C]),d.rowhidden!=null&&d.rowhidden[C]!=null){g.push(x);continue}x+=Math.round((S+1)*f),g.push(x)}}let y=s.column,v=s.visibledatacolumn||[];if(v.length===0){let x=0;for(let C=0;C<y;C++){let S=h.defaultcollen;if(d.columnlen!=null&&d.columnlen[C]!=null&&(S=d.columnlen[C]),d.colhidden!=null&&d.colhidden[C]!=null){v.push(x);continue}x+=Math.round((S+1)*f),v.push(x)}}l==null&&(l=0),l<0&&(l=0),l>g.length&&(l=g.length),a==null&&(a=0),a<0&&(a=0),a>v.length&&(a=v.length);let b=a==0?0:v[a-1],k=l==0?0:g[l-1],w=new Image;w.onload=function(){let x={src:e,left:b,top:k,originWidth:w.width,originHeight:w.height},C,S,_=400;x.originHeight<x.originWidth?(S=Math.round(x.originHeight*(_/x.originWidth)),C=_):(C=Math.round(x.originWidth*(_/x.originHeight)),S=_);let T=$.extend(!0,{},Re.imgItem);T.src=x.src,T.originWidth=x.originWidth,T.originHeight=x.originHeight,T.default.width=C,T.default.height=S,T.default.left=x.left,T.default.top=x.top,T.crop.width=C,T.crop.height=S;let A=Re.generateRandomId();u[A]=T,s.images=u,o&&typeof o=="function"&&o()},w.src=e}}function Q0(e={}){let{order:n=Z(h.currentSheetIndex),idList:t="all",success:l}=Ue({},e),a=h.luckysheetfile[n];if(a==null)return U.info("The order parameter is invalid.","");let o=a.images;if(o==null)return U.info("The worksheet has no pictures to delete.","");if(t!="all"&&P(t)!="array")return U.info("The idList parameter is invalid.","");P(t)=="array"?t.forEach(s=>{delete o[s]}):o=null,a.images=o,a.index==h.currentSheetIndex&&(Re.currentImgId!=null&&(t=="all"||t.includes(Re.currentImgId))&&($("#luckysheet-modal-dialog-activeImage").hide(),$("#luckysheet-modal-dialog-cropping").hide(),$("#luckysheet-modal-dialog-slider-imageCtrl").hide()),Re.images=o,Re.allImagesShow(),Re.init()),l&&typeof l=="function"&&l()}function eb(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e),l=h.luckysheetfile[n];return l==null?U.info("The order parameter is invalid.",""):(setTimeout(function(){t&&typeof t=="function"&&t()},1),l.images)}function tb(e,n={}){let{success:t}=Ue({},n);return setTimeout(()=>{t&&typeof t=="function"&&t()},0),ve.getGridData(e)}function lb(e,n={}){let{success:t}=Ue({},n);return setTimeout(()=>{t&&typeof t=="function"&&t()},0),ve.buildGridData({celldata:e})}function Uo(){let e=h.toJsonOptions;return e.title=$("#luckysheet_info_detail_input").val(),e.data=lm(),Et().forEach((n,t)=>{n.data!=null&&(e.data[t].row=P(n.data)==="array"?n.data.length:0,e.data[t].column=P(n.data[0])==="array"?n.data[0].length:0)}),e}function rb(e="zh"){if(!["zh","en","es"].includes(e))return U.info("The lang parameter is invalid.","");let n=Uo();n.lang=e,luckysheet.create(n)}function nb(){ne.websocket!=null&&ne.websocket.close(1e3)}function ab(e){if(e==null)return{column:h.luckysheet_select_save[h.luckysheet_select_save.length-1].column,row:h.luckysheet_select_save[h.luckysheet_select_save.length-1].row};let n=$e.getRangeByTxt(e);return{column:n[0].column,row:n[0].row}}function ib(e=h.luckysheet_select_save){return P(e)==="object"&&(e=[e]),$e.getTxtByRange(e)}function Vc(e){let{prevPage:n,nextPage:t,total:l}=Q().button;$("#luckysheet-bottom-pager").remove(),$("#luckysheet-sheet-content").after('<div id="luckysheet-bottom-pager" style="font-size: 14px; margin-left: 10px; display: inline-block;"></div>'),$("#luckysheet-bottom-pager").sPage({page:e.pageIndex,total:e.total,selectOption:e.selectOption,pageSize:e.pageSize,showTotal:e.showTotal,showSkip:e.showSkip,showPN:e.showPN,prevPage:e.prevPage||n,nextPage:e.nextPage||t,totalTxt:e.totalTxt||l+e.total,backFun:function(a){a.pageIndex=a.page,!!Je.createHookFunction("onTogglePager",a)}})}function ob(e){p.execFunctionGroupForce(!0),Be(),setTimeout(()=>{e&&typeof e=="function"&&e()})}function sb(e={}){let{data:n,success:t}=e,l=h.luckysheetfile;for(let s=0;s<n.length;s++)for(let u=0;u<l.length;u++)l[u].index===n[s].index&&(l[u]=n[s]);let a=l[ve.getSheetIndex(h.currentSheetIndex)],o=ve.buildGridData(a);a.data=o,a.isPivotTable?(h.luckysheetcurrentisPivotTable=!0,isPivotInitial||Oe.changePivotTable(index)):(h.luckysheetcurrentisPivotTable=!1,$("#luckysheet-modal-dialog-slider-pivot").hide(),zt(!1)),ve.mergeCalculation(a.index),ve.setSheetParam(),setTimeout(function(){ve.showSheet(),ve.restoreCache(),p.execFunctionGroupForce(fe.forceCalculation),ve.restoreSheetAll(h.currentSheetIndex),Be(),t&&typeof t=="function"&&t()},1),ne.saveParam("shs",null,h.currentSheetIndex)}function qc(e,n,t,l){if(e=e||h.flowdata,n==null&&t==null){let a=h.luckysheet_select_save[h.luckysheet_select_save.length-1];n=a.row_focus||a.row[0],t=a.column_focus||a.column[0]}ke.menuButtonFocus(e,n,t),setTimeout(()=>{l&&typeof l=="function"&&l()})}function li(e,n){return Hc().every(({r:a,c:o})=>{let s=h.flowdata[a][o];return s==null?!1:s[e]==n})}var qi,va=Ie(()=>{Xe();dt();Nt();bt();Ll();Ut();Li();ll();Ba();Jt();Ut();Vr();Al();$r();ua();mr();Kt();Yt();da();Ft();Or();Va();Co();on();Qt();il();Wa();xl();Vl();pr();fl();gr();Lr();Zt();Gt();kn();Mo();Ja();yr();qr();qi=Fl(vn());Nt();ba()});function Lf(e,n,t,l,a){let o=h.visibledatarow[t],s=n-1==-1?0:h.visibledatarow[n-1],u=h.visibledatacolumn[a],d=l-1==-1?0:h.visibledatacolumn[l-1];$("#"+e).css({left:d,width:u-d-1,top:s,height:o-s-1})}function lt(e=!1){if($("#luckysheet-cell-selected-boxs").show(),$("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").siblings(".luckysheet-cell-selected").remove(),h.luckysheet_select_save.length>0){for(let t=0;t<h.luckysheet_select_save.length;t++){let l=h.luckysheet_select_save[t].row[0],a=h.luckysheet_select_save[t].row[1],o=h.luckysheet_select_save[t].column[0],s=h.luckysheet_select_save[t].column[1],u,d;h.luckysheet_select_save[t].row_focus==null?u=l:u=h.luckysheet_select_save[t].row_focus,h.luckysheet_select_save[t].column_focus==null?d=o:d=h.luckysheet_select_save[t].column_focus;let f=h.visibledatarow[a],m=l-1==-1?0:h.visibledatarow[l-1],g=h.visibledatacolumn[s],y=o-1==-1?0:h.visibledatacolumn[o-1],v=h.visibledatarow[u],b=u-1==-1?0:h.visibledatarow[u-1],k=h.visibledatacolumn[d],w=d-1==-1?0:h.visibledatacolumn[d-1],x=ke.mergeborer(h.flowdata,u,d);x&&(v=x.row[1],b=x.row[0],k=x.column[1],w=x.column[0]),h.luckysheet_select_save[t].row=[l,a],h.luckysheet_select_save[t].column=[o,s],h.luckysheet_select_save[t].row_focus=u,h.luckysheet_select_save[t].column_focus=d,h.luckysheet_select_save[t].left=w,h.luckysheet_select_save[t].width=k-w-1,h.luckysheet_select_save[t].top=b,h.luckysheet_select_save[t].height=v-b-1,h.luckysheet_select_save[t].left_move=y,h.luckysheet_select_save[t].width_move=g-y-1,h.luckysheet_select_save[t].top_move=m,h.luckysheet_select_save[t].height_move=f-m-1,t==0?h.luckysheet_select_save.length==1?dr.mobilecheck()?$("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").css({left:h.luckysheet_select_save[t].left_move,width:h.luckysheet_select_save[t].width_move,top:h.luckysheet_select_save[t].top_move,height:h.luckysheet_select_save[t].height_move,display:"block",border:"1px solid #0188fb"}).find(".luckysheet-cs-draghandle").css("display","block").end().find(".luckysheet-cs-fillhandle").css("display","none").end().find(".luckysheet-cs-touchhandle").css("display","block"):$("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").css({left:h.luckysheet_select_save[t].left_move,width:h.luckysheet_select_save[t].width_move,top:h.luckysheet_select_save[t].top_move,height:h.luckysheet_select_save[t].height_move,display:"block",border:"1px solid #0188fb"}).find(".luckysheet-cs-draghandle").css("display","block").end().find(".luckysheet-cs-fillhandle").css("display","block").end().find(".luckysheet-cs-touchhandle").css("display","none"):$("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").css({left:h.luckysheet_select_save[t].left_move,width:h.luckysheet_select_save[t].width_move,top:h.luckysheet_select_save[t].top_move,height:h.luckysheet_select_save[t].height_move,display:"block",border:"1px solid rgba(1, 136, 251, 0.15)"}).find(".luckysheet-cs-draghandle").css("display","none").end().find(".luckysheet-cs-fillhandle").css("display","none"):$("#luckysheet-cell-selected-boxs").append('<div class="luckysheet-cell-selected" style="left: '+h.luckysheet_select_save[t].left_move+"px; width: "+h.luckysheet_select_save[t].width_move+"px; top: "+h.luckysheet_select_save[t].top_move+"px; height: "+h.luckysheet_select_save[t].height_move+'px; border: 1px solid rgba(1, 136, 251, 0.15); display: block;"></div>'),t==h.luckysheet_select_save.length-1&&($("#luckysheet-cell-selected-focus").css({left:h.luckysheet_select_save[t].left,width:h.luckysheet_select_save[t].width,top:h.luckysheet_select_save[t].top,height:h.luckysheet_select_save[t].height,display:"block"}),or(h.luckysheet_select_save[t].left_move,h.luckysheet_select_save[t].top_move,h.luckysheet_select_save[t].width_move,h.luckysheet_select_save[t].height_move,[l,a],[o,s]),p.fucntionboxshow(u,d),Ye.cellFocus(u,d))}cb(h.luckysheet_select_save,e),Go(),h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]&&Sd(h.luckysheet_select_save[0].row[0],h.luckysheet_select_save[0].column[0]),qc()}h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_select_save=h.luckysheet_select_save;let n=JSON.stringify(h.luckysheet_select_save);h.luckysheet_select_save_previous==null|h.luckysheet_select_save_previous!==n&&Je.createHookFunction("rangeSelect",h.luckysheetfile[Z(h.currentSheetIndex)],h.luckysheet_select_save),h.luckysheet_select_save_previous=n}function cb(e,n=!1){let t=$.extend(!0,[],e),l={},a={};for(let u=0;u<t.length;u++){let d=t[u].row[0],f=t[u].row[1],m=t[u].column[0],g=t[u].column[1];l=rm(l,d,f),a=rm(a,m,g)}$("#luckysheet-rows-h-selected").empty();let o=nm(l);for(let u=0;u<o.length;u++){let d=o[u][0],f=o[u][o[u].length-1],m=tl(f)[1],g=tl(d)[0];$("#luckysheet-rows-h-selected").append('<div class="luckysheet-rows-h-selected" style="top: '+g+"px; height: "+(m-g-1)+'px; display: block; background-color: rgba(76, 76, 76, 0.1);"></div>')}$("#luckysheet-cols-h-selected").empty();let s=nm(a);for(let u=0;u<s.length;u++){let d=s[u][0],f=s[u][s[u].length-1],m=At(f)[1],g=At(d)[0];$("#luckysheet-cols-h-selected").append('<div class="luckysheet-cols-h-selected" style="left: '+g+"px; width: "+(m-g-1)+'px; display: block; background-color: rgba(76, 76, 76, 0.1);"></div>')}}function rm(e,n,t){let l=$.extend(!0,{},e);for(let a=n;a<=t;a++)a in l||(l[a]=0);return l}function nm(e){let n=[];for(let a in e)n.push(a);n.sort(function(a,o){return a-o});let t=[],l=[];if(n.length>1)for(let a=1;a<n.length;a++)n[a]-n[a-1]==1?(l.push(n[a-1]),a==n.length-1&&(l.push(n[a]),t.push(l))):a==1?a==n.length-1?(l.push(n[a-1]),t.push(l),t.push([n[a]])):t.push(n[0]):a==n.length-1?(l.push(n[a-1]),t.push(l),t.push([n[a]])):(l.push(n[a-1]),t.push(l),l=[]);else t.push([n[0]]);return t}function Yr(e){e==null&&(e=h.luckysheet_select_save),e=JSON.parse(JSON.stringify(e));let n=!1,t={};for(let l=0;l<e.length;l++){let a=e[l].row[0],o=e[l].row[1],s=e[l].column[0],u=e[l].column[1];for(let d=a;d<=o;d++)for(let f=s;f<=u;f++)if(d+"_"+f in t){n=!0;break}else t[d+"_"+f]=0}return n}function Gn(){let e=h.visibledatacolumn,n=h.visibledatarow;h.cooperativeEdit.changeCollaborationSize.forEach(t=>{if(t.i==h.currentSheetIndex){let l=t.v.column,a=e[l[0]]-1;t.v.column[0]!==0&&(a=e[l[1]]-e[l[0]-1]-(l[1]-l[0]+1));let o=t.v.row,s=n[o[0]]-1;t.v.row[0]!==0&&(s=n[o[1]]-n[o[0]-1]-(o[1]-o[0]+1));let u=h.cooperativeEdit.merge_range,d=e[t.v.column[0]-1]-1,f=n[t.v.row[0]-1]-1;if(h.config.columnlen!==null){for(let v in h.config.columnlen)if(t.v.column[0]<=v&&v<=t.v.column[1]){h.luckysheet_cols_change_size_start[1]=v-0;break}}if(h.config.rowlen!==null){for(let v in h.config.rowlen)if(t.v.row[0]<=v&&v<=t.v.row[1]){h.luckysheet_rows_change_size_start[1]=v-0;break}}if(t.v.column[0]<=h.luckysheet_cols_change_size_start[1]&&h.luckysheet_cols_change_size_start[1]<=t.v.column[1])if(h.luckysheet_cols_change_size_start[1]==0)a=e[0]-1;else{let v=t.v.column;a=e[v[1]]-e[v[0]-1]-(v[1]-v[0]+1)}if(t.v.row[0]<=h.luckysheet_rows_change_size_start[1]&&h.luckysheet_rows_change_size_start[1]<=t.v.row[1])if(h.luckysheet_rows_change_size_start[1]==0)s=n[0]-1;else{let v=t.v.row;s=n[v[1]]-n[v[0]-1]-(v[1]-v[0]+1)}if(Object.keys(u).length>0){let v=!1;if(u.v.length>1&&(v=u.v[1][0]==null||Object.keys(u.v[1][0]).length>0),u.v[0].length>1&&(v=u.v[0][1]==null||Object.keys(u.v[0][1]).length>0),v){let b=u.column[0]<=t.v.column[0]&&u.column[1]>=t.v.column[1];if(d=e[u.column[0]-1]-1,f=n[u.row[0]-1]-1,a=e[u.column[1]]-1,s=n[u.row[1]]-1,b){if(u.column[0]!==0){let w=u.column;a=e[w[1]]-e[w[0]-1]-(w[1]-w[0]+1)}else d=0;t.v.column=u.column}if(u.row[0]<=t.v.row[0]&&u.row[1]>=t.v.row[1]){if(u.row[0]!==0){let w=u.row;s=n[w[1]]-n[w[0]-1]-(w[1]-w[0]+1)}else f=0;t.v.row=u.row}}else a=e[l[0]]-e[l[0]-1]-1,l[0]===0&&(a=e[l[0]]-1),s=n[o[0]]-n[o[0]-1]-1,o[0]===0&&(s=n[o[0]]-1)}$("#luckysheet-multipleRange-show-"+t.id).css({height:s,width:a,top:f+"px",left:d+"px"});let y=$("#luckysheet-multipleRange-show-"+t.id)[0].offsetHeight-1;$("#luckysheet-multipleRange-show-"+t.id+">.username").css({bottom:y+"px"})}})}function Ot(e){if($("#luckysheet-selection-copy").empty(),e==null&&(e=h.luckysheet_selection_range),e=JSON.parse(JSON.stringify(e)),e.length>0)for(let n=0;n<e.length;n++){let t=e[n].row[0],l=e[n].row[1],a=e[n].column[0],o=e[n].column[1],s=h.visibledatarow[l],u=t-1==-1?0:h.visibledatarow[t-1],d=h.visibledatacolumn[o],f=a-1==-1?0:h.visibledatacolumn[a-1],m='<div class="luckysheet-selection-copy" style="display: block; left: '+f+"px; width: "+(d-f-1)+"px; top: "+u+"px; height: "+(s-u-1)+'px;"><div class="luckysheet-selection-copy-top luckysheet-copy"></div><div class="luckysheet-selection-copy-right luckysheet-copy"></div><div class="luckysheet-selection-copy-bottom luckysheet-copy"></div><div class="luckysheet-selection-copy-left luckysheet-copy"></div><div class="luckysheet-selection-copy-hc"></div></div>';$("#luckysheet-selection-copy").append(m)}}function or(e,n,t,l,a,o){let s=a[1]-a[0]+1,u=o[1]-o[0]+1,d=h.luckysheetTableContentHW[0],f=h.luckysheetTableContentHW[1],m=$("#luckysheet-cell-main").scrollLeft(),g=$("#luckysheet-cell-main").scrollTop(),v=Q().info;if(s>=4){let b=e-25;b<0&&(b=e+5),b<m&&(b=m+10);let k=n+l/2;l>f&&(k=g+f/2),$("#luckysheet-row-count-show").css({left:b,top:k,display:"block",width:"11px"}).html("<div>"+s.toString().split("").join("</div><div>")+"</div><div>"+v.row+"</div>")}else $("#luckysheet-row-count-show").hide();if(u>=4){let b=n-25;b<0&&(b=n+5),b<g&&(b=g+10);let k=e+t/2;t>d&&(k=m+d/2),$("#luckysheet-column-count-show").css({left:k,top:b,display:"block"}).text(u+v.column)}else $("#luckysheet-column-count-show").hide()}function Go(){let e=h.luckysheet_select_save[h.luckysheet_select_save.length-1],n=e.row_focus,t=e.column_focus;h.config.merge!=null&&n+"_"+t in h.config.merge?$("#luckysheet-helpbox-cell").text(xt(h.currentSheetIndex,{column:[t,t],row:[n,n]})):$("#luckysheet-helpbox-cell").text(xt(h.currentSheetIndex,e))}var Zt=Ie(()=>{il();Ut();fo();Ol();xa();yr();Nt();Xe();Ll();bt();va()});var ub,Uc,am=Ie(()=>{dt();Gt();il();Jt();ll();Ft();Xe();bt();ub={moneyFmtList:[{name:"\u4EBA\u6C11\u5E01",pos:"before",value:"\xA5"},{name:"\u7F8E\u5143",pos:"before",value:"$"},{name:"\u6B27\u5143",pos:"before",value:"\u20AC"},{name:"\u82F1\u9551",pos:"before",value:"\uFFE1"},{name:"\u6E2F\u5143",pos:"before",value:"$"},{name:"\u65E5\u5143",pos:"before",value:"\uFFE5"},{name:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u5217\u514B",pos:"before",value:"Lek"},{name:"\u963F\u5C14\u53CA\u5229\u4E9A\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u963F\u5BCC\u6C57\u5C3C",pos:"after",value:"Af"},{name:"\u963F\u6839\u5EF7\u6BD4\u7D22",pos:"before",value:"$"},{name:"\u963F\u62C9\u4F2F\u8054\u5408\u914B\u957F\u56FD\u8FEA\u62C9\u59C6",pos:"before",value:"dh"},{name:"\u963F\u9C81\u5DF4\u5F17\u7F57\u6797",pos:"before",value:"Afl"},{name:"\u963F\u66FC\u91CC\u4E9A\u5C14",pos:"before",value:"Rial"},{name:"\u963F\u585E\u62DC\u7586\u9A6C\u7EB3\u7279",pos:"before",value:"?"},{name:"\u57C3\u53CA\u9551",pos:"before",value:"\uFFE1"},{name:"\u57C3\u585E\u4FC4\u6BD4\u4E9A\u6BD4\u5C14",pos:"before",value:"Birr"},{name:"\u5B89\u54E5\u62C9\u5BBD\u624E",pos:"before",value:"Kz"},{name:"\u6FB3\u5927\u5229\u4E9A\u5143",pos:"before",value:"$"},{name:"\u6FB3\u95E8\u5143",pos:"before",value:"MOP"},{name:"\u5DF4\u5DF4\u591A\u65AF\u5143",pos:"before",value:"$"},{name:"\u5DF4\u5E03\u4E9A\u65B0\u51E0\u5185\u4E9A\u57FA\u90A3",pos:"before",value:"PGK"},{name:"\u5DF4\u54C8\u9A6C\u5143",pos:"before",value:"$"},{name:"\u5DF4\u57FA\u65AF\u5766\u5362\u6BD4",pos:"before",value:"Rs"},{name:"\u5DF4\u62C9\u572D\u74DC\u62C9\u5C3C",pos:"after",value:"Gs"},{name:"\u5DF4\u6797\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u5DF4\u62FF\u9A6C\u5DF4\u6CE2\u4E9A",pos:"before",value:"B/"},{name:"\u5DF4\u897F\u91CC\u4E9A\u4F0A",pos:"before",value:"R$"},{name:"\u767D\u4FC4\u7F57\u65AF\u5362\u5E03",pos:"after",value:"\u0440"},{name:"\u767E\u6155\u5927\u5143",pos:"before",value:"$"},{name:"\u4FDD\u52A0\u5229\u4E9A\u5217\u5F17",pos:"before",value:"lev"},{name:"\u51B0\u5C9B\u514B\u6717",pos:"before",value:"kr"},{name:"\u6CE2\u9ED1\u53EF\u5151\u6362\u9A6C\u514B",pos:"before",value:"KM"},{name:"\u6CE2\u5170\u5179\u7F57\u63D0",pos:"after",value:"z?"},{name:"\u73BB\u5229\u7EF4\u4E9A\u8BFA",pos:"before",value:"Bs"},{name:"\u4F2F\u5229\u5179\u5143",pos:"before",value:"$"},{name:"\u535A\u8328\u74E6\u7EB3\u666E\u62C9",pos:"before",value:"P"},{name:"\u4E0D\u4E39\u52AA\u624E\u59C6",pos:"before",value:"Nu"},{name:"\u5E03\u9686\u8FEA\u6CD5\u90CE",pos:"before",value:"FBu"},{name:"\u671D\u9C9C\u5706",pos:"before",value:"?KP"},{name:"\u4E39\u9EA6\u514B\u6717",pos:"after",value:"kr"},{name:"\u4E1C\u52A0\u52D2\u6BD4\u5143",pos:"before",value:"$"},{name:"\u591A\u7C73\u5C3C\u52A0\u6BD4\u7D22",pos:"before",value:"RD$"},{name:"\u4FC4\u56FD\u5362\u5E03",pos:"after",value:"?"},{name:"\u5384\u7ACB\u7279\u91CC\u4E9A\u7EB3\u514B\u6CD5",pos:"before",value:"Nfk"},{name:"\u975E\u6D32\u91D1\u878D\u5171\u540C\u4F53\u6CD5\u90CE",pos:"before",value:"CFA"},{name:"\u83F2\u5F8B\u5BBE\u6BD4\u7D22",pos:"before",value:"?"},{name:"\u6590\u6D4E\u5143",pos:"before",value:"$"},{name:"\u4F5B\u5F97\u89D2\u57C3\u65AF\u5E93\u591A",pos:"before",value:"CVE"},{name:"\u798F\u514B\u5170\u7FA4\u5C9B\u9551",pos:"before",value:"\uFFE1"},{name:"\u5188\u6BD4\u4E9A\u8FBE\u62C9\u897F",pos:"before",value:"GMD"},{name:"\u521A\u679C\u6CD5\u90CE",pos:"before",value:"FrCD"},{name:"\u54E5\u4F26\u6BD4\u4E9A\u6BD4\u7D22",pos:"before",value:"$"},{name:"\u54E5\u65AF\u8FBE\u9ECE\u52A0\u79D1\u6717",pos:"before",value:"?"},{name:"\u53E4\u5DF4\u6BD4\u7D22",pos:"before",value:"$"},{name:"\u53E4\u5DF4\u53EF\u5151\u6362\u6BD4\u7D22",pos:"before",value:"$"},{name:"\u572D\u4E9A\u90A3\u5143",pos:"before",value:"$"},{name:"\u54C8\u8428\u514B\u65AF\u5766\u575A\u6208",pos:"before",value:"?"},{name:"\u6D77\u5730\u53E4\u5FB7",pos:"before",value:"HTG"},{name:"\u97E9\u5143",pos:"before",value:"?"},{name:"\u8377\u5C5E\u5B89\u7684\u5217\u65AF\u76FE",pos:"before",value:"NAf."},{name:"\u6D2A\u90FD\u62C9\u65AF\u62C9\u4F26\u76AE\u62C9",pos:"before",value:"L"},{name:"\u5409\u5E03\u63D0\u6CD5\u90CE",pos:"before",value:"Fdj"},{name:"\u5409\u5C14\u5409\u65AF\u65AF\u5766\u7D22\u59C6",pos:"before",value:"KGS"},{name:"\u51E0\u5185\u4E9A\u6CD5\u90CE",pos:"before",value:"FG"},{name:"\u52A0\u62FF\u5927\u5143",pos:"before",value:"$"},{name:"\u52A0\u7EB3\u585E\u5730",pos:"before",value:"GHS"},{name:"\u67EC\u57D4\u5BE8\u745E\u5C14",pos:"before",value:"Riel"},{name:"\u6377\u514B\u514B\u6717",pos:"after",value:"K?"},{name:"\u6D25\u5DF4\u5E03\u97E6\u5143",pos:"before",value:"$"},{name:"\u5361\u5854\u5C14\u91CC\u4E9A\u5C14",pos:"before",value:"Rial"},{name:"\u5F00\u66FC\u7FA4\u5C9B\u5143",pos:"before",value:"$"},{name:"\u79D1\u6469\u7F57\u6CD5\u90CE",pos:"before",value:"CF"},{name:"\u79D1\u5A01\u7279\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u514B\u7F57\u5730\u4E9A\u5E93\u7EB3",pos:"before",value:"kn"},{name:"\u80AF\u5C3C\u4E9A\u5148\u4EE4",pos:"before",value:"Ksh"},{name:"\u83B1\u7D22\u6258\u6D1B\u8482",pos:"before",value:"LSL"},{name:"\u8001\u631D\u57FA\u666E",pos:"before",value:"?"},{name:"\u9ECE\u5DF4\u5AE9\u9551",pos:"before",value:"L\uFFE1"},{name:"\u7ACB\u9676\u5B9B\u7ACB\u7279",pos:"before",value:"Lt"},{name:"\u5229\u6BD4\u4E9A\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u5229\u6BD4\u4E9A\u5143",pos:"before",value:"$"},{name:"\u5362\u65FA\u8FBE\u6CD5\u90CE",pos:"before",value:"RF"},{name:"\u7F57\u9A6C\u5C3C\u4E9A\u5217\u4F0A",pos:"before",value:"RON"},{name:"\u9A6C\u8FBE\u52A0\u65AF\u52A0\u963F\u91CC\u4E9A\u91CC",pos:"before",value:"Ar"},{name:"\u9A6C\u5C14\u4EE3\u592B\u62C9\u83F2\u4E9A",pos:"before",value:"Rf"},{name:"\u9A6C\u62C9\u7EF4\u514B\u74E6\u67E5",pos:"before",value:"MWK"},{name:"\u9A6C\u6765\u897F\u4E9A\u6797\u5409\u7279",pos:"before",value:"RM"},{name:"\u9A6C\u5176\u987F\u6234\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u6BDB\u91CC\u6C42\u65AF\u5362\u6BD4",pos:"before",value:"MURs"},{name:"\u6BDB\u91CC\u5854\u5C3C\u4E9A\u4E4C\u5409\u4E9A",pos:"before",value:"MRO"},{name:"\u8499\u53E4\u56FE\u683C\u91CC\u514B",pos:"before",value:"?"},{name:"\u5B5F\u52A0\u62C9\u5854\u5361",pos:"before",value:"?"},{name:"\u79D8\u9C81\u65B0\u7D22\u5C14",pos:"before",value:"S/"},{name:"\u7F05\u7538\u5F00\u4E9A\u7279",pos:"before",value:"K"},{name:"\u6469\u5C14\u591A\u74E6\u5217\u4F0A",pos:"before",value:"MDL"},{name:"\u6469\u6D1B\u54E5\u8FEA\u62C9\u59C6",pos:"before",value:"dh"},{name:"\u83AB\u6851\u6BD4\u514B\u6885\u8482\u5361\u5C14",pos:"before",value:"MTn"},{name:"\u58A8\u897F\u54E5\u6BD4\u7D22",pos:"before",value:"$"},{name:"\u7EB3\u7C73\u6BD4\u4E9A\u5143",pos:"before",value:"$"},{name:"\u5357\u975E\u5170\u7279",pos:"before",value:"R"},{name:"\u5357\u82CF\u4E39\u9551",pos:"before",value:"\uFFE1"},{name:"\u5C3C\u52A0\u62C9\u74DC\u79D1\u591A\u5DF4",pos:"before",value:"C$"},{name:"\u5C3C\u6CCA\u5C14\u5362\u6BD4",pos:"before",value:"Rs"},{name:"\u5C3C\u65E5\u5229\u4E9A\u5948\u62C9",pos:"before",value:"?"},{name:"\u632A\u5A01\u514B\u6717",pos:"after",value:"kr"},{name:"\u4E54\u6CBB\u4E9A\u62C9\u745E",pos:"before",value:"GEL"},{name:"\u4EBA\u6C11\u5E01\uFF08\u79BB\u5CB8\uFF09",pos:"before",value:"\uFFE5"},{name:"\u745E\u5178\u514B\u6717",pos:"after",value:"kr"},{name:"\u745E\u58EB\u6CD5\u90CE",pos:"before",value:"CHF"},{name:"\u585E\u5C14\u7EF4\u4E9A\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u585E\u62C9\u5229\u6602\u5229\u6602",pos:"before",value:"SLL"},{name:"\u585E\u820C\u5C14\u5362\u6BD4",pos:"before",value:"SCR"},{name:"\u6C99\u7279\u91CC\u4E9A\u5C14",pos:"before",value:"Rial"},{name:"\u5723\u591A\u7F8E\u591A\u5E03\u62C9",pos:"before",value:"Db"},{name:"\u5723\u8D6B\u52D2\u62FF\u7FA4\u5C9B\u78C5",pos:"before",value:"\uFFE1"},{name:"\u65AF\u91CC\u5170\u5361\u5362\u6BD4",pos:"before",value:"Rs"},{name:"\u65AF\u5A01\u58EB\u5170\u91CC\u5170\u5409\u5C3C",pos:"before",value:"SZL"},{name:"\u82CF\u4E39\u9551",pos:"before",value:"SDG"},{name:"\u82CF\u91CC\u5357\u5143",pos:"before",value:"$"},{name:"\u6240\u7F57\u95E8\u7FA4\u5C9B\u5143",pos:"before",value:"$"},{name:"\u7D22\u9A6C\u91CC\u5148\u4EE4",pos:"before",value:"SOS"},{name:"\u5854\u5409\u514B\u65AF\u5766\u7D22\u83AB\u5C3C",pos:"before",value:"Som"},{name:"\u592A\u5E73\u6D0B\u6CD5\u90CE",pos:"after",value:"FCFP"},{name:"\u6CF0\u56FD\u94E2",pos:"before",value:"?"},{name:"\u5766\u6851\u5C3C\u4E9A\u5148\u4EE4",pos:"before",value:"TSh"},{name:"\u6C64\u52A0\u6F58\u52A0",pos:"before",value:"T$"},{name:"\u7279\u7ACB\u5C3C\u8FBE\u548C\u591A\u5DF4\u54E5\u5143",pos:"before",value:"$"},{name:"\u7A81\u5C3C\u65AF\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u571F\u8033\u5176\u91CC\u62C9",pos:"before",value:"?"},{name:"\u74E6\u52AA\u963F\u56FE\u74E6\u56FE",pos:"before",value:"VUV"},{name:"\u5371\u5730\u9A6C\u62C9\u683C\u67E5\u5C14",pos:"before",value:"Q"},{name:"\u59D4\u5185\u745E\u62C9\u535A\u5229\u74E6",pos:"before",value:"Bs"},{name:"\u6587\u83B1\u5143",pos:"before",value:"$"},{name:"\u4E4C\u5E72\u8FBE\u5148\u4EE4",pos:"before",value:"UGX"},{name:"\u4E4C\u514B\u5170\u683C\u91CC\u592B\u5C3C\u4E9A",pos:"before",value:"\u0433\u0440\u043D."},{name:"\u4E4C\u62C9\u572D\u6BD4\u7D22",pos:"before",value:"$"},{name:"\u4E4C\u5179\u522B\u514B\u65AF\u5766\u82CF\u59C6",pos:"before",value:"so?m"},{name:"\u897F\u8428\u6469\u4E9A\u5854\u62C9",pos:"before",value:"WST"},{name:"\u65B0\u52A0\u5761\u5143",pos:"before",value:"$"},{name:"\u65B0\u53F0\u5E01",pos:"before",value:"NT$"},{name:"\u65B0\u897F\u5170\u5143",pos:"before",value:"$"},{name:"\u5308\u7259\u5229\u798F\u6797",pos:"before",value:"Ft"},{name:"\u53D9\u5229\u4E9A\u9551",pos:"before",value:"\uFFE1"},{name:"\u7259\u4E70\u52A0\u5143",pos:"before",value:"$"},{name:"\u4E9A\u7F8E\u5C3C\u4E9A\u5FB7\u62C9\u59C6",pos:"before",value:"Dram"},{name:"\u4E5F\u95E8\u91CC\u4E9A\u5C14",pos:"before",value:"Rial"},{name:"\u4F0A\u62C9\u514B\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u4F0A\u6717\u91CC\u4E9A\u5C14",pos:"before",value:"Rial"},{name:"\u4EE5\u8272\u5217\u65B0\u8C22\u514B\u5C14",pos:"before",value:"?"},{name:"\u5370\u5EA6\u5362\u6BD4",pos:"before",value:"?"},{name:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u5362\u6BD4",pos:"before",value:"Rp"},{name:"\u7EA6\u65E6\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u8D8A\u5357\u76FE",pos:"after",value:"?"},{name:"\u8D5E\u6BD4\u4E9A\u514B\u74E6\u67E5",pos:"before",value:"ZMW"},{name:"\u76F4\u5E03\u7F57\u9640\u9551",pos:"before",value:"\uFFE1"},{name:"\u667A\u5229\u6BD4\u7D22",pos:"before",value:"$"},{name:"\u4E2D\u975E\u91D1\u878D\u5408\u4F5C\u6CD5\u90CE",pos:"before",value:"FCFA"}],dateFmtList:[{name:"1930-08-05",value:"yyyy-MM-dd"},{name:"1930/8/5",value:"yyyy/MM/dd"},{name:"1930\u5E748\u67085\u65E5",value:'yyyy"\u5E74"M"\u6708"d"\u65E5"'},{name:"08-05",value:"MM-dd"},{name:"8-5",value:"M-d"},{name:"8\u67085\u65E5",value:'M"\u6708"d"\u65E5"'},{name:"13:30:30",value:"h:mm:ss"},{name:"13:30",value:"h:mm"},{name:"\u4E0B\u534801:30",value:"\u4E0A\u5348/\u4E0B\u5348 hh:mm"},{name:"\u4E0B\u53481:30",value:"\u4E0A\u5348/\u4E0B\u5348 h:mm"},{name:"\u4E0B\u53481:30:30",value:"\u4E0A\u5348/\u4E0B\u5348 h:mm:ss"},{name:"08-05 \u4E0B\u534801:30",value:"MM-dd \u4E0A\u5348/\u4E0B\u5348 hh:mm"}],numFmtList:[{name:"1235",value:"0"},{name:"1234.56",value:"0.00"},{name:"1,235",value:"#,##0"},{name:"1,234.56",value:"#,##0.00"},{name:"1,235",value:"#,##0_);(#,##0)"},{name:"1,235",value:"#,##0_);[Red](#,##0)"},{name:"1,234.56",value:"#,##0.00_);(#,##0.00)"},{name:"1,234.56",value:"#,##0.00_);[Red](#,##0.00)"},{name:"$1,235",value:"$#,##0_);($#,##0)"},{name:"$1,235",value:"$#,##0_);[Red]($#,##0)"},{name:"$1,234.56",value:"$#,##0.00_);($#,##0.00)"},{name:"$1,234.56",value:"$#,##0.00_);[Red]($#,##0.00)"},{name:"1234.56",value:"@"},{name:"123456%",value:"0%"},{name:"123456.00%",value:"0.00%"},{name:"1.23E+03",value:"0.00E+00"},{name:"1.2E+3",value:"##0.0E+0"},{name:"1234 5/9",value:"# ?/?"},{name:"1234 14/25",value:"# ??/??"},{name:"$ 1,235",value:'_($* #,##0_);_(...($* "-"_);_(@_)'},{name:"1,235",value:'_(* #,##0_);_(*..._(* "-"_);_(@_)'},{name:"$ 1,234.56",value:'_($* #,##0.00_);_(...($* "-"_);_(@_)'},{name:"1,234.56",value:'_(* #,##0.00_);...* "-"??_);_(@_)'}],createDialog:function(e){let n=this,t=Q().currencyDetail,l=Q().format,a=Q().button;this.moneyFmtList=[{name:t.RMB,pos:"before",value:"\xA5"},{name:t.USdollar,pos:"before",value:"$"},{name:t.EUR,pos:"before",value:"\u20AC"},{name:t.GBP,pos:"before",value:"\uFFE1"},{name:t.HK,pos:"before",value:"$"},{name:t.JPY,pos:"before",value:"\uFFE5"},{name:t.AlbanianLek,pos:"before",value:"Lek"},{name:t.AlgerianDinar,pos:"before",value:"din"},{name:t.Afghani,pos:"after",value:"Af"},{name:t.ArgentinePeso,pos:"before",value:"$"},{name:t.UnitedArabEmiratesDirham,pos:"before",value:"dh"},{name:t.ArubanFlorin,pos:"before",value:"Afl"},{name:t.OmaniRial,pos:"before",value:"Rial"},{name:t.Azerbaijanimanat,pos:"before",value:"?"},{name:t.EgyptianPound,pos:"before",value:"\uFFE1"},{name:t.EthiopianBirr,pos:"before",value:"Birr"},{name:t.AngolaKwanza,pos:"before",value:"Kz"},{name:t.AustralianDollar,pos:"before",value:"$"},{name:t.Patacas,pos:"before",value:"MOP"},{name:t.BarbadosDollar,pos:"before",value:"$"},{name:t.PapuaNewGuineaKina,pos:"before",value:"PGK"},{name:t.BahamianDollar,pos:"before",value:"$"},{name:t.PakistanRupee,pos:"before",value:"Rs"},{name:t.ParaguayanGuarani,pos:"after",value:"Gs"},{name:t.BahrainiDinar,pos:"before",value:"din"},{name:t.PanamanianBalboa,pos:"before",value:"B/"},{name:t.Brazilianreal,pos:"before",value:"R$"},{name:t.Belarusianruble,pos:"after",value:"\u0440"},{name:t.BermudianDollar,pos:"before",value:"$"},{name:t.BulgarianLev,pos:"before",value:"lev"},{name:t.IcelandKrona,pos:"before",value:"kr"},{name:t.BosniaHerzegovinaConvertibleMark,pos:"before",value:"KM"},{name:t.PolishZloty,pos:"after",value:"z?"},{name:t.Boliviano,pos:"before",value:"Bs"},{name:t.BelizeDollar,pos:"before",value:"$"},{name:t.BotswanaPula,pos:"before",value:"P"},{name:t.NotDannuzhamu,pos:"before",value:"Nu"},{name:t.BurundiFranc,pos:"before",value:"FBu"},{name:t.NorthKoreanWon,pos:"before",value:"?KP"},{name:t.DanishKrone,pos:"after",value:"kr"},{name:t.EastCaribbeanDollar,pos:"before",value:"$"},{name:t.DominicaPeso,pos:"before",value:"RD$"},{name:t.RussianRuble,pos:"after",value:"?"},{name:t.EritreanNakfa,pos:"before",value:"Nfk"},{name:t.CFAfranc,pos:"before",value:"CFA"},{name:t.PhilippinePeso,pos:"before",value:"?"},{name:t.FijiDollar,pos:"before",value:"$"},{name:t.CapeVerdeEscudo,pos:"before",value:"CVE"},{name:t.FalklandIslandsPound,pos:"before",value:"\uFFE1"},{name:t.GambianDalasi,pos:"before",value:"GMD"},{name:t.Congolesefranc,pos:"before",value:"FrCD"},{name:t.ColombianPeso,pos:"before",value:"$"},{name:t.CostaRicanColon,pos:"before",value:"?"},{name:t.CubanPeso,pos:"before",value:"$"},{name:t.Cubanconvertiblepeso,pos:"before",value:"$"},{name:t.GuyanaDollar,pos:"before",value:"$"},{name:t.KazakhstanTenge,pos:"before",value:"?"},{name:t.Haitiangourde,pos:"before",value:"HTG"},{name:t.won,pos:"before",value:"?"},{name:t.NetherlandsAntillesGuilder,pos:"before",value:"NAf."},{name:t.Honduraslempiras,pos:"before",value:"L"},{name:t.DjiboutiFranc,pos:"before",value:"Fdj"},{name:t.KyrgyzstanSom,pos:"before",value:"KGS"},{name:t.GuineaFranc,pos:"before",value:"FG"},{name:t.CanadianDollar,pos:"before",value:"$"},{name:t.GhanaianCedi,pos:"before",value:"GHS"},{name:t.Cambodianriel,pos:"before",value:"Riel"},{name:t.CzechKoruna,pos:"after",value:"K?"},{name:t.ZimbabweDollar,pos:"before",value:"$"},{name:t.QatariRiyal,pos:"before",value:"Rial"},{name:t.CaymanIslandsDollar,pos:"before",value:"$"},{name:t.Comorianfranc,pos:"before",value:"CF"},{name:t.KuwaitiDinar,pos:"before",value:"din"},{name:t.CroatianKuna,pos:"before",value:"kn"},{name:t.KenyanShilling,pos:"before",value:"Ksh"},{name:t.LesothoLoti,pos:"before",value:"LSL"},{name:t.LaoKip,pos:"before",value:"?"},{name:t.LebanesePound,pos:"before",value:"L\uFFE1"},{name:t.Lithuanianlitas,pos:"before",value:"Lt"},{name:t.LibyanDinar,pos:"before",value:"din"},{name:t.LiberianDollar,pos:"before",value:"$"},{name:t.RwandaFranc,pos:"before",value:"RF"},{name:t.RomanianLeu,pos:"before",value:"RON"},{name:t.MalagasyAriary,pos:"before",value:"Ar"},{name:t.MaldivianRufiyaa,pos:"before",value:"Rf"},{name:t.MalawiKwacha,pos:"before",value:"MWK"},{name:t.MalaysianRinggit,pos:"before",value:"RM"},{name:t.MacedoniawearingDinar,pos:"before",value:"din"},{name:t.MauritiusRupee,pos:"before",value:"MURs"},{name:t.MauritanianOuguiya,pos:"before",value:"MRO"},{name:t.MongolianTugrik,pos:"before",value:"?"},{name:t.BangladeshiTaka,pos:"before",value:"?"},{name:t.PeruvianNuevoSol,pos:"before",value:"S/"},{name:t.MyanmarKyat,pos:"before",value:"K"},{name:t.MoldovanLeu,pos:"before",value:"MDL"},{name:t.MoroccanDirham,pos:"before",value:"dh"},{name:t.MozambiqueMetical,pos:"before",value:"MTn"},{name:t.MexicanPeso,pos:"before",value:"$"},{name:t.NamibianDollar,pos:"before",value:"$"},{name:t.SouthAfricanRand,pos:"before",value:"R"},{name:t.SouthSudanesePound,pos:"before",value:"\uFFE1"},{name:t.NicaraguaCordoba,pos:"before",value:"C$"},{name:t.NepaleseRupee,pos:"before",value:"Rs"},{name:t.NigerianNaira,pos:"before",value:"?"},{name:t.NorwegianKrone,pos:"after",value:"kr"},{name:t.GeorgianLari,pos:"before",value:"GEL"},{name:t.RenminbiOffshore,pos:"before",value:"\uFFE5"},{name:t.SwedishKrona,pos:"after",value:"kr"},{name:t.SwissFranc,pos:"before",value:"CHF"},{name:t.SerbianDinar,pos:"before",value:"din"},{name:t.SierraLeone,pos:"before",value:"SLL"},{name:t.SeychellesRupee,pos:"before",value:"SCR"},{name:t.SaudiRiyal,pos:"before",value:"Rial"},{name:t.SaoTomeDobra,pos:"before",value:"Db"},{name:t.SaintHelenapound,pos:"before",value:"\uFFE1"},{name:t.SriLankaRupee,pos:"before",value:"Rs"},{name:t.SwazilandLilangeni,pos:"before",value:"SZL"},{name:t.SudanesePound,pos:"before",value:"SDG"},{name:t.Surinamesedollar,pos:"before",value:"$"},{name:t.SolomonIslandsDollar,pos:"before",value:"$"},{name:t.SomaliShilling,pos:"before",value:"SOS"},{name:t.TajikistanSomoni,pos:"before",value:"Som"},{name:t.PacificFranc,pos:"after",value:"FCFP"},{name:t.ThaiBaht,pos:"before",value:"?"},{name:t.TanzanianShilling,pos:"before",value:"TSh"},{name:t.TonganPaanga,pos:"before",value:"T$"},{name:t.TrinidadandTobagoDollar,pos:"before",value:"$"},{name:t.TunisianDinar,pos:"before",value:"din"},{name:t.TurkishLira,pos:"before",value:"?"},{name:t.VanuatuVatu,pos:"before",value:"VUV"},{name:t.GuatemalanQuetzal,pos:"before",value:"Q"},{name:t.CommissionBolivar,pos:"before",value:"Bs"},{name:t.BruneiDollar,pos:"before",value:"$"},{name:t.UgandanShilling,pos:"before",value:"UGX"},{name:t.UkrainianHryvnia,pos:"before",value:"\u0433\u0440\u043D."},{name:t.UruguayanPeso,pos:"before",value:"$"},{name:t.Uzbekistansom,pos:"before",value:"so?m"},{name:t.WesternSamoaTala,pos:"before",value:"WST"},{name:t.SingaporeDollar,pos:"before",value:"$"},{name:t.NT,pos:"before",value:"NT$"},{name:t.NewZealandDollar,pos:"before",value:"$"},{name:t.HungarianForint,pos:"before",value:"Ft"},{name:t.SyrianPound,pos:"before",value:"\uFFE1"},{name:t.JamaicanDollar,pos:"before",value:"$"},{name:t.ArmenianDram,pos:"before",value:"Dram"},{name:t.YemeniRial,pos:"before",value:"Rial"},{name:t.IraqiDinar,pos:"before",value:"din"},{name:t.IranianRial,pos:"before",value:"Rial"},{name:t.NewIsraeliShekel,pos:"before",value:"?"},{name:t.IndianRupee,pos:"before",value:"?"},{name:t.IndonesianRupiah,pos:"before",value:"Rp"},{name:t.JordanianDinar,pos:"before",value:"din"},{name:t.VND,pos:"after",value:"?"},{name:t.ZambianKwacha,pos:"before",value:"ZMW"},{name:t.GibraltarPound,pos:"before",value:"\uFFE1"},{name:t.ChileanPeso,pos:"before",value:"$"},{name:t.CFAFrancBEAC,pos:"before",value:"FCFA"}],this.dateFmtList=Q().dateFmtList,this.numFmtList=[{name:"1235",value:"0"},{name:"1234.56",value:"0.00"},{name:"1,235",value:"#,##0"},{name:"1,234.56",value:"#,##0.00"},{name:"1,235",value:"#,##0_);(#,##0)"},{name:"1,235",value:"#,##0_);[Red](#,##0)"},{name:"1,234.56",value:"#,##0.00_);(#,##0.00)"},{name:"1,234.56",value:"#,##0.00_);[Red](#,##0.00)"},{name:"$1,235",value:"$#,##0_);($#,##0)"},{name:"$1,235",value:"$#,##0_);[Red]($#,##0)"},{name:"$1,234.56",value:"$#,##0.00_);($#,##0.00)"},{name:"$1,234.56",value:"$#,##0.00_);[Red]($#,##0.00)"},{name:"1234.56",value:"@"},{name:"123456%",value:"0%"},{name:"123456.00%",value:"0.00%"},{name:"1.23E+03",value:"0.00E+00"},{name:"1.2E+3",value:"##0.0E+0"},{name:"1234 5/9",value:"# ?/?"},{name:"1234 14/25",value:"# ??/??"},{name:"$ 1,235",value:'_($* #,##0_);_(...($* "-"_);_(@_)'},{name:"1,235",value:'_(* #,##0_);_(*..._(* "-"_);_(@_)'},{name:"$ 1,234.56",value:'_($* #,##0.00_);_(...($* "-"_);_(@_)'},{name:"1,234.56",value:'_(* #,##0.00_);...* "-"??_);_(@_)'}],$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-moreFormat-dialog").remove();let o="",s="";if(e=="morecurrency"){o=l.titleCurrency;let b="";for(let k=0;k<n.moneyFmtList.length;k++){let w=n.moneyFmtList[k].name,x=n.moneyFmtList[k].pos,C=n.moneyFmtList[k].value;b+='<div class="listItem"><div class="name">'+w+'</div><div class="value">'+C+'</div><input type="hidden" value="'+x+'"/></div>'}s='<div class="box" id="morecurrency"><div class="decimal"><label>'+l.decimalPlaces+'\uFF1A</label><input type="number" class="formulaInputFocus" value="2" min="0" max="9"/></div><div class="listbox">'+b+"</div></div>"}else if(e=="moredatetime"){o=l.titleDateTime;let b="";for(let k=0;k<n.dateFmtList.length;k++){let w=n.dateFmtList[k].name,x=n.dateFmtList[k].value;b+='<div class="listItem"><div class="name">'+w+'</div><div class="value">'+x+"</div></div>"}s='<div class="box" id="moredatetime"><div class="listbox">'+b+"</div></div>"}else if(e=="moredigit"){o=l.titleNumber;let b="";for(let k=0;k<n.numFmtList.length;k++){let w=n.numFmtList[k].name,x=n.numFmtList[k].value;b+='<div class="listItem"><div class="name">'+w+'</div><div class="value">'+x+"</div></div>"}s='<div class="box" id="moredigit"><div class="listbox">'+b+"</div></div>"}$("body").append(_e(ft,{id:"luckysheet-moreFormat-dialog",addclass:"luckysheet-moreFormat-dialog",title:o,content:s,botton:'<button id="luckysheet-moreFormat-dialog-confirm" class="btn btn-primary">'+a.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+a.cancel+"</button>",style:"z-index:100003"}));let u=$("#luckysheet-moreFormat-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),d=u.outerHeight(),f=u.outerWidth(),m=$(window).width(),g=$(window).height(),y=$(document).scrollLeft(),v=$(document).scrollTop();$("#luckysheet-moreFormat-dialog").css({left:(m+y-f)/2,top:(g+v-d)/3}).show(),$("#luckysheet-moreFormat-dialog .listbox .listItem").eq(0).addClass("on")},init:function(){let e=this;$(document).on("click","#luckysheet-moreFormat-dialog .listbox .listItem",function(){$(this).addClass("on").siblings().removeClass("on")}),$(document).off("click.moreFormatConfirm").on("click.moreFormatConfirm","#luckysheet-moreFormat-dialog #luckysheet-moreFormat-dialog-confirm",function(){$("#luckysheet-moreFormat-dialog").hide(),$("#luckysheet-modal-dialog-mask").hide();let n=xe.deepCopyFlowData(h.flowdata),t=$("#luckysheet-moreFormat-dialog .listbox .listItem.on .value").text(),l=$(this).parents("#luckysheet-moreFormat-dialog").find(".box").attr("id");if(l=="morecurrency"){if(t.indexOf("?")!=-1)return;let a=parseInt($("#luckysheet-moreFormat-dialog .decimal input").val().trim());if(a.toString()=="NaN"||a<0||a>9){de()?alert("\u5C0F\u6570\u4F4D\u6570\u5FC5\u987B\u57280-9\u4E4B\u95F4\uFF01"):U.info("\u5C0F\u6570\u4F4D\u6570\u5FC5\u987B\u57280-9\u4E4B\u95F4\uFF01","");return}let o="";if(a>0){for(let u=1;u<=a;u++)o+="0";o="0."+o}else o="#";let s=$("#luckysheet-moreFormat-dialog .listbox .listItem.on input:hidden").val();s=="before"?o='"'+t+'" '+o:s=="after"&&(o=o+' "'+t+'"'),ke.updateFormat(n,"ct",o)}else l=="moredatetime"?ke.updateFormat(n,"ct",t):l=="moredigit"&&ke.updateFormat(n,"ct",t)})}},Uc=ub});var om=vl((TD,im)=>{"use strict";var hb=/["'&<>]/;im.exports=db;function db(e){var n=""+e,t=hb.exec(n);if(!t)return n;var l,a="",o=0,s=0;for(o=t.index;o<n.length;o++){switch(n.charCodeAt(o)){case 34:l=""";break;case 38:l="&";break;case 39:l="'";break;case 60:l="<";break;case 62:l=">";break;default:continue}s!==o&&(a+=n.substring(s,o)),s=o+1,a+=l}return s!==o?a+n.substring(s,o):a}});var ji,fb,$n,Gc=Ie(()=>{dt();Nt();Gt();Zt();fl();Ft();Al();$r();Yt();Jt();ll();Li();Xe();bt();Ml();ji=Fl(om()),fb={createDialog:function(e){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-search-replace").remove();let n=Q(),t=n.findAndReplace,l=n.button,a='<div class="tabBox"><span id="searchTab">'+t.find+'</span><span id="replaceTab">'+t.replace+'</span></div><div class="ctBox"><div class="inputBox"><div class="textboxs" id="searchInput">'+t.findTextbox+'\uFF1A<input class="formulaInputFocus" spellcheck="false" value=""/></div><div class="textboxs" id="replaceInput">'+t.replaceTextbox+'\uFF1A<input class="formulaInputFocus" spellcheck="false" value=""/></div><div class="checkboxs"><div id="regCheck"><input type="checkbox"/><span>'+t.regexTextbox+'</span></div><div id="wordCheck"><input type="checkbox"/><span>'+t.wholeTextbox+'</span></div><div id="caseCheck"><input type="checkbox"/><span>'+t.distinguishTextbox+'</span></div></div></div><div class="btnBox"><button id="replaceAllBtn" class="btn btn-default">'+t.allReplaceBtn+'</button><button id="replaceBtn" class="btn btn-default">'+t.replaceBtn+'</button><button id="searchAllBtn" class="btn btn-default">'+t.allFindBtn+'</button><button id="searchNextBtn" class="btn btn-default">'+t.findBtn+"</button></div></div>";$("body").append(_e(ft,{id:"luckysheet-search-replace",addclass:"luckysheet-search-replace",title:"",content:a,botton:'<button class="btn btn-default luckysheet-model-close-btn">'+l.close+"</button>",style:"z-index:100003",close:l.close}));let o=$("#luckysheet-search-replace").find(".luckysheet-modal-dialog-content").css("min-width",500).end(),s=o.outerHeight(),u=o.outerWidth(),d=$(window).width(),f=$(window).height(),m=$(document).scrollLeft(),g=$(document).scrollTop();$("#luckysheet-search-replace").css({left:(d+m-u)/2,top:(f+g-s)/3}).show(),e=="0"?($("#luckysheet-search-replace #searchTab").addClass("on").siblings().removeClass("on"),$("#luckysheet-search-replace #replaceInput").hide(),$("#luckysheet-search-replace #replaceAllBtn").hide(),$("#luckysheet-search-replace #replaceBtn").hide()):e=="1"&&($("#luckysheet-search-replace #replaceTab").addClass("on").siblings().removeClass("on"),$("#luckysheet-search-replace #replaceInput").show(),$("#luckysheet-search-replace #replaceAllBtn").show(),$("#luckysheet-search-replace #replaceBtn").show())},init:function(){let e=this;$(document).off("click.SRtabBoxspan").on("click.SRtabBoxspan","#luckysheet-search-replace .tabBox span",function(){$(this).addClass("on").siblings().removeClass("on");let n=$(this).attr("id");n=="searchTab"?($("#luckysheet-search-replace #replaceInput").hide(),$("#luckysheet-search-replace #replaceAllBtn").hide(),$("#luckysheet-search-replace #replaceBtn").hide(),$("#luckysheet-search-replace #searchInput input").focus()):n=="replaceTab"&&($("#luckysheet-search-replace #replaceInput").show(),$("#luckysheet-search-replace #replaceAllBtn").show(),$("#luckysheet-search-replace #replaceBtn").show(),$("#luckysheet-search-replace #replaceInput input").focus())}),$(document).off("keyup.SRsearchInput").on("keyup.SRsearchInput","#luckysheet-search-replace #searchInput input",function(n){n.keyCode==it.ENTER&&e.searchNext()}),$(document).off("click.SRsearchNextBtn").on("click.SRsearchNextBtn","#luckysheet-search-replace #searchNextBtn",function(){e.searchNext()}),$(document).off("click.SRsearchAllBtn").on("click.SRsearchAllBtn","#luckysheet-search-replace #searchAllBtn",function(){e.searchAll()}),$(document).off("click.SRsearchAllboxItem").on("click.SRsearchAllboxItem","#luckysheet-search-replace #searchAllbox .boxItem",function(){$(this).addClass("on").siblings().removeClass("on");let n=$(this).attr("data-row"),t=$(this).attr("data-col"),l=$(this).attr("data-sheetIndex");l!=h.currentSheetIndex&&ve.changeSheetExec(l),h.luckysheet_select_save=[{row:[n,n],column:[t,t]}],lt();let a=$("#luckysheet-cell-main").scrollLeft(),o=$("#luckysheet-cell-main").scrollTop(),s=$("#luckysheet-cell-main").height(),u=$("#luckysheet-cell-main").width(),d=h.visibledatarow[n],f=n-1==-1?0:h.visibledatarow[n-1],m=h.visibledatacolumn[t],g=t-1==-1?0:h.visibledatacolumn[t-1];m-a-u+20>0?$("#luckysheet-scrollbar-x").scrollLeft(m-u+20):g-a-20<0&&$("#luckysheet-scrollbar-x").scrollLeft(g-20),d-o-s+20>0?$("#luckysheet-scrollbar-y").scrollTop(d-s+20):f-o-20<0&&$("#luckysheet-scrollbar-y").scrollTop(f-20)}),$(document).off("click.SRreplaceBtn").on("click.SRreplaceBtn","#luckysheet-search-replace #replaceBtn",function(){e.replace()}),$(document).off("click.SRreplaceAllBtn").on("click.SRreplaceAllBtn","#luckysheet-search-replace #replaceAllBtn",function(){e.replaceAll()})},searchNext:function(){let e=this,n=$("#luckysheet-search-replace #searchInput input").val();if(n==""||n==null)return;let l=Q().findAndReplace,a;h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]?a=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1]}]:a=$.extend(!0,[],h.luckysheet_select_save);let o=e.getSearchIndexArr(n,a);if(o.length==0){de()?alert(l.noFindTip):U.info(l.noFindTip,"");return}let s=0;if(h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]){if(h.luckysheet_select_save.length==0)s=0;else for(let k=0;k<o.length;k++)if(o[k].r==h.luckysheet_select_save[0].row[0]&&o[k].c==h.luckysheet_select_save[0].column[0]){k==o.length-1?s=0:s=k+1;break}h.luckysheet_select_save=[{row:[o[s].r,o[s].r],column:[o[s].c,o[s].c]}]}else{let k=a[a.length-1].row_focus,w=a[a.length-1].column_focus;for(let x=0;x<o.length;x++)if(o[x].r==k&&o[x].c==w){x==o.length-1?s=0:s=x+1;break}for(let x=0;x<a.length;x++){let C=a[x].row[0],S=a[x].row[1],_=a[x].column[0],T=a[x].column[1];if(o[s].r>=C&&o[s].r<=S&&o[s].c>=_&&o[s].c<=T){let A=a[x];A.row_focus=o[s].r,A.column_focus=o[s].c,a.splice(x,1),a.push(A);break}}h.luckysheet_select_save=a}lt();let u=$("#luckysheet-cell-main").scrollLeft(),d=$("#luckysheet-cell-main").scrollTop(),f=$("#luckysheet-cell-main").height(),m=$("#luckysheet-cell-main").width(),g=h.visibledatarow[o[s].r],y=o[s].r-1==-1?0:h.visibledatarow[o[s].r-1],v=h.visibledatacolumn[o[s].c],b=o[s].c-1==-1?0:h.visibledatacolumn[o[s].c-1];v-u-m+20>0?$("#luckysheet-scrollbar-x").scrollLeft(v-m+20):b-u-20<0&&$("#luckysheet-scrollbar-x").scrollLeft(b-20),g-d-f+20>0?$("#luckysheet-scrollbar-y").scrollTop(g-f+20):y-d-20<0&&$("#luckysheet-scrollbar-y").scrollTop(y-20),$("#searchAllbox").is(":visible")&&$("#luckysheet-search-replace #searchAllbox .boxItem").removeClass("on")},searchAll:function(){let e=this,t=Q().findAndReplace;$("#luckysheet-search-replace #searchAllbox").remove();let l=$("#luckysheet-search-replace #searchInput input").val();if(l==""||l==null)return;let a;h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]?a=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1]}]:a=$.extend(!0,[],h.luckysheet_select_save);let o=e.getSearchIndexArr(l,a);if(o.length==0){de()?alert(t.noFindTip):U.info(t.noFindTip,"");return}let s="";for(let u=0;u<o.length;u++){let d=bn(o[u].r,o[u].c,h.flowdata).toString();d.indexOf("</")>-1&&d.indexOf(">")>-1?s+='<div class="boxItem" data-row="'+o[u].r+'" data-col="'+o[u].c+'" data-sheetIndex="'+h.currentSheetIndex+'"><span>'+(0,ji.default)(h.luckysheetfile[Z(h.currentSheetIndex)].name)+"</span><span>"+tt(o[u].c)+(o[u].r+1)+"</span><span>"+(0,ji.default)(d)+"</span></div>":s+='<div class="boxItem" data-row="'+o[u].r+'" data-col="'+o[u].c+'" data-sheetIndex="'+h.currentSheetIndex+'"><span>'+h.luckysheetfile[Z(h.currentSheetIndex)].name+"</span><span>"+tt(o[u].c)+(o[u].r+1)+'</span><span title="'+(0,ji.default)(d)+'">'+(0,ji.default)(d)+"</span></div>"}$(`<div id="searchAllbox"><div class="boxTitle"><span>${t.searchTargetSheet}</span><span>${t.searchTargetCell}</span><span>${t.searchTargetValue}</span></div><div class="boxMain">${s}</div></div>`).appendTo($("#luckysheet-search-replace")),$("#luckysheet-search-replace #searchAllbox .boxItem").eq(0).addClass("on").siblings().removeClass("on"),h.luckysheet_select_save=[{row:[o[0].r,o[0].r],column:[o[0].c,o[0].c]}],lt()},getSearchIndexArr:function(e,n){let t=[],l={},a=$("#luckysheet-search-replace"),o=g=>a.find(`#${g} input[type='checkbox']`).is(":checked"),s=o("regCheck"),u=o("wordCheck"),d=o("caseCheck"),f="g";d||(e=e.toLowerCase(),f+="i");let m=(g,y)=>{g+"_"+y in l||(l[g+"_"+y]=0,t.push({r:g,c:y}))};for(let g=0;g<n.length;g++){let y=n[g].row[0],v=n[g].row[1],b=n[g].column[0],k=n[g].column[1];for(let w=y;w<=v;w++)for(let x=b;x<=k;x++)if(h.flowdata[w][x]!=null){let S=bn(w,x,h.flowdata);if(S==0&&(S=S.toString()),S!=null&&S!=""){let _=!1;S=S.toString(),S=d?S:S.toLowerCase(),u?_=e==S:s?_=new RegExp(D.getRegExpStr(e),f).test(S):_=~S.indexOf(e),_&&m(w,x)}}}return t},replace:function(){let e=this,t=Q().findAndReplace;if(!h.allowEdit){U.info(t.modeTip,"");return}let l=$("#luckysheet-search-replace #searchInput input").val();if(l==""||l==null){de()?alert(t.searchInputTip):U.info(t.searchInputTip,"");return}let a;h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]?a=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1]}]:a=$.extend(!0,[],h.luckysheet_select_save);let o=e.getSearchIndexArr(l,a);if(o.length==0){de()?alert(t.noReplceTip):U.info(t.noReplceTip,"");return}let s=null,u=h.luckysheet_select_save[h.luckysheet_select_save.length-1],d=u.row_focus,f=u.column_focus;for(let F=0;F<o.length;F++)if(o[F].r==d&&o[F].c==f){s=F;break}if(s==null)if(o.length==0){de()?alert(t.noMatchTip):U.info(t.noMatchTip,"");return}else s=0;let m=!1;$("#luckysheet-search-replace #regCheck input[type='checkbox']").is(":checked")&&(m=!0);let g=!1;$("#luckysheet-search-replace #wordCheck input[type='checkbox']").is(":checked")&&(g=!0);let y=!1;$("#luckysheet-search-replace #caseCheck input[type='checkbox']").is(":checked")&&(y=!0);let v=$("#luckysheet-search-replace #replaceInput input").val(),b=xe.deepCopyFlowData(h.flowdata),k,w;if(g){k=o[s].r,w=o[s].c;let F=v;if(!wn(k,w,h.currentSheetIndex))return;Ht(k,w,b,F)}else{let F;if(y?F=new RegExp(D.getRegExpStr(l),"g"):F=new RegExp(D.getRegExpStr(l),"ig"),k=o[s].r,w=o[s].c,!wn(k,w,h.currentSheetIndex))return;let z=bn(k,w,b).toString().replace(F,v);Ht(k,w,b,z)}h.luckysheet_select_save=[{row:[k,k],column:[w,w]}],$("#luckysheet-search-replace #searchAllbox").is(":visible")&&$("#luckysheet-search-replace #searchAllbox").hide(),Ze(b,h.luckysheet_select_save),lt();let x=$("#luckysheet-cell-main").scrollLeft(),C=$("#luckysheet-cell-main").scrollTop(),S=$("#luckysheet-cell-main").height(),_=$("#luckysheet-cell-main").width(),T=h.visibledatarow[k],A=k-1==-1?0:h.visibledatarow[k-1],R=h.visibledatacolumn[w],I=w-1==-1?0:h.visibledatacolumn[w-1];R-x-_+20>0?$("#luckysheet-scrollbar-x").scrollLeft(R-_+20):I-x-20<0&&$("#luckysheet-scrollbar-x").scrollLeft(I-20),T-C-S+20>0?$("#luckysheet-scrollbar-y").scrollTop(T-S+20):A-C-20<0&&$("#luckysheet-scrollbar-y").scrollTop(A-20)},replaceAll:function(){let e=this,t=Q().findAndReplace;if(!h.allowEdit){U.info(t.modeTip,"");return}let l=$("#luckysheet-search-replace #searchInput input").val();if(l==""||l==null){de()?alert(t.searchInputTip):U.info(t.searchInputTip,"");return}let a;h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]?a=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1]}]:a=$.extend(!0,[],h.luckysheet_select_save);let o=e.getSearchIndexArr(l,a);if(o.length==0){de()?alert(t.noReplceTip):U.info(t.noReplceTip,"");return}let s=!1;$("#luckysheet-search-replace #regCheck input[type='checkbox']").is(":checked")&&(s=!0);let u=!1;$("#luckysheet-search-replace #wordCheck input[type='checkbox']").is(":checked")&&(u=!0);let d=!1;$("#luckysheet-search-replace #caseCheck input[type='checkbox']").is(":checked")&&(d=!0);let f=$("#luckysheet-search-replace #replaceInput input").val(),m=xe.deepCopyFlowData(h.flowdata),g=0;if(u)for(let v=0;v<o.length;v++){let b=o[v].r,k=o[v].c;if(!wn(b,k,h.currentSheetIndex,!1))continue;Ht(b,k,m,f),a.push({row:[b,b],column:[k,k]}),g++}else{let v;d?v=new RegExp(D.getRegExpStr(l),"g"):v=new RegExp(D.getRegExpStr(l),"ig");for(let b=0;b<o.length;b++){let k=o[b].r,w=o[b].c;if(!wn(k,w,h.currentSheetIndex,!1))continue;let x=bn(k,w,m).toString().replace(v,f);Ht(k,w,m,x),a.push({row:[k,k],column:[w,w]}),g++}}$("#luckysheet-search-replace #searchAllbox").is(":visible")&&$("#luckysheet-search-replace #searchAllbox").hide(),Ze(m,a),h.luckysheet_select_save=$.extend(!0,[],a),lt();let y=_e(t.successTip,{xlength:g});de()?alert(y):U.info(y,"")}},$n=fb});var mb,Xr,sm=Ie(()=>{dt();Nt();Ft();Ft();ll();Gt();Zt();gr();Xe();bt();mb={createDialog:function(){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-locationCell-dialog").remove();let e=Q(),n=e.findAndReplace,t=e.button,l='<div class="listbox"><div class="listItem"><input type="radio" name="locationType" checked="checked" id="locationConstant"><label for="locationConstant">'+n.locationConstant+'</label><div class="subbox"><div class="subItem"><input type="checkbox" checked="checked" class="date" id="locationConstantDate"><label for="locationConstantDate">'+n.locationDate+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="number" id="locationConstantNumber"><label for="locationConstantNumber">'+n.locationDigital+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="string" id="locationConstantString"><label for="locationConstantString">'+n.locationString+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="boolean" id="locationConstantBoolean"><label for="locationConstantBoolean">'+n.locationBool+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="error" id="locationConstantError"><label for="locationConstantError">'+n.locationBool+'</label></div></div></div><div class="listItem"><input type="radio" name="locationType" id="locationFormula"><label for="locationFormula">'+n.locationFormula+'</label><div class="subbox"><div class="subItem"><input type="checkbox" checked="checked" class="date" id="locationFormulaDate" disabled="true"><label for="locationFormulaDate" style="color: #666">'+n.locationDate+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="number" id="locationFormulaNumber" disabled="true"><label for="locationFormulaNumber" style="color: #666">'+n.locationDigital+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="string" id="locationFormulaString" disabled="true"><label for="locationFormulaString" style="color: #666">'+n.locationString+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="boolean" id="locationFormulaBoolean" disabled="true"><label for="locationFormulaBoolean" style="color: #666">'+n.locationBool+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="error" id="locationFormulaError" disabled="true"><label for="locationFormulaError" style="color: #666">'+n.locationError+'</label></div></div></div><div class="listItem"><input type="radio" name="locationType" id="locationNull"><label for="locationNull">'+n.locationNull+'</label></div><div class="listItem"><input type="radio" name="locationType" id="locationCF"><label for="locationCF">'+n.locationCondition+'</label></div><div class="listItem"><input type="radio" name="locationType" id="locationStepRow"><label for="locationStepRow">'+n.locationRowSpan+'</label></div><div class="listItem"><input type="radio" name="locationType" id="locationStepColumn"><label for="locationStepColumn">'+n.locationColumnSpan+"</label></div></div>";$("body").append(_e(ft,{id:"luckysheet-locationCell-dialog",addclass:"luckysheet-locationCell-dialog",title:n.location,content:l,botton:'<button id="luckysheet-locationCell-dialog-confirm" class="btn btn-primary">'+t.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+t.cancel+"</button>",style:"z-index:100003"}));let a=$("#luckysheet-locationCell-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),d=$(window).height(),f=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-locationCell-dialog").css({left:(u+f-s)/2,top:(d+m-o)/3}).show()},init:function(){let e=this,n=Q().findAndReplace;$(document).on("click","#luckysheet-locationCell-dialog .listItem input:radio",function(t){$("#luckysheet-locationCell-dialog .listItem input:checkbox").prop("disabled",!0),$("#luckysheet-locationCell-dialog .listItem .subbox label").css("color","#666"),$(this).siblings(".subbox").find("input:checkbox").removeAttr("disabled"),$(this).siblings(".subbox").find("label").css("color","#000")}),$(document).off("click.locationCellConfirm").on("click.locationCellConfirm","#luckysheet-locationCell-dialog #luckysheet-locationCell-dialog-confirm",function(){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-locationCell-dialog").hide();let t=$("#luckysheet-locationCell-dialog .listItem input:radio:checked"),l=t.attr("id");if(l=="locationConstant"||l=="locationFormula"){let a=t.siblings(".subbox").find("input:checkbox:checked"),o;if(a.length==0)return;if(a.length==5)o="all";else{let u=[];for(let d=0;d<a.length;d++)$(a[d]).hasClass("date")?u.push("d"):$(a[d]).hasClass("number")?u.push("n"):$(a[d]).hasClass("string")?u.push("s,g"):$(a[d]).hasClass("boolean")?u.push("b"):$(a[d]).hasClass("error")&&u.push("e");o=u.join(",")}let s;h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]?s=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1]}]:s=$.extend(!0,[],h.luckysheet_select_save),e.apply(s,l,o)}else if(l=="locationStepRow"){if(h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]){de()?alert(n.locationTiplessTwoRow):U.info("",n.locationTiplessTwoRow);return}let a=$.extend(!0,[],h.luckysheet_select_save);e.apply(a,"locationStepRow")}else if(l=="locationStepColumn"){if(h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]){de()?alert(n.locationTiplessTwoColumn):U.info("",n.locationTiplessTwoColumn);return}let a=$.extend(!0,[],h.luckysheet_select_save);e.apply(a,"locationStepColumn")}else{let a;h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]?a=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1]}]:a=$.extend(!0,[],h.luckysheet_select_save),e.apply(a,l)}})},apply:function(e,n,t){let l=Q().findAndReplace,a=[];if(n=="locationFormula"||n=="locationConstant"||n=="locationNull"){let o=null,s=null,u=null,d=null,f={};for(let m=0;m<e.length;m++){let g=e[m].row[0],y=e[m].row[1],v=e[m].column[0],b=e[m].column[1];(o==null||o<g)&&(o=g),(s==null||s>y)&&(s=y),(u==null||u<v)&&(u=v),(d==null||d>b)&&(d=b);for(let k=g;k<=y;k++)for(let w=v;w<=b;w++){let x=h.flowdata[k][w];x!=null&&x.mc!=null&&(x=h.flowdata[x.mc.r][x.mc.c]),(n=="locationFormula"&&x!=null&&!me(x.v)&&x.f!=null&&(t=="all"||x.ct!=null&&t.indexOf(x.ct.t)>-1)||n=="locationConstant"&&x!=null&&!me(x.v)&&(t=="all"||x.ct!=null&&t.indexOf(x.ct.t)>-1)||n=="locationNull"&&(x==null||me(x.v)))&&(f[k+"_"+w]=0)}}a=this.getRangeArr(o,s,u,d,f,a)}else if(n=="locationCF"){let o=Z(h.currentSheetIndex),s=h.luckysheetfile[o].luckysheet_conditionformat_save,u=h.luckysheetfile[o].data;if(s==null||s.length==0){de()?alert(l.locationTipNotFindCell):U.info("",l.locationTipNotFindCell);return}if(computeMap=$e.compute(s,u),Object.keys(computeMap).length==0){de()?alert(l.locationTipNotFindCell):U.info("",l.locationTipNotFindCell);return}let d=null,f=null,m=null,g=null,y={};for(let v=0;v<e.length;v++){let b=e[v].row[0],k=e[v].row[1],w=e[v].column[0],x=e[v].column[1];(d==null||d<b)&&(d=b),(f==null||f>k)&&(f=k),(m==null||m<w)&&(m=w),(g==null||g>x)&&(g=x);for(let C=b;C<=k;C++)for(let S=w;S<=x;S++)C+"_"+S in computeMap&&(y[C+"_"+S]=0)}a=this.getRangeArr(d,f,m,g,y,a)}else if(n=="locationStepRow")for(let o=0;o<e.length;o++){if(e[o].row[0]==e[o].row[1])continue;let s=e[o].row[0],u=e[o].row[1],d=e[o].column[0],f=e[o].column[1];for(let m=s;m<=u;m++)(m-s)%2==0&&a.push({row:[m,m],column:[d,f]})}else if(n=="locationStepColumn")for(let o=0;o<e.length;o++){if(e[o].column[0]==e[o].column[1])continue;let s=e[o].row[0],u=e[o].row[1],d=e[o].column[0],f=e[o].column[1];for(let m=d;m<=f;m++)(m-d)%2==0&&a.push({row:[s,u],column:[m,m]})}if(a.length==0)de()?alert(l.locationTipNotFindCell):U.info("",l.locationTipNotFindCell);else{h.luckysheet_select_save=a,lt();let o=$("#luckysheet-cell-main").scrollLeft(),s=$("#luckysheet-cell-main").scrollTop(),u=$("#luckysheet-cell-main").height(),d=$("#luckysheet-cell-main").width(),f=h.luckysheet_select_save[0].row[0],m=h.luckysheet_select_save[0].row[1],g=h.luckysheet_select_save[0].column[0],y=h.luckysheet_select_save[0].column[1],v=h.visibledatarow[m],b=f-1==-1?0:h.visibledatarow[f-1],k=h.visibledatacolumn[y],w=g-1==-1?0:h.visibledatacolumn[g-1];k-o-d+20>0?$("#luckysheet-scrollbar-x").scrollLeft(k-d+20):w-o-20<0&&$("#luckysheet-scrollbar-x").scrollLeft(w-20),v-s-u+20>0?$("#luckysheet-scrollbar-y").scrollTop(v-u+20):b-s-20<0&&$("#luckysheet-scrollbar-y").scrollTop(b-20)}},getRangeArr(e,n,t,l,a,o){if(Object.keys(a).length==0)return o;let s=this,u=null,d=null,f=null,m=null;for(let g=e;g<=n;g++)for(let y=t;y<=l;y++){let v=h.flowdata[g][y];if(g+"_"+y in a)if(v!=null&&v.mc!=null)if(f==null){let b={row:[v.mc.r,v.mc.r+v.mc.rs-1],column:[v.mc.c,v.mc.c+v.mc.cs-1]};return o.push(b),a=s.deleteCellInSave(a,b),s.getRangeArr(e,n,t,l,a,o)}else if(y<m){let b={row:[u,d],column:[f,m]};return o.push(b),a=s.deleteCellInSave(a,b),s.getRangeArr(e,n,t,l,a,o)}else break;else f==null?(f=y,m=y,u=g,d=g):y>m&&(m=y);else if(f!=null){if(v!=null&&v.mc!=null)break;if(!(y<f))if(y<=m){let b={row:[u,d],column:[f,m]};return o.push(b),a=s.deleteCellInSave(a,b),s.getRangeArr(e,n,t,l,a,o)}else d=g}}if(f!=null){let g={row:[u,d],column:[f,m]};return o.push(g),a=s.deleteCellInSave(a,g),s.getRangeArr(e,n,t,l,a,o)}},deleteCellInSave(e,n){for(let t=n.row[0];t<=n.row[1];t++)for(let l=n.column[0];l<=n.column[1];l++)delete e[t+"_"+l];return e}},Xr=mb});var pb,ri,Wc=Ie(()=>{Ut();Jt();ba();Gt();dt();Xe();bt();pb={singleRangeFocus:!1,init:function(){let e=this,n=Q(),t=n.formula,l=n.button;$(document).off("focus.IFcompareValue").on("focus.IFcompareValue","#luckysheet-ifFormulaGenerator-dialog #compareValue",function(){$("#luckysheet-modal-dialog-mask").hide(),e.singleRangeFocus=!0}),$(document).off("click.IFsingRange").on("click.IFsingRange","#luckysheet-ifFormulaGenerator-dialog .singRange",function(){let a=$("#luckysheet-ifFormulaGenerator-dialog #compareValue").val().trim();p.iscelldata(a)?e.singleRangeDialog(a):e.singleRangeDialog()}),$(document).off("click.IFsingRangeConfirm").on("click.IFsingRangeConfirm","#luckysheet-ifFormulaGenerator-singleRange-confirm",function(){$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-ifFormulaGenerator-singleRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-dialog").show();let a=$(this).parents("#luckysheet-ifFormulaGenerator-singleRange-dialog").find("input").val().trim();$("#luckysheet-ifFormulaGenerator-dialog #compareValue").val(a),e.singleRangeFocus=!1}),$(document).off("click.IFsingRangeCancel").on("click.IFsingRangeCancel","#luckysheet-ifFormulaGenerator-singleRange-cancel",function(){$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-ifFormulaGenerator-singleRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-dialog").show(),e.singleRangeFocus=!1}),$(document).off("click.IFsingRangeClose").on("click.IFsingRangeClose","#luckysheet-ifFormulaGenerator-singleRange-dialog .luckysheet-modal-dialog-title-close",function(){$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-dialog").show(),e.singleRangeFocus=!1}),$(document).off("click.IFmultiRange").on("click.IFmultiRange","#luckysheet-ifFormulaGenerator-dialog .multiRange",function(){e.multiRangeDialog(),e.singleRangeFocus=!1}),$(document).off("click.IFmultiRangeConfirm").on("click.IFmultiRangeConfirm","#luckysheet-ifFormulaGenerator-multiRange-confirm",function(){$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide(),$("#luckysheet-ifFormulaGenerator-multiRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-dialog").show();let a=$(this).parents("#luckysheet-ifFormulaGenerator-multiRange-dialog").find("input").val().trim(),o=p.getcellrange(a),s=o.row[0],u=o.row[1],d=o.column[0],f=o.column[1],m=xe.deepCopyFlowData(h.flowdata),g=[];for(let b=s;b<=u;b++)for(let k=d;k<=f;k++)m[b]!=null&&m[b][k]!=null&&m[b][k].ct!=null&&m[b][k].ct.t=="n"&&g.push(m[b][k].v);for(let b=0;b<g.length;b++)for(let k=0;k<g.length-1-b;k++)if(g[k]<g[k+1]){let w=g[k];g[k]=g[k+1],g[k+1]=w}let y=g[0],v=g[g.length-1];$("#luckysheet-ifFormulaGenerator-dialog #smallRange").val(v),$("#luckysheet-ifFormulaGenerator-dialog #largeRange").val(y)}),$(document).off("click.IFmultiRangeCancel").on("click.IFmultiRangeCancel","#luckysheet-ifFormulaGenerator-multiRange-cancel",function(){$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide(),$("#luckysheet-ifFormulaGenerator-multiRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-dialog").show()}),$(document).off("click.IFmultiRangeClose").on("click.IFmultiRangeClose","#luckysheet-ifFormulaGenerator-multiRange-dialog .luckysheet-modal-dialog-title-close",function(){$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-dialog").show()}),$(document).on("change","#DivisionMethod",function(){$(this).find("option:selected").val()=="2"?$("#DivisionMethodVal").hide():$("#DivisionMethodVal").show(),$("#luckysheet-ifFormulaGenerator-dialog .ifList").empty()}),$(document).off("click.IFcreateBtn").on("click.IFcreateBtn","#luckysheet-ifFormulaGenerator-dialog #createBtn",function(){let a=$(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#compareValue").val().trim();if(a==""){e.info(t.ifGenTipNotNullValue);return}let o=$(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#DivisionMethod option:selected").val();if(o=="2"){let s='<div class="item"><input type="number" class="smallNum formulaInputFocus"/><select class="operator"><option value="0"> <= </option><option value="1"> < </option></select><span class="compareValue">'+a+'</span><select class="operator2"><option value="0"> <= </option><option value="1" selected="selected"> < </option></select><input type="number" class="largeNum formulaInputFocus"/><span>'+t.ifGenTipLableTitile+'\uFF1A</span><input type="text" class="markText formulaInputFocus" value=""><i class="fa fa-remove" aria-hidden="true"></i></div>';$("#luckysheet-ifFormulaGenerator-dialog .ifList").append(s)}else{let s=$(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#smallRange").val().trim(),u=$(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#largeRange").val().trim(),d=$(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#DivisionMethodVal").val().trim();if(s==""||u==""){e.info(t.ifGenTipRangeNotforNull);return}else if(d==""){e.info(t.ifGenTipCutValueNotforNull);return}e.getIfList(a,s,u,o,d)}}),$(document).on("click","#luckysheet-ifFormulaGenerator-dialog .item .fa-remove",function(){$(this).parents(".item").remove()}),$(document).off("click.IFconfirmBtn").on("click.IFconfirmBtn","#luckysheet-ifFormulaGenerator-dialog-confirm",function(){let a=$(this).parents("#luckysheet-ifFormulaGenerator-dialog").find(".ifList .item"),o="";if($(a.toArray().reverse()).each(function(f,m){let g=$(m).find(".smallNum").val().trim(),y=$(m).find(".largeNum").val().trim(),v=$(m).find(".operator option:selected").val(),b=$(m).find(".operator2 option:selected").val(),k=$(m).find(".compareValue").text(),w=$(m).find(".markText").val().trim();if(w==""&&(w=t.ifGenTipLableTitile+(f+1)),g==""&&y=="")return!0;let x;v=="0"?x=k+">="+g:x=k+">"+g;let C;b=="0"?C=k+"<="+y:C=k+"<"+y;let S;f==0&&y==""?S=x:f==a.length-1&&g==""?S=C:S="and("+x+","+C+")",f==0?o="if("+S+',"'+w+'")':o="if("+S+',"'+w+'",'+o+")"}),o.length==0){e.info(t.ifGenTipNotGenCondition);return}$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-ifFormulaGenerator-dialog").hide();let s=h.luckysheet_select_save[h.luckysheet_select_save.length-1],u=s.row_focus,d=s.column_focus;Rl(u,d,h.flowdata),$("#luckysheet-rich-text-editor").html("="+o),$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()),$("#luckysheet-wa-functionbox-confirm").click()}),$(document).on("click","#luckysheet-ifFormulaGenerator-info .luckysheet-model-close-btn",function(){$("#luckysheet-modal-dialog-mask").show()}),$(document).on("click","#luckysheet-ifFormulaGenerator-info .luckysheet-modal-dialog-title-close",function(){$("#luckysheet-modal-dialog-mask").show()})},ifFormulaDialog:function(e){let n=this,t=Q(),l=t.formula,a=t.button;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-dialog").remove();let o="",s="";if(e){let k=e.split("if(");for(let w=1;w<k.length;w++){let C=k[w].replace("and(","").replace(/\)/g,"").replace(/\"/g,"").split(",");C=n.clearArr(C),o=n.splitTxt(C[0])[0];let S,_,T;C.length==3?(S=n.splitTxt(C[0])[1],_=n.splitTxt(C[1])[2],T=C[2]):(S=n.splitTxt(C[0])[1],_=n.splitTxt(C[0])[2],T=C[1]),s+='<div class="item"><input type="number" class="smallNum formulaInputFocus" value="'+S+'"/><select class="operator"><option value="0"> <= </option><option value="1"> < </option></select><span class="compareValue">'+o+'</span><select class="operator2"><option value="0"> <= </option><option value="1" selected="selected"> < </option></select><input type="number" class="largeNum formulaInputFocus" value="'+_+'"/><span>'+l.ifGenTipLableTitile+'\uFF1A</span><input type="text" class="markText formulaInputFocus" value="'+T+'"><i class="fa fa-remove" aria-hidden="true"></i></div>'}}let u='<div class="ifAttr"><div class="attrBox"><label for="compareValue"> '+l.ifGenCompareValueTitle+' </label><div class="inpBox"><input id="compareValue" class="formulaInputFocus" value="'+o+'"/><i class="singRange fa fa-table" aria-hidden="true" title="'+l.ifGenSelectCellTitle+'"></i></div></div><div class="attrBox"><label for="smallRange"> '+l.ifGenRangeTitle+' </label><input type="number" id="smallRange" class="formulaInputFocus"/><span class="text"> '+l.ifGenRangeTo+' </span><input type="number" id="largeRange" class="formulaInputFocus"/><div id="rangeAssess"><span> '+l.ifGenRangeEvaluate+' </span><i class="multiRange fa fa-table" aria-hidden="true" title="'+l.ifGenSelectRangeTitle+'"></i></div></div><div class="attrBox"><label for="DivisionMethod"> '+l.ifGenCutWay+' </label><select id="DivisionMethod"><option value="0"> '+l.ifGenCutSame+' </option><option value="1"> '+l.ifGenCutNpiece+' </option><option value="2"> '+l.ifGenCutCustom+' </option></select><input id="DivisionMethodVal" class="formulaInputFocus"/><div id="createBtn"> '+l.ifGenCutSame+' </div></div></div><div class="ifList">'+s+"</div>";$("body").append(_e(ft,{id:"luckysheet-ifFormulaGenerator-dialog",addclass:"luckysheet-ifFormulaGenerator-dialog",title:l.ifGenerate,content:u,botton:'<button id="luckysheet-ifFormulaGenerator-dialog-confirm" class="btn btn-primary">'+a.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+a.cancel+"</button>",style:"z-index:100003"}));let d=$("#luckysheet-ifFormulaGenerator-dialog").find(".luckysheet-modal-dialog-content").css("min-width",590).end(),f=d.outerHeight(),m=d.outerWidth(),g=$(window).width(),y=$(window).height(),v=$(document).scrollLeft(),b=$(document).scrollTop();$("#luckysheet-ifFormulaGenerator-dialog").css({left:(g+v-m)/2,top:(y+b-f)/3}).show()},clearArr:function(e){for(let n=0;n<e.length;n++)(e[n]==""||e[n]==null||e[n]==null)&&e.splice(n,1);return e},splitTxt:function(e){let n,t,l;if(e.indexOf(">=")!=-1)return n=e.split(">=")[0],t=e.split(">=")[1],[n,t,l];if(e.indexOf(">")!=-1)return n=e.split(">")[0],t=e.split(">")[1],[n,t,l];if(e.indexOf("<=")!=-1)return n=e.split("<=")[0],l=e.split("<=")[1],[n,t,l];if(e.indexOf("<")!=-1)return n=e.split("<")[0],l=e.split("<")[1],[n,t,l]},singleRangeDialog:function(e){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-ifFormulaGenerator-dialog").hide(),$("#luckysheet-ifFormulaGenerator-singleRange-dialog").remove();let n=Q(),t=n.formula,l=n.button;e==null&&(e=""),$("body").append(_e(ft,{id:"luckysheet-ifFormulaGenerator-singleRange-dialog",addclass:"luckysheet-ifFormulaGenerator-singleRange-dialog",title:t.ifGenTipSelectCell,content:'<input readonly="readonly" placeholder="'+t.ifGenTipSelectCellPlace+'" value="'+e+'">',botton:'<button id="luckysheet-ifFormulaGenerator-singleRange-confirm" class="btn btn-primary">'+l.confirm+'</button><button id="luckysheet-ifFormulaGenerator-singleRange-cancel" class="btn btn-default">'+l.cancel+"</button>",style:"z-index:100003"}));let a=$("#luckysheet-ifFormulaGenerator-singleRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),d=$(window).height(),f=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-ifFormulaGenerator-singleRange-dialog").css({left:(u+f-s)/2,top:(d+m-o)/3}).show()},multiRangeDialog:function(){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-ifFormulaGenerator-dialog").hide(),$("#luckysheet-ifFormulaGenerator-multiRange-dialog").remove();let e=Q(),n=e.formula,t=e.button;$("body").append(_e(ft,{id:"luckysheet-ifFormulaGenerator-multiRange-dialog",addclass:"luckysheet-ifFormulaGenerator-multiRange-dialog",title:n.ifGenTipSelectRange,content:'<input readonly="readonly" placeholder="'+n.ifGenTipSelectRangePlace+'" value="">',botton:'<button id="luckysheet-ifFormulaGenerator-multiRange-confirm" class="btn btn-primary">'+t.confirm+'</button><button id="luckysheet-ifFormulaGenerator-multiRange-cancel" class="btn btn-default">'+t.cancel+"</button>",style:"z-index:100003"}));let l=$("#luckysheet-ifFormulaGenerator-multiRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),a=l.outerHeight(),o=l.outerWidth(),s=$(window).width(),u=$(window).height(),d=$(document).scrollLeft(),f=$(document).scrollTop();$("#luckysheet-ifFormulaGenerator-multiRange-dialog").css({left:(s+d-o)/2,top:(u+f-a)/3}).show()},getIfList:function(e,n,t,l,a){let o=Q().formula;$("#luckysheet-ifFormulaGenerator-dialog .ifList").empty(),n=parseInt(n),t=parseInt(t),a=parseInt(a);let s=[];if(l=="0"){let u=Math.ceil((t-n)/a);for(let d=0;d<=u;d++){let f=n+a*d;d==0||f>=t?s.push(""):s.push(f)}}else if(l=="1"){let u=Math.ceil((t-n)/a);for(let d=0;d<=a;d++){let f=n+u*d;d==0||f>=t?s.push(""):s.push(f)}}for(let u=0;u<s.length-1;u++){let d;u==0?d="\u5C0F\u4E8E"+s[u+1]:u==s.length-2?d="\u5927\u4E8E\u7B49\u4E8E"+s[u]:d=s[u]+"\u5230"+s[u+1];let f='<div class="item"><input type="number" class="smallNum formulaInputFocus" value="'+s[u]+'"/><select class="operator"><option value="0"> <= </option><option value="1"> < </option></select><span class="compareValue">'+e+'</span><select class="operator2"><option value="0"> <= </option><option value="1" selected="selected"> < </option></select><input type="number" class="largeNum formulaInputFocus" value="'+s[u+1]+'"/><span>'+o.ifGenTipLableTitile+'\uFF1A</span><input type="text" class="markText formulaInputFocus" value="'+d+'"><i class="fa fa-remove" aria-hidden="true"></i></div>';$("#luckysheet-ifFormulaGenerator-dialog .ifList").append(f)}},info:function(e){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-info").remove();let t=Q().button;$("body").append(_e(ft,{id:"luckysheet-ifFormulaGenerator-info",addclass:"",title:e,content:"",botton:'<button class="btn btn-default luckysheet-model-close-btn"> '+t.close+" </button>",style:"z-index:100003"}));let l=$("#luckysheet-ifFormulaGenerator-info").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),a=l.outerHeight(),o=l.outerWidth(),s=$(window).width(),u=$(window).height(),d=$(document).scrollLeft(),f=$(document).scrollTop();$("#luckysheet-ifFormulaGenerator-info").css({left:(s+d-o)/2,top:(u+f-a)/3}).show()}},ri=pb});var gb,hn,Yc=Ie(()=>{Oi();Ut();Ft();Gt();Zt();dt();Xe();bt();gb={init:function(){let e=this,n=Q(),t=n.formulaMore,l=n.button;$(document).off("keyup.fxSFLI").on("keyup.fxSFLI","#searchFormulaListInput",function(){$("#formulaTypeList").empty();let a=$(this).val().toUpperCase(),o=h.functionlist;if(a=="")e.formulaListByType($("#formulaTypeSelect option:selected").val());else for(let s=0;s<o.length;s++)/^[a-zA-Z]+$/.test(a)?o[s].n.indexOf(a)!="-1"&&$('<div class="listBox" name="'+o[s].n+'"><span>'+o[s].n+"</span><span>"+o[s].a+"</span></div>").appendTo($("#formulaTypeList")):o[s].a.indexOf(a)!="-1"&&$('<div class="listBox" name="'+o[s].n+'"><span>'+o[s].n+"</span><span>"+o[s].a+"</span></div>").appendTo($("#formulaTypeList"));$("#formulaTypeList .listBox:first-child").addClass("on")}),$(document).off("change.fxFormulaTS").on("change.fxFormulaTS","#formulaTypeSelect",function(){let a=$("#formulaTypeSelect option:selected").val();e.formulaListByType(a)}),$(document).off("click.fxListbox").on("click.fxListbox","#formulaTypeList .listBox",function(){$(this).addClass("on").siblings().removeClass("on")}),$(document).off("click.fxFormulaCf").on("click.fxFormulaCf","#luckysheet-search-formula-confirm",function(){let a=$("#luckysheet-search-formula .listBox.on").attr("name"),o='<span dir="auto" class="luckysheet-formula-text-color">=</span><span dir="auto" class="luckysheet-formula-text-color">'+a.toUpperCase()+'</span><span dir="auto" class="luckysheet-formula-text-color">(</span><span dir="auto" class="luckysheet-formula-text-color">)</span>';$("#luckysheet-rich-text-editor").html(o),$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()),e.formulaParmDialog(a)}),$(document).off("focus.fxParamInput").on("focus.fxParamInput","#luckysheet-search-formula-parm .parmBox input",function(){let a=$(this).parents(".parmBox").index();p.data_parm_index=a;let o=$(this).parents("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-title-text").text(),s=h.luckysheet_function[o].p.length,u,d;a>=s?(u=h.luckysheet_function[o].p[s-1].detail,d=h.luckysheet_function[o].p[s-1].repeat):(u=h.luckysheet_function[o].p[a].detail,d=h.luckysheet_function[o].p[a].repeat),e.parmTxtShow($(this).val()),e.functionStrCompute(),$("#luckysheet-search-formula-parm .parmDetailsBox").empty();let f=$(this).parents(".parmBox").find(".name").text();if($("<span>"+f+":</span><span>"+u+"</span>").appendTo($("#luckysheet-search-formula-parm .parmDetailsBox")),d=="y"){let m=$("#luckysheet-search-formula-parm .parmBox").length;m<5&&a==m-1&&$('<div class="parmBox"><div class="name">'+t.valueTitle+""+(m+1)+'</div><div class="txt"><input class="formulaInputFocus" /><i class="fa fa-table" aria-hidden="true" title="'+t.tipSelectDataRange+'"></i></div><div class="val">=</div></div>').appendTo($("#luckysheet-search-formula-parm .parmListBox"))}}),$(document).off("blur.fxParamInput").on("blur.fxParamInput","#luckysheet-search-formula-parm .parmBox input",function(){let a=$(this).val();p.getfunctionParam(a).fn==null&&!p.iscelldata(a)&&!B(a)&&a!=""&&a.length<=2&&a.indexOf('"')!=0&&a.lastIndexOf('"')!=0&&(a='"'+a+'"',$(this).val(a),e.parmTxtShow(a),e.functionStrCompute())}),$(document).off("keyup.fxParamInput").on("keyup.fxParamInput","#luckysheet-search-formula-parm .parmBox input",function(){e.parmTxtShow($(this).val()),e.functionStrCompute()}),$(document).off("click.fxParamI").on("click.fxParamI","#luckysheet-search-formula-parm .parmBox i",function(){p.data_parm_index=$(this).parents(".parmBox").index(),$("#luckysheet-search-formula-parm").hide(),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-search-formula-parm-select").remove(),$(this).parents(".parmBox").find(".txt input").val()==""?$("body").append(_e(ft,{id:"luckysheet-search-formula-parm-select",addclass:"luckysheet-search-formula-parm-select",title:t.tipSelectDataRange,content:"<input id='luckysheet-search-formula-parm-select-input' class='luckysheet-datavisual-range-container' style='font-size: 14px;padding:5px;max-width:none;' spellcheck='false' aria-label='"+t.tipDataRangeTile+"' readonly='true' placeholder='"+t.tipDataRangeTile+"'>",botton:'<button id="luckysheet-search-formula-parm-select-confirm" class="btn btn-primary">'+l.confirm+"</button>",style:"z-index:100003"})):$("body").append(_e(ft,{id:"luckysheet-search-formula-parm-select",addclass:"luckysheet-search-formula-parm-select",title:t.tipSelectDataRange,content:"<input id='luckysheet-search-formula-parm-select-input' class='luckysheet-datavisual-range-container' style='font-size: 14px;padding:5px;max-width:none;' spellcheck='false' aria-label='"+t.tipDataRangeTile+"' readonly='true' value='"+$(this).parents(".parmBox").find(".txt input").val()+"'>",botton:'<button id="luckysheet-search-formula-parm-select-confirm" class="btn btn-primary">'+l.confirm+"</button>",style:"z-index:100003"}));let a=$("#luckysheet-search-formula-parm-select").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),d=$(window).height(),f=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-search-formula-parm-select").css({left:(u+f-s)/2,top:(d+m-o)/3}).show(),e.parmTxtShow($(this).parents(".parmBox").find(".txt input").val())}),$(document).off("click.fxParamCf").on("click.fxParamCf","#luckysheet-search-formula-parm-confirm",function(){$("#luckysheet-wa-functionbox-confirm").click()}),$(document).off("click.fxParamSelectCf").on("click.fxParamSelectCf","#luckysheet-search-formula-parm-select-confirm",function(){let a=$("#luckysheet-search-formula-parm-select-input").attr("data_parm_index");$("#luckysheet-search-formula-parm-select").hide(),$("#luckysheet-search-formula-parm").show(),$("#luckysheet-search-formula-parm .parmBox").eq(a).find(".txt input").focus()})},formulaListDialog:function(){let e=this,n=Q(),t=n.formulaMore,l=n.button;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-search-formula").remove(),$("body").append(_e(ft,{id:"luckysheet-search-formula",addclass:"luckysheet-search-formula",title:"",content:"<div class='inpbox'><label for='searchFormulaListInput'>"+t.findFunctionTitle+"\uFF1A</label><input class='formulaInputFocus' id='searchFormulaListInput' placeholder='"+t.tipInputFunctionName+"' spellcheck='false'/></div><div class='selbox'><label>"+t.selectCategory+"\uFF1A</label><select id='formulaTypeSelect'><option value='0'>"+t.Math+"</option><option value='1'>"+t.Statistical+"</option><option value='2'>"+t.Lookup+"</option><option value='3'>"+t.luckysheet+"</option><option value='4'>"+t.dataMining+"</option><option value='5'>"+t.Database+"</option><option value='6'>"+t.Date+"</option><option value='7'>"+t.Filter+"</option><option value='8'>"+t.Financial+"</option><option value='9'>"+t.Engineering+"</option><option value='10'>"+t.Logical+"</option><option value='11'>"+t.Operator+"</option><option value='12'>"+t.Text+"</option><option value='13'>"+t.Parser+"</option><option value='14'>"+t.Array+"</option><option value='-1'>"+t.other+"</option></select></div><div class='listbox'><label>"+t.selectFunctionTitle+"\uFF1A</label><div id='formulaTypeList'></div></div>",botton:'<button id="luckysheet-search-formula-confirm" class="btn btn-primary">'+l.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+l.cancel+"</button>",style:"z-index:100003"}));let a=$("#luckysheet-search-formula").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),d=$(window).height(),f=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-search-formula").css({left:(u+f-s)/2,top:(d+m-o)/3,"user-select":"none"}).show(),e.formulaListByType("0"),$("#searchFormulaListInput").focus()},formulaListByType:function(e){$("#formulaTypeList").empty();let n=h.functionlist;for(let t=0;t<n.length;t++)(e=="-1"&&n[t].t>14||n[t].t==e)&&$('<div class="listBox" name="'+n[t].n+'"><span>'+n[t].n+"</span><span>"+n[t].a+"</span></div>").appendTo($("#formulaTypeList"));$("#formulaTypeList .listBox:first-child").addClass("on")},formulaParmDialog:function(e,n){let t="",l="",a="",o=Q(),s=o.formulaMore,u=o.button,d=h.functionlist;for(let w=0;w<d.length;w++)if(d[w].n==e.toUpperCase()){t=d[w].n;for(let x=0;x<d[w].p.length;x++)n==null?a+='<div class="parmBox"><div class="name">'+d[w].p[x].name+'</div><div class="txt"><input class="formulaInputFocus" spellcheck="false"/><i class="fa fa-table" aria-hidden="true" title="'+s.tipSelectDataRange+'"></i></div><div class="val">=</div></div>':(n[x]==null&&(n[x]=""),a+='<div class="parmBox"><div class="name">'+d[w].p[x].name+'</div><div class="txt"><input class="formulaInputFocus" value="'+n[x]+'" spellcheck="false"/><i class="fa fa-table" aria-hidden="true" title="'+s.tipSelectDataRange+'"></i></div><div class="val">=</div></div>');l='<div><div class="parmListBox">'+a+'</div><div class="formulaDetails">'+d[w].d+'</div><div class="parmDetailsBox"></div><div class="result">'+s.calculationResult+" = <span></span></div></div>"}$("#luckysheet-search-formula").hide(),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-search-formula-parm").remove(),$("body").append(_e(ft,{id:"luckysheet-search-formula-parm",addclass:"luckysheet-search-formula-parm",title:t,content:l,botton:'<button id="luckysheet-search-formula-parm-confirm" class="btn btn-primary">'+u.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+u.cancel+"</button>",style:"z-index:100003"}));let f=$("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),m=f.outerHeight(),g=f.outerWidth(),y=$(window).width(),v=$(window).height(),b=$(document).scrollLeft(),k=$(document).scrollTop();$("#luckysheet-search-formula-parm").css({left:(y+b-g)/2,top:(v+k-m)/3}).show(),$("#luckysheet-search-formula-parm .parmBox:eq(0) input").focus(),$("#luckysheet-search-formula-parm .parmBox").each(function(w,x){let C=$(x).find(".txt input").val();if(p.getfunctionParam(C).fn==null)if(p.iscelldata(C)){let S=ar(C).data;if(P(S)=="array"){let _=[];for(let T=0;T<S.length;T++)for(let A=0;A<S[T].length;A++){let R=S[T][A];R==null||me(R.v)?_.push(null):_.push(R.v)}$("#luckysheet-search-formula-parm .parmBox").eq(w).find(".val").text(" = {"+_.join(",")+"}")}else $("#luckysheet-search-formula-parm .parmBox").eq(w).find(".val").text(" = {"+S.v+"}")}else $("#luckysheet-search-formula-parm .parmBox").eq(w).find(".val").text(" = {"+C+"}");else $("#luckysheet-search-formula-parm .parmBox").eq(w).find(".val").text(" = {"+new Function("return "+$.trim(p.functionParserExe("="+C)))()+"}")}),$("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove(),p.data_parm_index=0,p.rangestart=!0},parmTxtShow:function(e){if(p.getfunctionParam(e).fn==null)if(p.iscelldata(e)){let n=p.getcellrange(e),t=n.row[0],l=n.row[1],a=n.column[0],o=n.column[1],s=h.visibledatarow[l],u=t-1==-1?0:h.visibledatarow[t-1],d=h.visibledatacolumn[o],f=a-1==-1?0:h.visibledatacolumn[a-1];$("#luckysheet-formula-functionrange-select").css({left:f,width:d-f-1,top:u,height:s-u-1}).show(),$("#luckysheet-formula-help-c").hide(),or(f,u,d-f-1,s-u-1,n.row,n.column);let m=ar(e).data;if(P(m)=="array"){let g=[];for(let y=0;y<m.length;y++)for(let v=0;v<m[y].length;v++){let b=m[y][v];b==null||me(b.v)?g.push(null):g.push(b.v)}$("#luckysheet-search-formula-parm .parmBox").eq(p.data_parm_index).find(".val").text(" = {"+g.join(",")+"}")}else $("#luckysheet-search-formula-parm .parmBox").eq(p.data_parm_index).find(".val").text(" = {"+m.v+"}")}else $("#luckysheet-search-formula-parm .parmBox").eq(p.data_parm_index).find(".val").text(" = {"+e+"}"),$("#luckysheet-formula-functionrange-select").hide();else{let n;for(let g=0;g<p.getfunctionParam(e).param.length;g++)if(p.iscelldata(p.getfunctionParam(e).param[g])){n=p.getfunctionParam(e).param[g];break}let t=p.getcellrange(n),l=t.row[0],a=t.row[1],o=t.column[0],s=t.column[1],u=h.visibledatarow[a],d=l-1==-1?0:h.visibledatarow[l-1],f=h.visibledatacolumn[s],m=o-1==-1?0:h.visibledatacolumn[o-1];$("#luckysheet-formula-functionrange-select").css({left:m,width:f-m-1,top:d,height:u-d-1}).show(),$("#luckysheet-formula-help-c").hide(),or(m,d,f-m-1,u-d-1,t.row,t.column),$("#luckysheet-search-formula-parm .parmBox").eq(p.data_parm_index).find(".val").text(" = {"+new Function("return "+$.trim(p.functionParserExe("="+e)))()+"}")}},functionStrCompute:function(){let e=!0,n=[],t=-1,l=$("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-title-text").text(),a=h.luckysheet_function[l].p;$("#luckysheet-search-formula-parm .parmBox").each(function(u,d){let f=$(d).find(".txt input").val(),m;u<a.length?m=a[u].require:m=a[a.length-1].require,f==""&&m=="m"&&(e=!1),f!=""&&(t=u)});let o;if(t==-1)o="="+$("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text()+"()";else if(t==0)o="="+$("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text()+"("+$("#luckysheet-search-formula-parm .parmBox").eq(0).find(".txt input").val()+")";else{for(let u=0;u<=t;u++)n.push($("#luckysheet-search-formula-parm .parmBox").eq(u).find(".txt input").val());o="="+$("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text()+"("+n.join(",")+")"}let s=p.functionHTMLGenerate(o);if($("#luckysheet-rich-text-editor").html(s),$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()),e){let u=$.trim(p.functionParserExe($("#luckysheet-rich-text-editor").text())),d=null;try{d=new Function("return "+u)()}catch(f){d=p.error.n}$("#luckysheet-search-formula-parm .result span").text(d)}}},hn=gb});var yb,ke,il=Ie(()=>{Zt();Gt();xl();am();Oa();gr();Qt();Lr();Vl();pr();kn();Gc();sm();Wc();ba();Yc();fl();Ur();Ft();ll();Jt();Al();Yt();ua();Ut();Ol();Or();mr();$r();Kt();Pa();pn();Nt();An();gn();dt();Ml();Xe();bt();va();yb={menu:'<div class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-menuButton ${subclass} luckysheet-mousedown-cancel" id="luckysheet-icon-${id}-menuButton">${item}</div>',item:'<div itemvalue="${value}" itemname="${name}" class="luckysheet-cols-menuitem ${sub} luckysheet-mousedown-cancel"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 0px 3px 1px;"><span style="margin-right:3px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span> ${name} <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel ${iconClass}" style="user-select: none;">${example}</span></div></div>',split:'<div class="luckysheet-menuseparator luckysheet-mousedown-cancel" role="separator"></div>',color:'<div class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-rightgclick-menu-sub luckysheet-mousedown-cancel luckysheet-menuButton ${sub}" id="${id}"><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel luckysheet-color-reset"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${resetColor}</div></div> <div class="luckysheet-mousedown-cancel"> <div class="luckysheet-mousedown-cancel"> <input type="text" class="luckysheet-color-selected" /> </div> </div> <div class="luckysheet-menuseparator luckysheet-mousedown-cancel" role="separator"></div> ${coloritem}</div>',coloritem:'<div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel ${class}"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${name}</div></div>',subcolor:'<div id="luckysheet-icon-${id}-menuButton" class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-rightgclick-menu-sub luckysheet-menuButton-sub luckysheet-mousedown-cancel"> <div class="luckysheet-mousedown-cancel"> <div class="luckysheet-mousedown-cancel"> <input type="text" class="luckysheet-color-selected" /> </div> </div></div>',rightclickmenu:null,submenuhide:{},focus:function(e,n){e.attr("id")=="luckysheet-icon-font-family-menuButton"&&On(n).num&&(n=Q().fontarray[parseInt(n)],n==null&&(n=this.defualtFont[itemvalue])),e.find(".luckysheet-cols-menuitem").find("span.icon").html(""),n==null?e.find(".luckysheet-cols-menuitem").eq(0).find("span.icon").html('<i class="fa fa-check luckysheet-mousedown-cancel"></i>'):e.find(".luckysheet-cols-menuitem[itemvalue='"+n+"']").find("span.icon").html('<i class="fa fa-check luckysheet-mousedown-cancel"></i>')},createButtonMenu:function(e){let n="",t=this;for(let l=0;l<e.length;l++){let a=e[l];a.value=="split"?n+=t.split:a.example=="more"?n+=_e(t.item,{value:a.value,name:a.text,example:"",sub:"luckysheet-cols-submenu",iconClass:"iconfont luckysheet-iconfont-youjiantou"}):n+=_e(t.item,{value:a.value,name:a.text,example:a.example,sub:"",iconClass:""})}return n},cancelPaintModel:function(){let e=this;$("#luckysheet-sheettable_0").removeClass("luckysheetPaintCursor"),h.luckysheet_copy_save.dataSheetIndex==h.currentSheetIndex?(h.luckysheet_selection_range=[],Ot()):h.luckysheetfile[Z(h.luckysheet_copy_save.dataSheetIndex)].luckysheet_selection_range=[],h.luckysheet_copy_save={},e.luckysheetPaintModelOn=!1,$("#luckysheetpopover").fadeOut(200,function(){$("#luckysheetpopover").remove()})},luckysheetPaintModelOn:!1,luckysheetPaintSingle:!1,initialMenuButton:function(){let e=this;$("#luckysheet-icon-paintformat").click(function(t){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}t.stopPropagation();let l=Q(),a=l.paint;if(h.luckysheet_select_save==null||h.luckysheet_select_save.length==0){de()?alert(a.tipSelectRange):U.info("",a.tipSelectRange);return}else if(h.luckysheet_select_save.length>1){de()?alert(a.tipNotMulti):U.info("",a.tipNotMulti);return}let o=!1,s=h.luckysheet_select_save[0].row[0],u=h.luckysheet_select_save[0].row[1],d=h.luckysheet_select_save[0].column[0],f=h.luckysheet_select_save[0].column[1];if(o=Mt(h.config,s,u,d,f),o){U.info(l.merge.partiallyError,"");return}U.popover("<i class='fa fa-paint-brush'></i> "+a.start+"","topCenter",!0,null,a.end,function(){e.cancelPaintModel()}),$("#luckysheet-sheettable_0").addClass("luckysheetPaintCursor"),h.luckysheet_selection_range=[{row:h.luckysheet_select_save[0].row,column:h.luckysheet_select_save[0].column}],Ot();let m=!1,g=!1;for(let y=h.luckysheet_select_save[0].row[0];y<=h.luckysheet_select_save[0].row[1];y++)if(!(h.config.rowhidden!=null&&h.config.rowhidden[y]!=null)){h.config.rowlen!=null&&y in h.config.rowlen&&(m=!0);for(let v=h.luckysheet_select_save[0].column[0];v<=h.luckysheet_select_save[0].column[1];v++){let b=h.flowdata[y][v];P(b)=="object"&&"mc"in b&&b.mc.rs!=null&&(g=!0)}}h.luckysheet_copy_save={dataSheetIndex:h.currentSheetIndex,copyRange:[{row:h.luckysheet_select_save[0].row,column:h.luckysheet_select_save[0].column}],RowlChange:m,HasMC:g},e.luckysheetPaintModelOn=!0,e.luckysheetPaintSingle=!0}),$("#luckysheet-icon-paintformat").dblclick(function(){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}let l=Q().paint;if(h.luckysheet_select_save==null||h.luckysheet_select_save.length==0){de()?alert(l.tipSelectRange):U.info("",l.tipSelectRange);return}else if(h.luckysheet_select_save.length>1){de()?alert(l.tipNotMulti):U.info("",l.tipNotMulti);return}U.popover("<i class='fa fa-paint-brush'></i> "+l.start,"topCenter",!0,null,l.end,function(){e.cancelPaintModel()}),$("#luckysheet-sheettable_0").addClass("luckysheetPaintCursor"),h.luckysheet_selection_range=[{row:h.luckysheet_select_save[0].row,column:h.luckysheet_select_save[0].column}],Ot();let a=!1,o=!1;for(let s=h.luckysheet_select_save[0].row[0];s<=h.luckysheet_select_save[0].row[1];s++)if(!(h.config.rowhidden!=null&&h.config.rowhidden[s]!=null)){h.config.rowlen!=null&&s in h.config.rowlen&&(a=!0);for(let u=h.luckysheet_select_save[0].column[0];u<=h.luckysheet_select_save[0].column[1];u++){let d=h.flowdata[s][u];P(d)=="object"&&"mc"in d&&d.mc.rs!=null&&(o=!0)}}h.luckysheet_copy_save={dataSheetIndex:h.currentSheetIndex,copyRange:[{row:h.luckysheet_select_save[0].row,column:h.luckysheet_select_save[0].column}],RowlChange:a,HasMC:o},e.luckysheetPaintModelOn=!0,e.luckysheetPaintSingle=!1}),$("#luckysheet-icon-currency").click(function(){let t=xe.deepCopyFlowData(h.flowdata);e.updateFormat(t,"ct","\xA5 #.00")}),$("#luckysheet-icon-percent").click(function(){let t=xe.deepCopyFlowData(h.flowdata);e.updateFormat(t,"ct","0.00%")}),$("#luckysheet-icon-fmt-decimal-decrease").click(function(){let t=xe.deepCopyFlowData(h.flowdata),l=h.luckysheet_select_save[0].row_focus,a=h.luckysheet_select_save[0].column_focus,o=e.checkstatus(t,l,a,"ct"),s=t[l][a];if(o==null||o.t!="n")return;if(o.fa=="General"&&(o=at(s.v)[1]),/^(w|W)((0?)|(0\.0+))$/.test(o.fa)){o.fa.indexOf(".")>-1?o.fa.substr(-2)==".0"?e.updateFormat(t,"ct",o.fa.split(".")[0]):e.updateFormat(t,"ct",o.fa.substr(0,o.fa.length-1)):e.updateFormat(t,"ct",o.fa);return}let d="",f="",m=[];if(o.fa.indexOf(".")>-1)m=o.fa.split("."),d=m[0],f=m[1];else return;m=f.split("");let g="";for(let v=m.length-1;v>=0;v--){let b=m[v];if(b!="#"&&b!="0"&&b!=","&&isNaN(parseInt(b)))g=b+g;else break}let y="";if(o.fa.indexOf(".")>-1){let v=f;g.length>0&&(v=f.replace(g,""));let b=v.replace(/#/g,"0");b=b.substr(0,b.length-1),b==""?y=d+g:y=d+"."+b+g}e.updateFormat(t,"ct",y)}),$("#luckysheet-icon-fmt-decimal-increase").click(function(){let t=xe.deepCopyFlowData(h.flowdata),l=h.luckysheet_select_save[0].row_focus,a=h.luckysheet_select_save[0].column_focus,o=e.checkstatus(t,l,a,"ct"),s=t[l][a];if(o==null||o.t!="n")return;if(o.fa=="General"&&(o=at(s.v)[1]),o.fa=="General"){e.updateFormat(t,"ct","#.0");return}if(/^(w|W)((0?)|(0\.0+))$/.test(o.fa)){o.fa.indexOf(".")>-1?e.updateFormat(t,"ct",o.fa+"0"):o.fa.substr(-1)=="0"?e.updateFormat(t,"ct",o.fa+".0"):e.updateFormat(t,"ct",o.fa+"0.0");return}let d="",f="",m=[];o.fa.indexOf(".")>-1?(m=o.fa.split("."),d=m[0],f=m[1]):f=o.fa,m=f.split("");let g="";for(let v=m.length-1;v>=0;v--){let b=m[v];if(b!="#"&&b!="0"&&b!=","&&isNaN(parseInt(b)))g=b+g;else break}let y="";if(o.fa.indexOf(".")>-1){let v=f;g.length>0&&(v=f.replace(g,""));let b=v.replace(/#/g,"0");b+="0",y=d+"."+b+g}else g.length>0?y=f.replace(g,"")+".0"+g:y=f+".0"+g;e.updateFormat(t,"ct",y)}),$("#luckysheet-icon-fmt-other").click(function(){let t=Q(),l=t.format,a=t.defaultFmt,o=$(this).attr("id")+"-menuButton",s=$("#"+o);if(s.length==0){let m=a,g=e.createButtonMenu(m),y=_e(e.menu,{id:"fmt-other",item:g,subclass:"",sub:""}),v=[{text:l.moreCurrency+"...",value:"morecurrency",example:""},{text:l.moreDateTime+"...",value:"moredatetime",example:""},{text:l.moreNumber+"...",value:"moredigit",example:""}],b=e.createButtonMenu(v),k=_e(e.menu,{id:"fmtOtherSelf",item:b,subclass:"luckysheet-menuButton-sub"});$("body").append(y+k),s=$("#"+o).width(250),e.focus(s),s.find(".luckysheet-cols-menuitem").click(function(){s.hide(),rt();let w=$(this),x=w.attr("itemvalue"),C=w.attr("itemname");if($("#luckysheet-icon-fmt-other").find(".luckysheet-toolbar-menu-button-caption").html(" "+C+" "),x=="fmtOtherSelf")return;let S=xe.deepCopyFlowData(h.flowdata);e.focus(s,x),e.updateFormat(S,"ct",x)}),$("#luckysheet-icon-fmtOtherSelf-menuButton").find(".luckysheet-cols-menuitem").click(function(){s.hide(),$("#luckysheet-icon-fmtOtherSelf-menuButton").hide(),rt();let w=$(this).attr("itemvalue");Uc.createDialog(w),Uc.init()})}else{let m=$(this).find(".luckysheet-toolbar-menu-button-caption").text().trim(),g=a.find(y=>y.text===m);g&&e.focus(s,g.value)}let u=$(this).outerWidth(),d=s.outerWidth(),f=$(this).offset().left;d>u&&d+f>$("#"+h.container).width()&&(f=f-d+u),ml(s,f,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-font-family").mousedown(function(t){Cr(t),t.stopPropagation()}).click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let u=e.createButtonMenu(e.fontSelectList),d=_e(e.menu,{id:"font-family",item:u,subclass:"",sub:""});$("body").append(d),l=$("#"+t).width(200),e.focus(l),l.on("click",".luckysheet-cols-menuitem",function(){l.hide(),rt();let f=$(this),m=f.attr("itemvalue"),g=f.attr("itemname");e.focus(l,m),$("#luckysheet-icon-font-family").find(".luckysheet-toolbar-menu-button-caption").html(" "+g+" ");let y=xe.deepCopyFlowData(h.flowdata);e.updateFormat(y,"ff",m)})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-text-color").mousedown(function(t){Cr(t),t.stopPropagation()}).click(function(){let t=xe.deepCopyFlowData(h.flowdata),l=$(this).attr("color");l==null&&(l="#000000"),e.updateFormat(t,"fc",l)}),$("#luckysheet-icon-text-color-menu").mousedown(function(t){Cr(t),t.stopPropagation()}).click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let d=Q(),f=d.toolbar,m=d.button,g=d.alternatingColors,y=[{name:f.alternatingColors+"...",id:"luckysheet-color-alternate",example:""}],v=e.createButtonMenu(y),b="text-color-self",k=_e(e.coloritem,{class:"luckysheet-icon-alternateformat",name:f.alternatingColors+"..."}),w=_e(e.color,{id:t,coloritem:k,colorself:b,sub:"",resetColor:f.resetColor});$("body").append(w),l=$("#"+t),$("#"+t).find(".luckysheet-color-selected").spectrum({showPalette:!0,showPaletteOnly:!0,preferredFormat:"hex",clickoutFiresChange:!1,showInitial:!0,showInput:!0,flat:!0,hideAfterPaletteSelect:!0,showSelectionPalette:!0,maxPaletteSize:8,maxSelectionSize:8,cancelText:m.cancel,chooseText:m.confirm,togglePaletteMoreText:f.customColor,togglePaletteLessText:f.collapse,togglePaletteOnly:!0,clearText:f.clearText,color:fe.defaultTextColor,noColorSelectedText:f.noColorSelectedText,localStorageKey:"spectrum.textcolor"+ne.gridKey,palette:[["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]],change:function(x){let C=$(this);x!=null?x=x.toHexString():x="#000";let S=null;$("#luckysheet-icon-text-color .text-color-bar").css("background-color",x),$("#luckysheet-icon-text-color").attr("color",x);let _=xe.deepCopyFlowData(h.flowdata);e.updateFormat(_,"fc",x),l.hide(),rt()}}),l.find(".luckysheet-color-reset").click(function(){l.hide(),rt();let x=$("#"+t).find(".luckysheet-color-selected");x.val("#000000"),$("#luckysheet-icon-text-color").attr("color",null),x.spectrum("set","#000000"),$("#luckysheet-icon-text-color .luckysheet-color-menu-button-indicator").css("border-bottom-color","#000000");let C=xe.deepCopyFlowData(h.flowdata);e.updateFormat(C,"fc",null)}),l.find(".luckysheet-icon-alternateformat").click(function(){if(l.hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(g.errorInfo):U.info(g.errorInfo,"");return}let x=$.extend(!0,{},h.luckysheet_select_save[0]);el.rangeIsExists(x)[0]||(el.modelfocusIndex=0,el.new(x)),el.init(),el.perfect()})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a);let u=$(this).offset().top+26;setTimeout(function(){let d=$("#"+t).find(".luckysheet-color-selected");d.spectrum("set",d.val()),ml(l,s-28,u,"lefttop")},1)}),$("#luckysheet-icon-cell-color").click(function(){let t=xe.deepCopyFlowData(h.flowdata),l=$(this).attr("color");l==null&&(l="#ffffff"),e.updateFormat(t,"bg",l)}),$("#luckysheet-icon-cell-color-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let d="cell-color-self",f=Q(),m=f.toolbar,g=f.button,y=f.alternatingColors,v=_e(e.coloritem,{class:"luckysheet-icon-alternateformat",name:m.alternatingColors+"..."}),b=_e(e.color,{id:t,coloritem:v,colorself:d,sub:"",resetColor:m.resetColor});$("body").append(b),l=$("#"+t),$("#"+t).find(".luckysheet-color-selected").spectrum({showPalette:!0,showPaletteOnly:!0,preferredFormat:"hex",clickoutFiresChange:!1,showInitial:!0,showInput:!0,flat:!0,hideAfterPaletteSelect:!0,showSelectionPalette:!0,maxPaletteSize:8,maxSelectionSize:8,color:fe.defaultCellColor,cancelText:g.cancel,chooseText:g.confirm,togglePaletteMoreText:m.customColor,togglePaletteLessText:m.collapse,togglePaletteOnly:!0,clearText:m.clearText,noColorSelectedText:m.noColorSelectedText,localStorageKey:"spectrum.bgcolor"+ne.gridKey,palette:[["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]],change:function(k){let w=$(this);k!=null?k=k.toHexString():k="#fff";let x=null;$("#luckysheet-icon-cell-color .text-color-bar").css("background-color",k),$("#luckysheet-icon-cell-color").attr("color",k);let C=xe.deepCopyFlowData(h.flowdata);e.updateFormat(C,"bg",k),l.hide(),rt()}}),l.find(".luckysheet-color-reset").click(function(){l.hide(),rt();let k=$("#"+t).find(".luckysheet-color-selected");k.val("#ffffff"),$("#luckysheet-icon-cell-color").attr("color",null),k.spectrum("set","#ffffff"),$("#luckysheet-icon-cell-color .luckysheet-color-menu-button-indicator").css("border-bottom-color","#ffffff");let w=xe.deepCopyFlowData(h.flowdata);e.updateFormat(w,"bg",null)}),l.find(".luckysheet-icon-alternateformat").click(function(){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}if(l.hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(y.errorInfo):U.info(y.errorInfo,"");return}let k=$.extend(!0,{},h.luckysheet_select_save[0]);el.rangeIsExists(k)[0]||(el.modelfocusIndex=0,el.new(k)),el.init(),el.perfect()}),$("#"+t).find(".luckysheet-color-selected").val("#fff")}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a);let u=$(this).offset().top+26;setTimeout(function(){let d=$("#"+t).find(".luckysheet-color-selected");d.spectrum("set",d.val()),ml(l,s-28,u,"lefttop")},1)});let n=null;$("#luckysheet-icon-font-size").mousedown(function(t){if(parseInt($("#luckysheet-input-box").css("top"))>0){let l=window.getSelection();if(l.type!="None"){let a=l.getRangeAt(0);a.collapsed||(h.inlineStringEditRange=a.cloneRange())}}Cr(t),t.stopPropagation()}).click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let d=[{text:"9",value:"9",example:""},{text:"10",value:"10",example:""},{text:"11",value:"11",example:""},{text:"12",value:"12",example:""},{text:"14",value:"14",example:""},{text:"16",value:"16",example:""},{text:"18",value:"18",example:""},{text:"20",value:"20",example:""},{text:"22",value:"22",example:""},{text:"24",value:"24",example:""},{text:"26",value:"26",example:""},{text:"28",value:"28",example:""},{text:"36",value:"36",example:""},{text:"48",value:"48",example:""},{text:"72",value:"72",example:""}],f=e.createButtonMenu(d),m=_e(e.menu,{id:"font-size",item:f,subclass:"",sub:""});$("body").append(m),l=$("#"+t).width(150),e.focus(l,10),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let g=$(this),y=g.attr("itemvalue"),v=$("#luckysheet-icon-font-size input");$("#luckysheet-icon-font-size").attr("itemvalue",y),e.focus(l,y),v.val(y);let b=xe.deepCopyFlowData(h.flowdata);e.updateFormat(b,"fs",y),clearTimeout(n)})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$("#luckysheet-icon-font-size").attr("itemvalue");s==null&&(s=10),e.focus(l,s);let u=$(this).offset().left;o>a&&o+u>$("#"+h.container).width()&&(u=u-o+a),ml(l,u,$(this).offset().top+25,"lefttop")}).find("input.luckysheet-toolbar-textinput").keydown(function(t){Cr(t),t.stopPropagation()}).keyup(function(t){if(t.keyCode!=13)return;let l=$(this),a=parseInt(l.val()),o=$("#luckysheet-icon-font-size-menuButton");e.focus(o,a);let s=xe.deepCopyFlowData(h.flowdata);e.updateFormat(s,"fs",a),n=setTimeout(function(){o.hide(),l.blur()},200)}),$("#luckysheet-icon-border-all").click(function(){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}if(!Rr(h.currentSheetIndex))return;let t=xe.deepCopyFlowData(h.flowdata),l=$(this).attr("type");l==null&&(l="border-all");let a="luckysheet-icon-borderColor-menuButton",o=$("#"+a).find(".luckysheet-color-selected").val(),s=$("#luckysheetborderSizepreview").attr("itemvalue");(o==null||o=="")&&(o="#000"),(s==null||s=="")&&(s="1");let u=$.extend(!0,{},h.config);u.borderInfo==null&&(u.borderInfo=[]);let d={rangeType:"range",borderType:l,color:o,style:s,range:$.extend(!0,[],h.luckysheet_select_save)};if(u.borderInfo.push(d),h.clearjfundo){h.jfundo.length=0;let f=[];f.type="borderChange",f.config=$.extend(!0,{},h.config),f.curconfig=$.extend(!0,{},u),f.sheetIndex=h.currentSheetIndex,h.jfredo.push(f)}ne.saveParam("cg",h.currentSheetIndex,u.borderInfo,{k:"borderInfo"}),h.config=u,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,setTimeout(function(){Be()},1)}),$("#luckysheet-icon-border-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let u=10,d=120,f=Q(),m=f.border,g=f.toolbar,y=f.button,v=[{text:m.borderTop,value:"border-top",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-top iconfont luckysheet-iconfont-shangbiankuang" style="user-select: none;"> </div> </div>'},{text:m.borderBottom,value:"border-bottom",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-bottom iconfont luckysheet-iconfont-xiabiankuang" style="user-select: none;"> </div> </div>'},{text:m.borderLeft,value:"border-left",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-left iconfont luckysheet-iconfont-zuobiankuang" style="user-select: none;"> </div> </div>'},{text:m.borderRight,value:"border-right",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-right iconfont luckysheet-iconfont-youbiankuang" style="user-select: none;"> </div> </div>'},{text:"",value:"split",example:""},{text:m.borderNone,value:"border-none",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-none iconfont luckysheet-iconfont-wubiankuang" style="user-select: none;"> </div> </div>'},{text:m.borderAll,value:"border-all",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-all iconfont luckysheet-iconfont-quanjiabiankuang" style="user-select: none;"> </div> </div>'},{text:m.borderOutside,value:"border-outside",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-outside iconfont luckysheet-iconfont-sizhoujiabiankuang" style="user-select: none;"> </div> </div>'},{text:"",value:"split",example:""},{text:m.borderInside,value:"border-inside",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-inside iconfont luckysheet-iconfont-neikuangxian" style="user-select: none;"> </div> </div>'},{text:m.borderHorizontal,value:"border-horizontal",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-horizontal iconfont luckysheet-iconfont-neikuanghengxian" style="user-select: none;"> </div> </div>'},{text:m.borderVertical,value:"border-vertical",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-vertical iconfont luckysheet-iconfont-neikuangshuxian" style="user-select: none;"> </div> </div>'},{text:"",value:"split",example:""},{text:"<span id='luckysheet-icon-borderColor-linecolor' class='luckysheet-mousedown-cancel' style='border-bottom:3px solid #000;'>"+m.borderColor+"</span>",value:"borderColor",example:"more"},{text:""+m.borderSize+"<img id='luckysheetborderSizepreview' width=100 height=10 src='data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==' style='position:absolute;bottom:-5px;right:0px;width:100px;height:10px;'>",value:"borderSize",example:"more"}],b=Jr.border,k=e.createButtonMenu(v),w=_e(e.menu,{id:"border-menu",item:k,subclass:"",sub:""}),x=[{text:m.borderNone,value:"0",example:""},{text:"<canvas type='Thin' class='border-Thin' width="+d+" height="+u+" style='width:"+d+"px;height:"+u+"px;position:static;'></canvas>",value:"1",example:""},{text:"<canvas type='Hair' class='border-Hair' width="+d+" height="+u+" style='width:"+d+"px;height:"+u+"px;position:static;'></canvas>",value:"2",example:""},{text:"<canvas type='Dotted' class='border-Dotted' width="+d+" height="+u+" style='width:"+d+"px;height:"+u+"px;position:static;'></canvas>",value:"3",example:""},{text:"<canvas type='Dashed' class='border-Dashed' width="+d+" height="+u+" style='width:"+d+"px;height:"+u+"px;position:static;'></canvas>",value:"4",example:""},{text:"<canvas type='DashDot' class='border-DashDot' width="+d+" height="+u+" style='width:"+d+"px;height:"+u+"px;position:static;'></canvas>",value:"5",example:""},{text:"<canvas type='DashDotDot' class='border-DashDotDot' width="+d+" height="+u+" style='width:"+d+"px;height:"+u+"px;position:static;'></canvas>",value:"6",example:""},{text:"<canvas type='Medium' class='border-Medium' width="+d+" height="+u+" style='width:"+d+"px;height:"+u+"px;position:static;'></canvas>",value:"8",example:""},{text:"<canvas type='MediumDashed' class='border-MediumDashed' width="+d+" height="+u+" style='width:"+d+"px;height:"+u+"px;position:static;'></canvas>",value:"9",example:""},{text:"<canvas type='MediumDashDot' class='border-MediumDashDot' width="+d+" height="+u+" style='width:"+d+"px;height:"+u+"px;position:static;'></canvas>",value:"10",example:""},{text:"<canvas type='MediumDashDotDot' class='border-MediumDashDotDot' width="+d+" height="+u+" style='width:"+d+"px;height:"+u+"px;position:static;'></canvas>",value:"11",example:""},{text:"<canvas type='Thick' class='border-Thick' width="+d+" height="+u+" style='width:"+d+"px;height:"+u+"px;position:static;'></canvas>",value:"13",example:""}],C=e.createButtonMenu(x),S=_e(e.menu,{id:"borderSize",item:C,subclass:"luckysheet-menuButton-sub"}),_="luckysheet-icon-borderSize-menuButton",T="luckysheet-icon-borderColor-menuButton",A=_e(e.color,{id:T,coloritem:"",colorself:"",sub:"luckysheet-menuButton-sub",resetColor:g.resetColor});$("body").append(w+A+S),l=$("#"+t).width(170),e.focus(l,"border-all"),$("#"+_+" canvas").each(function(R){let I=$(this).attr("type"),F=$(this).closest(".luckysheet-cols-menuitem").attr("itemvalue"),z=$(this).addClass("luckysheet-mousedown-cancel").get(0).getContext("2d");z.translate(.5,.5),e.setLineDash(z,F,"h",0,5,100,5),z.strokeStyle="#000000",z.stroke(),z.closePath()}),$("#"+_+" .luckysheet-cols-menuitem").click(function(){$("#"+_).hide();let R=$(this),I=R.attr("itemvalue");if(I==0)$("#luckysheetborderSizepreview").attr("src","data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==").attr("itemvalue",null);else{let F=R.find("canvas").get(0).toDataURL("image/png");$("#luckysheetborderSizepreview").attr("src",F).attr("itemvalue",I)}e.focus($("#"+_),I)}),l.find(".luckysheet-cols-menuitem").click(function(){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}l.hide(),rt();let R=$(this),I=R.attr("itemvalue");if(I=="borderColor"||I=="borderSize"||!Rr(h.currentSheetIndex))return;let F=xe.deepCopyFlowData(h.flowdata),z=$("#"+T).find(".luckysheet-color-selected").val(),M=$("#luckysheetborderSizepreview").attr("itemvalue");(z==null||z=="")&&(z="#000"),(M==null||M=="")&&(M="1");let E=$.extend(!0,{},h.config);E.borderInfo==null&&(E.borderInfo=[]);let N={rangeType:"range",borderType:I,color:z,style:M,range:$.extend(!0,[],h.luckysheet_select_save)};if(E.borderInfo.push(N),h.clearjfundo){h.jfundo.length=0;let O=[];O.type="borderChange",O.config=$.extend(!0,{},h.config),O.curconfig=$.extend(!0,{},E),O.sheetIndex=h.currentSheetIndex,h.jfredo.push(O)}ne.saveParam("cg",h.currentSheetIndex,E.borderInfo,{k:"borderInfo"}),h.config=E,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,setTimeout(function(){Be()},1),$("#luckysheet-icon-border-all").attr("type",I),$("#luckysheet-icon-border-all").find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-"+I+b[I]),e.focus(l,I)}),$("#"+T).find(".luckysheet-color-selected").spectrum({showPalette:!0,showPaletteOnly:!0,preferredFormat:"hex",clickoutFiresChange:!1,showInitial:!0,showInput:!0,flat:!0,hideAfterPaletteSelect:!0,showSelectionPalette:!0,maxPaletteSize:8,maxSelectionSize:8,color:"#000",cancelText:y.cancel,chooseText:y.confirm,togglePaletteMoreText:g.customColor,togglePaletteLessText:g.collapse,togglePaletteOnly:!0,clearText:g.clearText,noColorSelectedText:g.noColorSelectedText,localStorageKey:"spectrum.bordercolor"+ne.gridKey,palette:[["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]],change:function(R){let I=$(this);R!=null?R=R.toHexString():R="#000";let F=null;$("#luckysheet-icon-borderColor-linecolor").css("border-bottom-color",R),$("#"+T).find(".luckysheet-color-selected").val(R)}}),$("#"+T).find(".luckysheet-color-reset").click(function(){let R=$("#"+T).find(".luckysheet-color-selected");R.val("#000"),$("#luckysheet-icon-cell-color").attr("color",null),R.spectrum("set","#000"),$("#luckysheet-icon-borderColor-linecolor").css("border-bottom-color","#000")})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s-28,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-merge-button").click(function(){let l=Q().merge;if(!jr(h.currentSheetIndex))return;if(Yr()){de()?alert(l.overlappingError):U.info(l.overlappingError,"");return}if(h.config.merge!=null){let o=!1;for(let s=0;s<h.luckysheet_select_save.length;s++){let u=h.luckysheet_select_save[s].row[0],d=h.luckysheet_select_save[s].row[1],f=h.luckysheet_select_save[s].column[0],m=h.luckysheet_select_save[s].column[1];if(o=Mt(h.config,u,d,f,m),o)break}if(o){de()?alert(l.partiallyError):U.info(l.partiallyError,"");return}}let a=xe.deepCopyFlowData(h.flowdata);e.updateFormat_mc(a,"mergeAll")}),$("#luckysheet-icon-merge-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let d=Q().merge,f=[{text:d.mergeAll,value:"mergeAll",example:""},{text:d.mergeV,value:"mergeV",example:""},{text:d.mergeH,value:"mergeH",example:""},{text:d.mergeCancel,value:"mergeCancel",example:""}],m=e.createButtonMenu(f),g=_e(e.menu,{id:"merge-menu",item:m,subclass:"",sub:""});$("body").append(g),l=$("#"+t),e.focus(l),l.find(".luckysheet-cols-menuitem").click(function(){if(l.hide(),rt(),Yr()){de()?alert(d.overlappingError):U.info(d.overlappingError,"");return}if(h.config.merge!=null){let k=!1;for(let w=0;w<h.luckysheet_select_save.length;w++){let x=h.luckysheet_select_save[w].row[0],C=h.luckysheet_select_save[w].row[1],S=h.luckysheet_select_save[w].column[0],_=h.luckysheet_select_save[w].column[1];if(k=Mt(h.config,x,C,S,_),k)break}if(k){de()?alert(d.partiallyError):U.info(d.partiallyError,"");return}}let y=$(this),v=y.attr("itemvalue");e.focus(l,v);let b=xe.deepCopyFlowData(h.flowdata);e.updateFormat_mc(b,v)})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s-28,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-align").click(function(){let t=$("#luckysheet-icon-align").attr("type");t==null&&(t="left");let l=xe.deepCopyFlowData(h.flowdata);e.updateFormat(l,"ht",t)}),$("#luckysheet-icon-align-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let d=Q().align,f=[{text:d.left,value:"left",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-align-left iconfont luckysheet-iconfont-wenbenzuoduiqi" style="user-select: none;"> </div> </div>'},{text:d.center,value:"center",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-align-center iconfont luckysheet-iconfont-wenbenjuzhongduiqi" style="user-select: none;"> </div> </div>'},{text:d.right,value:"right",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-align-right iconfont luckysheet-iconfont-wenbenyouduiqi" style="user-select: none;"> </div> </div>'}],m=Jr.align,g=e.createButtonMenu(f),y=_e(e.menu,{id:"align-menu",item:g,subclass:"",sub:""});$("body").append(y),l=$("#"+t).width(120),e.focus(l),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let v=$(this),b=v.attr("itemvalue");e.focus(l,b),$("#luckysheet-icon-align").attr("type",b).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-align-"+b+m[b]);let w=xe.deepCopyFlowData(h.flowdata);e.updateFormat(w,"ht",b)})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s-28,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-valign").click(function(){let t=$("#luckysheet-icon-valign").attr("type");t==null&&(t="bottom");let l=xe.deepCopyFlowData(h.flowdata);e.updateFormat(l,"vt",t)}),$("#luckysheet-icon-valign-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t),o=Q().align;if(l.length==0){let f=[{text:o.top,value:"top",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-valign-top iconfont luckysheet-iconfont-dingbuduiqi" style="user-select: none;"> </div> </div>'},{text:o.middle,value:"middle",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-valign-middle iconfont luckysheet-iconfont-shuipingduiqi" style="user-select: none;"> </div> </div>'},{text:o.bottom,value:"bottom",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-valign-bottom iconfont luckysheet-iconfont-dibuduiqi" style="user-select: none;"> </div> </div>'}],m=Jr.align,g=e.createButtonMenu(f),y=_e(e.menu,{id:"valign-menu",item:g,subclass:"",sub:""});$("body").append(y),l=$("#"+t).width(120),e.focus(l,"bottom"),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let v=$(this),b=v.attr("itemvalue");e.focus(l,b),$("#luckysheet-icon-valign").attr("type",b).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-valign-"+b+m[b]);let w=xe.deepCopyFlowData(h.flowdata);e.updateFormat(w,"vt",b)})}let s=$(this).outerWidth(),u=l.outerWidth(),d=$(this).offset().left;u>s&&u+d>$("#"+h.container).width()&&(d=d-u+s),ml(l,d-28,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-textwrap-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let d=Q().textWrap,f=[{text:d.overflow,value:"overflow",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-textwrap-overflow iconfont luckysheet-iconfont-yichu1" style="user-select: none;"> </div> </div>'},{text:d.wrap,value:"wrap",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-textwrap-wrap iconfont luckysheet-iconfont-zidonghuanhang" style="user-select: none;"> </div> </div>'},{text:d.clip,value:"clip",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-textwrap-clip iconfont luckysheet-iconfont-jieduan" style="user-select: none;"> </div> </div>'}],m=Jr.textWrap,g=e.createButtonMenu(f),y=_e(e.menu,{id:"textwrap-menu",item:g,subclass:"",sub:""});$("body").append(y),l=$("#"+t).width(120),e.focus(l,"clip"),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let v=$(this),b=v.attr("itemvalue");e.focus(l,b),$("#luckysheet-icon-textwrap").attr("type",b).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-textwrap-"+b+m[b]);let w=xe.deepCopyFlowData(h.flowdata);e.updateFormat(w,"tb",b)})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s-28,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-rotation-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let d=Q().rotation,f=[{text:d.none,value:"none",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-none iconfont luckysheet-iconfont-wuxuanzhuang" style="user-select: none;"> </div> </div>'},{text:d.angleup,value:"angleup",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-angleup iconfont luckysheet-iconfont-xiangshangqingxie" style="user-select: none;"> </div> </div>'},{text:d.angledown,value:"angledown",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-angledown iconfont luckysheet-iconfont-xiangxiaqingxie" style="user-select: none;"> </div> </div>'},{text:d.vertical,value:"vertical",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-vertical iconfont luckysheet-iconfont-shupaiwenzi" style="user-select: none;"> </div> </div>'},{text:d.rotationUp,value:"rotation-up",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-rotation-up iconfont luckysheet-iconfont-wenbenxiangshang" style="user-select: none;"> </div> </div>'},{text:d.rotationDown,value:"rotation-down",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-rotation-down iconfont luckysheet-iconfont-xiangxia90" style="user-select: none;"> </div> </div>'}],m=Jr.rotation,g=e.createButtonMenu(f),y=_e(e.menu,{id:"rotation-menu",item:g,subclass:"",sub:""});$("body").append(y),l=$("#"+t).width(160),e.focus(l),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let v=$(this),b=v.attr("itemvalue");e.focus(l,b),$("#luckysheet-icon-rotation").attr("type",b).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-"+b+m[b]);let w=xe.deepCopyFlowData(h.flowdata);e.updateFormat(w,"tr",b)})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s-28,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-freezen-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let d=Q().freezen,f=[{text:d.freezenRow,value:"freezenRow",example:""},{text:d.freezenColumn,value:"freezenColumn",example:""},{text:d.freezenRC,value:"freezenRC",example:""},{text:"",value:"split",example:""},{text:d.freezenRowRange,value:"freezenRowRange",example:""},{text:d.freezenColumnRange,value:"freezenColumnRange",example:""},{text:d.freezenRCRange,value:"freezenRCRange",example:""},{text:"",value:"split",example:""},{text:d.freezenCancel,value:"freezenCancel",example:""}],m=e.createButtonMenu(f),g=_e(e.menu,{id:"freezen-menu",item:m,subclass:"",sub:""});$("body").append(g),l=$("#"+t).width(170),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let y=$(this),v=y.attr("itemvalue");if(e.focus(l,v),v==="freezenCancel"&&l.find(".fa.fa-check").remove(),Y.saveFrozen(v),v=="freezenRow")Vo();else if(v=="freezenColumn")qo();else if(v=="freezenRC"){if(Y.freezenRealFirstRowColumn){let b=0,k=h.visibledatarow[b]-2+h.columnHeaderHeight,w=[h.visibledatarow[b],b+1,0,Y.cutVolumn(h.visibledatarow,b+1),k];Y.saveFreezen(w,k,null,null),Y.createFreezenHorizontal(w,k);let x=0,C=h.visibledatacolumn[x]-2+h.rowHeaderWidth,S=[h.visibledatacolumn[x],x+1,0,Y.cutVolumn(h.visibledatacolumn,x+1),C];Y.saveFreezen(null,null,S,C),Y.createFreezenVertical(S,C)}else{let b=$("#luckysheet-cell-main").scrollTop(),k=st(h.visibledatarow,b);k==-1&&(k=0);let w=h.visibledatarow[k]-2-b+h.columnHeaderHeight,x=[h.visibledatarow[k],k+1,b,Y.cutVolumn(h.visibledatarow,k+1),w];Y.saveFreezen(x,w,null,null),Y.createFreezenHorizontal(x,w);let C=$("#luckysheet-cell-main").scrollLeft(),S=st(h.visibledatacolumn,C);S==-1&&(S=0);let _=h.visibledatacolumn[S]-2-C+h.rowHeaderWidth,T=[h.visibledatacolumn[S],S+1,C,Y.cutVolumn(h.visibledatacolumn,S+1),_];Y.saveFreezen(null,null,T,_),Y.createFreezenVertical(T,_)}Y.createAssistCanvas(),Be()}else if(v=="freezenRowRange"){if(h.luckysheet_select_save==null||h.luckysheet_select_save.length==0){de()?alert(d.noSeletionError):U.info(d.noSeletionError,"");return}let b=h.luckysheet_select_save[h.luckysheet_select_save.length-1].top;if(Y.freezenRealFirstRowColumn&&b>$("#luckysheet-cell-main").height())return U.info(d.rangeRCOverErrorTitle,d.rangeRCOverError);let k=$("#luckysheet-cell-main").scrollTop(),w=st(h.visibledatarow,k),x=h.luckysheet_select_save[h.luckysheet_select_save.length-1],C=x.row_focus==null?x.row[0]:x.row_focus;w=Math.max(w-1,C-1,0);let S,_;Y.freezenRealFirstRowColumn?(S=h.visibledatarow[w]-2+h.columnHeaderHeight,_=[h.visibledatarow[w],w+1,0,Y.cutVolumn(h.visibledatarow,w+1),S]):(S=h.visibledatarow[w]-2-k+h.columnHeaderHeight,_=[h.visibledatarow[w],w+1,k,Y.cutVolumn(h.visibledatarow,w+1),S]),Y.saveFreezen(_,S,null,null),Y.freezenverticaldata!=null&&(Y.cancelFreezenVertical(),Y.createAssistCanvas(),Be()),Y.createFreezenHorizontal(_,S),Y.createAssistCanvas(),Be()}else if(v=="freezenColumnRange"){if(h.luckysheet_select_save==null||h.luckysheet_select_save.length==0){de()?alert(d.noSeletionError):U.info(d.noSeletionError,"");return}let b=h.luckysheet_select_save[h.luckysheet_select_save.length-1].left;if(Y.freezenRealFirstRowColumn&&b>$("#luckysheet-cell-main").width())return U.info(d.rangeRCOverErrorTitle,d.rangeRCOverError);let k=$("#luckysheet-cell-main").scrollLeft(),w=st(h.visibledatacolumn,k),x=h.luckysheet_select_save[h.luckysheet_select_save.length-1],C=x.column_focus==null?x.column[0]:x.column_focus;w=Math.max(w-1,C-1,0);let S,_;Y.freezenRealFirstRowColumn?(S=h.visibledatacolumn[w]-2+h.rowHeaderWidth,_=[h.visibledatacolumn[w],w+1,0,Y.cutVolumn(h.visibledatacolumn,w+1),S]):(S=h.visibledatacolumn[w]-2-k+h.rowHeaderWidth,_=[h.visibledatacolumn[w],w+1,k,Y.cutVolumn(h.visibledatacolumn,w+1),S]),Y.saveFreezen(null,null,_,S),Y.freezenhorizontaldata!=null&&(Y.cancelFreezenHorizontal(),Y.createAssistCanvas(),Be()),Y.createFreezenVertical(_,S),Y.createAssistCanvas(),Be()}else if(v=="freezenRCRange"){if(h.luckysheet_select_save==null||h.luckysheet_select_save.length==0){de()?alert(d.noSeletionError):U.info(d.noSeletionError,"");return}let b=h.luckysheet_select_save[h.luckysheet_select_save.length-1].top,k=h.luckysheet_select_save[h.luckysheet_select_save.length-1].left;if(Y.freezenRealFirstRowColumn&&(b>$("#luckysheet-cell-main").height()||k>$("#luckysheet-cell-main").width()))return U.info(d.rangeRCOverErrorTitle,d.rangeRCOverError);let w=$("#luckysheet-cell-main").scrollTop(),x=st(h.visibledatarow,w),C=h.luckysheet_select_save[h.luckysheet_select_save.length-1],S=C.row_focus==null?C.row[0]:C.row_focus;x=Math.max(x-1,S-1,0);let _,T;Y.freezenRealFirstRowColumn?(_=h.visibledatarow[x]-2+h.columnHeaderHeight,T=[h.visibledatarow[x],x+1,0,Y.cutVolumn(h.visibledatarow,x+1),_],Y.saveFreezen(T,_,null,null)):(_=h.visibledatarow[x]-2-w+h.columnHeaderHeight,T=[h.visibledatarow[x],x+1,w,Y.cutVolumn(h.visibledatarow,x+1),_],Y.saveFreezen(T,_,null,null)),Y.createFreezenHorizontal(T,_);let A=$("#luckysheet-cell-main").scrollLeft(),R=st(h.visibledatacolumn,A),I=C.column_focus==null?C.column[0]:C.column_focus;R=Math.max(R-1,I-1,0);let F,z;Y.freezenRealFirstRowColumn?(F=h.visibledatacolumn[R]-2+h.rowHeaderWidth,z=[h.visibledatacolumn[R],R+1,0,Y.cutVolumn(h.visibledatacolumn,R+1),F]):(F=h.visibledatacolumn[R]-2-A+h.rowHeaderWidth,z=[h.visibledatacolumn[R],R+1,A,Y.cutVolumn(h.visibledatacolumn,R+1),F]),Y.saveFreezen(null,null,z,F),Y.createFreezenVertical(z,F),Y.createAssistCanvas(),Be()}else v=="freezenCancel"&&(Y.freezenverticaldata!=null&&(Y.cancelFreezenVertical(),Y.createAssistCanvas(),Be()),Y.freezenhorizontaldata!=null&&(Y.cancelFreezenHorizontal(),Y.createAssistCanvas(),Be()),Y.scrollAdapt());setTimeout(function(){zt()},0)})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s-68,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-autofilter").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let u=Q(),d=u.sort,f=u.filter,m=[{text:d.asc,value:"asc",example:'<i class="iconfont luckysheet-iconfont-shengxu" aria-hidden="true"></i>'},{text:d.desc,value:"desc",example:'<i class="iconfont luckysheet-iconfont-jiangxu" aria-hidden="true"></i>'},{text:d.custom+"...",value:"diysort",example:'<i class="iconfont luckysheet-iconfont-zidingyipaixu" aria-hidden="true"></i>'},{text:"",value:"split",example:""},{text:f.filter,value:"filter",example:'<i class="iconfont luckysheet-iconfont-shaixuan2" aria-hidden="true"></i>'},{text:f.clearFilter,value:"clearfilter",example:'<i class="iconfont luckysheet-iconfont-qingchushaixuan" aria-hidden="true"></i>'}],g=e.createButtonMenu(m),y=_e(e.menu,{id:"autofilter",item:g,subclass:"",sub:""});$("body").append(y),l=$("#"+t).width(150),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let v=$(this),b=v.attr("itemvalue");b=="diysort"?$("#luckysheetorderby").click():b=="asc"?nc(!0):b=="desc"?nc(!1):b=="filter"?$("#luckysheet-filter-options-sheet"+h.currentSheetIndex).length>0?$("#luckysheet-filter-initial").click():Ri():b=="clearfilter"&&$("#luckysheet-filter-initial").click()})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-seachmore").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t),o=Q().findAndReplace;if(l.length==0){let f=[{text:o.find+" ...",value:"search",example:'<i class="iconfont luckysheet-iconfont-sousuo" aria-hidden="true"></i>'},{text:o.replace+" ...",value:"replace",example:'<i class="iconfont luckysheet-iconfont-tihuan" aria-hidden="true"></i>'},{text:"",value:"split",example:""},{text:o.location+" ...",value:"location",example:'<i class="iconfont luckysheet-iconfont-dingwei" aria-hidden="true"></i>'},{text:o.formula,value:"locationFormula",example:o.locationExample},{text:o.date,value:"locationConstantDate",example:o.locationExample},{text:o.number,value:"locationConstantNumber",example:o.locationExample},{text:o.string,value:"locationConstantString",example:o.locationExample},{text:o.error,value:"locationConstantError",example:o.locationExample},{text:o.condition,value:"locationCF",example:o.locationExample},{text:o.rowSpan,value:"locationStepRow",example:o.locationExample},{text:o.columnSpan,value:"locationStepColumn",example:o.locationExample}],m=e.createButtonMenu(f),g=_e(e.menu,{id:"seachmore",item:m,subclass:"",sub:""});$("body").append(g),l=$("#"+t).width(180),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let y=$(this),v=y.attr("itemvalue");if(v=="search"||v=="replace")v=="search"?$n.createDialog(0):v=="replace"&&$n.createDialog(1),$n.init(),$("#luckysheet-search-replace #searchInput input").focus();else if(v=="location")Xr.createDialog(),Xr.init();else if(v=="locationFormula"||v=="locationConstantDate"||v=="locationConstantNumber"||v=="locationConstantString"||v=="locationConstantError"||v=="locationCF"){let b=h.luckysheet_select_save[0],k;h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&b.row[0]==b.row[1]&&b.column[0]==b.column[1]?k=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1]}]:k=$.extend(!0,[],h.luckysheet_select_save),v=="locationFormula"?Xr.apply(k,"locationFormula","all"):v=="locationConstantDate"?Xr.apply(k,"locationConstant","d"):v=="locationConstantNumber"?Xr.apply(k,"locationConstant","n"):v=="locationConstantString"?Xr.apply(k,"locationConstant","s,g"):v=="locationConstantError"?Xr.apply(k,"locationConstant","e"):v=="locationCF"&&Xr.apply(k,"locationCF")}else if(v=="locationStepRow"){if(h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]){de()?alert(o.lessTwoRowTip):U.info("",o.lessTwoRowTip);return}let b=$.extend(!0,[],h.luckysheet_select_save);Xr.apply(b,"locationStepRow")}else if(v=="locationStepColumn"){if(h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]){de()?alert(o.lessTwoColumnTip):U.info("",o.lessTwoColumnTip);return}let b=$.extend(!0,[],h.luckysheet_select_save);Xr.apply(b,"locationStepColumn")}})}let s=$(this).outerWidth(),u=l.outerWidth(),d=$(this).offset().left;u>s&&u+d>$("#"+h.container).width()&&(d=d-u+s),ml(l,d,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-function").click(function(){e.autoSelectionFormula("SUM")}),$("#luckysheet-icon-function-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t),o=Q().formula;if(l.length==0){let f=[{text:o.sum,value:"SUM",example:"SUM"},{text:o.average,value:"AVERAGE",example:"AVERAGE"},{text:o.count,value:"COUNT",example:"COUNT"},{text:o.max,value:"MAX",example:"MAX"},{text:o.min,value:"MIN",example:"MIN"},{text:"",value:"split",example:""},{text:o.ifGenerate,value:"if",example:"IF"},{text:o.find+" ...",value:"formula",example:""}],m=e.createButtonMenu(f),g=_e(e.menu,{id:"function-menu",item:m,subclass:"",sub:""});$("body").append(g),l=$("#"+t).width(180),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let y=$(this),v=y.attr("itemvalue");if(v=="if"){let b=h.luckysheet_select_save[h.luckysheet_select_save.length-1],k=b.row_focus==null?b.row[0]:b.row_focus,w=b.column_focus==null?b.column[0]:b.column_focus;if(!!h.flowdata[k]&&!!h.flowdata[k][w]&&!!h.flowdata[k][w].f){let x=h.flowdata[k][w].f.toString();if(x.indexOf("=if(")!=-1)ri.ifFormulaDialog(x);else{de()?alert(o.tipNotBelongToIf):U.info(o.tipNotBelongToIf,"");return}}else ri.ifFormulaDialog();ri.init()}else if(v=="formula"){if(h.luckysheet_select_save.length==0){de()?alert(o.tipSelectCell):U.info(o.tipSelectCell,"");return}let b=h.luckysheet_select_save[h.luckysheet_select_save.length-1],k=b.row_focus,w=b.column_focus;Rl(k,w,h.flowdata);let x=h.flowdata[k][w];if(x!=null&&x.f!=null){let C=p.getfunctionParam(x.f);C.fn!=null?hn.formulaParmDialog(C.fn,C.param):hn.formulaListDialog()}else $("#luckysheet-rich-text-editor").html('<span dir="auto" class="luckysheet-formula-text-color">=</span>'),$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()),hn.formulaListDialog();hn.init()}else e.autoSelectionFormula(v)})}let s=$(this).outerWidth(),u=l.outerWidth(),d=$(this).offset().left;u>s&&u+d>$("#"+h.container).width()&&(d=d-u+s),ml(l,d-48,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-bold").mousedown(function(t){Cr(t),t.stopPropagation()}).click(function(t){let l=xe.deepCopyFlowData(h.flowdata),o=li("bl",1)?0:1;e.updateFormat(l,"bl",o)}),$("#luckysheet-icon-italic").mousedown(function(t){Cr(t),t.stopPropagation()}).click(function(){let t=xe.deepCopyFlowData(h.flowdata),a=li("it",1)?0:1;e.updateFormat(t,"it",a)}),$("#luckysheet-icon-strikethrough").mousedown(function(t){Cr(t),t.stopPropagation()}).click(function(){let t=xe.deepCopyFlowData(h.flowdata),a=li("cl",1)?0:1;e.updateFormat(t,"cl",a)}),$("#luckysheet-icon-underline").mousedown(function(t){Cr(t),t.stopPropagation()}).click(function(){let t=xe.deepCopyFlowData(h.flowdata),a=li("un",1)?0:1;e.updateFormat(t,"un",a)}),$("#luckysheet-icon-conditionformat").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t),a=Q().conditionformat;if(l.length==0){let d=[{text:a.highlightCellRules,value:"highlightCellRule",example:"more"},{text:a.itemSelectionRules,value:"projectSelectRule",example:"more"},{text:a.dataBar,value:"dataBar",example:"more"},{text:a.colorGradation,value:"colorGradation",example:"more"},{text:a.icons,value:"icons",example:""},{text:"",value:"split",example:""},{text:a.newRule,value:"newRule",example:""},{text:a.deleteRule,value:"deleteRule",example:"more"},{text:a.manageRules,value:"administerRule",example:""}],f=e.createButtonMenu(d),m=_e(e.menu,{id:"conditionformat",item:f,subclass:"",sub:""}),g=[{text:a.greaterThan,value:"greaterThan",example:">"},{text:a.lessThan,value:"lessThan",example:"<"},{text:a.between,value:"betweenness",example:"[]"},{text:a.equal,value:"equal",example:"="},{text:a.textContains,value:"textContains",example:"()"},{text:a.occurrence,value:"occurrenceDate",example:a.yesterday},{text:a.duplicateValue,value:"duplicateValue",example:"##"}],y=e.createButtonMenu(g),v=_e(e.menu,{id:"highlightCellRule",item:y,subclass:"luckysheet-menuButton-sub"}),b=[{text:a.top10,value:"top10",example:a.top10},{text:a.top10_percent,value:"top10%",example:a.top10_percent},{text:a.last10,value:"last10",example:a.last10},{text:a.last10_percent,value:"last10%",example:a.last10_percent},{text:a.aboveAverage,value:"AboveAverage",example:a.above},{text:a.belowAverage,value:"SubAverage",example:a.below}],k=e.createButtonMenu(b),w=_e(e.menu,{id:"projectSelectRule",item:k,subclass:"luckysheet-menuButton-sub"}),x=`<div id="luckysheet-icon-dataBar-menuButton" class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-menuButton luckysheet-menuButton-sub luckysheet-mousedown-cancel" style="width: 126px;padding: 5px;top: 118.5px;left: 1321.48px;display: none;"> |
| | | `}}function te(){t.calendarContainer.classList.add("hasWeeks");var J=Xt("div","flatpickr-weekwrapper");J.appendChild(Xt("span","flatpickr-weekday",t.l10n.weekAbbreviation));var re=Xt("div","flatpickr-weeks");return J.appendChild(re),{weekWrapper:J,weekNumbers:re}}function le(J,re){re===void 0&&(re=!0);var ge=re?J:J-t.currentMonth;ge<0&&t._hidePrevMonthArrow===!0||ge>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ge,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,gt("onYearChange"),N()),E(),gt("onMonthChange"),Kr())}function oe(J,re){if(J===void 0&&(J=!0),re===void 0&&(re=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,re===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ge=Oo(t.config),we=ge.hours,Ve=ge.minutes,Qe=ge.seconds;v(we,Ve,Qe)}t.redraw(),J&>("onChange")}function se(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),gt("onClose")}function ce(){t.config!==void 0&>("onDestroy");for(var J=t._handlers.length;J--;)t._handlers[J].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var re=t.calendarContainer.parentNode;if(re.lastChild&&re.removeChild(re.lastChild),re.parentNode){for(;re.firstChild;)re.parentNode.insertBefore(re.firstChild,re);re.parentNode.removeChild(re)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(ge){try{delete t[ge]}catch(we){}})}function he(J){return t.calendarContainer.contains(J)}function ue(J){if(t.isOpen&&!t.config.inline){var re=cr(J),ge=he(re),we=re===t.input||re===t.altInput||t.element.contains(re)||J.path&&J.path.indexOf&&(~J.path.indexOf(t.input)||~J.path.indexOf(t.altInput)),Ve=!we&&!ge&&!he(J.relatedTarget),Qe=!t.config.ignoredFocusElements.some(function(Rt){return Rt.contains(re)});Ve&&Qe&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&f(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function K(J){if(!(!J||t.config.minDate&&J<t.config.minDate.getFullYear()||t.config.maxDate&&J>t.config.maxDate.getFullYear())){var re=J,ge=t.currentYear!==re;t.currentYear=re||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),ge&&(t.redraw(),gt("onYearChange"),N())}}function G(J,re){var ge;re===void 0&&(re=!0);var we=t.parseDate(J,void 0,re);if(t.config.minDate&&we&&ur(we,t.config.minDate,re!==void 0?re:!t.minDateHasTime)<0||t.config.maxDate&&we&&ur(we,t.config.maxDate,re!==void 0?re:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(we===void 0)return!1;for(var Ve=!!t.config.enable,Qe=(ge=t.config.enable)!==null&&ge!==void 0?ge:t.config.disable,Rt=0,ut=void 0;Rt<Qe.length;Rt++){if(ut=Qe[Rt],typeof ut=="function"&&ut(we))return Ve;if(ut instanceof Date&&we!==void 0&&ut.getTime()===we.getTime())return Ve;if(typeof ut=="string"){var Bt=t.parseDate(ut,void 0,!0);return Bt&&Bt.getTime()===we.getTime()?Ve:!Ve}else if(typeof ut=="object"&&we!==void 0&&ut.from&&ut.to&&we.getTime()>=ut.from.getTime()&&we.getTime()<=ut.to.getTime())return Ve}return!Ve}function ee(J){return t.daysContainer!==void 0?J.className.indexOf("hidden")===-1&&J.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(J):!1}function pe(J){var re=J.target===t._input,ge=t._input.value.trimEnd()!==Xn();re&&ge&&!(J.relatedTarget&&he(J.relatedTarget))&&t.setDate(t._input.value,!0,J.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function ae(J){var re=cr(J),ge=t.config.wrap?e.contains(re):re===t._input,we=t.config.allowInput,Ve=t.isOpen&&(!we||!ge),Qe=t.config.inline&&ge&&!we;if(J.keyCode===13&&ge){if(we)return t.setDate(t._input.value,!0,re===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),re.blur();t.open()}else if(he(re)||Ve||Qe){var Rt=!!t.timeContainer&&t.timeContainer.contains(re);switch(J.keyCode){case 13:Rt?(J.preventDefault(),f(),ot()):kt(J);break;case 27:J.preventDefault(),ot();break;case 8:case 46:ge&&!t.config.allowInput&&(J.preventDefault(),t.clear());break;case 37:case 39:if(!Rt&&!ge){J.preventDefault();var ut=o();if(t.daysContainer!==void 0&&(we===!1||ut&&ee(ut))){var Bt=J.keyCode===39?1:-1;J.ctrlKey?(J.stopPropagation(),le(Bt),z(I(1),0)):z(void 0,Bt)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:J.preventDefault();var ct=J.keyCode===40?1:-1;t.daysContainer&&re.$i!==void 0||re===t.input||re===t.altInput?J.ctrlKey?(J.stopPropagation(),K(t.currentYear-ct),z(I(1),0)):Rt||z(void 0,ct*7):re===t.currentYearElement?K(t.currentYear-ct):t.config.enableTime&&(!Rt&&t.hourElement&&t.hourElement.focus(),f(J),t._debouncedChange());break;case 9:if(Rt){var yt=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(hr){return hr}),al=yt.indexOf(re);if(al!==-1){var Zr=yt[al+(J.shiftKey?-1:1)];J.preventDefault(),(Zr||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(re)&&J.shiftKey&&(J.preventDefault(),t._input.focus());break;default:break}}if(t.amPM!==void 0&&re===t.amPM)switch(J.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],g(),Gl();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],g(),Gl();break}(ge||he(re))&>("onKeyDown",J)}function Te(J,re){if(re===void 0&&(re="flatpickr-day"),!(t.selectedDates.length!==1||J&&(!J.classList.contains(re)||J.classList.contains("flatpickr-disabled")))){for(var ge=J?J.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),we=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Ve=Math.min(ge,t.selectedDates[0].getTime()),Qe=Math.max(ge,t.selectedDates[0].getTime()),Rt=!1,ut=0,Bt=0,ct=Ve;ct<Qe;ct+=Vd.DAY)G(new Date(ct),!0)||(Rt=Rt||ct>Ve&&ct<Qe,ct<we&&(!ut||ct>ut)?ut=ct:ct>we&&(!Bt||ct<Bt)&&(Bt=ct));var yt=Array.from(t.rContainer.querySelectorAll("*:nth-child(-n+"+t.config.showMonths+") > ."+re));yt.forEach(function(al){var Zr=al.dateObj,hr=Zr.getTime(),ni=ut>0&&hr<ut||Bt>0&&hr>Bt;if(ni){al.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(ka){al.classList.remove(ka)});return}else if(Rt&&!ni)return;["startRange","inRange","endRange","notAllowed"].forEach(function(ka){al.classList.remove(ka)}),J!==void 0&&(J.classList.add(ge<=t.selectedDates[0].getTime()?"startRange":"endRange"),we<ge&&hr===we?al.classList.add("startRange"):we>ge&&hr===we&&al.classList.add("endRange"),hr>=ut&&(Bt===0||hr<=Bt)&&Bd(hr,we,ge)&&al.classList.add("inRange"))})}}function ie(){t.isOpen&&!t.config.static&&!t.config.inline&&Ne()}function Ee(J,re){if(re===void 0&&(re=t._positionElement),t.isMobile===!0){if(J){J.preventDefault();var ge=cr(J);ge&&ge.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),gt("onOpen");return}else if(t._input.disabled||t.config.inline)return;var we=t.isOpen;t.isOpen=!0,we||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),gt("onOpen"),Ne(re)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(J===void 0||!t.timeContainer.contains(J.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function je(J){return function(re){var ge=t.config["_"+J+"Date"]=t.parseDate(re,t.config.dateFormat),we=t.config["_"+(J==="min"?"max":"min")+"Date"];ge!==void 0&&(t[J==="min"?"minDateHasTime":"maxDateHasTime"]=ge.getHours()>0||ge.getMinutes()>0||ge.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Ve){return G(Ve)}),!t.selectedDates.length&&J==="min"&&y(ge),Gl()),t.daysContainer&&(It(),ge!==void 0?t.currentYearElement[J]=ge.getFullYear().toString():t.currentYearElement.removeAttribute(J),t.currentYearElement.disabled=!!we&&ge!==void 0&&we.getFullYear()===ge.getFullYear())}}function Ce(){var J=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],re=Ul(Ul({},JSON.parse(JSON.stringify(e.dataset||{}))),n),ge={};t.config.parseDate=re.parseDate,t.config.formatDate=re.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(yt){t.config._enable=ye(yt)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(yt){t.config._disable=ye(yt)}});var we=re.mode==="time";if(!re.dateFormat&&(re.enableTime||we)){var Ve=Tl.defaultConfig.dateFormat||Yn.dateFormat;ge.dateFormat=re.noCalendar||we?"H:i"+(re.enableSeconds?":S":""):Ve+" H:i"+(re.enableSeconds?":S":"")}if(re.altInput&&(re.enableTime||we)&&!re.altFormat){var Qe=Tl.defaultConfig.altFormat||Yn.altFormat;ge.altFormat=re.noCalendar||we?"h:i"+(re.enableSeconds?":S K":" K"):Qe+(" h:i"+(re.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:je("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:je("max")});var Rt=function(yt){return function(al){t.config[yt==="min"?"_minTime":"_maxTime"]=t.parseDate(al,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Rt("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Rt("max")}),re.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,ge,re);for(var ut=0;ut<J.length;ut++)t.config[J[ut]]=t.config[J[ut]]===!0||t.config[J[ut]]==="true";Fo.filter(function(yt){return t.config[yt]!==void 0}).forEach(function(yt){t.config[yt]=Po(t.config[yt]||[]).map(s)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var ut=0;ut<t.config.plugins.length;ut++){var Bt=t.config.plugins[ut](t)||{};for(var ct in Bt)Fo.indexOf(ct)>-1?t.config[ct]=Po(Bt[ct]).map(s).concat(t.config[ct]):typeof re[ct]=="undefined"&&(t.config[ct]=Bt[ct])}re.altInputClass||(t.config.altInputClass=Le().className+" "+t.config.altInputClass),gt("onParseConfig")}function Le(){return t.config.wrap?e.querySelector("[data-input]"):e}function Ge(){typeof t.config.locale!="object"&&typeof Tl.l10ns[t.config.locale]=="undefined"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=Ul(Ul({},Tl.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Tl.l10ns[t.config.locale]:void 0),Sn.D="("+t.l10n.weekdays.shorthand.join("|")+")",Sn.l="("+t.l10n.weekdays.longhand.join("|")+")",Sn.M="("+t.l10n.months.shorthand.join("|")+")",Sn.F="("+t.l10n.months.longhand.join("|")+")",Sn.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var J=Ul(Ul({},n),JSON.parse(JSON.stringify(e.dataset||{})));J.time_24hr===void 0&&Tl.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=Fc(t),t.parseDate=Lo({config:t.config,l10n:t.l10n})}function Ne(J){if(typeof t.config.position=="function")return void t.config.position(t,J);if(t.calendarContainer!==void 0){gt("onPreCalendarPosition");var re=J||t._positionElement,ge=Array.prototype.reduce.call(t.calendarContainer.children,function(dp,mp){return dp+mp.offsetHeight},0),we=t.calendarContainer.offsetWidth,Ve=t.config.position.split(" "),Qe=Ve[0],Rt=Ve.length>1?Ve[1]:null,ut=re.getBoundingClientRect(),Bt=window.innerHeight-ut.bottom,ct=Qe==="above"||Qe!=="below"&&Bt<ge&&ut.top>ge,yt=window.pageYOffset+ut.top+(ct?-ge-2:re.offsetHeight+2);if(jl(t.calendarContainer,"arrowTop",!ct),jl(t.calendarContainer,"arrowBottom",ct),!t.config.inline){var al=window.pageXOffset+ut.left,Zr=!1,hr=!1;Rt==="center"?(al-=(we-ut.width)/2,Zr=!0):Rt==="right"&&(al-=we-ut.width,hr=!0),jl(t.calendarContainer,"arrowLeft",!Zr&&!hr),jl(t.calendarContainer,"arrowCenter",Zr),jl(t.calendarContainer,"arrowRight",hr);var ni=window.document.body.offsetWidth-(window.pageXOffset+ut.right),ka=al+we>window.document.body.offsetWidth,ip=ni+we>window.document.body.offsetWidth;if(jl(t.calendarContainer,"rightMost",ka),!t.config.static)if(t.calendarContainer.style.top=yt+"px",!ka)t.calendarContainer.style.left=al+"px",t.calendarContainer.style.right="auto";else if(!ip)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=ni+"px";else{var Qo=et();if(Qo===void 0)return;var op=window.document.body.offsetWidth,sp=Math.max(0,op/2-we/2),cp=".flatpickr-calendar.centerMost:before",up=".flatpickr-calendar.centerMost:after",hp=Qo.cssRules.length,fp="{left:"+ut.left+"px;right:auto;}";jl(t.calendarContainer,"rightMost",!1),jl(t.calendarContainer,"centerMost",!0),Qo.insertRule(cp+","+up+fp,hp),t.calendarContainer.style.left=sp+"px",t.calendarContainer.style.right="auto"}}}}function et(){for(var J=null,re=0;re<document.styleSheets.length;re++){var ge=document.styleSheets[re];if(!!ge.cssRules){try{ge.cssRules}catch(we){continue}J=ge;break}}return J!=null?J:vt()}function vt(){var J=document.createElement("style");return document.head.appendChild(J),J.sheet}function It(){t.config.noCalendar||t.isMobile||(N(),Kr(),E())}function ot(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function kt(J){J.preventDefault(),J.stopPropagation();var re=function(yt){return yt.classList&&yt.classList.contains("flatpickr-day")&&!yt.classList.contains("flatpickr-disabled")&&!yt.classList.contains("notAllowed")},ge=Ac(cr(J),re);if(ge!==void 0){var we=ge,Ve=t.latestSelectedDateObj=new Date(we.dateObj.getTime()),Qe=(Ve.getMonth()<t.currentMonth||Ve.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=we,t.config.mode==="single")t.selectedDates=[Ve];else if(t.config.mode==="multiple"){var Rt=sl(Ve);Rt?t.selectedDates.splice(parseInt(Rt),1):t.selectedDates.push(Ve)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Ve,t.selectedDates.push(Ve),ur(Ve,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(yt,al){return yt.getTime()-al.getTime()}));if(g(),Qe){var ut=t.currentYear!==Ve.getFullYear();t.currentYear=Ve.getFullYear(),t.currentMonth=Ve.getMonth(),ut&&(gt("onYearChange"),N()),gt("onMonthChange")}if(Kr(),E(),Gl(),!Qe&&t.config.mode!=="range"&&t.config.showMonths===1?R(we):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Bt=t.config.mode==="single"&&!t.config.enableTime,ct=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Bt||ct)&&ot()}w()}}var qe={locale:[Ge,X],showMonths:[O,u,W],minDate:[C],maxDate:[C],positionElement:[De],clickOpens:[function(){t.config.clickOpens===!0?(k(t._input,"focus",t.open),k(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function Se(J,re){if(J!==null&&typeof J=="object"){Object.assign(t.config,J);for(var ge in J)qe[ge]!==void 0&&qe[ge].forEach(function(we){return we()})}else t.config[J]=re,qe[J]!==void 0?qe[J].forEach(function(we){return we()}):Fo.indexOf(J)>-1&&(t.config[J]=Po(re));t.redraw(),Gl(!0)}function Ke(J,re){var ge=[];if(J instanceof Array)ge=J.map(function(we){return t.parseDate(we,re)});else if(J instanceof Date||typeof J=="number")ge=[t.parseDate(J,re)];else if(typeof J=="string")switch(t.config.mode){case"single":case"time":ge=[t.parseDate(J,re)];break;case"multiple":ge=J.split(t.config.conjunction).map(function(we){return t.parseDate(we,re)});break;case"range":ge=J.split(t.l10n.rangeSeparator).map(function(we){return t.parseDate(we,re)});break;default:break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(J)));t.selectedDates=t.config.allowInvalidPreload?ge:ge.filter(function(we){return we instanceof Date&&G(we,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(we,Ve){return we.getTime()-Ve.getTime()})}function Fe(J,re,ge){if(re===void 0&&(re=!1),ge===void 0&&(ge=t.config.dateFormat),J!==0&&!J||J instanceof Array&&J.length===0)return t.clear(re);Ke(J,ge),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),C(void 0,re),y(),t.selectedDates.length===0&&t.clear(!1),Gl(re),re&>("onChange")}function ye(J){return J.slice().map(function(re){return typeof re=="string"||typeof re=="number"||re instanceof Date?t.parseDate(re,void 0,!0):re&&typeof re=="object"&&re.from&&re.to?{from:t.parseDate(re.from,void 0),to:t.parseDate(re.to,void 0)}:re}).filter(function(re){return re})}function be(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var J=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);J&&Ke(J,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function ht(){if(t.input=Le(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=Xt(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),De()}function De(){t._positionElement=t.config.positionElement||t._input}function Pe(){var J=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=Xt("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=J,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=J==="datetime-local"?"Y-m-d\\TH:i:S":J==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch(re){}k(t.mobileInput,"change",function(re){t.setDate(cr(re).value,!1,t.mobileFormatStr),gt("onChange"),gt("onClose")})}function Dt(J){if(t.isOpen===!0)return t.close();t.open(J)}function gt(J,re){if(t.config!==void 0){var ge=t.config[J];if(ge!==void 0&&ge.length>0)for(var we=0;ge[we]&&we<ge.length;we++)ge[we](t.selectedDates,t.input.value,t,re);J==="onChange"&&(t.input.dispatchEvent(ol("change")),t.input.dispatchEvent(ol("input")))}}function ol(J){var re=document.createEvent("Event");return re.initEvent(J,!0,!0),re}function sl(J){for(var re=0;re<t.selectedDates.length;re++){var ge=t.selectedDates[re];if(ge instanceof Date&&ur(ge,J)===0)return""+re}return!1}function Vt(J){return t.config.mode!=="range"||t.selectedDates.length<2?!1:ur(J,t.selectedDates[0])>=0&&ur(J,t.selectedDates[1])<=0}function Kr(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(J,re){var ge=new Date(t.currentYear,t.currentMonth,1);ge.setMonth(t.currentMonth+re),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[re].textContent=Vi(ge.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=ge.getMonth().toString(),J.value=ge.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Xn(J){var re=J||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(ge){return t.formatDate(ge,re)}).filter(function(ge,we,Ve){return t.config.mode!=="range"||t.config.enableTime||Ve.indexOf(ge)===we}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function Gl(J){J===void 0&&(J=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Xn(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Xn(t.config.altFormat)),J!==!1&>("onValueUpdate")}function Wl(J){var re=cr(J),ge=t.prevMonthNav.contains(re),we=t.nextMonthNav.contains(re);ge||we?le(ge?-1:1):t.yearElements.indexOf(re)>=0?re.select():re.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):re.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Kn(J){J.preventDefault();var re=J.type==="keydown",ge=cr(J),we=ge;t.amPM!==void 0&&ge===t.amPM&&(t.amPM.textContent=t.l10n.amPM[sr(t.amPM.textContent===t.l10n.amPM[0])]);var Ve=parseFloat(we.getAttribute("min")),Qe=parseFloat(we.getAttribute("max")),Rt=parseFloat(we.getAttribute("step")),ut=parseInt(we.value,10),Bt=J.delta||(re?J.which===38?1:-1:0),ct=ut+Rt*Bt;if(typeof we.value!="undefined"&&we.value.length===2){var yt=we===t.hourElement,al=we===t.minuteElement;ct<Ve?(ct=Qe+ct+sr(!yt)+(sr(yt)&&sr(!t.amPM)),al&&_(void 0,-1,t.hourElement)):ct>Qe&&(ct=we===t.hourElement?ct-Qe-sr(!t.amPM):Ve,al&&_(void 0,1,t.hourElement)),t.amPM&&yt&&(Rt===1?ct+ut===23:Math.abs(ct-ut)>Rt)&&(t.amPM.textContent=t.l10n.amPM[sr(t.amPM.textContent===t.l10n.amPM[0])]),we.value=ql(ct)}}return a(),t}function ei(e,n){for(var t=Array.prototype.slice.call(e).filter(function(s){return s instanceof HTMLElement}),l=[],a=0;a<t.length;a++){var o=t[a];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=Iv(o,n||{}),l.push(o._flatpickr)}catch(s){console.error(s)}}return l.length===1?l[0]:l}var Ul,Ud,$v,Tl,Bo,Ec=Ie(()=>{Sc();$c();Rc();zd();qd();Mc();jd();Ul=function(){return Ul=Object.assign||function(e){for(var n,t=1,l=arguments.length;t<l;t++){n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ul.apply(this,arguments)},Ud=function(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;for(var l=Array(e),a=0,n=0;n<t;n++)for(var o=arguments[n],s=0,u=o.length;s<u;s++,a++)l[a]=o[s];return l},$v=300;typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return ei(this,e)},HTMLElement.prototype.flatpickr=function(e){return ei([this],e)});Tl=function(e,n){return typeof e=="string"?ei(window.document.querySelectorAll(e),n):e instanceof Node?ei([e],n):ei(e,n)};Tl.defaultConfig={};Tl.l10ns={en:Ul({},No),default:Ul({},No)};Tl.localize=function(e){Tl.l10ns.default=Ul(Ul({},Tl.l10ns.default),e)};Tl.setDefaults=function(e){Tl.defaultConfig=Ul(Ul({},Tl.defaultConfig),e)};Tl.parseDate=Lo({});Tl.formatDate=Fc({});Tl.compareDates=ur;typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(e){return ei(this,e)});Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof e=="string"?parseInt(e,10):e))};typeof window!="undefined"&&(window.flatpickr=Tl);Bo=Tl});var Ho,Rv,Av,Gd,Wd=Ie(()=>{il();Ut();Xe();Ec();Ho=Fl(vn());Al();va();Rv=e=>{let n=e.replace(/y/g,"Y");return n=n.replace(/d/g,"D"),n=n.replace(/h/g,"H"),n=n.replace(/上午\/下午/g,"A"),n=n.replace(/上午/g,"A"),n=n.replace(/下午/g,"A"),n=n.replace(/AM\/PM/g,"A"),n=n.replace(/AM/g,"A"),n=n.replace(/PM/g,"A"),n=n.replace(/\"/g,""),n.includes("A")&&(n=n.replace(/H/g,"h")),n},Av={cellFocus:function(e,n,t){let l=h.visibledatarow[e],a=e==0?0:h.visibledatarow[e-1],o=h.visibledatacolumn[n],s=n==0?0:h.visibledatacolumn[n-1],u=ke.mergeborer(h.flowdata,e,n),f=t.ct.fa||"YYYY-MM-DD",d=mt("yyyy-MM-dd hh:mm:ss",t.v),m=Rv(f),g=!1,y=!1,v=!1,b=!0,k=!1;u&&(l=u.row[1],a=u.row[0],o=u.column[1],s=u.column[0]),$(".cell-date-picker").show().css({width:o-s+1,height:l-a+1,left:s,top:a}),/[上午下午]/.test(f)&&(k=!0),/[Hhms]/.test(m)&&(g=!0),/[YMD]/.test(m)||(y=!0),/s/.test(m)&&(v=!0),/A/.test(m)&&(b=!1);let w=Bo("#luckysheet-input-box",{allowInput:!1,noCalendar:y,enableSeconds:v,enableTime:g,dateFormat:m,time_24hr:b,defaultDate:d,onClose(){setTimeout(()=>{w.destroy()},0)},parseDate:(x,C)=>(0,Ho.default)(x).toDate(),formatDate:(x,C,S)=>k?(0,Ho.default)(x).format(C).replace("AM","\u4E0A\u5348").replace("PM","\u4E0B\u5348"):(0,Ho.default)(x).format(C),onChange:function(x,C){let S=Us(new Date(x));$("#luckysheet-rich-text-editor").html(C),ti(e,n,S,{isRefresh:!1}),Nc(e,n,"ct",t.ct),g||p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1])}});$("#luckysheet-input-box").click()}},Gd=Av});function Rl(e,n,t,l,a){if(!wn(e,n,h.currentSheetIndex)){$("#luckysheet-functionbox-cell").blur();return}if(fe()||h.allowEdit===!1||!Je.createHookFunction("cellEditBefore",h.luckysheet_select_save))return;if(ne.saveParam("mv",h.currentSheetIndex,{op:"enterEdit",range:h.luckysheet_select_save}),Ye.dataVerification!=null&&Ye.dataVerification[e+"_"+n]!=null){let z=Ye.dataVerification[e+"_"+n];if(z.type=="dropdown")Ye.dropdownListShow();else if(z.type=="checkbox")return}let o=Xd(e,n,t),s=o.row,u=o.row_pre,f=o.col,d=o.col_pre,m=o.row_index,g=o.col_index;$("#luckysheet-dropCell-icon").is(":visible")&&$("#luckysheet-dropCell-icon").remove();let y=$(window).height(),v=$(window).width(),b=$("#"+h.container).offset(),k=$("#luckysheet-cell-main").scrollLeft(),w=$("#luckysheet-cell-main").scrollTop();if(Oe.isPivotRange(m,g))return;let x=d+b.left+h.rowHeaderWidth-k-2;Y.freezenverticaldata!=null&&n<=Y.freezenverticaldata[1]&&(x=d+b.left+h.rowHeaderWidth-2);let C=u+b.top+h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight-w-2;Y.freezenhorizontaldata!=null&&e<=Y.freezenhorizontaldata[1]&&(C=u+b.top+h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight-2);let S={"min-width":f-d+1-8,"min-height":s-u+1-4,"max-width":v+k-d-20-h.rowHeaderWidth,"max-height":y+w-u-20-15-h.toolbarHeight-h.infobarHeight-h.calculatebarHeight-h.sheetBarHeight-h.statisticBarHeight,left:x,top:C},_={transform:"scale("+h.zoomRatio+")","transform-origin":"left top",width:100/h.zoomRatio+"%",height:100/h.zoomRatio+"%"};h.luckysheetCellUpdate=[m,g],a||$("#luckysheet-rich-text-editor").focus().select(),$("#luckysheet-input-box").removeAttr("style").css({"background-color":"rgb(255, 255, 255)",padding:"0px 2px","font-size":`${h.defaultFontSize}pt`,right:"auto","overflow-y":"auto","box-sizing":"initial",display:"flex"}),(Y.freezenverticaldata!=null||Y.freezenhorizontaldata!=null)&&$("#luckysheet-input-box").css("z-index",10002),$("#luckysheet-input-box-index").html(tt(g)+(m+1)).hide(),$("#luckysheet-wa-functionbox-cancel, #luckysheet-wa-functionbox-confirm").addClass("luckysheet-wa-calculate-active");let T="",A=!1;if(t[m]!=null&&t[m][g]!=null){let z=t[m][g],M=z.ht,E="left",N="top";M=="0"?(S={"min-width":f-d+1-8,"min-height":s-u+1-4,"max-width":v*2/3,"max-height":y+w-u-20-15-h.toolbarHeight-h.infobarHeight-h.calculatebarHeight-h.sheetBarHeight-h.statisticBarHeight,left:d+b.left+h.rowHeaderWidth-k-2,top:u+b.top+h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight-w-2},h.zoomRatio<1&&(E="center"),A=!0):M=="2"&&(S={"min-width":f-d+1-8,"min-height":s-u+1-4,"max-width":f+b.left-k-8,"max-height":y+w-u-20-15-h.toolbarHeight-h.infobarHeight-h.calculatebarHeight-h.sheetBarHeight-h.statisticBarHeight,right:v-(b.left+(h.rowHeaderWidth-1)-k)-f,top:u+b.top+h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight-w-2},h.zoomRatio<1&&(E="right")),z.vt=="0"?N="center":z.vt=="2"&&(N="bottom"),_["transform-origin"]=E+" "+N,l||(_l(z)?T=Vf(m,g,t):z.f!=null?T=ze(m,g,t,"f"):(T=bn(m,g,t),z.qp=="1"&&(T=T&&""+T)));let L=ke.getStyleByCell(t,m,g);L=$("#luckysheet-input-box").get(0).style.cssText+L,$("#luckysheet-input-box").get(0).style.cssText=L,$("#luckysheet-input-box").get(0).style.backgroundColor=="rgba(0, 0, 0, 0)"&&($("#luckysheet-input-box").get(0).style.background="rgb(255,255,255)")}else{let z=el.getComputeMap();var R=el.checksAF(m,g,z),I=$e.getComputeMap(),F=$e.checksCF(m,g,I);F!=null&&F.cellColor!=null?$("#luckysheet-input-box").get(0).style.background=F.cellColor:R!=null&&($("#luckysheet-input-box").get(0).style.background=R[1])}if(S["min-height"]>S["max-height"]&&(S["min-height"]=S["max-height"]),S["min-width"]>S["max-width"]&&(S["min-width"]=S["max-width"]),T=p.xssDeal(T),!xo(m,g,h.currentSheetIndex)&&T.length>0&&T.substr(0,63)=='<span dir="auto" class="luckysheet-formula-text-color">=</span>'?$("#luckysheet-rich-text-editor").html(""):(T=p.ltGtSignDeal(T),$("#luckysheet-rich-text-editor").html(T),a||_r($("#luckysheet-rich-text-editor")[0])),A){let z=$("#luckysheet-input-box").width();z>S["max-width"]&&(z=S["max-width"]),z<S["min-width"]&&(z=S["min-width"]);let M=S.left-z/2+(f-d)/2;M<2&&(M=2),S.left=M-2}$("#luckysheet-input-box").css(S),$("#luckysheet-rich-text-editor").css(_),t[e][n]&&t[e][n].ct&&t[e][n].ct.t=="d"&&Gd.cellFocus(e,n,t[e][n]),p.rangetosheet=h.currentSheetIndex,p.createRangeHightlight(),p.rangeResizeTo=$("#luckysheet-rich-text-editor"),rl()}function Yd(e,n,t){if(e==null||n==null)return;let l=t[e][n];if(l==null)return;let a=l.ht;if(l!=null&&a!="0")return;let o=Xd(e,n,t),s=o.row,u=o.row_pre,f=o.col,d=o.col_pre,m=$(window).height(),g=$(window).width(),y=$("#"+h.container).offset(),v=$("#luckysheet-cell-main").scrollLeft(),b=$("#luckysheet-cell-main").scrollTop(),k={"min-width":f-d+1-8,"max-width":g*2/3,left:d+y.left+h.rowHeaderWidth-v-2},w=$("#luckysheet-input-box").width();w>k["max-width"]&&(w=k["max-width"]),w<k["min-width"]&&(w=k["min-width"]);let x=k.left-w/2+(f-d)/2;x<2&&(x=2),k.left=x-2,$("#luckysheet-input-box").css(k)}function Xd(e,n,t){let l=h.visibledatarow[e],a=e-1==-1?0:h.visibledatarow[e-1],o=h.visibledatacolumn[n],s=n-1==-1?0:h.visibledatacolumn[n-1];t==null&&(t=h.flowdata);let u=ke.mergeborer(t,e,n);return u&&(l=u.row[1],a=u.row[0],e=u.row[2],o=u.column[1],s=u.column[0],n=u.column[2]),{row:l,row_pre:a,row_index:e,col:o,col_pre:s,col_index:n}}var ba=Ie(()=>{on();Vl();il();gr();Oa();Wd();yr();Ml();ft();Ft();Kt();Al();Ut();pn();Vr();gn();Xe();Qt();Ll()});var jc={};_p(jc,{cancelFrozen:()=>jo,cancelRangeMerge:()=>tm,changLang:()=>rb,checkTheStatusOfTheSelectedCells:()=>li,clearCell:()=>Mv,clearRange:()=>k0,closeWebsocket:()=>nb,deleteCell:()=>Fv,deleteColumn:()=>Uv,deleteDataVerification:()=>Z0,deleteImage:()=>Q0,deleteRange:()=>w0,deleteRangeConditionalFormat:()=>b0,deleteRow:()=>jv,deleteRowOrColumn:()=>zc,enterEditMode:()=>Pv,exitEditMode:()=>Nv,find:()=>Kd,frozenColumnRange:()=>Jd,frozenFirstColumn:()=>qo,frozenFirstRow:()=>Vo,frozenRowRange:()=>Zd,getAllSheets:()=>lm,getCellValue:()=>Dv,getColumnWidth:()=>Qv,getConfig:()=>W0,getDefaultColWidth:()=>t0,getDefaultRowHeight:()=>e0,getImageOption:()=>eb,getLuckysheetfile:()=>X0,getRange:()=>Qd,getRangeArray:()=>i0,getRangeAxis:()=>r0,getRangeBoolean:()=>c0,getRangeByTxt:()=>ab,getRangeDiagonal:()=>s0,getRangeHtml:()=>a0,getRangeJson:()=>o0,getRangeValue:()=>n0,getRangeValuesWithFlatte:()=>l0,getRangeWithFlatten:()=>Hc,getRowHeight:()=>Jv,getScreenshot:()=>B0,getSheet:()=>U0,getSheetData:()=>G0,getTxtByRange:()=>ib,getWorkbookName:()=>V0,hideColumn:()=>Yv,hideGridLines:()=>P0,hideRow:()=>Gv,hideRowOrColumn:()=>Oc,insertColumn:()=>Vv,insertColumnRight:()=>qv,insertImage:()=>J0,insertRow:()=>Bv,insertRowBottom:()=>Hv,insertRowBottomOrColumnRight:()=>Lc,insertRowOrColumn:()=>Pc,matrixCalculation:()=>_0,matrixOperation:()=>x0,pagerInit:()=>Vc,redo:()=>j0,refresh:()=>L0,refreshFormula:()=>ob,refreshMenuButtonFocus:()=>qc,replace:()=>Ev,resize:()=>O0,scroll:()=>z0,setBothFrozen:()=>Ov,setCellFormat:()=>Nc,setCellValue:()=>ti,setColumnWidth:()=>Zv,setConfig:()=>Y0,setDataVerification:()=>K0,setHorizontalFrozen:()=>Lv,setRangeConditionalFormat:()=>v0,setRangeConditionalFormatDefault:()=>y0,setRangeFilter:()=>d0,setRangeFormat:()=>f0,setRangeMerge:()=>m0,setRangeShow:()=>u0,setRangeSort:()=>p0,setRangeSortMulti:()=>g0,setRangeValue:()=>h0,setRowHeight:()=>Kv,setSheetActive:()=>R0,setSheetAdd:()=>C0,setSheetColor:()=>D0,setSheetCopy:()=>S0,setSheetDelete:()=>T0,setSheetHide:()=>$0,setSheetMove:()=>M0,setSheetName:()=>A0,setSheetOrder:()=>F0,setSheetShow:()=>I0,setSheetZoom:()=>E0,setSingleRangeFormat:()=>em,setVerticalFrozen:()=>zv,setWorkbookName:()=>H0,showColumn:()=>Xv,showGridLines:()=>N0,showRow:()=>Wv,showRowOrColumn:()=>Bc,toJson:()=>Uo,transToCellData:()=>tb,transToData:()=>lb,undo:()=>q0,updataSheet:()=>sb});function Dv(e,n,t={}){if(!B(e)||!B(n))return U.info("Arguments row or column cannot be null or undefined.","");let l=Z(h.currentSheetIndex),{type:a="v",order:o=l}=Ue({},t),u=h.luckysheetfile[o].data[e][n],f;if(P(u)=="object"){if(f=u[a],a=="f"&&f!=null)f=p.functionHTMLGenerate(f);else if(a=="f")f=u.v;else if(u&&u.ct){if(u.ct.fa=="yyyy-MM-dd")f=u.m;else if(u.ct.hasOwnProperty("t")&&u.ct.t==="inlineStr"){let d=u.ct.s;d&&(f=d.map(m=>m.v).join(""))}}}return f==null&&(f=null),f}function ti(e,n,t,l={}){let a=h.flowdata[e][n],o=JSON.stringify(a);if(!B(e)||!B(n))return U.info("The row or column parameter is invalid.","");let{order:s=Z(h.currentSheetIndex),isRefresh:u=!0,success:f}=Ue({},l),d=h.luckysheetfile[s];if(d==null)return U.info("The order parameter is invalid.","");if(!Je.createHookFunction("cellUpdateBefore",e,n,t,u))return;let m=d.data;u&&(m=$.extend(!0,[],d.data)),m.length==0&&(m=ve.buildGridData(d));let g={bg:1,ff:1,fc:1,bl:1,it:1,fs:1,cl:1,un:1,vt:1,ht:1,mc:1,tr:1,tb:1,rt:1,qp:1};if(t==null||t.toString().length==0)p.delFunctionGroup(e,n),Ht(e,n,m,t);else if(t instanceof Object){let y={};me(m[e][n])&&(m[e][n]={});let v=m[e][n];t.f!=null&&t.v==null?(y.f=t.f,t.ct!=null&&(y.ct=t.ct),m=p.updatecell(e,n,y,!1).data):(t.ct!=null&&(y.ct=t.ct),t.f!=null&&(y.f=t.f),t.v!=null?y.v=t.v:y.v=v.v,t.m!=null&&(y.m=t.m),p.delFunctionGroup(e,n),Ht(e,n,m,y));for(let b in t){let k=t[b];b in g?ke.updateFormatCell(m,b,k,e,e,n,n):v[b]=k}m[e][n]=v}else t.toString().substr(0,1)=="="||t.toString().substr(0,5)=="<span"?m=p.updatecell(e,n,t,!1).data:(p.delFunctionGroup(e,n),Ht(e,n,m,t));setTimeout(()=>{Je.createHookFunction("cellUpdated",e,n,JSON.parse(o),h.flowdata[e][n],u)},0),d.index==h.currentSheetIndex&&u?Ze(m,[{row:[e,e],column:[n,n]}]):d.data=m,f&&typeof f=="function"&&f(m)}function Mv(e,n,t={}){if(!B(e)||!B(n))return U.info("Arguments row and column cannot be null or undefined.","");let l=Z(h.currentSheetIndex),{order:a=l,success:o}=Ue({},t),s=$.extend(!0,[],h.luckysheetfile[a].data),u=s[e][n];P(u)=="object"?(delete u.m,delete u.v,u.f!=null&&(delete u.f,p.delFunctionGroup(e,n,a),delete u.spl)):u=null,a===l?Ze(s,[{row:[e,e],column:[n,n]}]):h.luckysheetfile[a].data=s,o&&typeof o=="function"&&o(u)}function Fv(e,n,t,l={}){if(!e||["left","up"].indexOf(e)<0)return U.info("Arguments move cannot be null or undefined and its value must be 'left' or 'up'","");if(!B(n)||!B(t))return U.info("Arguments row and column cannot be null or undefined.","");let o=Z(h.currentSheetIndex),{order:s=o,success:u}=Ue({},l),f="move"+e.replace(e[0],e[0].toUpperCase()),d;s&&h.luckysheetfile[s]&&(d=h.luckysheetfile[s].index),ha(f,n,n,t,t,d),u&&typeof u=="function"&&u()}function Nc(e,n,t,l,a={}){if(!B(e)||!B(n))return U.info("Arguments row or column cannot be null or undefined.","");if(!t)return U.info("Arguments attr cannot be null or undefined.","");let o=Z(h.currentSheetIndex),{order:s=o,success:u}=Ue({},a),f=h.luckysheetfile[s];if(f==null)return U.info("The order parameter is invalid.","");let d=$.extend(!0,[],f.data);d.length==0&&(d=ve.buildGridData(f));let m=d[e][n]||{},g=$.extend(!0,{},f.config);if(t=="ct"&&(!l||!l.hasOwnProperty("fa")||!l.hasOwnProperty("t")))return new TypeError("While set attribute 'ct' to cell, the value must have property 'fa' and 't'");if(t=="bd"){g.borderInfo==null&&(g.borderInfo=[]);let y=Ue({rangeType:"range",borderType:"border-all",color:"#000",style:"1",range:[{column:[n,n],row:[e,e]}]},l);g.borderInfo.push(y)}else m[t]=l;d[e][n]=m,f.index==h.currentSheetIndex?(f.config=g,h.config=g,Ze(d,[{row:[e,e],column:[n,n]}])):(f.config=g,f.data=d),u&&typeof u=="function"&&u(m)}function Kd(e,n={}){if(!e&&e!=0)return U.info("Search content cannot be null or empty","");let t=Z(h.currentSheetIndex),{isRegularExpression:l=!1,isWholeWord:a=!1,isCaseSensitive:o=!1,order:s=t,type:u="m"}=Ue({},n),f=h.luckysheetfile[s].data,d=[];for(let m=0;m<f.length;m++){let g=f[m];for(let y=0;y<g.length;y++){let v=g[y];if(!!v)if(v.row=m,v.column=y,a)o?e.toString()==v[u]&&d.push(v):v[u]&&e.toString().toLowerCase()==v[u].toLowerCase()&&d.push(v);else if(l){let b;o?b=new RegExp(D.getRegExpStr(e),"g"):b=new RegExp(D.getRegExpStr(e),"ig"),b.test(v[u])&&d.push(v)}else o?new RegExp(D.getRegExpStr(e),"g").test(v[u])&&d.push(v):new RegExp(D.getRegExpStr(e),"ig").test(v[u])&&d.push(v)}}return d}function Ev(e,n,t={}){let l=Kd(e,t),a=Z(h.currentSheetIndex),{order:o=a}=Ue({},t),s=h.luckysheetfile[o];if(s==null)return U.info("The order parameter is invalid.","");let u=$.extend(!0,[],s.data);l.forEach(d=>{d.m=n,ti(d.row,d.column,n,{order:o,isRefresh:!1})});let f=$.extend(!0,[],s.data);return s.data.length=0,s.data.push(...u),s.index==h.currentSheetIndex&&Ze(f,void 0,void 0,!0,!1),Be(),t.success&&typeof t.success=="function"&&t.success(l),l}function Nv(e={}){parseInt($("#luckysheet-input-box").css("top"))>0&&($("#luckysheet-formula-search-c").is(":visible")&&p.searchFunctionCell!=null?p.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")):(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),h.luckysheet_select_save=[{row:[h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[0]],column:[h.luckysheetCellUpdate[1],h.luckysheetCellUpdate[1]],row_focus:h.luckysheetCellUpdate[0],column_focus:h.luckysheetCellUpdate[1]}]),$("#luckysheet-search-formula-parm").is(":visible")&&$("#luckysheet-search-formula-parm").hide(),$("#luckysheet-search-formula-parm-select").is(":visible")&&$("#luckysheet-search-formula-parm-select").hide()),e.success&&typeof e.success=="function"&&e.success()}function Pv(e={}){if(!$("#luckysheet-conditionformat-dialog").is(":visible")){if($("#luckysheet-cell-selected").is(":visible")){let n=h.luckysheet_select_save[h.luckysheet_select_save.length-1],t=n.row_focus,l=n.column_focus;Rl(t,l,h.flowdata)}e.success&&typeof e.success=="function"&&e.success()}}function Vo(e){if(Y.saveFrozen("freezenRow",e),!e||e==Z(h.currentSheetIndex)){let n,t,l;if(Y.freezenRealFirstRowColumn){let a=0;l=h.visibledatarow[a]-2+h.columnHeaderHeight,n=[h.visibledatarow[a],a+1,0,Y.cutVolumn(h.visibledatarow,a+1),l]}else{let a=$("#luckysheet-cell-main").scrollTop();t=st(h.visibledatarow,a),t==-1&&(t=0),l=h.visibledatarow[t]-2-a+h.columnHeaderHeight,n=[h.visibledatarow[t],t+1,a,Y.cutVolumn(h.visibledatarow,t+1),l]}Y.saveFreezen(n,l,null,null),Y.freezenverticaldata!=null&&(Y.cancelFreezenVertical(),Y.createAssistCanvas(),Be()),Y.createFreezenHorizontal(n,l),Y.createAssistCanvas(),Be()}}function qo(e){if(Y.saveFrozen("freezenColumn",e),!e||e==Z(h.currentSheetIndex)){let n,t,l;if(Y.freezenRealFirstRowColumn)t=0,l=h.visibledatacolumn[t]-2+h.rowHeaderWidth,n=[h.visibledatacolumn[t],t+1,0,Y.cutVolumn(h.visibledatacolumn,t+1),l];else{let a=$("#luckysheet-cell-main").scrollLeft();t=st(h.visibledatacolumn,a),t==-1&&(t=0),l=h.visibledatacolumn[t]-2-a+h.rowHeaderWidth,n=[h.visibledatacolumn[t],t+1,a,Y.cutVolumn(h.visibledatacolumn,t+1),l]}Y.saveFreezen(null,null,n,l),Y.freezenhorizontaldata!=null&&(Y.cancelFreezenHorizontal(),Y.createAssistCanvas(),Be()),Y.createFreezenVertical(n,l),Y.createAssistCanvas(),Be()}}function Zd(e,n){let t=Q().freezen;if(!e||!e.hasOwnProperty("row_focus")&&!p.iscelldata(e)){fe()?alert(t.noSeletionError):U.info(t.noSeletionError,"");return}if(typeof e=="string"&&p.iscelldata(e)&&(e=p.getcellrange(e),e={row_focus:e.row[0],column_focus:e.column[0]}),Y.saveFrozen("freezenRowRange",n,e),!n||n==Z(h.currentSheetIndex)){let l=$("#luckysheet-cell-main").scrollTop(),a=st(h.visibledatarow,l),o=e.row_focus;o>a&&(a=o),a==-1&&(a=0);let s=h.visibledatarow[a]-2-l+h.columnHeaderHeight,u=[h.visibledatarow[a],a+1,l,Y.cutVolumn(h.visibledatarow,a+1),s];Y.saveFreezen(u,s,null,null),Y.freezenverticaldata!=null&&(Y.cancelFreezenVertical(),Y.createAssistCanvas(),Be()),Y.createFreezenHorizontal(u,s),Y.createAssistCanvas(),Be()}}function Jd(e,n){let t=Q().freezen,l=typeof e=="string"&&p.iscelldata(e);if(!e||!e.hasOwnProperty("column_focus")&&!l){fe()?alert(t.noSeletionError):U.info(t.noSeletionError,"");return}if(l&&(e=p.getcellrange(e),e={row_focus:e.row[0],column_focus:e.column[0]}),Y.saveFrozen("freezenColumnRange",n,e),!n||n==Z(h.currentSheetIndex)){let a=$("#luckysheet-cell-main").scrollLeft(),o=st(h.visibledatacolumn,a),s=e.column_focus;s>o&&(o=s),o==-1&&(o=0);let u=h.visibledatacolumn[o]-2-a+h.rowHeaderWidth,f=[h.visibledatacolumn[o],o+1,a,Y.cutVolumn(h.visibledatacolumn,o+1),u];Y.saveFreezen(null,null,f,u),Y.freezenhorizontaldata!=null&&(Y.cancelFreezenHorizontal(),Y.createAssistCanvas(),Be()),Y.createFreezenVertical(f,u),Y.createAssistCanvas(),Be()}}function jo(e){Y.saveFrozen("freezenCancel",e),(!e||e==Z(h.currentSheetIndex))&&(Y.freezenverticaldata!=null&&Y.cancelFreezenVertical(),Y.freezenhorizontaldata!=null&&Y.cancelFreezenHorizontal(),Y.createAssistCanvas(),Be())}function Lv(e,n={}){let t=Z(h.currentSheetIndex),{range:l,order:a=t,success:o}=Ue({},n);jo(a),e?Zd(l,a):Vo(a),o&&typeof o=="function"&&o()}function zv(e,n={}){let t=Z(h.currentSheetIndex),{range:l,order:a=t,success:o}=Ue({},n);jo(a),e?Jd(l,a):qo(a),o&&typeof o=="function"&&o()}function Ov(e,n={}){let t=Z(h.currentSheetIndex),{range:l,order:a=t,success:o}=Ue({},n),s=!a||a==Z(h.currentSheetIndex),u=Q().freezen;if(jo(a),e){Y.saveFrozen("freezenRCRange",a,l);let f=typeof l=="string"&&p.iscelldata(l);if(s){if((!l||!(l.hasOwnProperty("column_focus")&&l.hasOwnProperty("row_focus")))&&!f){fe()?alert(u.noSeletionError):U.info(u.noSeletionError,"");return}f&&(l=p.getcellrange(l),l={row_focus:l.row[0],column_focus:l.column[0]});let d=$("#luckysheet-cell-main").scrollTop(),m=st(h.visibledatarow,d),g=l.row_focus;g>m&&(m=g),m==-1&&(m=0);let y=h.visibledatarow[m]-2-d+h.columnHeaderHeight,v=[h.visibledatarow[m],m+1,d,Y.cutVolumn(h.visibledatarow,m+1),y];Y.saveFreezen(v,y,null,null),Y.createFreezenHorizontal(v,y);let b=$("#luckysheet-cell-main").scrollLeft(),k=st(h.visibledatacolumn,b),w=l.column_focus;w>k&&(k=w),k==-1&&(k=0);let x=h.visibledatacolumn[k]-2-b+h.rowHeaderWidth,C=[h.visibledatacolumn[k],k+1,b,Y.cutVolumn(h.visibledatacolumn,k+1),x];Y.saveFreezen(null,null,C,x),Y.createFreezenVertical(C,x),Y.createAssistCanvas(),Be()}}else if(Y.saveFrozen("freezenRC",a),s){let f=$("#luckysheet-cell-main").scrollTop(),d=st(h.visibledatarow,f);d==-1&&(d=0);let m=h.visibledatarow[d]-2-f+h.columnHeaderHeight,g=[h.visibledatarow[d],d+1,f,Y.cutVolumn(h.visibledatarow,d+1),m];Y.saveFreezen(g,m,null,null),Y.createFreezenHorizontal(g,m);let y=$("#luckysheet-cell-main").scrollLeft(),v=st(h.visibledatacolumn,y);v==-1&&(v=0);let b=h.visibledatacolumn[v]-2-y+h.rowHeaderWidth,k=[h.visibledatacolumn[v],v+1,y,Y.cutVolumn(h.visibledatacolumn,v+1),b];Y.saveFreezen(null,null,k,b),Y.createFreezenVertical(k,b),Y.createAssistCanvas(),Be()}}function Pc(e,n=0,t={}){if(!B(n))return U.info("The index parameter is invalid.","");let l=Z(h.currentSheetIndex),{number:a=1,order:o=l,success:s}=Ue({},t),f=Q().info;if(!B(a)){fe()?alert(f.tipInputNumber):U.info(f.tipInputNumber,"");return}if(a=parseInt(a),a<1||a>100){fe()?alert(f.tipInputNumberLimit):U.info(f.tipInputNumberLimit,"");return}let d;o&&h.luckysheetfile[o]&&(d=h.luckysheetfile[o].index),Ir(e,n,a,"lefttop",d),s&&typeof s=="function"&&s()}function Lc(e,n=0,t={}){if(!B(n))return U.info("The index parameter is invalid.","");let l=Z(h.currentSheetIndex),{number:a=1,order:o=l,success:s}=Ue({},t),f=Q().info;if(!B(a)){fe()?alert(f.tipInputNumber):U.info(f.tipInputNumber,"");return}if(a=parseInt(a),a<1||a>100){fe()?alert(f.tipInputNumberLimit):U.info(f.tipInputNumberLimit,"");return}let d;o&&h.luckysheetfile[o]&&(d=h.luckysheetfile[o].index),Ir(e,n,a,"rightbottom",d),s&&typeof s=="function"&&s()}function Bv(e=0,n={}){Pc("row",e,n)}function Hv(e=0,n={}){Lc("row",e,n)}function Vv(e=0,n={}){Pc("column",e,n)}function qv(e=0,n={}){Lc("column",e,n)}function zc(e,n,t,l={}){if(!B(n)||!B(t))return U.info("Please enter the index for deleting rows or columns correctly.","");let a=Z(h.currentSheetIndex),{order:o=a,success:s}=Ue({},l),u;o&&h.luckysheetfile[o]&&(u=h.luckysheetfile[o].index),qn(e,n,t,u),s&&typeof s=="function"&&s()}function jv(e,n,t={}){zc("row",e,n,t)}function Uv(e,n,t={}){zc("column",e,n,t)}function Oc(e,n,t,l={}){if(!B(n)||!B(t))return U.info("Please enter the index for deleting rows or columns correctly.","");let a=Z(h.currentSheetIndex),{order:o=a,saveParam:s=!0,success:u}=Ue({},l),f=h.luckysheetfile[o],d=e==="row"?"rowhidden":"colhidden",m=$.extend(!0,{},f.config);m[d]==null&&(m[d]={});for(let g=n;g<=t;g++)m[d][g]=0;if(h.clearjfundo){let g={};g.type=e==="row"?"showHidRows":"showHidCols",g.sheetIndex=f.index,g.config=$.extend(!0,{},f.config),g.curconfig=m,h.jfundo.length=0,h.jfredo.push(g)}h.luckysheetfile[o].config=m,s&&ne.saveParam("cg",f.index,m[d],{k:d}),o==a&&(h.config=m,St(h.flowdata.length,h.flowdata[0].length)),u&&typeof u=="function"&&u()}function Bc(e,n,t,l={}){if(!B(n)||!B(t))return U.info("Please enter the index for deleting rows or columns correctly.","");let a=Z(h.currentSheetIndex),{order:o=a,saveParam:s=!0,success:u}=Ue({},l),f=h.luckysheetfile[o],d=e==="row"?"rowhidden":"colhidden",m=$.extend(!0,{},f.config);if(m[d]!=null){for(let g=n;g<=t;g++)delete m[d][g];if(h.clearjfundo){let g={};g.type=e==="row"?"showHidRows":"showHidCols",g.sheetIndex=f.index,g.config=$.extend(!0,{},f.config),g.curconfig=m,h.jfundo.length=0,h.jfredo.push(g)}h.luckysheetfile[o].config=h.config,s&&ne.saveParam("cg",f.index,m[d],{k:d}),o===a&&(h.config=m,St(h.flowdata.length,h.flowdata[0].length)),u&&typeof u=="function"&&u()}}function Gv(e,n,t={}){Oc("row",e,n,t)}function Wv(e,n,t={}){Bc("row",e,n,t)}function Yv(e,n,t={}){Oc("column",e,n,t)}function Xv(e,n,t={}){Bc("column",e,n,t)}function Kv(e,n={}){if(P(e)!="object")return U.info("The rowInfo parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=$.extend(!0,{},a.config);o.rowlen==null&&(o.rowlen={});for(let s in e)if(parseInt(s)>=0){let u=e[s];u==="auto"?o.rowlen[parseInt(s)]=u:Number(u)>=0&&(o.rowlen[parseInt(s)]=Number(u))}a.config=o,ne.saveParam("cg",a.index,o.rowlen,{k:"rowlen"}),a.index==h.currentSheetIndex&&(h.config=o,St(h.flowdata.length,h.flowdata[0].length)),l&&typeof l=="function"&&l()}function Zv(e,n={}){if(P(e)!="object")return U.info("The columnInfo parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=$.extend(!0,{},a.config);o.columnlen==null&&(o.columnlen={});for(let s in e)if(parseInt(s)>=0){let u=e[s];u==="auto"?o.columnlen[parseInt(s)]=u:Number(u)>=0&&(o.columnlen[parseInt(s)]=Number(u))}a.config=o,ne.saveParam("cg",a.index,o.columnlen,{k:"columnlen"}),a.index==h.currentSheetIndex&&(h.config=o,St(h.flowdata.length,h.flowdata[0].length)),l&&typeof l=="function"&&l()}function Jv(e,n={}){if(P(e)!="array"||e.length==0)return U.info("The rowInfo parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let s=$.extend(!0,{},a.config).rowlen||{},u={};return e.forEach(f=>{if(parseInt(f)>=0){let d=s[parseInt(f)]||h.defaultrowlen;u[parseInt(f)]=d}}),setTimeout(()=>{l&&typeof l=="function"&&l()},1),u}function Qv(e,n={}){if(P(e)!="array"||e.length==0)return U.info("The columnInfo parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let s=$.extend(!0,{},a.config).columnlen||{},u={};return e.forEach(f=>{if(parseInt(f)>=0){let d=s[parseInt(f)]||h.defaultcollen;u[parseInt(f)]=d}}),setTimeout(()=>{l&&typeof l=="function"&&l()},1),u}function e0(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e);return setTimeout(()=>{t&&typeof t=="function"&&t()},1),h.luckysheetfile[n].defaultRowHeight||h.defaultrowlen}function t0(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e);return setTimeout(()=>{t&&typeof t=="function"&&t()},1),h.luckysheetfile[n].defaultColWidth||h.defaultcollen}function Qd(){let e=JSON.parse(JSON.stringify(h.luckysheet_select_save)),n=[];for(let t=0;t<e.length;t++){let l=e[t],a={row:l.row,column:l.column};n.push(a)}return n}function Hc(e){e=e||Qd();let n=[];return e.forEach(t=>{let l=t.row,a=t.column;for(let o=l[0];o<=l[1];o++)for(let s=a[0];s<=a[1];s++)n.push({r:o,c:s})}),n}function l0(e){e=e||Hc();let n=[];return e.forEach(t=>{n.push(h.flowdata[t.r][t.c])}),n}function r0(){let e=[],n=JSON.parse(JSON.stringify(h.luckysheet_select_save)),t=h.currentSheetIndex;return n.forEach(l=>{let a=xt(t,{column:l.column,row:l.row});e.push(a)}),e}function n0(e={}){let n=Z(h.currentSheetIndex),{range:t,order:l=n}=Ue({},e),a=h.luckysheetfile[l];if(!t||typeof t=="object")return Pt(t,a.index);if(typeof t=="string"){if(p.iscelldata(t))return Pt(p.getcellrange(t),a.index);U.info("The range is invalid, please check range parameter.","")}}function a0(e={}){let{range:n=h.luckysheet_select_save,order:t=Z(h.currentSheetIndex),success:l}=Ue({},e);if(n=JSON.parse(JSON.stringify(n)),P(n)=="string"){if(!p.iscelldata(n))return U.info("The range parameter is invalid.","");let v=p.getcellrange(n);n=[{row:v.row,column:v.column}]}else if(P(n)=="object"){if(n.row==null||n.column==null)return U.info("The range parameter is invalid.","");n=[{row:n.row,column:n.column}]}if(P(n)!="array")return U.info("The range parameter is invalid.","");let a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=$.extend(!0,{},a.config);if(o.merge!=null){let v=!1;for(let b=0;b<n.length;b++){let k=n[b].row[0],w=n[b].row[1],x=n[b].column[0],C=n[b].column[1];if(v=Mt(o,k,w,x,C),v)break}if(v)return U.info("Cannot perform this operation on partially merged cells","")}let s=$.extend(!0,[],a.luckysheet_conditionformat_save);if(n.length>1&&s.length>0){let v=!1,b=$e.getComputeMap(a.index);for(let k=0;k<n.length;k++){let w=n[k].row[0],x=n[k].row[1],C=n[k].column[0],S=n[k].column[1];for(let _=w;_<=x;_++){for(let T=C;T<=S;T++)if($e.checksCF(_,T,b)!=null){v=!0;break}if(v)break}if(v)break}if(v)return U.info("Cannot perform this operation on multiple selection areas, please select a single area","")}if(n.length>1){let v=!0,b=n[0].row[0],k=n[0].row[1],w=!0,x=n[0].column[0],C=n[0].column[1];for(let S=1;S<n.length;S++)(n[S].row[0]!=b||n[S].row[1]!=k)&&(v=!1),(n[S].column[0]!=x||n[S].column[1]!=C)&&(w=!1);if(!v&&!w||Yr(n))return U.info("Cannot perform this operation on multiple selection areas, please select a single area","")}let u=[],f=[];for(let v=0;v<n.length;v++){let b=n[v].row[0],k=n[v].row[1],w=n[v].column[0],x=n[v].column[1];for(let C=b;C<=k;C++)if(!(o.rowhidden!=null&&o.rowhidden[C]!=null)){u.includes(C)||u.push(C);for(let S=w;S<=x;S++)o.colhidden!=null&&o.colhidden[S]!=null||f.includes(S)||f.push(S)}}let d;o.borderInfo&&o.borderInfo.length>0&&(d=Gr(a.index));let m=a.data;(m==null||m.length==0)&&(m=ve.buildGridData(a));let g="",y="";u=u.sort((v,b)=>v-b),f=f.sort((v,b)=>v-b);for(let v=0;v<u.length;v++){let b=u[v];if(!(o.rowhidden!=null&&o.rowhidden[b]!=null)){g+="<tr>";for(let k=0;k<f.length;k++){let w=f[k];if(o.colhidden!=null&&o.colhidden[w]!=null)continue;let x='<td ${span} style="${style}">';if(m[b]!=null&&m[b][w]!=null){let C="",S="";b==u[0]&&(o.columnlen==null||o.columnlen[w.toString()]==null?y+='<colgroup width="72px"></colgroup>':y+='<colgroup width="'+o.columnlen[w.toString()]+'px"></colgroup>'),w==f[0]&&(o.rowlen==null||o.rowlen[b.toString()]==null?C+="height:19px;":C+="height:"+o.rowlen[b.toString()]+"px;");let _=/^(w|W)((0?)|(0\.0+))$/,T;if(m[b][w].ct!=null&&m[b][w].ct.fa!=null&&m[b][w].ct.fa.match(_)?T=ze(b,w,m):T=ze(b,w,m,"m"),C+=ke.getStyleByCell(m,b,w),P(m[b][w])=="object"&&"mc"in m[b][w])if("rs"in m[b][w].mc){if(S='rowspan="'+m[b][w].mc.rs+'" colspan="'+m[b][w].mc.cs+'"',d&&d[b+"_"+w]){let A={color:{},style:{}},R={color:{},style:{}},I={color:{},style:{}},F={color:{},style:{}};for(let E=b;E<b+m[b][w].mc.rs;E++)for(let N=w;N<w+m[b][w].mc.cs;N++){if(E==b&&d[E+"_"+N]&&d[E+"_"+N].t){let L=d[E+"_"+N].t.style,O=d[E+"_"+N].t.color;I.style[L]==null?I.style[L]=1:I.style[L]=I.style[L]+1,I.color[O]==null?I.color[O]=1:I.color[O]=I.color[O]+1}if(E==b+m[b][w].mc.rs-1&&d[E+"_"+N]&&d[E+"_"+N].b){let L=d[E+"_"+N].b.style,O=d[E+"_"+N].b.color;F.style[L]==null?F.style[L]=1:F.style[L]=F.style[L]+1,F.color[O]==null?F.color[O]=1:F.color[O]=F.color[O]+1}if(N==w&&d[E+"_"+N]&&d[E+"_"+N].l){let L=d[b+"_"+w].l.style,O=d[E+"_"+N].l.color;A.style[L]==null?A.style[L]=1:A.style[L]=A.style[L]+1,A.color[O]==null?A.color[O]=1:A.color[O]=A.color[O]+1}if(N==w+m[b][w].mc.cs-1&&d[E+"_"+N]&&d[E+"_"+N].r){let L=d[E+"_"+N].r.style,O=d[E+"_"+N].r.color;R.style[L]==null?R.style[L]=1:R.style[L]=R.style[L]+1,R.color[O]==null?R.color[O]=1:R.color[O]=R.color[O]+1}}let z=m[b][w].mc.rs,M=m[b][w].mc.cs;if(JSON.stringify(A).length>23){let E=null,N=null;for(let L in A.color)A.color[L]>=z/2&&(E=L);for(let L in A.style)A.style[L]>=z/2&&(N=L);E!=null&&N!=null&&(C+="border-left:"+Ct.getHtmlBorderStyle(N,E))}if(JSON.stringify(R).length>23){let E=null,N=null;for(let L in R.color)R.color[L]>=z/2&&(E=L);for(let L in R.style)R.style[L]>=z/2&&(N=L);E!=null&&N!=null&&(C+="border-right:"+Ct.getHtmlBorderStyle(N,E))}if(JSON.stringify(I).length>23){let E=null,N=null;for(let L in I.color)I.color[L]>=M/2&&(E=L);for(let L in I.style)I.style[L]>=M/2&&(N=L);E!=null&&N!=null&&(C+="border-top:"+Ct.getHtmlBorderStyle(N,E))}if(JSON.stringify(F).length>23){let E=null,N=null;for(let L in F.color)F.color[L]>=M/2&&(E=L);for(let L in F.style)F.style[L]>=M/2&&(N=L);E!=null&&N!=null&&(C+="border-bottom:"+Ct.getHtmlBorderStyle(N,E))}}}else continue;else if(d&&d[b+"_"+w]){if(d[b+"_"+w].l){let A=d[b+"_"+w].l.style,R=d[b+"_"+w].l.color;C+="border-left:"+Ct.getHtmlBorderStyle(A,R)}if(d[b+"_"+w].r){let A=d[b+"_"+w].r.style,R=d[b+"_"+w].r.color;C+="border-right:"+Ct.getHtmlBorderStyle(A,R)}if(d[b+"_"+w].b){let A=d[b+"_"+w].b.style,R=d[b+"_"+w].b.color;C+="border-bottom:"+Ct.getHtmlBorderStyle(A,R)}if(d[b+"_"+w].t){let A=d[b+"_"+w].t.style,R=d[b+"_"+w].t.color;C+="border-top:"+Ct.getHtmlBorderStyle(A,R)}}x=_e(x,{style:C,span:S}),T==null&&(T=ze(b,w,m)),T==null&&(T=" "),x+=T}else{let C="";if(d&&d[b+"_"+w]){if(d[b+"_"+w].l){let S=d[b+"_"+w].l.style,_=d[b+"_"+w].l.color;C+="border-left:"+Ct.getHtmlBorderStyle(S,_)}if(d[b+"_"+w].r){let S=d[b+"_"+w].r.style,_=d[b+"_"+w].r.color;C+="border-right:"+Ct.getHtmlBorderStyle(S,_)}if(d[b+"_"+w].b){let S=d[b+"_"+w].b.style,_=d[b+"_"+w].b.color;C+="border-bottom:"+Ct.getHtmlBorderStyle(S,_)}if(d[b+"_"+w].t){let S=d[b+"_"+w].t.style,_=d[b+"_"+w].t.color;C+="border-top:"+Ct.getHtmlBorderStyle(S,_)}}x+="",b==u[0]&&(o.columnlen==null||o.columnlen[w.toString()]==null?y+='<colgroup width="72px"></colgroup>':y+='<colgroup width="'+o.columnlen[w.toString()]+'px"></colgroup>'),w==f[0]&&(o.rowlen==null||o.rowlen[b.toString()]==null?C+="height:19px;":C+="height:"+o.rowlen[b.toString()]+"px;"),x=_e(x,{style:C,span:""}),x+=" "}x+="</td>",g+=x}g+="</tr>"}}return g='<table data-type="luckysheet_copy_action_table">'+y+g+"</table>",g}function i0(e,n={}){if(!["oneDimensional","twoDimensional"].includes(e))return U.info("The dimensional parameter is invalid.","");let{range:l=h.luckysheet_select_save[h.luckysheet_select_save.length-1],order:a=Z(h.currentSheetIndex)}=Ue({},n),o=h.luckysheetfile[a];if(o==null)return U.info("The order parameter is invalid.","");if(P(l)=="string"){if(!p.iscelldata(l))return U.info("The range parameter is invalid.","");l=p.getcellrange(l)}if(P(l)!="object"||l.row==null||l.column==null)return U.info("The range parameter is invalid.","");let s=l.row[0],u=l.row[1],f=l.column[0],d=l.column[1],m=$.extend(!0,{},o.config);if(m.merge!=null&&Mt(m,s,u,f,d))return U.info("Cannot perform this operation on partially merged cells","");let g=o.data;(g==null||g.length==0)&&(g=ve.buildGridData(o));let y=[];if(e=="oneDimensional")for(let v=s;v<=u;v++)for(let b=f;b<=d;b++){let k=g[v][b];k==null||k.v==null?y.push(null):y.push(k.v)}else if(e=="twoDimensional")for(let v=s;v<=u;v++){let b=[];for(let k=f;k<=d;k++){let w=g[v][k];w==null||w.v==null?b.push(null):b.push(w.v)}y.push(b)}return y}function o0(e,n={}){let t=h.luckysheet_select_save[0],l=Z(h.currentSheetIndex),{range:a=t,order:o=l}=Ue({},n),s=h.luckysheetfile[o],u=s.config;if(a&&typeof a=="string"&&p.iscelldata(a)&&(a=p.getcellrange(a)),!a||a.length>1){fe()?alert(locale_drag.noMulti):U.info(locale_drag.noMulti,"");return}if(u.merge!=null){let m=!1,g=a.row[0],y=a.row[1],v=a.column[0],b=a.column[1];if(m=Mt(u,g,y,v,b),m){fe()?alert(Q().drag.noPartMerge):U.info(Q().drag.noPartMerge,"");return}}let f=Pt(a,s.index),d=[];if(f.length!==0){if(e)if(f.length===1){let m={};for(let g=0;g<f[0].length;g++)m[ze(0,g,f)]="";d.push(m)}else for(let m=1;m<f.length;m++){let g={};for(let y=0;y<f[0].length;y++)ze(0,y,f)==null?g[""]=ze(m,y,f):g[ze(0,y,f)]=ze(m,y,f);d.push(g)}else{let m=a.column[0];for(let g=0;g<f.length;g++){let y={};for(let v=0;v<f[0].length;v++)y[tt(v+m)]=ze(g,v,f);d.push(y)}}return d}}function s0(e,n={}){if(["normal","anti","offset"].indexOf(e)<0)return U.info("The type parameter must be included in ['normal', 'anti', 'offset']","");let l=Z(h.currentSheetIndex),a=JSON.parse(JSON.stringify(h.luckysheet_select_save)),{column:o=1,range:s=a,order:u=l}=Ue({},n),d=h.luckysheetfile[u].config;if(s&&typeof s=="string"&&p.iscelldata(s)&&(s=p.getcellrange(s)),!s||s.length>1){fe()?alert(Q().drag.noMulti):U.info(Q().drag.noMulti,"");return}if(d.merge!=null){let v=!1,b=s[0].row[0],k=s[0].row[1],w=s[0].column[0],x=s[0].column[1];if(v=Mt(d,b,k,w,x),v){fe()?alert(Q().drag.noPartMerge):U.info(Q().drag.noPartMerge,"");return}}let m=Pt(s,u),g=[];if(m.length===0)return;let y=m[0].length;switch(e){case"normal":for(let v=0;v<m.length&&!(v>=y);v++)g.push(m[v][v]);break;case"anti":for(let v=0;v<m.length&&!(v>=y);v++)g.push(m[v][y-v-1]);break;case"offset":if(o.toString()=="NaN"){fe()?alert(Q().drag.inputCorrect):U.info(Q().drag.inputCorrect,"");return}if(o<0){fe()?alert(Q().drag.offsetColumnLessZero):U.info(Q().drag.offsetColumnLessZero,"");return}for(let v=0;v<m.length&&!(v+o>=y);v++)g.push(m[v][v+o]);break}Ct.copybyformat(new Event,JSON.stringify(g))}function c0(e={}){let n=Z(h.currentSheetIndex),t=JSON.parse(JSON.stringify(h.luckysheet_select_save)),{range:l=t,order:a=n}=Ue({},e),s=h.luckysheetfile[a].config;if(l&&typeof l=="string"&&p.iscelldata(l)&&(l=p.getcellrange(l)),!l||l.length>1){fe()?alert(Q().drag.noMulti):U.info(Q().drag.noMulti,"");return}if(s.merge!=null){let d=!1,m=l[0].row[0],g=l[0].row[1],y=l[0].column[0],v=l[0].column[1];if(d=Mt(s,m,g,y,v),d){fe()?alert(Q().drag.noPartMerge):U.info(Q().drag.noPartMerge,"");return}}let u=Pt(l,a),f=[];if(u.length!==0){for(let d=0;d<u.length;d++){let m=[];for(let g=0;g<u[0].length;g++){let y=!1,v;P(u[d][g])=="object"?v=u[d][g].v:v=u[d][g],v==null||v==""?y=!1:(v=parseInt(v),v==null||v>0?y=!0:y=!1),m.push(y)}f.push(m)}Ct.copybyformat(event,JSON.stringify(f))}}function u0(e,n={}){if(P(e)=="string"){if(!p.iscelldata(e))return U.info("The range parameter is invalid.","");let s=p.getcellrange(e);e=[{row:s.row,column:s.column}]}else if(P(e)=="object"){if(e.row==null||e.column==null)return U.info("The range parameter is invalid.","");e=[{row:e.row,column:e.column}]}if(P(e)=="array"){for(let s=0;s<e.length;s++)if(P(e[s])==="string"){if(!p.iscelldata(e[s]))return U.info("The range parameter is invalid.","");let u=p.getcellrange(e[s]);e[s]={row:u.row,column:u.column}}else if(P(e)=="object"){if(e.row==null||e.column==null)return U.info("The range parameter is invalid.","");e={row:e.row,column:e.column}}}if(P(e)!="array")return U.info("The range parameter is invalid.","");let{show:t=!0,order:l=Z(h.currentSheetIndex),success:a}=Ue({},n),o=h.luckysheetfile[l];if(o==null)return U.info("The order parameter is invalid.","");for(let s=0;s<e.length;s++){let u=ke.mergeMoveMain(e[s].column,e[s].row,e[s]);u&&(e[s]={row:u[1],column:u[0]})}o.luckysheet_select_save=e,o.index==h.currentSheetIndex&&(h.luckysheet_select_save=e,lt(),t||($("#luckysheet-cell-selected-boxs").hide(),$("#luckysheet-cell-selected-focus").hide(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide(),$("#luckysheet-rows-h-selected").empty(),$("#luckysheet-cols-h-selected").empty())),a&&typeof a=="function"&&a()}function h0(e,n={}){let t=Z(h.currentSheetIndex),l=h.luckysheet_select_save[h.luckysheet_select_save.length-1],{range:a=l,isRefresh:o=!0,order:s=t,success:u}=Ue({},n);if(e==null)return U.info("The data which will be set to range cannot be null.","");if(a instanceof Array)return U.info("setRangeValue only supports a single selection.","");typeof a=="string"&&p.iscelldata(a)&&(a=p.getcellrange(a));let f=a.row[1]-a.row[0]+1,d=a.column[1]-a.column[0]+1;if(e.length!==f||e[0].length!==d)return U.info("The data to be set does not match the selection.","");let m=h.luckysheetfile[s];if(m==null)return U.info("The order parameter is invalid.","");let g=$.extend(!0,[],m.data);for(let v=0;v<f;v++)for(let b=0;b<d;b++){let k=a.row[0]+v,w=a.column[0]+b;ti(k,w,e[v][b],{order:s,isRefresh:!1})}let y=$.extend(!0,[],m.data);m.data.length=0,m.data.push(...g),m.index==h.currentSheetIndex&&Ze(y,[{row:a.row,column:a.column}],void 0,!0,!1),o&&Be(),u&&typeof u=="function"&&u()}function em(e,n,t={}){let l=Z(h.currentSheetIndex),a=h.luckysheet_select_save[h.luckysheet_select_save.length-1],{range:o=a,order:s=l}=Ue({},t);if(!e)return U.info("Arguments attr cannot be null or undefined.",""),"error";if(o instanceof Array)return U.info("setRangeValue only supports a single selection.",""),"error";if(P(o)=="string"){if(!p.iscelldata(o))return U.info("The range parameter is invalid.",""),"error";o=p.getcellrange(o)}if(P(o)!="object"||o.row==null||o.column==null)return U.info("The range parameter is invalid.",""),"error";for(let u=o.row[0];u<=o.row[1];u++)for(let f=o.column[0];f<=o.column[1];f++)console.log("r",u),console.log("c",f),ti(u,f,{[e]:n},{order:s,isRefresh:!1})}function f0(e,n,t={}){let l=Z(h.currentSheetIndex),a=JSON.parse(JSON.stringify(h.luckysheet_select_save)),{range:o=a,order:s=l,success:u}=Ue({},t);if(P(o)=="string"){if(!p.iscelldata(o))return U.info("The range parameter is invalid.","");let g=p.getcellrange(o);o=[{row:g.row,column:g.column}]}else if(P(o)=="object"){if(o.row==null||o.column==null)return U.info("The range parameter is invalid.","");o=[{row:o.row,column:o.column}]}if(P(o)!="array")return U.info("The range parameter is invalid.","");let f=h.luckysheetfile[s],d=[];for(let g=0;g<o.length;g++)d.push(em(e,n,{range:o[g],order:s}));let m=$.extend(!0,[],f.data);if(d.some(g=>g==="error"))return f.data.length=0,f.data.push(...m),!1;f.data.length=0,f.data.push(...m),f.index==h.currentSheetIndex&&Ze(m,void 0,void 0,!0,!1),Be(),u&&typeof u=="function"}function d0(e,n={}){if(!["open","close"].includes(e))return U.info("The type parameter is invalid.","");let{range:l=h.luckysheet_select_save[h.luckysheet_select_save.length-1],order:a=Z(h.currentSheetIndex),success:o}=Ue({},n),s=h.luckysheetfile[a];if(s==null)return U.info("The order parameter is invalid.","");if(P(l)=="string"){if(!p.iscelldata(l))return U.info("The range parameter is invalid.","");l=p.getcellrange(l)}if(P(l)!="object"||l.row==null||l.column==null)return U.info("The range parameter is invalid.","");if(setTimeout(()=>{o&&typeof o=="function"&&o()},1),e=="open")return s.filter_select=l,s.index==h.currentSheetIndex&&Dl(l,s.filter),{row:l.row,column:l.column};if(e=="close"){let u=$.extend(!0,{},s.filter_select);return s.filter_select=null,$("#luckysheet-filter-selected-sheet"+s.index).remove(),$("#luckysheet-filter-options-sheet"+s.index).remove(),{row:u.row,column:u.column}}}function m0(e,n={}){if(["all","horizontal","vertical"].indexOf(e)<0)return U.info("The type parameter must be included in ['all', 'horizontal', 'vertical']","");let l=Z(h.currentSheetIndex),a=JSON.parse(JSON.stringify(h.luckysheet_select_save)),{range:o=a,order:s=l,success:u}=Ue({},n),f=h.luckysheetfile[s],d=$.extend(!0,{},f.config),m=$.extend(!0,[],f.data);if(m.length==0&&(m=$.extend(!0,[],ve.buildGridData(f))),P(o)=="string"){if(!p.iscelldata(o))return U.info("Incorrect selection format","");let y=p.getcellrange(o);o=[{row:y.row,column:y.column}]}else if(P(o)=="object"){if(!o.hasOwnProperty("row")||!o.hasOwnProperty("column"))return U.info("Incorrect selection format","");o=[{row:o.row,column:o.column}]}if(Yr(o))return U.info("Cannot merge overlapping range","");if(d.merge!=null){let y=!1;for(let v=0;v<o.length;v++){let b=o[v].row[0],k=o[v].row[1],w=o[v].column[0],x=o[v].column[1];if(y=Mt(d,b,k,w,x),y)break}if(y)return U.info("Cannot perform this operation on partially merged cells","")}else d.merge={};let g=!1;for(let y=0;y<o.length;y++){let v=o[y].row[0],b=o[y].row[1],k=o[y].column[0],w=o[y].column[1];for(let x=v;x<=b;x++){for(let C=k;C<=w;C++){let S=m[x][C];if(P(S)=="object"&&"mc"in S){g=!0;break}}if(g)break}}if(g)tm({range:o,order:s});else{for(let y=0;y<o.length;y++){let v=o[y].row[0],b=o[y].row[1],k=o[y].column[0],w=o[y].column[1];if(!(v==b&&k==w)){if(e=="all"){let x={},C=!1;for(let S=v;S<=b;S++)for(let _=k;_<=w;_++){let T=m[S][_];T!=null&&(!me(T.v)||T.f!=null)&&!C&&(x=$.extend(!0,{},T),C=!0),m[S][_]={mc:{r:v,c:k}}}m[v][k]=x,m[v][k].mc={r:v,c:k,rs:b-v+1,cs:w-k+1},d.merge[v+"_"+k]={r:v,c:k,rs:b-v+1,cs:w-k+1}}else if(e=="vertical")for(let x=k;x<=w;x++){let C={},S=!1;for(let _=v;_<=b;_++){let T=m[_][x];T!=null&&(!me(T.v)||T.f!=null)&&!S&&(C=$.extend(!0,{},T),S=!0),m[_][x]={mc:{r:v,c:x}}}m[v][x]=C,m[v][x].mc={r:v,c:x,rs:b-v+1,cs:1},d.merge[v+"_"+x]={r:v,c:x,rs:b-v+1,cs:1}}else if(e=="horizontal")for(let x=v;x<=b;x++){let C={},S=!1;for(let _=k;_<=w;_++){let T=m[x][_];T!=null&&(!me(T.v)||T.f!=null)&&!S&&(C=$.extend(!0,{},T),S=!0),m[x][_]={mc:{r:x,c:k}}}m[x][k]=C,m[x][k].mc={r:x,c:k,rs:1,cs:w-k+1},d.merge[x+"_"+k]={r:x,c:k,rs:1,cs:w-k+1}}}}s==l?(h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"mergeChange",sheetIndex:f.index,data:$.extend(!0,[],f.data),curData:m,range:o,config:$.extend(!0,{},f.config),curConfig:d})),h.clearjfundo=!1,Ze(m,o,{cfg:d}),h.clearjfundo=!0):(f.data=m,f.config=d)}u&&typeof u=="function"&&u()}function tm(e={}){let n=h.luckysheet_select_save,t=Z(h.currentSheetIndex),{range:l=n,order:a=t,success:o}=Ue({},e),s=h.luckysheetfile[a],u=$.extend(!0,{},s.config),f=$.extend(!0,[],s.data);if(f.length==0&&(f=$.extend(!0,[],ve.buildGridData(s))),P(l)=="string"){if(!p.iscelldata(l))return U.info("Incorrect selection format","");let d=p.getcellrange(l);l=[{row:d.row,column:d.column}]}else if(P(l)=="object"){if(!l.hasOwnProperty("row")||!l.hasOwnProperty("column"))return U.info("Incorrect selection format","");l=[{row:l.row,column:l.column}]}if(Yr(l))return U.info("Cannot merge overlapping range","");if(u.merge!=null){let d=!1;for(let m=0;m<l.length;m++){let g=l[m].row[0],y=l[m].row[1],v=l[m].column[0],b=l[m].column[1];if(d=Mt(u,g,y,v,b),d)break}if(d)return U.info("Cannot perform this operation on partially merged cells","")}for(let d=0;d<l.length;d++){let m=l[d].row[0],g=l[d].row[1],y=l[d].column[0],v=l[d].column[1];if(m==g&&y==v)continue;let b={};for(let k=m;k<=g;k++)for(let w=y;w<=v;w++){let x=f[k][w];if(x!=null&&x.mc!=null){let C=x.mc.r,S=x.mc.c;if("rs"in x.mc)delete x.mc,delete u.merge[C+"_"+S],b[C+"_"+S]=$.extend(!0,{},x);else{let _=JSON.parse(JSON.stringify(b[C+"_"+S]));delete _.v,delete _.m,delete _.ct,delete _.f,delete _.spl,f[k][w]=_}}}}a==t?(h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"mergeChange",sheetIndex:s.index,data:$.extend(!0,[],s.data),curData:f,range:l,config:$.extend(!0,{},s.config),curConfig:u})),h.clearjfundo=!1,Ze(f,l,{cfg:u}),h.clearjfundo=!0):(s.data=f,s.config=u)}function p0(e,n={}){if(["asc","desc"].indexOf(e)<0)return U.info("The type parameter must be included in ['asc', 'desc'","");let l=Z(h.currentSheetIndex),a=h.luckysheet_select_save[0],{range:o=a,order:s=l,success:u}=Ue({},n),f=h.luckysheetfile[s],d=$.extend(!0,{},f.config),m=$.extend(!0,[],f.data);if(m.length==0&&(m=$.extend(!0,[],ve.buildGridData(f))),o instanceof Array&&o.length>1){U.info(Q().sort.noRangeError,"");return}o&&typeof o=="string"&&p.iscelldata(o)&&(o=p.getcellrange(o));let g=o.row[0],y=o.row[1],v=o.column[0],b=o.column[1],k=!1,w=[];for(let C=g;C<=y;C++){let S=[];for(let _=v;_<=b;_++){if(m[C][_]!=null&&m[C][_].mc!=null){k=!0;break}S.push(m[C][_])}w.push(S)}if(k){U.info(Q().sort.mergeError,"");return}w=Hr([].concat(w),0,e==="asc");for(let C=g;C<=y;C++)for(let S=v;S<=b;S++)m[C][S]=w[C-g][S-v];let x={};d.rowlen!=null&&(d=yl(m,g,y,d),x={cfg:d,RowlChange:!0}),f.index==h.currentSheetIndex?Ze(m,[{row:[g,y],column:[v,b]}],x):(f.data=m,f.config=d),u&&typeof u=="function"&&u()}function g0(e,n,t={}){if(!n||!(n instanceof Array))return U.info("The sort parameter is invalid.","");let l=Z(h.currentSheetIndex),a=h.luckysheet_select_save[0],{range:o=a,order:s=l,success:u}=Ue({},t),f=h.luckysheetfile[s],d=$.extend(!0,{},f.config),m=$.extend(!0,[],f.data);if(m.length==0&&(m=$.extend(!0,[],ve.buildGridData(f))),o instanceof Array&&o.length>1){U.info(Q().sort.noRangeError,"");return}o&&typeof o=="string"&&p.iscelldata(o)&&(o=p.getcellrange(o));let g=o.row[0],y=o.row[1],v=o.column[0],b=o.column[1],k;e?k=g+1:k=g;let w=!1,x=[];for(let S=k;S<=y;S++){let _=[];for(let T=v;T<=b;T++){if(m[S][T]!=null&&m[S][T].mc!=null){w=!0;break}_.push(m[S][T])}x.push(_)}if(w){U.info(Q().sort.mergeError,"");return}n.forEach(S=>{let _=S.i;_-=v,x=Hr([].concat(x),_,S.sort==="asc")});for(let S=k;S<=y;S++)for(let _=v;_<=b;_++)m[S][_]=x[S-k][_-v];let C={};d.rowlen!=null&&(d=yl(m,k,y,d),C={cfg:d,RowlChange:!0}),f.index===h.currentSheetIndex?Ze(m,[{row:[k,y],column:[v,b]}],C):(f.data=m,f.config=d),u&&typeof u=="function"&&u()}function y0(e,n,t={}){if(!e||!["greaterThan","lessThan","betweenness","equal","textContains","occurrenceDate","duplicateValue","top10","top10%","last10","last10%","AboveAverage","SubAverage"].includes(e))return U.info("The conditionName parameter is invalid.","");if(P(n)!="array"||n.length==0)return U.info("The conditionValue parameter is invalid.","");let{format:a={textColor:"#000000",cellColor:"#ff0000"},cellrange:o=h.luckysheet_select_save,order:s=Z(h.currentSheetIndex),success:u}=Ue({},t);o=JSON.parse(JSON.stringify(o));let f=h.luckysheetfile[s],d=f.data;if((d==null||d.length==0)&&(d=ve.buildGridData(f)),f==null)return U.info("Incorrect worksheet index","");let m=Q().conditionformat,g=[],y=[];if(e=="betweenness"){let S=n[0],_=n[1],T=$e.getRangeByTxt(S);if(T.length>1){$e.infoDialog(m.onlySingleCell,"");return}else if(T.length==1){let R=T[0].row[0],I=T[0].row[1],F=T[0].column[0],z=T[0].column[1];if(R==I&&F==z)S=ze(R,F,d),g.push({row:T[0].row,column:T[0].column}),y.push(S);else{$e.infoDialog(m.onlySingleCell,"");return}}else if(T.length==0)if(isNaN(S)||S==""){$e.infoDialog(m.conditionValueCanOnly,"");return}else y.push(S);let A=$e.getRangeByTxt(_);if(A.length>1){$e.infoDialog(m.onlySingleCell,"");return}else if(A.length==1){let R=A[0].row[0],I=A[0].row[1],F=A[0].column[0],z=A[0].column[1];if(R==I&&F==z)_=ze(R,F,d),g.push({row:A[0].row,column:A[0].column}),y.push(_);else{$e.infoDialog(m.onlySingleCell,"");return}}else if(A.length==0)if(isNaN(_)||_==""){$e.infoDialog(m.conditionValueCanOnly,"");return}else y.push(_)}else if(e=="greaterThan"||e=="lessThan"||e=="equal"){let S=n[0],_=$e.getRangeByTxt(S);if(_.length>1){$e.infoDialog(m.onlySingleCell,"");return}else if(_.length==1){let T=_[0].row[0],A=_[0].row[1],R=_[0].column[0],I=_[0].column[1];if(T==A&&R==I)S=ze(T,R,d),g.push({row:_[0].row,column:_[0].column}),y.push(S);else{$e.infoDialog(m.onlySingleCell,"");return}}else if(_.length==0)if(isNaN(S)||S==""){$e.infoDialog(m.conditionValueCanOnly,"");return}else y.push(S)}else if(e=="textContains"){let S=n[0],_=$e.getRangeByTxt(S);if(_.length>1){$e.infoDialog(m.onlySingleCell,"");return}else if(_.length==1){let T=_[0].row[0],A=_[0].row[1],R=_[0].column[0],I=_[0].column[1];if(T==A&&R==I)S=ze(T,R,d),g.push({row:_[0].row,column:_[0].column}),y.push(S);else{$e.infoDialog(m.onlySingleCell,"");return}}else if(_.length==0)if(S==""){$e.infoDialog(m.conditionValueCanOnly,"");return}else y.push(S)}else if(e=="occurrenceDate"){let S=n[0],_=n[1];if(!Lt(S)||!Lt(_))return U.info("The conditionValue parameter is invalid.","");let T;ul(S,_)>0?T=(0,qi.default)(_).format("YYYY/MM/DD")+"-"+(0,qi.default)(S).format("YYYY/MM/DD"):T=(0,qi.default)(S).format("YYYY/MM/DD")+"-"+(0,qi.default)(_).format("YYYY/MM/DD"),y.push(T)}else if(e=="duplicateValue"){let S=n[0];if(S!="0"||S!="1")return U.info("The conditionValue parameter is invalid.","");y.push(S)}else if(e=="top10"||e=="top10%"||e=="last10"||e=="last10%"){let S=n[0];if(parseInt(S)!=S||parseInt(S)<1||parseInt(S)>1e3){$e.infoDialog(m.pleaseEnterInteger,"");return}y.push(parseInt(S))}else(e=="AboveAverage"||e=="SubAverage")&&y.push(e);if(!a.hasOwnProperty("textColor")||!a.hasOwnProperty("cellColor"))return U.info("The format parameter is invalid.","");if(P(o)=="string"?o=$e.getRangeByTxt(o):P(o)=="object"&&(o=[o]),P(o)!="array")return U.info("The cellrange parameter is invalid.","");let v={type:"default",cellrange:o,format:a,conditionName:e,conditionRange:g,conditionValue:y},b=$.extend(!0,[],h.luckysheetfile),k=$e.getHistoryRules(b),w=f.luckysheet_conditionformat_save||[];w.push(v),f.luckysheet_conditionformat_save=w;let x=$.extend(!0,[],h.luckysheetfile),C=$e.getCurrentRules(x);$e.ref(k,C),ne.allowUpdate&&ne.saveParam("all",f.index,w,{k:"luckysheet_conditionformat_save"}),u&&typeof u=="function"&&u()}function v0(e,n={}){if(!e||!["dataBar","colorGradation","icons"].includes(e))return U.info("The type parameter is invalid.","");let{format:l,cellrange:a=h.luckysheet_select_save,order:o=Z(h.currentSheetIndex),success:s}=Ue({},n);a=JSON.parse(JSON.stringify(a));let u=h.luckysheetfile[o];if(u==null)return U.info("Incorrect worksheet index","");if(e=="dataBar"){if(l==null&&(l=["#638ec6","#ffffff"]),P(l)!="array"||l.length<1||l.length>2)return U.info("The format parameter is invalid.","")}else if(e=="colorGradation"){if(l==null&&(l=["rgb(99, 190, 123)","rgb(255, 235, 132)","rgb(248, 105, 107)"]),P(l)!="array"||l.length<2||l.length>3)return U.info("The format parameter is invalid.","")}else if(e=="icons"){l==null&&(l="threeWayArrowMultiColor");let b=["threeWayArrowMultiColor","threeTriangles","fourWayArrowMultiColor","fiveWayArrowMultiColor","threeWayArrowGrayColor","fourWayArrowGrayColor","fiveWayArrowGrayColor","threeColorTrafficLightRimless","threeSigns","greenRedBlackGradient","threeColorTrafficLightBordered","fourColorTrafficLight","threeSymbolsCircled","tricolorFlag","threeSymbolsnoCircle","threeStars","fiveQuadrantDiagram","fiveBoxes","grade4","grade5"];if(P(l)!="string"||!b.includes(l))return U.info("The format parameter is invalid.","");switch(l){case"threeWayArrowMultiColor":l={len:3,leftMin:0,top:0};break;case"threeTriangles":l={len:3,leftMin:0,top:1};break;case"fourWayArrowMultiColor":l={len:4,leftMin:0,top:2};break;case"fiveWayArrowMultiColor":l={len:5,leftMin:0,top:3};break;case"threeWayArrowGrayColor":l={len:3,leftMin:5,top:0};break;case"fourWayArrowGrayColor":l={len:4,leftMin:5,top:1};break;case"fiveWayArrowGrayColor":l={len:5,leftMin:5,top:2};break;case"threeColorTrafficLightRimless":l={len:3,leftMin:0,top:4};break;case"threeSigns":l={len:3,leftMin:0,top:5};break;case"greenRedBlackGradient":l={len:4,leftMin:0,top:6};break;case"threeColorTrafficLightBordered":l={len:3,leftMin:5,top:4};break;case"fourColorTrafficLight":l={len:4,leftMin:5,top:5};break;case"threeSymbolsCircled":l={len:3,leftMin:0,top:7};break;case"tricolorFlag":l={len:3,leftMin:0,top:8};break;case"threeSymbolsnoCircle":l={len:3,leftMin:5,top:7};break;case"threeStars":l={len:3,leftMin:0,top:9};break;case"fiveQuadrantDiagram":l={len:5,leftMin:0,top:10};break;case"fiveBoxes":l={len:5,leftMin:0,top:11};break;case"grade4":l={len:4,leftMin:5,top:9};break;case"grade5":l={len:5,leftMin:5,top:10};break}}if(P(a)=="string"?a=$e.getRangeByTxt(a):P(a)=="object"&&(a=[a]),P(a)!="array")return U.info("The cellrange parameter is invalid.","");let f={type:e,cellrange:a,format:l},d=$.extend(!0,[],h.luckysheetfile),m=$e.getHistoryRules(d),g=u.luckysheet_conditionformat_save||[];g.push(f),u.luckysheet_conditionformat_save=g;let y=$.extend(!0,[],h.luckysheetfile),v=$e.getCurrentRules(y);$e.ref(m,v),ne.allowUpdate&&ne.saveParam("all",u.index,g,{k:"luckysheet_conditionformat_save"}),s&&typeof s=="function"&&s()}function b0(e,n={}){if(!B(e))return U.info("The itemIndex parameter is invalid.","");e=Number(e);let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=$.extend(!0,[],a.luckysheet_conditionformat_save);if(o.length==0)return U.info("This worksheet has no conditional format to delete","");if(o[e]==null)return U.info("The conditional format of the index cannot be found","");let s=o.splice(e,1),u=$.extend(!0,[],h.luckysheetfile),f=$e.getHistoryRules(u);a.luckysheet_conditionformat_save=o;let d=$.extend(!0,[],h.luckysheetfile),m=$e.getCurrentRules(d);return $e.ref(f,m),ne.allowUpdate&&ne.saveParam("all",a.index,ruleArr,{k:"luckysheet_conditionformat_save"}),setTimeout(()=>{l&&typeof l=="function"&&l()},1),s}function k0(e={}){let{range:n=h.luckysheet_select_save,order:t=Z(h.currentSheetIndex),success:l}=Ue({},e);if(n=JSON.parse(JSON.stringify(n)),P(n)=="string"){if(!p.iscelldata(n))return U.info("The range parameter is invalid.","");let f=p.getcellrange(n);n=[{row:f.row,column:f.column}]}else if(P(n)=="object"){if(n.row==null||n.column==null)return U.info("The range parameter is invalid.","");n=[{row:n.row,column:n.column}]}if(P(n)!="array")return U.info("The range parameter is invalid.","");let a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=$.extend(!0,{},a.config),s=!1;for(let f=0;f<n.length;f++){let d=n[f].row[0],m=n[f].row[1],g=n[f].column[0],y=n[f].column[1];if(s=Mt(o,d,m,g,y),s)break}if(s)return U.info("Cannot perform this operation on partially merged cells","");let u=$.extend(!0,[],a.data);u.length==0&&(u=$.extend(!0,[],ve.buildGridData(a)));for(let f=0;f<n.length;f++){let d=n[f].row[0],m=n[f].row[1],g=n[f].column[0],y=n[f].column[1];for(let v=d;v<=m;v++)for(let b=g;b<=y;b++){let k=u[v][b];P(k)=="object"?(delete k.m,delete k.v,k.f!=null&&(delete k.f,p.delFunctionGroup(v,b,a.index),delete k.spl),k.ct!=null&&k.ct.t=="inlineStr"&&delete k.ct):u[v][b]=null}}a.index==h.currentSheetIndex?Ze(u,n):a.data=u,l&&typeof l=="function"&&l()}function w0(e,n={}){if(!["left","up"].includes(e))return U.info("The move parameter is invalid.","");let{range:l=h.luckysheet_select_save[h.luckysheet_select_save.length-1],order:a=Z(h.currentSheetIndex),success:o}=Ue({},n);if(P(l)=="string"){if(!p.iscelldata(l))return U.info("The range parameter is invalid.","");let g=p.getcellrange(l);l={row:g.row,column:g.column}}if(P(l)!="object"||l.row==null||l.column==null)return U.info("The range parameter is invalid.","");if(h.luckysheetfile[a]==null)return U.info("The order parameter is invalid.","");let u=l.row[0],f=l.row[1],d=l.column[0],m=l.column[1];e=="left"?ha("moveLeft",u,f,d,m,a):e=="up"&&ha("moveUp",u,f,d,m,a),o&&typeof o=="function"&&o()}function x0(e,n={}){if(!e||["flipUpDown","flipLeftRight","flipClockwise","flipCounterClockwise","transpose","deleteZeroByRow","deleteZeroByColumn","removeDuplicateByRow","removeDuplicateByColumn","newMatrix"].indexOf(e)<0)return U.info("The type parameter is invalid.","");let l=h.luckysheet_select_save[0],{range:a=l,success:o}=Ue({},n);if(a instanceof Array&&a.length>1){U.info(Q().drag.noMulti,"");return}a&&typeof a=="string"&&p.iscelldata(a)&&(a=p.getcellrange(a));let s=Pt(a),u=[];if(s.length===0)return;let f,d,m;switch(e){case"flipUpDown":for(let g=s.length-1;g>=0;g--){let y=[];for(let v=0;v<s[0].length;v++){let b="";s[g]!=null&&s[g][v]!=null&&(b=s[g][v]),y.push(b)}u.push(y)}break;case"flipLeftRight":for(let g=0;g<s.length;g++){let y=[];for(let v=s[0].length-1;v>=0;v--){let b="";s[g]!=null&&s[g][v]!=null&&(b=s[g][v]),y.push(b)}u.push(y)}break;case"flipClockwise":for(let g=0;g<s[0].length;g++){let y=[];for(let v=s.length-1;v>=0;v--){let b="";s[v]!=null&&s[v][g]!=null&&(b=s[v][g]),y.push(b)}u.push(y)}break;case"flipCounterClockwise":for(let g=s[0].length-1;g>=0;g--){let y=[];for(let v=0;v<s.length;v++){let b="";s[v]!=null&&s[v][g]!=null&&(b=s[v][g]),y.push(b)}u.push(y)}break;case"transpose":for(let g=0;g<s[0].length;g++){let y=[];for(let v=0;v<s.length;v++){let b="";s[v]!=null&&s[v][g]!=null&&(b=s[v][g]),y.push(b)}u.push(y)}break;case"deleteZeroByRow":f=s[0].length;for(let g=0;g<s.length;g++){let y=[],v=!0,b=!0;for(let w=0;w<f;w++){let x="";if(s[g]!=null&&s[g][w]!=null){if(x=s[g][w],(x.v=="0"||x.v==0)&&v)continue;v=!1}y.push(x)}let k=[];if(y.length==f)k=y;else{for(let x=y.length-1;x>=0;x--){let C="";if(y[x]!=null){if(C=y[x],(C.v=="0"||C.v==0)&&b)continue;b=!1}k.unshift(C)}let w=f-k.length;for(let x=0;x<w;x++)k.push("")}u.push(k)}break;case"deleteZeroByColumn":f=s.length,d=s[0].length;for(let g=0;g<d;g++){let y=[],v=!0,b=!0;for(let w=0;w<f;w++){let x="";if(s[w]!=null&&s[w][g]!=null){if(x=s[w][g],(x.v=="0"||x.v==0)&&v)continue;v=!1}y.push(x)}let k=[];if(y.length==f)k=y;else{for(let x=y.length-1;x>=0;x--){let C="";if(y[x]!=null){if(C=y[x],(C.v=="0"||C.v==0)&&b)continue;b=!1}k.unshift(C)}let w=f-k.length;for(let x=0;x<w;x++)k.push("")}u.push(k)}m=[];for(let g=0;g<u[0].length;g++){let y=[];for(let v=0;v<u.length;v++){let b="";u[v]!=null&&u[v][g]!=null&&(b=u[v][g]),y.push(b)}m.push(y)}break;case"removeDuplicateByRow":f=s[0].length;for(let g=0;g<s.length;g++){let y=[],v={};for(let k=0;k<f;k++){let w=null;s[g]!=null&&s[g][k]!=null&&(w=s[g][k],w.v in v||(v[w.v]=[]),v[w.v].push(w))}for(let k=0;k<f;k++){let w=null;s[g]!=null&&s[g][k]!=null&&(w=s[g][k],v[w.v].length==1&&y.push(w))}let b=f-y.length;for(let k=0;k<b;k++)y.push(null);u.push(y)}break;case"removeDuplicateByColumn":d=s[0].length,f=s.length;for(let g=0;g<d;g++){let y=[],v={};for(let k=0;k<f;k++){let w=null;s[k]!=null&&s[k][g]!=null&&(w=s[k][g],w.v in v||(v[w.v]=[]),v[w.v].push(w))}for(let k=0;k<f;k++){let w=null;s[k]!=null&&s[k][g]!=null&&(w=s[k][g],v[w.v].length==1&&y.push(w))}a1=y;let b=f-a1.length;for(let k=0;k<b;k++)a1.push(null);u.push(a1)}m=[];for(let g=0;g<u[0].length;g++){let y=[];for(let v=0;v<u.length;v++){let b=null;u[v]!=null&&u[v][g]!=null&&(b=u[v][g]),y.push(b)}m.push(y)}break;case"newMatrix":console.log("TODO");break}xe.controlHandler(u,a),o&&typeof o=="function"&&o()}function _0(e,n,t={}){if(!e||["plus","minus","multiply","divided","power","root","log"].indexOf(e)<0)return U.info("The type parameter is invalid.","");if(!B(n))return U.info("The number parameter is invalid.","");let a=h.luckysheet_select_save[0],{range:o=a,success:s}=Ue({},t);if(o instanceof Array&&o.length>1){U.info(Q().drag.noMulti,"");return}o&&typeof o=="string"&&p.iscelldata(o)&&(o=p.getcellrange(o));let u=Pt(o);if(u.length==0)return;let f=[];for(let d=0;d<u.length;d++){let m=[];for(let g=0;g<u[0].length;g++){let y="";u[d]!=null&&u[d][g]!=null&&(y=u[d][g],parseInt(y)!=null&&u[d][g].ct!=null&&u[d][g].ct.t=="n"&&(e=="minus"?y.v=y.v-n:e=="multiply"?y.v=y.v*n:e=="divided"?y.v=numFormat(y.v/n,4):e=="power"?y.v=Math.pow(y.v,n):e=="root"?n==2?y.v=numFormat(Math.sqrt(y.v),4):n==3&&Math.cbrt?y.v=numFormat(Math.cbrt(y.v),4):y.v=numFormat(jfnqrt(y.v,n),4):e=="log"?y.v=numFormat(Math.log(y.v)*1e4/Math.log(Math.abs(n)),4):y.v=y.v+n,y.v==null?y.m="":y.m=y.v.toString())),m.push(y)}f.push(m)}xe.controlHandler(f,o),s&&typeof s=="function"&&s()}function C0(e={}){let n=h.luckysheetfile.length-1,{sheetObject:t={},order:l=n,success:a}=Ue({},e);if(!B(l))return U.info("Parameter is not a table index","");l=Number(l);let o=ve.generateRandomSheetIndex();t.calcChain&&t.calcChain.length>0&&t.calcChain.forEach(d=>{d.index=o});let s=ve.generateRandomSheetName(h.luckysheetfile,!1);if(t.name){let d=!1;for(let m=0;m<h.luckysheetfile.length;m++)if(h.luckysheetfile[m].name==t.name){d=!0;break}d||(s=t.name)}$("#luckysheet-sheet-container-c").append(_e(Ql,{index:o,active:"",name:s,style:"",colorset:""}));let u={name:"",color:"",status:"0",order:"",index:"",celldata:[],row:h.defaultrowNum,column:h.defaultcolumnNum,config:{},pivotTable:null,isPivotTable:!1};if(u=$.extend(!0,u,t),u.index=o,u.name=s,u.order=l,l<=0){let d=h.luckysheetfile[0].index,m=$("#luckysheet-sheets-item"+d);$("#luckysheet-sheets-item"+o).insertBefore(m),h.luckysheetfile.splice(0,0,u)}else{l>h.luckysheetfile.length&&(l=h.luckysheetfile.length);let d=h.luckysheetfile[l-1].index,m=$("#luckysheet-sheets-item"+d);$("#luckysheet-sheets-item"+o).insertAfter(m),h.luckysheetfile.splice(l,0,u)}let f={};if(h.luckysheetfile.forEach((d,m,g)=>{g[m].order=m,f[d.index.toString()]=m}),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),$("#luckysheet-sheets-item"+o).addClass("luckysheet-sheets-item-active"),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+o+'" class="luckysheet-datavisual-selection-set"></div>'),rl(!0),ne.saveParam("sha",null,$.extend(!0,{},u)),ne.saveParam("shr",null,f),h.clearjfundo){h.jfundo.length=0;let d={};d.type="addSheet",d.sheetconfig=$.extend(!0,{},u),d.index=o,d.currentSheetIndex=h.currentSheetIndex,h.jfredo.push(d)}return ve.changeSheetExec(o,!1,!0),a&&typeof a=="function"&&a(),u}function T0(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e),l=h.luckysheetfile[n];return l==null?U.info("The order parameter is invalid.",""):h.luckysheetfile.length===1?U.info(Q().sheetconfig.noMoreSheet,""):(ve.deleteSheet(l.index),setTimeout(()=>{t&&typeof t=="function"&&t()},1),l)}function S0(e={}){let{targetOrder:n,order:t=Z(h.currentSheetIndex),success:l}=Ue({},e),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");if(n==null&&(n=t+1),!B(n))return U.info("The targetOrder parameter is invalid.","");let o=a.index,s=ve.generateRandomSheetIndex(),u=$.extend(!0,{},a);u.order=h.luckysheetfile.length,u.index=s,u.name=ve.generateCopySheetName(h.luckysheetfile,u.name);let f="";u.color!=null&&(f='<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+u.color+';"></div>');let d=$("#luckysheet-sheets-item"+o);if(B(n)&&(d=$("#luckysheet-sheets-item"+h.luckysheetfile[n-1].index)),$("#luckysheet-sheet-container-c").append(_e(Ql,{index:u.index,active:"",name:u.name,order:u.order,style:"",colorset:f})),$("#luckysheet-sheets-item"+u.index).insertAfter(d),h.luckysheetfile.splice(n,0,u),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),$("#luckysheet-sheets-item"+s).addClass("luckysheet-sheets-item-active"),$("#luckysheet-cell-main").append('<div id="luckysheet-datavisual-selection-set-'+s+'" class="luckysheet-datavisual-selection-set"></div>'),rl(!0),ne.saveParam("shc",s,{copyindex:o,name:u.name}),ve.changeSheetExec(s),ve.reOrderAllSheet(),h.clearjfundo)h.jfredo.push({type:"copySheet",copyindex:o,index:u.index,sheetIndex:u.index});else if(h.jfredo.length>0){let m=h.jfredo[h.jfredo.length-1];m.type=="copySheet"&&(m.index=u.index,m.sheetIndex=u.index)}return setTimeout(()=>{l&&typeof l=="function"&&l()},1),u}function $0(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e),l=h.luckysheetfile[n];return l==null?U.info("The order parameter is invalid.",""):(ve.setSheetHide(l.index),setTimeout(()=>{t&&typeof t=="function"&&t()},1),l)}function I0(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e),l=h.luckysheetfile[n];return l==null?U.info("The order parameter is invalid.",""):(ve.setSheetShow(l.index),setTimeout(()=>{t&&typeof t=="function"&&t()},1),l)}function R0(e,n={}){if(e==null||!B(e)||h.luckysheetfile[e]==null)return U.info("The order parameter is invalid.","");let t=h.luckysheetfile[e],{success:l}=Ue({},n);return $("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),$("#luckysheet-sheets-item"+t.index).addClass("luckysheet-sheets-item-active"),ve.changeSheet(t.index),setTimeout(()=>{l&&typeof l=="function"&&l()},1),ne.multipleRangeShow(),t}function A0(e,n={}){if(P(e)!="string"||e.toString().length==0)return U.info("The name parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=a.name;if(a.name=e,$("#luckysheet-sheets-item"+a.index+" .luckysheet-sheets-item-name").text(e),ne.saveParam("all",a.index,e,{k:"name"}),h.clearjfundo){let s={};s.type="sheetName",s.sheetIndex=a.index,s.oldtxt=o,s.txt=e,h.jfundo.length=0,h.jfredo.push(s)}l&&typeof l=="function"&&l()}function D0(e,n={}){if(P(e)!="string"||e.toString().length==0)return U.info("The color parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=a.color;if(a.color=e,$("#luckysheet-sheets-item"+a.index).find(".luckysheet-sheets-item-color").remove(),$("#luckysheet-sheets-item"+a.index).append('<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+e+';"></div>'),ne.saveParam("all",a.index,e,{k:"color"}),h.clearjfundo){let s={};s.type="sheetColor",s.sheetIndex=a.index,s.oldcolor=o,s.color=e,h.jfundo.length=0,h.jfredo.push(s)}l&&typeof l=="function"&&l()}function M0(e,n={}){if(e!="left"&&e!="right"&&!B(e))return U.info("Type parameter not available","");B(e)&&(e=parseInt(e));let t=Z(h.currentSheetIndex),{order:l=t,success:a}=Ue({},n),o=h.luckysheetfile[l];if(o==null)return U.info("ncorrect worksheet index","");let s=o.index;if(e=="left"){if(l==0)return;let f=h.luckysheetfile[l-1].index;$("#luckysheet-sheets-item"+s).insertBefore($("#luckysheet-sheets-item"+f)),h.luckysheetfile.splice(l,1),h.luckysheetfile.splice(l-1,0,o)}else if(e=="right"){if(l==h.luckysheetfile.length-1)return;let f=h.luckysheetfile[l+1].index;$("#luckysheet-sheets-item"+s).insertAfter($("#luckysheet-sheets-item"+f)),h.luckysheetfile.splice(l,1),h.luckysheetfile.splice(l+1,0,o)}else{if(e<0&&(e=0),e>h.luckysheetfile.length-1&&(e=h.luckysheetfile.length-1),e==l)return;if(e<l){let f=h.luckysheetfile[e].index;$("#luckysheet-sheets-item"+s).insertBefore($("#luckysheet-sheets-item"+f))}else{let f=h.luckysheetfile[e].index;$("#luckysheet-sheets-item"+s).insertAfter($("#luckysheet-sheets-item"+f))}h.luckysheetfile.splice(l,1),h.luckysheetfile.splice(e,0,o)}let u={};h.luckysheetfile.forEach((f,d,m)=>{m[d].order=d,u[f.index.toString()]=d}),ne.saveParam("shr",null,u),a&&typeof a=="function"&&a()}function F0(e,n={}){if(e==null||e.length==0)return U.info("Type orderList not available","");let t={};e.forEach(o=>{t[o.index.toString()]=o.order}),h.luckysheetfile.sort((o,s)=>{let u=t[o.index.toString()],f=t[s.index.toString()];return u!=null&&f!=null?u-f:u!=null?-1:(f!=null,1)});let l={};h.luckysheetfile.forEach((o,s,u)=>{if(u[s].order=s,l[o.index.toString()]=s,s>0){let f=u[s-1].index;$("#luckysheet-sheets-item"+o.index).insertAfter($("#luckysheet-sheets-item"+f))}}),ne.saveParam("shr",null,l);let{success:a}=Ue({},n);a&&typeof a=="function"&&a()}function E0(e,n={}){if(!B(e)||e<.1||e>4)return U.info("The zoom parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");if(a.zoomRatio=e,ne.saveParam("all",a.index,e,{k:"zoomRatio"}),a.index==h.currentSheetIndex){h.zoomRatio=e;let o=ve.getSheetByIndex();Re.images=o.images,Re.allImagesShow(),Re.init(),ir(),Za()}l&&typeof l=="function"&&l()}function N0(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e),l=h.luckysheetfile[n];return l==null?U.info("The order parameter is invalid.",""):(l.showGridLines=!0,l.index==h.currentSheetIndex&&(h.showGridLines=!0,setTimeout(function(){Be()},1)),setTimeout(()=>{t&&typeof t=="function"&&t()},1),l)}function P0(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e),l=h.luckysheetfile[n];return l==null?U.info("The order parameter is invalid.",""):(l.showGridLines=!1,l.index==h.currentSheetIndex&&(h.showGridLines=!1,setTimeout(function(){Be()},1)),setTimeout(()=>{t&&typeof t=="function"&&t()},1),l)}function L0(e={}){Ze();let{success:n}=Ue({},e);n&&typeof n=="function"&&n()}function z0(e={}){let{scrollLeft:n,scrollTop:t,targetRow:l,targetColumn:a,success:o}=Ue({},e);if(n!=null){if(!B(n))return U.info("The scrollLeft parameter is invalid.","");$("#luckysheet-scrollbar-x").scrollLeft(n)}else if(a!=null){if(!B(a))return U.info("The targetColumn parameter is invalid.","");let s=h.visibledatacolumn[a],u=a<=0?0:h.visibledatacolumn[a-1];$("#luckysheet-scrollbar-x").scrollLeft(u)}if(t!=null){if(!B(t))return U.info("The scrollTop parameter is invalid.","");$("#luckysheet-scrollbar-y").scrollTop(t)}else if(l!=null){if(!B(l))return U.info("The targetRow parameter is invalid.","");let s=h.visibledatarow[l],u=l<=0?0:h.visibledatarow[l-1];$("#luckysheet-scrollbar-y").scrollTop(u)}o&&typeof o=="function"&&o()}function O0(e={}){zt();let{success:n}=Ue({},e);n&&typeof n=="function"&&n()}function B0(e={}){let{range:n=h.luckysheet_select_save[h.luckysheet_select_save.length-1]}=Ue({},e);if(P(n)=="string"){if(!p.iscelldata(n))return U.info("The range parameter is invalid.","");let w=p.getcellrange(n);n={row:w.row,column:w.column}}if(P(n)!="object"||n.row==null||n.column==null)return U.info("The range parameter is invalid.","");let t=n.row[0],l=n.row[1],a=n.column[0],o=n.column[1];if(Mt(h.config,t,l,a,o))return U.info("Cannot perform this operation on partially merged cells","");let u=h.visibledatarow,f=h.visibledatacolumn,d,m;t-1<0?(d=0,m=u[l]):(d=u[t-1],m=u[l]-u[t-1]);let g,y;a-1<0?(g=0,y=f[o]):(g=f[a-1],y=f[o]-f[a-1]);let v=$("<canvas>").attr({width:Math.ceil(y*h.devicePixelRatio),height:Math.ceil(m*h.devicePixelRatio)}).css({width:y,height:m});nr(g,d,y,m,1,1,null,null,v);let b=v.get(0).getContext("2d");return b.beginPath(),b.moveTo(0,0),b.lineTo(0,h.devicePixelRatio*m),b.lineWidth=h.devicePixelRatio*2,b.strokeStyle=Sl.strokeStyle,b.stroke(),b.closePath(),b.beginPath(),b.moveTo(0,0),b.lineTo(h.devicePixelRatio*y,0),b.lineWidth=h.devicePixelRatio*2,b.strokeStyle=Sl.strokeStyle,b.stroke(),b.closePath(),v.get(0).toDataURL("image/png")}function H0(e,n={}){if(e==null||e.toString().length==0)return U.info("The name parameter is invalid.","");$("#luckysheet_info_detail_input").val(e);let{success:t}=Ue({},n);t&&typeof t=="function"&&t()}function V0(e={}){let n="",t=$("#luckysheet_info_detail_input");if(t.length==0)return U.info("Failed to get workbook name, label loading failed!"),n;n=$.trim(t.val());let{success:l}=Ue({},e);return setTimeout(()=>{l&&typeof l=="function"&&l()},1),n}function q0(e={}){let n=$.extend(!0,{},h.jfredo[h.jfredo.length-1]);Tn.redo(new Event("custom")),Mr();let{success:t}=Ue({},e);return setTimeout(()=>{t&&typeof t=="function"&&t()},1),n}function j0(e={}){let n=$.extend(!0,{},h.jfundo[h.jfundo.length-1]);Tn.undo(new Event("custom")),Mr();let{success:t}=Ue({},e);return setTimeout(()=>{t&&typeof t=="function"&&t()},1),n}function lm(){let e=$.extend(!0,[],h.luckysheetfile);return e.forEach((n,t,l)=>{n.data!=null&&n.data.length>0&&(n.celldata=ve.getGridData(n.data)),delete n.load,delete n.freezen}),e}function U0(e={}){let{index:n,order:t,name:l}=Ue({},e);return n!=null?ve.getSheetByIndex(n):t!=null?h.luckysheetfile[t]:l!=null?ve.getSheetByName(l):ve.getSheetByIndex()}function G0(e={}){let{order:n=Z(h.currentSheetIndex)}=Ue({},e),t=h.luckysheetfile[n];if(t==null)return U.info("The order parameter is invalid.","");let l=$.extend(!0,[],t.data);return(l==null||l.length==0)&&(l=$.extend(!0,[],ve.buildGridData(t))),l}function W0(e={}){let{order:n=Z(h.currentSheetIndex)}=Ue({},e),t=h.luckysheetfile[n];return t==null?U.info("The order parameter is invalid.",""):$.extend(!0,{},t.config)}function Y0(e,n={}){if(P(e)!="object")return U.info("The cfg parameter is invalid.","");let{order:t=Z(h.currentSheetIndex),success:l}=Ue({},n),a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");a.config=e,a.index==h.currentSheetIndex&&(h.config=e,("rowhidden"in e||"colhidden"in e||"rowlen"in e||"columnlen"in e)&&St(h.flowdata.length,h.flowdata[0].length),setTimeout(function(){Be()},1)),l&&typeof l=="function"&&l()}function X0(){return Et()}function K0(e,n={}){if(P(e)!="object")return U.info("The optionItem parameter is invalid.","");let{type:t,type2:l=null,value1:a="",value2:o="",remote:s=!1,prohibitInput:u=!1,hintShow:f=!1,hintText:d="",checked:m=!1}=Ue({},e),g=["dropdown","checkbox","number","number_integer","number_decimal","text_content","text_length","date","validity"],y=["bw","nb","eq","ne","gt","lt","gte","lte"],v=["include","exclude","equal"],b=["bw","nb","eq","ne","bf","nbf","af","naf"],k=["card","phone"];if(!g.includes(t))return U.info("The optionItem.type parameter is invalid.","");let w=Q().dataVerification;if(t=="dropdown"){if(a.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo1);return}}else if(t=="checkbox"){if(a.length==0||o.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo2);return}}else if(t=="number"||t=="number_integer"||t=="number_decimal"){if(!y.includes(l))return U.info("The optionItem.type2 parameter is invalid.","");if(!B(a)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo3);return}if(l=="bw"||l=="nb"){if(!B(o)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo3);return}if(Number(o)<Number(a)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo4);return}}}else if(t=="text_content"){if(!v.includes(l))return U.info("The optionItem.type2 parameter is invalid.","");if(a.length==0){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo5);return}}else if(t=="text_length"){if(!y.includes(l))return U.info("The optionItem.type2 parameter is invalid.","");if(!B(a)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo3);return}if(l=="bw"||l=="nb"){if(!B(o)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo3);return}if(Number(o)<Number(a)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo4);return}}}else if(t=="date"){if(!b.includes(l))return U.info("The optionItem.type2 parameter is invalid.","");if(!Lt(a)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo6);return}if(l=="bw"||l=="nb"){if(!Lt(o)){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo6);return}if(ul(a,o)>0){U.info('<i class="fa fa-exclamation-triangle"></i>',w.tooltipInfo7);return}}}else if(t=="validity"&&!k.includes(l))return U.info("The optionItem.type2 parameter is invalid.","");if(P(s)!="boolean")return U.info("The optionItem.remote parameter is invalid.","");if(P(u)!="boolean")return U.info("The optionItem.prohibitInput parameter is invalid.","");if(P(f)!="boolean")return U.info("The optionItem.hintShow parameter is invalid.","");let{range:x=h.luckysheet_select_save[h.luckysheet_select_save.length-1],order:C=Z(h.currentSheetIndex),success:S}=Ue({},n);if(P(x)=="string"){if(!p.iscelldata(x))return U.info("The range parameter is invalid.","");let E=p.getcellrange(x);x={row:E.row,column:E.column}}if(P(x)!="object"||x.row==null||x.column==null)return U.info("The range parameter is invalid.","");let _=h.luckysheetfile[C];if(_==null)return U.info("The order parameter is invalid.","");let T={type:t,type2:l,value1:a,value2:o,checked:m,remote:s,prohibitInput:u,hintShow:f,hintText:d},A=$.extend(!0,{},_.dataVerification),R=$.extend(!0,[],_.data);R.length==0&&(R=ve.buildGridData(_));let I=x.row[0],F=x.row[1],z=x.column[0],M=x.column[1];for(let E=I;E<=F;E++)for(let N=z;N<=M;N++)A[E+"_"+N]=T,t=="checkbox"&&(T.checked?Ht(E,N,R,T.value1):Ht(E,N,R,T.value2));if(_.index==h.currentSheetIndex){let E=$.extend(!0,{},_.dataVerification);t=="checkbox"?Ye.refOfCheckbox(E,A,h.currentSheetIndex,R,x):Ye.ref(E,A,h.currentSheetIndex)}else _.dataVerification=A,_.data=R;S&&typeof S=="function"&&S()}function Z0(e={}){let{range:n=h.luckysheet_select_save[h.luckysheet_select_save.length-1],order:t=Z(h.currentSheetIndex),success:l}=Ue({},e);if(P(n)=="string"){if(!p.iscelldata(n))return U.info("The range parameter is invalid.","");let m=p.getcellrange(n);n={row:m.row,column:m.column}}if(P(n)!="object"||n.row==null||n.column==null)return U.info("The range parameter is invalid.","");let a=h.luckysheetfile[t];if(a==null)return U.info("The order parameter is invalid.","");let o=$.extend(!0,{},a.dataVerification),s=n.row[0],u=n.row[1],f=n.column[0],d=n.column[1];for(let m=s;m<=u;m++)for(let g=f;g<=d;g++)delete o[m+"_"+g];if(a.index==h.currentSheetIndex){let m=$.extend(!0,{},a.dataVerification);Ye.ref(m,o,h.currentSheetIndex)}else a.dataVerification=o;l&&typeof l=="function"&&l()}function J0(e,n={}){let{order:t=Z(h.currentSheetIndex),rowIndex:l,colIndex:a,success:o}=Ue({},n),s=h.luckysheetfile[t];if(s==null)return U.info("The order parameter is invalid.","");if(s.index==h.currentSheetIndex){let u=h.luckysheet_select_save[h.luckysheet_select_save.length-1];l==null&&(l=u.row_focus||0),l<0&&(l=0),l>h.visibledatarow.length&&(l=h.visibledatarow.length),a==null&&(a=u.column_focus||0),a<0&&(a=0),a>h.visibledatacolumn.length&&(a=h.visibledatacolumn.length);let f=a==0?0:h.visibledatacolumn[a-1],d=l==0?0:h.visibledatarow[l-1],m=new Image;m.onload=function(){let g=m.width,y=m.height,v={src:e,left:f,top:d,originWidth:g,originHeight:y};Re.addImgItem(v),o&&typeof o=="function"&&o()},m.src=e}else{let u=s.images||{},f=s.config,d=s.zoomRatio||1,m=s.row,g=s.visibledatarow||[];if(g.length===0){let x=0;for(let C=0;C<m;C++){let S=h.defaultrowlen;if(f.rowlen!=null&&f.rowlen[C]!=null&&(S=f.rowlen[C]),f.rowhidden!=null&&f.rowhidden[C]!=null){g.push(x);continue}x+=Math.round((S+1)*d),g.push(x)}}let y=s.column,v=s.visibledatacolumn||[];if(v.length===0){let x=0;for(let C=0;C<y;C++){let S=h.defaultcollen;if(f.columnlen!=null&&f.columnlen[C]!=null&&(S=f.columnlen[C]),f.colhidden!=null&&f.colhidden[C]!=null){v.push(x);continue}x+=Math.round((S+1)*d),v.push(x)}}l==null&&(l=0),l<0&&(l=0),l>g.length&&(l=g.length),a==null&&(a=0),a<0&&(a=0),a>v.length&&(a=v.length);let b=a==0?0:v[a-1],k=l==0?0:g[l-1],w=new Image;w.onload=function(){let x={src:e,left:b,top:k,originWidth:w.width,originHeight:w.height},C,S,_=400;x.originHeight<x.originWidth?(S=Math.round(x.originHeight*(_/x.originWidth)),C=_):(C=Math.round(x.originWidth*(_/x.originHeight)),S=_);let T=$.extend(!0,{},Re.imgItem);T.src=x.src,T.originWidth=x.originWidth,T.originHeight=x.originHeight,T.default.width=C,T.default.height=S,T.default.left=x.left,T.default.top=x.top,T.crop.width=C,T.crop.height=S;let A=Re.generateRandomId();u[A]=T,s.images=u,o&&typeof o=="function"&&o()},w.src=e}}function Q0(e={}){let{order:n=Z(h.currentSheetIndex),idList:t="all",success:l}=Ue({},e),a=h.luckysheetfile[n];if(a==null)return U.info("The order parameter is invalid.","");let o=a.images;if(o==null)return U.info("The worksheet has no pictures to delete.","");if(t!="all"&&P(t)!="array")return U.info("The idList parameter is invalid.","");P(t)=="array"?t.forEach(s=>{delete o[s]}):o=null,a.images=o,a.index==h.currentSheetIndex&&(Re.currentImgId!=null&&(t=="all"||t.includes(Re.currentImgId))&&($("#luckysheet-modal-dialog-activeImage").hide(),$("#luckysheet-modal-dialog-cropping").hide(),$("#luckysheet-modal-dialog-slider-imageCtrl").hide()),Re.images=o,Re.allImagesShow(),Re.init()),l&&typeof l=="function"&&l()}function eb(e={}){let{order:n=Z(h.currentSheetIndex),success:t}=Ue({},e),l=h.luckysheetfile[n];return l==null?U.info("The order parameter is invalid.",""):(setTimeout(function(){t&&typeof t=="function"&&t()},1),l.images)}function tb(e,n={}){let{success:t}=Ue({},n);return setTimeout(()=>{t&&typeof t=="function"&&t()},0),ve.getGridData(e)}function lb(e,n={}){let{success:t}=Ue({},n);return setTimeout(()=>{t&&typeof t=="function"&&t()},0),ve.buildGridData({celldata:e})}function Uo(){let e=h.toJsonOptions;return e.title=$("#luckysheet_info_detail_input").val(),e.data=lm(),Et().forEach((n,t)=>{n.data!=null&&(e.data[t].row=P(n.data)==="array"?n.data.length:0,e.data[t].column=P(n.data[0])==="array"?n.data[0].length:0)}),e}function rb(e="zh"){if(!["zh","en","es"].includes(e))return U.info("The lang parameter is invalid.","");let n=Uo();n.lang=e,luckysheet.create(n)}function nb(){ne.websocket!=null&&ne.websocket.close(1e3)}function ab(e){if(e==null)return{column:h.luckysheet_select_save[h.luckysheet_select_save.length-1].column,row:h.luckysheet_select_save[h.luckysheet_select_save.length-1].row};let n=$e.getRangeByTxt(e);return{column:n[0].column,row:n[0].row}}function ib(e=h.luckysheet_select_save){return P(e)==="object"&&(e=[e]),$e.getTxtByRange(e)}function Vc(e){let{prevPage:n,nextPage:t,total:l}=Q().button;$("#luckysheet-bottom-pager").remove(),$("#luckysheet-sheet-content").after('<div id="luckysheet-bottom-pager" style="font-size: 14px; margin-left: 10px; display: inline-block;"></div>'),$("#luckysheet-bottom-pager").sPage({page:e.pageIndex,total:e.total,selectOption:e.selectOption,pageSize:e.pageSize,showTotal:e.showTotal,showSkip:e.showSkip,showPN:e.showPN,prevPage:e.prevPage||n,nextPage:e.nextPage||t,totalTxt:e.totalTxt||l+e.total,backFun:function(a){a.pageIndex=a.page,!!Je.createHookFunction("onTogglePager",a)}})}function ob(e){p.execFunctionGroupForce(!0),Be(),setTimeout(()=>{e&&typeof e=="function"&&e()})}function sb(e={}){let{data:n,success:t}=e,l=h.luckysheetfile;for(let s=0;s<n.length;s++)for(let u=0;u<l.length;u++)l[u].index===n[s].index&&(l[u]=n[s]);let a=l[ve.getSheetIndex(h.currentSheetIndex)],o=ve.buildGridData(a);a.data=o,a.isPivotTable?(h.luckysheetcurrentisPivotTable=!0,isPivotInitial||Oe.changePivotTable(index)):(h.luckysheetcurrentisPivotTable=!1,$("#luckysheet-modal-dialog-slider-pivot").hide(),zt(!1)),ve.mergeCalculation(a.index),ve.setSheetParam(),setTimeout(function(){ve.showSheet(),ve.restoreCache(),p.execFunctionGroupForce(de.forceCalculation),ve.restoreSheetAll(h.currentSheetIndex),Be(),t&&typeof t=="function"&&t()},1),ne.saveParam("shs",null,h.currentSheetIndex)}function qc(e,n,t,l){if(e=e||h.flowdata,n==null&&t==null){let a=h.luckysheet_select_save[h.luckysheet_select_save.length-1];n=a.row_focus||a.row[0],t=a.column_focus||a.column[0]}ke.menuButtonFocus(e,n,t),setTimeout(()=>{l&&typeof l=="function"&&l()})}function li(e,n){return Hc().every(({r:a,c:o})=>{let s=h.flowdata[a][o];return s==null?!1:s[e]==n})}var qi,va=Ie(()=>{Xe();ft();Nt();bt();Ll();Ut();Li();ll();Ba();Jt();Ut();Vr();Al();$r();ua();mr();Kt();Yt();fa();Ft();Or();Va();Co();on();Qt();il();Wa();xl();Vl();pr();dl();gr();Lr();Zt();Gt();kn();Mo();Ja();yr();qr();qi=Fl(vn());Nt();ba()});function Ld(e,n,t,l,a){let o=h.visibledatarow[t],s=n-1==-1?0:h.visibledatarow[n-1],u=h.visibledatacolumn[a],f=l-1==-1?0:h.visibledatacolumn[l-1];$("#"+e).css({left:f,width:u-f-1,top:s,height:o-s-1})}function lt(e=!1){if($("#luckysheet-cell-selected-boxs").show(),$("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").siblings(".luckysheet-cell-selected").remove(),h.luckysheet_select_save.length>0){for(let t=0;t<h.luckysheet_select_save.length;t++){let l=h.luckysheet_select_save[t].row[0],a=h.luckysheet_select_save[t].row[1],o=h.luckysheet_select_save[t].column[0],s=h.luckysheet_select_save[t].column[1],u,f;h.luckysheet_select_save[t].row_focus==null?u=l:u=h.luckysheet_select_save[t].row_focus,h.luckysheet_select_save[t].column_focus==null?f=o:f=h.luckysheet_select_save[t].column_focus;let d=h.visibledatarow[a],m=l-1==-1?0:h.visibledatarow[l-1],g=h.visibledatacolumn[s],y=o-1==-1?0:h.visibledatacolumn[o-1],v=h.visibledatarow[u],b=u-1==-1?0:h.visibledatarow[u-1],k=h.visibledatacolumn[f],w=f-1==-1?0:h.visibledatacolumn[f-1],x=ke.mergeborer(h.flowdata,u,f);x&&(v=x.row[1],b=x.row[0],k=x.column[1],w=x.column[0]),h.luckysheet_select_save[t].row=[l,a],h.luckysheet_select_save[t].column=[o,s],h.luckysheet_select_save[t].row_focus=u,h.luckysheet_select_save[t].column_focus=f,h.luckysheet_select_save[t].left=w,h.luckysheet_select_save[t].width=k-w-1,h.luckysheet_select_save[t].top=b,h.luckysheet_select_save[t].height=v-b-1,h.luckysheet_select_save[t].left_move=y,h.luckysheet_select_save[t].width_move=g-y-1,h.luckysheet_select_save[t].top_move=m,h.luckysheet_select_save[t].height_move=d-m-1,t==0?h.luckysheet_select_save.length==1?fr.mobilecheck()?$("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").css({left:h.luckysheet_select_save[t].left_move,width:h.luckysheet_select_save[t].width_move,top:h.luckysheet_select_save[t].top_move,height:h.luckysheet_select_save[t].height_move,display:"block",border:"1px solid #0188fb"}).find(".luckysheet-cs-draghandle").css("display","block").end().find(".luckysheet-cs-fillhandle").css("display","none").end().find(".luckysheet-cs-touchhandle").css("display","block"):$("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").css({left:h.luckysheet_select_save[t].left_move,width:h.luckysheet_select_save[t].width_move,top:h.luckysheet_select_save[t].top_move,height:h.luckysheet_select_save[t].height_move,display:"block",border:"1px solid #0188fb"}).find(".luckysheet-cs-draghandle").css("display","block").end().find(".luckysheet-cs-fillhandle").css("display","block").end().find(".luckysheet-cs-touchhandle").css("display","none"):$("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").css({left:h.luckysheet_select_save[t].left_move,width:h.luckysheet_select_save[t].width_move,top:h.luckysheet_select_save[t].top_move,height:h.luckysheet_select_save[t].height_move,display:"block",border:"1px solid rgba(1, 136, 251, 0.15)"}).find(".luckysheet-cs-draghandle").css("display","none").end().find(".luckysheet-cs-fillhandle").css("display","none"):$("#luckysheet-cell-selected-boxs").append('<div class="luckysheet-cell-selected" style="left: '+h.luckysheet_select_save[t].left_move+"px; width: "+h.luckysheet_select_save[t].width_move+"px; top: "+h.luckysheet_select_save[t].top_move+"px; height: "+h.luckysheet_select_save[t].height_move+'px; border: 1px solid rgba(1, 136, 251, 0.15); display: block;"></div>'),t==h.luckysheet_select_save.length-1&&($("#luckysheet-cell-selected-focus").css({left:h.luckysheet_select_save[t].left,width:h.luckysheet_select_save[t].width,top:h.luckysheet_select_save[t].top,height:h.luckysheet_select_save[t].height,display:"block"}),or(h.luckysheet_select_save[t].left_move,h.luckysheet_select_save[t].top_move,h.luckysheet_select_save[t].width_move,h.luckysheet_select_save[t].height_move,[l,a],[o,s]),p.fucntionboxshow(u,f),Ye.cellFocus(u,f))}cb(h.luckysheet_select_save,e),Go(),h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]&&$f(h.luckysheet_select_save[0].row[0],h.luckysheet_select_save[0].column[0]),qc()}h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_select_save=h.luckysheet_select_save;let n=JSON.stringify(h.luckysheet_select_save);h.luckysheet_select_save_previous==null|h.luckysheet_select_save_previous!==n&&Je.createHookFunction("rangeSelect",h.luckysheetfile[Z(h.currentSheetIndex)],h.luckysheet_select_save),h.luckysheet_select_save_previous=n}function cb(e,n=!1){let t=$.extend(!0,[],e),l={},a={};for(let u=0;u<t.length;u++){let f=t[u].row[0],d=t[u].row[1],m=t[u].column[0],g=t[u].column[1];l=rm(l,f,d),a=rm(a,m,g)}$("#luckysheet-rows-h-selected").empty();let o=nm(l);for(let u=0;u<o.length;u++){let f=o[u][0],d=o[u][o[u].length-1],m=tl(d)[1],g=tl(f)[0];$("#luckysheet-rows-h-selected").append('<div class="luckysheet-rows-h-selected" style="top: '+g+"px; height: "+(m-g-1)+'px; display: block; background-color: rgba(76, 76, 76, 0.1);"></div>')}$("#luckysheet-cols-h-selected").empty();let s=nm(a);for(let u=0;u<s.length;u++){let f=s[u][0],d=s[u][s[u].length-1],m=At(d)[1],g=At(f)[0];$("#luckysheet-cols-h-selected").append('<div class="luckysheet-cols-h-selected" style="left: '+g+"px; width: "+(m-g-1)+'px; display: block; background-color: rgba(76, 76, 76, 0.1);"></div>')}}function rm(e,n,t){let l=$.extend(!0,{},e);for(let a=n;a<=t;a++)a in l||(l[a]=0);return l}function nm(e){let n=[];for(let a in e)n.push(a);n.sort(function(a,o){return a-o});let t=[],l=[];if(n.length>1)for(let a=1;a<n.length;a++)n[a]-n[a-1]==1?(l.push(n[a-1]),a==n.length-1&&(l.push(n[a]),t.push(l))):a==1?a==n.length-1?(l.push(n[a-1]),t.push(l),t.push([n[a]])):t.push(n[0]):a==n.length-1?(l.push(n[a-1]),t.push(l),t.push([n[a]])):(l.push(n[a-1]),t.push(l),l=[]);else t.push([n[0]]);return t}function Yr(e){e==null&&(e=h.luckysheet_select_save),e=JSON.parse(JSON.stringify(e));let n=!1,t={};for(let l=0;l<e.length;l++){let a=e[l].row[0],o=e[l].row[1],s=e[l].column[0],u=e[l].column[1];for(let f=a;f<=o;f++)for(let d=s;d<=u;d++)if(f+"_"+d in t){n=!0;break}else t[f+"_"+d]=0}return n}function Gn(){let e=h.visibledatacolumn,n=h.visibledatarow;h.cooperativeEdit.changeCollaborationSize.forEach(t=>{if(t.i==h.currentSheetIndex){let l=t.v.column,a=e[l[0]]-1;t.v.column[0]!==0&&(a=e[l[1]]-e[l[0]-1]-(l[1]-l[0]+1));let o=t.v.row,s=n[o[0]]-1;t.v.row[0]!==0&&(s=n[o[1]]-n[o[0]-1]-(o[1]-o[0]+1));let u=h.cooperativeEdit.merge_range,f=e[t.v.column[0]-1]-1,d=n[t.v.row[0]-1]-1;if(h.config.columnlen!==null){for(let v in h.config.columnlen)if(t.v.column[0]<=v&&v<=t.v.column[1]){h.luckysheet_cols_change_size_start[1]=v-0;break}}if(h.config.rowlen!==null){for(let v in h.config.rowlen)if(t.v.row[0]<=v&&v<=t.v.row[1]){h.luckysheet_rows_change_size_start[1]=v-0;break}}if(t.v.column[0]<=h.luckysheet_cols_change_size_start[1]&&h.luckysheet_cols_change_size_start[1]<=t.v.column[1])if(h.luckysheet_cols_change_size_start[1]==0)a=e[0]-1;else{let v=t.v.column;a=e[v[1]]-e[v[0]-1]-(v[1]-v[0]+1)}if(t.v.row[0]<=h.luckysheet_rows_change_size_start[1]&&h.luckysheet_rows_change_size_start[1]<=t.v.row[1])if(h.luckysheet_rows_change_size_start[1]==0)s=n[0]-1;else{let v=t.v.row;s=n[v[1]]-n[v[0]-1]-(v[1]-v[0]+1)}if(Object.keys(u).length>0){let v=!1;if(u.v.length>1&&(v=u.v[1][0]==null||Object.keys(u.v[1][0]).length>0),u.v[0].length>1&&(v=u.v[0][1]==null||Object.keys(u.v[0][1]).length>0),v){let b=u.column[0]<=t.v.column[0]&&u.column[1]>=t.v.column[1];if(f=e[u.column[0]-1]-1,d=n[u.row[0]-1]-1,a=e[u.column[1]]-1,s=n[u.row[1]]-1,b){if(u.column[0]!==0){let w=u.column;a=e[w[1]]-e[w[0]-1]-(w[1]-w[0]+1)}else f=0;t.v.column=u.column}if(u.row[0]<=t.v.row[0]&&u.row[1]>=t.v.row[1]){if(u.row[0]!==0){let w=u.row;s=n[w[1]]-n[w[0]-1]-(w[1]-w[0]+1)}else d=0;t.v.row=u.row}}else a=e[l[0]]-e[l[0]-1]-1,l[0]===0&&(a=e[l[0]]-1),s=n[o[0]]-n[o[0]-1]-1,o[0]===0&&(s=n[o[0]]-1)}$("#luckysheet-multipleRange-show-"+t.id).css({height:s,width:a,top:d+"px",left:f+"px"});let y=$("#luckysheet-multipleRange-show-"+t.id)[0].offsetHeight-1;$("#luckysheet-multipleRange-show-"+t.id+">.username").css({bottom:y+"px"})}})}function Ot(e){if($("#luckysheet-selection-copy").empty(),e==null&&(e=h.luckysheet_selection_range),e=JSON.parse(JSON.stringify(e)),e.length>0)for(let n=0;n<e.length;n++){let t=e[n].row[0],l=e[n].row[1],a=e[n].column[0],o=e[n].column[1],s=h.visibledatarow[l],u=t-1==-1?0:h.visibledatarow[t-1],f=h.visibledatacolumn[o],d=a-1==-1?0:h.visibledatacolumn[a-1],m='<div class="luckysheet-selection-copy" style="display: block; left: '+d+"px; width: "+(f-d-1)+"px; top: "+u+"px; height: "+(s-u-1)+'px;"><div class="luckysheet-selection-copy-top luckysheet-copy"></div><div class="luckysheet-selection-copy-right luckysheet-copy"></div><div class="luckysheet-selection-copy-bottom luckysheet-copy"></div><div class="luckysheet-selection-copy-left luckysheet-copy"></div><div class="luckysheet-selection-copy-hc"></div></div>';$("#luckysheet-selection-copy").append(m)}}function or(e,n,t,l,a,o){let s=a[1]-a[0]+1,u=o[1]-o[0]+1,f=h.luckysheetTableContentHW[0],d=h.luckysheetTableContentHW[1],m=$("#luckysheet-cell-main").scrollLeft(),g=$("#luckysheet-cell-main").scrollTop(),v=Q().info;if(s>=4){let b=e-25;b<0&&(b=e+5),b<m&&(b=m+10);let k=n+l/2;l>d&&(k=g+d/2),$("#luckysheet-row-count-show").css({left:b,top:k,display:"block",width:"11px"}).html("<div>"+s.toString().split("").join("</div><div>")+"</div><div>"+v.row+"</div>")}else $("#luckysheet-row-count-show").hide();if(u>=4){let b=n-25;b<0&&(b=n+5),b<g&&(b=g+10);let k=e+t/2;t>f&&(k=m+f/2),$("#luckysheet-column-count-show").css({left:k,top:b,display:"block"}).text(u+v.column)}else $("#luckysheet-column-count-show").hide()}function Go(){let e=h.luckysheet_select_save[h.luckysheet_select_save.length-1],n=e.row_focus,t=e.column_focus;h.config.merge!=null&&n+"_"+t in h.config.merge?$("#luckysheet-helpbox-cell").text(xt(h.currentSheetIndex,{column:[t,t],row:[n,n]})):$("#luckysheet-helpbox-cell").text(xt(h.currentSheetIndex,e))}var Zt=Ie(()=>{il();Ut();fo();Ol();xa();yr();Nt();Xe();Ll();bt();va()});var ub,Uc,am=Ie(()=>{ft();Gt();il();Jt();ll();Ft();Xe();bt();ub={moneyFmtList:[{name:"\u4EBA\u6C11\u5E01",pos:"before",value:"\xA5"},{name:"\u7F8E\u5143",pos:"before",value:"$"},{name:"\u6B27\u5143",pos:"before",value:"\u20AC"},{name:"\u82F1\u9551",pos:"before",value:"\uFFE1"},{name:"\u6E2F\u5143",pos:"before",value:"$"},{name:"\u65E5\u5143",pos:"before",value:"\uFFE5"},{name:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u5217\u514B",pos:"before",value:"Lek"},{name:"\u963F\u5C14\u53CA\u5229\u4E9A\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u963F\u5BCC\u6C57\u5C3C",pos:"after",value:"Af"},{name:"\u963F\u6839\u5EF7\u6BD4\u7D22",pos:"before",value:"$"},{name:"\u963F\u62C9\u4F2F\u8054\u5408\u914B\u957F\u56FD\u8FEA\u62C9\u59C6",pos:"before",value:"dh"},{name:"\u963F\u9C81\u5DF4\u5F17\u7F57\u6797",pos:"before",value:"Afl"},{name:"\u963F\u66FC\u91CC\u4E9A\u5C14",pos:"before",value:"Rial"},{name:"\u963F\u585E\u62DC\u7586\u9A6C\u7EB3\u7279",pos:"before",value:"?"},{name:"\u57C3\u53CA\u9551",pos:"before",value:"\uFFE1"},{name:"\u57C3\u585E\u4FC4\u6BD4\u4E9A\u6BD4\u5C14",pos:"before",value:"Birr"},{name:"\u5B89\u54E5\u62C9\u5BBD\u624E",pos:"before",value:"Kz"},{name:"\u6FB3\u5927\u5229\u4E9A\u5143",pos:"before",value:"$"},{name:"\u6FB3\u95E8\u5143",pos:"before",value:"MOP"},{name:"\u5DF4\u5DF4\u591A\u65AF\u5143",pos:"before",value:"$"},{name:"\u5DF4\u5E03\u4E9A\u65B0\u51E0\u5185\u4E9A\u57FA\u90A3",pos:"before",value:"PGK"},{name:"\u5DF4\u54C8\u9A6C\u5143",pos:"before",value:"$"},{name:"\u5DF4\u57FA\u65AF\u5766\u5362\u6BD4",pos:"before",value:"Rs"},{name:"\u5DF4\u62C9\u572D\u74DC\u62C9\u5C3C",pos:"after",value:"Gs"},{name:"\u5DF4\u6797\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u5DF4\u62FF\u9A6C\u5DF4\u6CE2\u4E9A",pos:"before",value:"B/"},{name:"\u5DF4\u897F\u91CC\u4E9A\u4F0A",pos:"before",value:"R$"},{name:"\u767D\u4FC4\u7F57\u65AF\u5362\u5E03",pos:"after",value:"\u0440"},{name:"\u767E\u6155\u5927\u5143",pos:"before",value:"$"},{name:"\u4FDD\u52A0\u5229\u4E9A\u5217\u5F17",pos:"before",value:"lev"},{name:"\u51B0\u5C9B\u514B\u6717",pos:"before",value:"kr"},{name:"\u6CE2\u9ED1\u53EF\u5151\u6362\u9A6C\u514B",pos:"before",value:"KM"},{name:"\u6CE2\u5170\u5179\u7F57\u63D0",pos:"after",value:"z?"},{name:"\u73BB\u5229\u7EF4\u4E9A\u8BFA",pos:"before",value:"Bs"},{name:"\u4F2F\u5229\u5179\u5143",pos:"before",value:"$"},{name:"\u535A\u8328\u74E6\u7EB3\u666E\u62C9",pos:"before",value:"P"},{name:"\u4E0D\u4E39\u52AA\u624E\u59C6",pos:"before",value:"Nu"},{name:"\u5E03\u9686\u8FEA\u6CD5\u90CE",pos:"before",value:"FBu"},{name:"\u671D\u9C9C\u5706",pos:"before",value:"?KP"},{name:"\u4E39\u9EA6\u514B\u6717",pos:"after",value:"kr"},{name:"\u4E1C\u52A0\u52D2\u6BD4\u5143",pos:"before",value:"$"},{name:"\u591A\u7C73\u5C3C\u52A0\u6BD4\u7D22",pos:"before",value:"RD$"},{name:"\u4FC4\u56FD\u5362\u5E03",pos:"after",value:"?"},{name:"\u5384\u7ACB\u7279\u91CC\u4E9A\u7EB3\u514B\u6CD5",pos:"before",value:"Nfk"},{name:"\u975E\u6D32\u91D1\u878D\u5171\u540C\u4F53\u6CD5\u90CE",pos:"before",value:"CFA"},{name:"\u83F2\u5F8B\u5BBE\u6BD4\u7D22",pos:"before",value:"?"},{name:"\u6590\u6D4E\u5143",pos:"before",value:"$"},{name:"\u4F5B\u5F97\u89D2\u57C3\u65AF\u5E93\u591A",pos:"before",value:"CVE"},{name:"\u798F\u514B\u5170\u7FA4\u5C9B\u9551",pos:"before",value:"\uFFE1"},{name:"\u5188\u6BD4\u4E9A\u8FBE\u62C9\u897F",pos:"before",value:"GMD"},{name:"\u521A\u679C\u6CD5\u90CE",pos:"before",value:"FrCD"},{name:"\u54E5\u4F26\u6BD4\u4E9A\u6BD4\u7D22",pos:"before",value:"$"},{name:"\u54E5\u65AF\u8FBE\u9ECE\u52A0\u79D1\u6717",pos:"before",value:"?"},{name:"\u53E4\u5DF4\u6BD4\u7D22",pos:"before",value:"$"},{name:"\u53E4\u5DF4\u53EF\u5151\u6362\u6BD4\u7D22",pos:"before",value:"$"},{name:"\u572D\u4E9A\u90A3\u5143",pos:"before",value:"$"},{name:"\u54C8\u8428\u514B\u65AF\u5766\u575A\u6208",pos:"before",value:"?"},{name:"\u6D77\u5730\u53E4\u5FB7",pos:"before",value:"HTG"},{name:"\u97E9\u5143",pos:"before",value:"?"},{name:"\u8377\u5C5E\u5B89\u7684\u5217\u65AF\u76FE",pos:"before",value:"NAf."},{name:"\u6D2A\u90FD\u62C9\u65AF\u62C9\u4F26\u76AE\u62C9",pos:"before",value:"L"},{name:"\u5409\u5E03\u63D0\u6CD5\u90CE",pos:"before",value:"Fdj"},{name:"\u5409\u5C14\u5409\u65AF\u65AF\u5766\u7D22\u59C6",pos:"before",value:"KGS"},{name:"\u51E0\u5185\u4E9A\u6CD5\u90CE",pos:"before",value:"FG"},{name:"\u52A0\u62FF\u5927\u5143",pos:"before",value:"$"},{name:"\u52A0\u7EB3\u585E\u5730",pos:"before",value:"GHS"},{name:"\u67EC\u57D4\u5BE8\u745E\u5C14",pos:"before",value:"Riel"},{name:"\u6377\u514B\u514B\u6717",pos:"after",value:"K?"},{name:"\u6D25\u5DF4\u5E03\u97E6\u5143",pos:"before",value:"$"},{name:"\u5361\u5854\u5C14\u91CC\u4E9A\u5C14",pos:"before",value:"Rial"},{name:"\u5F00\u66FC\u7FA4\u5C9B\u5143",pos:"before",value:"$"},{name:"\u79D1\u6469\u7F57\u6CD5\u90CE",pos:"before",value:"CF"},{name:"\u79D1\u5A01\u7279\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u514B\u7F57\u5730\u4E9A\u5E93\u7EB3",pos:"before",value:"kn"},{name:"\u80AF\u5C3C\u4E9A\u5148\u4EE4",pos:"before",value:"Ksh"},{name:"\u83B1\u7D22\u6258\u6D1B\u8482",pos:"before",value:"LSL"},{name:"\u8001\u631D\u57FA\u666E",pos:"before",value:"?"},{name:"\u9ECE\u5DF4\u5AE9\u9551",pos:"before",value:"L\uFFE1"},{name:"\u7ACB\u9676\u5B9B\u7ACB\u7279",pos:"before",value:"Lt"},{name:"\u5229\u6BD4\u4E9A\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u5229\u6BD4\u4E9A\u5143",pos:"before",value:"$"},{name:"\u5362\u65FA\u8FBE\u6CD5\u90CE",pos:"before",value:"RF"},{name:"\u7F57\u9A6C\u5C3C\u4E9A\u5217\u4F0A",pos:"before",value:"RON"},{name:"\u9A6C\u8FBE\u52A0\u65AF\u52A0\u963F\u91CC\u4E9A\u91CC",pos:"before",value:"Ar"},{name:"\u9A6C\u5C14\u4EE3\u592B\u62C9\u83F2\u4E9A",pos:"before",value:"Rf"},{name:"\u9A6C\u62C9\u7EF4\u514B\u74E6\u67E5",pos:"before",value:"MWK"},{name:"\u9A6C\u6765\u897F\u4E9A\u6797\u5409\u7279",pos:"before",value:"RM"},{name:"\u9A6C\u5176\u987F\u6234\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u6BDB\u91CC\u6C42\u65AF\u5362\u6BD4",pos:"before",value:"MURs"},{name:"\u6BDB\u91CC\u5854\u5C3C\u4E9A\u4E4C\u5409\u4E9A",pos:"before",value:"MRO"},{name:"\u8499\u53E4\u56FE\u683C\u91CC\u514B",pos:"before",value:"?"},{name:"\u5B5F\u52A0\u62C9\u5854\u5361",pos:"before",value:"?"},{name:"\u79D8\u9C81\u65B0\u7D22\u5C14",pos:"before",value:"S/"},{name:"\u7F05\u7538\u5F00\u4E9A\u7279",pos:"before",value:"K"},{name:"\u6469\u5C14\u591A\u74E6\u5217\u4F0A",pos:"before",value:"MDL"},{name:"\u6469\u6D1B\u54E5\u8FEA\u62C9\u59C6",pos:"before",value:"dh"},{name:"\u83AB\u6851\u6BD4\u514B\u6885\u8482\u5361\u5C14",pos:"before",value:"MTn"},{name:"\u58A8\u897F\u54E5\u6BD4\u7D22",pos:"before",value:"$"},{name:"\u7EB3\u7C73\u6BD4\u4E9A\u5143",pos:"before",value:"$"},{name:"\u5357\u975E\u5170\u7279",pos:"before",value:"R"},{name:"\u5357\u82CF\u4E39\u9551",pos:"before",value:"\uFFE1"},{name:"\u5C3C\u52A0\u62C9\u74DC\u79D1\u591A\u5DF4",pos:"before",value:"C$"},{name:"\u5C3C\u6CCA\u5C14\u5362\u6BD4",pos:"before",value:"Rs"},{name:"\u5C3C\u65E5\u5229\u4E9A\u5948\u62C9",pos:"before",value:"?"},{name:"\u632A\u5A01\u514B\u6717",pos:"after",value:"kr"},{name:"\u4E54\u6CBB\u4E9A\u62C9\u745E",pos:"before",value:"GEL"},{name:"\u4EBA\u6C11\u5E01\uFF08\u79BB\u5CB8\uFF09",pos:"before",value:"\uFFE5"},{name:"\u745E\u5178\u514B\u6717",pos:"after",value:"kr"},{name:"\u745E\u58EB\u6CD5\u90CE",pos:"before",value:"CHF"},{name:"\u585E\u5C14\u7EF4\u4E9A\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u585E\u62C9\u5229\u6602\u5229\u6602",pos:"before",value:"SLL"},{name:"\u585E\u820C\u5C14\u5362\u6BD4",pos:"before",value:"SCR"},{name:"\u6C99\u7279\u91CC\u4E9A\u5C14",pos:"before",value:"Rial"},{name:"\u5723\u591A\u7F8E\u591A\u5E03\u62C9",pos:"before",value:"Db"},{name:"\u5723\u8D6B\u52D2\u62FF\u7FA4\u5C9B\u78C5",pos:"before",value:"\uFFE1"},{name:"\u65AF\u91CC\u5170\u5361\u5362\u6BD4",pos:"before",value:"Rs"},{name:"\u65AF\u5A01\u58EB\u5170\u91CC\u5170\u5409\u5C3C",pos:"before",value:"SZL"},{name:"\u82CF\u4E39\u9551",pos:"before",value:"SDG"},{name:"\u82CF\u91CC\u5357\u5143",pos:"before",value:"$"},{name:"\u6240\u7F57\u95E8\u7FA4\u5C9B\u5143",pos:"before",value:"$"},{name:"\u7D22\u9A6C\u91CC\u5148\u4EE4",pos:"before",value:"SOS"},{name:"\u5854\u5409\u514B\u65AF\u5766\u7D22\u83AB\u5C3C",pos:"before",value:"Som"},{name:"\u592A\u5E73\u6D0B\u6CD5\u90CE",pos:"after",value:"FCFP"},{name:"\u6CF0\u56FD\u94E2",pos:"before",value:"?"},{name:"\u5766\u6851\u5C3C\u4E9A\u5148\u4EE4",pos:"before",value:"TSh"},{name:"\u6C64\u52A0\u6F58\u52A0",pos:"before",value:"T$"},{name:"\u7279\u7ACB\u5C3C\u8FBE\u548C\u591A\u5DF4\u54E5\u5143",pos:"before",value:"$"},{name:"\u7A81\u5C3C\u65AF\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u571F\u8033\u5176\u91CC\u62C9",pos:"before",value:"?"},{name:"\u74E6\u52AA\u963F\u56FE\u74E6\u56FE",pos:"before",value:"VUV"},{name:"\u5371\u5730\u9A6C\u62C9\u683C\u67E5\u5C14",pos:"before",value:"Q"},{name:"\u59D4\u5185\u745E\u62C9\u535A\u5229\u74E6",pos:"before",value:"Bs"},{name:"\u6587\u83B1\u5143",pos:"before",value:"$"},{name:"\u4E4C\u5E72\u8FBE\u5148\u4EE4",pos:"before",value:"UGX"},{name:"\u4E4C\u514B\u5170\u683C\u91CC\u592B\u5C3C\u4E9A",pos:"before",value:"\u0433\u0440\u043D."},{name:"\u4E4C\u62C9\u572D\u6BD4\u7D22",pos:"before",value:"$"},{name:"\u4E4C\u5179\u522B\u514B\u65AF\u5766\u82CF\u59C6",pos:"before",value:"so?m"},{name:"\u897F\u8428\u6469\u4E9A\u5854\u62C9",pos:"before",value:"WST"},{name:"\u65B0\u52A0\u5761\u5143",pos:"before",value:"$"},{name:"\u65B0\u53F0\u5E01",pos:"before",value:"NT$"},{name:"\u65B0\u897F\u5170\u5143",pos:"before",value:"$"},{name:"\u5308\u7259\u5229\u798F\u6797",pos:"before",value:"Ft"},{name:"\u53D9\u5229\u4E9A\u9551",pos:"before",value:"\uFFE1"},{name:"\u7259\u4E70\u52A0\u5143",pos:"before",value:"$"},{name:"\u4E9A\u7F8E\u5C3C\u4E9A\u5FB7\u62C9\u59C6",pos:"before",value:"Dram"},{name:"\u4E5F\u95E8\u91CC\u4E9A\u5C14",pos:"before",value:"Rial"},{name:"\u4F0A\u62C9\u514B\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u4F0A\u6717\u91CC\u4E9A\u5C14",pos:"before",value:"Rial"},{name:"\u4EE5\u8272\u5217\u65B0\u8C22\u514B\u5C14",pos:"before",value:"?"},{name:"\u5370\u5EA6\u5362\u6BD4",pos:"before",value:"?"},{name:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u5362\u6BD4",pos:"before",value:"Rp"},{name:"\u7EA6\u65E6\u7B2C\u7EB3\u5C14",pos:"before",value:"din"},{name:"\u8D8A\u5357\u76FE",pos:"after",value:"?"},{name:"\u8D5E\u6BD4\u4E9A\u514B\u74E6\u67E5",pos:"before",value:"ZMW"},{name:"\u76F4\u5E03\u7F57\u9640\u9551",pos:"before",value:"\uFFE1"},{name:"\u667A\u5229\u6BD4\u7D22",pos:"before",value:"$"},{name:"\u4E2D\u975E\u91D1\u878D\u5408\u4F5C\u6CD5\u90CE",pos:"before",value:"FCFA"}],dateFmtList:[{name:"1930-08-05",value:"yyyy-MM-dd"},{name:"1930/8/5",value:"yyyy/MM/dd"},{name:"1930\u5E748\u67085\u65E5",value:'yyyy"\u5E74"M"\u6708"d"\u65E5"'},{name:"08-05",value:"MM-dd"},{name:"8-5",value:"M-d"},{name:"8\u67085\u65E5",value:'M"\u6708"d"\u65E5"'},{name:"13:30:30",value:"h:mm:ss"},{name:"13:30",value:"h:mm"},{name:"\u4E0B\u534801:30",value:"\u4E0A\u5348/\u4E0B\u5348 hh:mm"},{name:"\u4E0B\u53481:30",value:"\u4E0A\u5348/\u4E0B\u5348 h:mm"},{name:"\u4E0B\u53481:30:30",value:"\u4E0A\u5348/\u4E0B\u5348 h:mm:ss"},{name:"08-05 \u4E0B\u534801:30",value:"MM-dd \u4E0A\u5348/\u4E0B\u5348 hh:mm"}],numFmtList:[{name:"1235",value:"0"},{name:"1234.56",value:"0.00"},{name:"1,235",value:"#,##0"},{name:"1,234.56",value:"#,##0.00"},{name:"1,235",value:"#,##0_);(#,##0)"},{name:"1,235",value:"#,##0_);[Red](#,##0)"},{name:"1,234.56",value:"#,##0.00_);(#,##0.00)"},{name:"1,234.56",value:"#,##0.00_);[Red](#,##0.00)"},{name:"$1,235",value:"$#,##0_);($#,##0)"},{name:"$1,235",value:"$#,##0_);[Red]($#,##0)"},{name:"$1,234.56",value:"$#,##0.00_);($#,##0.00)"},{name:"$1,234.56",value:"$#,##0.00_);[Red]($#,##0.00)"},{name:"1234.56",value:"@"},{name:"123456%",value:"0%"},{name:"123456.00%",value:"0.00%"},{name:"1.23E+03",value:"0.00E+00"},{name:"1.2E+3",value:"##0.0E+0"},{name:"1234 5/9",value:"# ?/?"},{name:"1234 14/25",value:"# ??/??"},{name:"$ 1,235",value:'_($* #,##0_);_(...($* "-"_);_(@_)'},{name:"1,235",value:'_(* #,##0_);_(*..._(* "-"_);_(@_)'},{name:"$ 1,234.56",value:'_($* #,##0.00_);_(...($* "-"_);_(@_)'},{name:"1,234.56",value:'_(* #,##0.00_);...* "-"??_);_(@_)'}],createDialog:function(e){let n=this,t=Q().currencyDetail,l=Q().format,a=Q().button;this.moneyFmtList=[{name:t.RMB,pos:"before",value:"\xA5"},{name:t.USdollar,pos:"before",value:"$"},{name:t.EUR,pos:"before",value:"\u20AC"},{name:t.GBP,pos:"before",value:"\uFFE1"},{name:t.HK,pos:"before",value:"$"},{name:t.JPY,pos:"before",value:"\uFFE5"},{name:t.AlbanianLek,pos:"before",value:"Lek"},{name:t.AlgerianDinar,pos:"before",value:"din"},{name:t.Afghani,pos:"after",value:"Af"},{name:t.ArgentinePeso,pos:"before",value:"$"},{name:t.UnitedArabEmiratesDirham,pos:"before",value:"dh"},{name:t.ArubanFlorin,pos:"before",value:"Afl"},{name:t.OmaniRial,pos:"before",value:"Rial"},{name:t.Azerbaijanimanat,pos:"before",value:"?"},{name:t.EgyptianPound,pos:"before",value:"\uFFE1"},{name:t.EthiopianBirr,pos:"before",value:"Birr"},{name:t.AngolaKwanza,pos:"before",value:"Kz"},{name:t.AustralianDollar,pos:"before",value:"$"},{name:t.Patacas,pos:"before",value:"MOP"},{name:t.BarbadosDollar,pos:"before",value:"$"},{name:t.PapuaNewGuineaKina,pos:"before",value:"PGK"},{name:t.BahamianDollar,pos:"before",value:"$"},{name:t.PakistanRupee,pos:"before",value:"Rs"},{name:t.ParaguayanGuarani,pos:"after",value:"Gs"},{name:t.BahrainiDinar,pos:"before",value:"din"},{name:t.PanamanianBalboa,pos:"before",value:"B/"},{name:t.Brazilianreal,pos:"before",value:"R$"},{name:t.Belarusianruble,pos:"after",value:"\u0440"},{name:t.BermudianDollar,pos:"before",value:"$"},{name:t.BulgarianLev,pos:"before",value:"lev"},{name:t.IcelandKrona,pos:"before",value:"kr"},{name:t.BosniaHerzegovinaConvertibleMark,pos:"before",value:"KM"},{name:t.PolishZloty,pos:"after",value:"z?"},{name:t.Boliviano,pos:"before",value:"Bs"},{name:t.BelizeDollar,pos:"before",value:"$"},{name:t.BotswanaPula,pos:"before",value:"P"},{name:t.NotDannuzhamu,pos:"before",value:"Nu"},{name:t.BurundiFranc,pos:"before",value:"FBu"},{name:t.NorthKoreanWon,pos:"before",value:"?KP"},{name:t.DanishKrone,pos:"after",value:"kr"},{name:t.EastCaribbeanDollar,pos:"before",value:"$"},{name:t.DominicaPeso,pos:"before",value:"RD$"},{name:t.RussianRuble,pos:"after",value:"?"},{name:t.EritreanNakfa,pos:"before",value:"Nfk"},{name:t.CFAfranc,pos:"before",value:"CFA"},{name:t.PhilippinePeso,pos:"before",value:"?"},{name:t.FijiDollar,pos:"before",value:"$"},{name:t.CapeVerdeEscudo,pos:"before",value:"CVE"},{name:t.FalklandIslandsPound,pos:"before",value:"\uFFE1"},{name:t.GambianDalasi,pos:"before",value:"GMD"},{name:t.Congolesefranc,pos:"before",value:"FrCD"},{name:t.ColombianPeso,pos:"before",value:"$"},{name:t.CostaRicanColon,pos:"before",value:"?"},{name:t.CubanPeso,pos:"before",value:"$"},{name:t.Cubanconvertiblepeso,pos:"before",value:"$"},{name:t.GuyanaDollar,pos:"before",value:"$"},{name:t.KazakhstanTenge,pos:"before",value:"?"},{name:t.Haitiangourde,pos:"before",value:"HTG"},{name:t.won,pos:"before",value:"?"},{name:t.NetherlandsAntillesGuilder,pos:"before",value:"NAf."},{name:t.Honduraslempiras,pos:"before",value:"L"},{name:t.DjiboutiFranc,pos:"before",value:"Fdj"},{name:t.KyrgyzstanSom,pos:"before",value:"KGS"},{name:t.GuineaFranc,pos:"before",value:"FG"},{name:t.CanadianDollar,pos:"before",value:"$"},{name:t.GhanaianCedi,pos:"before",value:"GHS"},{name:t.Cambodianriel,pos:"before",value:"Riel"},{name:t.CzechKoruna,pos:"after",value:"K?"},{name:t.ZimbabweDollar,pos:"before",value:"$"},{name:t.QatariRiyal,pos:"before",value:"Rial"},{name:t.CaymanIslandsDollar,pos:"before",value:"$"},{name:t.Comorianfranc,pos:"before",value:"CF"},{name:t.KuwaitiDinar,pos:"before",value:"din"},{name:t.CroatianKuna,pos:"before",value:"kn"},{name:t.KenyanShilling,pos:"before",value:"Ksh"},{name:t.LesothoLoti,pos:"before",value:"LSL"},{name:t.LaoKip,pos:"before",value:"?"},{name:t.LebanesePound,pos:"before",value:"L\uFFE1"},{name:t.Lithuanianlitas,pos:"before",value:"Lt"},{name:t.LibyanDinar,pos:"before",value:"din"},{name:t.LiberianDollar,pos:"before",value:"$"},{name:t.RwandaFranc,pos:"before",value:"RF"},{name:t.RomanianLeu,pos:"before",value:"RON"},{name:t.MalagasyAriary,pos:"before",value:"Ar"},{name:t.MaldivianRufiyaa,pos:"before",value:"Rf"},{name:t.MalawiKwacha,pos:"before",value:"MWK"},{name:t.MalaysianRinggit,pos:"before",value:"RM"},{name:t.MacedoniawearingDinar,pos:"before",value:"din"},{name:t.MauritiusRupee,pos:"before",value:"MURs"},{name:t.MauritanianOuguiya,pos:"before",value:"MRO"},{name:t.MongolianTugrik,pos:"before",value:"?"},{name:t.BangladeshiTaka,pos:"before",value:"?"},{name:t.PeruvianNuevoSol,pos:"before",value:"S/"},{name:t.MyanmarKyat,pos:"before",value:"K"},{name:t.MoldovanLeu,pos:"before",value:"MDL"},{name:t.MoroccanDirham,pos:"before",value:"dh"},{name:t.MozambiqueMetical,pos:"before",value:"MTn"},{name:t.MexicanPeso,pos:"before",value:"$"},{name:t.NamibianDollar,pos:"before",value:"$"},{name:t.SouthAfricanRand,pos:"before",value:"R"},{name:t.SouthSudanesePound,pos:"before",value:"\uFFE1"},{name:t.NicaraguaCordoba,pos:"before",value:"C$"},{name:t.NepaleseRupee,pos:"before",value:"Rs"},{name:t.NigerianNaira,pos:"before",value:"?"},{name:t.NorwegianKrone,pos:"after",value:"kr"},{name:t.GeorgianLari,pos:"before",value:"GEL"},{name:t.RenminbiOffshore,pos:"before",value:"\uFFE5"},{name:t.SwedishKrona,pos:"after",value:"kr"},{name:t.SwissFranc,pos:"before",value:"CHF"},{name:t.SerbianDinar,pos:"before",value:"din"},{name:t.SierraLeone,pos:"before",value:"SLL"},{name:t.SeychellesRupee,pos:"before",value:"SCR"},{name:t.SaudiRiyal,pos:"before",value:"Rial"},{name:t.SaoTomeDobra,pos:"before",value:"Db"},{name:t.SaintHelenapound,pos:"before",value:"\uFFE1"},{name:t.SriLankaRupee,pos:"before",value:"Rs"},{name:t.SwazilandLilangeni,pos:"before",value:"SZL"},{name:t.SudanesePound,pos:"before",value:"SDG"},{name:t.Surinamesedollar,pos:"before",value:"$"},{name:t.SolomonIslandsDollar,pos:"before",value:"$"},{name:t.SomaliShilling,pos:"before",value:"SOS"},{name:t.TajikistanSomoni,pos:"before",value:"Som"},{name:t.PacificFranc,pos:"after",value:"FCFP"},{name:t.ThaiBaht,pos:"before",value:"?"},{name:t.TanzanianShilling,pos:"before",value:"TSh"},{name:t.TonganPaanga,pos:"before",value:"T$"},{name:t.TrinidadandTobagoDollar,pos:"before",value:"$"},{name:t.TunisianDinar,pos:"before",value:"din"},{name:t.TurkishLira,pos:"before",value:"?"},{name:t.VanuatuVatu,pos:"before",value:"VUV"},{name:t.GuatemalanQuetzal,pos:"before",value:"Q"},{name:t.CommissionBolivar,pos:"before",value:"Bs"},{name:t.BruneiDollar,pos:"before",value:"$"},{name:t.UgandanShilling,pos:"before",value:"UGX"},{name:t.UkrainianHryvnia,pos:"before",value:"\u0433\u0440\u043D."},{name:t.UruguayanPeso,pos:"before",value:"$"},{name:t.Uzbekistansom,pos:"before",value:"so?m"},{name:t.WesternSamoaTala,pos:"before",value:"WST"},{name:t.SingaporeDollar,pos:"before",value:"$"},{name:t.NT,pos:"before",value:"NT$"},{name:t.NewZealandDollar,pos:"before",value:"$"},{name:t.HungarianForint,pos:"before",value:"Ft"},{name:t.SyrianPound,pos:"before",value:"\uFFE1"},{name:t.JamaicanDollar,pos:"before",value:"$"},{name:t.ArmenianDram,pos:"before",value:"Dram"},{name:t.YemeniRial,pos:"before",value:"Rial"},{name:t.IraqiDinar,pos:"before",value:"din"},{name:t.IranianRial,pos:"before",value:"Rial"},{name:t.NewIsraeliShekel,pos:"before",value:"?"},{name:t.IndianRupee,pos:"before",value:"?"},{name:t.IndonesianRupiah,pos:"before",value:"Rp"},{name:t.JordanianDinar,pos:"before",value:"din"},{name:t.VND,pos:"after",value:"?"},{name:t.ZambianKwacha,pos:"before",value:"ZMW"},{name:t.GibraltarPound,pos:"before",value:"\uFFE1"},{name:t.ChileanPeso,pos:"before",value:"$"},{name:t.CFAFrancBEAC,pos:"before",value:"FCFA"}],this.dateFmtList=Q().dateFmtList,this.numFmtList=[{name:"1235",value:"0"},{name:"1234.56",value:"0.00"},{name:"1,235",value:"#,##0"},{name:"1,234.56",value:"#,##0.00"},{name:"1,235",value:"#,##0_);(#,##0)"},{name:"1,235",value:"#,##0_);[Red](#,##0)"},{name:"1,234.56",value:"#,##0.00_);(#,##0.00)"},{name:"1,234.56",value:"#,##0.00_);[Red](#,##0.00)"},{name:"$1,235",value:"$#,##0_);($#,##0)"},{name:"$1,235",value:"$#,##0_);[Red]($#,##0)"},{name:"$1,234.56",value:"$#,##0.00_);($#,##0.00)"},{name:"$1,234.56",value:"$#,##0.00_);[Red]($#,##0.00)"},{name:"1234.56",value:"@"},{name:"123456%",value:"0%"},{name:"123456.00%",value:"0.00%"},{name:"1.23E+03",value:"0.00E+00"},{name:"1.2E+3",value:"##0.0E+0"},{name:"1234 5/9",value:"# ?/?"},{name:"1234 14/25",value:"# ??/??"},{name:"$ 1,235",value:'_($* #,##0_);_(...($* "-"_);_(@_)'},{name:"1,235",value:'_(* #,##0_);_(*..._(* "-"_);_(@_)'},{name:"$ 1,234.56",value:'_($* #,##0.00_);_(...($* "-"_);_(@_)'},{name:"1,234.56",value:'_(* #,##0.00_);...* "-"??_);_(@_)'}],$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-moreFormat-dialog").remove();let o="",s="";if(e=="morecurrency"){o=l.titleCurrency;let b="";for(let k=0;k<n.moneyFmtList.length;k++){let w=n.moneyFmtList[k].name,x=n.moneyFmtList[k].pos,C=n.moneyFmtList[k].value;b+='<div class="listItem"><div class="name">'+w+'</div><div class="value">'+C+'</div><input type="hidden" value="'+x+'"/></div>'}s='<div class="box" id="morecurrency"><div class="decimal"><label>'+l.decimalPlaces+'\uFF1A</label><input type="number" class="formulaInputFocus" value="2" min="0" max="9"/></div><div class="listbox">'+b+"</div></div>"}else if(e=="moredatetime"){o=l.titleDateTime;let b="";for(let k=0;k<n.dateFmtList.length;k++){let w=n.dateFmtList[k].name,x=n.dateFmtList[k].value;b+='<div class="listItem"><div class="name">'+w+'</div><div class="value">'+x+"</div></div>"}s='<div class="box" id="moredatetime"><div class="listbox">'+b+"</div></div>"}else if(e=="moredigit"){o=l.titleNumber;let b="";for(let k=0;k<n.numFmtList.length;k++){let w=n.numFmtList[k].name,x=n.numFmtList[k].value;b+='<div class="listItem"><div class="name">'+w+'</div><div class="value">'+x+"</div></div>"}s='<div class="box" id="moredigit"><div class="listbox">'+b+"</div></div>"}$("body").append(_e(dt,{id:"luckysheet-moreFormat-dialog",addclass:"luckysheet-moreFormat-dialog",title:o,content:s,botton:'<button id="luckysheet-moreFormat-dialog-confirm" class="btn btn-primary">'+a.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+a.cancel+"</button>",style:"z-index:100003"}));let u=$("#luckysheet-moreFormat-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),f=u.outerHeight(),d=u.outerWidth(),m=$(window).width(),g=$(window).height(),y=$(document).scrollLeft(),v=$(document).scrollTop();$("#luckysheet-moreFormat-dialog").css({left:(m+y-d)/2,top:(g+v-f)/3}).show(),$("#luckysheet-moreFormat-dialog .listbox .listItem").eq(0).addClass("on")},init:function(){let e=this;$(document).on("click","#luckysheet-moreFormat-dialog .listbox .listItem",function(){$(this).addClass("on").siblings().removeClass("on")}),$(document).off("click.moreFormatConfirm").on("click.moreFormatConfirm","#luckysheet-moreFormat-dialog #luckysheet-moreFormat-dialog-confirm",function(){$("#luckysheet-moreFormat-dialog").hide(),$("#luckysheet-modal-dialog-mask").hide();let n=xe.deepCopyFlowData(h.flowdata),t=$("#luckysheet-moreFormat-dialog .listbox .listItem.on .value").text(),l=$(this).parents("#luckysheet-moreFormat-dialog").find(".box").attr("id");if(l=="morecurrency"){if(t.indexOf("?")!=-1)return;let a=parseInt($("#luckysheet-moreFormat-dialog .decimal input").val().trim());if(a.toString()=="NaN"||a<0||a>9){fe()?alert("\u5C0F\u6570\u4F4D\u6570\u5FC5\u987B\u57280-9\u4E4B\u95F4\uFF01"):U.info("\u5C0F\u6570\u4F4D\u6570\u5FC5\u987B\u57280-9\u4E4B\u95F4\uFF01","");return}let o="";if(a>0){for(let u=1;u<=a;u++)o+="0";o="0."+o}else o="#";let s=$("#luckysheet-moreFormat-dialog .listbox .listItem.on input:hidden").val();s=="before"?o='"'+t+'" '+o:s=="after"&&(o=o+' "'+t+'"'),ke.updateFormat(n,"ct",o)}else l=="moredatetime"?ke.updateFormat(n,"ct",t):l=="moredigit"&&ke.updateFormat(n,"ct",t)})}},Uc=ub});var om=vl((TD,im)=>{"use strict";var hb=/["'&<>]/;im.exports=fb;function fb(e){var n=""+e,t=hb.exec(n);if(!t)return n;var l,a="",o=0,s=0;for(o=t.index;o<n.length;o++){switch(n.charCodeAt(o)){case 34:l=""";break;case 38:l="&";break;case 39:l="'";break;case 60:l="<";break;case 62:l=">";break;default:continue}s!==o&&(a+=n.substring(s,o)),s=o+1,a+=l}return s!==o?a+n.substring(s,o):a}});var ji,db,$n,Gc=Ie(()=>{ft();Nt();Gt();Zt();dl();Ft();Al();$r();Yt();Jt();ll();Li();Xe();bt();Ml();ji=Fl(om()),db={createDialog:function(e){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-search-replace").remove();let n=Q(),t=n.findAndReplace,l=n.button,a='<div class="tabBox"><span id="searchTab">'+t.find+'</span><span id="replaceTab">'+t.replace+'</span></div><div class="ctBox"><div class="inputBox"><div class="textboxs" id="searchInput">'+t.findTextbox+'\uFF1A<input class="formulaInputFocus" spellcheck="false" value=""/></div><div class="textboxs" id="replaceInput">'+t.replaceTextbox+'\uFF1A<input class="formulaInputFocus" spellcheck="false" value=""/></div><div class="checkboxs"><div id="regCheck"><input type="checkbox"/><span>'+t.regexTextbox+'</span></div><div id="wordCheck"><input type="checkbox"/><span>'+t.wholeTextbox+'</span></div><div id="caseCheck"><input type="checkbox"/><span>'+t.distinguishTextbox+'</span></div></div></div><div class="btnBox"><button id="replaceAllBtn" class="btn btn-default">'+t.allReplaceBtn+'</button><button id="replaceBtn" class="btn btn-default">'+t.replaceBtn+'</button><button id="searchAllBtn" class="btn btn-default">'+t.allFindBtn+'</button><button id="searchNextBtn" class="btn btn-default">'+t.findBtn+"</button></div></div>";$("body").append(_e(dt,{id:"luckysheet-search-replace",addclass:"luckysheet-search-replace",title:"",content:a,botton:'<button class="btn btn-default luckysheet-model-close-btn">'+l.close+"</button>",style:"z-index:100003",close:l.close}));let o=$("#luckysheet-search-replace").find(".luckysheet-modal-dialog-content").css("min-width",500).end(),s=o.outerHeight(),u=o.outerWidth(),f=$(window).width(),d=$(window).height(),m=$(document).scrollLeft(),g=$(document).scrollTop();$("#luckysheet-search-replace").css({left:(f+m-u)/2,top:(d+g-s)/3}).show(),e=="0"?($("#luckysheet-search-replace #searchTab").addClass("on").siblings().removeClass("on"),$("#luckysheet-search-replace #replaceInput").hide(),$("#luckysheet-search-replace #replaceAllBtn").hide(),$("#luckysheet-search-replace #replaceBtn").hide()):e=="1"&&($("#luckysheet-search-replace #replaceTab").addClass("on").siblings().removeClass("on"),$("#luckysheet-search-replace #replaceInput").show(),$("#luckysheet-search-replace #replaceAllBtn").show(),$("#luckysheet-search-replace #replaceBtn").show())},init:function(){let e=this;$(document).off("click.SRtabBoxspan").on("click.SRtabBoxspan","#luckysheet-search-replace .tabBox span",function(){$(this).addClass("on").siblings().removeClass("on");let n=$(this).attr("id");n=="searchTab"?($("#luckysheet-search-replace #replaceInput").hide(),$("#luckysheet-search-replace #replaceAllBtn").hide(),$("#luckysheet-search-replace #replaceBtn").hide(),$("#luckysheet-search-replace #searchInput input").focus()):n=="replaceTab"&&($("#luckysheet-search-replace #replaceInput").show(),$("#luckysheet-search-replace #replaceAllBtn").show(),$("#luckysheet-search-replace #replaceBtn").show(),$("#luckysheet-search-replace #replaceInput input").focus())}),$(document).off("keyup.SRsearchInput").on("keyup.SRsearchInput","#luckysheet-search-replace #searchInput input",function(n){n.keyCode==it.ENTER&&e.searchNext()}),$(document).off("click.SRsearchNextBtn").on("click.SRsearchNextBtn","#luckysheet-search-replace #searchNextBtn",function(){e.searchNext()}),$(document).off("click.SRsearchAllBtn").on("click.SRsearchAllBtn","#luckysheet-search-replace #searchAllBtn",function(){e.searchAll()}),$(document).off("click.SRsearchAllboxItem").on("click.SRsearchAllboxItem","#luckysheet-search-replace #searchAllbox .boxItem",function(){$(this).addClass("on").siblings().removeClass("on");let n=$(this).attr("data-row"),t=$(this).attr("data-col"),l=$(this).attr("data-sheetIndex");l!=h.currentSheetIndex&&ve.changeSheetExec(l),h.luckysheet_select_save=[{row:[n,n],column:[t,t]}],lt();let a=$("#luckysheet-cell-main").scrollLeft(),o=$("#luckysheet-cell-main").scrollTop(),s=$("#luckysheet-cell-main").height(),u=$("#luckysheet-cell-main").width(),f=h.visibledatarow[n],d=n-1==-1?0:h.visibledatarow[n-1],m=h.visibledatacolumn[t],g=t-1==-1?0:h.visibledatacolumn[t-1];m-a-u+20>0?$("#luckysheet-scrollbar-x").scrollLeft(m-u+20):g-a-20<0&&$("#luckysheet-scrollbar-x").scrollLeft(g-20),f-o-s+20>0?$("#luckysheet-scrollbar-y").scrollTop(f-s+20):d-o-20<0&&$("#luckysheet-scrollbar-y").scrollTop(d-20)}),$(document).off("click.SRreplaceBtn").on("click.SRreplaceBtn","#luckysheet-search-replace #replaceBtn",function(){e.replace()}),$(document).off("click.SRreplaceAllBtn").on("click.SRreplaceAllBtn","#luckysheet-search-replace #replaceAllBtn",function(){e.replaceAll()})},searchNext:function(){let e=this,n=$("#luckysheet-search-replace #searchInput input").val();if(n==""||n==null)return;let l=Q().findAndReplace,a;h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]?a=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1]}]:a=$.extend(!0,[],h.luckysheet_select_save);let o=e.getSearchIndexArr(n,a);if(o.length==0){fe()?alert(l.noFindTip):U.info(l.noFindTip,"");return}let s=0;if(h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]){if(h.luckysheet_select_save.length==0)s=0;else for(let k=0;k<o.length;k++)if(o[k].r==h.luckysheet_select_save[0].row[0]&&o[k].c==h.luckysheet_select_save[0].column[0]){k==o.length-1?s=0:s=k+1;break}h.luckysheet_select_save=[{row:[o[s].r,o[s].r],column:[o[s].c,o[s].c]}]}else{let k=a[a.length-1].row_focus,w=a[a.length-1].column_focus;for(let x=0;x<o.length;x++)if(o[x].r==k&&o[x].c==w){x==o.length-1?s=0:s=x+1;break}for(let x=0;x<a.length;x++){let C=a[x].row[0],S=a[x].row[1],_=a[x].column[0],T=a[x].column[1];if(o[s].r>=C&&o[s].r<=S&&o[s].c>=_&&o[s].c<=T){let A=a[x];A.row_focus=o[s].r,A.column_focus=o[s].c,a.splice(x,1),a.push(A);break}}h.luckysheet_select_save=a}lt();let u=$("#luckysheet-cell-main").scrollLeft(),f=$("#luckysheet-cell-main").scrollTop(),d=$("#luckysheet-cell-main").height(),m=$("#luckysheet-cell-main").width(),g=h.visibledatarow[o[s].r],y=o[s].r-1==-1?0:h.visibledatarow[o[s].r-1],v=h.visibledatacolumn[o[s].c],b=o[s].c-1==-1?0:h.visibledatacolumn[o[s].c-1];v-u-m+20>0?$("#luckysheet-scrollbar-x").scrollLeft(v-m+20):b-u-20<0&&$("#luckysheet-scrollbar-x").scrollLeft(b-20),g-f-d+20>0?$("#luckysheet-scrollbar-y").scrollTop(g-d+20):y-f-20<0&&$("#luckysheet-scrollbar-y").scrollTop(y-20),$("#searchAllbox").is(":visible")&&$("#luckysheet-search-replace #searchAllbox .boxItem").removeClass("on")},searchAll:function(){let e=this,t=Q().findAndReplace;$("#luckysheet-search-replace #searchAllbox").remove();let l=$("#luckysheet-search-replace #searchInput input").val();if(l==""||l==null)return;let a;h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]?a=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1]}]:a=$.extend(!0,[],h.luckysheet_select_save);let o=e.getSearchIndexArr(l,a);if(o.length==0){fe()?alert(t.noFindTip):U.info(t.noFindTip,"");return}let s="";for(let u=0;u<o.length;u++){let f=bn(o[u].r,o[u].c,h.flowdata).toString();f.indexOf("</")>-1&&f.indexOf(">")>-1?s+='<div class="boxItem" data-row="'+o[u].r+'" data-col="'+o[u].c+'" data-sheetIndex="'+h.currentSheetIndex+'"><span>'+(0,ji.default)(h.luckysheetfile[Z(h.currentSheetIndex)].name)+"</span><span>"+tt(o[u].c)+(o[u].r+1)+"</span><span>"+(0,ji.default)(f)+"</span></div>":s+='<div class="boxItem" data-row="'+o[u].r+'" data-col="'+o[u].c+'" data-sheetIndex="'+h.currentSheetIndex+'"><span>'+h.luckysheetfile[Z(h.currentSheetIndex)].name+"</span><span>"+tt(o[u].c)+(o[u].r+1)+'</span><span title="'+(0,ji.default)(f)+'">'+(0,ji.default)(f)+"</span></div>"}$(`<div id="searchAllbox"><div class="boxTitle"><span>${t.searchTargetSheet}</span><span>${t.searchTargetCell}</span><span>${t.searchTargetValue}</span></div><div class="boxMain">${s}</div></div>`).appendTo($("#luckysheet-search-replace")),$("#luckysheet-search-replace #searchAllbox .boxItem").eq(0).addClass("on").siblings().removeClass("on"),h.luckysheet_select_save=[{row:[o[0].r,o[0].r],column:[o[0].c,o[0].c]}],lt()},getSearchIndexArr:function(e,n){let t=[],l={},a=$("#luckysheet-search-replace"),o=g=>a.find(`#${g} input[type='checkbox']`).is(":checked"),s=o("regCheck"),u=o("wordCheck"),f=o("caseCheck"),d="g";f||(e=e.toLowerCase(),d+="i");let m=(g,y)=>{g+"_"+y in l||(l[g+"_"+y]=0,t.push({r:g,c:y}))};for(let g=0;g<n.length;g++){let y=n[g].row[0],v=n[g].row[1],b=n[g].column[0],k=n[g].column[1];for(let w=y;w<=v;w++)for(let x=b;x<=k;x++)if(h.flowdata[w][x]!=null){let S=bn(w,x,h.flowdata);if(S==0&&(S=S.toString()),S!=null&&S!=""){let _=!1;S=S.toString(),S=f?S:S.toLowerCase(),u?_=e==S:s?_=new RegExp(D.getRegExpStr(e),d).test(S):_=~S.indexOf(e),_&&m(w,x)}}}return t},replace:function(){let e=this,t=Q().findAndReplace;if(!h.allowEdit){U.info(t.modeTip,"");return}let l=$("#luckysheet-search-replace #searchInput input").val();if(l==""||l==null){fe()?alert(t.searchInputTip):U.info(t.searchInputTip,"");return}let a;h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]?a=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1]}]:a=$.extend(!0,[],h.luckysheet_select_save);let o=e.getSearchIndexArr(l,a);if(o.length==0){fe()?alert(t.noReplceTip):U.info(t.noReplceTip,"");return}let s=null,u=h.luckysheet_select_save[h.luckysheet_select_save.length-1],f=u.row_focus,d=u.column_focus;for(let F=0;F<o.length;F++)if(o[F].r==f&&o[F].c==d){s=F;break}if(s==null)if(o.length==0){fe()?alert(t.noMatchTip):U.info(t.noMatchTip,"");return}else s=0;let m=!1;$("#luckysheet-search-replace #regCheck input[type='checkbox']").is(":checked")&&(m=!0);let g=!1;$("#luckysheet-search-replace #wordCheck input[type='checkbox']").is(":checked")&&(g=!0);let y=!1;$("#luckysheet-search-replace #caseCheck input[type='checkbox']").is(":checked")&&(y=!0);let v=$("#luckysheet-search-replace #replaceInput input").val(),b=xe.deepCopyFlowData(h.flowdata),k,w;if(g){k=o[s].r,w=o[s].c;let F=v;if(!wn(k,w,h.currentSheetIndex))return;Ht(k,w,b,F)}else{let F;if(y?F=new RegExp(D.getRegExpStr(l),"g"):F=new RegExp(D.getRegExpStr(l),"ig"),k=o[s].r,w=o[s].c,!wn(k,w,h.currentSheetIndex))return;let z=bn(k,w,b).toString().replace(F,v);Ht(k,w,b,z)}h.luckysheet_select_save=[{row:[k,k],column:[w,w]}],$("#luckysheet-search-replace #searchAllbox").is(":visible")&&$("#luckysheet-search-replace #searchAllbox").hide(),Ze(b,h.luckysheet_select_save),lt();let x=$("#luckysheet-cell-main").scrollLeft(),C=$("#luckysheet-cell-main").scrollTop(),S=$("#luckysheet-cell-main").height(),_=$("#luckysheet-cell-main").width(),T=h.visibledatarow[k],A=k-1==-1?0:h.visibledatarow[k-1],R=h.visibledatacolumn[w],I=w-1==-1?0:h.visibledatacolumn[w-1];R-x-_+20>0?$("#luckysheet-scrollbar-x").scrollLeft(R-_+20):I-x-20<0&&$("#luckysheet-scrollbar-x").scrollLeft(I-20),T-C-S+20>0?$("#luckysheet-scrollbar-y").scrollTop(T-S+20):A-C-20<0&&$("#luckysheet-scrollbar-y").scrollTop(A-20)},replaceAll:function(){let e=this,t=Q().findAndReplace;if(!h.allowEdit){U.info(t.modeTip,"");return}let l=$("#luckysheet-search-replace #searchInput input").val();if(l==""||l==null){fe()?alert(t.searchInputTip):U.info(t.searchInputTip,"");return}let a;h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]?a=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1]}]:a=$.extend(!0,[],h.luckysheet_select_save);let o=e.getSearchIndexArr(l,a);if(o.length==0){fe()?alert(t.noReplceTip):U.info(t.noReplceTip,"");return}let s=!1;$("#luckysheet-search-replace #regCheck input[type='checkbox']").is(":checked")&&(s=!0);let u=!1;$("#luckysheet-search-replace #wordCheck input[type='checkbox']").is(":checked")&&(u=!0);let f=!1;$("#luckysheet-search-replace #caseCheck input[type='checkbox']").is(":checked")&&(f=!0);let d=$("#luckysheet-search-replace #replaceInput input").val(),m=xe.deepCopyFlowData(h.flowdata),g=0;if(u)for(let v=0;v<o.length;v++){let b=o[v].r,k=o[v].c;if(!wn(b,k,h.currentSheetIndex,!1))continue;Ht(b,k,m,d),a.push({row:[b,b],column:[k,k]}),g++}else{let v;f?v=new RegExp(D.getRegExpStr(l),"g"):v=new RegExp(D.getRegExpStr(l),"ig");for(let b=0;b<o.length;b++){let k=o[b].r,w=o[b].c;if(!wn(k,w,h.currentSheetIndex,!1))continue;let x=bn(k,w,m).toString().replace(v,d);Ht(k,w,m,x),a.push({row:[k,k],column:[w,w]}),g++}}$("#luckysheet-search-replace #searchAllbox").is(":visible")&&$("#luckysheet-search-replace #searchAllbox").hide(),Ze(m,a),h.luckysheet_select_save=$.extend(!0,[],a),lt();let y=_e(t.successTip,{xlength:g});fe()?alert(y):U.info(y,"")}},$n=db});var mb,Xr,sm=Ie(()=>{ft();Nt();Ft();Ft();ll();Gt();Zt();gr();Xe();bt();mb={createDialog:function(){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-locationCell-dialog").remove();let e=Q(),n=e.findAndReplace,t=e.button,l='<div class="listbox"><div class="listItem"><input type="radio" name="locationType" checked="checked" id="locationConstant"><label for="locationConstant">'+n.locationConstant+'</label><div class="subbox"><div class="subItem"><input type="checkbox" checked="checked" class="date" id="locationConstantDate"><label for="locationConstantDate">'+n.locationDate+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="number" id="locationConstantNumber"><label for="locationConstantNumber">'+n.locationDigital+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="string" id="locationConstantString"><label for="locationConstantString">'+n.locationString+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="boolean" id="locationConstantBoolean"><label for="locationConstantBoolean">'+n.locationBool+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="error" id="locationConstantError"><label for="locationConstantError">'+n.locationBool+'</label></div></div></div><div class="listItem"><input type="radio" name="locationType" id="locationFormula"><label for="locationFormula">'+n.locationFormula+'</label><div class="subbox"><div class="subItem"><input type="checkbox" checked="checked" class="date" id="locationFormulaDate" disabled="true"><label for="locationFormulaDate" style="color: #666">'+n.locationDate+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="number" id="locationFormulaNumber" disabled="true"><label for="locationFormulaNumber" style="color: #666">'+n.locationDigital+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="string" id="locationFormulaString" disabled="true"><label for="locationFormulaString" style="color: #666">'+n.locationString+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="boolean" id="locationFormulaBoolean" disabled="true"><label for="locationFormulaBoolean" style="color: #666">'+n.locationBool+'</label></div><div class="subItem"><input type="checkbox" checked="checked" class="error" id="locationFormulaError" disabled="true"><label for="locationFormulaError" style="color: #666">'+n.locationError+'</label></div></div></div><div class="listItem"><input type="radio" name="locationType" id="locationNull"><label for="locationNull">'+n.locationNull+'</label></div><div class="listItem"><input type="radio" name="locationType" id="locationCF"><label for="locationCF">'+n.locationCondition+'</label></div><div class="listItem"><input type="radio" name="locationType" id="locationStepRow"><label for="locationStepRow">'+n.locationRowSpan+'</label></div><div class="listItem"><input type="radio" name="locationType" id="locationStepColumn"><label for="locationStepColumn">'+n.locationColumnSpan+"</label></div></div>";$("body").append(_e(dt,{id:"luckysheet-locationCell-dialog",addclass:"luckysheet-locationCell-dialog",title:n.location,content:l,botton:'<button id="luckysheet-locationCell-dialog-confirm" class="btn btn-primary">'+t.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+t.cancel+"</button>",style:"z-index:100003"}));let a=$("#luckysheet-locationCell-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),f=$(window).height(),d=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-locationCell-dialog").css({left:(u+d-s)/2,top:(f+m-o)/3}).show()},init:function(){let e=this,n=Q().findAndReplace;$(document).on("click","#luckysheet-locationCell-dialog .listItem input:radio",function(t){$("#luckysheet-locationCell-dialog .listItem input:checkbox").prop("disabled",!0),$("#luckysheet-locationCell-dialog .listItem .subbox label").css("color","#666"),$(this).siblings(".subbox").find("input:checkbox").removeAttr("disabled"),$(this).siblings(".subbox").find("label").css("color","#000")}),$(document).off("click.locationCellConfirm").on("click.locationCellConfirm","#luckysheet-locationCell-dialog #luckysheet-locationCell-dialog-confirm",function(){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-locationCell-dialog").hide();let t=$("#luckysheet-locationCell-dialog .listItem input:radio:checked"),l=t.attr("id");if(l=="locationConstant"||l=="locationFormula"){let a=t.siblings(".subbox").find("input:checkbox:checked"),o;if(a.length==0)return;if(a.length==5)o="all";else{let u=[];for(let f=0;f<a.length;f++)$(a[f]).hasClass("date")?u.push("d"):$(a[f]).hasClass("number")?u.push("n"):$(a[f]).hasClass("string")?u.push("s,g"):$(a[f]).hasClass("boolean")?u.push("b"):$(a[f]).hasClass("error")&&u.push("e");o=u.join(",")}let s;h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]?s=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1]}]:s=$.extend(!0,[],h.luckysheet_select_save),e.apply(s,l,o)}else if(l=="locationStepRow"){if(h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]){fe()?alert(n.locationTiplessTwoRow):U.info("",n.locationTiplessTwoRow);return}let a=$.extend(!0,[],h.luckysheet_select_save);e.apply(a,"locationStepRow")}else if(l=="locationStepColumn"){if(h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]){fe()?alert(n.locationTiplessTwoColumn):U.info("",n.locationTiplessTwoColumn);return}let a=$.extend(!0,[],h.luckysheet_select_save);e.apply(a,"locationStepColumn")}else{let a;h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]?a=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1]}]:a=$.extend(!0,[],h.luckysheet_select_save),e.apply(a,l)}})},apply:function(e,n,t){let l=Q().findAndReplace,a=[];if(n=="locationFormula"||n=="locationConstant"||n=="locationNull"){let o=null,s=null,u=null,f=null,d={};for(let m=0;m<e.length;m++){let g=e[m].row[0],y=e[m].row[1],v=e[m].column[0],b=e[m].column[1];(o==null||o<g)&&(o=g),(s==null||s>y)&&(s=y),(u==null||u<v)&&(u=v),(f==null||f>b)&&(f=b);for(let k=g;k<=y;k++)for(let w=v;w<=b;w++){let x=h.flowdata[k][w];x!=null&&x.mc!=null&&(x=h.flowdata[x.mc.r][x.mc.c]),(n=="locationFormula"&&x!=null&&!me(x.v)&&x.f!=null&&(t=="all"||x.ct!=null&&t.indexOf(x.ct.t)>-1)||n=="locationConstant"&&x!=null&&!me(x.v)&&(t=="all"||x.ct!=null&&t.indexOf(x.ct.t)>-1)||n=="locationNull"&&(x==null||me(x.v)))&&(d[k+"_"+w]=0)}}a=this.getRangeArr(o,s,u,f,d,a)}else if(n=="locationCF"){let o=Z(h.currentSheetIndex),s=h.luckysheetfile[o].luckysheet_conditionformat_save,u=h.luckysheetfile[o].data;if(s==null||s.length==0){fe()?alert(l.locationTipNotFindCell):U.info("",l.locationTipNotFindCell);return}if(computeMap=$e.compute(s,u),Object.keys(computeMap).length==0){fe()?alert(l.locationTipNotFindCell):U.info("",l.locationTipNotFindCell);return}let f=null,d=null,m=null,g=null,y={};for(let v=0;v<e.length;v++){let b=e[v].row[0],k=e[v].row[1],w=e[v].column[0],x=e[v].column[1];(f==null||f<b)&&(f=b),(d==null||d>k)&&(d=k),(m==null||m<w)&&(m=w),(g==null||g>x)&&(g=x);for(let C=b;C<=k;C++)for(let S=w;S<=x;S++)C+"_"+S in computeMap&&(y[C+"_"+S]=0)}a=this.getRangeArr(f,d,m,g,y,a)}else if(n=="locationStepRow")for(let o=0;o<e.length;o++){if(e[o].row[0]==e[o].row[1])continue;let s=e[o].row[0],u=e[o].row[1],f=e[o].column[0],d=e[o].column[1];for(let m=s;m<=u;m++)(m-s)%2==0&&a.push({row:[m,m],column:[f,d]})}else if(n=="locationStepColumn")for(let o=0;o<e.length;o++){if(e[o].column[0]==e[o].column[1])continue;let s=e[o].row[0],u=e[o].row[1],f=e[o].column[0],d=e[o].column[1];for(let m=f;m<=d;m++)(m-f)%2==0&&a.push({row:[s,u],column:[m,m]})}if(a.length==0)fe()?alert(l.locationTipNotFindCell):U.info("",l.locationTipNotFindCell);else{h.luckysheet_select_save=a,lt();let o=$("#luckysheet-cell-main").scrollLeft(),s=$("#luckysheet-cell-main").scrollTop(),u=$("#luckysheet-cell-main").height(),f=$("#luckysheet-cell-main").width(),d=h.luckysheet_select_save[0].row[0],m=h.luckysheet_select_save[0].row[1],g=h.luckysheet_select_save[0].column[0],y=h.luckysheet_select_save[0].column[1],v=h.visibledatarow[m],b=d-1==-1?0:h.visibledatarow[d-1],k=h.visibledatacolumn[y],w=g-1==-1?0:h.visibledatacolumn[g-1];k-o-f+20>0?$("#luckysheet-scrollbar-x").scrollLeft(k-f+20):w-o-20<0&&$("#luckysheet-scrollbar-x").scrollLeft(w-20),v-s-u+20>0?$("#luckysheet-scrollbar-y").scrollTop(v-u+20):b-s-20<0&&$("#luckysheet-scrollbar-y").scrollTop(b-20)}},getRangeArr(e,n,t,l,a,o){if(Object.keys(a).length==0)return o;let s=this,u=null,f=null,d=null,m=null;for(let g=e;g<=n;g++)for(let y=t;y<=l;y++){let v=h.flowdata[g][y];if(g+"_"+y in a)if(v!=null&&v.mc!=null)if(d==null){let b={row:[v.mc.r,v.mc.r+v.mc.rs-1],column:[v.mc.c,v.mc.c+v.mc.cs-1]};return o.push(b),a=s.deleteCellInSave(a,b),s.getRangeArr(e,n,t,l,a,o)}else if(y<m){let b={row:[u,f],column:[d,m]};return o.push(b),a=s.deleteCellInSave(a,b),s.getRangeArr(e,n,t,l,a,o)}else break;else d==null?(d=y,m=y,u=g,f=g):y>m&&(m=y);else if(d!=null){if(v!=null&&v.mc!=null)break;if(!(y<d))if(y<=m){let b={row:[u,f],column:[d,m]};return o.push(b),a=s.deleteCellInSave(a,b),s.getRangeArr(e,n,t,l,a,o)}else f=g}}if(d!=null){let g={row:[u,f],column:[d,m]};return o.push(g),a=s.deleteCellInSave(a,g),s.getRangeArr(e,n,t,l,a,o)}},deleteCellInSave(e,n){for(let t=n.row[0];t<=n.row[1];t++)for(let l=n.column[0];l<=n.column[1];l++)delete e[t+"_"+l];return e}},Xr=mb});var pb,ri,Wc=Ie(()=>{Ut();Jt();ba();Gt();ft();Xe();bt();pb={singleRangeFocus:!1,init:function(){let e=this,n=Q(),t=n.formula,l=n.button;$(document).off("focus.IFcompareValue").on("focus.IFcompareValue","#luckysheet-ifFormulaGenerator-dialog #compareValue",function(){$("#luckysheet-modal-dialog-mask").hide(),e.singleRangeFocus=!0}),$(document).off("click.IFsingRange").on("click.IFsingRange","#luckysheet-ifFormulaGenerator-dialog .singRange",function(){let a=$("#luckysheet-ifFormulaGenerator-dialog #compareValue").val().trim();p.iscelldata(a)?e.singleRangeDialog(a):e.singleRangeDialog()}),$(document).off("click.IFsingRangeConfirm").on("click.IFsingRangeConfirm","#luckysheet-ifFormulaGenerator-singleRange-confirm",function(){$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-ifFormulaGenerator-singleRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-dialog").show();let a=$(this).parents("#luckysheet-ifFormulaGenerator-singleRange-dialog").find("input").val().trim();$("#luckysheet-ifFormulaGenerator-dialog #compareValue").val(a),e.singleRangeFocus=!1}),$(document).off("click.IFsingRangeCancel").on("click.IFsingRangeCancel","#luckysheet-ifFormulaGenerator-singleRange-cancel",function(){$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-ifFormulaGenerator-singleRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-dialog").show(),e.singleRangeFocus=!1}),$(document).off("click.IFsingRangeClose").on("click.IFsingRangeClose","#luckysheet-ifFormulaGenerator-singleRange-dialog .luckysheet-modal-dialog-title-close",function(){$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-dialog").show(),e.singleRangeFocus=!1}),$(document).off("click.IFmultiRange").on("click.IFmultiRange","#luckysheet-ifFormulaGenerator-dialog .multiRange",function(){e.multiRangeDialog(),e.singleRangeFocus=!1}),$(document).off("click.IFmultiRangeConfirm").on("click.IFmultiRangeConfirm","#luckysheet-ifFormulaGenerator-multiRange-confirm",function(){$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide(),$("#luckysheet-ifFormulaGenerator-multiRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-dialog").show();let a=$(this).parents("#luckysheet-ifFormulaGenerator-multiRange-dialog").find("input").val().trim(),o=p.getcellrange(a),s=o.row[0],u=o.row[1],f=o.column[0],d=o.column[1],m=xe.deepCopyFlowData(h.flowdata),g=[];for(let b=s;b<=u;b++)for(let k=f;k<=d;k++)m[b]!=null&&m[b][k]!=null&&m[b][k].ct!=null&&m[b][k].ct.t=="n"&&g.push(m[b][k].v);for(let b=0;b<g.length;b++)for(let k=0;k<g.length-1-b;k++)if(g[k]<g[k+1]){let w=g[k];g[k]=g[k+1],g[k+1]=w}let y=g[0],v=g[g.length-1];$("#luckysheet-ifFormulaGenerator-dialog #smallRange").val(v),$("#luckysheet-ifFormulaGenerator-dialog #largeRange").val(y)}),$(document).off("click.IFmultiRangeCancel").on("click.IFmultiRangeCancel","#luckysheet-ifFormulaGenerator-multiRange-cancel",function(){$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide(),$("#luckysheet-ifFormulaGenerator-multiRange-dialog").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-dialog").show()}),$(document).off("click.IFmultiRangeClose").on("click.IFmultiRangeClose","#luckysheet-ifFormulaGenerator-multiRange-dialog .luckysheet-modal-dialog-title-close",function(){$("#luckysheet-formula-functionrange-select").hide(),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide(),$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-dialog").show()}),$(document).on("change","#DivisionMethod",function(){$(this).find("option:selected").val()=="2"?$("#DivisionMethodVal").hide():$("#DivisionMethodVal").show(),$("#luckysheet-ifFormulaGenerator-dialog .ifList").empty()}),$(document).off("click.IFcreateBtn").on("click.IFcreateBtn","#luckysheet-ifFormulaGenerator-dialog #createBtn",function(){let a=$(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#compareValue").val().trim();if(a==""){e.info(t.ifGenTipNotNullValue);return}let o=$(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#DivisionMethod option:selected").val();if(o=="2"){let s='<div class="item"><input type="number" class="smallNum formulaInputFocus"/><select class="operator"><option value="0"> <= </option><option value="1"> < </option></select><span class="compareValue">'+a+'</span><select class="operator2"><option value="0"> <= </option><option value="1" selected="selected"> < </option></select><input type="number" class="largeNum formulaInputFocus"/><span>'+t.ifGenTipLableTitile+'\uFF1A</span><input type="text" class="markText formulaInputFocus" value=""><i class="fa fa-remove" aria-hidden="true"></i></div>';$("#luckysheet-ifFormulaGenerator-dialog .ifList").append(s)}else{let s=$(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#smallRange").val().trim(),u=$(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#largeRange").val().trim(),f=$(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#DivisionMethodVal").val().trim();if(s==""||u==""){e.info(t.ifGenTipRangeNotforNull);return}else if(f==""){e.info(t.ifGenTipCutValueNotforNull);return}e.getIfList(a,s,u,o,f)}}),$(document).on("click","#luckysheet-ifFormulaGenerator-dialog .item .fa-remove",function(){$(this).parents(".item").remove()}),$(document).off("click.IFconfirmBtn").on("click.IFconfirmBtn","#luckysheet-ifFormulaGenerator-dialog-confirm",function(){let a=$(this).parents("#luckysheet-ifFormulaGenerator-dialog").find(".ifList .item"),o="";if($(a.toArray().reverse()).each(function(d,m){let g=$(m).find(".smallNum").val().trim(),y=$(m).find(".largeNum").val().trim(),v=$(m).find(".operator option:selected").val(),b=$(m).find(".operator2 option:selected").val(),k=$(m).find(".compareValue").text(),w=$(m).find(".markText").val().trim();if(w==""&&(w=t.ifGenTipLableTitile+(d+1)),g==""&&y=="")return!0;let x;v=="0"?x=k+">="+g:x=k+">"+g;let C;b=="0"?C=k+"<="+y:C=k+"<"+y;let S;d==0&&y==""?S=x:d==a.length-1&&g==""?S=C:S="and("+x+","+C+")",d==0?o="if("+S+',"'+w+'")':o="if("+S+',"'+w+'",'+o+")"}),o.length==0){e.info(t.ifGenTipNotGenCondition);return}$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-ifFormulaGenerator-dialog").hide();let s=h.luckysheet_select_save[h.luckysheet_select_save.length-1],u=s.row_focus,f=s.column_focus;Rl(u,f,h.flowdata),$("#luckysheet-rich-text-editor").html("="+o),$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()),$("#luckysheet-wa-functionbox-confirm").click()}),$(document).on("click","#luckysheet-ifFormulaGenerator-info .luckysheet-model-close-btn",function(){$("#luckysheet-modal-dialog-mask").show()}),$(document).on("click","#luckysheet-ifFormulaGenerator-info .luckysheet-modal-dialog-title-close",function(){$("#luckysheet-modal-dialog-mask").show()})},ifFormulaDialog:function(e){let n=this,t=Q(),l=t.formula,a=t.button;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-dialog").remove();let o="",s="";if(e){let k=e.split("if(");for(let w=1;w<k.length;w++){let C=k[w].replace("and(","").replace(/\)/g,"").replace(/\"/g,"").split(",");C=n.clearArr(C),o=n.splitTxt(C[0])[0];let S,_,T;C.length==3?(S=n.splitTxt(C[0])[1],_=n.splitTxt(C[1])[2],T=C[2]):(S=n.splitTxt(C[0])[1],_=n.splitTxt(C[0])[2],T=C[1]),s+='<div class="item"><input type="number" class="smallNum formulaInputFocus" value="'+S+'"/><select class="operator"><option value="0"> <= </option><option value="1"> < </option></select><span class="compareValue">'+o+'</span><select class="operator2"><option value="0"> <= </option><option value="1" selected="selected"> < </option></select><input type="number" class="largeNum formulaInputFocus" value="'+_+'"/><span>'+l.ifGenTipLableTitile+'\uFF1A</span><input type="text" class="markText formulaInputFocus" value="'+T+'"><i class="fa fa-remove" aria-hidden="true"></i></div>'}}let u='<div class="ifAttr"><div class="attrBox"><label for="compareValue"> '+l.ifGenCompareValueTitle+' </label><div class="inpBox"><input id="compareValue" class="formulaInputFocus" value="'+o+'"/><i class="singRange fa fa-table" aria-hidden="true" title="'+l.ifGenSelectCellTitle+'"></i></div></div><div class="attrBox"><label for="smallRange"> '+l.ifGenRangeTitle+' </label><input type="number" id="smallRange" class="formulaInputFocus"/><span class="text"> '+l.ifGenRangeTo+' </span><input type="number" id="largeRange" class="formulaInputFocus"/><div id="rangeAssess"><span> '+l.ifGenRangeEvaluate+' </span><i class="multiRange fa fa-table" aria-hidden="true" title="'+l.ifGenSelectRangeTitle+'"></i></div></div><div class="attrBox"><label for="DivisionMethod"> '+l.ifGenCutWay+' </label><select id="DivisionMethod"><option value="0"> '+l.ifGenCutSame+' </option><option value="1"> '+l.ifGenCutNpiece+' </option><option value="2"> '+l.ifGenCutCustom+' </option></select><input id="DivisionMethodVal" class="formulaInputFocus"/><div id="createBtn"> '+l.ifGenCutSame+' </div></div></div><div class="ifList">'+s+"</div>";$("body").append(_e(dt,{id:"luckysheet-ifFormulaGenerator-dialog",addclass:"luckysheet-ifFormulaGenerator-dialog",title:l.ifGenerate,content:u,botton:'<button id="luckysheet-ifFormulaGenerator-dialog-confirm" class="btn btn-primary">'+a.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+a.cancel+"</button>",style:"z-index:100003"}));let f=$("#luckysheet-ifFormulaGenerator-dialog").find(".luckysheet-modal-dialog-content").css("min-width",590).end(),d=f.outerHeight(),m=f.outerWidth(),g=$(window).width(),y=$(window).height(),v=$(document).scrollLeft(),b=$(document).scrollTop();$("#luckysheet-ifFormulaGenerator-dialog").css({left:(g+v-m)/2,top:(y+b-d)/3}).show()},clearArr:function(e){for(let n=0;n<e.length;n++)(e[n]==""||e[n]==null||e[n]==null)&&e.splice(n,1);return e},splitTxt:function(e){let n,t,l;if(e.indexOf(">=")!=-1)return n=e.split(">=")[0],t=e.split(">=")[1],[n,t,l];if(e.indexOf(">")!=-1)return n=e.split(">")[0],t=e.split(">")[1],[n,t,l];if(e.indexOf("<=")!=-1)return n=e.split("<=")[0],l=e.split("<=")[1],[n,t,l];if(e.indexOf("<")!=-1)return n=e.split("<")[0],l=e.split("<")[1],[n,t,l]},singleRangeDialog:function(e){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-ifFormulaGenerator-dialog").hide(),$("#luckysheet-ifFormulaGenerator-singleRange-dialog").remove();let n=Q(),t=n.formula,l=n.button;e==null&&(e=""),$("body").append(_e(dt,{id:"luckysheet-ifFormulaGenerator-singleRange-dialog",addclass:"luckysheet-ifFormulaGenerator-singleRange-dialog",title:t.ifGenTipSelectCell,content:'<input readonly="readonly" placeholder="'+t.ifGenTipSelectCellPlace+'" value="'+e+'">',botton:'<button id="luckysheet-ifFormulaGenerator-singleRange-confirm" class="btn btn-primary">'+l.confirm+'</button><button id="luckysheet-ifFormulaGenerator-singleRange-cancel" class="btn btn-default">'+l.cancel+"</button>",style:"z-index:100003"}));let a=$("#luckysheet-ifFormulaGenerator-singleRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),f=$(window).height(),d=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-ifFormulaGenerator-singleRange-dialog").css({left:(u+d-s)/2,top:(f+m-o)/3}).show()},multiRangeDialog:function(){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-ifFormulaGenerator-dialog").hide(),$("#luckysheet-ifFormulaGenerator-multiRange-dialog").remove();let e=Q(),n=e.formula,t=e.button;$("body").append(_e(dt,{id:"luckysheet-ifFormulaGenerator-multiRange-dialog",addclass:"luckysheet-ifFormulaGenerator-multiRange-dialog",title:n.ifGenTipSelectRange,content:'<input readonly="readonly" placeholder="'+n.ifGenTipSelectRangePlace+'" value="">',botton:'<button id="luckysheet-ifFormulaGenerator-multiRange-confirm" class="btn btn-primary">'+t.confirm+'</button><button id="luckysheet-ifFormulaGenerator-multiRange-cancel" class="btn btn-default">'+t.cancel+"</button>",style:"z-index:100003"}));let l=$("#luckysheet-ifFormulaGenerator-multiRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),a=l.outerHeight(),o=l.outerWidth(),s=$(window).width(),u=$(window).height(),f=$(document).scrollLeft(),d=$(document).scrollTop();$("#luckysheet-ifFormulaGenerator-multiRange-dialog").css({left:(s+f-o)/2,top:(u+d-a)/3}).show()},getIfList:function(e,n,t,l,a){let o=Q().formula;$("#luckysheet-ifFormulaGenerator-dialog .ifList").empty(),n=parseInt(n),t=parseInt(t),a=parseInt(a);let s=[];if(l=="0"){let u=Math.ceil((t-n)/a);for(let f=0;f<=u;f++){let d=n+a*f;f==0||d>=t?s.push(""):s.push(d)}}else if(l=="1"){let u=Math.ceil((t-n)/a);for(let f=0;f<=a;f++){let d=n+u*f;f==0||d>=t?s.push(""):s.push(d)}}for(let u=0;u<s.length-1;u++){let f;u==0?f="\u5C0F\u4E8E"+s[u+1]:u==s.length-2?f="\u5927\u4E8E\u7B49\u4E8E"+s[u]:f=s[u]+"\u5230"+s[u+1];let d='<div class="item"><input type="number" class="smallNum formulaInputFocus" value="'+s[u]+'"/><select class="operator"><option value="0"> <= </option><option value="1"> < </option></select><span class="compareValue">'+e+'</span><select class="operator2"><option value="0"> <= </option><option value="1" selected="selected"> < </option></select><input type="number" class="largeNum formulaInputFocus" value="'+s[u+1]+'"/><span>'+o.ifGenTipLableTitile+'\uFF1A</span><input type="text" class="markText formulaInputFocus" value="'+f+'"><i class="fa fa-remove" aria-hidden="true"></i></div>';$("#luckysheet-ifFormulaGenerator-dialog .ifList").append(d)}},info:function(e){$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-ifFormulaGenerator-info").remove();let t=Q().button;$("body").append(_e(dt,{id:"luckysheet-ifFormulaGenerator-info",addclass:"",title:e,content:"",botton:'<button class="btn btn-default luckysheet-model-close-btn"> '+t.close+" </button>",style:"z-index:100003"}));let l=$("#luckysheet-ifFormulaGenerator-info").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),a=l.outerHeight(),o=l.outerWidth(),s=$(window).width(),u=$(window).height(),f=$(document).scrollLeft(),d=$(document).scrollTop();$("#luckysheet-ifFormulaGenerator-info").css({left:(s+f-o)/2,top:(u+d-a)/3}).show()}},ri=pb});var gb,hn,Yc=Ie(()=>{Oi();Ut();Ft();Gt();Zt();ft();Xe();bt();gb={init:function(){let e=this,n=Q(),t=n.formulaMore,l=n.button;$(document).off("keyup.fxSFLI").on("keyup.fxSFLI","#searchFormulaListInput",function(){$("#formulaTypeList").empty();let a=$(this).val().toUpperCase(),o=h.functionlist;if(a=="")e.formulaListByType($("#formulaTypeSelect option:selected").val());else for(let s=0;s<o.length;s++)/^[a-zA-Z]+$/.test(a)?o[s].n.indexOf(a)!="-1"&&$('<div class="listBox" name="'+o[s].n+'"><span>'+o[s].n+"</span><span>"+o[s].a+"</span></div>").appendTo($("#formulaTypeList")):o[s].a.indexOf(a)!="-1"&&$('<div class="listBox" name="'+o[s].n+'"><span>'+o[s].n+"</span><span>"+o[s].a+"</span></div>").appendTo($("#formulaTypeList"));$("#formulaTypeList .listBox:first-child").addClass("on")}),$(document).off("change.fxFormulaTS").on("change.fxFormulaTS","#formulaTypeSelect",function(){let a=$("#formulaTypeSelect option:selected").val();e.formulaListByType(a)}),$(document).off("click.fxListbox").on("click.fxListbox","#formulaTypeList .listBox",function(){$(this).addClass("on").siblings().removeClass("on")}),$(document).off("click.fxFormulaCf").on("click.fxFormulaCf","#luckysheet-search-formula-confirm",function(){let a=$("#luckysheet-search-formula .listBox.on").attr("name"),o='<span dir="auto" class="luckysheet-formula-text-color">=</span><span dir="auto" class="luckysheet-formula-text-color">'+a.toUpperCase()+'</span><span dir="auto" class="luckysheet-formula-text-color">(</span><span dir="auto" class="luckysheet-formula-text-color">)</span>';$("#luckysheet-rich-text-editor").html(o),$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()),e.formulaParmDialog(a)}),$(document).off("focus.fxParamInput").on("focus.fxParamInput","#luckysheet-search-formula-parm .parmBox input",function(){let a=$(this).parents(".parmBox").index();p.data_parm_index=a;let o=$(this).parents("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-title-text").text(),s=h.luckysheet_function[o].p.length,u,f;a>=s?(u=h.luckysheet_function[o].p[s-1].detail,f=h.luckysheet_function[o].p[s-1].repeat):(u=h.luckysheet_function[o].p[a].detail,f=h.luckysheet_function[o].p[a].repeat),e.parmTxtShow($(this).val()),e.functionStrCompute(),$("#luckysheet-search-formula-parm .parmDetailsBox").empty();let d=$(this).parents(".parmBox").find(".name").text();if($("<span>"+d+":</span><span>"+u+"</span>").appendTo($("#luckysheet-search-formula-parm .parmDetailsBox")),f=="y"){let m=$("#luckysheet-search-formula-parm .parmBox").length;m<5&&a==m-1&&$('<div class="parmBox"><div class="name">'+t.valueTitle+""+(m+1)+'</div><div class="txt"><input class="formulaInputFocus" /><i class="fa fa-table" aria-hidden="true" title="'+t.tipSelectDataRange+'"></i></div><div class="val">=</div></div>').appendTo($("#luckysheet-search-formula-parm .parmListBox"))}}),$(document).off("blur.fxParamInput").on("blur.fxParamInput","#luckysheet-search-formula-parm .parmBox input",function(){let a=$(this).val();p.getfunctionParam(a).fn==null&&!p.iscelldata(a)&&!B(a)&&a!=""&&a.length<=2&&a.indexOf('"')!=0&&a.lastIndexOf('"')!=0&&(a='"'+a+'"',$(this).val(a),e.parmTxtShow(a),e.functionStrCompute())}),$(document).off("keyup.fxParamInput").on("keyup.fxParamInput","#luckysheet-search-formula-parm .parmBox input",function(){e.parmTxtShow($(this).val()),e.functionStrCompute()}),$(document).off("click.fxParamI").on("click.fxParamI","#luckysheet-search-formula-parm .parmBox i",function(){p.data_parm_index=$(this).parents(".parmBox").index(),$("#luckysheet-search-formula-parm").hide(),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-search-formula-parm-select").remove(),$(this).parents(".parmBox").find(".txt input").val()==""?$("body").append(_e(dt,{id:"luckysheet-search-formula-parm-select",addclass:"luckysheet-search-formula-parm-select",title:t.tipSelectDataRange,content:"<input id='luckysheet-search-formula-parm-select-input' class='luckysheet-datavisual-range-container' style='font-size: 14px;padding:5px;max-width:none;' spellcheck='false' aria-label='"+t.tipDataRangeTile+"' readonly='true' placeholder='"+t.tipDataRangeTile+"'>",botton:'<button id="luckysheet-search-formula-parm-select-confirm" class="btn btn-primary">'+l.confirm+"</button>",style:"z-index:100003"})):$("body").append(_e(dt,{id:"luckysheet-search-formula-parm-select",addclass:"luckysheet-search-formula-parm-select",title:t.tipSelectDataRange,content:"<input id='luckysheet-search-formula-parm-select-input' class='luckysheet-datavisual-range-container' style='font-size: 14px;padding:5px;max-width:none;' spellcheck='false' aria-label='"+t.tipDataRangeTile+"' readonly='true' value='"+$(this).parents(".parmBox").find(".txt input").val()+"'>",botton:'<button id="luckysheet-search-formula-parm-select-confirm" class="btn btn-primary">'+l.confirm+"</button>",style:"z-index:100003"}));let a=$("#luckysheet-search-formula-parm-select").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),f=$(window).height(),d=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-search-formula-parm-select").css({left:(u+d-s)/2,top:(f+m-o)/3}).show(),e.parmTxtShow($(this).parents(".parmBox").find(".txt input").val())}),$(document).off("click.fxParamCf").on("click.fxParamCf","#luckysheet-search-formula-parm-confirm",function(){$("#luckysheet-wa-functionbox-confirm").click()}),$(document).off("click.fxParamSelectCf").on("click.fxParamSelectCf","#luckysheet-search-formula-parm-select-confirm",function(){let a=$("#luckysheet-search-formula-parm-select-input").attr("data_parm_index");$("#luckysheet-search-formula-parm-select").hide(),$("#luckysheet-search-formula-parm").show(),$("#luckysheet-search-formula-parm .parmBox").eq(a).find(".txt input").focus()})},formulaListDialog:function(){let e=this,n=Q(),t=n.formulaMore,l=n.button;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-search-formula").remove(),$("body").append(_e(dt,{id:"luckysheet-search-formula",addclass:"luckysheet-search-formula",title:"",content:"<div class='inpbox'><label for='searchFormulaListInput'>"+t.findFunctionTitle+"\uFF1A</label><input class='formulaInputFocus' id='searchFormulaListInput' placeholder='"+t.tipInputFunctionName+"' spellcheck='false'/></div><div class='selbox'><label>"+t.selectCategory+"\uFF1A</label><select id='formulaTypeSelect'><option value='0'>"+t.Math+"</option><option value='1'>"+t.Statistical+"</option><option value='2'>"+t.Lookup+"</option><option value='3'>"+t.luckysheet+"</option><option value='4'>"+t.dataMining+"</option><option value='5'>"+t.Database+"</option><option value='6'>"+t.Date+"</option><option value='7'>"+t.Filter+"</option><option value='8'>"+t.Financial+"</option><option value='9'>"+t.Engineering+"</option><option value='10'>"+t.Logical+"</option><option value='11'>"+t.Operator+"</option><option value='12'>"+t.Text+"</option><option value='13'>"+t.Parser+"</option><option value='14'>"+t.Array+"</option><option value='-1'>"+t.other+"</option></select></div><div class='listbox'><label>"+t.selectFunctionTitle+"\uFF1A</label><div id='formulaTypeList'></div></div>",botton:'<button id="luckysheet-search-formula-confirm" class="btn btn-primary">'+l.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+l.cancel+"</button>",style:"z-index:100003"}));let a=$("#luckysheet-search-formula").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),o=a.outerHeight(),s=a.outerWidth(),u=$(window).width(),f=$(window).height(),d=$(document).scrollLeft(),m=$(document).scrollTop();$("#luckysheet-search-formula").css({left:(u+d-s)/2,top:(f+m-o)/3,"user-select":"none"}).show(),e.formulaListByType("0"),$("#searchFormulaListInput").focus()},formulaListByType:function(e){$("#formulaTypeList").empty();let n=h.functionlist;for(let t=0;t<n.length;t++)(e=="-1"&&n[t].t>14||n[t].t==e)&&$('<div class="listBox" name="'+n[t].n+'"><span>'+n[t].n+"</span><span>"+n[t].a+"</span></div>").appendTo($("#formulaTypeList"));$("#formulaTypeList .listBox:first-child").addClass("on")},formulaParmDialog:function(e,n){let t="",l="",a="",o=Q(),s=o.formulaMore,u=o.button,f=h.functionlist;for(let w=0;w<f.length;w++)if(f[w].n==e.toUpperCase()){t=f[w].n;for(let x=0;x<f[w].p.length;x++)n==null?a+='<div class="parmBox"><div class="name">'+f[w].p[x].name+'</div><div class="txt"><input class="formulaInputFocus" spellcheck="false"/><i class="fa fa-table" aria-hidden="true" title="'+s.tipSelectDataRange+'"></i></div><div class="val">=</div></div>':(n[x]==null&&(n[x]=""),a+='<div class="parmBox"><div class="name">'+f[w].p[x].name+'</div><div class="txt"><input class="formulaInputFocus" value="'+n[x]+'" spellcheck="false"/><i class="fa fa-table" aria-hidden="true" title="'+s.tipSelectDataRange+'"></i></div><div class="val">=</div></div>');l='<div><div class="parmListBox">'+a+'</div><div class="formulaDetails">'+f[w].d+'</div><div class="parmDetailsBox"></div><div class="result">'+s.calculationResult+" = <span></span></div></div>"}$("#luckysheet-search-formula").hide(),$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-search-formula-parm").remove(),$("body").append(_e(dt,{id:"luckysheet-search-formula-parm",addclass:"luckysheet-search-formula-parm",title:t,content:l,botton:'<button id="luckysheet-search-formula-parm-confirm" class="btn btn-primary">'+u.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+u.cancel+"</button>",style:"z-index:100003"}));let d=$("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-content").css("min-width",300).end(),m=d.outerHeight(),g=d.outerWidth(),y=$(window).width(),v=$(window).height(),b=$(document).scrollLeft(),k=$(document).scrollTop();$("#luckysheet-search-formula-parm").css({left:(y+b-g)/2,top:(v+k-m)/3}).show(),$("#luckysheet-search-formula-parm .parmBox:eq(0) input").focus(),$("#luckysheet-search-formula-parm .parmBox").each(function(w,x){let C=$(x).find(".txt input").val();if(p.getfunctionParam(C).fn==null)if(p.iscelldata(C)){let S=ar(C).data;if(P(S)=="array"){let _=[];for(let T=0;T<S.length;T++)for(let A=0;A<S[T].length;A++){let R=S[T][A];R==null||me(R.v)?_.push(null):_.push(R.v)}$("#luckysheet-search-formula-parm .parmBox").eq(w).find(".val").text(" = {"+_.join(",")+"}")}else $("#luckysheet-search-formula-parm .parmBox").eq(w).find(".val").text(" = {"+S.v+"}")}else $("#luckysheet-search-formula-parm .parmBox").eq(w).find(".val").text(" = {"+C+"}");else $("#luckysheet-search-formula-parm .parmBox").eq(w).find(".val").text(" = {"+new Function("return "+$.trim(p.functionParserExe("="+C)))()+"}")}),$("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove(),p.data_parm_index=0,p.rangestart=!0},parmTxtShow:function(e){if(p.getfunctionParam(e).fn==null)if(p.iscelldata(e)){let n=p.getcellrange(e),t=n.row[0],l=n.row[1],a=n.column[0],o=n.column[1],s=h.visibledatarow[l],u=t-1==-1?0:h.visibledatarow[t-1],f=h.visibledatacolumn[o],d=a-1==-1?0:h.visibledatacolumn[a-1];$("#luckysheet-formula-functionrange-select").css({left:d,width:f-d-1,top:u,height:s-u-1}).show(),$("#luckysheet-formula-help-c").hide(),or(d,u,f-d-1,s-u-1,n.row,n.column);let m=ar(e).data;if(P(m)=="array"){let g=[];for(let y=0;y<m.length;y++)for(let v=0;v<m[y].length;v++){let b=m[y][v];b==null||me(b.v)?g.push(null):g.push(b.v)}$("#luckysheet-search-formula-parm .parmBox").eq(p.data_parm_index).find(".val").text(" = {"+g.join(",")+"}")}else $("#luckysheet-search-formula-parm .parmBox").eq(p.data_parm_index).find(".val").text(" = {"+m.v+"}")}else $("#luckysheet-search-formula-parm .parmBox").eq(p.data_parm_index).find(".val").text(" = {"+e+"}"),$("#luckysheet-formula-functionrange-select").hide();else{let n;for(let g=0;g<p.getfunctionParam(e).param.length;g++)if(p.iscelldata(p.getfunctionParam(e).param[g])){n=p.getfunctionParam(e).param[g];break}let t=p.getcellrange(n),l=t.row[0],a=t.row[1],o=t.column[0],s=t.column[1],u=h.visibledatarow[a],f=l-1==-1?0:h.visibledatarow[l-1],d=h.visibledatacolumn[s],m=o-1==-1?0:h.visibledatacolumn[o-1];$("#luckysheet-formula-functionrange-select").css({left:m,width:d-m-1,top:f,height:u-f-1}).show(),$("#luckysheet-formula-help-c").hide(),or(m,f,d-m-1,u-f-1,t.row,t.column),$("#luckysheet-search-formula-parm .parmBox").eq(p.data_parm_index).find(".val").text(" = {"+new Function("return "+$.trim(p.functionParserExe("="+e)))()+"}")}},functionStrCompute:function(){let e=!0,n=[],t=-1,l=$("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-title-text").text(),a=h.luckysheet_function[l].p;$("#luckysheet-search-formula-parm .parmBox").each(function(u,f){let d=$(f).find(".txt input").val(),m;u<a.length?m=a[u].require:m=a[a.length-1].require,d==""&&m=="m"&&(e=!1),d!=""&&(t=u)});let o;if(t==-1)o="="+$("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text()+"()";else if(t==0)o="="+$("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text()+"("+$("#luckysheet-search-formula-parm .parmBox").eq(0).find(".txt input").val()+")";else{for(let u=0;u<=t;u++)n.push($("#luckysheet-search-formula-parm .parmBox").eq(u).find(".txt input").val());o="="+$("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text()+"("+n.join(",")+")"}let s=p.functionHTMLGenerate(o);if($("#luckysheet-rich-text-editor").html(s),$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()),e){let u=$.trim(p.functionParserExe($("#luckysheet-rich-text-editor").text())),f=null;try{f=new Function("return "+u)()}catch(d){f=p.error.n}$("#luckysheet-search-formula-parm .result span").text(f)}}},hn=gb});var yb,ke,il=Ie(()=>{Zt();Gt();xl();am();Oa();gr();Qt();Lr();Vl();pr();kn();Gc();sm();Wc();ba();Yc();dl();Ur();Ft();ll();Jt();Al();Yt();ua();Ut();Ol();Or();mr();$r();Kt();Pa();pn();Nt();An();gn();ft();Ml();Xe();bt();va();yb={menu:'<div class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-menuButton ${subclass} luckysheet-mousedown-cancel" id="luckysheet-icon-${id}-menuButton">${item}</div>',item:'<div itemvalue="${value}" itemname="${name}" class="luckysheet-cols-menuitem ${sub} luckysheet-mousedown-cancel"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel" style="padding: 3px 0px 3px 1px;"><span style="margin-right:3px;width:13px;display:inline-block;" class="icon luckysheet-mousedown-cancel"></span> ${name} <span class="luckysheet-submenu-arrow luckysheet-mousedown-cancel ${iconClass}" style="user-select: none;">${example}</span></div></div>',split:'<div class="luckysheet-menuseparator luckysheet-mousedown-cancel" role="separator"></div>',color:'<div class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-rightgclick-menu-sub luckysheet-mousedown-cancel luckysheet-menuButton ${sub}" id="${id}"><div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel luckysheet-color-reset"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${resetColor}</div></div> <div class="luckysheet-mousedown-cancel"> <div class="luckysheet-mousedown-cancel"> <input type="text" class="luckysheet-color-selected" /> </div> </div> <div class="luckysheet-menuseparator luckysheet-mousedown-cancel" role="separator"></div> ${coloritem}</div>',coloritem:'<div class="luckysheet-cols-menuitem luckysheet-mousedown-cancel ${class}"><div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${name}</div></div>',subcolor:'<div id="luckysheet-icon-${id}-menuButton" class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-rightgclick-menu-sub luckysheet-menuButton-sub luckysheet-mousedown-cancel"> <div class="luckysheet-mousedown-cancel"> <div class="luckysheet-mousedown-cancel"> <input type="text" class="luckysheet-color-selected" /> </div> </div></div>',rightclickmenu:null,submenuhide:{},focus:function(e,n){e.attr("id")=="luckysheet-icon-font-family-menuButton"&&On(n).num&&(n=Q().fontarray[parseInt(n)],n==null&&(n=this.defualtFont[itemvalue])),e.find(".luckysheet-cols-menuitem").find("span.icon").html(""),n==null?e.find(".luckysheet-cols-menuitem").eq(0).find("span.icon").html('<i class="fa fa-check luckysheet-mousedown-cancel"></i>'):e.find(".luckysheet-cols-menuitem[itemvalue='"+n+"']").find("span.icon").html('<i class="fa fa-check luckysheet-mousedown-cancel"></i>')},createButtonMenu:function(e){let n="",t=this;for(let l=0;l<e.length;l++){let a=e[l];a.value=="split"?n+=t.split:a.example=="more"?n+=_e(t.item,{value:a.value,name:a.text,example:"",sub:"luckysheet-cols-submenu",iconClass:"iconfont luckysheet-iconfont-youjiantou"}):n+=_e(t.item,{value:a.value,name:a.text,example:a.example,sub:"",iconClass:""})}return n},cancelPaintModel:function(){let e=this;$("#luckysheet-sheettable_0").removeClass("luckysheetPaintCursor"),h.luckysheet_copy_save.dataSheetIndex==h.currentSheetIndex?(h.luckysheet_selection_range=[],Ot()):h.luckysheetfile[Z(h.luckysheet_copy_save.dataSheetIndex)].luckysheet_selection_range=[],h.luckysheet_copy_save={},e.luckysheetPaintModelOn=!1,$("#luckysheetpopover").fadeOut(200,function(){$("#luckysheetpopover").remove()})},luckysheetPaintModelOn:!1,luckysheetPaintSingle:!1,initialMenuButton:function(){let e=this;$("#luckysheet-icon-paintformat").click(function(t){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}t.stopPropagation();let l=Q(),a=l.paint;if(h.luckysheet_select_save==null||h.luckysheet_select_save.length==0){fe()?alert(a.tipSelectRange):U.info("",a.tipSelectRange);return}else if(h.luckysheet_select_save.length>1){fe()?alert(a.tipNotMulti):U.info("",a.tipNotMulti);return}let o=!1,s=h.luckysheet_select_save[0].row[0],u=h.luckysheet_select_save[0].row[1],f=h.luckysheet_select_save[0].column[0],d=h.luckysheet_select_save[0].column[1];if(o=Mt(h.config,s,u,f,d),o){U.info(l.merge.partiallyError,"");return}U.popover("<i class='fa fa-paint-brush'></i> "+a.start+"","topCenter",!0,null,a.end,function(){e.cancelPaintModel()}),$("#luckysheet-sheettable_0").addClass("luckysheetPaintCursor"),h.luckysheet_selection_range=[{row:h.luckysheet_select_save[0].row,column:h.luckysheet_select_save[0].column}],Ot();let m=!1,g=!1;for(let y=h.luckysheet_select_save[0].row[0];y<=h.luckysheet_select_save[0].row[1];y++)if(!(h.config.rowhidden!=null&&h.config.rowhidden[y]!=null)){h.config.rowlen!=null&&y in h.config.rowlen&&(m=!0);for(let v=h.luckysheet_select_save[0].column[0];v<=h.luckysheet_select_save[0].column[1];v++){let b=h.flowdata[y][v];P(b)=="object"&&"mc"in b&&b.mc.rs!=null&&(g=!0)}}h.luckysheet_copy_save={dataSheetIndex:h.currentSheetIndex,copyRange:[{row:h.luckysheet_select_save[0].row,column:h.luckysheet_select_save[0].column}],RowlChange:m,HasMC:g},e.luckysheetPaintModelOn=!0,e.luckysheetPaintSingle=!0}),$("#luckysheet-icon-paintformat").dblclick(function(){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}let l=Q().paint;if(h.luckysheet_select_save==null||h.luckysheet_select_save.length==0){fe()?alert(l.tipSelectRange):U.info("",l.tipSelectRange);return}else if(h.luckysheet_select_save.length>1){fe()?alert(l.tipNotMulti):U.info("",l.tipNotMulti);return}U.popover("<i class='fa fa-paint-brush'></i> "+l.start,"topCenter",!0,null,l.end,function(){e.cancelPaintModel()}),$("#luckysheet-sheettable_0").addClass("luckysheetPaintCursor"),h.luckysheet_selection_range=[{row:h.luckysheet_select_save[0].row,column:h.luckysheet_select_save[0].column}],Ot();let a=!1,o=!1;for(let s=h.luckysheet_select_save[0].row[0];s<=h.luckysheet_select_save[0].row[1];s++)if(!(h.config.rowhidden!=null&&h.config.rowhidden[s]!=null)){h.config.rowlen!=null&&s in h.config.rowlen&&(a=!0);for(let u=h.luckysheet_select_save[0].column[0];u<=h.luckysheet_select_save[0].column[1];u++){let f=h.flowdata[s][u];P(f)=="object"&&"mc"in f&&f.mc.rs!=null&&(o=!0)}}h.luckysheet_copy_save={dataSheetIndex:h.currentSheetIndex,copyRange:[{row:h.luckysheet_select_save[0].row,column:h.luckysheet_select_save[0].column}],RowlChange:a,HasMC:o},e.luckysheetPaintModelOn=!0,e.luckysheetPaintSingle=!1}),$("#luckysheet-icon-currency").click(function(){let t=xe.deepCopyFlowData(h.flowdata);e.updateFormat(t,"ct","\xA5 #.00")}),$("#luckysheet-icon-percent").click(function(){let t=xe.deepCopyFlowData(h.flowdata);e.updateFormat(t,"ct","0.00%")}),$("#luckysheet-icon-fmt-decimal-decrease").click(function(){let t=xe.deepCopyFlowData(h.flowdata),l=h.luckysheet_select_save[0].row_focus,a=h.luckysheet_select_save[0].column_focus,o=e.checkstatus(t,l,a,"ct"),s=t[l][a];if(o==null||o.t!="n")return;if(o.fa=="General"&&(o=at(s.v)[1]),/^(w|W)((0?)|(0\.0+))$/.test(o.fa)){o.fa.indexOf(".")>-1?o.fa.substr(-2)==".0"?e.updateFormat(t,"ct",o.fa.split(".")[0]):e.updateFormat(t,"ct",o.fa.substr(0,o.fa.length-1)):e.updateFormat(t,"ct",o.fa);return}let f="",d="",m=[];if(o.fa.indexOf(".")>-1)m=o.fa.split("."),f=m[0],d=m[1];else return;m=d.split("");let g="";for(let v=m.length-1;v>=0;v--){let b=m[v];if(b!="#"&&b!="0"&&b!=","&&isNaN(parseInt(b)))g=b+g;else break}let y="";if(o.fa.indexOf(".")>-1){let v=d;g.length>0&&(v=d.replace(g,""));let b=v.replace(/#/g,"0");b=b.substr(0,b.length-1),b==""?y=f+g:y=f+"."+b+g}e.updateFormat(t,"ct",y)}),$("#luckysheet-icon-fmt-decimal-increase").click(function(){let t=xe.deepCopyFlowData(h.flowdata),l=h.luckysheet_select_save[0].row_focus,a=h.luckysheet_select_save[0].column_focus,o=e.checkstatus(t,l,a,"ct"),s=t[l][a];if(o==null||o.t!="n")return;if(o.fa=="General"&&(o=at(s.v)[1]),o.fa=="General"){e.updateFormat(t,"ct","#.0");return}if(/^(w|W)((0?)|(0\.0+))$/.test(o.fa)){o.fa.indexOf(".")>-1?e.updateFormat(t,"ct",o.fa+"0"):o.fa.substr(-1)=="0"?e.updateFormat(t,"ct",o.fa+".0"):e.updateFormat(t,"ct",o.fa+"0.0");return}let f="",d="",m=[];o.fa.indexOf(".")>-1?(m=o.fa.split("."),f=m[0],d=m[1]):d=o.fa,m=d.split("");let g="";for(let v=m.length-1;v>=0;v--){let b=m[v];if(b!="#"&&b!="0"&&b!=","&&isNaN(parseInt(b)))g=b+g;else break}let y="";if(o.fa.indexOf(".")>-1){let v=d;g.length>0&&(v=d.replace(g,""));let b=v.replace(/#/g,"0");b+="0",y=f+"."+b+g}else g.length>0?y=d.replace(g,"")+".0"+g:y=d+".0"+g;e.updateFormat(t,"ct",y)}),$("#luckysheet-icon-fmt-other").click(function(){let t=Q(),l=t.format,a=t.defaultFmt,o=$(this).attr("id")+"-menuButton",s=$("#"+o);if(s.length==0){let m=a,g=e.createButtonMenu(m),y=_e(e.menu,{id:"fmt-other",item:g,subclass:"",sub:""}),v=[{text:l.moreCurrency+"...",value:"morecurrency",example:""},{text:l.moreDateTime+"...",value:"moredatetime",example:""},{text:l.moreNumber+"...",value:"moredigit",example:""}],b=e.createButtonMenu(v),k=_e(e.menu,{id:"fmtOtherSelf",item:b,subclass:"luckysheet-menuButton-sub"});$("body").append(y+k),s=$("#"+o).width(250),e.focus(s),s.find(".luckysheet-cols-menuitem").click(function(){s.hide(),rt();let w=$(this),x=w.attr("itemvalue"),C=w.attr("itemname");if($("#luckysheet-icon-fmt-other").find(".luckysheet-toolbar-menu-button-caption").html(" "+C+" "),x=="fmtOtherSelf")return;let S=xe.deepCopyFlowData(h.flowdata);e.focus(s,x),e.updateFormat(S,"ct",x)}),$("#luckysheet-icon-fmtOtherSelf-menuButton").find(".luckysheet-cols-menuitem").click(function(){s.hide(),$("#luckysheet-icon-fmtOtherSelf-menuButton").hide(),rt();let w=$(this).attr("itemvalue");Uc.createDialog(w),Uc.init()})}else{let m=$(this).find(".luckysheet-toolbar-menu-button-caption").text().trim(),g=a.find(y=>y.text===m);g&&e.focus(s,g.value)}let u=$(this).outerWidth(),f=s.outerWidth(),d=$(this).offset().left;f>u&&f+d>$("#"+h.container).width()&&(d=d-f+u),ml(s,d,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-font-family").mousedown(function(t){Cr(t),t.stopPropagation()}).click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let u=e.createButtonMenu(e.fontSelectList),f=_e(e.menu,{id:"font-family",item:u,subclass:"",sub:""});$("body").append(f),l=$("#"+t).width(200),e.focus(l),l.on("click",".luckysheet-cols-menuitem",function(){l.hide(),rt();let d=$(this),m=d.attr("itemvalue"),g=d.attr("itemname");e.focus(l,m),$("#luckysheet-icon-font-family").find(".luckysheet-toolbar-menu-button-caption").html(" "+g+" ");let y=xe.deepCopyFlowData(h.flowdata);e.updateFormat(y,"ff",m)})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-text-color").mousedown(function(t){Cr(t),t.stopPropagation()}).click(function(){let t=xe.deepCopyFlowData(h.flowdata),l=$(this).attr("color");l==null&&(l="#000000"),e.updateFormat(t,"fc",l)}),$("#luckysheet-icon-text-color-menu").mousedown(function(t){Cr(t),t.stopPropagation()}).click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let f=Q(),d=f.toolbar,m=f.button,g=f.alternatingColors,y=[{name:d.alternatingColors+"...",id:"luckysheet-color-alternate",example:""}],v=e.createButtonMenu(y),b="text-color-self",k=_e(e.coloritem,{class:"luckysheet-icon-alternateformat",name:d.alternatingColors+"..."}),w=_e(e.color,{id:t,coloritem:k,colorself:b,sub:"",resetColor:d.resetColor});$("body").append(w),l=$("#"+t),$("#"+t).find(".luckysheet-color-selected").spectrum({showPalette:!0,showPaletteOnly:!0,preferredFormat:"hex",clickoutFiresChange:!1,showInitial:!0,showInput:!0,flat:!0,hideAfterPaletteSelect:!0,showSelectionPalette:!0,maxPaletteSize:8,maxSelectionSize:8,cancelText:m.cancel,chooseText:m.confirm,togglePaletteMoreText:d.customColor,togglePaletteLessText:d.collapse,togglePaletteOnly:!0,clearText:d.clearText,color:de.defaultTextColor,noColorSelectedText:d.noColorSelectedText,localStorageKey:"spectrum.textcolor"+ne.gridKey,palette:[["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]],change:function(x){let C=$(this);x!=null?x=x.toHexString():x="#000";let S=null;$("#luckysheet-icon-text-color .text-color-bar").css("background-color",x),$("#luckysheet-icon-text-color").attr("color",x);let _=xe.deepCopyFlowData(h.flowdata);e.updateFormat(_,"fc",x),l.hide(),rt()}}),l.find(".luckysheet-color-reset").click(function(){l.hide(),rt();let x=$("#"+t).find(".luckysheet-color-selected");x.val("#000000"),$("#luckysheet-icon-text-color").attr("color",null),x.spectrum("set","#000000"),$("#luckysheet-icon-text-color .luckysheet-color-menu-button-indicator").css("border-bottom-color","#000000");let C=xe.deepCopyFlowData(h.flowdata);e.updateFormat(C,"fc",null)}),l.find(".luckysheet-icon-alternateformat").click(function(){if(l.hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(g.errorInfo):U.info(g.errorInfo,"");return}let x=$.extend(!0,{},h.luckysheet_select_save[0]);el.rangeIsExists(x)[0]||(el.modelfocusIndex=0,el.new(x)),el.init(),el.perfect()})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a);let u=$(this).offset().top+26;setTimeout(function(){let f=$("#"+t).find(".luckysheet-color-selected");f.spectrum("set",f.val()),ml(l,s-28,u,"lefttop")},1)}),$("#luckysheet-icon-cell-color").click(function(){let t=xe.deepCopyFlowData(h.flowdata),l=$(this).attr("color");l==null&&(l="#ffffff"),e.updateFormat(t,"bg",l)}),$("#luckysheet-icon-cell-color-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let f="cell-color-self",d=Q(),m=d.toolbar,g=d.button,y=d.alternatingColors,v=_e(e.coloritem,{class:"luckysheet-icon-alternateformat",name:m.alternatingColors+"..."}),b=_e(e.color,{id:t,coloritem:v,colorself:f,sub:"",resetColor:m.resetColor});$("body").append(b),l=$("#"+t),$("#"+t).find(".luckysheet-color-selected").spectrum({showPalette:!0,showPaletteOnly:!0,preferredFormat:"hex",clickoutFiresChange:!1,showInitial:!0,showInput:!0,flat:!0,hideAfterPaletteSelect:!0,showSelectionPalette:!0,maxPaletteSize:8,maxSelectionSize:8,color:de.defaultCellColor,cancelText:g.cancel,chooseText:g.confirm,togglePaletteMoreText:m.customColor,togglePaletteLessText:m.collapse,togglePaletteOnly:!0,clearText:m.clearText,noColorSelectedText:m.noColorSelectedText,localStorageKey:"spectrum.bgcolor"+ne.gridKey,palette:[["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]],change:function(k){let w=$(this);k!=null?k=k.toHexString():k="#fff";let x=null;$("#luckysheet-icon-cell-color .text-color-bar").css("background-color",k),$("#luckysheet-icon-cell-color").attr("color",k);let C=xe.deepCopyFlowData(h.flowdata);e.updateFormat(C,"bg",k),l.hide(),rt()}}),l.find(".luckysheet-color-reset").click(function(){l.hide(),rt();let k=$("#"+t).find(".luckysheet-color-selected");k.val("#ffffff"),$("#luckysheet-icon-cell-color").attr("color",null),k.spectrum("set","#ffffff"),$("#luckysheet-icon-cell-color .luckysheet-color-menu-button-indicator").css("border-bottom-color","#ffffff");let w=xe.deepCopyFlowData(h.flowdata);e.updateFormat(w,"bg",null)}),l.find(".luckysheet-icon-alternateformat").click(function(){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}if(l.hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(y.errorInfo):U.info(y.errorInfo,"");return}let k=$.extend(!0,{},h.luckysheet_select_save[0]);el.rangeIsExists(k)[0]||(el.modelfocusIndex=0,el.new(k)),el.init(),el.perfect()}),$("#"+t).find(".luckysheet-color-selected").val("#fff")}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a);let u=$(this).offset().top+26;setTimeout(function(){let f=$("#"+t).find(".luckysheet-color-selected");f.spectrum("set",f.val()),ml(l,s-28,u,"lefttop")},1)});let n=null;$("#luckysheet-icon-font-size").mousedown(function(t){if(parseInt($("#luckysheet-input-box").css("top"))>0){let l=window.getSelection();if(l.type!="None"){let a=l.getRangeAt(0);a.collapsed||(h.inlineStringEditRange=a.cloneRange())}}Cr(t),t.stopPropagation()}).click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let f=[{text:"9",value:"9",example:""},{text:"10",value:"10",example:""},{text:"11",value:"11",example:""},{text:"12",value:"12",example:""},{text:"14",value:"14",example:""},{text:"16",value:"16",example:""},{text:"18",value:"18",example:""},{text:"20",value:"20",example:""},{text:"22",value:"22",example:""},{text:"24",value:"24",example:""},{text:"26",value:"26",example:""},{text:"28",value:"28",example:""},{text:"36",value:"36",example:""},{text:"48",value:"48",example:""},{text:"72",value:"72",example:""}],d=e.createButtonMenu(f),m=_e(e.menu,{id:"font-size",item:d,subclass:"",sub:""});$("body").append(m),l=$("#"+t).width(150),e.focus(l,10),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let g=$(this),y=g.attr("itemvalue"),v=$("#luckysheet-icon-font-size input");$("#luckysheet-icon-font-size").attr("itemvalue",y),e.focus(l,y),v.val(y);let b=xe.deepCopyFlowData(h.flowdata);e.updateFormat(b,"fs",y),clearTimeout(n)})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$("#luckysheet-icon-font-size").attr("itemvalue");s==null&&(s=10),e.focus(l,s);let u=$(this).offset().left;o>a&&o+u>$("#"+h.container).width()&&(u=u-o+a),ml(l,u,$(this).offset().top+25,"lefttop")}).find("input.luckysheet-toolbar-textinput").keydown(function(t){Cr(t),t.stopPropagation()}).keyup(function(t){if(t.keyCode!=13)return;let l=$(this),a=parseInt(l.val()),o=$("#luckysheet-icon-font-size-menuButton");e.focus(o,a);let s=xe.deepCopyFlowData(h.flowdata);e.updateFormat(s,"fs",a),n=setTimeout(function(){o.hide(),l.blur()},200)}),$("#luckysheet-icon-border-all").click(function(){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}if(!Rr(h.currentSheetIndex))return;let t=xe.deepCopyFlowData(h.flowdata),l=$(this).attr("type");l==null&&(l="border-all");let a="luckysheet-icon-borderColor-menuButton",o=$("#"+a).find(".luckysheet-color-selected").val(),s=$("#luckysheetborderSizepreview").attr("itemvalue");(o==null||o=="")&&(o="#000"),(s==null||s=="")&&(s="1");let u=$.extend(!0,{},h.config);u.borderInfo==null&&(u.borderInfo=[]);let f={rangeType:"range",borderType:l,color:o,style:s,range:$.extend(!0,[],h.luckysheet_select_save)};if(u.borderInfo.push(f),h.clearjfundo){h.jfundo.length=0;let d=[];d.type="borderChange",d.config=$.extend(!0,{},h.config),d.curconfig=$.extend(!0,{},u),d.sheetIndex=h.currentSheetIndex,h.jfredo.push(d)}ne.saveParam("cg",h.currentSheetIndex,u.borderInfo,{k:"borderInfo"}),h.config=u,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,setTimeout(function(){Be()},1)}),$("#luckysheet-icon-border-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let u=10,f=120,d=Q(),m=d.border,g=d.toolbar,y=d.button,v=[{text:m.borderTop,value:"border-top",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-top iconfont luckysheet-iconfont-shangbiankuang" style="user-select: none;"> </div> </div>'},{text:m.borderBottom,value:"border-bottom",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-bottom iconfont luckysheet-iconfont-xiabiankuang" style="user-select: none;"> </div> </div>'},{text:m.borderLeft,value:"border-left",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-left iconfont luckysheet-iconfont-zuobiankuang" style="user-select: none;"> </div> </div>'},{text:m.borderRight,value:"border-right",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-right iconfont luckysheet-iconfont-youbiankuang" style="user-select: none;"> </div> </div>'},{text:"",value:"split",example:""},{text:m.borderNone,value:"border-none",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-none iconfont luckysheet-iconfont-wubiankuang" style="user-select: none;"> </div> </div>'},{text:m.borderAll,value:"border-all",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-all iconfont luckysheet-iconfont-quanjiabiankuang" style="user-select: none;"> </div> </div>'},{text:m.borderOutside,value:"border-outside",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-outside iconfont luckysheet-iconfont-sizhoujiabiankuang" style="user-select: none;"> </div> </div>'},{text:"",value:"split",example:""},{text:m.borderInside,value:"border-inside",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-inside iconfont luckysheet-iconfont-neikuangxian" style="user-select: none;"> </div> </div>'},{text:m.borderHorizontal,value:"border-horizontal",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-horizontal iconfont luckysheet-iconfont-neikuanghengxian" style="user-select: none;"> </div> </div>'},{text:m.borderVertical,value:"border-vertical",example:'<div class="luckysheet-icon luckysheet-inline-block luckysheet-material-icon luckysheet-mousedown-cancel" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-border-vertical iconfont luckysheet-iconfont-neikuangshuxian" style="user-select: none;"> </div> </div>'},{text:"",value:"split",example:""},{text:"<span id='luckysheet-icon-borderColor-linecolor' class='luckysheet-mousedown-cancel' style='border-bottom:3px solid #000;'>"+m.borderColor+"</span>",value:"borderColor",example:"more"},{text:""+m.borderSize+"<img id='luckysheetborderSizepreview' width=100 height=10 src='data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==' style='position:absolute;bottom:-5px;right:0px;width:100px;height:10px;'>",value:"borderSize",example:"more"}],b=Jr.border,k=e.createButtonMenu(v),w=_e(e.menu,{id:"border-menu",item:k,subclass:"",sub:""}),x=[{text:m.borderNone,value:"0",example:""},{text:"<canvas type='Thin' class='border-Thin' width="+f+" height="+u+" style='width:"+f+"px;height:"+u+"px;position:static;'></canvas>",value:"1",example:""},{text:"<canvas type='Hair' class='border-Hair' width="+f+" height="+u+" style='width:"+f+"px;height:"+u+"px;position:static;'></canvas>",value:"2",example:""},{text:"<canvas type='Dotted' class='border-Dotted' width="+f+" height="+u+" style='width:"+f+"px;height:"+u+"px;position:static;'></canvas>",value:"3",example:""},{text:"<canvas type='Dashed' class='border-Dashed' width="+f+" height="+u+" style='width:"+f+"px;height:"+u+"px;position:static;'></canvas>",value:"4",example:""},{text:"<canvas type='DashDot' class='border-DashDot' width="+f+" height="+u+" style='width:"+f+"px;height:"+u+"px;position:static;'></canvas>",value:"5",example:""},{text:"<canvas type='DashDotDot' class='border-DashDotDot' width="+f+" height="+u+" style='width:"+f+"px;height:"+u+"px;position:static;'></canvas>",value:"6",example:""},{text:"<canvas type='Medium' class='border-Medium' width="+f+" height="+u+" style='width:"+f+"px;height:"+u+"px;position:static;'></canvas>",value:"8",example:""},{text:"<canvas type='MediumDashed' class='border-MediumDashed' width="+f+" height="+u+" style='width:"+f+"px;height:"+u+"px;position:static;'></canvas>",value:"9",example:""},{text:"<canvas type='MediumDashDot' class='border-MediumDashDot' width="+f+" height="+u+" style='width:"+f+"px;height:"+u+"px;position:static;'></canvas>",value:"10",example:""},{text:"<canvas type='MediumDashDotDot' class='border-MediumDashDotDot' width="+f+" height="+u+" style='width:"+f+"px;height:"+u+"px;position:static;'></canvas>",value:"11",example:""},{text:"<canvas type='Thick' class='border-Thick' width="+f+" height="+u+" style='width:"+f+"px;height:"+u+"px;position:static;'></canvas>",value:"13",example:""}],C=e.createButtonMenu(x),S=_e(e.menu,{id:"borderSize",item:C,subclass:"luckysheet-menuButton-sub"}),_="luckysheet-icon-borderSize-menuButton",T="luckysheet-icon-borderColor-menuButton",A=_e(e.color,{id:T,coloritem:"",colorself:"",sub:"luckysheet-menuButton-sub",resetColor:g.resetColor});$("body").append(w+A+S),l=$("#"+t).width(170),e.focus(l,"border-all"),$("#"+_+" canvas").each(function(R){let I=$(this).attr("type"),F=$(this).closest(".luckysheet-cols-menuitem").attr("itemvalue"),z=$(this).addClass("luckysheet-mousedown-cancel").get(0).getContext("2d");z.translate(.5,.5),e.setLineDash(z,F,"h",0,5,100,5),z.strokeStyle="#000000",z.stroke(),z.closePath()}),$("#"+_+" .luckysheet-cols-menuitem").click(function(){$("#"+_).hide();let R=$(this),I=R.attr("itemvalue");if(I==0)$("#luckysheetborderSizepreview").attr("src","data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==").attr("itemvalue",null);else{let F=R.find("canvas").get(0).toDataURL("image/png");$("#luckysheetborderSizepreview").attr("src",F).attr("itemvalue",I)}e.focus($("#"+_),I)}),l.find(".luckysheet-cols-menuitem").click(function(){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}l.hide(),rt();let R=$(this),I=R.attr("itemvalue");if(I=="borderColor"||I=="borderSize"||!Rr(h.currentSheetIndex))return;let F=xe.deepCopyFlowData(h.flowdata),z=$("#"+T).find(".luckysheet-color-selected").val(),M=$("#luckysheetborderSizepreview").attr("itemvalue");(z==null||z=="")&&(z="#000"),(M==null||M=="")&&(M="1");let E=$.extend(!0,{},h.config);E.borderInfo==null&&(E.borderInfo=[]);let N={rangeType:"range",borderType:I,color:z,style:M,range:$.extend(!0,[],h.luckysheet_select_save)};if(E.borderInfo.push(N),h.clearjfundo){h.jfundo.length=0;let O=[];O.type="borderChange",O.config=$.extend(!0,{},h.config),O.curconfig=$.extend(!0,{},E),O.sheetIndex=h.currentSheetIndex,h.jfredo.push(O)}ne.saveParam("cg",h.currentSheetIndex,E.borderInfo,{k:"borderInfo"}),h.config=E,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,setTimeout(function(){Be()},1),$("#luckysheet-icon-border-all").attr("type",I),$("#luckysheet-icon-border-all").find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-"+I+b[I]),e.focus(l,I)}),$("#"+T).find(".luckysheet-color-selected").spectrum({showPalette:!0,showPaletteOnly:!0,preferredFormat:"hex",clickoutFiresChange:!1,showInitial:!0,showInput:!0,flat:!0,hideAfterPaletteSelect:!0,showSelectionPalette:!0,maxPaletteSize:8,maxSelectionSize:8,color:"#000",cancelText:y.cancel,chooseText:y.confirm,togglePaletteMoreText:g.customColor,togglePaletteLessText:g.collapse,togglePaletteOnly:!0,clearText:g.clearText,noColorSelectedText:g.noColorSelectedText,localStorageKey:"spectrum.bordercolor"+ne.gridKey,palette:[["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]],change:function(R){let I=$(this);R!=null?R=R.toHexString():R="#000";let F=null;$("#luckysheet-icon-borderColor-linecolor").css("border-bottom-color",R),$("#"+T).find(".luckysheet-color-selected").val(R)}}),$("#"+T).find(".luckysheet-color-reset").click(function(){let R=$("#"+T).find(".luckysheet-color-selected");R.val("#000"),$("#luckysheet-icon-cell-color").attr("color",null),R.spectrum("set","#000"),$("#luckysheet-icon-borderColor-linecolor").css("border-bottom-color","#000")})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s-28,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-merge-button").click(function(){let l=Q().merge;if(!jr(h.currentSheetIndex))return;if(Yr()){fe()?alert(l.overlappingError):U.info(l.overlappingError,"");return}if(h.config.merge!=null){let o=!1;for(let s=0;s<h.luckysheet_select_save.length;s++){let u=h.luckysheet_select_save[s].row[0],f=h.luckysheet_select_save[s].row[1],d=h.luckysheet_select_save[s].column[0],m=h.luckysheet_select_save[s].column[1];if(o=Mt(h.config,u,f,d,m),o)break}if(o){fe()?alert(l.partiallyError):U.info(l.partiallyError,"");return}}let a=xe.deepCopyFlowData(h.flowdata);e.updateFormat_mc(a,"mergeAll")}),$("#luckysheet-icon-merge-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let f=Q().merge,d=[{text:f.mergeAll,value:"mergeAll",example:""},{text:f.mergeV,value:"mergeV",example:""},{text:f.mergeH,value:"mergeH",example:""},{text:f.mergeCancel,value:"mergeCancel",example:""}],m=e.createButtonMenu(d),g=_e(e.menu,{id:"merge-menu",item:m,subclass:"",sub:""});$("body").append(g),l=$("#"+t),e.focus(l),l.find(".luckysheet-cols-menuitem").click(function(){if(l.hide(),rt(),Yr()){fe()?alert(f.overlappingError):U.info(f.overlappingError,"");return}if(h.config.merge!=null){let k=!1;for(let w=0;w<h.luckysheet_select_save.length;w++){let x=h.luckysheet_select_save[w].row[0],C=h.luckysheet_select_save[w].row[1],S=h.luckysheet_select_save[w].column[0],_=h.luckysheet_select_save[w].column[1];if(k=Mt(h.config,x,C,S,_),k)break}if(k){fe()?alert(f.partiallyError):U.info(f.partiallyError,"");return}}let y=$(this),v=y.attr("itemvalue");e.focus(l,v);let b=xe.deepCopyFlowData(h.flowdata);e.updateFormat_mc(b,v)})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s-28,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-align").click(function(){let t=$("#luckysheet-icon-align").attr("type");t==null&&(t="left");let l=xe.deepCopyFlowData(h.flowdata);e.updateFormat(l,"ht",t)}),$("#luckysheet-icon-align-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let f=Q().align,d=[{text:f.left,value:"left",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-align-left iconfont luckysheet-iconfont-wenbenzuoduiqi" style="user-select: none;"> </div> </div>'},{text:f.center,value:"center",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-align-center iconfont luckysheet-iconfont-wenbenjuzhongduiqi" style="user-select: none;"> </div> </div>'},{text:f.right,value:"right",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-align-right iconfont luckysheet-iconfont-wenbenyouduiqi" style="user-select: none;"> </div> </div>'}],m=Jr.align,g=e.createButtonMenu(d),y=_e(e.menu,{id:"align-menu",item:g,subclass:"",sub:""});$("body").append(y),l=$("#"+t).width(120),e.focus(l),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let v=$(this),b=v.attr("itemvalue");e.focus(l,b),$("#luckysheet-icon-align").attr("type",b).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-align-"+b+m[b]);let w=xe.deepCopyFlowData(h.flowdata);e.updateFormat(w,"ht",b)})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s-28,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-valign").click(function(){let t=$("#luckysheet-icon-valign").attr("type");t==null&&(t="bottom");let l=xe.deepCopyFlowData(h.flowdata);e.updateFormat(l,"vt",t)}),$("#luckysheet-icon-valign-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t),o=Q().align;if(l.length==0){let d=[{text:o.top,value:"top",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-valign-top iconfont luckysheet-iconfont-dingbuduiqi" style="user-select: none;"> </div> </div>'},{text:o.middle,value:"middle",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-valign-middle iconfont luckysheet-iconfont-shuipingduiqi" style="user-select: none;"> </div> </div>'},{text:o.bottom,value:"bottom",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-valign-bottom iconfont luckysheet-iconfont-dibuduiqi" style="user-select: none;"> </div> </div>'}],m=Jr.align,g=e.createButtonMenu(d),y=_e(e.menu,{id:"valign-menu",item:g,subclass:"",sub:""});$("body").append(y),l=$("#"+t).width(120),e.focus(l,"bottom"),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let v=$(this),b=v.attr("itemvalue");e.focus(l,b),$("#luckysheet-icon-valign").attr("type",b).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-valign-"+b+m[b]);let w=xe.deepCopyFlowData(h.flowdata);e.updateFormat(w,"vt",b)})}let s=$(this).outerWidth(),u=l.outerWidth(),f=$(this).offset().left;u>s&&u+f>$("#"+h.container).width()&&(f=f-u+s),ml(l,f-28,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-textwrap-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let f=Q().textWrap,d=[{text:f.overflow,value:"overflow",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-textwrap-overflow iconfont luckysheet-iconfont-yichu1" style="user-select: none;"> </div> </div>'},{text:f.wrap,value:"wrap",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-textwrap-wrap iconfont luckysheet-iconfont-zidonghuanhang" style="user-select: none;"> </div> </div>'},{text:f.clip,value:"clip",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-textwrap-clip iconfont luckysheet-iconfont-jieduan" style="user-select: none;"> </div> </div>'}],m=Jr.textWrap,g=e.createButtonMenu(d),y=_e(e.menu,{id:"textwrap-menu",item:g,subclass:"",sub:""});$("body").append(y),l=$("#"+t).width(120),e.focus(l,"clip"),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let v=$(this),b=v.attr("itemvalue");e.focus(l,b),$("#luckysheet-icon-textwrap").attr("type",b).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-textwrap-"+b+m[b]);let w=xe.deepCopyFlowData(h.flowdata);e.updateFormat(w,"tb",b)})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s-28,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-rotation-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let f=Q().rotation,d=[{text:f.none,value:"none",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-none iconfont luckysheet-iconfont-wuxuanzhuang" style="user-select: none;"> </div> </div>'},{text:f.angleup,value:"angleup",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-angleup iconfont luckysheet-iconfont-xiangshangqingxie" style="user-select: none;"> </div> </div>'},{text:f.angledown,value:"angledown",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-angledown iconfont luckysheet-iconfont-xiangxiaqingxie" style="user-select: none;"> </div> </div>'},{text:f.vertical,value:"vertical",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-vertical iconfont luckysheet-iconfont-shupaiwenzi" style="user-select: none;"> </div> </div>'},{text:f.rotationUp,value:"rotation-up",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-rotation-up iconfont luckysheet-iconfont-wenbenxiangshang" style="user-select: none;"> </div> </div>'},{text:f.rotationDown,value:"rotation-down",example:'<div class="luckysheet-icon luckysheet-inline-block" style="user-select: none;opacity:1;"> <div aria-hidden="true" class="luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-rotation-down iconfont luckysheet-iconfont-xiangxia90" style="user-select: none;"> </div> </div>'}],m=Jr.rotation,g=e.createButtonMenu(d),y=_e(e.menu,{id:"rotation-menu",item:g,subclass:"",sub:""});$("body").append(y),l=$("#"+t).width(160),e.focus(l),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let v=$(this),b=v.attr("itemvalue");e.focus(l,b),$("#luckysheet-icon-rotation").attr("type",b).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-"+b+m[b]);let w=xe.deepCopyFlowData(h.flowdata);e.updateFormat(w,"tr",b)})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s-28,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-freezen-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let f=Q().freezen,d=[{text:f.freezenRow,value:"freezenRow",example:""},{text:f.freezenColumn,value:"freezenColumn",example:""},{text:f.freezenRC,value:"freezenRC",example:""},{text:"",value:"split",example:""},{text:f.freezenRowRange,value:"freezenRowRange",example:""},{text:f.freezenColumnRange,value:"freezenColumnRange",example:""},{text:f.freezenRCRange,value:"freezenRCRange",example:""},{text:"",value:"split",example:""},{text:f.freezenCancel,value:"freezenCancel",example:""}],m=e.createButtonMenu(d),g=_e(e.menu,{id:"freezen-menu",item:m,subclass:"",sub:""});$("body").append(g),l=$("#"+t).width(170),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let y=$(this),v=y.attr("itemvalue");if(e.focus(l,v),v==="freezenCancel"&&l.find(".fa.fa-check").remove(),Y.saveFrozen(v),v=="freezenRow")Vo();else if(v=="freezenColumn")qo();else if(v=="freezenRC"){if(Y.freezenRealFirstRowColumn){let b=0,k=h.visibledatarow[b]-2+h.columnHeaderHeight,w=[h.visibledatarow[b],b+1,0,Y.cutVolumn(h.visibledatarow,b+1),k];Y.saveFreezen(w,k,null,null),Y.createFreezenHorizontal(w,k);let x=0,C=h.visibledatacolumn[x]-2+h.rowHeaderWidth,S=[h.visibledatacolumn[x],x+1,0,Y.cutVolumn(h.visibledatacolumn,x+1),C];Y.saveFreezen(null,null,S,C),Y.createFreezenVertical(S,C)}else{let b=$("#luckysheet-cell-main").scrollTop(),k=st(h.visibledatarow,b);k==-1&&(k=0);let w=h.visibledatarow[k]-2-b+h.columnHeaderHeight,x=[h.visibledatarow[k],k+1,b,Y.cutVolumn(h.visibledatarow,k+1),w];Y.saveFreezen(x,w,null,null),Y.createFreezenHorizontal(x,w);let C=$("#luckysheet-cell-main").scrollLeft(),S=st(h.visibledatacolumn,C);S==-1&&(S=0);let _=h.visibledatacolumn[S]-2-C+h.rowHeaderWidth,T=[h.visibledatacolumn[S],S+1,C,Y.cutVolumn(h.visibledatacolumn,S+1),_];Y.saveFreezen(null,null,T,_),Y.createFreezenVertical(T,_)}Y.createAssistCanvas(),Be()}else if(v=="freezenRowRange"){if(h.luckysheet_select_save==null||h.luckysheet_select_save.length==0){fe()?alert(f.noSeletionError):U.info(f.noSeletionError,"");return}let b=h.luckysheet_select_save[h.luckysheet_select_save.length-1].top;if(Y.freezenRealFirstRowColumn&&b>$("#luckysheet-cell-main").height())return U.info(f.rangeRCOverErrorTitle,f.rangeRCOverError);let k=$("#luckysheet-cell-main").scrollTop(),w=st(h.visibledatarow,k),x=h.luckysheet_select_save[h.luckysheet_select_save.length-1],C=x.row_focus==null?x.row[0]:x.row_focus;w=Math.max(w-1,C-1,0);let S,_;Y.freezenRealFirstRowColumn?(S=h.visibledatarow[w]-2+h.columnHeaderHeight,_=[h.visibledatarow[w],w+1,0,Y.cutVolumn(h.visibledatarow,w+1),S]):(S=h.visibledatarow[w]-2-k+h.columnHeaderHeight,_=[h.visibledatarow[w],w+1,k,Y.cutVolumn(h.visibledatarow,w+1),S]),Y.saveFreezen(_,S,null,null),Y.freezenverticaldata!=null&&(Y.cancelFreezenVertical(),Y.createAssistCanvas(),Be()),Y.createFreezenHorizontal(_,S),Y.createAssistCanvas(),Be()}else if(v=="freezenColumnRange"){if(h.luckysheet_select_save==null||h.luckysheet_select_save.length==0){fe()?alert(f.noSeletionError):U.info(f.noSeletionError,"");return}let b=h.luckysheet_select_save[h.luckysheet_select_save.length-1].left;if(Y.freezenRealFirstRowColumn&&b>$("#luckysheet-cell-main").width())return U.info(f.rangeRCOverErrorTitle,f.rangeRCOverError);let k=$("#luckysheet-cell-main").scrollLeft(),w=st(h.visibledatacolumn,k),x=h.luckysheet_select_save[h.luckysheet_select_save.length-1],C=x.column_focus==null?x.column[0]:x.column_focus;w=Math.max(w-1,C-1,0);let S,_;Y.freezenRealFirstRowColumn?(S=h.visibledatacolumn[w]-2+h.rowHeaderWidth,_=[h.visibledatacolumn[w],w+1,0,Y.cutVolumn(h.visibledatacolumn,w+1),S]):(S=h.visibledatacolumn[w]-2-k+h.rowHeaderWidth,_=[h.visibledatacolumn[w],w+1,k,Y.cutVolumn(h.visibledatacolumn,w+1),S]),Y.saveFreezen(null,null,_,S),Y.freezenhorizontaldata!=null&&(Y.cancelFreezenHorizontal(),Y.createAssistCanvas(),Be()),Y.createFreezenVertical(_,S),Y.createAssistCanvas(),Be()}else if(v=="freezenRCRange"){if(h.luckysheet_select_save==null||h.luckysheet_select_save.length==0){fe()?alert(f.noSeletionError):U.info(f.noSeletionError,"");return}let b=h.luckysheet_select_save[h.luckysheet_select_save.length-1].top,k=h.luckysheet_select_save[h.luckysheet_select_save.length-1].left;if(Y.freezenRealFirstRowColumn&&(b>$("#luckysheet-cell-main").height()||k>$("#luckysheet-cell-main").width()))return U.info(f.rangeRCOverErrorTitle,f.rangeRCOverError);let w=$("#luckysheet-cell-main").scrollTop(),x=st(h.visibledatarow,w),C=h.luckysheet_select_save[h.luckysheet_select_save.length-1],S=C.row_focus==null?C.row[0]:C.row_focus;x=Math.max(x-1,S-1,0);let _,T;Y.freezenRealFirstRowColumn?(_=h.visibledatarow[x]-2+h.columnHeaderHeight,T=[h.visibledatarow[x],x+1,0,Y.cutVolumn(h.visibledatarow,x+1),_],Y.saveFreezen(T,_,null,null)):(_=h.visibledatarow[x]-2-w+h.columnHeaderHeight,T=[h.visibledatarow[x],x+1,w,Y.cutVolumn(h.visibledatarow,x+1),_],Y.saveFreezen(T,_,null,null)),Y.createFreezenHorizontal(T,_);let A=$("#luckysheet-cell-main").scrollLeft(),R=st(h.visibledatacolumn,A),I=C.column_focus==null?C.column[0]:C.column_focus;R=Math.max(R-1,I-1,0);let F,z;Y.freezenRealFirstRowColumn?(F=h.visibledatacolumn[R]-2+h.rowHeaderWidth,z=[h.visibledatacolumn[R],R+1,0,Y.cutVolumn(h.visibledatacolumn,R+1),F]):(F=h.visibledatacolumn[R]-2-A+h.rowHeaderWidth,z=[h.visibledatacolumn[R],R+1,A,Y.cutVolumn(h.visibledatacolumn,R+1),F]),Y.saveFreezen(null,null,z,F),Y.createFreezenVertical(z,F),Y.createAssistCanvas(),Be()}else v=="freezenCancel"&&(Y.freezenverticaldata!=null&&(Y.cancelFreezenVertical(),Y.createAssistCanvas(),Be()),Y.freezenhorizontaldata!=null&&(Y.cancelFreezenHorizontal(),Y.createAssistCanvas(),Be()),Y.scrollAdapt());setTimeout(function(){zt()},0)})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s-68,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-autofilter").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t);if(l.length==0){let u=Q(),f=u.sort,d=u.filter,m=[{text:f.asc,value:"asc",example:'<i class="iconfont luckysheet-iconfont-shengxu" aria-hidden="true"></i>'},{text:f.desc,value:"desc",example:'<i class="iconfont luckysheet-iconfont-jiangxu" aria-hidden="true"></i>'},{text:f.custom+"...",value:"diysort",example:'<i class="iconfont luckysheet-iconfont-zidingyipaixu" aria-hidden="true"></i>'},{text:"",value:"split",example:""},{text:d.filter,value:"filter",example:'<i class="iconfont luckysheet-iconfont-shaixuan2" aria-hidden="true"></i>'},{text:d.clearFilter,value:"clearfilter",example:'<i class="iconfont luckysheet-iconfont-qingchushaixuan" aria-hidden="true"></i>'}],g=e.createButtonMenu(m),y=_e(e.menu,{id:"autofilter",item:g,subclass:"",sub:""});$("body").append(y),l=$("#"+t).width(150),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let v=$(this),b=v.attr("itemvalue");b=="diysort"?$("#luckysheetorderby").click():b=="asc"?nc(!0):b=="desc"?nc(!1):b=="filter"?$("#luckysheet-filter-options-sheet"+h.currentSheetIndex).length>0?$("#luckysheet-filter-initial").click():Ri():b=="clearfilter"&&$("#luckysheet-filter-initial").click()})}let a=$(this).outerWidth(),o=l.outerWidth(),s=$(this).offset().left;o>a&&o+s>$("#"+h.container).width()&&(s=s-o+a),ml(l,s,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-seachmore").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t),o=Q().findAndReplace;if(l.length==0){let d=[{text:o.find+" ...",value:"search",example:'<i class="iconfont luckysheet-iconfont-sousuo" aria-hidden="true"></i>'},{text:o.replace+" ...",value:"replace",example:'<i class="iconfont luckysheet-iconfont-tihuan" aria-hidden="true"></i>'},{text:"",value:"split",example:""},{text:o.location+" ...",value:"location",example:'<i class="iconfont luckysheet-iconfont-dingwei" aria-hidden="true"></i>'},{text:o.formula,value:"locationFormula",example:o.locationExample},{text:o.date,value:"locationConstantDate",example:o.locationExample},{text:o.number,value:"locationConstantNumber",example:o.locationExample},{text:o.string,value:"locationConstantString",example:o.locationExample},{text:o.error,value:"locationConstantError",example:o.locationExample},{text:o.condition,value:"locationCF",example:o.locationExample},{text:o.rowSpan,value:"locationStepRow",example:o.locationExample},{text:o.columnSpan,value:"locationStepColumn",example:o.locationExample}],m=e.createButtonMenu(d),g=_e(e.menu,{id:"seachmore",item:m,subclass:"",sub:""});$("body").append(g),l=$("#"+t).width(180),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let y=$(this),v=y.attr("itemvalue");if(v=="search"||v=="replace")v=="search"?$n.createDialog(0):v=="replace"&&$n.createDialog(1),$n.init(),$("#luckysheet-search-replace #searchInput input").focus();else if(v=="location")Xr.createDialog(),Xr.init();else if(v=="locationFormula"||v=="locationConstantDate"||v=="locationConstantNumber"||v=="locationConstantString"||v=="locationConstantError"||v=="locationCF"){let b=h.luckysheet_select_save[0],k;h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&b.row[0]==b.row[1]&&b.column[0]==b.column[1]?k=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1]}]:k=$.extend(!0,[],h.luckysheet_select_save),v=="locationFormula"?Xr.apply(k,"locationFormula","all"):v=="locationConstantDate"?Xr.apply(k,"locationConstant","d"):v=="locationConstantNumber"?Xr.apply(k,"locationConstant","n"):v=="locationConstantString"?Xr.apply(k,"locationConstant","s,g"):v=="locationConstantError"?Xr.apply(k,"locationConstant","e"):v=="locationCF"&&Xr.apply(k,"locationCF")}else if(v=="locationStepRow"){if(h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].row[0]==h.luckysheet_select_save[0].row[1]){fe()?alert(o.lessTwoRowTip):U.info("",o.lessTwoRowTip);return}let b=$.extend(!0,[],h.luckysheet_select_save);Xr.apply(b,"locationStepRow")}else if(v=="locationStepColumn"){if(h.luckysheet_select_save.length==0||h.luckysheet_select_save.length==1&&h.luckysheet_select_save[0].column[0]==h.luckysheet_select_save[0].column[1]){fe()?alert(o.lessTwoColumnTip):U.info("",o.lessTwoColumnTip);return}let b=$.extend(!0,[],h.luckysheet_select_save);Xr.apply(b,"locationStepColumn")}})}let s=$(this).outerWidth(),u=l.outerWidth(),f=$(this).offset().left;u>s&&u+f>$("#"+h.container).width()&&(f=f-u+s),ml(l,f,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-function").click(function(){e.autoSelectionFormula("SUM")}),$("#luckysheet-icon-function-menu").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t),o=Q().formula;if(l.length==0){let d=[{text:o.sum,value:"SUM",example:"SUM"},{text:o.average,value:"AVERAGE",example:"AVERAGE"},{text:o.count,value:"COUNT",example:"COUNT"},{text:o.max,value:"MAX",example:"MAX"},{text:o.min,value:"MIN",example:"MIN"},{text:"",value:"split",example:""},{text:o.ifGenerate,value:"if",example:"IF"},{text:o.find+" ...",value:"formula",example:""}],m=e.createButtonMenu(d),g=_e(e.menu,{id:"function-menu",item:m,subclass:"",sub:""});$("body").append(g),l=$("#"+t).width(180),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let y=$(this),v=y.attr("itemvalue");if(v=="if"){let b=h.luckysheet_select_save[h.luckysheet_select_save.length-1],k=b.row_focus==null?b.row[0]:b.row_focus,w=b.column_focus==null?b.column[0]:b.column_focus;if(!!h.flowdata[k]&&!!h.flowdata[k][w]&&!!h.flowdata[k][w].f){let x=h.flowdata[k][w].f.toString();if(x.indexOf("=if(")!=-1)ri.ifFormulaDialog(x);else{fe()?alert(o.tipNotBelongToIf):U.info(o.tipNotBelongToIf,"");return}}else ri.ifFormulaDialog();ri.init()}else if(v=="formula"){if(h.luckysheet_select_save.length==0){fe()?alert(o.tipSelectCell):U.info(o.tipSelectCell,"");return}let b=h.luckysheet_select_save[h.luckysheet_select_save.length-1],k=b.row_focus,w=b.column_focus;Rl(k,w,h.flowdata);let x=h.flowdata[k][w];if(x!=null&&x.f!=null){let C=p.getfunctionParam(x.f);C.fn!=null?hn.formulaParmDialog(C.fn,C.param):hn.formulaListDialog()}else $("#luckysheet-rich-text-editor").html('<span dir="auto" class="luckysheet-formula-text-color">=</span>'),$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()),hn.formulaListDialog();hn.init()}else e.autoSelectionFormula(v)})}let s=$(this).outerWidth(),u=l.outerWidth(),f=$(this).offset().left;u>s&&u+f>$("#"+h.container).width()&&(f=f-u+s),ml(l,f-48,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-bold").mousedown(function(t){Cr(t),t.stopPropagation()}).click(function(t){let l=xe.deepCopyFlowData(h.flowdata),o=li("bl",1)?0:1;e.updateFormat(l,"bl",o)}),$("#luckysheet-icon-italic").mousedown(function(t){Cr(t),t.stopPropagation()}).click(function(){let t=xe.deepCopyFlowData(h.flowdata),a=li("it",1)?0:1;e.updateFormat(t,"it",a)}),$("#luckysheet-icon-strikethrough").mousedown(function(t){Cr(t),t.stopPropagation()}).click(function(){let t=xe.deepCopyFlowData(h.flowdata),a=li("cl",1)?0:1;e.updateFormat(t,"cl",a)}),$("#luckysheet-icon-underline").mousedown(function(t){Cr(t),t.stopPropagation()}).click(function(){let t=xe.deepCopyFlowData(h.flowdata),a=li("un",1)?0:1;e.updateFormat(t,"un",a)}),$("#luckysheet-icon-conditionformat").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t),a=Q().conditionformat;if(l.length==0){let f=[{text:a.highlightCellRules,value:"highlightCellRule",example:"more"},{text:a.itemSelectionRules,value:"projectSelectRule",example:"more"},{text:a.dataBar,value:"dataBar",example:"more"},{text:a.colorGradation,value:"colorGradation",example:"more"},{text:a.icons,value:"icons",example:""},{text:"",value:"split",example:""},{text:a.newRule,value:"newRule",example:""},{text:a.deleteRule,value:"deleteRule",example:"more"},{text:a.manageRules,value:"administerRule",example:""}],d=e.createButtonMenu(f),m=_e(e.menu,{id:"conditionformat",item:d,subclass:"",sub:""}),g=[{text:a.greaterThan,value:"greaterThan",example:">"},{text:a.lessThan,value:"lessThan",example:"<"},{text:a.between,value:"betweenness",example:"[]"},{text:a.equal,value:"equal",example:"="},{text:a.textContains,value:"textContains",example:"()"},{text:a.occurrence,value:"occurrenceDate",example:a.yesterday},{text:a.duplicateValue,value:"duplicateValue",example:"##"}],y=e.createButtonMenu(g),v=_e(e.menu,{id:"highlightCellRule",item:y,subclass:"luckysheet-menuButton-sub"}),b=[{text:a.top10,value:"top10",example:a.top10},{text:a.top10_percent,value:"top10%",example:a.top10_percent},{text:a.last10,value:"last10",example:a.last10},{text:a.last10_percent,value:"last10%",example:a.last10_percent},{text:a.aboveAverage,value:"AboveAverage",example:a.above},{text:a.belowAverage,value:"SubAverage",example:a.below}],k=e.createButtonMenu(b),w=_e(e.menu,{id:"projectSelectRule",item:k,subclass:"luckysheet-menuButton-sub"}),x=`<div id="luckysheet-icon-dataBar-menuButton" class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-menuButton luckysheet-menuButton-sub luckysheet-mousedown-cancel" style="width: 126px;padding: 5px;top: 118.5px;left: 1321.48px;display: none;"> |
| | | <div itemvalue="0" class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" style="width: 28px; height: 26px;padding: 5px;float: left;"> |
| | | <div class="luckysheet-mousedown-cancel bgImgBox" style="background-position: 0 0;" title="${a.gradientDataBar_1}"></div> |
| | | </div> |
| | |
| | | <div itemvalue="11" class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" style="width: 28px; height: 26px;padding: 5px;float: left;"> |
| | | <div class="luckysheet-mousedown-cancel bgImgBox" style="background-position: -114px -72px;" title="${a.colorGradation_12}"></div> |
| | | </div> |
| | | </div>`,S=[{text:a.deleteSheetRule,value:"delSheet",example:""}],_=e.createButtonMenu(S),T=_e(e.menu,{id:"deleteRule",item:_,subclass:"luckysheet-menuButton-sub"});$("body").append(m+v+w+x+C+T),l=$("#"+t).width(190),$("#luckysheet-icon-highlightCellRule-menuButton").width(160),$("#luckysheet-icon-projectSelectRule-menuButton").width(180),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let A=$(this),R=A.attr("itemvalue");if(R=="icons"){if(h.luckysheet_select_save.length==0){de()?alert(a.pleaseSelectRange):U.info(a.pleaseSelectRange,"");return}$e.CFiconsDialog(),$e.init()}else if(R=="newRule"){if(h.luckysheet_select_save.length==0){de()?alert(a.pleaseSelectRange):U.info(a.pleaseSelectRange,"");return}$e.newConditionRuleDialog(0),$e.init()}else if(R=="administerRule"){let I=ne.loadSheetUrl,F=Et();if(I!=""&&I!=null){let z=[];for(let M=0;M<F.length;M++)z.push(F[M].index);$.post(I,{gridKey:ne.gridKey,index:z.join(",")},function(M){let E=new Function("return "+M)();setTimeout(function(){h.loadingObj.close()},500);for(let N in E){if(N==h.currentSheetIndex)continue;let L=F[Z(N)];L.celldata=E[N.toString()],L.data=ve.buildGridData(L)}Jn(F),$e.fileClone=$.extend(!0,[],F),$e.administerRuleDialog(),$e.init()})}else $e.fileClone=$.extend(!0,[],F),$e.administerRuleDialog(),$e.init()}}),$(document).off("click.CFhighlightCellRule").on("click.CFhighlightCellRule","#luckysheet-icon-highlightCellRule-menuButton .luckysheet-cols-menuitem",function(){l.hide(),$("#luckysheet-icon-highlightCellRule-menuButton").hide(),rt();let A=$(this),R=A.attr("itemvalue");if(h.luckysheet_select_save.length==0){de()?alert(a.pleaseSelectRange):U.info(a.pleaseSelectRange,"");return}else{let I=$e.textCellColorHtml(),F,z;switch(R){case"greaterThan":F=a.conditionformat_greaterThan,z=`<div class="box" data-itemvalue="greaterThan"> |
| | | </div>`,S=[{text:a.deleteSheetRule,value:"delSheet",example:""}],_=e.createButtonMenu(S),T=_e(e.menu,{id:"deleteRule",item:_,subclass:"luckysheet-menuButton-sub"});$("body").append(m+v+w+x+C+T),l=$("#"+t).width(190),$("#luckysheet-icon-highlightCellRule-menuButton").width(160),$("#luckysheet-icon-projectSelectRule-menuButton").width(180),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let A=$(this),R=A.attr("itemvalue");if(R=="icons"){if(h.luckysheet_select_save.length==0){fe()?alert(a.pleaseSelectRange):U.info(a.pleaseSelectRange,"");return}$e.CFiconsDialog(),$e.init()}else if(R=="newRule"){if(h.luckysheet_select_save.length==0){fe()?alert(a.pleaseSelectRange):U.info(a.pleaseSelectRange,"");return}$e.newConditionRuleDialog(0),$e.init()}else if(R=="administerRule"){let I=ne.loadSheetUrl,F=Et();if(I!=""&&I!=null){let z=[];for(let M=0;M<F.length;M++)z.push(F[M].index);$.post(I,{gridKey:ne.gridKey,index:z.join(",")},function(M){let E=new Function("return "+M)();setTimeout(function(){h.loadingObj.close()},500);for(let N in E){if(N==h.currentSheetIndex)continue;let L=F[Z(N)];L.celldata=E[N.toString()],L.data=ve.buildGridData(L)}Jn(F),$e.fileClone=$.extend(!0,[],F),$e.administerRuleDialog(),$e.init()})}else $e.fileClone=$.extend(!0,[],F),$e.administerRuleDialog(),$e.init()}}),$(document).off("click.CFhighlightCellRule").on("click.CFhighlightCellRule","#luckysheet-icon-highlightCellRule-menuButton .luckysheet-cols-menuitem",function(){l.hide(),$("#luckysheet-icon-highlightCellRule-menuButton").hide(),rt();let A=$(this),R=A.attr("itemvalue");if(h.luckysheet_select_save.length==0){fe()?alert(a.pleaseSelectRange):U.info(a.pleaseSelectRange,"");return}else{let I=$e.textCellColorHtml(),F,z;switch(R){case"greaterThan":F=a.conditionformat_greaterThan,z=`<div class="box" data-itemvalue="greaterThan"> |
| | | <div class="boxTitleOne">${a.conditionformat_greaterThan_title}\uFF1A</div> |
| | | <div class="inpbox range"> |
| | | <input id="conditionVal" class="formulaInputFocus"/> |
| | |
| | | </select> |
| | | <div style="margin:5px 0;">${a.setAs}\uFF1A</div> |
| | | ${I} |
| | | </div>`;break}$e.conditionformatDialog(F,z)}}),$(document).off("click.CFprojectSelectRule").on("click.CFprojectSelectRule","#luckysheet-icon-projectSelectRule-menuButton .luckysheet-cols-menuitem",function(){l.hide(),$("#luckysheet-icon-projectSelectRule-menuButton").hide(),rt();let A=$(this),R=A.attr("itemvalue");if(h.luckysheet_select_save.length==0){de()?alert(a.pleaseSelectRange):U.info(a.pleaseSelectRange,"");return}else{let I=$e.textCellColorHtml(),F,z;switch(R){case"top10":F=a.conditionformat_top10,z=`<div class="box" data-itemvalue="top10"> |
| | | </div>`;break}$e.conditionformatDialog(F,z)}}),$(document).off("click.CFprojectSelectRule").on("click.CFprojectSelectRule","#luckysheet-icon-projectSelectRule-menuButton .luckysheet-cols-menuitem",function(){l.hide(),$("#luckysheet-icon-projectSelectRule-menuButton").hide(),rt();let A=$(this),R=A.attr("itemvalue");if(h.luckysheet_select_save.length==0){fe()?alert(a.pleaseSelectRange):U.info(a.pleaseSelectRange,"");return}else{let I=$e.textCellColorHtml(),F,z;switch(R){case"top10":F=a.conditionformat_top10,z=`<div class="box" data-itemvalue="top10"> |
| | | <div class="boxTitleOne">${a.conditionformat_top10_title}\uFF1A</div> |
| | | <div style="height: 30px;line-height: 30px;"> |
| | | <div style="float: left;height: 30px;line-height: 30px;margin: 0 5px;">${a.top}</div> |
| | |
| | | <div class="boxTitleOne">${a.conditionformat_SubAverage_title}\uFF1A</div> |
| | | <div style="margin: 5px 0;">${a.setAsByArea}\uFF1A</div> |
| | | ${I} |
| | | </div>`;break}$e.conditionformatDialog(F,z)}}),$(document).off("click.CFdataBar").on("click.CFdataBar","#luckysheet-icon-dataBar-menuButton .luckysheet-cols-menuitem",function(){l.hide(),$("#luckysheet-icon-dataBar-menuButton").hide(),rt();let A=$(this),R=A.attr("itemvalue");if(h.luckysheet_select_save.length>0){let I=$.extend(!0,[],h.luckysheet_select_save),F=$e.dataBarList[R].format;$e.updateItem("dataBar",I,F)}}),$(document).off("click.CFcolorGradation").on("click.CFcolorGradation","#luckysheet-icon-colorGradation-menuButton .luckysheet-cols-menuitem",function(){l.hide(),$("#luckysheet-icon-colorGradation-menuButton").hide(),rt();let A=$(this),R=A.attr("itemvalue");if(h.luckysheet_select_save.length>0){let I=$.extend(!0,[],h.luckysheet_select_save),F=$e.colorGradationList[R].format;$e.updateItem("colorGradation",I,F)}}),$(document).off("click.CFdeleteRule").on("click.CFdeleteRule","#luckysheet-icon-deleteRule-menuButton .luckysheet-cols-menuitem",function(){l.hide(),$("#luckysheet-icon-deleteRule-menuButton").hide(),rt(),$(this).attr("itemvalue")=="delSheet"&&$e.updateItem("delSheet")})}let o=$(this).outerWidth(),s=l.outerWidth(),u=$(this).offset().left;s>o&&s+u>$("#"+h.container).width()&&(u=u-s+o),ml(l,u,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-postil").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t),a=Q().comment;l.remove(),He.removeActivePs();let o=h.luckysheet_select_save[h.luckysheet_select_save.length-1],s=o.row_focus;s==null&&(s=o.row[0]);let u=o.column_focus;u==null&&(u=o.column[0]);let d;h.flowdata[s][u]!=null&&h.flowdata[s][u].ps!=null?d=[{text:a.edit,value:"editPs",example:""},{text:a.delete,value:"delPs",example:""},{text:"",value:"split",example:""},{text:a.showOne,value:"showHidePs",example:""},{text:a.showAll,value:"showHideAllPs",example:""}]:d=[{text:a.insert,value:"newPs",example:""},{text:"",value:"split",example:""},{text:a.showAll,value:"showHideAllPs",example:""}];let f=e.createButtonMenu(d),m=_e(e.menu,{id:"postil",item:f,subclass:"",sub:""});$("body").append(m),l=$("#"+t).width(150),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let b=$(this),k=b.attr("itemvalue");k=="newPs"?He.newPs(s,u):k=="editPs"?He.editPs(s,u):k=="delPs"?He.delPs(s,u):k=="showHidePs"?He.showHidePs(s,u):k=="showHideAllPs"&&He.showHideAllPs()});let g=$(this).outerWidth(),y=l.outerWidth(),v=$(this).offset().left;y>g&&y+v>$("#"+h.container).width()&&(v=v-y+g),ml(l,v,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-protection").click(function(){let t=ve.getSheetByIndex();af(t)}),$("#luckysheet-icon-print").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t),o=Q().print;if(l.length==0){let f=[{text:o.menuItemPrint,value:"print",example:'<i class="iconfont luckysheet-iconfont-dayin" aria-hidden="true"></i>'},{text:"",value:"split",example:""},{text:o.menuItemAreas,value:"areas",example:'<i class="iconfont luckysheet-iconfont-tihuan" aria-hidden="true"></i>'},{text:o.menuItemRows,value:"rows",example:'<i class="iconfont luckysheet-iconfont-zhuandao1" aria-hidden="true"></i>'},{text:o.menuItemColumns,value:"columns",example:'<i class="iconfont luckysheet-iconfont-dingwei" aria-hidden="true"></i>'}],m=e.createButtonMenu(f),g=_e(e.menu,{id:"print",item:m,subclass:"",sub:""});$("body").append(g),l=$("#"+t).width(180),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let y=$(this),v=y.attr("itemvalue");v=="print"?alert("print"):(v=="areas"||v=="rows"||v=="columns")&&alert("areas")})}let s=$(this).outerWidth(),u=l.outerWidth(),d=$(this).offset().left;u>s&&u+d>$("#"+h.container).width()&&(d=d-u+s),ml(l,d,$(this).offset().top+25,"lefttop")}),$("body").on("mouseover mouseleave",".luckysheet-menuButton .luckysheet-cols-submenu",function(t){let l=$(this),a=l.attr("itemvalue"),o=$("#luckysheet-icon-"+a+"-menuButton");if(t.type==="mouseover"){let s=l.parent(),u=$(window).width(),d=$(window).height(),f=s.width(),m=o.height()+25,g=o.width()+5,y=l.offset(),v=y.top,b=y.left+f;b+g>u&&(b=y.left-g),v+m>d&&(v=d-m),o.css({top:v,left:b}).show(),e.rightclickmenu=l}else clearTimeout(e.submenuhide[o.attr("id")]),e.submenuhide[o.attr("id")]=setTimeout(function(){o.hide()},200)}).on("mouseover mouseleave",".luckysheet-menuButton-sub",function(t){t.type==="mouseover"?(e.rightclickmenu.addClass("luckysheet-cols-menuitem-hover"),clearTimeout(e.submenuhide[$(this).attr("id")])):(e.rightclickmenu.removeClass("luckysheet-cols-menuitem-hover"),$(this).hide())})},getQKBorder:function(e,n,t){let l="";e.indexOf("pt")>-1?(e=parseFloat(e),e<1||(e<1.5?l="Medium":l="Thick")):(e=parseFloat(e),e<2||(e<3?l="Medium":l="Thick"));let a=0;return n=n.toLowerCase(),n=="double"?a=2:n=="dotted"?l=="Medium"||l=="Thick"?a=3:a=10:n=="dashed"?l=="Medium"||l=="Thick"?a=4:a=9:n=="solid"&&(l=="Medium"?a=8:l=="Thick"?a=13:a=1),[a,t]},updateFormatCell:function(e,n,t,l,a,o,s){if(!(e==null||n==null))if(n=="ct"){for(let u=l;u<=a;u++)if(!(h.config.rowhidden!=null&&h.config.rowhidden[u]!=null))for(let d=o;d<=s;d++){let f=e[u][d],m=null;P(f)=="object"?m=e[u][d].v:m=e[u][d],t!="@"&&B(m)&&(m=parseFloat(m));let g=mt(t,m),y="n";Gd(t)||t===14||t===15||t===16||t===17||t===18||t===19||t===20||t===21||t===22||t===45||t===46||t===47?y="d":t=="@"||t===49?y="s":(t=="General"||t===0)&&(y=B(m)?"n":"g"),P(f)=="object"?(e[u][d].m=g,e[u][d].ct==null&&(e[u][d].ct={}),e[u][d].ct.fa=t,e[u][d].ct.t=y):e[u][d]={ct:{fa:t,t:y},v:m,m:g}}}else{n=="ht"?t=="left"?t="1":t=="center"?t="0":t=="right"&&(t="2"):n=="vt"?t=="top"?t="1":t=="middle"?t="0":t=="bottom"&&(t="2"):n=="tb"?t=="overflow"?t="1":t=="clip"?t="0":t=="wrap"&&(t="2"):n=="tr"&&(t=="none"?t="0":t=="angleup"?t="1":t=="angledown"?t="2":t=="vertical"?t="3":t=="rotation-up"?t="4":t=="rotation-down"&&(t="5"));for(let u=l;u<=a;u++)if(!(h.config.rowhidden!=null&&h.config.rowhidden[u]!=null))for(let d=o;d<=s;d++){let f=e[u][d];P(f)=="object"?(Nd(f,n,t),e[u][d][n]=t):(e[u][d]={v:f},e[u][d][n]=t)}}},updateFormat:function(e,n,t){let l=this;if(!Rr(h.currentSheetIndex))return;if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}let o=document.createElement("canvas").getContext("2d");if(n in Dd&&parseInt($("#luckysheet-input-box").css("top"))>0&&$("#luckysheet-input-box").text().substr(0,1)!="="){let f=e[h.luckysheetCellUpdate[0]][h.luckysheetCellUpdate[1]];Fd(f,n,t,p.rangeResizeTo)}let s=$.extend(!0,{},h.config);s.rowlen==null&&(s.rowlen={});for(let d=0;d<h.luckysheet_select_save.length;d++){let f=h.luckysheet_select_save[d].row[0],m=h.luckysheet_select_save[d].row[1],g=h.luckysheet_select_save[d].column[0],y=h.luckysheet_select_save[d].column[1];this.updateFormatCell(e,n,t,f,m,g,y),(n=="tb"||n=="tr"||n=="fs")&&(s=yl(e,f,m,s))}let u={};(n=="tb"||n=="tr"||n=="fs")&&(u={cfg:s,RowlChange:!0}),Ze(e,h.luckysheet_select_save,u,!1)},updateFormat_mc:function(e,n){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}let t=$.extend(!0,{},h.config);if(t.merge==null&&(t.merge={}),!!jr(h.currentSheetIndex)){if(n=="mergeCancel")for(let l=0;l<h.luckysheet_select_save.length;l++){let a=h.luckysheet_select_save[l],o=a.row[0],s=a.row[1],u=a.column[0],d=a.column[1];if(o==s&&u==d)continue;let f={};for(let m=o;m<=s;m++)for(let g=u;g<=d;g++){let y=e[m][g];if(y!=null&&y.mc!=null){let v=y.mc.r,b=y.mc.c;if("rs"in y.mc)delete y.mc,delete t.merge[v+"_"+b],f[v+"_"+b]=$.extend(!0,{},y);else{let k=JSON.parse(JSON.stringify(f[v+"_"+b]));delete k.v,delete k.m,delete k.ct,delete k.f,delete k.spl,e[m][g]=k}}}}else{let l=!1;for(let a=0;a<h.luckysheet_select_save.length;a++){let o=h.luckysheet_select_save[a],s=o.row[0],u=o.row[1],d=o.column[0],f=o.column[1];for(let m=s;m<=u;m++)for(let g=d;g<=f;g++){let y=e[m][g];if(P(y)=="object"&&"mc"in y){l=!0;break}}}if(l)for(let a=0;a<h.luckysheet_select_save.length;a++){let o=h.luckysheet_select_save[a],s=o.row[0],u=o.row[1],d=o.column[0],f=o.column[1];if(s==u&&d==f)continue;let m={};for(let g=s;g<=u;g++)for(let y=d;y<=f;y++){let v=e[g][y];if(v!=null&&v.mc!=null){let b=v.mc.r,k=v.mc.c;if("rs"in v.mc)delete v.mc,delete t.merge[b+"_"+k],m[b+"_"+k]=$.extend(!0,{},v);else{let w=JSON.parse(JSON.stringify(m[b+"_"+k]));delete w.v,delete w.m,delete w.ct,delete w.f,delete w.spl,e[g][y]=w}}}}else for(let a=0;a<h.luckysheet_select_save.length;a++){let o=h.luckysheet_select_save[a],s=o.row[0],u=o.row[1],d=o.column[0],f=o.column[1];if(!(s==u&&d==f)){if(n=="mergeAll"){let m={},g=!1;for(let y=s;y<=u;y++)for(let v=d;v<=f;v++){let b=e[y][v];b!=null&&(Na(b.ct)||!me(b.v)||b.f!=null)&&!g&&(m=$.extend(!0,{},b),g=!0),e[y][v]={mc:{r:s,c:d}}}e[s][d]=m,e[s][d].mc={r:s,c:d,rs:u-s+1,cs:f-d+1},t.merge[s+"_"+d]={r:s,c:d,rs:u-s+1,cs:f-d+1}}else if(n=="mergeV")for(let m=d;m<=f;m++){let g={},y=!1;for(let v=s;v<=u;v++){let b=e[v][m];b!=null&&(!me(b.v)||b.f!=null)&&!y&&(g=$.extend(!0,{},b),y=!0),e[v][m]={mc:{r:s,c:m}}}e[s][m]=g,e[s][m].mc={r:s,c:m,rs:u-s+1,cs:1},t.merge[s+"_"+m]={r:s,c:m,rs:u-s+1,cs:1}}else if(n=="mergeH")for(let m=s;m<=u;m++){let g={},y=!1;for(let v=d;v<=f;v++){let b=e[m][v];b!=null&&(!me(b.v)||b.f!=null)&&!y&&(g=$.extend(!0,{},b),y=!0),e[m][v]={mc:{r:m,c:d}}}e[m][d]=g,e[m][d].mc={r:m,c:d,rs:1,cs:f-d+1},t.merge[m+"_"+d]={r:m,c:d,rs:1,cs:f-d+1}}}}}h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"mergeChange",sheetIndex:h.currentSheetIndex,data:h.flowdata,curData:e,range:$.extend(!0,[],h.luckysheet_select_save),config:$.extend(!0,{},h.config),curConfig:t})),h.clearjfundo=!1,Ze(e,h.luckysheet_select_save,{cfg:t}),h.clearjfundo=!0}},borderfix:function(e,n,t){let l=e[n][t],a=null;return l==null?[-1,0,0,-1]:e[n][t].bg==null||e[n][t].bg==""?[-1,0,0,-1]:[-2,-1,1,0]},changeMenuButtonDom:function(e,n,t){let l=this;t==null&&(t=Q());let a=t.fontarray,o=t.fontjson;if(e=="bl")n!="0"?$("#luckysheet-icon-bold").addClass("luckysheet-toolbar-button-hover"):$("#luckysheet-icon-bold").removeClass("luckysheet-toolbar-button-hover");else if(e=="it")n!="0"?$("#luckysheet-icon-italic").addClass("luckysheet-toolbar-button-hover"):$("#luckysheet-icon-italic").removeClass("luckysheet-toolbar-button-hover");else if(e=="cl")n!="0"?$("#luckysheet-icon-strikethrough").addClass("luckysheet-toolbar-button-hover"):$("#luckysheet-icon-strikethrough").removeClass("luckysheet-toolbar-button-hover");else if(e=="un")n!="0"?$("#luckysheet-icon-underline").addClass("luckysheet-toolbar-button-hover"):$("#luckysheet-icon-underline").removeClass("luckysheet-toolbar-button-hover");else if(e=="ff"){let s="luckysheet-icon-font-family-menuButton",u=$("#"+s),d=a[0],f=0;n!=null&&(On(n).num?(f=parseInt(n),d=a[f],d==null&&(f=l.defualtFont[f],d=f,f!=null&&l.addFontTolist(f))):(n=n.replace(/"/g,"").replace(/'/g,""),f=n,d=n,l.addFontTolist(f))),l.focus(u,f),$("#luckysheet-icon-font-family").find(".luckysheet-toolbar-menu-button-caption").html(" "+d+" ")}else if(e=="fs"){let s=$("#luckysheet-icon-font-size-menuButton"),u=n,d=$("#luckysheet-icon-font-size input");l.focus(s,u),$("#luckysheet-icon-font-size").attr("itemvalue",u),d.val(u)}else if(e=="ht"){let s=$("#luckysheet-icon-align-menu-menuButton"),u=$("luckysheet-icon-align"),d="left";n=="0"?d="center":n=="2"&&(d="right"),l.focus(s,d);let f=Jr.align;$("#luckysheet-icon-align").attr("type",d).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-align-"+d+f[d]),s.hide()}else if(e=="vt"){let s=$("#luckysheet-icon-valign-menu-menuButton"),u=$("luckysheet-icon-valign"),d="bottom";n=="1"?d="top":n=="0"&&(d="middle"),l.focus(s,d);let f=Jr.align;$("#luckysheet-icon-valign").attr("type",d).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-valign-"+d+f[d]),s.hide()}else if(e=="tb"){let s=$("#luckysheet-icon-textwrap-menu-menuButton"),u=$("luckysheet-icon-textwrap"),d="clip";n=="1"?d="overflow":n=="2"&&(d="wrap"),l.focus(s,d);let f=Jr.textWrap;$("#luckysheet-icon-textwrap").attr("type",d).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-textwrap-"+d+f[d]),s.hide()}else if(e=="tr"){let s=$("#luckysheet-icon-rotation-menu-menuButton"),u=$("luckysheet-icon-rotation"),d="none";n=="1"?d="angleup":n=="2"?d="angledown":n=="3"?d="vertical":n=="4"?d="rotation-up":n=="5"&&(d="rotation-down"),l.focus(s,d);let f=Jr.rotation;$("#luckysheet-icon-rotation").attr("type",d).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-"+d+f[d]),s.hide()}else if(e=="ct"){let s=$("#luckysheet-icon-fmt-other"),d=Q().defaultFmt;if(!n){s.find(".luckysheet-toolbar-menu-button-caption").html(" "+d[0].text+" ");return}let{fa:f}=n,m=d.find(g=>g.value===f);if(m)s.find(".luckysheet-toolbar-menu-button-caption").html(" "+m.text+" ");else{let g=d.find(y=>y.value==="fmtOtherSelf");s.find(".luckysheet-toolbar-menu-button-caption").html(" "+g.text+" ")}}},inputMenuButtonFocus:function(e){var n=window.getSelection(),t=n.getRangeAt(0);let l=t.startContainer;h.inlineStringEditRange=null;let a=Q();if(l.parentNode.tagName=="SPAN"){let o=l.parentNode.style.cssText,s=Os(o);for(let u in s)this.changeMenuButtonDom(u,s[u],a)}},menuButtonFocus:function(e,n,t){let l=this,a=["bl","it","cl","ff","ht","vt","fs","tb","tr","ct","un"],o=Q();for(let s=0;s<a.length;s++){let u=a[s],d=l.checkstatus(e,n,t,u);this.changeMenuButtonDom(u,d,o)}},checkstatus:function(e,n,t,l){if(e==null||e[n]==null)return console.warn("It's incorrect data",n,t),null;let a=e[n][t];return Tr(a,l)},setLineDash:function(e,n,t,l,a,o,s){n={"0":"none","1":"Thin","2":"Hair","3":"Dotted","4":"Dashed","5":"DashDot","6":"DashDotDot","7":"Double","8":"Medium","9":"MediumDashed","10":"MediumDashDot","11":"MediumDashDotDot","12":"SlantedDashDot","13":"Thick"}[n.toString()];try{n=="Hair"?e.setLineDash([1,2]):n.indexOf("DashDotDot")>-1?e.setLineDash([2,2,5,2,2]):n.indexOf("DashDot")>-1?e.setLineDash([2,5,2]):n.indexOf("Dotted")>-1?e.setLineDash([2]):n.indexOf("Dashed")>-1?e.setLineDash([3]):e.setLineDash([0])}catch(d){console.log(d)}e.beginPath(),n.indexOf("Medium")>-1?(t=="h"?(e.moveTo(l,a-.5),e.lineTo(o,s-.5)):(e.moveTo(l-.5,a),e.lineTo(o-.5,s)),e.lineWidth=2):n=="Thick"?(e.moveTo(l,a),e.lineTo(o,s),e.lineWidth=3):(e.moveTo(l,a),e.lineTo(o,s),e.lineWidth=1)},moveMergeData:function(e,n,t){if(me(e))return e;let l=[],a=[],o=!1;for(let s=0;s<e.length;s++)for(let u=0;u<e[0].length;u++){let d=e[s][u];P(d)=="object"&&"mc"in d&&(d.mc.rs!=null&&(l.push({rs:d.mc.rs,cs:d.mc.cs,r:d.mc.r,c:d.mc.c}),a.push({rs:d.mc.rs,cs:d.mc.cs,r:d.mc.r+n,c:d.mc.c+t}),o=!0),e[s][u].mc.r+=n,e[s][u].mc.c+=t)}return{deleMC:l,insertMC:a,hasMC:o}},getRangeInMerge:function(e,n,t,l,a){let o=this,s=[],u=null;if(a!=null?u=$.extend(!0,{},o.getSheetConfig()):u=$.extend(!0,{},h.config),u!=null&&u.merge!=null)for(let d in u.merge){let f=u.merge[d];!(e+n-1<f.r||e>f.r+f.rs-1)&&!(t+l-1<f.c||t>f.c+f.cs-1)&&s.push(f)}return s},mergeborer:function(e,n,t){if(e==null||e[n]==null)return console.warn("Merge info is null",n,t),null;let l=e[n][t];if(P(l)=="object"&&"mc"in l){let a=l.mc;if(a==null)return console.warn("Merge info is null",n,t),null;if(t=a.c,n=a.r,e[n][t]==null)return console.warn("Main merge Cell info is null",n,t),null;let o=e[n][t].mc.cs,s=e[n][t].mc.rs,u=e[n][t].mc,d,f,m,g;for(let w=n;w<u.rs+n;w++)w==0?d=-1:d=h.visibledatarow[w-1]-1,f=h.visibledatarow[w],g==null?(g=d,m=f):m+=f-d-1;let y,v,b,k;for(let w=t;w<u.cs+t;w++)w==0?y=0:y=h.visibledatacolumn[w-1],v=h.visibledatacolumn[w],k==null?(k=y,b=v):b+=v-y;return{row:[g,m,n,n+s-1],column:[k,b,t,t+o-1]}}else return null},mergeMoveData:{},mergeMoveMain:function(e,n,t,l,a,o,s){let u=this,d=ve.getSheetMerge();if(d==null)return;let f=[];for(let g in d)f.push(g);n[0]>n[1]&&(n[1]=n[0]),e[0]>e[1]&&(e[1]=e[0]);let m=!0;for(u.mergeMoveData={};m;){m=!1;for(let g=0;g<f.length;g++){let y=f[g],v=d[y];if(y in u.mergeMoveData)continue;let b=u.mergeMove(v,e,n,t,l,a,o,s);b!=null?(u.mergeMoveData[y]=v,e=b[0],n=b[1],l=b[2],a=b[3],o=b[4],s=b[5],m=!0):delete u.mergeMoveData[y]}}return[e,n,l,a,o,s]},mergeMove:function(e,n,t,l,a,o,s,u){let d=this,f=e.r,m=e.r+e.rs-1,g=e.c,y=e.c+e.cs-1,v=!1;if(n[1]<n[0]&&(n[0]=n[1]),t[1]<t[0]&&(t[0]=t[1]),n[0]<=g&&n[1]>=y&&t[0]<=f&&t[1]>=m||!(n[1]<g||n[0]>y)&&!(t[1]<f||t[0]>m)){let b=d.mergeborer(h.flowdata,e.r,e.c);if(b){let k=b.row[1],w=b.row[0],x=b.row[2],C=b.column[1],S=b.column[0],_=b.column[2];n[1]<g||n[0]>y||(t[0]<=m&&t[0]>=f&&(o+=a-w,a=w,t[0]=f),t[1]>=f&&t[1]<=m&&(l.row_focus>=f&&l.row_focus<=m,o=k-a,t[1]=m)),t[1]<f||t[0]>m||(n[0]<=y&&n[0]>=g&&(u+=s-S,s=S,n[0]=g),n[1]>=g&&n[1]<=y&&(l.column_focus>=g&&l.column_focus<=y,u=C-s,n[1]=y)),v=!0}}return v?[n,t,a,o,s,u]:null},getCellRealSize:function(e,n,t){let l=this,a=h.defaultcollen,o=h.defaultrowlen,s=e[n][t];if(!!s&&s.mc!=null){let u=s.mc,d=l.mergeborer(e,u.r,u.c);if(d){let f=d.row[1],m=d.row[0],g=d.row[2],y=d.row[3],v=d.column[1],b=d.column[0],k=d.column[2],w=d.column[3];a=v-b-1,o=f-m-1}}else{let u=Et()[Z(h.currentSheetIndex)].config;u.columnlen!=null&&u.columnlen[t]!=null&&(a=u.columnlen[t]),u.rowlen!=null&&u.rowlen[n]!=null&&(o=u.rowlen[n])}return[a,o]},getTextHeightCache:{},getTextSize:function(e,n){let t=Q().fontarray,l=n||"10pt "+t[0],a=this;if(l in a.getTextHeightCache)return a.getTextHeightCache[l];$("#luckysheetTextSizeTest").length==0&&$('<span id="luckysheetTextSizeTest" style="float:left;white-space:nowrap;visibility:hidden;margin:0;padding:0;">'+e+"</span>").appendTo($("body"));let o=$("#luckysheetTextSizeTest").text(e).css({font:l}),s=o.innerWidth(),u=o.innerHeight();return a.getTextHeightCache[l]=[s,u],[s,u]},activeFormulaInput:function(e,n,t,l,a,o){let s=this;if(o==null&&(o=!1),Rl(e,n,h.flowdata,!0),o){let y='<span dir="auto" class="luckysheet-formula-text-color">=</span><span dir="auto" class="luckysheet-formula-text-color">'+a.toUpperCase()+'</span><span dir="auto" class="luckysheet-formula-text-color">(</span><span dir="auto" class="luckysheet-formula-text-color">)</span>';$("#luckysheet-rich-text-editor").html(y);let v=window.getSelection(),b=$("#luckysheet-rich-text-editor").find("span");p.setCaretPosition(b.get(b.length-2),0,1);return}let u=tl(t[0])[0],d=tl(t[1])[1],f=At(l[0])[0],m=At(l[1])[1],g='<span dir="auto" class="luckysheet-formula-text-color">=</span><span dir="auto" class="luckysheet-formula-text-color">'+a.toUpperCase()+'</span><span dir="auto" class="luckysheet-formula-text-color">(</span><span class="luckysheet-formula-functionrange-cell" rangeindex="0" dir="auto" style="color:'+Yl[0]+';">'+xt(h.currentSheetIndex,{row:t,column:l},h.currentSheetIndex)+'</span><span dir="auto" class="luckysheet-formula-text-color">)</span>';$("#luckysheet-rich-text-editor").html(g),p.israngeseleciton(),p.rangestart=!0,p.rangedrag_column_start=!1,p.rangedrag_row_start=!1,p.rangechangeindex=0,p.rangeSetValue({row:t,column:l}),p.func_selectedrange={left:f,width:m-f-1,top:u,height:d-u-1,left_move:f,width_move:m-f-1,top_move:u,height_move:d-u-1,row:[e,e],column:[n,n]},$("#luckysheet-formula-functionrange-select").css({left:f,width:m-f-1,top:u,height:d-u-1}).show(),$("#luckysheet-formula-help-c").hide()},backFormulaInput:function(e,n,t,l,a,o){let s=this,u="="+o.toUpperCase()+"("+xt(h.currentSheetIndex,{row:l,column:a},h.currentSheetIndex)+")",d=p.execfunction(u,n,t),f={v:d[1],f:d[2]};Ht(n,t,e,f),p.execFunctionExist.push({r:n,c:t,i:h.currentSheetIndex}),ne.historyParam(e,h.currentSheetIndex,{row:[n,n],column:[t,t]})},checkNoNullValue:function(e){let n=e;return P(n)=="object"&&(n=n.v),!!(!me(n)&&On(n).num&&(e.ct==null||e.ct.t==null||e.ct.t=="n"||e.ct.t=="g"))},checkNoNullValueAll:function(e){let n=e;return P(n)=="object"&&(n=n.v),!me(n)},getNoNullValue:function(e,n,t,l){let a=this,o=0,s=null,u=0,d=0;for(let f=t-1;f>=0;f--){let m;if(l=="c"?m=e[n][f]:m=e[f][n],a.checkNoNullValue(m))o++,s=f;else if(m==null||m.v==null||m.v==""){if(u++,u>=40)if(d<=0)d=1;else break}else break}return s},singleFormulaInput:function(e,n,t,l,a,o,s,u,d){let f=this;s==null&&(s="r"),u==null&&(u=!0),d==null&&(d=!0);let m=!0,g=!1;for(let y=l;y<=a;y++){let v=null;s=="c"?v=e[y][t]:v=e[t][y],f.checkNoNullValue(v)?(m=!1,g=!0):f.checkNoNullValueAll(v)&&(m=!1)}if(m&&d)if(f.getNoNullValue(e,n,t,s)==null)s=="c"?f.activeFormulaInput(n,t,null,null,o,!0):f.activeFormulaInput(t,n,null,null,o,!0);else if(n==l)for(let v=l;v<=a;v++){let b=f.getNoNullValue(e,v,t,s);if(b==null)break;s=="c"?f.backFormulaInput(e,v,t,[v,v],[b,t-1],o):f.backFormulaInput(e,t,v,[b,t-1],[v,v],o)}else for(let v=a;v>=l;v--){let b=f.getNoNullValue(e,v,t,s);if(b==null)break;s=="c"?f.backFormulaInput(e,v,t,[v,v],[b,t-1],o):f.backFormulaInput(e,t,v,[b,t-1],[v,v],o)}else if(g&&u){let y=null;if(s=="c"?y=e[a+1][t]:y=e[t][a+1],y!=null&&y.v!=null&&y.v.toString().length>0){let v=a+1;for(s=="c"?y=e[a+1][t]:y=e[t][a+1];y!=null&&y.v!=null&&y.v.toString().length>0;){v++;let b=null;if(s=="c"?b=e.length:b=e[0].length,v>=b)return;s=="c"?y=e[v][t]:y=e[t][v]}s=="c"?f.backFormulaInput(e,v,t,[l,a],[t,t],o):f.backFormulaInput(e,t,v,[t,t],[l,a],o)}else s=="c"?f.backFormulaInput(e,a+1,t,[l,a],[t,t],o):f.backFormulaInput(e,t,a+1,[t,t],[l,a],o)}else return!0},autoSelectionFormula:function(e){let n=this,t=xe.deepCopyFlowData(h.flowdata),l=40,a=!0;p.execFunctionExist=[];let o=function(u,d,f,m,g,y){let v=n.getNoNullValue(u,d,g,"c");v==null?n.activeFormulaInput(d,m,null,null,y,!0):n.activeFormulaInput(d,m,[d,f],[v,g-1],y)},s=function(u,d,f,m,g,y){let v=n.getNoNullValue(u,m,f,"r");v==null?o(u,d,f,m,g,y):n.activeFormulaInput(d,m,[v,f-1],[m,g],y)};for(let u=0;u<h.luckysheet_select_save.length;u++){let d=h.luckysheet_select_save[u].row[0],f=h.luckysheet_select_save[u].row[1],m=h.luckysheet_select_save[u].column[0],g=h.luckysheet_select_save[u].column[1],y=h.luckysheet_select_save[u].row_focus,v=h.luckysheet_select_save[u].column_focus;if(d==f&&m==g){if(f-1<0&&g-1<0){n.activeFormulaInput(d,m,null,null,e,!0);return}f-1>=0&&n.checkNoNullValue(t[f-1][m])?s(t,d,f,m,g,e):g-1>=0&&n.checkNoNullValue(t[d][g-1])?o(t,d,f,m,g,e):s(t,d,f,m,g,e)}else if(d==f)a=n.singleFormulaInput(t,v,d,m,g,e,"r");else if(m==g)a=n.singleFormulaInput(t,y,m,d,f,e,"c");else{let b=!0;for(let w=d;w<=f;w++)b=n.singleFormulaInput(t,v,w,m,g,e,"r",!0,!1)&&b;let k=!0;for(let w=m;w<=g;w++)k=n.singleFormulaInput(t,y,w,d,f,e,"c",!0,!1)&&k;a=!!b&&!!k}a=a&&a}a||(p.execFunctionExist.reverse(),p.execFunctionGroup(null,null,null,null,t),Ze(t,h.luckysheet_select_save),clearTimeout(h.jfcountfuncTimeout),h.jfcountfuncTimeout=setTimeout(function(){wl()},500))},getStyleByCell:function(e,n,t){let l=this,a="",o=el.getComputeMap(),s=el.checksAF(n,t,o),u=$e.getComputeMap(),d=$e.checksCF(n,t,u),f=Q().fontarray,m=e[n][t],g=m.ct,y=!1;_l(m)&&(y=!0);for(let v in m){let b=l.checkstatus(e,n,t,v);(s!=null||d!=null&&d.cellColor!=null)&&(d!=null&&d.cellColor!=null?a+="background: "+d.cellColor+";":s!=null&&(a+="background: "+s[1]+";")),P(b)!="object"&&((v=="bg"||s!=null||d!=null&&d.cellColor!=null)&&(d!=null&&d.cellColor!=null?a+="background: "+d.cellColor+";":s!=null?a+="background: "+s[1]+";":a+="background: "+b+";"),v=="ht"&&b!="1"&&(b=="0"?a+="text-align: center;":b=="2"&&(a+="text-align: right;")),v=="vt"&&(b=="0"?a+="vertical-align: middle;":b=="1"?a+="vertical-align: top;":b=="2"&&(a+="vertical-align: bottom;")),v=="un"&&b&&(a+="text-decoration:underline;"))}return y||(a+=Ti(m,s,d)),a},fontSelectList:[],defualtFont:["Times New Roman","Arial","Tahoma","Verdana","\u5FAE\u8F6F\u96C5\u9ED1","\u5B8B\u4F53","\u9ED1\u4F53","\u6977\u4F53","\u4EFF\u5B8B","\u65B0\u5B8B\u4F53","\u534E\u6587\u65B0\u9B4F","\u534E\u6587\u884C\u6977","\u534E\u6587\u96B6\u4E66"],addFontTolist:function(e){e=e.replace(/"/g,"").replace(/'/g,"");let n=!0;for(let a=0;a<this.fontSelectList.length;a++)if(this.fontSelectList[a].value==e){n=!1;break}let l=Q().fontjson;if(e in l&&(n=!1),n){let a={};a.value=e,a.index=this.fontSelectList.length,a.type="userDefined",a.text="<span class='luckysheet-mousedown-cancel' style='font-size:11px;font-family:"+e+"'>"+e+"</span>",a.example="",this.fontSelectList.push(a);let o=$("#luckysheet-icon-font-family-menuButton"),s=this.createButtonMenu(this.fontSelectList);o.html(s)}},fontInitial:function(e){let n=[],t=Q().fontarray;for(let l=0;l<t.length;l++){let a=t[l],o={};o.value=a,o.index=l,o.type="inner",o.text="<span class='luckysheet-mousedown-cancel' style='font-size:11px;font-family:"+a+"'>"+a+"</span>",o.example="",n.push(o)}if(e!=null){for(let l=0;l<e.length;l++){let a=e[l],o={};if(o.value=a.fontName,o.index=l,o.type="userDefined",o.text="<span class='luckysheet-mousedown-cancel' style='font-size:11px;font-family:"+a.fontName+"'>"+a.fontName+"</span>",o.example="",n.push(o),document.fonts&&!document.fonts.check("12px "+a.fontName)&&a.url){let s=new FontFace(a.fontName,`url(${a.url})`);document.fonts.add(s),s.load()}}document.fonts&&document.fonts.ready.then(function(){})}this.fontSelectList=n}},ke=yb});function Xc(e,n){let t={};for(let l in e)t[l]=e[l];for(let l in n)n[l]!=null&&(t[l]=n[l]);return t}function _e(e,n){return e.replace(/\$\{([\w]+)\}/g,function(t,l){let a=n[l];return typeof a!="undefined"?a:t})}function P(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"}[Object.prototype.toString.call(e)]}function Yo(e){let n=new Date,t=n.getFullYear(),l=n.getMonth(),a=n.getDate(),o=n.getDay(),s=n.getHours(),u=n.getMinutes(),d=n.getSeconds();l=l+1,l<10&&(l="0"+l),a<10&&(a="0"+a),s<10&&(s="0"+s),u<10&&(u="0"+u),d<10&&(d="0"+d);let f="";return e==1?f=t+"-"+l+"-"+a:e==2&&(f=t+"-"+l+"-"+a+" "+s+":"+u+":"+d),f}function zn(e){let n;e.indexOf("rgba")>-1?n=e.replace("rgba(","").replace(")","").split(","):n=e.replace("rgb(","").replace(")","").split(",");let t=parseInt(n[0]),l=parseInt(n[1]),a=parseInt(n[2]);return"#"+((1<<24)+(t<<16)+(l<<8)+a).toString(16).slice(1)}function hl(e){if(e==null||e.length==0)return NaN;for(var n=e.toLowerCase().split(""),t=0,l=n.length,a=function(d){return d.charCodeAt()-96},o=0,s=0,u=0;u<l;u++)s=a(n[u]),o+=s*Math.pow(26,l-u-1);return o==0?NaN:o-1}function tt(e){for(var n="a".charCodeAt(0),t="z".charCodeAt(0),l=t-n+1,a="";e>=0;)a=String.fromCharCode(e%l+n)+a,e=Math.floor(e/l)-1;return a.toUpperCase()}function ya(e,n){if(n===0)return"";if(e==null)return 0;let t=0;for(let l=0;l<e.length;l++)if(e.charAt(l).match(/[^\x00-\xff]/ig)!=null?t+=2:t+=1,B(n)&&t===~~n)return e.substring(0,l);return t}function Kc(e){let n=[],t={};if(e.length>0)for(let l=0;l<e.length;l++){let a=e[l];t[a]||(n.push(a),t[a]=1)}return n}function oa(e){let n=Q().fontarray;if(P(e)=="object"){let t="";if(e.it=="0"||e.it==null?t+="normal ":t+="italic ",t+="normal ",e.bl=="0"||e.bl==null?t+="normal ":t+="bold ",e.fs?t+=Math.ceil(e.fs)+"pt ":t+=h.defaultFontSize+"pt ",!e.ff)t+=n[0]+', "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif';else{let l=null,a=Q().fontjson;On(e.ff).num?l=n[parseInt(e.ff)]:(l=e.ff,l=l.replace(/"/g,"").replace(/'/g,""),l.indexOf(" ")>-1&&(l='"'+l+'"'),l!=null&&document.fonts&&!document.fonts.check("12px "+l)&&ke.addFontTolist(l)),l==null&&(l=n[0]),t+=l+', "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif'}return t}else return Zn()}function sn(e,n,t){let l=$(window).height(),a=$(window).width(),o=e.width(),s=e.height(),u=t,d=n;n+o>a&&(d=n-o),t+s>l&&(u=t-s),u<0&&(u=0),e.css({top:u,left:d}).show()}function Mr(){h.fullscreenmode&&setTimeout(function(){document.getElementById("luckysheet-rich-text-editor").focus({preventScroll:!0}),$("#luckysheet-rich-text-editor").select()},50)}function rt(){document.getElementById(h.container).focus({preventScroll:!0})}function Il(e,n){if(e==null||isNaN(parseFloat(e))||In(e)||e==-Infinity||e==Infinity)return null;let t=6,l=!1;n==null||n=="auto"?e<1?t=6:t=1:tr(n)=="num"?(t=parseInt(n),l=!0):t=6;let a="",o=null;for(let s=0;s<t;s++)a+="0";return l||(a="["+a+"]"),e>=1e21?o=parseFloat((0,Wo.default)(e).value()):o=parseFloat((0,Wo.default)(e).format("0."+a)),o}function ic(e){if(e!=null&&!isNaN(parseFloat(e))&&!In(e)){let t=(0,Wo.default)(e).value().toString().split(".");return t.length==1?t=0:t=t[1].length,t}else return null}function ml(e,n,t,l){let a=$(window).height(),o=$(window).width(),s=e.width(),u=e.height(),d=t,f=n;l==null&&(l="lefttop"),l=="lefttop"?e.css({top:t,left:n}).show():l=="righttop"?e.css({top:t,left:n-s}).show():l=="leftbottom"?e.css({bottom:a-t-12,left:n}).show():l=="rightbottom"&&e.css({bottom:a-t-12,left:n-s}).show()}function We(e,n){n=n||document;var t=n.querySelectorAll(e);return t.length==1?Array.prototype.slice.call(t)[0]:Array.prototype.slice.call(t)}function Io(e,n,t){if(typeof e!="object")var e=[e];var l=document.getElementsByTagName("head")[0]||document.documentElement,a=[],o=e.length-1,s=function(u){if(a[u]=document.createElement("script"),a[u].setAttribute("type","text/javascript"),a[u].onload=a[u].onreadystatechange=function(){this.onload=this.onreadystatechange=null,this.parentNode.removeChild(this),u!==o?s(u+1):typeof t=="function"&&t()},a[u].setAttribute("src",e[u]),typeof n=="object")for(var d in n)a[u].setAttribute(d,n[d]);l.appendChild(a[u])};s(0)}function vb(e){var n=document,t=n.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("href",e);var l=n.getElementsByTagName("head");l.length?l[0].appendChild(t):n.documentElement.appendChild(t)}function Ro(e){typeof e!="object"&&(e=[e]),e.length&&e.forEach(n=>{vb(n)})}function sf(e){if(e==null||e.length==0)return null;let n=e.split(","),t="";for(let l=0;l<n.length;l++){let o=n[l].split("!"),s="",u="";o.length>1?(s=o[0],u=o[1]):u=o[0];let d=u.split(":"),f="";for(let m=0;m<d.length;m++){let g=d[m],y=g.replace(/[^0-9]/g,""),v=g.replace(/[^A-Za-z]/g,""),b="";v!=""&&(b+="$"+v),y!=""&&(b+="$"+y),f+=b+":"}f=f.substr(0,f.length-1),t+=s+f+","}return t.substr(0,t.length-1)}function fa(e,n=!0){let t=$("#"+e).find(".luckysheet-modal-dialog-content").css("min-width",300).end(),l=t.outerHeight(),a=t.outerWidth(),o=$(window).width(),s=$(window).height(),u=$(document).scrollLeft(),d=$(document).scrollTop();t.css({left:(o+u-a)/2,top:(s+d-l)/3}).show(),n&&$("#luckysheet-modal-dialog-mask").show()}function bb(e,n,t,l){e[n]=new Proxy(t,{set(a,o,s,u){return setTimeout(()=>{l(a,o,s,u)},0),Reflect.set(a,o,s,u)}})}function kb(e,n,t,l){Object.defineProperty(e,n,{enumerable:!0,configurable:!1,get(){return t},set(a){t!==a&&(console.log(`\u53D1\u73B0 ${n} \u5C5E\u6027 ${t} -> ${a}`),setTimeout(()=>{l(t,a)},0),t=a)}})}function Ao(e,n){e.some((t,l,a)=>{if(t===n)return a.splice(l,1),t===n})}function Rn(e){return e.replace(/([A-Z])/g,function(n,t){return"-"+t.toLowerCase()})}var Wo,Xo,dt=Ie(()=>{Gt();il();Or();Ft();Xe();bt();Wo=Fl(sa());Xo=(e,n,t)=>{if(!e.hasOwnProperty(n)){console.info("No %s in data",n);return}P(e)==="object"&&(P(e[n])==="object"||P(e[n])==="array"?bb(e,n,e[n],t):kb(e,n,e[n],t))}});function Zc(){h.cellMainSrollBarSize=0;let e=!1,n={},t=!1,l=null;$(document).on("touchstart","#luckysheet-grid-window-1",function(a){clearInterval(l),e=!0;let o=a.originalEvent.targetTouches[0];n={x:o.pageX,y:o.pageY,vy:0,moveType:"y"}}),$(document).on("touchmove","#luckysheet-grid-window-1",function(a){if(a.originalEvent.targetTouches.length>1||a.scale&&a.scale!==1)return;let o=a.originalEvent.targetTouches[0];if(e){let s=o.pageX-n.x,u=o.pageY-n.y;n.x=o.pageX,n.y=o.pageY;let d=$("#luckysheet-scrollbar-x").scrollLeft(),f=$("#luckysheet-scrollbar-y").scrollTop();d-=s,f-=u,d<0&&(d=0),f<0&&(f=0),$("#luckysheet-scrollbar-y").scrollTop(f),n.vy_y=u,n.scrollTop=f,$("#luckysheet-scrollbar-x").scrollLeft(d),n.vy_x=s,n.scrollLeft=d}else if(t){let s=nt(o.pageX,o.pageY),u=s[0]+$("#luckysheet-cell-main").scrollLeft(),d=s[1]+$("#luckysheet-cell-main").scrollTop(),f=_t(d),m=f[1],g=f[0],y=f[2],v=wt(u),b=v[1],k=v[0],w=v[2],x=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),C=0,S=0,_=[];x.top>g?(C=g,S=x.top+x.height-g,x.row[1]>x.row_focus&&(x.row[1]=x.row_focus),_=[y,x.row[1]]):x.top==g?(C=g,S=x.top+x.height-g,_=[y,x.row[0]]):(C=x.top,S=m-x.top-1,x.row[0]<x.row_focus&&(x.row[0]=x.row_focus),_=[x.row[0],y]);let T=0,A=0,R=[];x.left>k?(T=k,A=x.left+x.width-k,x.column[1]>x.column_focus&&(x.column[1]=x.column_focus),R=[w,x.column[1]]):x.left==k?(T=k,A=x.left+x.width-k,R=[w,x.column[0]]):(T=x.left,A=b-x.left-1,x.column[0]<x.column_focus&&(x.column[0]=x.column_focus),R=[x.column[0],w]);let I=ke.mergeMoveMain(R,_,x,C,S,T,A);I!=null&&(R=I[0],_=I[1],C=I[2],S=I[3],T=I[4],A=I[5]),x.row=_,x.column=R,x.left_move=T,x.width_move=A,x.top_move=C,x.height_move=S,h.luckysheet_select_save[h.luckysheet_select_save.length-1]=x,lt(),Y.scrollFreezen()}a.stopPropagation()}),$(document).on("touchend",function(a){if(e){let o=Math.abs(n.vy_x),s=((o>>31)*2+1)*.25,u=Math.abs(n.vy_y),d=((u>>31)*2+1)*.25;(o>0||u>0)&&(l=setInterval(function(){o-=s,u-=d,o<=0&&(o=0),u<=0&&(u=0),n.vy_y>0?n.scrollTop-=u:n.scrollTop+=u,$("#luckysheet-scrollbar-y").scrollTop(n.scrollTop),n.vy_x>0?n.scrollLeft-=o:n.scrollLeft+=o,$("#luckysheet-scrollbar-x").scrollLeft(n.scrollLeft),o<=0&&u<=0&&clearInterval(l)},20))}e=!1,t=!1}),$(document).on("touchstart",".luckysheet-cs-touchhandle",function(a){t=!0,e=!1,a.stopPropagation()}),document.addEventListener("touchmove",function(a){a.preventDefault()},{passive:!1})}var cm=Ie(()=>{Ol();Zt();il();Vl();Xe()});var wb,Jc,um=Ie(()=>{dt();Gt();Zt();ll();Jt();$r();Kt();Yt();Xe();bt();wb={createDialog:function(){let e=this,n=Q(),t=n.splitText,l=n.punctuation,a=n.button;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-splitColumn-dialog").remove();let o='<div class="box"><div class="boxTitle">'+t.splitDelimiters+'</div><div class="boxMain"><div style="height: 22px;line-height: 22px;"><input id="splitColumn_type_01" type="checkbox"/><label for="splitColumn_type_01">'+l.tab+'</label></div><div style="height: 22px;line-height: 22px;"><input id="splitColumn_type_02" type="checkbox"/><label for="splitColumn_type_02">'+l.semicolon+'</label></div><div style="height: 22px;line-height: 22px;"><input id="splitColumn_type_03" type="checkbox"/><label for="splitColumn_type_03">'+l.comma+'</label></div><div style="height: 22px;line-height: 22px;"><input id="splitColumn_type_04" type="checkbox"/><label for="splitColumn_type_04">'+l.space+'</label></div><div style="height: 22px;line-height: 22px;"><input id="splitColumn_type_05" type="checkbox"/><label for="splitColumn_type_05">'+t.splitOther+'</label><input type="text" class="formulaInputFocus" maxlength="1"/></div></div><div style="height: 22px;line-height: 22px;"><input id="splitColumn_type_06" type="checkbox"/><label for="splitColumn_type_06">'+t.splitContinueSymbol+'</label></div><div class="boxTitle" style="margin-top: 10px;">'+t.splitDataPreview+'</div><div class="boxMain" id="splitColumnData"></div></div>';$("body").append(_e(ft,{id:"luckysheet-splitColumn-dialog",addclass:"luckysheet-splitColumn-dialog",title:t.splitTextTitle,content:o,botton:'<button id="luckysheet-splitColumn-dialog-confirm" class="btn btn-primary">'+a.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+a.cancel+"</button>",style:"z-index:100003"}));let s=$("#luckysheet-splitColumn-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),u=s.outerHeight(),d=s.outerWidth(),f=$(window).width(),m=$(window).height(),g=$(document).scrollLeft(),y=$(document).scrollTop();$("#luckysheet-splitColumn-dialog").css({left:(f+g-d)/2,top:(m+y-u)/3}).show();let v=e.getDataArr();e.dataPreview(v)},init:function(){let e=this,t=Q().splitText;$(document).off("change.SPCinpcheckbox").on("change.SPCcheckbox","#luckysheet-splitColumn-dialog .box input[type='checkbox']",function(){let l=e.getRegStr(),a=e.getDataArr(l);e.dataPreview(a)}),$(document).off("keyup.SPCinptext").on("keyup.SPCinptext","#luckysheet-splitColumn-dialog .box input[type='text']",function(){if($(this).siblings("input[type='checkbox']").is(":checked")){let l=e.getRegStr(),a=e.getDataArr(l);e.dataPreview(a)}}),$(document).off("click.SPCconfirm").on("click.SPCconfirm","#luckysheet-splitColumn-dialog #luckysheet-splitColumn-dialog-confirm",function(){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-splitColumn-dialog").hide();let l=e.getRegStr(),a=e.getDataArr(l),o=h.luckysheet_select_save[0].row[0],s=h.luckysheet_select_save[0].column[0];if(a[0].length==1)return;let u=!1;for(let d=0;d<a.length;d++)for(let f=1;f<a[0].length;f++){let m=h.flowdata[o+d][s+f];if(m!=null&&m.v!=null){u=!0;break}}if(u){let d=function(){e.update(o,s,a)};U.confirm("",t.splitConfirmToExe,d)}else e.update(o,s,a)})},update:function(e,n,t){let l=xe.deepCopyFlowData(h.flowdata);for(let u=0;u<t.length;u++)for(let d=0;d<t[0].length;d++){let f=t[u][d];Ht(e+u,n+d,l,f)}let a=h.luckysheet_select_save[0].row[0],o=h.luckysheet_select_save[0].column[0],s=[{row:[a,a+t.length-1],column:[o,o+t[0].length-1]}];Ze(l,s),lt()},dataPreview:function(e){$("#luckysheet-splitColumn-dialog #splitColumnData").empty();let n="";for(let l=0;l<e.length;l++){let a="";for(let o=0;o<e[0].length;o++)a+="<td>"+e[l][o]+"</td>";n+="<tr>"+a+"</tr>"}let t="<table>"+n+"</table>";$("#luckysheet-splitColumn-dialog #splitColumnData").append(t)},getRegStr:function(){let e="",n=0;return $("#luckysheet-splitColumn-dialog .box input[type='checkbox']:checked").each(function(t,l){let a=$(l).attr("id");if(a=="splitColumn_type_01")e+="\\t",n++;else if(a=="splitColumn_type_02")n>0&&(e+="|"),e+=";",n++;else if(a=="splitColumn_type_03")n>0&&(e+="|"),e+=",",n++;else if(a=="splitColumn_type_04")n>0&&(e+="|"),e+="\\s",n++;else if(a=="splitColumn_type_05"){let o=$(l).siblings("input[type='text']").val().trim();o!=""&&(n>0&&(e+="|"),e+=o)}else a=="splitColumn_type_06"&&(e="["+e+"]+")}),e},getDataArr:function(e){let n=this,t=[],l=h.luckysheet_select_save[0].row[0],a=h.luckysheet_select_save[0].row[1],o=h.luckysheet_select_save[0].column[0];if(e!=null&&e!=""){let s=new RegExp(e,"g"),u=[];for(let m=l;m<=a;m++){let g=[],y=h.flowdata[m][o],v;y!=null&&y.m!=null?v=y.m:v=ze(m,o,h.flowdata),v==null&&(v=""),g=v.toString().split(s),u.push(g)}let d=u.length,f=0;for(let m=0;m<d;m++)u[m].length>f&&(f=u[m].length);t=n.getNullData(d,f);for(let m=0;m<t.length;m++)for(let g=0;g<t[0].length;g++)u[m][g]!=null&&(t[m][g]=u[m][g])}else for(let s=l;s<=a;s++){let u=[],d=h.flowdata[s][o],f;d!=null&&d.m!=null?f=d.m:f=ze(s,o,h.flowdata),f==null&&(f=""),u.push(f),t.push(u)}return t},getNullData:function(e,n){let t=[];for(let l=0;l<e;l++){let a=[];for(let o=0;o<n;o++)a.push("");t.push(a)}return t}},Jc=wb});function xb(){let n=Q().cellFormat;$("#luckysheet-cellFormat-confirm").click(function(){let t=$("#luckysheet-protection-check-locked").is(":checked"),l=$("#luckysheet-protection-check-hidden").is(":checked");t=t==!0?1:0,l=l==!0?1:0;let a=dm(function(o,s,u,d){o==null?Ht(s,u,d,{lo:t,hi:l}):(o.lo=t,o.hi=l)},function(){alert(n.sheetDataIsNullAlert)});Ze(a,void 0,void 0,!1),$("#luckysheet-cellFormat-config").hide(),$("#luckysheet-modal-dialog-mask").hide()})}function dm(e,n){if(h.luckysheet_select_save!=null&&h.luckysheet_select_save.length>0){let t=ve.getSheetByIndex(),l=t.data;if(l!=null)for(let a=0;a<h.luckysheet_select_save.length;a++){let o=h.luckysheet_select_save[a],s=o.row,u=o.column;for(let d=s[0];d<=s[1];d++)for(let f=u[0];f<=u[1];f++){let m,g=ke.mergeborer(l,d,f);if(g){let y=g.row[2],v=g.column[2];m=l[y][v]}else m=l[d][f];e(m,d,f,l)}}else n();return l}}function _b(){if(hm)return;hm=!0;let e=Q(),n=e.cellFormat,t=e.button;$("body").append(_e(ft,{id:"luckysheet-cellFormat-config",addclass:"luckysheet-cellFormat-config",title:n.cellFormatTitle,content:` |
| | | </div>`;break}$e.conditionformatDialog(F,z)}}),$(document).off("click.CFdataBar").on("click.CFdataBar","#luckysheet-icon-dataBar-menuButton .luckysheet-cols-menuitem",function(){l.hide(),$("#luckysheet-icon-dataBar-menuButton").hide(),rt();let A=$(this),R=A.attr("itemvalue");if(h.luckysheet_select_save.length>0){let I=$.extend(!0,[],h.luckysheet_select_save),F=$e.dataBarList[R].format;$e.updateItem("dataBar",I,F)}}),$(document).off("click.CFcolorGradation").on("click.CFcolorGradation","#luckysheet-icon-colorGradation-menuButton .luckysheet-cols-menuitem",function(){l.hide(),$("#luckysheet-icon-colorGradation-menuButton").hide(),rt();let A=$(this),R=A.attr("itemvalue");if(h.luckysheet_select_save.length>0){let I=$.extend(!0,[],h.luckysheet_select_save),F=$e.colorGradationList[R].format;$e.updateItem("colorGradation",I,F)}}),$(document).off("click.CFdeleteRule").on("click.CFdeleteRule","#luckysheet-icon-deleteRule-menuButton .luckysheet-cols-menuitem",function(){l.hide(),$("#luckysheet-icon-deleteRule-menuButton").hide(),rt(),$(this).attr("itemvalue")=="delSheet"&&$e.updateItem("delSheet")})}let o=$(this).outerWidth(),s=l.outerWidth(),u=$(this).offset().left;s>o&&s+u>$("#"+h.container).width()&&(u=u-s+o),ml(l,u,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-postil").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t),a=Q().comment;l.remove(),He.removeActivePs();let o=h.luckysheet_select_save[h.luckysheet_select_save.length-1],s=o.row_focus;s==null&&(s=o.row[0]);let u=o.column_focus;u==null&&(u=o.column[0]);let f;h.flowdata[s][u]!=null&&h.flowdata[s][u].ps!=null?f=[{text:a.edit,value:"editPs",example:""},{text:a.delete,value:"delPs",example:""},{text:"",value:"split",example:""},{text:a.showOne,value:"showHidePs",example:""},{text:a.showAll,value:"showHideAllPs",example:""}]:f=[{text:a.insert,value:"newPs",example:""},{text:"",value:"split",example:""},{text:a.showAll,value:"showHideAllPs",example:""}];let d=e.createButtonMenu(f),m=_e(e.menu,{id:"postil",item:d,subclass:"",sub:""});$("body").append(m),l=$("#"+t).width(150),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let b=$(this),k=b.attr("itemvalue");k=="newPs"?He.newPs(s,u):k=="editPs"?He.editPs(s,u):k=="delPs"?He.delPs(s,u):k=="showHidePs"?He.showHidePs(s,u):k=="showHideAllPs"&&He.showHideAllPs()});let g=$(this).outerWidth(),y=l.outerWidth(),v=$(this).offset().left;y>g&&y+v>$("#"+h.container).width()&&(v=v-y+g),ml(l,v,$(this).offset().top+25,"lefttop")}),$("#luckysheet-icon-protection").click(function(){let t=ve.getSheetByIndex();id(t)}),$("#luckysheet-icon-print").click(function(){let t=$(this).attr("id")+"-menuButton",l=$("#"+t),o=Q().print;if(l.length==0){let d=[{text:o.menuItemPrint,value:"print",example:'<i class="iconfont luckysheet-iconfont-dayin" aria-hidden="true"></i>'},{text:"",value:"split",example:""},{text:o.menuItemAreas,value:"areas",example:'<i class="iconfont luckysheet-iconfont-tihuan" aria-hidden="true"></i>'},{text:o.menuItemRows,value:"rows",example:'<i class="iconfont luckysheet-iconfont-zhuandao1" aria-hidden="true"></i>'},{text:o.menuItemColumns,value:"columns",example:'<i class="iconfont luckysheet-iconfont-dingwei" aria-hidden="true"></i>'}],m=e.createButtonMenu(d),g=_e(e.menu,{id:"print",item:m,subclass:"",sub:""});$("body").append(g),l=$("#"+t).width(180),l.find(".luckysheet-cols-menuitem").click(function(){l.hide(),rt();let y=$(this),v=y.attr("itemvalue");v=="print"?alert("print"):(v=="areas"||v=="rows"||v=="columns")&&alert("areas")})}let s=$(this).outerWidth(),u=l.outerWidth(),f=$(this).offset().left;u>s&&u+f>$("#"+h.container).width()&&(f=f-u+s),ml(l,f,$(this).offset().top+25,"lefttop")}),$("body").on("mouseover mouseleave",".luckysheet-menuButton .luckysheet-cols-submenu",function(t){let l=$(this),a=l.attr("itemvalue"),o=$("#luckysheet-icon-"+a+"-menuButton");if(t.type==="mouseover"){let s=l.parent(),u=$(window).width(),f=$(window).height(),d=s.width(),m=o.height()+25,g=o.width()+5,y=l.offset(),v=y.top,b=y.left+d;b+g>u&&(b=y.left-g),v+m>f&&(v=f-m),o.css({top:v,left:b}).show(),e.rightclickmenu=l}else clearTimeout(e.submenuhide[o.attr("id")]),e.submenuhide[o.attr("id")]=setTimeout(function(){o.hide()},200)}).on("mouseover mouseleave",".luckysheet-menuButton-sub",function(t){t.type==="mouseover"?(e.rightclickmenu.addClass("luckysheet-cols-menuitem-hover"),clearTimeout(e.submenuhide[$(this).attr("id")])):(e.rightclickmenu.removeClass("luckysheet-cols-menuitem-hover"),$(this).hide())})},getQKBorder:function(e,n,t){let l="";e.indexOf("pt")>-1?(e=parseFloat(e),e<1||(e<1.5?l="Medium":l="Thick")):(e=parseFloat(e),e<2||(e<3?l="Medium":l="Thick"));let a=0;return n=n.toLowerCase(),n=="double"?a=2:n=="dotted"?l=="Medium"||l=="Thick"?a=3:a=10:n=="dashed"?l=="Medium"||l=="Thick"?a=4:a=9:n=="solid"&&(l=="Medium"?a=8:l=="Thick"?a=13:a=1),[a,t]},updateFormatCell:function(e,n,t,l,a,o,s){if(!(e==null||n==null))if(n=="ct"){for(let u=l;u<=a;u++)if(!(h.config.rowhidden!=null&&h.config.rowhidden[u]!=null))for(let f=o;f<=s;f++){let d=e[u][f],m=null;P(d)=="object"?m=e[u][f].v:m=e[u][f],t!="@"&&B(m)&&(m=parseFloat(m));let g=mt(t,m),y="n";Wf(t)||t===14||t===15||t===16||t===17||t===18||t===19||t===20||t===21||t===22||t===45||t===46||t===47?y="d":t=="@"||t===49?y="s":(t=="General"||t===0)&&(y=B(m)?"n":"g"),P(d)=="object"?(e[u][f].m=g,e[u][f].ct==null&&(e[u][f].ct={}),e[u][f].ct.fa=t,e[u][f].ct.t=y):e[u][f]={ct:{fa:t,t:y},v:m,m:g}}}else{n=="ht"?t=="left"?t="1":t=="center"?t="0":t=="right"&&(t="2"):n=="vt"?t=="top"?t="1":t=="middle"?t="0":t=="bottom"&&(t="2"):n=="tb"?t=="overflow"?t="1":t=="clip"?t="0":t=="wrap"&&(t="2"):n=="tr"&&(t=="none"?t="0":t=="angleup"?t="1":t=="angledown"?t="2":t=="vertical"?t="3":t=="rotation-up"?t="4":t=="rotation-down"&&(t="5"));for(let u=l;u<=a;u++)if(!(h.config.rowhidden!=null&&h.config.rowhidden[u]!=null))for(let f=o;f<=s;f++){let d=e[u][f];P(d)=="object"?(Pf(d,n,t),e[u][f][n]=t):(e[u][f]={v:d},e[u][f][n]=t)}}},updateFormat:function(e,n,t){let l=this;if(!Rr(h.currentSheetIndex))return;if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}let o=document.createElement("canvas").getContext("2d");if(n in Mf&&parseInt($("#luckysheet-input-box").css("top"))>0&&$("#luckysheet-input-box").text().substr(0,1)!="="){let d=e[h.luckysheetCellUpdate[0]][h.luckysheetCellUpdate[1]];Ef(d,n,t,p.rangeResizeTo)}let s=$.extend(!0,{},h.config);s.rowlen==null&&(s.rowlen={});for(let f=0;f<h.luckysheet_select_save.length;f++){let d=h.luckysheet_select_save[f].row[0],m=h.luckysheet_select_save[f].row[1],g=h.luckysheet_select_save[f].column[0],y=h.luckysheet_select_save[f].column[1];this.updateFormatCell(e,n,t,d,m,g,y),(n=="tb"||n=="tr"||n=="fs")&&(s=yl(e,d,m,s))}let u={};(n=="tb"||n=="tr"||n=="fs")&&(u={cfg:s,RowlChange:!0}),Ze(e,h.luckysheet_select_save,u,!1)},updateFormat_mc:function(e,n){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}let t=$.extend(!0,{},h.config);if(t.merge==null&&(t.merge={}),!!jr(h.currentSheetIndex)){if(n=="mergeCancel")for(let l=0;l<h.luckysheet_select_save.length;l++){let a=h.luckysheet_select_save[l],o=a.row[0],s=a.row[1],u=a.column[0],f=a.column[1];if(o==s&&u==f)continue;let d={};for(let m=o;m<=s;m++)for(let g=u;g<=f;g++){let y=e[m][g];if(y!=null&&y.mc!=null){let v=y.mc.r,b=y.mc.c;if("rs"in y.mc)delete y.mc,delete t.merge[v+"_"+b],d[v+"_"+b]=$.extend(!0,{},y);else{let k=JSON.parse(JSON.stringify(d[v+"_"+b]));delete k.v,delete k.m,delete k.ct,delete k.f,delete k.spl,e[m][g]=k}}}}else{let l=!1;for(let a=0;a<h.luckysheet_select_save.length;a++){let o=h.luckysheet_select_save[a],s=o.row[0],u=o.row[1],f=o.column[0],d=o.column[1];for(let m=s;m<=u;m++)for(let g=f;g<=d;g++){let y=e[m][g];if(P(y)=="object"&&"mc"in y){l=!0;break}}}if(l)for(let a=0;a<h.luckysheet_select_save.length;a++){let o=h.luckysheet_select_save[a],s=o.row[0],u=o.row[1],f=o.column[0],d=o.column[1];if(s==u&&f==d)continue;let m={};for(let g=s;g<=u;g++)for(let y=f;y<=d;y++){let v=e[g][y];if(v!=null&&v.mc!=null){let b=v.mc.r,k=v.mc.c;if("rs"in v.mc)delete v.mc,delete t.merge[b+"_"+k],m[b+"_"+k]=$.extend(!0,{},v);else{let w=JSON.parse(JSON.stringify(m[b+"_"+k]));delete w.v,delete w.m,delete w.ct,delete w.f,delete w.spl,e[g][y]=w}}}}else for(let a=0;a<h.luckysheet_select_save.length;a++){let o=h.luckysheet_select_save[a],s=o.row[0],u=o.row[1],f=o.column[0],d=o.column[1];if(!(s==u&&f==d)){if(n=="mergeAll"){let m={},g=!1;for(let y=s;y<=u;y++)for(let v=f;v<=d;v++){let b=e[y][v];b!=null&&(Na(b.ct)||!me(b.v)||b.f!=null)&&!g&&(m=$.extend(!0,{},b),g=!0),e[y][v]={mc:{r:s,c:f}}}e[s][f]=m,e[s][f].mc={r:s,c:f,rs:u-s+1,cs:d-f+1},t.merge[s+"_"+f]={r:s,c:f,rs:u-s+1,cs:d-f+1}}else if(n=="mergeV")for(let m=f;m<=d;m++){let g={},y=!1;for(let v=s;v<=u;v++){let b=e[v][m];b!=null&&(!me(b.v)||b.f!=null)&&!y&&(g=$.extend(!0,{},b),y=!0),e[v][m]={mc:{r:s,c:m}}}e[s][m]=g,e[s][m].mc={r:s,c:m,rs:u-s+1,cs:1},t.merge[s+"_"+m]={r:s,c:m,rs:u-s+1,cs:1}}else if(n=="mergeH")for(let m=s;m<=u;m++){let g={},y=!1;for(let v=f;v<=d;v++){let b=e[m][v];b!=null&&(!me(b.v)||b.f!=null)&&!y&&(g=$.extend(!0,{},b),y=!0),e[m][v]={mc:{r:m,c:f}}}e[m][f]=g,e[m][f].mc={r:m,c:f,rs:1,cs:d-f+1},t.merge[m+"_"+f]={r:m,c:f,rs:1,cs:d-f+1}}}}}h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"mergeChange",sheetIndex:h.currentSheetIndex,data:h.flowdata,curData:e,range:$.extend(!0,[],h.luckysheet_select_save),config:$.extend(!0,{},h.config),curConfig:t})),h.clearjfundo=!1,Ze(e,h.luckysheet_select_save,{cfg:t}),h.clearjfundo=!0}},borderfix:function(e,n,t){let l=e[n][t],a=null;return l==null?[-1,0,0,-1]:e[n][t].bg==null||e[n][t].bg==""?[-1,0,0,-1]:[-2,-1,1,0]},changeMenuButtonDom:function(e,n,t){let l=this;t==null&&(t=Q());let a=t.fontarray,o=t.fontjson;if(e=="bl")n!="0"?$("#luckysheet-icon-bold").addClass("luckysheet-toolbar-button-hover"):$("#luckysheet-icon-bold").removeClass("luckysheet-toolbar-button-hover");else if(e=="it")n!="0"?$("#luckysheet-icon-italic").addClass("luckysheet-toolbar-button-hover"):$("#luckysheet-icon-italic").removeClass("luckysheet-toolbar-button-hover");else if(e=="cl")n!="0"?$("#luckysheet-icon-strikethrough").addClass("luckysheet-toolbar-button-hover"):$("#luckysheet-icon-strikethrough").removeClass("luckysheet-toolbar-button-hover");else if(e=="un")n!="0"?$("#luckysheet-icon-underline").addClass("luckysheet-toolbar-button-hover"):$("#luckysheet-icon-underline").removeClass("luckysheet-toolbar-button-hover");else if(e=="ff"){let s="luckysheet-icon-font-family-menuButton",u=$("#"+s),f=a[0],d=0;n!=null&&(On(n).num?(d=parseInt(n),f=a[d],f==null&&(d=l.defualtFont[d],f=d,d!=null&&l.addFontTolist(d))):(n=n.replace(/"/g,"").replace(/'/g,""),d=n,f=n,l.addFontTolist(d))),l.focus(u,d),$("#luckysheet-icon-font-family").find(".luckysheet-toolbar-menu-button-caption").html(" "+f+" ")}else if(e=="fs"){let s=$("#luckysheet-icon-font-size-menuButton"),u=n,f=$("#luckysheet-icon-font-size input");l.focus(s,u),$("#luckysheet-icon-font-size").attr("itemvalue",u),f.val(u)}else if(e=="ht"){let s=$("#luckysheet-icon-align-menu-menuButton"),u=$("luckysheet-icon-align"),f="left";n=="0"?f="center":n=="2"&&(f="right"),l.focus(s,f);let d=Jr.align;$("#luckysheet-icon-align").attr("type",f).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-align-"+f+d[f]),s.hide()}else if(e=="vt"){let s=$("#luckysheet-icon-valign-menu-menuButton"),u=$("luckysheet-icon-valign"),f="bottom";n=="1"?f="top":n=="0"&&(f="middle"),l.focus(s,f);let d=Jr.align;$("#luckysheet-icon-valign").attr("type",f).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-valign-"+f+d[f]),s.hide()}else if(e=="tb"){let s=$("#luckysheet-icon-textwrap-menu-menuButton"),u=$("luckysheet-icon-textwrap"),f="clip";n=="1"?f="overflow":n=="2"&&(f="wrap"),l.focus(s,f);let d=Jr.textWrap;$("#luckysheet-icon-textwrap").attr("type",f).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-textwrap-"+f+d[f]),s.hide()}else if(e=="tr"){let s=$("#luckysheet-icon-rotation-menu-menuButton"),u=$("luckysheet-icon-rotation"),f="none";n=="1"?f="angleup":n=="2"?f="angledown":n=="3"?f="vertical":n=="4"?f="rotation-up":n=="5"&&(f="rotation-down"),l.focus(s,f);let d=Jr.rotation;$("#luckysheet-icon-rotation").attr("type",f).find(".luckysheet-icon-img-container").removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-"+f+d[f]),s.hide()}else if(e=="ct"){let s=$("#luckysheet-icon-fmt-other"),f=Q().defaultFmt;if(!n){s.find(".luckysheet-toolbar-menu-button-caption").html(" "+f[0].text+" ");return}let{fa:d}=n,m=f.find(g=>g.value===d);if(m)s.find(".luckysheet-toolbar-menu-button-caption").html(" "+m.text+" ");else{let g=f.find(y=>y.value==="fmtOtherSelf");s.find(".luckysheet-toolbar-menu-button-caption").html(" "+g.text+" ")}}},inputMenuButtonFocus:function(e){var n=window.getSelection(),t=n.getRangeAt(0);let l=t.startContainer;h.inlineStringEditRange=null;let a=Q();if(l.parentNode.tagName=="SPAN"){let o=l.parentNode.style.cssText,s=Os(o);for(let u in s)this.changeMenuButtonDom(u,s[u],a)}},menuButtonFocus:function(e,n,t){let l=this,a=["bl","it","cl","ff","ht","vt","fs","tb","tr","ct","un"],o=Q();for(let s=0;s<a.length;s++){let u=a[s],f=l.checkstatus(e,n,t,u);this.changeMenuButtonDom(u,f,o)}},checkstatus:function(e,n,t,l){if(e==null||e[n]==null)return console.warn("It's incorrect data",n,t),null;let a=e[n][t];return Tr(a,l)},setLineDash:function(e,n,t,l,a,o,s){n={"0":"none","1":"Thin","2":"Hair","3":"Dotted","4":"Dashed","5":"DashDot","6":"DashDotDot","7":"Double","8":"Medium","9":"MediumDashed","10":"MediumDashDot","11":"MediumDashDotDot","12":"SlantedDashDot","13":"Thick"}[n.toString()];try{n=="Hair"?e.setLineDash([1,2]):n.indexOf("DashDotDot")>-1?e.setLineDash([2,2,5,2,2]):n.indexOf("DashDot")>-1?e.setLineDash([2,5,2]):n.indexOf("Dotted")>-1?e.setLineDash([2]):n.indexOf("Dashed")>-1?e.setLineDash([3]):e.setLineDash([0])}catch(f){console.log(f)}e.beginPath(),n.indexOf("Medium")>-1?(t=="h"?(e.moveTo(l,a-.5),e.lineTo(o,s-.5)):(e.moveTo(l-.5,a),e.lineTo(o-.5,s)),e.lineWidth=2):n=="Thick"?(e.moveTo(l,a),e.lineTo(o,s),e.lineWidth=3):(e.moveTo(l,a),e.lineTo(o,s),e.lineWidth=1)},moveMergeData:function(e,n,t){if(me(e))return e;let l=[],a=[],o=!1;for(let s=0;s<e.length;s++)for(let u=0;u<e[0].length;u++){let f=e[s][u];P(f)=="object"&&"mc"in f&&(f.mc.rs!=null&&(l.push({rs:f.mc.rs,cs:f.mc.cs,r:f.mc.r,c:f.mc.c}),a.push({rs:f.mc.rs,cs:f.mc.cs,r:f.mc.r+n,c:f.mc.c+t}),o=!0),e[s][u].mc.r+=n,e[s][u].mc.c+=t)}return{deleMC:l,insertMC:a,hasMC:o}},getRangeInMerge:function(e,n,t,l,a){let o=this,s=[],u=null;if(a!=null?u=$.extend(!0,{},o.getSheetConfig()):u=$.extend(!0,{},h.config),u!=null&&u.merge!=null)for(let f in u.merge){let d=u.merge[f];!(e+n-1<d.r||e>d.r+d.rs-1)&&!(t+l-1<d.c||t>d.c+d.cs-1)&&s.push(d)}return s},mergeborer:function(e,n,t){if(e==null||e[n]==null)return console.warn("Merge info is null",n,t),null;let l=e[n][t];if(P(l)=="object"&&"mc"in l){let a=l.mc;if(a==null)return console.warn("Merge info is null",n,t),null;if(t=a.c,n=a.r,e[n][t]==null)return console.warn("Main merge Cell info is null",n,t),null;let o=e[n][t].mc.cs,s=e[n][t].mc.rs,u=e[n][t].mc,f,d,m,g;for(let w=n;w<u.rs+n;w++)w==0?f=-1:f=h.visibledatarow[w-1]-1,d=h.visibledatarow[w],g==null?(g=f,m=d):m+=d-f-1;let y,v,b,k;for(let w=t;w<u.cs+t;w++)w==0?y=0:y=h.visibledatacolumn[w-1],v=h.visibledatacolumn[w],k==null?(k=y,b=v):b+=v-y;return{row:[g,m,n,n+s-1],column:[k,b,t,t+o-1]}}else return null},mergeMoveData:{},mergeMoveMain:function(e,n,t,l,a,o,s){let u=this,f=ve.getSheetMerge();if(f==null)return;let d=[];for(let g in f)d.push(g);n[0]>n[1]&&(n[1]=n[0]),e[0]>e[1]&&(e[1]=e[0]);let m=!0;for(u.mergeMoveData={};m;){m=!1;for(let g=0;g<d.length;g++){let y=d[g],v=f[y];if(y in u.mergeMoveData)continue;let b=u.mergeMove(v,e,n,t,l,a,o,s);b!=null?(u.mergeMoveData[y]=v,e=b[0],n=b[1],l=b[2],a=b[3],o=b[4],s=b[5],m=!0):delete u.mergeMoveData[y]}}return[e,n,l,a,o,s]},mergeMove:function(e,n,t,l,a,o,s,u){let f=this,d=e.r,m=e.r+e.rs-1,g=e.c,y=e.c+e.cs-1,v=!1;if(n[1]<n[0]&&(n[0]=n[1]),t[1]<t[0]&&(t[0]=t[1]),n[0]<=g&&n[1]>=y&&t[0]<=d&&t[1]>=m||!(n[1]<g||n[0]>y)&&!(t[1]<d||t[0]>m)){let b=f.mergeborer(h.flowdata,e.r,e.c);if(b){let k=b.row[1],w=b.row[0],x=b.row[2],C=b.column[1],S=b.column[0],_=b.column[2];n[1]<g||n[0]>y||(t[0]<=m&&t[0]>=d&&(o+=a-w,a=w,t[0]=d),t[1]>=d&&t[1]<=m&&(l.row_focus>=d&&l.row_focus<=m,o=k-a,t[1]=m)),t[1]<d||t[0]>m||(n[0]<=y&&n[0]>=g&&(u+=s-S,s=S,n[0]=g),n[1]>=g&&n[1]<=y&&(l.column_focus>=g&&l.column_focus<=y,u=C-s,n[1]=y)),v=!0}}return v?[n,t,a,o,s,u]:null},getCellRealSize:function(e,n,t){let l=this,a=h.defaultcollen,o=h.defaultrowlen,s=e[n][t];if(!!s&&s.mc!=null){let u=s.mc,f=l.mergeborer(e,u.r,u.c);if(f){let d=f.row[1],m=f.row[0],g=f.row[2],y=f.row[3],v=f.column[1],b=f.column[0],k=f.column[2],w=f.column[3];a=v-b-1,o=d-m-1}}else{let u=Et()[Z(h.currentSheetIndex)].config;u.columnlen!=null&&u.columnlen[t]!=null&&(a=u.columnlen[t]),u.rowlen!=null&&u.rowlen[n]!=null&&(o=u.rowlen[n])}return[a,o]},getTextHeightCache:{},getTextSize:function(e,n){let t=Q().fontarray,l=n||"10pt "+t[0],a=this;if(l in a.getTextHeightCache)return a.getTextHeightCache[l];$("#luckysheetTextSizeTest").length==0&&$('<span id="luckysheetTextSizeTest" style="float:left;white-space:nowrap;visibility:hidden;margin:0;padding:0;">'+e+"</span>").appendTo($("body"));let o=$("#luckysheetTextSizeTest").text(e).css({font:l}),s=o.innerWidth(),u=o.innerHeight();return a.getTextHeightCache[l]=[s,u],[s,u]},activeFormulaInput:function(e,n,t,l,a,o){let s=this;if(o==null&&(o=!1),Rl(e,n,h.flowdata,!0),o){let y='<span dir="auto" class="luckysheet-formula-text-color">=</span><span dir="auto" class="luckysheet-formula-text-color">'+a.toUpperCase()+'</span><span dir="auto" class="luckysheet-formula-text-color">(</span><span dir="auto" class="luckysheet-formula-text-color">)</span>';$("#luckysheet-rich-text-editor").html(y);let v=window.getSelection(),b=$("#luckysheet-rich-text-editor").find("span");p.setCaretPosition(b.get(b.length-2),0,1);return}let u=tl(t[0])[0],f=tl(t[1])[1],d=At(l[0])[0],m=At(l[1])[1],g='<span dir="auto" class="luckysheet-formula-text-color">=</span><span dir="auto" class="luckysheet-formula-text-color">'+a.toUpperCase()+'</span><span dir="auto" class="luckysheet-formula-text-color">(</span><span class="luckysheet-formula-functionrange-cell" rangeindex="0" dir="auto" style="color:'+Yl[0]+';">'+xt(h.currentSheetIndex,{row:t,column:l},h.currentSheetIndex)+'</span><span dir="auto" class="luckysheet-formula-text-color">)</span>';$("#luckysheet-rich-text-editor").html(g),p.israngeseleciton(),p.rangestart=!0,p.rangedrag_column_start=!1,p.rangedrag_row_start=!1,p.rangechangeindex=0,p.rangeSetValue({row:t,column:l}),p.func_selectedrange={left:d,width:m-d-1,top:u,height:f-u-1,left_move:d,width_move:m-d-1,top_move:u,height_move:f-u-1,row:[e,e],column:[n,n]},$("#luckysheet-formula-functionrange-select").css({left:d,width:m-d-1,top:u,height:f-u-1}).show(),$("#luckysheet-formula-help-c").hide()},backFormulaInput:function(e,n,t,l,a,o){let s=this,u="="+o.toUpperCase()+"("+xt(h.currentSheetIndex,{row:l,column:a},h.currentSheetIndex)+")",f=p.execfunction(u,n,t),d={v:f[1],f:f[2]};Ht(n,t,e,d),p.execFunctionExist.push({r:n,c:t,i:h.currentSheetIndex}),ne.historyParam(e,h.currentSheetIndex,{row:[n,n],column:[t,t]})},checkNoNullValue:function(e){let n=e;return P(n)=="object"&&(n=n.v),!!(!me(n)&&On(n).num&&(e.ct==null||e.ct.t==null||e.ct.t=="n"||e.ct.t=="g"))},checkNoNullValueAll:function(e){let n=e;return P(n)=="object"&&(n=n.v),!me(n)},getNoNullValue:function(e,n,t,l){let a=this,o=0,s=null,u=0,f=0;for(let d=t-1;d>=0;d--){let m;if(l=="c"?m=e[n][d]:m=e[d][n],a.checkNoNullValue(m))o++,s=d;else if(m==null||m.v==null||m.v==""){if(u++,u>=40)if(f<=0)f=1;else break}else break}return s},singleFormulaInput:function(e,n,t,l,a,o,s,u,f){let d=this;s==null&&(s="r"),u==null&&(u=!0),f==null&&(f=!0);let m=!0,g=!1;for(let y=l;y<=a;y++){let v=null;s=="c"?v=e[y][t]:v=e[t][y],d.checkNoNullValue(v)?(m=!1,g=!0):d.checkNoNullValueAll(v)&&(m=!1)}if(m&&f)if(d.getNoNullValue(e,n,t,s)==null)s=="c"?d.activeFormulaInput(n,t,null,null,o,!0):d.activeFormulaInput(t,n,null,null,o,!0);else if(n==l)for(let v=l;v<=a;v++){let b=d.getNoNullValue(e,v,t,s);if(b==null)break;s=="c"?d.backFormulaInput(e,v,t,[v,v],[b,t-1],o):d.backFormulaInput(e,t,v,[b,t-1],[v,v],o)}else for(let v=a;v>=l;v--){let b=d.getNoNullValue(e,v,t,s);if(b==null)break;s=="c"?d.backFormulaInput(e,v,t,[v,v],[b,t-1],o):d.backFormulaInput(e,t,v,[b,t-1],[v,v],o)}else if(g&&u){let y=null;if(s=="c"?y=e[a+1][t]:y=e[t][a+1],y!=null&&y.v!=null&&y.v.toString().length>0){let v=a+1;for(s=="c"?y=e[a+1][t]:y=e[t][a+1];y!=null&&y.v!=null&&y.v.toString().length>0;){v++;let b=null;if(s=="c"?b=e.length:b=e[0].length,v>=b)return;s=="c"?y=e[v][t]:y=e[t][v]}s=="c"?d.backFormulaInput(e,v,t,[l,a],[t,t],o):d.backFormulaInput(e,t,v,[t,t],[l,a],o)}else s=="c"?d.backFormulaInput(e,a+1,t,[l,a],[t,t],o):d.backFormulaInput(e,t,a+1,[t,t],[l,a],o)}else return!0},autoSelectionFormula:function(e){let n=this,t=xe.deepCopyFlowData(h.flowdata),l=40,a=!0;p.execFunctionExist=[];let o=function(u,f,d,m,g,y){let v=n.getNoNullValue(u,f,g,"c");v==null?n.activeFormulaInput(f,m,null,null,y,!0):n.activeFormulaInput(f,m,[f,d],[v,g-1],y)},s=function(u,f,d,m,g,y){let v=n.getNoNullValue(u,m,d,"r");v==null?o(u,f,d,m,g,y):n.activeFormulaInput(f,m,[v,d-1],[m,g],y)};for(let u=0;u<h.luckysheet_select_save.length;u++){let f=h.luckysheet_select_save[u].row[0],d=h.luckysheet_select_save[u].row[1],m=h.luckysheet_select_save[u].column[0],g=h.luckysheet_select_save[u].column[1],y=h.luckysheet_select_save[u].row_focus,v=h.luckysheet_select_save[u].column_focus;if(f==d&&m==g){if(d-1<0&&g-1<0){n.activeFormulaInput(f,m,null,null,e,!0);return}d-1>=0&&n.checkNoNullValue(t[d-1][m])?s(t,f,d,m,g,e):g-1>=0&&n.checkNoNullValue(t[f][g-1])?o(t,f,d,m,g,e):s(t,f,d,m,g,e)}else if(f==d)a=n.singleFormulaInput(t,v,f,m,g,e,"r");else if(m==g)a=n.singleFormulaInput(t,y,m,f,d,e,"c");else{let b=!0;for(let w=f;w<=d;w++)b=n.singleFormulaInput(t,v,w,m,g,e,"r",!0,!1)&&b;let k=!0;for(let w=m;w<=g;w++)k=n.singleFormulaInput(t,y,w,f,d,e,"c",!0,!1)&&k;a=!!b&&!!k}a=a&&a}a||(p.execFunctionExist.reverse(),p.execFunctionGroup(null,null,null,null,t),Ze(t,h.luckysheet_select_save),clearTimeout(h.jfcountfuncTimeout),h.jfcountfuncTimeout=setTimeout(function(){wl()},500))},getStyleByCell:function(e,n,t){let l=this,a="",o=el.getComputeMap(),s=el.checksAF(n,t,o),u=$e.getComputeMap(),f=$e.checksCF(n,t,u),d=Q().fontarray,m=e[n][t],g=m.ct,y=!1;_l(m)&&(y=!0);for(let v in m){let b=l.checkstatus(e,n,t,v);(s!=null||f!=null&&f.cellColor!=null)&&(f!=null&&f.cellColor!=null?a+="background: "+f.cellColor+";":s!=null&&(a+="background: "+s[1]+";")),P(b)!="object"&&((v=="bg"||s!=null||f!=null&&f.cellColor!=null)&&(f!=null&&f.cellColor!=null?a+="background: "+f.cellColor+";":s!=null?a+="background: "+s[1]+";":a+="background: "+b+";"),v=="ht"&&b!="1"&&(b=="0"?a+="text-align: center;":b=="2"&&(a+="text-align: right;")),v=="vt"&&(b=="0"?a+="vertical-align: middle;":b=="1"?a+="vertical-align: top;":b=="2"&&(a+="vertical-align: bottom;")),v=="un"&&b&&(a+="text-decoration:underline;"))}return y||(a+=Ti(m,s,f)),a},fontSelectList:[],defualtFont:["Times New Roman","Arial","Tahoma","Verdana","\u5FAE\u8F6F\u96C5\u9ED1","\u5B8B\u4F53","\u9ED1\u4F53","\u6977\u4F53","\u4EFF\u5B8B","\u65B0\u5B8B\u4F53","\u534E\u6587\u65B0\u9B4F","\u534E\u6587\u884C\u6977","\u534E\u6587\u96B6\u4E66"],addFontTolist:function(e){e=e.replace(/"/g,"").replace(/'/g,"");let n=!0;for(let a=0;a<this.fontSelectList.length;a++)if(this.fontSelectList[a].value==e){n=!1;break}let l=Q().fontjson;if(e in l&&(n=!1),n){let a={};a.value=e,a.index=this.fontSelectList.length,a.type="userDefined",a.text="<span class='luckysheet-mousedown-cancel' style='font-size:11px;font-family:"+e+"'>"+e+"</span>",a.example="",this.fontSelectList.push(a);let o=$("#luckysheet-icon-font-family-menuButton"),s=this.createButtonMenu(this.fontSelectList);o.html(s)}},fontInitial:function(e){let n=[],t=Q().fontarray;for(let l=0;l<t.length;l++){let a=t[l],o={};o.value=a,o.index=l,o.type="inner",o.text="<span class='luckysheet-mousedown-cancel' style='font-size:11px;font-family:"+a+"'>"+a+"</span>",o.example="",n.push(o)}if(e!=null){for(let l=0;l<e.length;l++){let a=e[l],o={};if(o.value=a.fontName,o.index=l,o.type="userDefined",o.text="<span class='luckysheet-mousedown-cancel' style='font-size:11px;font-family:"+a.fontName+"'>"+a.fontName+"</span>",o.example="",n.push(o),document.fonts&&!document.fonts.check("12px "+a.fontName)&&a.url){let s=new FontFace(a.fontName,`url(${a.url})`);document.fonts.add(s),s.load()}}document.fonts&&document.fonts.ready.then(function(){})}this.fontSelectList=n}},ke=yb});function Xc(e,n){let t={};for(let l in e)t[l]=e[l];for(let l in n)n[l]!=null&&(t[l]=n[l]);return t}function _e(e,n){return e.replace(/\$\{([\w]+)\}/g,function(t,l){let a=n[l];return typeof a!="undefined"?a:t})}function P(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"}[Object.prototype.toString.call(e)]}function Yo(e){let n=new Date,t=n.getFullYear(),l=n.getMonth(),a=n.getDate(),o=n.getDay(),s=n.getHours(),u=n.getMinutes(),f=n.getSeconds();l=l+1,l<10&&(l="0"+l),a<10&&(a="0"+a),s<10&&(s="0"+s),u<10&&(u="0"+u),f<10&&(f="0"+f);let d="";return e==1?d=t+"-"+l+"-"+a:e==2&&(d=t+"-"+l+"-"+a+" "+s+":"+u+":"+f),d}function zn(e){let n;e.indexOf("rgba")>-1?n=e.replace("rgba(","").replace(")","").split(","):n=e.replace("rgb(","").replace(")","").split(",");let t=parseInt(n[0]),l=parseInt(n[1]),a=parseInt(n[2]);return"#"+((1<<24)+(t<<16)+(l<<8)+a).toString(16).slice(1)}function hl(e){if(e==null||e.length==0)return NaN;for(var n=e.toLowerCase().split(""),t=0,l=n.length,a=function(f){return f.charCodeAt()-96},o=0,s=0,u=0;u<l;u++)s=a(n[u]),o+=s*Math.pow(26,l-u-1);return o==0?NaN:o-1}function tt(e){for(var n="a".charCodeAt(0),t="z".charCodeAt(0),l=t-n+1,a="";e>=0;)a=String.fromCharCode(e%l+n)+a,e=Math.floor(e/l)-1;return a.toUpperCase()}function ya(e,n){if(n===0)return"";if(e==null)return 0;let t=0;for(let l=0;l<e.length;l++)if(e.charAt(l).match(/[^\x00-\xff]/ig)!=null?t+=2:t+=1,B(n)&&t===~~n)return e.substring(0,l);return t}function Kc(e){let n=[],t={};if(e.length>0)for(let l=0;l<e.length;l++){let a=e[l];t[a]||(n.push(a),t[a]=1)}return n}function oa(e){let n=Q().fontarray;if(P(e)=="object"){let t="";if(e.it=="0"||e.it==null?t+="normal ":t+="italic ",t+="normal ",e.bl=="0"||e.bl==null?t+="normal ":t+="bold ",e.fs?t+=Math.ceil(e.fs)+"pt ":t+=h.defaultFontSize+"pt ",!e.ff)t+=n[0]+', "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif';else{let l=null,a=Q().fontjson;On(e.ff).num?l=n[parseInt(e.ff)]:(l=e.ff,l=l.replace(/"/g,"").replace(/'/g,""),l.indexOf(" ")>-1&&(l='"'+l+'"'),l!=null&&document.fonts&&!document.fonts.check("12px "+l)&&ke.addFontTolist(l)),l==null&&(l=n[0]),t+=l+', "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif'}return t}else return Zn()}function sn(e,n,t){let l=$(window).height(),a=$(window).width(),o=e.width(),s=e.height(),u=t,f=n;n+o>a&&(f=n-o),t+s>l&&(u=t-s),u<0&&(u=0),e.css({top:u,left:f}).show()}function Mr(){h.fullscreenmode&&setTimeout(function(){document.getElementById("luckysheet-rich-text-editor").focus({preventScroll:!0}),$("#luckysheet-rich-text-editor").select()},50)}function rt(){document.getElementById(h.container).focus({preventScroll:!0})}function Il(e,n){if(e==null||isNaN(parseFloat(e))||In(e)||e==-Infinity||e==Infinity)return null;let t=6,l=!1;n==null||n=="auto"?e<1?t=6:t=1:tr(n)=="num"?(t=parseInt(n),l=!0):t=6;let a="",o=null;for(let s=0;s<t;s++)a+="0";return l||(a="["+a+"]"),e>=1e21?o=parseFloat((0,Wo.default)(e).value()):o=parseFloat((0,Wo.default)(e).format("0."+a)),o}function ic(e){if(e!=null&&!isNaN(parseFloat(e))&&!In(e)){let t=(0,Wo.default)(e).value().toString().split(".");return t.length==1?t=0:t=t[1].length,t}else return null}function ml(e,n,t,l){let a=$(window).height(),o=$(window).width(),s=e.width(),u=e.height(),f=t,d=n;l==null&&(l="lefttop"),l=="lefttop"?e.css({top:t,left:n}).show():l=="righttop"?e.css({top:t,left:n-s}).show():l=="leftbottom"?e.css({bottom:a-t-12,left:n}).show():l=="rightbottom"&&e.css({bottom:a-t-12,left:n-s}).show()}function We(e,n){n=n||document;var t=n.querySelectorAll(e);return t.length==1?Array.prototype.slice.call(t)[0]:Array.prototype.slice.call(t)}function Io(e,n,t){if(typeof e!="object")var e=[e];var l=document.getElementsByTagName("head")[0]||document.documentElement,a=[],o=e.length-1,s=function(u){if(a[u]=document.createElement("script"),a[u].setAttribute("type","text/javascript"),a[u].onload=a[u].onreadystatechange=function(){this.onload=this.onreadystatechange=null,this.parentNode.removeChild(this),u!==o?s(u+1):typeof t=="function"&&t()},a[u].setAttribute("src",e[u]),typeof n=="object")for(var f in n)a[u].setAttribute(f,n[f]);l.appendChild(a[u])};s(0)}function vb(e){var n=document,t=n.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("href",e);var l=n.getElementsByTagName("head");l.length?l[0].appendChild(t):n.documentElement.appendChild(t)}function Ro(e){typeof e!="object"&&(e=[e]),e.length&&e.forEach(n=>{vb(n)})}function sd(e){if(e==null||e.length==0)return null;let n=e.split(","),t="";for(let l=0;l<n.length;l++){let o=n[l].split("!"),s="",u="";o.length>1?(s=o[0],u=o[1]):u=o[0];let f=u.split(":"),d="";for(let m=0;m<f.length;m++){let g=f[m],y=g.replace(/[^0-9]/g,""),v=g.replace(/[^A-Za-z]/g,""),b="";v!=""&&(b+="$"+v),y!=""&&(b+="$"+y),d+=b+":"}d=d.substr(0,d.length-1),t+=s+d+","}return t.substr(0,t.length-1)}function da(e,n=!0){let t=$("#"+e).find(".luckysheet-modal-dialog-content").css("min-width",300).end(),l=t.outerHeight(),a=t.outerWidth(),o=$(window).width(),s=$(window).height(),u=$(document).scrollLeft(),f=$(document).scrollTop();t.css({left:(o+u-a)/2,top:(s+f-l)/3}).show(),n&&$("#luckysheet-modal-dialog-mask").show()}function bb(e,n,t,l){e[n]=new Proxy(t,{set(a,o,s,u){return setTimeout(()=>{l(a,o,s,u)},0),Reflect.set(a,o,s,u)}})}function kb(e,n,t,l){Object.defineProperty(e,n,{enumerable:!0,configurable:!1,get(){return t},set(a){t!==a&&(console.log(`\u53D1\u73B0 ${n} \u5C5E\u6027 ${t} -> ${a}`),setTimeout(()=>{l(t,a)},0),t=a)}})}function Ao(e,n){e.some((t,l,a)=>{if(t===n)return a.splice(l,1),t===n})}function Rn(e){return e.replace(/([A-Z])/g,function(n,t){return"-"+t.toLowerCase()})}var Wo,Xo,ft=Ie(()=>{Gt();il();Or();Ft();Xe();bt();Wo=Fl(sa());Xo=(e,n,t)=>{if(!e.hasOwnProperty(n)){console.info("No %s in data",n);return}P(e)==="object"&&(P(e[n])==="object"||P(e[n])==="array"?bb(e,n,e[n],t):kb(e,n,e[n],t))}});function Zc(){h.cellMainSrollBarSize=0;let e=!1,n={},t=!1,l=null;$(document).on("touchstart","#luckysheet-grid-window-1",function(a){clearInterval(l),e=!0;let o=a.originalEvent.targetTouches[0];n={x:o.pageX,y:o.pageY,vy:0,moveType:"y"}}),$(document).on("touchmove","#luckysheet-grid-window-1",function(a){if(a.originalEvent.targetTouches.length>1||a.scale&&a.scale!==1)return;let o=a.originalEvent.targetTouches[0];if(e){let s=o.pageX-n.x,u=o.pageY-n.y;n.x=o.pageX,n.y=o.pageY;let f=$("#luckysheet-scrollbar-x").scrollLeft(),d=$("#luckysheet-scrollbar-y").scrollTop();f-=s,d-=u,f<0&&(f=0),d<0&&(d=0),$("#luckysheet-scrollbar-y").scrollTop(d),n.vy_y=u,n.scrollTop=d,$("#luckysheet-scrollbar-x").scrollLeft(f),n.vy_x=s,n.scrollLeft=f}else if(t){let s=nt(o.pageX,o.pageY),u=s[0]+$("#luckysheet-cell-main").scrollLeft(),f=s[1]+$("#luckysheet-cell-main").scrollTop(),d=_t(f),m=d[1],g=d[0],y=d[2],v=wt(u),b=v[1],k=v[0],w=v[2],x=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),C=0,S=0,_=[];x.top>g?(C=g,S=x.top+x.height-g,x.row[1]>x.row_focus&&(x.row[1]=x.row_focus),_=[y,x.row[1]]):x.top==g?(C=g,S=x.top+x.height-g,_=[y,x.row[0]]):(C=x.top,S=m-x.top-1,x.row[0]<x.row_focus&&(x.row[0]=x.row_focus),_=[x.row[0],y]);let T=0,A=0,R=[];x.left>k?(T=k,A=x.left+x.width-k,x.column[1]>x.column_focus&&(x.column[1]=x.column_focus),R=[w,x.column[1]]):x.left==k?(T=k,A=x.left+x.width-k,R=[w,x.column[0]]):(T=x.left,A=b-x.left-1,x.column[0]<x.column_focus&&(x.column[0]=x.column_focus),R=[x.column[0],w]);let I=ke.mergeMoveMain(R,_,x,C,S,T,A);I!=null&&(R=I[0],_=I[1],C=I[2],S=I[3],T=I[4],A=I[5]),x.row=_,x.column=R,x.left_move=T,x.width_move=A,x.top_move=C,x.height_move=S,h.luckysheet_select_save[h.luckysheet_select_save.length-1]=x,lt(),Y.scrollFreezen()}a.stopPropagation()}),$(document).on("touchend",function(a){if(e){let o=Math.abs(n.vy_x),s=((o>>31)*2+1)*.25,u=Math.abs(n.vy_y),f=((u>>31)*2+1)*.25;(o>0||u>0)&&(l=setInterval(function(){o-=s,u-=f,o<=0&&(o=0),u<=0&&(u=0),n.vy_y>0?n.scrollTop-=u:n.scrollTop+=u,$("#luckysheet-scrollbar-y").scrollTop(n.scrollTop),n.vy_x>0?n.scrollLeft-=o:n.scrollLeft+=o,$("#luckysheet-scrollbar-x").scrollLeft(n.scrollLeft),o<=0&&u<=0&&clearInterval(l)},20))}e=!1,t=!1}),$(document).on("touchstart",".luckysheet-cs-touchhandle",function(a){t=!0,e=!1,a.stopPropagation()}),document.addEventListener("touchmove",function(a){a.preventDefault()},{passive:!1})}var cm=Ie(()=>{Ol();Zt();il();Vl();Xe()});var wb,Jc,um=Ie(()=>{ft();Gt();Zt();ll();Jt();$r();Kt();Yt();Xe();bt();wb={createDialog:function(){let e=this,n=Q(),t=n.splitText,l=n.punctuation,a=n.button;$("#luckysheet-modal-dialog-mask").show(),$("#luckysheet-splitColumn-dialog").remove();let o='<div class="box"><div class="boxTitle">'+t.splitDelimiters+'</div><div class="boxMain"><div style="height: 22px;line-height: 22px;"><input id="splitColumn_type_01" type="checkbox"/><label for="splitColumn_type_01">'+l.tab+'</label></div><div style="height: 22px;line-height: 22px;"><input id="splitColumn_type_02" type="checkbox"/><label for="splitColumn_type_02">'+l.semicolon+'</label></div><div style="height: 22px;line-height: 22px;"><input id="splitColumn_type_03" type="checkbox"/><label for="splitColumn_type_03">'+l.comma+'</label></div><div style="height: 22px;line-height: 22px;"><input id="splitColumn_type_04" type="checkbox"/><label for="splitColumn_type_04">'+l.space+'</label></div><div style="height: 22px;line-height: 22px;"><input id="splitColumn_type_05" type="checkbox"/><label for="splitColumn_type_05">'+t.splitOther+'</label><input type="text" class="formulaInputFocus" maxlength="1"/></div></div><div style="height: 22px;line-height: 22px;"><input id="splitColumn_type_06" type="checkbox"/><label for="splitColumn_type_06">'+t.splitContinueSymbol+'</label></div><div class="boxTitle" style="margin-top: 10px;">'+t.splitDataPreview+'</div><div class="boxMain" id="splitColumnData"></div></div>';$("body").append(_e(dt,{id:"luckysheet-splitColumn-dialog",addclass:"luckysheet-splitColumn-dialog",title:t.splitTextTitle,content:o,botton:'<button id="luckysheet-splitColumn-dialog-confirm" class="btn btn-primary">'+a.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+a.cancel+"</button>",style:"z-index:100003"}));let s=$("#luckysheet-splitColumn-dialog").find(".luckysheet-modal-dialog-content").css("min-width",400).end(),u=s.outerHeight(),f=s.outerWidth(),d=$(window).width(),m=$(window).height(),g=$(document).scrollLeft(),y=$(document).scrollTop();$("#luckysheet-splitColumn-dialog").css({left:(d+g-f)/2,top:(m+y-u)/3}).show();let v=e.getDataArr();e.dataPreview(v)},init:function(){let e=this,t=Q().splitText;$(document).off("change.SPCinpcheckbox").on("change.SPCcheckbox","#luckysheet-splitColumn-dialog .box input[type='checkbox']",function(){let l=e.getRegStr(),a=e.getDataArr(l);e.dataPreview(a)}),$(document).off("keyup.SPCinptext").on("keyup.SPCinptext","#luckysheet-splitColumn-dialog .box input[type='text']",function(){if($(this).siblings("input[type='checkbox']").is(":checked")){let l=e.getRegStr(),a=e.getDataArr(l);e.dataPreview(a)}}),$(document).off("click.SPCconfirm").on("click.SPCconfirm","#luckysheet-splitColumn-dialog #luckysheet-splitColumn-dialog-confirm",function(){$("#luckysheet-modal-dialog-mask").hide(),$("#luckysheet-splitColumn-dialog").hide();let l=e.getRegStr(),a=e.getDataArr(l),o=h.luckysheet_select_save[0].row[0],s=h.luckysheet_select_save[0].column[0];if(a[0].length==1)return;let u=!1;for(let f=0;f<a.length;f++)for(let d=1;d<a[0].length;d++){let m=h.flowdata[o+f][s+d];if(m!=null&&m.v!=null){u=!0;break}}if(u){let f=function(){e.update(o,s,a)};U.confirm("",t.splitConfirmToExe,f)}else e.update(o,s,a)})},update:function(e,n,t){let l=xe.deepCopyFlowData(h.flowdata);for(let u=0;u<t.length;u++)for(let f=0;f<t[0].length;f++){let d=t[u][f];Ht(e+u,n+f,l,d)}let a=h.luckysheet_select_save[0].row[0],o=h.luckysheet_select_save[0].column[0],s=[{row:[a,a+t.length-1],column:[o,o+t[0].length-1]}];Ze(l,s),lt()},dataPreview:function(e){$("#luckysheet-splitColumn-dialog #splitColumnData").empty();let n="";for(let l=0;l<e.length;l++){let a="";for(let o=0;o<e[0].length;o++)a+="<td>"+e[l][o]+"</td>";n+="<tr>"+a+"</tr>"}let t="<table>"+n+"</table>";$("#luckysheet-splitColumn-dialog #splitColumnData").append(t)},getRegStr:function(){let e="",n=0;return $("#luckysheet-splitColumn-dialog .box input[type='checkbox']:checked").each(function(t,l){let a=$(l).attr("id");if(a=="splitColumn_type_01")e+="\\t",n++;else if(a=="splitColumn_type_02")n>0&&(e+="|"),e+=";",n++;else if(a=="splitColumn_type_03")n>0&&(e+="|"),e+=",",n++;else if(a=="splitColumn_type_04")n>0&&(e+="|"),e+="\\s",n++;else if(a=="splitColumn_type_05"){let o=$(l).siblings("input[type='text']").val().trim();o!=""&&(n>0&&(e+="|"),e+=o)}else a=="splitColumn_type_06"&&(e="["+e+"]+")}),e},getDataArr:function(e){let n=this,t=[],l=h.luckysheet_select_save[0].row[0],a=h.luckysheet_select_save[0].row[1],o=h.luckysheet_select_save[0].column[0];if(e!=null&&e!=""){let s=new RegExp(e,"g"),u=[];for(let m=l;m<=a;m++){let g=[],y=h.flowdata[m][o],v;y!=null&&y.m!=null?v=y.m:v=ze(m,o,h.flowdata),v==null&&(v=""),g=v.toString().split(s),u.push(g)}let f=u.length,d=0;for(let m=0;m<f;m++)u[m].length>d&&(d=u[m].length);t=n.getNullData(f,d);for(let m=0;m<t.length;m++)for(let g=0;g<t[0].length;g++)u[m][g]!=null&&(t[m][g]=u[m][g])}else for(let s=l;s<=a;s++){let u=[],f=h.flowdata[s][o],d;f!=null&&f.m!=null?d=f.m:d=ze(s,o,h.flowdata),d==null&&(d=""),u.push(d),t.push(u)}return t},getNullData:function(e,n){let t=[];for(let l=0;l<e;l++){let a=[];for(let o=0;o<n;o++)a.push("");t.push(a)}return t}},Jc=wb});function xb(){let n=Q().cellFormat;$("#luckysheet-cellFormat-confirm").click(function(){let t=$("#luckysheet-protection-check-locked").is(":checked"),l=$("#luckysheet-protection-check-hidden").is(":checked");t=t==!0?1:0,l=l==!0?1:0;let a=fm(function(o,s,u,f){o==null?Ht(s,u,f,{lo:t,hi:l}):(o.lo=t,o.hi=l)},function(){alert(n.sheetDataIsNullAlert)});Ze(a,void 0,void 0,!1),$("#luckysheet-cellFormat-config").hide(),$("#luckysheet-modal-dialog-mask").hide()})}function fm(e,n){if(h.luckysheet_select_save!=null&&h.luckysheet_select_save.length>0){let t=ve.getSheetByIndex(),l=t.data;if(l!=null)for(let a=0;a<h.luckysheet_select_save.length;a++){let o=h.luckysheet_select_save[a],s=o.row,u=o.column;for(let f=s[0];f<=s[1];f++)for(let d=u[0];d<=u[1];d++){let m,g=ke.mergeborer(l,f,d);if(g){let y=g.row[2],v=g.column[2];m=l[y][v]}else m=l[f][d];e(m,f,d,l)}}else n();return l}}function _b(){if(hm)return;hm=!0;let e=Q(),n=e.cellFormat,t=e.button;$("body").append(_e(dt,{id:"luckysheet-cellFormat-config",addclass:"luckysheet-cellFormat-config",title:n.cellFormatTitle,content:` |
| | | <div class="luckysheet-cellFormat-menu-c"> |
| | | <div class="luckysheet-cellFormat-menu luckysheet-cellFormat-menu-active" id="luckysheet-cellFormat-protection"> |
| | | ${n.protection} |
| | |
| | | </div> |
| | | </div> |
| | | `,botton:`<button id="luckysheet-cellFormat-confirm" class="btn btn-primary">${t.confirm}</button> |
| | | <button class="btn btn-default luckysheet-model-close-btn">${t.cancel}</button>`,style:"z-index:100003"})),xb()}function fm(){_b();let e=Q(),n=e.cellFormat,t=e.button;if($("#luckysheet-rightclick-menu").hide(),!jr(h.currentSheetIndex))return;let l=!1,a=!1,o=0,s=0,u=0;if(h.luckysheet_select_save!=null&&h.luckysheet_select_save.length>0)dm(function(m){(m==null||m.lo==null||m.lo==1)&&(l=!0,o++),m!=null&&m.hi==1&&(a=!0,s++),u++},function(){l=!0});else{alert(n.selectionIsNullAlert);return}let d="",f="";l&&(d=o==u?n.tipsAll:n.tipsPart),a&&(f=s==u?n.tipsAll:n.tipsPart),$("#luckysheet-protection-check-locked").prop("checked",l).parent().next().html(d),$("#luckysheet-protection-check-hidden").prop("checked",a).parent().next().html(f),fa("luckysheet-cellFormat-config")}var hm,mm=Ie(()=>{Xe();dt();Gt();fl();il();Ml();Yt();bt();$r();hm=!1});function Ko(e){let n=$("#luckysheet-cell-main"),t=$("#luckysheet-scrollbar-x").scrollLeft(),l=$("#luckysheet-scrollbar-y").scrollTop(),a=$("#luckysheetTableContent").height();if(Y.freezenhorizontaldata!=null&&l<Y.freezenhorizontaldata[2]){l=Y.freezenhorizontaldata[2],$("#luckysheet-scrollbar-y").scrollTop(l);return}if(Y.freezenverticaldata!=null&&t<Y.freezenverticaldata[2]){t=Y.freezenverticaldata[2],$("#luckysheet-scrollbar-x").scrollLeft(t);return}$("#luckysheet-cols-h-c").scrollLeft(t),$("#luckysheet-rows-h").scrollTop(l),n.scrollLeft(t).scrollTop(l),$("#luckysheet-input-box-index").css({left:$("#luckysheet-input-box").css("left"),top:parseInt($("#luckysheet-input-box").css("top"))-20+"px","z-index":$("#luckysheet-input-box").css("z-index")}).show(),Be(t,l),$("#luckysheet-bottom-controll-row").css("left",t),(Y.freezenhorizontaldata!=null||Y.freezenverticaldata!=null)&&Y.scrollAdapt(),!!Je.createHookFunction("scroll",{scrollLeft:t,scrollTop:l,canvasHeight:a})}var pm=Ie(()=>{Vl();Lr();Yt();Xe();Ll()});function Qc(){let e=dr.detectOS();dr.mobilecheck()&&Zc(),Date.now||(Date.now=function(){return new Date().getTime()}),function(){"use strict";for(var g=["webkit","moz"],y=0;y<g.length&&!window.requestAnimationFrame;++y){var v=g[y];window.requestAnimationFrame=window[v+"RequestAnimationFrame"],window.cancelAnimationFrame=window[v+"CancelAnimationFrame"]||window[v+"CancelRequestAnimationFrame"]}if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){var b=0;window.requestAnimationFrame=function(k){var w=Date.now(),x=Math.max(b+16,w);return setTimeout(function(){k(b=x)},x-w)},window.cancelAnimationFrame=clearTimeout}}(),$("#luckysheet-sheet-container-c").mousewheel(function(g,y){let v=g.deltaFactor<40?1:g.deltaFactor<80?2:3,b=$(this).scrollLeft();g.deltaY!=0?g.deltaY<0?b=b+10*v:b=b-10*v:g.deltaX!=0&&(g.deltaX>0?b=b+10*v:b=b-10*v),$(this).scrollLeft(b),g.preventDefault()}),$("#luckysheet-cell-main").scroll(function(){}).mousewheel(function(g,y){g.preventDefault()});let t=Q(),l=t.drag,a=t.info,o,s;$("#luckysheet-grid-window-1").mousewheel(function(g,y){let v=$("#luckysheet-scrollbar-x").scrollLeft(),b=$("#luckysheet-scrollbar-y").scrollTop(),k=h.visibledatacolumn,w=h.visibledatarow;Y.freezenhorizontaldata!=null&&(w=Y.freezenhorizontaldata[3]),Y.freezenverticaldata!=null&&(k=Y.freezenverticaldata[3]),clearTimeout(s),h.visibledatacolumn_unique!=null?k=h.visibledatacolumn_unique:(k=Kc(k),h.visibledatacolumn_unique=k),h.visibledatarow_unique!=null?w=h.visibledatarow_unique:(w=Kc(w),h.visibledatarow_unique=w);let x=st(k,v),C=st(w,b);Y.freezenhorizontaldata!=null&&(C=st(w,b+Y.freezenhorizontaldata[0]));let S=0,_=0,T=g.deltaFactor<40?1:g.deltaFactor<80?2:3;if(g.deltaY!=0){let A,R=Math.round(T/h.zoomRatio);R=R<1?1:R,g.deltaY<0?(A=C+R,A>=w.length&&(A=w.length-1)):(A=C-R,A<0&&(A=0)),_=A==0?0:w[A-1],Y.freezenhorizontaldata!=null&&(_-=Y.freezenhorizontaldata[0]),$("#luckysheet-scrollbar-y").scrollTop(_)}else if(g.deltaX!=0){let A;g.deltaX>0?v=v+20*h.zoomRatio:v=v-20*h.zoomRatio,$("#luckysheet-scrollbar-x").scrollLeft(v)}s=setTimeout(()=>{h.visibledatacolumn_unique=null,h.visibledatarow_unique=null},500)}),$("#luckysheet-scrollbar-x").scroll(function(){Ko()}).mousewheel(function(g,y){g.preventDefault()}),$("#luckysheet-scrollbar-y").scroll(function(){Ko()}).mousewheel(function(g,y){g.preventDefault()}),$(window).resize(function(){document.getElementById(h.container)&&zt()}),$("#luckysheet-rich-text-editor").mouseup(function(g){ke.inputMenuButtonFocus(g.target)}),$("#luckysheet-cell-main, #luckysheetTableContent").mousedown(function(g){if($(g.target).hasClass("luckysheet-mousedown-cancel"))return;Cb(),$("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle").css("cursor","default").end().find(".luckysheet-cs-draghandle").css("cursor","default"),$("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","default"),He.removeActivePs(),($("#luckysheet-modal-dialog-activeImage").is(":visible")||$("#luckysheet-modal-dialog-cropping").is(":visible"))&&Re.cancelActiveImgItem();let y=nt(g.pageX,g.pageY);if(y[0]>=h.cellmainWidth-h.cellMainSrollBarSize||y[1]>=h.cellmainHeight-h.cellMainSrollBarSize)return;let v=y[0]+$("#luckysheet-cell-main").scrollLeft(),b=y[1]+$("#luckysheet-cell-main").scrollTop();Y.freezenverticaldata!=null&&y[0]<Y.freezenverticaldata[0]-Y.freezenverticaldata[2]&&(v=y[0]+Y.freezenverticaldata[2]),Y.freezenhorizontaldata!=null&&y[1]<Y.freezenhorizontaldata[0]-Y.freezenhorizontaldata[2]&&(b=y[1]+Y.freezenhorizontaldata[2]);let k=ve.getSheetByIndex(),w=$("#luckysheetTableContent").get(0).getContext("2d"),x=_t(b),C=x[1],S=x[0],_=x[2],T=wt(v),A=T[1],R=T[0],I=T[2],F=_,z=I,M=ke.mergeborer(h.flowdata,_,I);if(M&&(C=M.row[1],S=M.row[0],_=M.row[2],F=M.row[3],A=M.column[1],R=M.column[0],I=M.column[2],z=M.column[3]),!Je.createHookFunction("cellMousedownBefore",h.flowdata[_][I],{r:_,c:I,start_r:S,start_c:R,end_r:C,end_c:A},k,w))return;if(Ye.cellFocus(_,I,!0),R<$("#luckysheet-cell-main").scrollLeft()&&$("#luckysheet-scrollbar-x").scrollLeft(R),S<$("#luckysheet-cell-main").scrollTop()&&$("#luckysheet-scrollbar-y").scrollTop(S),g.which=="3"){$("#luckysheet-dataVerification-showHintBox").hide();let N=!1;for(let L=0;L<h.luckysheet_select_save.length;L++)if(h.luckysheet_select_save[L].row!=null&&_>=h.luckysheet_select_save[L].row[0]&&_<=h.luckysheet_select_save[L].row[1]&&I>=h.luckysheet_select_save[L].column[0]&&I<=h.luckysheet_select_save[L].column[1]){N=!0;break}if(N)return}if(h.flowdata[_]!=null&&h.flowdata[_][I]!=null&&h.flowdata[_][I].dd!=null&&fe.fireMousedown!=null&&P(fe.fireMousedown)=="function"){fe.fireMousedown(h.flowdata[_][I].dd);return}if(Cl.hyperlink&&Cl.hyperlink[_+"_"+I]&&g.which!="3"){Cl.cellFocus(_,I);return}h.luckysheet_scroll_status=!0;let E=$("#luckysheet-input-box");if(parseInt(E.css("top"))>0)if(p.rangestart||p.rangedrag_column_start||p.rangedrag_row_start||p.israngeseleciton()){let N=[_,F],L=[I,z],O=R,V=A-R-1,q=S,W=C-S-1;if(g.shiftKey){let X=p.func_selectedrange,te=0,le=0,oe=[];X.top>S?(te=S,le=X.top+X.height-S,X.row[1]>X.row_focus&&(X.row[1]=X.row_focus),oe=[_,X.row[1]]):X.top==S?(te=S,le=X.top+X.height-S,oe=[_,X.row[0]]):(te=X.top,le=C-X.top-1,X.row[0]<X.row_focus&&(X.row[0]=X.row_focus),oe=[X.row[0],_]);let se=0,ce=0,he=[];X.left>R?(se=R,ce=X.left+X.width-R,X.column[1]>X.column_focus&&(X.column[1]=X.column_focus),he=[I,X.column[1]]):X.left==R?(se=R,ce=X.left+X.width-R,he=[I,X.column[0]]):(se=X.left,ce=A-X.left-1,X.column[0]<X.column_focus&&(X.column[0]=X.column_focus),he=[X.column[0],I]);let ue=ke.mergeMoveMain(he,oe,X,te,le,se,ce);ue!=null&&(he=ue[0],oe=ue[1],te=ue[2],le=ue[3],se=ue[4],ce=ue[5]),or(se,te,ce,le,oe,he),X.row=oe,X.column=he,X.left_move=se,X.width_move=ce,X.top_move=te,X.height_move=le,p.func_selectedrange=X}else if(g.ctrlKey&&$("#luckysheet-rich-text-editor").find("span").last().text()!=","){let X=$("#luckysheet-rich-text-editor").text();if(X[X.length-1]===")"&&(X=X.substr(0,X.length-1)),X.length>0){let te=X.substr(X.length-1,1);te!=","&&te!="="&&te!="("&&(X+=",")}if(X.length>0&&X.substr(0,1)=="="){if(X=p.functionHTMLGenerate(X),window.getSelection){let te=window.getSelection();p.functionRangeIndex=[$(te.anchorNode).parent().index(),te.anchorOffset]}else{let te=document.selection.createRange();p.functionRangeIndex=te}$("#luckysheet-rich-text-editor").html(X+")"),p.canceFunctionrangeSelected(),p.createRangeHightlight()}p.rangestart=!1,p.rangedrag_column_start=!1,p.rangedrag_row_start=!1,$("#luckysheet-functionbox-cell").html(X+")"),p.rangeHightlightselected($("#luckysheet-rich-text-editor")),p.israngeseleciton(),p.func_selectedrange={left:O,width:V,top:q,height:W,left_move:O,width_move:V,top_move:q,height_move:W,row:N,column:L,row_focus:_,column_focus:I}}else p.func_selectedrange={left:O,width:V,top:q,height:W,left_move:O,width_move:V,top_move:q,height_move:W,row:N,column:L,row_focus:_,column_focus:I};p.rangeSetValue({row:N,column:L}),p.rangestart=!0,p.rangedrag_column_start=!1,p.rangedrag_row_start=!1,$("#luckysheet-formula-functionrange-select").css({left:O,width:V,top:q,height:W}).show(),$("#luckysheet-formula-help-c").hide(),or(O,q,V,W,N,L),setTimeout(function(){let te=window.getSelection().anchorNode,le;$("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible")?(le=$("#luckysheet-rich-text-editor"),p.rangechangeindex=p.data_parm_index):le=$(te).closest("div");let oe=le.find("span[rangeindex='"+p.rangechangeindex+"']");p.setCaretPosition(oe.get(0),0,oe.html().length)},1);return}else p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),h.luckysheet_select_status=!0,$("#luckysheet-info").is(":visible")&&(h.luckysheet_select_status=!1);else rc(_,I,h.currentSheetIndex)&&(h.luckysheet_select_status=!0);if($("#luckysheet-multiRange-dialog").is(":visible")){if($e.selectStatus=!0,h.luckysheet_select_status=!1,g.shiftKey){let L=$e.selectRange[$e.selectRange.length-1],O=0,V=0,q=[];L.top>S?(O=S,V=L.top+L.height-S,L.row[1]>L.row_focus&&(L.row[1]=L.row_focus),q=[_,L.row[1]]):L.top==S?(O=S,V=L.top+L.height-S,q=[_,L.row[0]]):(O=L.top,V=C-L.top-1,L.row[0]<L.row_focus&&(L.row[0]=L.row_focus),q=[L.row[0],_]);let W=0,X=0,te=[];L.left>R?(W=R,X=L.left+L.width-R,L.column[1]>L.column_focus&&(L.column[1]=L.column_focus),te=[I,L.column[1]]):L.left==R?(W=R,X=L.left+L.width-R,te=[I,L.column[0]]):(W=L.left,X=A-L.left-1,L.column[0]<L.column_focus&&(L.column[0]=L.column_focus),te=[L.column[0],I]);let le=ke.mergeMoveMain(te,q,L,O,V,W,X);le!=null&&(te=le[0],q=le[1],O=le[2],V=le[3],W=le[4],X=le[5]),L.row=q,L.column=te,L.left_move=W,L.width_move=X,L.top_move=O,L.height_move=V,$e.selectRange[$e.selectRange.length-1]=L}else g.ctrlKey?$e.selectRange.push({left:R,width:A-R-1,top:S,height:C-S-1,left_move:R,width_move:A-R-1,top_move:S,height_move:C-S-1,row:[_,F],column:[I,z],row_focus:_,column_focus:I}):($e.selectRange=[],$e.selectRange.push({left:R,width:A-R-1,top:S,height:C-S-1,left_move:R,width_move:A-R-1,top_move:S,height_move:C-S-1,row:[_,F],column:[I,z],row_focus:_,column_focus:I}));Ot($e.selectRange);let N=$e.getTxtByRange($e.selectRange);$("#luckysheet-multiRange-dialog input").val(N);return}else $e.selectStatus=!1,$e.selectRange=[];if($("#luckysheet-singleRange-dialog").is(":visible")){h.luckysheet_select_status=!1,Ot([{row:[_,_],column:[I,I]}]);let N=xt(h.currentSheetIndex,{row:[_,_],column:[I,I]},h.currentSheetIndex);$("#luckysheet-singleRange-dialog input").val(N);return}if($("#luckysheet-dataVerificationRange-dialog").is(":visible")){if(Ye.selectStatus=!0,h.luckysheet_select_status=!1,g.shiftKey){let L=Ye.selectRange[Ye.selectRange.length-1],O=0,V=0,q=[];L.top>S?(O=S,V=L.top+L.height-S,L.row[1]>L.row_focus&&(L.row[1]=L.row_focus),q=[_,L.row[1]]):L.top==S?(O=S,V=L.top+L.height-S,q=[_,L.row[0]]):(O=L.top,V=C-L.top-1,L.row[0]<L.row_focus&&(L.row[0]=L.row_focus),q=[L.row[0],_]);let W=0,X=0,te=[];L.left>R?(W=R,X=L.left+L.width-R,L.column[1]>L.column_focus&&(L.column[1]=L.column_focus),te=[I,L.column[1]]):L.left==R?(W=R,X=L.left+L.width-R,te=[I,L.column[0]]):(W=L.left,X=A-L.left-1,L.column[0]<L.column_focus&&(L.column[0]=L.column_focus),te=[L.column[0],I]);let le=ke.mergeMoveMain(te,q,L,O,V,W,X);le!=null&&(te=le[0],q=le[1],O=le[2],V=le[3],W=le[4],X=le[5]),L.row=q,L.column=te,L.left_move=W,L.width_move=X,L.top_move=O,L.height_move=V,Ye.selectRange[Ye.selectRange.length-1]=L}else Ye.selectRange=[],Ye.selectRange.push({left:R,width:A-R-1,top:S,height:C-S-1,left_move:R,width_move:A-R-1,top_move:S,height_move:C-S-1,row:[_,F],column:[I,z],row_focus:_,column_focus:I});Ot(Ye.selectRange);let N=Ye.getTxtByRange(Ye.selectRange);p.rangetosheet!=h.currentSheetIndex&&(N=h.luckysheetfile[Z(h.currentSheetIndex)].name+"!"+N),$("#luckysheet-dataVerificationRange-dialog input").val(N);return}else Ye.selectStatus=!1,Ye.selectRange=[];if(ri.singleRangeFocus&&$("#luckysheet-ifFormulaGenerator-dialog .singRange").click(),$("#luckysheet-ifFormulaGenerator-singleRange-dialog").is(":visible")){h.luckysheet_select_status=!1,p.rangestart=!1,$("#luckysheet-formula-functionrange-select").css({left:R,width:A-R-1,top:S,height:C-S-1}).show(),$("#luckysheet-formula-help-c").hide();let N=xt(h.currentSheetIndex,{row:[_,_],column:[I,I]},h.currentSheetIndex);$("#luckysheet-ifFormulaGenerator-singleRange-dialog input").val(N);return}if($("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){h.luckysheet_select_status=!1,p.func_selectedrange={left:R,width:A-R-1,top:S,height:C-S-1,left_move:R,width_move:A-R-1,top_move:S,height_move:C-S-1,row:[_,_],column:[I,I],row_focus:_,column_focus:I},p.rangestart=!0,$("#luckysheet-formula-functionrange-select").css({left:R,width:A-R-1,top:S,height:C-S-1}).show(),$("#luckysheet-formula-help-c").hide();let N=xt(h.currentSheetIndex,{row:[_,_],column:[I,I]},h.currentSheetIndex);$("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(N),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide();return}if(h.luckysheet_select_status){if(g.shiftKey){let N=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),L=0,O=0,V=[];N.top>S?(L=S,O=N.top+N.height-S,N.row[1]>N.row_focus&&(N.row[1]=N.row_focus),V=[_,N.row[1]]):N.top==S?(L=S,O=N.top+N.height-S,V=[_,N.row[0]]):(L=N.top,O=C-N.top-1,N.row[0]<N.row_focus&&(N.row[0]=N.row_focus),V=[N.row[0],_]);let q=0,W=0,X=[];N.left>R?(q=R,W=N.left+N.width-R,N.column[1]>N.column_focus&&(N.column[1]=N.column_focus),X=[I,N.column[1]]):N.left==R?(q=R,W=N.left+N.width-R,X=[I,N.column[0]]):(q=N.left,W=A-N.left-1,N.column[0]<N.column_focus&&(N.column[0]=N.column_focus),X=[N.column[0],I]);let te=ke.mergeMoveMain(X,V,N,L,O,q,W);te!=null&&(X=te[0],V=te[1],L=te[2],O=te[3],q=te[4],W=te[5]),N.row=V,N.column=X,N.left_move=q,N.width_move=W,N.top_move=L,N.height_move=O,h.luckysheet_select_save[h.luckysheet_select_save.length-1]=N,$("#luckysheet-alternateformat-rangeDialog").is(":visible")&&$("#luckysheet-alternateformat-rangeDialog input").val(xt(h.currentSheetIndex,h.luckysheet_select_save)),Oe.luckysheet_pivotTable_select_state&&$("#luckysheet-pivotTable-range-selection-input").val(h.luckysheetfile[Z(h.currentSheetIndex)].name+"!"+tt(h.luckysheet_select_save[0].column[0])+(h.luckysheet_select_save[0].row[0]+1)+":"+tt(h.luckysheet_select_save[0].column[1])+(h.luckysheet_select_save[0].row[1]+1))}else g.ctrlKey?h.luckysheet_select_save.push({left:R,width:A-R-1,top:S,height:C-S-1,left_move:R,width_move:A-R-1,top_move:S,height_move:C-S-1,row:[_,F],column:[I,z],row_focus:_,column_focus:I}):(h.luckysheet_select_save.length=0,h.luckysheet_select_save.push({left:R,width:A-R-1,top:S,height:C-S-1,left_move:R,width_move:A-R-1,top_move:S,height_move:C-S-1,row:[_,F],column:[I,z],row_focus:_,column_focus:I}),ke.menuButtonFocus(h.flowdata,_,I),p.fucntionboxshow(_,I));lt(),(Y.freezenhorizontaldata!=null||Y.freezenverticaldata!=null)&&Y.scrollAdaptOfselect(),dr.mobilecheck()||Mr(),ne.saveParam("mv",h.currentSheetIndex,h.luckysheet_select_save)}el.rangefocus&&(el.rangefocus=!1,$("#luckysheet-alternateformat-range .fa-table").click()),$("#luckysheet-row-count-show, #luckysheet-column-count-show").hide(),de()||Cc(),Oe.pivotclick(_,I,h.currentSheetIndex),rt(),Je.createHookFunction("cellMousedown",h.flowdata[_][I],{r:_,c:I,start_r:S,start_c:R,end_r:C,end_c:A},k,w)}).mouseup(function(g){if(g.which=="3"){if(!h.allowEdit||de())return;let y=g.pageX,v=g.pageY,b=h.flowdata,k=h.luckysheet_select_save[0],w=fe.cellRightClickConfig;if($("#luckysheet-cols-rows-data").show(),$("#luckysheet-cols-rows-handleincell").show(),$("#luckysheet-cols-rows-add, #luckysheet-cols-rows-shift").hide(),We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="block",We("#luckysheet-cols-rows-handleincell .luckysheet-menuseparator").style.display="block",k.row!=null&&k.row[0]==0&&k.row[1]==h.flowdata.length-1){if(!w.copy&&!w.copyAs&&!w.paste&&!w.insertColumn&&!w.deleteColumn&&!w.hideColumn&&!w.columnWidth&&!w.clear&&!w.matrix&&!w.sort&&!w.filter&&!w.chart&&!w.image&&!w.link&&!w.data&&!w.cellFormat)return;h.luckysheetRightHeadClickIs="column",$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(Q().rightclick.column),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text(Q().rightclick.width),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(Q().rightclick.left),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(Q().rightclick.right),$("#luckysheet-cols-rows-add").show(),$("#luckysheet-cols-rows-shift").hide(),$("#luckysheet-cols-rows-handleincell").hide(),h.luckysheet_cols_menu_status=!0,We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="block",We("#luckysheet-top-left-add-selected").style.display=w.insertColumn?"block":"none",We("#luckysheet-bottom-right-add-selected").style.display=w.insertColumn?"block":"none",We("#luckysheet-del-selected").style.display=w.deleteColumn?"block":"none",We("#luckysheet-hide-selected").style.display=w.hideColumn?"block":"none",We("#luckysheet-show-selected").style.display=w.hideColumn?"block":"none",We("#luckysheet-column-row-width-selected").style.display=w.columnWidth?"block":"none",!w.copy&&!w.copyAs&&!w.paste&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none",!w.insertColumn&&!w.deleteColumn&&!w.hideColumn&&!w.columnWidth&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none")),!w.insertColumn&&!w.deleteColumn&&!w.hideColumn&&!w.columnWidth&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none");let x=$.extend(!0,{},h.config);x.columnlen==null&&(x.columnlen={});let C=x.columnlen[h.luckysheet_select_save[0].column[0]]==null?h.defaultcollen:x.columnlen[h.luckysheet_select_save[0].column[0]],S=!0;for(let _=0;_<h.luckysheet_select_save.length;_++){let T=h.luckysheet_select_save[_],A=T.column[0],R=T.column[1];for(let I=A;I<=R;I++)if((x.columnlen[I]==null?h.defaultcollen:x.columnlen[I])!=C){S=!1;break}}S?$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(C):$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val("")}else if(k.column!=null&&k.column[0]==0&&k.column[1]==h.flowdata[0].length-1){if(!w.copy&&!w.copyAs&&!w.paste&&!w.insertRow&&!w.deleteRow&&!w.hideRow&&!w.rowHeight&&!w.clear&&!w.matrix&&!w.sort&&!w.filter&&!w.chart&&!w.image&&!w.link&&!w.data&&!w.cellFormat)return;h.luckysheetRightHeadClickIs="row",$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(Q().rightclick.row),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text(Q().rightclick.height),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(Q().rightclick.top),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(Q().rightclick.bottom),$("#luckysheet-cols-rows-add").show(),$("#luckysheet-cols-rows-shift").hide(),$("#luckysheet-cols-rows-handleincell").hide(),h.luckysheet_cols_menu_status=!0,We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="block",We("#luckysheet-top-left-add-selected").style.display=w.insertRow?"block":"none",We("#luckysheet-bottom-right-add-selected").style.display=w.insertRow?"block":"none",We("#luckysheet-del-selected").style.display=w.deleteRow?"block":"none",We("#luckysheet-hide-selected").style.display=w.hideRow?"block":"none",We("#luckysheet-show-selected").style.display=w.hideRow?"block":"none",We("#luckysheet-column-row-width-selected").style.display=w.rowHeight?"block":"none",!w.copy&&!w.copyAs&&!w.paste&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none",!w.insertRow&&!w.deleteRow&&!w.hideRow&&!w.rowHeight&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none")),!w.insertRow&&!w.deleteRow&&!w.hideRow&&!w.rowHeight&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none");let x=$.extend(!0,{},h.config);x.rowlen==null&&(x.rowlen={});let C=x.rowlen[h.luckysheet_select_save[0].row[0]]==null?h.defaultrowlen:x.rowlen[h.luckysheet_select_save[0].row[0]],S=!0;for(let _=0;_<h.luckysheet_select_save.length;_++){let T=h.luckysheet_select_save[_],A=T.row[0],R=T.row[1];for(let I=A;I<=R;I++)if((x.rowlen[I]==null?h.defaultrowlen:x.rowlen[I])!=C){S=!1;break}}S?$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(C):$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val("")}else{if(!w.copy&&!w.copyAs&&!w.paste&&!w.insertRow&&!w.insertColumn&&!w.deleteRow&&!w.deleteColumn&&!w.deleteCell&&!w.clear&&!w.matrix&&!w.sort&&!w.filter&&!w.chart&&!w.image&&!w.link&&!w.data&&!w.cellFormat)return;!w.copy&&!w.copyAs&&!w.paste&&(We("#luckysheet-cols-rows-handleincell .luckysheet-menuseparator").style.display="none",!w.insertRow&&!w.insertColumn&&!w.deleteRow&&!w.deleteColumn&&!w.deleteCell&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none")),!w.insertRow&&!w.insertColumn&&!w.deleteRow&&!w.deleteColumn&&!w.deleteCell&&(We("#luckysheet-cols-rows-handleincell .luckysheet-menuseparator").style.display="none")}!w.clear&&!w.matrix&&!w.sort&&!w.filter&&!w.chart&&!w.image&&!w.link&&!w.data&&!w.cellFormat&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none"),sn($("#luckysheet-rightclick-menu"),y,v)}ne.saveParam("mv",h.currentSheetIndex,h.luckysheet_select_save)}).dblclick(function(g){if($(g.target).hasClass("luckysheet-mousedown-cancel")||!h.allowEdit||parseInt($("#luckysheet-input-box").css("top"))>0)return;let y=nt(g.pageX,g.pageY);if(y[0]>=h.cellmainWidth-h.cellMainSrollBarSize||y[1]>=h.cellmainHeight-h.cellMainSrollBarSize)return;let v=$("#luckysheet-cell-main").scrollLeft(),b=$("#luckysheet-cell-main").scrollTop(),k=y[0]+v,w=y[1]+b;Y.freezenverticaldata!=null&&y[0]<Y.freezenverticaldata[0]-Y.freezenverticaldata[2]&&(k=y[0]+Y.freezenverticaldata[2]),Y.freezenhorizontaldata!=null&&y[1]<Y.freezenhorizontaldata[0]-Y.freezenhorizontaldata[2]&&(w=y[1]+Y.freezenhorizontaldata[2]);let x=_t(w),C=x[2],S=wt(k),_=S[2],T=ke.mergeborer(h.flowdata,C,_);if(T&&(C=T.row[2],_=T.column[2]),Oe.isPivotRange(C,_)){if((Oe.filter==null||Oe.filter.length==0)&&(Oe.row==null||Oe.row.length==0)&&(Oe.column==null||Oe.column.length==0)&&(Oe.values==null||Oe.values.length==0)||Oe.values==null||Oe.values.length==0||C==0||_==0)return;if(Oe.column!=null&&Oe.column.length>0){if(Oe.values.length>=2&&Oe.showType=="column"){if(C<=Oe.column.length||_>=Oe.pivotDatas[0].length-Oe.values.length)return}else if(C<=Oe.column.length-1||_>=Oe.pivotDatas[0].length-1)return}if(Oe.row!=null&&Oe.row.length>0){if(Oe.values.length>=2&&Oe.showType=="row"){if(_<=Oe.row.length||C>=Oe.pivotDatas.length-Oe.values.length)return}else if(_<=Oe.row.length-1||C>=Oe.pivotDatas.length-1)return}ve.addNewSheet(g),Oe.drillDown(C,_);return}if($("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible"))$("#luckysheet-cell-selected").hide();else{if($("#luckysheet-conditionformat-dialog").is(":visible")||$("#luckysheet-administerRule-dialog").is(":visible")||$("#luckysheet-newConditionRule-dialog").is(":visible")||$("#luckysheet-editorConditionRule-dialog").is(":visible")||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;if($("#luckysheet-modal-dialog-slider-alternateformat").is(":visible")||$("#luckysheet-alternateformat-rangeDialog").is(":visible"))return;{ke.luckysheetPaintModelOn&&ke.cancelPaintModel();let A=h.luckysheet_select_save[0].column_focus,R=h.luckysheet_select_save[0].row_focus;(A!==_||R!==C)&&(C=R,_=A),Rl(C,_,h.flowdata),lt()}}}),document.getElementById("luckysheet-cell-main").addEventListener("drop",function(g){g.preventDefault(),g.stopPropagation();let y=g.dataTransfer.files;if(y.length==1&&y[0].type.indexOf("image")>-1){if(!$t(h.currentSheetIndex,"editObjects"))return;Re.insertImg(y[0])}u(g)},!1),document.getElementById("luckysheet-cell-main").addEventListener("dragover",function(g){g.preventDefault(),g.stopPropagation()},!1);function u(g){if(fe&&fe.hook&&fe.hook.cellDragStop){let y=nt(g.pageX,g.pageY),v=y[0]+$("#luckysheet-cell-main").scrollLeft(),b=y[1]+$("#luckysheet-cell-main").scrollTop(),k=_t(b),w=k[1],x=k[0],C=k[2],S=wt(v),_=S[1],T=S[0],A=S[2],R=ke.mergeborer(h.flowdata,C,A);R&&(w=R.row[1],x=R.row[0],C=R.row[2],_=R.column[1],T=R.column[0],A=R.column[2]);let I=ve.getSheetByIndex(),F=$("#luckysheetTableContent").get(0).getContext("2d");Je.createHookFunction("cellDragStop",h.flowdata[C][A],{r:C,c:A,start_r:x,start_c:T,end_r:w,end_c:_},I,F,g)}}$(document).on("mousemove.luckysheetEvent",function(g){if(He.overshow(g),Cl.overshow(g),window.cancelAnimationFrame(h.jfautoscrollTimeout),fe&&fe.hook&&fe.hook.sheetMousemove){let y=nt(g.pageX,g.pageY),v=y[0]+$("#luckysheet-cell-main").scrollLeft(),b=y[1]+$("#luckysheet-cell-main").scrollTop(),k=_t(b),w=k[1],x=k[0],C=k[2],S=wt(v),_=S[1],T=S[0],A=S[2],R=ke.mergeborer(h.flowdata,C,A);R&&(w=R.row[1],x=R.row[0],C=R.row[2],_=R.column[1],T=R.column[0],A=R.column[2]);let I=ve.getSheetByIndex(),F={functionResizeStatus:p.functionResizeStatus,horizontalmoveState:!!Y.horizontalmovestate,verticalmoveState:!!Y.verticalmovestate,pivotTableMoveState:!!Oe&&Oe.movestate,sheetMoveStatus:h.luckysheet_sheet_move_status,scrollStatus:!!h.luckysheet_scroll_status,selectStatus:!!h.luckysheet_select_status,rowsSelectedStatus:!!h.luckysheet_rows_selected_status,colsSelectedStatus:!!h.luckysheet_cols_selected_status,cellSelectedMove:!!h.luckysheet_cell_selected_move,cellSelectedExtend:!!h.luckysheet_cell_selected_extend,colsChangeSize:!!h.luckysheet_cols_change_size,rowsChangeSize:!!h.luckysheet_rows_change_size,chartMove:!!h.chartparam.luckysheetCurrentChartMove,chartResize:!!h.chartparam.luckysheetCurrentChartResize,rangeResize:!!p.rangeResize,rangeMove:!!p.rangeMove},z=$("#luckysheetTableContent").get(0).getContext("2d");h.flowdata&&h.flowdata[C]&&Je.createHookFunction("sheetMousemove",h.flowdata[C][A],{r:C,c:A,start_r:x,start_c:T,end_r:w,end_c:_},I,F,z)}if(p.functionResizeStatus){let v=g.pageY-p.functionResizeData.y,b=p.functionResizeData.calculatebarHeight+v,k=Math.round($(window).height()/2);if(b<=28){if(b<=20)return;b=28}else if(b>=k){if(b>=k+8)return;b=k}h.calculatebarHeight=b,$("#luckysheet-wa-calculate").css("height",h.calculatebarHeight-2),$("#luckysheet-wa-calculate-size").css({background:"#5e5e5e",cursor:"ns-resize"}),clearTimeout(p.functionResizeTimeout),p.functionResizeTimeout=setTimeout(function(){zt()},15)}else if(Y.horizontalmovestate){let y=nt(g.pageX,g.pageY),v=$("#luckysheet-cell-main").scrollLeft(),b=$("#luckysheet-cell-main").scrollTop(),k=y[0]+v,w=y[1]+b,x=_t(w),C=x[1],S=x[0],_=x[2],T=y[1]+h.columnHeaderHeight;T<h.columnHeaderHeight&&(T=h.columnHeaderHeight),T>Y.windowHeight-4&&(T=Y.windowHeight-4),$("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css({top:T}),T+b-h.columnHeaderHeight>=S+(C-S)/2?(T=C-2-b+h.columnHeaderHeight,Y.freezenhorizontaldata=[C,_+1,b,Y.cutVolumn(h.visibledatarow,_+1),T]):(T=S-2-b+h.columnHeaderHeight,Y.freezenhorizontaldata=[S,_,b,Y.cutVolumn(h.visibledatarow,_),T]),$("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-drop").css({top:T}),Y.saveFreezen(Y.freezenhorizontaldata,T,null,null)}else if(Y.verticalmovestate){let y=nt(g.pageX,g.pageY),v=$("#luckysheet-cell-main").scrollLeft(),b=$("#luckysheet-cell-main").scrollTop(),k=y[0]+v,w=y[1]+b,x=wt(k),C=x[1],S=x[0],_=x[2],T=y[0]+h.rowHeaderWidth;T<h.rowHeaderWidth&&(T=h.rowHeaderWidth),T>Y.windowWidth-4&&(T=Y.windowWidth-4),$("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css({left:T}),T+v-h.rowHeaderWidth>=S+(C-S)/2?(T=C-2-v+h.rowHeaderWidth,Y.freezenverticaldata=[C,_+1,v,Y.cutVolumn(h.visibledatacolumn,_+1),T]):(T=S-2-v+h.rowHeaderWidth,Y.freezenverticaldata=[S,_,v,Y.cutVolumn(h.visibledatacolumn,_),T]),$("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-drop").css({left:T}),Y.saveFreezen(null,null,Y.freezenverticaldata,T),zt()}else if(!!Oe&&Oe.movestate){let y=g.pageX,v=g.pageY;$("#luckysheet-modal-dialog-slider-pivot-move").css({left:y-Oe.movesave.width/2,top:v-Oe.movesave.height})}else if(h.luckysheet_sheet_move_status){let y=$("#luckysheet-sheet-container-c").scrollLeft(),v=g.pageX+y;if(Math.abs(g.pageX-h.luckysheet_sheet_move_data.pageX)<3)return;let b=$("#luckysheet-sheet-container").width(),k=v-h.luckysheet_sheet_move_data.curleft-$("#luckysheet-sheet-container").offset().left;h.luckysheet_sheet_move_data.activeobject.css({left:k});let w=st(h.luckysheet_sheet_move_data.widthlist,k+h.luckysheet_sheet_move_data.curleft);h.luckysheet_sheet_move_data.cursorobject.css({cursor:"move"}),k-y<=6&&$("#luckysheet-sheets-leftscroll").click(),k-y>=b-40&&$("#luckysheet-sheets-rightscroll").click(),w!=h.luckysheet_sheet_move_data.curindex&&(w==-1&&k>0?(w=h.luckysheet_sheet_move_data.widthlist.length-1,$("#luckysheet-sheets-item-clone").insertAfter($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").eq(w))):w==-1&&k<=0?$("#luckysheet-sheets-item-clone").insertBefore($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").eq(0)):$("#luckysheet-sheets-item-clone").insertAfter($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").eq(w)),h.luckysheet_sheet_move_data.widthlist=[],$("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").each(function(x){x==0?h.luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth())):h.luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth())+h.luckysheet_sheet_move_data.widthlist[x-1])}),h.luckysheet_sheet_move_data.curindex=$("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").index($("#luckysheet-sheets-item-clone")))}else if(h.luckysheet_model_move_state){let y=$(document).scrollTop(),v=$(document).scrollLeft(),b=g.pageY+y,k=g.pageX+v,w=$(window).height(),x=$(window).width(),C=h.luckysheet_model_move_obj.height(),S=h.luckysheet_model_move_obj.width(),_=b-h.luckysheet_model_xy[1],T=k-h.luckysheet_model_xy[0];_<0&&(_=0),_+C+62>w&&(_=w-C-62),T<0&&(T=0),T+S+86>x&&(T=x-S-86),h.luckysheet_model_move_obj.css({top:_,left:T}),g.preventDefault()}else if(!!h.luckysheet_scroll_status||!!h.luckysheet_select_status||!!h.luckysheet_rows_selected_status||!!h.luckysheet_cols_selected_status||!!h.luckysheet_cell_selected_move||!!h.luckysheet_cell_selected_extend||!!h.luckysheet_cols_change_size||!!h.luckysheet_rows_change_size||!!h.chartparam.luckysheetCurrentChartMove||!!h.chartparam.luckysheetCurrentChartResize||!!p.rangeResize||!!p.rangeMove){let y=function(){if(h.luckysheet_scroll_status&&!h.luckysheet_cols_change_size&&!h.luckysheet_rows_change_size){let v=nt(g.pageX,g.pageY),b=$("#luckysheet-scrollbar-x").scrollLeft(),k=$("#luckysheet-scrollbar-y").scrollTop(),w=v[0],x=v[1],C=$("#luckysheet-cell-main").height()-20*h.zoomRatio,S=$("#luckysheet-cell-main").width()-60*h.zoomRatio;if(x<0||x>C){let _;x<0?_=k+x/2:_=k+(x-C)/2,$("#luckysheet-scrollbar-y").scrollTop(_)}if(w<0||w>S){let _;w<0?_=b+w/2:_=b+(w-S)/2,$("#luckysheet-scrollbar-x").scrollLeft(_)}}if(h.luckysheet_select_status){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop(),w=_t(k),x=w[1],C=w[0],S=w[2],_=wt(b),T=_[1],A=_[0],R=_[2];if(!rc(S,R,h.currentSheetIndex))return;let I=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),F=0,z=0,M=[];I.top>C?(F=C,z=I.top+I.height-C,I.row[1]>I.row_focus&&(I.row[1]=I.row_focus),M=[S,I.row[1]]):I.top==C?(F=C,z=I.top+I.height-C,M=[S,I.row[0]]):(F=I.top,z=x-I.top-1,I.row[0]<I.row_focus&&(I.row[0]=I.row_focus),M=[I.row[0],S]);let E=0,N=0,L=[];I.left>A?(E=A,N=I.left+I.width-A,I.column[1]>I.column_focus&&(I.column[1]=I.column_focus),L=[R,I.column[1]]):I.left==A?(E=A,N=I.left+I.width-A,L=[R,I.column[0]]):(E=I.left,N=T-I.left-1,I.column[0]<I.column_focus&&(I.column[0]=I.column_focus),L=[I.column[0],R]);let O=ke.mergeMoveMain(L,M,I,F,z,E,N);O!=null&&(L=O[0],M=O[1],F=O[2],z=O[3],E=O[4],N=O[5]),I.row=M,I.column=L,I.left_move=E,I.width_move=N,I.top_move=F,I.height_move=z,h.luckysheet_select_save[h.luckysheet_select_save.length-1]=I,lt(),Y.scrollFreezen(),$("#luckysheet-alternateformat-rangeDialog").is(":visible")&&$("#luckysheet-alternateformat-rangeDialog input").val(xt(h.currentSheetIndex,h.luckysheet_select_save[h.luckysheet_select_save.length-1])),Oe.luckysheet_pivotTable_select_state&&$("#luckysheet-pivotTable-range-selection-input").val(h.luckysheetfile[Z(h.currentSheetIndex)].name+"!"+tt(h.luckysheet_select_save[0].column[0])+(h.luckysheet_select_save[0].row[0]+1)+":"+tt(h.luckysheet_select_save[0].column[1])+(h.luckysheet_select_save[0].row[1]+1))}else if($e.selectStatus){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop(),w=_t(k),x=w[1],C=w[0],S=w[2],_=wt(b),T=_[1],A=_[0],R=_[2],I=$e.selectRange[$e.selectRange.length-1],F=0,z=0,M=[];I.top>C?(F=C,z=I.top+I.height-C,I.row[1]>I.row_focus&&(I.row[1]=I.row_focus),M=[S,I.row[1]]):I.top==C?(F=C,z=I.top+I.height-C,M=[S,I.row[0]]):(F=I.top,z=x-I.top-1,I.row[0]<I.row_focus&&(I.row[0]=I.row_focus),M=[I.row[0],S]);let E=0,N=0,L=[];I.left>A?(E=A,N=I.left+I.width-A,I.column[1]>I.column_focus&&(I.column[1]=I.column_focus),L=[R,I.column[1]]):I.left==A?(E=A,N=I.left+I.width-A,L=[R,I.column[0]]):(E=I.left,N=T-I.left-1,I.column[0]<I.column_focus&&(I.column[0]=I.column_focus),L=[I.column[0],R]);let O=ke.mergeMoveMain(L,M,I,F,z,E,N);O!=null&&(L=O[0],M=O[1],F=O[2],z=O[3],E=O[4],N=O[5]),I.row=M,I.column=L,I.left_move=E,I.width_move=N,I.top_move=F,I.height_move=z,$e.selectRange[$e.selectRange.length-1]=I,Ot($e.selectRange);let V=$e.getTxtByRange($e.selectRange);$("#luckysheet-multiRange-dialog input").val(V)}else if(Ye.selectStatus){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop(),w=_t(k),x=w[1],C=w[0],S=w[2],_=wt(b),T=_[1],A=_[0],R=_[2],I=Ye.selectRange[Ye.selectRange.length-1],F=0,z=0,M=[];I.top>C?(F=C,z=I.top+I.height-C,I.row[1]>I.row_focus&&(I.row[1]=I.row_focus),M=[S,I.row[1]]):I.top==C?(F=C,z=I.top+I.height-C,M=[S,I.row[0]]):(F=I.top,z=x-I.top-1,I.row[0]<I.row_focus&&(I.row[0]=I.row_focus),M=[I.row[0],S]);let E=0,N=0,L=[];I.left>A?(E=A,N=I.left+I.width-A,I.column[1]>I.column_focus&&(I.column[1]=I.column_focus),L=[R,I.column[1]]):I.left==A?(E=A,N=I.left+I.width-A,L=[R,I.column[0]]):(E=I.left,N=T-I.left-1,I.column[0]<I.column_focus&&(I.column[0]=I.column_focus),L=[I.column[0],R]);let O=ke.mergeMoveMain(L,M,I,F,z,E,N);O!=null&&(L=O[0],M=O[1],F=O[2],z=O[3],E=O[4],N=O[5]),I.row=M,I.column=L,I.left_move=E,I.width_move=N,I.top_move=F,I.height_move=z,Ye.selectRange[Ye.selectRange.length-1]=I,Ot(Ye.selectRange);let V=Ye.getTxtByRange(Ye.selectRange);p.rangetosheet!=h.currentSheetIndex&&(V=h.luckysheetfile[Z(h.currentSheetIndex)].name+"!"+V),$("#luckysheet-dataVerificationRange-dialog input").val(V)}else if(p.rangestart)p.rangedrag(g);else if(p.rangedrag_row_start)p.rangedrag_row(g);else if(p.rangedrag_column_start)p.rangedrag_column(g);else if(h.luckysheet_rows_selected_status){let b=nt(g.pageX,g.pageY)[1]+$("#luckysheet-rows-h").scrollTop();if(b<0)return!1;let k=_t(b),w=k[1],x=k[0],C=k[2],S=h.visibledatacolumn.length-1,_=h.visibledatacolumn[S],T=0,A=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),R=0,I=0,F=[];A.top>x?(R=x,I=A.top+A.height-x,A.row[1]>A.row_focus&&(A.row[1]=A.row_focus),F=[C,A.row[1]]):A.top==x?(R=x,I=A.top+A.height-x,F=[C,A.row[0]]):(R=A.top,I=w-A.top-1,A.row[0]<A.row_focus&&(A.row[0]=A.row_focus),F=[A.row[0],C]),A.row=F,A.top_move=R,A.height_move=I,h.luckysheet_select_save[h.luckysheet_select_save.length-1]=A,lt(),clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},500)}else if(h.luckysheet_cols_selected_status){let b=nt(g.pageX,g.pageY)[0]+$("#luckysheet-cols-h-c").scrollLeft();if(b<0)return!1;let k=h.visibledatarow.length-1,w=h.visibledatarow[k],x=0,C=wt(b),S=C[1],_=C[0],T=C[2],A=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),R=0,I=0,F=[];A.left>_?(R=_,I=A.left+A.width-_,A.column[1]>A.column_focus&&(A.column[1]=A.column_focus),F=[T,A.column[1]]):A.left==_?(R=_,I=A.left+A.width-_,F=[T,A.column[0]]):(R=A.left,I=S-A.left-1,A.column[0]<A.column_focus&&(A.column[0]=A.column_focus),F=[A.column[0],T]),A.column=F,A.left_move=R,A.width_move=I,h.luckysheet_select_save[h.luckysheet_select_save.length-1]=A,lt(),clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},500)}else if(h.luckysheet_cell_selected_move){let v=nt(g.pageX,g.pageY),b=$("#luckysheet-cell-main").scrollLeft(),k=$("#luckysheet-cell-main").scrollTop(),w=v[0]+b,x=v[1]+k,C=$(window).height()+k-h.sheetBarHeight-h.statisticBarHeight,S=$(window).width()+b,_=_t(x),T=_[1],A=_[0],R=_[2],I=wt(w),F=I[1],z=I[0],M=I[2],E=h.luckysheet_cell_selected_move_index[0],N=h.luckysheet_cell_selected_move_index[1],L=h.luckysheet_select_save[0].row[0]-E+R,O=h.luckysheet_select_save[0].row[1]-E+R,V=h.luckysheet_select_save[0].column[0]-N+M,q=h.luckysheet_select_save[0].column[1]-N+M;(L<0||x<0)&&(L=0,O=h.luckysheet_select_save[0].row[1]-h.luckysheet_select_save[0].row[0]),(V<0||w<0)&&(V=0,q=h.luckysheet_select_save[0].column[1]-h.luckysheet_select_save[0].column[0]),(O>=h.visibledatarow[h.visibledatarow.length-1]||x>C)&&(L=h.visibledatarow.length-1-h.luckysheet_select_save[0].row[1]+h.luckysheet_select_save[0].row[0],O=h.visibledatarow.length-1),(q>=h.visibledatacolumn[h.visibledatacolumn.length-1]||w>S)&&(V=h.visibledatacolumn.length-1-h.luckysheet_select_save[0].column[1]+h.luckysheet_select_save[0].column[0],q=h.visibledatacolumn.length-1),z=V-1==-1?0:h.visibledatacolumn[V-1],F=h.visibledatacolumn[q],A=L-1==-1?0:h.visibledatarow[L-1],T=h.visibledatarow[O],$("#luckysheet-cell-selected-move").css({left:z,width:F-z-2,top:A,height:T-A-2,display:"block"})}else if(h.luckysheet_cell_selected_extend){let v=nt(g.pageX,g.pageY),b=$("#luckysheet-cell-main").scrollLeft()-5,k=$("#luckysheet-cell-main").scrollTop()-5,w=v[0]+b,x=v[1]+k,C=$(window).height()+k-h.sheetBarHeight-h.statisticBarHeight,S=$(window).width()+b,_=_t(x),T=_[1],A=_[0],R=_[2],I=wt(w),F=I[1],z=I[0],M=I[2],E=h.luckysheet_cell_selected_extend_index[0],N=h.luckysheet_cell_selected_extend_index[1],L=h.luckysheet_select_save[0].row[0],O=h.luckysheet_select_save[0].row[1],V=h.luckysheet_select_save[0].column[0],q=h.luckysheet_select_save[0].column[1];(L<0||x<0)&&(L=0,O=h.luckysheet_select_save[0].row[1]-h.luckysheet_select_save[0].row[0]),(V<0||w<0)&&(V=0,q=h.luckysheet_select_save[0].column[1]-h.luckysheet_select_save[0].column[0]),(O>=h.visibledatarow[h.visibledatarow.length-1]||x>C)&&(L=h.visibledatarow.length-1-h.luckysheet_select_save[0].row[1]+h.luckysheet_select_save[0].row[0],O=h.visibledatarow.length-1),(q>=h.visibledatacolumn[h.visibledatacolumn.length-1]||w>S)&&(V=h.visibledatacolumn.length-1-h.luckysheet_select_save[0].column[1]+h.luckysheet_select_save[0].column[0],q=h.visibledatacolumn.length-1);let W=h.luckysheet_select_save[0].top_move,X=h.luckysheet_select_save[0].height_move,te=h.luckysheet_select_save[0].left_move,le=h.luckysheet_select_save[0].width_move;Math.abs(E-R)>Math.abs(N-M)?R>=L&&R<=O||(h.luckysheet_select_save[0].top_move>=A?(W=A,X=h.luckysheet_select_save[0].top_move+h.luckysheet_select_save[0].height_move-A):(W=h.luckysheet_select_save[0].top_move,X=T-h.luckysheet_select_save[0].top_move-1)):M>=V&&M<=q||(h.luckysheet_select_save[0].left_move>=z?(te=z,le=h.luckysheet_select_save[0].left_move+h.luckysheet_select_save[0].width_move-z):(te=h.luckysheet_select_save[0].left_move,le=F-h.luckysheet_select_save[0].left_move-1)),$("#luckysheet-cell-selected-extend").css({left:te,width:le,top:W,height:X,display:"block"})}else if(h.luckysheet_cols_change_size){let v=nt(g.pageX,g.pageY),b=$("#luckysheet-cols-h-c").scrollLeft(),k=v[0]+b,w=$(window).width(),x=h.visibledatarow.length-1,C=h.visibledatarow[x],S=0,_=wt(k),T=_[1],A=_[0],R=_[2];k+3-h.luckysheet_cols_change_size_start[0]>30&&k<w+b-100&&($("#luckysheet-change-size-line").css({left:k}),$("#luckysheet-cols-change-size").css({left:k-2}))}else if(h.luckysheet_rows_change_size){let v=nt(g.pageX,g.pageY),b=$("#luckysheet-rows-h").scrollTop(),k=v[1]+b,w=$(window).height(),x=_t(k),C=x[1],S=x[0],_=x[2];k+3-h.luckysheet_rows_change_size_start[0]>19&&k<w+b-200&&($("#luckysheet-change-size-line").css({top:k}),$("#luckysheet-rows-change-size").css({top:k}))}else if(h.chartparam.luckysheetCurrentChartMove){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop(),w=h.chartparam.luckysheetCurrentChartMoveObj.height(),x=h.chartparam.luckysheetCurrentChartMoveObj.width(),C=k-h.chartparam.luckysheetCurrentChartMoveXy[1],S=b-h.chartparam.luckysheetCurrentChartMoveXy[0];if(C<0&&(C=0),C+w+42+6>h.chartparam.luckysheetCurrentChartMoveWinH&&(C=h.chartparam.luckysheetCurrentChartMoveWinH-w-42-6),S<0&&(S=0),S+x+22+36>h.chartparam.luckysheetCurrentChartMoveWinW&&(S=h.chartparam.luckysheetCurrentChartMoveWinW-x-22-36),h.chartparam.luckysheetCurrentChartMoveObj.css({top:C,left:S}),Y.freezenhorizontaldata!=null||Y.freezenverticaldata!=null){Y.scrollAdapt();let _=h.chartparam.luckysheetCurrentChartMoveObj.offset(),T=h.chartparam.luckysheetCurrentChartMoveObj.position();h.chartparam.luckysheetCurrentChartMoveXy=[g.pageX-_.left,g.pageY-_.top,T.left,T.top,$("#luckysheet-scrollbar-x").scrollLeft(),$("#luckysheet-scrollbar-y").scrollTop()]}}else if(h.chartparam.luckysheetCurrentChartResize){let v=$("#luckysheet-cell-main").scrollTop(),b=$("#luckysheet-cell-main").scrollLeft(),k=nt(g.pageX,g.pageY),w=k[0]+b,x=k[1]+v;if(w<0||x<0)return!1;let C=h.chartparam.luckysheetCurrentChartResizeObj.height(),S=h.chartparam.luckysheetCurrentChartResizeObj.width(),_=x-h.chartparam.luckysheetCurrentChartResizeXy[1],T=w-h.chartparam.luckysheetCurrentChartResizeXy[0],A=h.chartparam.luckysheetCurrentChartResizeXy[5],R=h.chartparam.luckysheetCurrentChartResizeXy[3],I=h.chartparam.luckysheetCurrentChartResizeXy[4],F=h.chartparam.luckysheetCurrentChartResizeXy[2];(h.chartparam.luckysheetCurrentChartResize=="lm"||h.chartparam.luckysheetCurrentChartResize=="lt"||h.chartparam.luckysheetCurrentChartResize=="lb")&&(I=w,F=h.chartparam.luckysheetCurrentChartResizeXy[2]-T,I>h.chartparam.luckysheetCurrentChartResizeXy[2]+h.chartparam.luckysheetCurrentChartResizeXy[4]-60?(I=h.chartparam.luckysheetCurrentChartResizeXy[2]+h.chartparam.luckysheetCurrentChartResizeXy[4]-60,F=h.chartparam.luckysheetCurrentChartResizeXy[2]-(h.chartparam.luckysheetCurrentChartResizeXy[2]+h.chartparam.luckysheetCurrentChartResizeXy[4]-60-h.chartparam.luckysheetCurrentChartResizeXy[0])):I<=0&&(I=0,F=h.chartparam.luckysheetCurrentChartResizeXy[2]+h.chartparam.luckysheetCurrentChartResizeXy[0])),(h.chartparam.luckysheetCurrentChartResize=="rm"||h.chartparam.luckysheetCurrentChartResize=="rt"||h.chartparam.luckysheetCurrentChartResize=="rb")&&(F=h.chartparam.luckysheetCurrentChartResizeXy[2]+T,F<60?F=60:F>=h.chartparam.luckysheetCurrentChartResizeWinW-h.chartparam.luckysheetCurrentChartResizeXy[4]-22-36&&(F=h.chartparam.luckysheetCurrentChartResizeWinW-h.chartparam.luckysheetCurrentChartResizeXy[4]-22-36)),(h.chartparam.luckysheetCurrentChartResize=="mt"||h.chartparam.luckysheetCurrentChartResize=="lt"||h.chartparam.luckysheetCurrentChartResize=="rt")&&(A=x,R=h.chartparam.luckysheetCurrentChartResizeXy[3]-_,A>h.chartparam.luckysheetCurrentChartResizeXy[3]+h.chartparam.luckysheetCurrentChartResizeXy[5]-60?(A=h.chartparam.luckysheetCurrentChartResizeXy[3]+h.chartparam.luckysheetCurrentChartResizeXy[5]-60,R=h.chartparam.luckysheetCurrentChartResizeXy[3]-(h.chartparam.luckysheetCurrentChartResizeXy[3]+h.chartparam.luckysheetCurrentChartResizeXy[5]-60-h.chartparam.luckysheetCurrentChartResizeXy[1])):A<=0&&(A=0,R=h.chartparam.luckysheetCurrentChartResizeXy[3]+h.chartparam.luckysheetCurrentChartResizeXy[1])),(h.chartparam.luckysheetCurrentChartResize=="mb"||h.chartparam.luckysheetCurrentChartResize=="lb"||h.chartparam.luckysheetCurrentChartResize=="rb")&&(R=h.chartparam.luckysheetCurrentChartResizeXy[3]+_,R<60?R=60:R>=h.chartparam.luckysheetCurrentChartResizeWinH-h.chartparam.luckysheetCurrentChartResizeXy[5]-42-6&&(R=h.chartparam.luckysheetCurrentChartResizeWinH-h.chartparam.luckysheetCurrentChartResizeXy[5]-42-6));let z={top:A,left:I,height:R,width:F};h.chartparam.luckysheetCurrentChartResizeObj.css(z),h.resizeChart(h.chartparam.luckysheetCurrentChart)}else if(Re.move){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop(),w=Re.images[Re.currentImgId];w.isFixedPos&&(b=g.pageX,k=g.pageY);let x=$("#luckysheet-modal-dialog-activeImage").height(),C=$("#luckysheet-modal-dialog-activeImage").width(),S=k-Re.moveXY[1],_=b-Re.moveXY[0],T=0,A=Re.currentWinH-x-42-6,R=0,I=Re.currentWinW-C-22-36;w.isFixedPos&&(T=h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight,A=T+h.cellmainHeight-h.cellMainSrollBarSize-x,R=h.rowHeaderWidth,I=R+h.cellmainWidth-h.cellMainSrollBarSize-C),S<T&&(S=T),S>A&&(S=A),_<R&&(_=R),_>I&&(_=I),$("#luckysheet-modal-dialog-activeImage").css({left:_,top:S})}else if(Re.resize){let v=nt(g.pageX,g.pageY),b=$("#luckysheet-cell-main").scrollLeft(),k=$("#luckysheet-cell-main").scrollTop(),w=v[0]+b,x=v[1]+k;if(w<0||x<0)return!1;let C=Re.resizeXY,S=x-C[1],_=w-C[0],T=C[5],A=C[3],R=C[4],I=C[2],F=Re.resize,z=Re.images[Re.currentImgId];if(z.isFixedPos){let q=h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight,W=h.rowHeaderWidth;F=="lt"?(R=C[4]-C[6]+_,R<W&&(R=W),R>C[4]-C[6]+C[2]-1&&(R=C[4]-C[6]+C[2]-1),I=C[4]-C[6]+C[2]-R,A=Math.round(I*(C[3]/C[2])),T=C[5]-C[7]+C[3]-A,T<q&&(T=q,A=C[5]-C[7]+C[3]-T,I=Math.round(A*(C[2]/C[3])),R=C[4]-C[6]+C[2]-I),T>C[5]-C[7]+C[3]-1&&(T=C[5]-C[7]+C[3]-1,A=C[5]-C[7]+C[3]-T,I=Math.round(A*(C[2]/C[3])),R=C[4]-C[6]+C[2]-I)):F=="lm"?(R=C[4]-C[6]+_,R<W&&(R=W),R>C[4]-C[6]+C[2]-1&&(R=C[4]-C[6]+C[2]-1),I=C[4]-C[6]+C[2]-R,T=C[5]-C[7],A=C[3]):F=="lb"?(R=C[4]-C[6]+_,R<W&&(R=W),R>C[4]-C[6]+C[2]-1&&(R=C[4]-C[6]+C[2]-1),I=C[4]-C[6]+C[2]-R,A=Math.round(I*(C[3]/C[2])),T=C[5]-C[7],A<1&&(A=1,I=Math.round(A*(C[2]/C[3])),R=C[4]-C[6]+C[2]-I),A>q+h.cellmainHeight-h.cellMainSrollBarSize-T&&(A=q+h.cellmainHeight-h.cellMainSrollBarSize-T,I=Math.round(A*(C[2]/C[3])),R=C[4]-C[6]+C[2]-I)):F=="rt"?(R=C[4]-C[6],I=C[2]+_,I<1&&(I=1),I>W+h.cellmainWidth-h.cellMainSrollBarSize-R&&(I=W+h.cellmainWidth-h.cellMainSrollBarSize-R),A=Math.round(I*(C[3]/C[2])),T=C[5]-C[7]+C[3]-A,T<q&&(T=q,A=C[5]-C[7]+C[3]-T,I=Math.round(A*(C[2]/C[3]))),T>C[5]-C[7]+C[3]-1&&(T=C[5]-C[7]+C[3]-1,A=C[5]-C[7]+C[3]-T,I=Math.round(A*(C[2]/C[3])))):F=="rm"?(R=C[4]-C[6],I=C[2]+_,I<1&&(I=1),I>W+h.cellmainWidth-h.cellMainSrollBarSize-R&&(I=W+h.cellmainWidth-h.cellMainSrollBarSize-R),T=C[5]-C[7],A=C[3]):F=="rb"?(R=C[4]-C[6],I=C[2]+_,I<1&&(I=1),I>W+h.cellmainWidth-h.cellMainSrollBarSize-R&&(I=W+h.cellmainWidth-h.cellMainSrollBarSize-R),A=Math.round(I*(C[3]/C[2])),T=C[5]-C[7],A<1&&(A=1,I=Math.round(A*(C[2]/C[3]))),A>q+h.cellmainHeight-h.cellMainSrollBarSize-T&&(A=q+h.cellmainHeight-h.cellMainSrollBarSize-T,I=Math.round(A*(C[2]/C[3])))):F=="mt"?(R=C[4]-C[6],I=C[2],T=C[5]-C[7]+S,T<q&&(T=q),T>C[5]-C[7]+C[3]-1&&(T=C[5]-C[7]+C[3]-1),A=C[5]-C[7]+C[3]-T):F=="mb"&&(R=C[4]-C[6],I=C[2],T=C[5]-C[7],A=C[3]+S,A<1&&(A=1),A>q+h.cellmainHeight-h.cellMainSrollBarSize-T&&(A=q+h.cellmainHeight-h.cellMainSrollBarSize-T))}else F=="lt"?(R=w,I=C[2]-_,R>C[2]+C[4]-1?(R=C[2]+C[4]-1,I=C[2]+C[0]-(C[2]+C[4]-1)):R<=0&&(R=0,I=C[2]+C[0]),A=Math.round(I*(C[3]/C[2])),T=C[3]+C[1]-A,T>C[3]+C[5]-1?(T=C[3]+C[5]-1,A=C[3]+C[1]-(C[3]+C[5]-1),I=Math.round(A*(C[2]/C[3])),R=C[2]+C[0]-I):T<=0&&(T=0,A=C[3]+C[1],I=Math.round(A*(C[2]/C[3])),R=C[2]+C[0]-I)):F=="lm"?(R=w,I=C[2]-_,R>C[2]+C[4]-1?(R=C[2]+C[4]-1,I=C[2]+C[0]-(C[2]+C[4]-1)):R<=0&&(R=0,I=C[2]+C[0])):F=="lb"?(R=w,I=C[2]-_,R>C[2]+C[4]-1?(R=C[2]+C[4]-1,I=C[2]+C[0]-(C[2]+C[4]-1)):R<=0&&(R=0,I=C[2]+C[0]),A=Math.round(I*(C[3]/C[2])),A<1?(A=1,I=Math.round(A*(C[2]/C[3])),R=C[2]+C[0]-I):A>=Re.currentWinH-C[5]-42-6&&(A=Re.currentWinH-C[5]-42-6,I=Math.round(A*(C[2]/C[3])),R=C[2]+C[0]-I)):F=="rt"?(I=C[2]+_,I<1?I=1:I>=Re.currentWinW-C[4]-22-36&&(I=Re.currentWinW-C[4]-22-36),A=Math.round(I*(C[3]/C[2])),T=C[3]+C[1]-A,T>C[3]+C[5]-1?(T=C[3]+C[5]-1,A=C[3]+C[1]-(C[3]+C[5]-1),I=Math.round(A*(C[2]/C[3]))):T<=0&&(T=0,A=C[3]+C[1],I=Math.round(A*(C[2]/C[3])))):F=="rm"?(I=C[2]+_,I<1?I=1:I>=Re.currentWinW-C[4]-22-36&&(I=Re.currentWinW-C[4]-22-36)):F=="rb"?(I=C[2]+_,I<1?I=1:I>=Re.currentWinW-C[4]-22-36&&(I=Re.currentWinW-C[4]-22-36),A=Math.round(I*(C[3]/C[2])),A<1?(A=1,I=Math.round(A*(C[2]/C[3]))):A>=Re.currentWinH-C[5]-42-6&&(A=Re.currentWinH-C[5]-42-6,I=Math.round(A*(C[2]/C[3])))):F=="mt"?(T=x,A=C[3]-S,T>C[3]+C[5]-1?(T=C[3]+C[5]-1,A=C[3]+C[1]-(C[3]+C[5]-1)):T<=0&&(T=0,A=C[3]+C[1])):F=="mb"&&(A=C[3]+S,A<1?A=1:A>=Re.currentWinH-C[5]-42-6&&(A=Re.currentWinH-C[5]-42-6));$("#luckysheet-modal-dialog-activeImage").css({width:I,height:A,left:R,top:T});let M=I/z.crop.width,E=A/z.crop.height,N=Math.round(z.default.width*M),L=Math.round(z.default.height*E),O=Math.round(z.crop.offsetLeft*M),V=Math.round(z.crop.offsetTop*E);$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-content").css({"background-size":N+"px "+L+"px","background-position":-O+"px "+-V+"px"})}else if(Re.cropChange){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop();if(b<0||k<0)return!1;let w=Re.cropChangeXY,x=k-w[1],C=b-w[0],S=Re.images[Re.currentImgId],_=Re.cropChange,T,A,R,I;_=="lt"?(R=S.crop.offsetLeft+C,R<0&&(R=0),R>S.crop.width+S.crop.offsetLeft-1&&(R=S.crop.width+S.crop.offsetLeft-1),T=S.crop.width+S.crop.offsetLeft-R,I=S.crop.offsetTop+x,I<0&&(I=0),I>S.crop.height+S.crop.offsetTop-1&&(I=S.crop.height+S.crop.offsetTop-1),A=S.crop.height+S.crop.offsetTop-I):_=="lm"?(R=S.crop.offsetLeft+C,R<0&&(R=0),R>S.crop.width+S.crop.offsetLeft-1&&(R=S.crop.width+S.crop.offsetLeft-1),T=S.crop.width+S.crop.offsetLeft-R,I=S.crop.offsetTop,A=S.crop.height):_=="lb"?(R=S.crop.offsetLeft+C,R<0&&(R=0),R>S.crop.width+S.crop.offsetLeft-1&&(R=S.crop.width+S.crop.offsetLeft-1),T=S.crop.width+S.crop.offsetLeft-R,I=S.crop.offsetTop,A=S.crop.height+x,A<1&&(A=1),A>S.default.height-I&&(A=S.default.height-I)):_=="rt"?(R=S.crop.offsetLeft,T=S.crop.width+C,T<1&&(T=1),T>S.default.width-R&&(T=S.default.width-R),I=S.crop.offsetTop+x,I<0&&(I=0),I>S.crop.height+S.crop.offsetTop-1&&(I=S.crop.height+S.crop.offsetTop-1),A=S.crop.height+S.crop.offsetTop-I):_=="rm"?(R=S.crop.offsetLeft,T=S.crop.width+C,T<1&&(T=1),T>S.default.width-R&&(T=S.default.width-R),I=S.crop.offsetTop,A=S.crop.height):_=="rb"?(R=S.crop.offsetLeft,T=S.crop.width+C,T<1&&(T=1),T>S.default.width-R&&(T=S.default.width-R),I=S.crop.offsetTop,A=S.crop.height+x,A<1&&(A=1),A>S.default.height-I&&(A=S.default.height-I)):_=="mt"?(R=S.crop.offsetLeft,T=S.crop.width,I=S.crop.offsetTop+x,I<0&&(I=0),I>S.crop.height+S.crop.offsetTop-1&&(I=S.crop.height+S.crop.offsetTop-1),A=S.crop.height+S.crop.offsetTop-I):_=="mb"&&(R=S.crop.offsetLeft,T=S.crop.width,I=S.crop.offsetTop,A=S.crop.height+x,A<1&&(A=1),A>S.default.height-I&&(A=S.default.height-I));let F=S.default.left+R,z=S.default.top+I;S.isFixedPos&&(F=S.fixedLeft+R,z=S.fixedTop+I),$("#luckysheet-modal-dialog-cropping").show().css({width:T,height:A,left:F,top:z});let M=h.toJsonOptions&&h.toJsonOptions.imageUrlHandle,E=typeof M=="function"?M(S.src):S.src;$("#luckysheet-modal-dialog-cropping .cropping-mask").css({width:S.default.width,height:S.default.height,"background-image":"url("+E+")",left:-R,top:-I}),$("#luckysheet-modal-dialog-cropping .cropping-content").css({"background-image":"url("+E+")","background-size":S.default.width+"px "+S.default.height+"px","background-position":-R+"px "+-I+"px"}),Re.cropChangeObj={width:T,height:A,offsetLeft:R,offsetTop:I}}else if(He.move){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop(),w=He.currentObj.outerHeight(),x=He.currentObj.outerWidth(),C=k-He.moveXY[1],S=b-He.moveXY[0];C<0&&(C=0),C+w+42+6>He.currentWinH&&(C=He.currentWinH-w-42-6),S<0&&(S=0),S+x+22+36>He.currentWinW&&(S=He.currentWinW-x-22-36),He.currentObj.css({left:S,top:C})}else if(He.resize){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop();if(b<0||k<0)return!1;let w=He.resizeXY,x=k-w[1],C=b-w[0],S=w[5],_=w[3],T=w[4],A=w[2],R=He.resize;(R=="lm"||R=="lt"||R=="lb")&&(T=b,A=w[2]-C,T>w[2]+w[4]-60?(T=w[2]+w[4]-60,A=w[2]-(w[2]+w[4]-60-w[0])):T<=0&&(T=0,A=w[2]+w[0])),(R=="rm"||R=="rt"||R=="rb")&&(A=w[2]+C,A<60?A=60:A>=He.currentWinW-w[4]-22-36&&(A=He.currentWinW-w[4]-22-36)),(R=="mt"||R=="lt"||R=="rt")&&(S=k,_=w[3]-x,S>w[3]+w[5]-60?(S=w[3]+w[5]-60,_=w[3]-(w[3]+w[5]-60-w[1])):S<=0&&(S=0,_=w[3]+w[1])),(R=="mb"||R=="lb"||R=="rb")&&(_=w[3]+x,_<60?_=60:_>=He.currentWinH-w[5]-42-6&&(_=He.currentWinH-w[5]-42-6)),He.currentObj.css({width:A,height:_,left:T,top:S})}else p.rangeResize?p.rangeResizeDraging(g,p.rangeResizeObj,p.rangeResizexy,p.rangeResize,p.rangeResizeWinW,p.rangeResizeWinH,h.ch_width,h.rh_height):p.rangeMove?p.rangeMoveDraging(g,p.rangeMovexy,p.rangeMoveObj.data("range"),p.rangeMoveObj,h.sheetBarHeight,h.statisticBarHeight):h.chart_selection.rangeResize?h.chart_selection.rangeResizeDraging(g,h.sheetBarHeight,h.statisticBarHeight):h.chart_selection.rangeMove&&h.chart_selection.rangeMoveDraging(g,h.sheetBarHeight,h.statisticBarHeight);h.jfautoscrollTimeout=window.requestAnimationFrame(y)};h.luckysheet_select_status&&(clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},500)),h.jfautoscrollTimeout=window.requestAnimationFrame(y)}}),$(document).on("mouseup.luckysheetEvent",function(g){if(fe&&fe.hook&&fe.hook.sheetMouseup){let F=nt(g.pageX,g.pageY),z=F[0]+$("#luckysheet-cell-main").scrollLeft(),M=F[1]+$("#luckysheet-cell-main").scrollTop(),E=_t(M),N=E[1],L=E[0],O=E[2],V=wt(z),q=V[1],W=V[0],X=V[2],te=ke.mergeborer(h.flowdata,O,X);te&&(N=te.row[1],L=te.row[0],O=te.row[2],q=te.column[1],W=te.column[0],X=te.column[2]);let le=ve.getSheetByIndex(),oe={functionResizeStatus:p.functionResizeStatus,horizontalmoveState:!!Y.horizontalmovestate,verticalmoveState:!!Y.verticalmovestate,pivotTableMoveState:!!Oe&&Oe.movestate,sheetMoveStatus:h.luckysheet_sheet_move_status,scrollStatus:!!h.luckysheet_scroll_status,selectStatus:!!h.luckysheet_select_status,rowsSelectedStatus:!!h.luckysheet_rows_selected_status,colsSelectedStatus:!!h.luckysheet_cols_selected_status,cellSelectedMove:!!h.luckysheet_cell_selected_move,cellSelectedExtend:!!h.luckysheet_cell_selected_extend,colsChangeSize:!!h.luckysheet_cols_change_size,rowsChangeSize:!!h.luckysheet_rows_change_size,chartMove:!!h.chartparam.luckysheetCurrentChartMove,chartResize:!!h.chartparam.luckysheetCurrentChartResize,rangeResize:!!p.rangeResize,rangeMove:!!p.rangeMove},se=$("#luckysheetTableContent").get(0).getContext("2d");Je.createHookFunction("sheetMouseup",h.flowdata[O][X],{r:O,c:X,start_r:L,start_c:W,end_r:N,end_c:q},le,oe,se)}if(h.luckysheet_select_status&&(clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},0),ke.luckysheetPaintModelOn&&(Ct.pasteHandlerOfPaintModel(h.luckysheet_copy_save),ke.luckysheetPaintSingle&&ke.cancelPaintModel())),h.luckysheet_select_status=!1,window.cancelAnimationFrame(h.jfautoscrollTimeout),h.luckysheet_scroll_status=!1,$("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle").css("cursor","crosshair").end().find(".luckysheet-cs-draghandle").css("cursor","move"),$("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","default"),h.luckysheet_rows_selected_status=!1,h.luckysheet_cols_selected_status=!1,h.luckysheet_model_move_state=!1,p.functionResizeStatus&&(p.functionResizeStatus=!1,$("#luckysheet-wa-calculate-size").removeAttr("style")),Y.horizontalmovestate&&(Y.horizontalmovestate=!1,$("#luckysheet-freezebar-horizontal").removeClass("luckysheet-freezebar-active"),$("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css("cursor","-webkit-grab"),Y.freezenhorizontaldata[4]<=h.columnHeaderHeight&&Y.cancelFreezenHorizontal(),Y.createAssistCanvas(),Be()),Y.verticalmovestate&&(Y.verticalmovestate=!1,$("#luckysheet-freezebar-vertical").removeClass("luckysheet-freezebar-active"),$("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css("cursor","-webkit-grab"),Y.freezenverticaldata[4]<=h.rowHeaderWidth&&Y.cancelFreezenVertical(),Y.createAssistCanvas(),Be()),!!Oe&&Oe.movestate&&($("#luckysheet-modal-dialog-slider-pivot-move").remove(),Oe.movestate=!1,$("#luckysheet-modal-dialog-pivotTable-list, #luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").css("cursor","default"),Oe.movesave.containerid!="luckysheet-modal-dialog-pivotTable-list"&&$(g.target).closest(".luckysheet-modal-dialog-slider-config-list").length==0&&(Oe.movesave.containerid=="luckysheet-modal-dialog-config-value"&&Oe.resetOrderby(Oe.movesave.obj),Oe.movesave.obj.remove(),Oe.showvaluecolrow(),$("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function(){$(this).find(".luckysheet-slider-list-item-selected").find("i").remove()}),$("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function(){let z=$(this).data("index");$("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function(){let M=$(this).find(".luckysheet-slider-list-item-selected");$(this).data("index")==z&&M.find("i").length==0&&M.append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>')})}),Oe.refreshPivotTable())),h.luckysheet_sheet_move_status&&(h.luckysheet_sheet_move_status=!1,h.luckysheet_sheet_move_data.activeobject.insertBefore($("#luckysheet-sheets-item-clone")),h.luckysheet_sheet_move_data.activeobject.removeAttr("style"),$("#luckysheet-sheets-item-clone").remove(),h.luckysheet_sheet_move_data.cursorobject.css({cursor:"pointer"}),h.luckysheet_sheet_move_data={},ve.reOrderAllSheet()),clearTimeout(h.chartparam.luckysheetCurrentChartMoveTimeout),h.chartparam.luckysheetCurrentChartMove&&(h.chartparam.luckysheetCurrentChartMove=!1,h.chartparam.luckysheetInsertChartTosheetChange)){var y=h.chartparam.luckysheetCurrentChartMoveObj.css("top"),v=h.chartparam.luckysheetCurrentChartMoveObj.css("left"),b=$("#luckysheet-cell-main").scrollLeft(),k=$("#luckysheet-cell-main").scrollTop(),w=h.chartparam.luckysheetCurrentChartMoveXy[2],x=h.chartparam.luckysheetCurrentChartMoveXy[3],C=h.chartparam.luckysheetCurrentChartMoveXy[4],S=h.chartparam.luckysheetCurrentChartMoveXy[5],_=h.chartparam.luckysheetCurrentChartMoveObj.find(".luckysheet-modal-dialog-content").attr("id");h.jfredo.push({type:"moveChart",chart_id:_,sheetIndex:h.currentSheetIndex,myTop:y,myLeft:v,scrollTop:k,scrollLeft:b,x:w,y:x,scrollTop1:S,scrollLeft1:C})}if(h.chartparam.luckysheetCurrentChartResize&&(h.chartparam.luckysheetCurrentChartResize=null,h.chartparam.luckysheetInsertChartTosheetChange)){var T=h.chartparam.luckysheetCurrentChartResizeObj.height(),A=h.chartparam.luckysheetCurrentChartResizeObj.width(),b=$("#luckysheet-cell-main").scrollLeft(),k=$("#luckysheet-cell-main").scrollTop(),y=h.chartparam.luckysheetCurrentChartMoveObj.css("top"),v=h.chartparam.luckysheetCurrentChartMoveObj.css("left"),_=h.chartparam.luckysheetCurrentChartResizeObj.find(".luckysheet-modal-dialog-content").attr("id"),R=h.chartparam.luckysheetCurrentChartResizeXy[2],I=h.chartparam.luckysheetCurrentChartResizeXy[3],w=h.chartparam.luckysheetCurrentChartResizeXy[4],x=h.chartparam.luckysheetCurrentChartResizeXy[5],C=h.chartparam.luckysheetCurrentChartResizeXy[6],S=h.chartparam.luckysheetCurrentChartResizeXy[7];h.jfredo.push({type:"resizeChart",chart_id:_,sheetIndex:h.currentSheetIndex,myTop:y,myLeft:v,myHeight:T,myWidth:A,scrollTop:k,scrollLeft:b,x:w,y:x,myWidth1:R,myHeight1:I,scrollTop1:S,scrollLeft1:C})}if(p.rangeResize&&p.rangeResizeDragged(g,p.rangeResizeObj,p.rangeResize,p.rangeResizexy,p.rangeResizeWinW,p.rangeResizeWinH),Re.move&&Re.moveImgItem(),Re.resize&&Re.resizeImgItem(),Re.cropChange&&Re.cropChangeImgItem(),He.move){He.move=!1;let F=He.currentObj.closest(".luckysheet-postil-show").attr("id"),z=F.split("luckysheet-postil-show_")[1].split("_")[0],M=F.split("luckysheet-postil-show_")[1].split("_")[1],E=xe.deepCopyFlowData(h.flowdata),N=[];E[z][M].ps.left=He.currentObj.position().left,E[z][M].ps.top=He.currentObj.position().top,E[z][M].ps.value=He.currentObj.find(".formulaInputFocus").html().replaceAll("<div>",` |
| | | <button class="btn btn-default luckysheet-model-close-btn">${t.cancel}</button>`,style:"z-index:100003"})),xb()}function dm(){_b();let e=Q(),n=e.cellFormat,t=e.button;if($("#luckysheet-rightclick-menu").hide(),!jr(h.currentSheetIndex))return;let l=!1,a=!1,o=0,s=0,u=0;if(h.luckysheet_select_save!=null&&h.luckysheet_select_save.length>0)fm(function(m){(m==null||m.lo==null||m.lo==1)&&(l=!0,o++),m!=null&&m.hi==1&&(a=!0,s++),u++},function(){l=!0});else{alert(n.selectionIsNullAlert);return}let f="",d="";l&&(f=o==u?n.tipsAll:n.tipsPart),a&&(d=s==u?n.tipsAll:n.tipsPart),$("#luckysheet-protection-check-locked").prop("checked",l).parent().next().html(f),$("#luckysheet-protection-check-hidden").prop("checked",a).parent().next().html(d),da("luckysheet-cellFormat-config")}var hm,mm=Ie(()=>{Xe();ft();Gt();dl();il();Ml();Yt();bt();$r();hm=!1});function Ko(e){let n=$("#luckysheet-cell-main"),t=$("#luckysheet-scrollbar-x").scrollLeft(),l=$("#luckysheet-scrollbar-y").scrollTop(),a=$("#luckysheetTableContent").height();if(Y.freezenhorizontaldata!=null&&l<Y.freezenhorizontaldata[2]){l=Y.freezenhorizontaldata[2],$("#luckysheet-scrollbar-y").scrollTop(l);return}if(Y.freezenverticaldata!=null&&t<Y.freezenverticaldata[2]){t=Y.freezenverticaldata[2],$("#luckysheet-scrollbar-x").scrollLeft(t);return}$("#luckysheet-cols-h-c").scrollLeft(t),$("#luckysheet-rows-h").scrollTop(l),n.scrollLeft(t).scrollTop(l),$("#luckysheet-input-box-index").css({left:$("#luckysheet-input-box").css("left"),top:parseInt($("#luckysheet-input-box").css("top"))-20+"px","z-index":$("#luckysheet-input-box").css("z-index")}).show(),Be(t,l),$("#luckysheet-bottom-controll-row").css("left",t),(Y.freezenhorizontaldata!=null||Y.freezenverticaldata!=null)&&Y.scrollAdapt(),!!Je.createHookFunction("scroll",{scrollLeft:t,scrollTop:l,canvasHeight:a})}var pm=Ie(()=>{Vl();Lr();Yt();Xe();Ll()});function Qc(){let e=fr.detectOS();fr.mobilecheck()&&Zc(),Date.now||(Date.now=function(){return new Date().getTime()}),function(){"use strict";for(var g=["webkit","moz"],y=0;y<g.length&&!window.requestAnimationFrame;++y){var v=g[y];window.requestAnimationFrame=window[v+"RequestAnimationFrame"],window.cancelAnimationFrame=window[v+"CancelAnimationFrame"]||window[v+"CancelRequestAnimationFrame"]}if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){var b=0;window.requestAnimationFrame=function(k){var w=Date.now(),x=Math.max(b+16,w);return setTimeout(function(){k(b=x)},x-w)},window.cancelAnimationFrame=clearTimeout}}(),$("#luckysheet-sheet-container-c").mousewheel(function(g,y){let v=g.deltaFactor<40?1:g.deltaFactor<80?2:3,b=$(this).scrollLeft();g.deltaY!=0?g.deltaY<0?b=b+10*v:b=b-10*v:g.deltaX!=0&&(g.deltaX>0?b=b+10*v:b=b-10*v),$(this).scrollLeft(b),g.preventDefault()}),$("#luckysheet-cell-main").scroll(function(){}).mousewheel(function(g,y){g.preventDefault()});let t=Q(),l=t.drag,a=t.info,o,s;$("#luckysheet-grid-window-1").mousewheel(function(g,y){let v=$("#luckysheet-scrollbar-x").scrollLeft(),b=$("#luckysheet-scrollbar-y").scrollTop(),k=h.visibledatacolumn,w=h.visibledatarow;Y.freezenhorizontaldata!=null&&(w=Y.freezenhorizontaldata[3]),Y.freezenverticaldata!=null&&(k=Y.freezenverticaldata[3]),clearTimeout(s),h.visibledatacolumn_unique!=null?k=h.visibledatacolumn_unique:(k=Kc(k),h.visibledatacolumn_unique=k),h.visibledatarow_unique!=null?w=h.visibledatarow_unique:(w=Kc(w),h.visibledatarow_unique=w);let x=st(k,v),C=st(w,b);Y.freezenhorizontaldata!=null&&(C=st(w,b+Y.freezenhorizontaldata[0]));let S=0,_=0,T=g.deltaFactor<40?1:g.deltaFactor<80?2:3;if(g.deltaY!=0){let A,R=Math.round(T/h.zoomRatio);R=R<1?1:R,g.deltaY<0?(A=C+R,A>=w.length&&(A=w.length-1)):(A=C-R,A<0&&(A=0)),_=A==0?0:w[A-1],Y.freezenhorizontaldata!=null&&(_-=Y.freezenhorizontaldata[0]),$("#luckysheet-scrollbar-y").scrollTop(_)}else if(g.deltaX!=0){let A;g.deltaX>0?v=v+20*h.zoomRatio:v=v-20*h.zoomRatio,$("#luckysheet-scrollbar-x").scrollLeft(v)}s=setTimeout(()=>{h.visibledatacolumn_unique=null,h.visibledatarow_unique=null},500)}),$("#luckysheet-scrollbar-x").scroll(function(){Ko()}).mousewheel(function(g,y){g.preventDefault()}),$("#luckysheet-scrollbar-y").scroll(function(){Ko()}).mousewheel(function(g,y){g.preventDefault()}),$(window).resize(function(){document.getElementById(h.container)&&zt()}),$("#luckysheet-rich-text-editor").mouseup(function(g){ke.inputMenuButtonFocus(g.target)}),$("#luckysheet-cell-main, #luckysheetTableContent").mousedown(function(g){if($(g.target).hasClass("luckysheet-mousedown-cancel"))return;Cb(),$("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle").css("cursor","default").end().find(".luckysheet-cs-draghandle").css("cursor","default"),$("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","default"),He.removeActivePs(),($("#luckysheet-modal-dialog-activeImage").is(":visible")||$("#luckysheet-modal-dialog-cropping").is(":visible"))&&Re.cancelActiveImgItem();let y=nt(g.pageX,g.pageY);if(y[0]>=h.cellmainWidth-h.cellMainSrollBarSize||y[1]>=h.cellmainHeight-h.cellMainSrollBarSize)return;let v=y[0]+$("#luckysheet-cell-main").scrollLeft(),b=y[1]+$("#luckysheet-cell-main").scrollTop();Y.freezenverticaldata!=null&&y[0]<Y.freezenverticaldata[0]-Y.freezenverticaldata[2]&&(v=y[0]+Y.freezenverticaldata[2]),Y.freezenhorizontaldata!=null&&y[1]<Y.freezenhorizontaldata[0]-Y.freezenhorizontaldata[2]&&(b=y[1]+Y.freezenhorizontaldata[2]);let k=ve.getSheetByIndex(),w=$("#luckysheetTableContent").get(0).getContext("2d"),x=_t(b),C=x[1],S=x[0],_=x[2],T=wt(v),A=T[1],R=T[0],I=T[2],F=_,z=I,M=ke.mergeborer(h.flowdata,_,I);if(M&&(C=M.row[1],S=M.row[0],_=M.row[2],F=M.row[3],A=M.column[1],R=M.column[0],I=M.column[2],z=M.column[3]),!Je.createHookFunction("cellMousedownBefore",h.flowdata[_][I],{r:_,c:I,start_r:S,start_c:R,end_r:C,end_c:A},k,w))return;if(Ye.cellFocus(_,I,!0),R<$("#luckysheet-cell-main").scrollLeft()&&$("#luckysheet-scrollbar-x").scrollLeft(R),S<$("#luckysheet-cell-main").scrollTop()&&$("#luckysheet-scrollbar-y").scrollTop(S),g.which=="3"){$("#luckysheet-dataVerification-showHintBox").hide();let N=!1;for(let L=0;L<h.luckysheet_select_save.length;L++)if(h.luckysheet_select_save[L].row!=null&&_>=h.luckysheet_select_save[L].row[0]&&_<=h.luckysheet_select_save[L].row[1]&&I>=h.luckysheet_select_save[L].column[0]&&I<=h.luckysheet_select_save[L].column[1]){N=!0;break}if(N)return}if(h.flowdata[_]!=null&&h.flowdata[_][I]!=null&&h.flowdata[_][I].dd!=null&&de.fireMousedown!=null&&P(de.fireMousedown)=="function"){de.fireMousedown(h.flowdata[_][I].dd);return}if(Cl.hyperlink&&Cl.hyperlink[_+"_"+I]&&g.which!="3"){Cl.cellFocus(_,I);return}h.luckysheet_scroll_status=!0;let E=$("#luckysheet-input-box");if(parseInt(E.css("top"))>0)if(p.rangestart||p.rangedrag_column_start||p.rangedrag_row_start||p.israngeseleciton()){let N=[_,F],L=[I,z],O=R,V=A-R-1,q=S,W=C-S-1;if(g.shiftKey){let X=p.func_selectedrange,te=0,le=0,oe=[];X.top>S?(te=S,le=X.top+X.height-S,X.row[1]>X.row_focus&&(X.row[1]=X.row_focus),oe=[_,X.row[1]]):X.top==S?(te=S,le=X.top+X.height-S,oe=[_,X.row[0]]):(te=X.top,le=C-X.top-1,X.row[0]<X.row_focus&&(X.row[0]=X.row_focus),oe=[X.row[0],_]);let se=0,ce=0,he=[];X.left>R?(se=R,ce=X.left+X.width-R,X.column[1]>X.column_focus&&(X.column[1]=X.column_focus),he=[I,X.column[1]]):X.left==R?(se=R,ce=X.left+X.width-R,he=[I,X.column[0]]):(se=X.left,ce=A-X.left-1,X.column[0]<X.column_focus&&(X.column[0]=X.column_focus),he=[X.column[0],I]);let ue=ke.mergeMoveMain(he,oe,X,te,le,se,ce);ue!=null&&(he=ue[0],oe=ue[1],te=ue[2],le=ue[3],se=ue[4],ce=ue[5]),or(se,te,ce,le,oe,he),X.row=oe,X.column=he,X.left_move=se,X.width_move=ce,X.top_move=te,X.height_move=le,p.func_selectedrange=X}else if(g.ctrlKey&&$("#luckysheet-rich-text-editor").find("span").last().text()!=","){let X=$("#luckysheet-rich-text-editor").text();if(X[X.length-1]===")"&&(X=X.substr(0,X.length-1)),X.length>0){let te=X.substr(X.length-1,1);te!=","&&te!="="&&te!="("&&(X+=",")}if(X.length>0&&X.substr(0,1)=="="){if(X=p.functionHTMLGenerate(X),window.getSelection){let te=window.getSelection();p.functionRangeIndex=[$(te.anchorNode).parent().index(),te.anchorOffset]}else{let te=document.selection.createRange();p.functionRangeIndex=te}$("#luckysheet-rich-text-editor").html(X+")"),p.canceFunctionrangeSelected(),p.createRangeHightlight()}p.rangestart=!1,p.rangedrag_column_start=!1,p.rangedrag_row_start=!1,$("#luckysheet-functionbox-cell").html(X+")"),p.rangeHightlightselected($("#luckysheet-rich-text-editor")),p.israngeseleciton(),p.func_selectedrange={left:O,width:V,top:q,height:W,left_move:O,width_move:V,top_move:q,height_move:W,row:N,column:L,row_focus:_,column_focus:I}}else p.func_selectedrange={left:O,width:V,top:q,height:W,left_move:O,width_move:V,top_move:q,height_move:W,row:N,column:L,row_focus:_,column_focus:I};p.rangeSetValue({row:N,column:L}),p.rangestart=!0,p.rangedrag_column_start=!1,p.rangedrag_row_start=!1,$("#luckysheet-formula-functionrange-select").css({left:O,width:V,top:q,height:W}).show(),$("#luckysheet-formula-help-c").hide(),or(O,q,V,W,N,L),setTimeout(function(){let te=window.getSelection().anchorNode,le;$("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible")?(le=$("#luckysheet-rich-text-editor"),p.rangechangeindex=p.data_parm_index):le=$(te).closest("div");let oe=le.find("span[rangeindex='"+p.rangechangeindex+"']");p.setCaretPosition(oe.get(0),0,oe.html().length)},1);return}else p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),h.luckysheet_select_status=!0,$("#luckysheet-info").is(":visible")&&(h.luckysheet_select_status=!1);else rc(_,I,h.currentSheetIndex)&&(h.luckysheet_select_status=!0);if($("#luckysheet-multiRange-dialog").is(":visible")){if($e.selectStatus=!0,h.luckysheet_select_status=!1,g.shiftKey){let L=$e.selectRange[$e.selectRange.length-1],O=0,V=0,q=[];L.top>S?(O=S,V=L.top+L.height-S,L.row[1]>L.row_focus&&(L.row[1]=L.row_focus),q=[_,L.row[1]]):L.top==S?(O=S,V=L.top+L.height-S,q=[_,L.row[0]]):(O=L.top,V=C-L.top-1,L.row[0]<L.row_focus&&(L.row[0]=L.row_focus),q=[L.row[0],_]);let W=0,X=0,te=[];L.left>R?(W=R,X=L.left+L.width-R,L.column[1]>L.column_focus&&(L.column[1]=L.column_focus),te=[I,L.column[1]]):L.left==R?(W=R,X=L.left+L.width-R,te=[I,L.column[0]]):(W=L.left,X=A-L.left-1,L.column[0]<L.column_focus&&(L.column[0]=L.column_focus),te=[L.column[0],I]);let le=ke.mergeMoveMain(te,q,L,O,V,W,X);le!=null&&(te=le[0],q=le[1],O=le[2],V=le[3],W=le[4],X=le[5]),L.row=q,L.column=te,L.left_move=W,L.width_move=X,L.top_move=O,L.height_move=V,$e.selectRange[$e.selectRange.length-1]=L}else g.ctrlKey?$e.selectRange.push({left:R,width:A-R-1,top:S,height:C-S-1,left_move:R,width_move:A-R-1,top_move:S,height_move:C-S-1,row:[_,F],column:[I,z],row_focus:_,column_focus:I}):($e.selectRange=[],$e.selectRange.push({left:R,width:A-R-1,top:S,height:C-S-1,left_move:R,width_move:A-R-1,top_move:S,height_move:C-S-1,row:[_,F],column:[I,z],row_focus:_,column_focus:I}));Ot($e.selectRange);let N=$e.getTxtByRange($e.selectRange);$("#luckysheet-multiRange-dialog input").val(N);return}else $e.selectStatus=!1,$e.selectRange=[];if($("#luckysheet-singleRange-dialog").is(":visible")){h.luckysheet_select_status=!1,Ot([{row:[_,_],column:[I,I]}]);let N=xt(h.currentSheetIndex,{row:[_,_],column:[I,I]},h.currentSheetIndex);$("#luckysheet-singleRange-dialog input").val(N);return}if($("#luckysheet-dataVerificationRange-dialog").is(":visible")){if(Ye.selectStatus=!0,h.luckysheet_select_status=!1,g.shiftKey){let L=Ye.selectRange[Ye.selectRange.length-1],O=0,V=0,q=[];L.top>S?(O=S,V=L.top+L.height-S,L.row[1]>L.row_focus&&(L.row[1]=L.row_focus),q=[_,L.row[1]]):L.top==S?(O=S,V=L.top+L.height-S,q=[_,L.row[0]]):(O=L.top,V=C-L.top-1,L.row[0]<L.row_focus&&(L.row[0]=L.row_focus),q=[L.row[0],_]);let W=0,X=0,te=[];L.left>R?(W=R,X=L.left+L.width-R,L.column[1]>L.column_focus&&(L.column[1]=L.column_focus),te=[I,L.column[1]]):L.left==R?(W=R,X=L.left+L.width-R,te=[I,L.column[0]]):(W=L.left,X=A-L.left-1,L.column[0]<L.column_focus&&(L.column[0]=L.column_focus),te=[L.column[0],I]);let le=ke.mergeMoveMain(te,q,L,O,V,W,X);le!=null&&(te=le[0],q=le[1],O=le[2],V=le[3],W=le[4],X=le[5]),L.row=q,L.column=te,L.left_move=W,L.width_move=X,L.top_move=O,L.height_move=V,Ye.selectRange[Ye.selectRange.length-1]=L}else Ye.selectRange=[],Ye.selectRange.push({left:R,width:A-R-1,top:S,height:C-S-1,left_move:R,width_move:A-R-1,top_move:S,height_move:C-S-1,row:[_,F],column:[I,z],row_focus:_,column_focus:I});Ot(Ye.selectRange);let N=Ye.getTxtByRange(Ye.selectRange);p.rangetosheet!=h.currentSheetIndex&&(N=h.luckysheetfile[Z(h.currentSheetIndex)].name+"!"+N),$("#luckysheet-dataVerificationRange-dialog input").val(N);return}else Ye.selectStatus=!1,Ye.selectRange=[];if(ri.singleRangeFocus&&$("#luckysheet-ifFormulaGenerator-dialog .singRange").click(),$("#luckysheet-ifFormulaGenerator-singleRange-dialog").is(":visible")){h.luckysheet_select_status=!1,p.rangestart=!1,$("#luckysheet-formula-functionrange-select").css({left:R,width:A-R-1,top:S,height:C-S-1}).show(),$("#luckysheet-formula-help-c").hide();let N=xt(h.currentSheetIndex,{row:[_,_],column:[I,I]},h.currentSheetIndex);$("#luckysheet-ifFormulaGenerator-singleRange-dialog input").val(N);return}if($("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){h.luckysheet_select_status=!1,p.func_selectedrange={left:R,width:A-R-1,top:S,height:C-S-1,left_move:R,width_move:A-R-1,top_move:S,height_move:C-S-1,row:[_,_],column:[I,I],row_focus:_,column_focus:I},p.rangestart=!0,$("#luckysheet-formula-functionrange-select").css({left:R,width:A-R-1,top:S,height:C-S-1}).show(),$("#luckysheet-formula-help-c").hide();let N=xt(h.currentSheetIndex,{row:[_,_],column:[I,I]},h.currentSheetIndex);$("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(N),$("#luckysheet-row-count-show").hide(),$("#luckysheet-column-count-show").hide();return}if(h.luckysheet_select_status){if(g.shiftKey){let N=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),L=0,O=0,V=[];N.top>S?(L=S,O=N.top+N.height-S,N.row[1]>N.row_focus&&(N.row[1]=N.row_focus),V=[_,N.row[1]]):N.top==S?(L=S,O=N.top+N.height-S,V=[_,N.row[0]]):(L=N.top,O=C-N.top-1,N.row[0]<N.row_focus&&(N.row[0]=N.row_focus),V=[N.row[0],_]);let q=0,W=0,X=[];N.left>R?(q=R,W=N.left+N.width-R,N.column[1]>N.column_focus&&(N.column[1]=N.column_focus),X=[I,N.column[1]]):N.left==R?(q=R,W=N.left+N.width-R,X=[I,N.column[0]]):(q=N.left,W=A-N.left-1,N.column[0]<N.column_focus&&(N.column[0]=N.column_focus),X=[N.column[0],I]);let te=ke.mergeMoveMain(X,V,N,L,O,q,W);te!=null&&(X=te[0],V=te[1],L=te[2],O=te[3],q=te[4],W=te[5]),N.row=V,N.column=X,N.left_move=q,N.width_move=W,N.top_move=L,N.height_move=O,h.luckysheet_select_save[h.luckysheet_select_save.length-1]=N,$("#luckysheet-alternateformat-rangeDialog").is(":visible")&&$("#luckysheet-alternateformat-rangeDialog input").val(xt(h.currentSheetIndex,h.luckysheet_select_save)),Oe.luckysheet_pivotTable_select_state&&$("#luckysheet-pivotTable-range-selection-input").val(h.luckysheetfile[Z(h.currentSheetIndex)].name+"!"+tt(h.luckysheet_select_save[0].column[0])+(h.luckysheet_select_save[0].row[0]+1)+":"+tt(h.luckysheet_select_save[0].column[1])+(h.luckysheet_select_save[0].row[1]+1))}else g.ctrlKey?h.luckysheet_select_save.push({left:R,width:A-R-1,top:S,height:C-S-1,left_move:R,width_move:A-R-1,top_move:S,height_move:C-S-1,row:[_,F],column:[I,z],row_focus:_,column_focus:I}):(h.luckysheet_select_save.length=0,h.luckysheet_select_save.push({left:R,width:A-R-1,top:S,height:C-S-1,left_move:R,width_move:A-R-1,top_move:S,height_move:C-S-1,row:[_,F],column:[I,z],row_focus:_,column_focus:I}),ke.menuButtonFocus(h.flowdata,_,I),p.fucntionboxshow(_,I));lt(),(Y.freezenhorizontaldata!=null||Y.freezenverticaldata!=null)&&Y.scrollAdaptOfselect(),fr.mobilecheck()||Mr(),ne.saveParam("mv",h.currentSheetIndex,h.luckysheet_select_save)}el.rangefocus&&(el.rangefocus=!1,$("#luckysheet-alternateformat-range .fa-table").click()),$("#luckysheet-row-count-show, #luckysheet-column-count-show").hide(),fe()||Cc(),Oe.pivotclick(_,I,h.currentSheetIndex),rt(),Je.createHookFunction("cellMousedown",h.flowdata[_][I],{r:_,c:I,start_r:S,start_c:R,end_r:C,end_c:A},k,w)}).mouseup(function(g){if(g.which=="3"){if(!h.allowEdit||fe())return;let y=g.pageX,v=g.pageY,b=h.flowdata,k=h.luckysheet_select_save[0],w=de.cellRightClickConfig;if($("#luckysheet-cols-rows-data").show(),$("#luckysheet-cols-rows-handleincell").show(),$("#luckysheet-cols-rows-add, #luckysheet-cols-rows-shift").hide(),We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="block",We("#luckysheet-cols-rows-handleincell .luckysheet-menuseparator").style.display="block",k.row!=null&&k.row[0]==0&&k.row[1]==h.flowdata.length-1){if(!w.copy&&!w.copyAs&&!w.paste&&!w.insertColumn&&!w.deleteColumn&&!w.hideColumn&&!w.columnWidth&&!w.clear&&!w.matrix&&!w.sort&&!w.filter&&!w.chart&&!w.image&&!w.link&&!w.data&&!w.cellFormat)return;h.luckysheetRightHeadClickIs="column",$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(Q().rightclick.column),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text(Q().rightclick.width),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(Q().rightclick.left),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(Q().rightclick.right),$("#luckysheet-cols-rows-add").show(),$("#luckysheet-cols-rows-shift").hide(),$("#luckysheet-cols-rows-handleincell").hide(),h.luckysheet_cols_menu_status=!0,We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="block",We("#luckysheet-top-left-add-selected").style.display=w.insertColumn?"block":"none",We("#luckysheet-bottom-right-add-selected").style.display=w.insertColumn?"block":"none",We("#luckysheet-del-selected").style.display=w.deleteColumn?"block":"none",We("#luckysheet-hide-selected").style.display=w.hideColumn?"block":"none",We("#luckysheet-show-selected").style.display=w.hideColumn?"block":"none",We("#luckysheet-column-row-width-selected").style.display=w.columnWidth?"block":"none",!w.copy&&!w.copyAs&&!w.paste&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none",!w.insertColumn&&!w.deleteColumn&&!w.hideColumn&&!w.columnWidth&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none")),!w.insertColumn&&!w.deleteColumn&&!w.hideColumn&&!w.columnWidth&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none");let x=$.extend(!0,{},h.config);x.columnlen==null&&(x.columnlen={});let C=x.columnlen[h.luckysheet_select_save[0].column[0]]==null?h.defaultcollen:x.columnlen[h.luckysheet_select_save[0].column[0]],S=!0;for(let _=0;_<h.luckysheet_select_save.length;_++){let T=h.luckysheet_select_save[_],A=T.column[0],R=T.column[1];for(let I=A;I<=R;I++)if((x.columnlen[I]==null?h.defaultcollen:x.columnlen[I])!=C){S=!1;break}}S?$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(C):$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val("")}else if(k.column!=null&&k.column[0]==0&&k.column[1]==h.flowdata[0].length-1){if(!w.copy&&!w.copyAs&&!w.paste&&!w.insertRow&&!w.deleteRow&&!w.hideRow&&!w.rowHeight&&!w.clear&&!w.matrix&&!w.sort&&!w.filter&&!w.chart&&!w.image&&!w.link&&!w.data&&!w.cellFormat)return;h.luckysheetRightHeadClickIs="row",$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(Q().rightclick.row),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text(Q().rightclick.height),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(Q().rightclick.top),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(Q().rightclick.bottom),$("#luckysheet-cols-rows-add").show(),$("#luckysheet-cols-rows-shift").hide(),$("#luckysheet-cols-rows-handleincell").hide(),h.luckysheet_cols_menu_status=!0,We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="block",We("#luckysheet-top-left-add-selected").style.display=w.insertRow?"block":"none",We("#luckysheet-bottom-right-add-selected").style.display=w.insertRow?"block":"none",We("#luckysheet-del-selected").style.display=w.deleteRow?"block":"none",We("#luckysheet-hide-selected").style.display=w.hideRow?"block":"none",We("#luckysheet-show-selected").style.display=w.hideRow?"block":"none",We("#luckysheet-column-row-width-selected").style.display=w.rowHeight?"block":"none",!w.copy&&!w.copyAs&&!w.paste&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none",!w.insertRow&&!w.deleteRow&&!w.hideRow&&!w.rowHeight&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none")),!w.insertRow&&!w.deleteRow&&!w.hideRow&&!w.rowHeight&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none");let x=$.extend(!0,{},h.config);x.rowlen==null&&(x.rowlen={});let C=x.rowlen[h.luckysheet_select_save[0].row[0]]==null?h.defaultrowlen:x.rowlen[h.luckysheet_select_save[0].row[0]],S=!0;for(let _=0;_<h.luckysheet_select_save.length;_++){let T=h.luckysheet_select_save[_],A=T.row[0],R=T.row[1];for(let I=A;I<=R;I++)if((x.rowlen[I]==null?h.defaultrowlen:x.rowlen[I])!=C){S=!1;break}}S?$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(C):$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val("")}else{if(!w.copy&&!w.copyAs&&!w.paste&&!w.insertRow&&!w.insertColumn&&!w.deleteRow&&!w.deleteColumn&&!w.deleteCell&&!w.clear&&!w.matrix&&!w.sort&&!w.filter&&!w.chart&&!w.image&&!w.link&&!w.data&&!w.cellFormat)return;!w.copy&&!w.copyAs&&!w.paste&&(We("#luckysheet-cols-rows-handleincell .luckysheet-menuseparator").style.display="none",!w.insertRow&&!w.insertColumn&&!w.deleteRow&&!w.deleteColumn&&!w.deleteCell&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none")),!w.insertRow&&!w.insertColumn&&!w.deleteRow&&!w.deleteColumn&&!w.deleteCell&&(We("#luckysheet-cols-rows-handleincell .luckysheet-menuseparator").style.display="none")}!w.clear&&!w.matrix&&!w.sort&&!w.filter&&!w.chart&&!w.image&&!w.link&&!w.data&&!w.cellFormat&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none"),sn($("#luckysheet-rightclick-menu"),y,v)}ne.saveParam("mv",h.currentSheetIndex,h.luckysheet_select_save)}).dblclick(function(g){if($(g.target).hasClass("luckysheet-mousedown-cancel")||!h.allowEdit||parseInt($("#luckysheet-input-box").css("top"))>0)return;let y=nt(g.pageX,g.pageY);if(y[0]>=h.cellmainWidth-h.cellMainSrollBarSize||y[1]>=h.cellmainHeight-h.cellMainSrollBarSize)return;let v=$("#luckysheet-cell-main").scrollLeft(),b=$("#luckysheet-cell-main").scrollTop(),k=y[0]+v,w=y[1]+b;Y.freezenverticaldata!=null&&y[0]<Y.freezenverticaldata[0]-Y.freezenverticaldata[2]&&(k=y[0]+Y.freezenverticaldata[2]),Y.freezenhorizontaldata!=null&&y[1]<Y.freezenhorizontaldata[0]-Y.freezenhorizontaldata[2]&&(w=y[1]+Y.freezenhorizontaldata[2]);let x=_t(w),C=x[2],S=wt(k),_=S[2],T=ke.mergeborer(h.flowdata,C,_);if(T&&(C=T.row[2],_=T.column[2]),Oe.isPivotRange(C,_)){if((Oe.filter==null||Oe.filter.length==0)&&(Oe.row==null||Oe.row.length==0)&&(Oe.column==null||Oe.column.length==0)&&(Oe.values==null||Oe.values.length==0)||Oe.values==null||Oe.values.length==0||C==0||_==0)return;if(Oe.column!=null&&Oe.column.length>0){if(Oe.values.length>=2&&Oe.showType=="column"){if(C<=Oe.column.length||_>=Oe.pivotDatas[0].length-Oe.values.length)return}else if(C<=Oe.column.length-1||_>=Oe.pivotDatas[0].length-1)return}if(Oe.row!=null&&Oe.row.length>0){if(Oe.values.length>=2&&Oe.showType=="row"){if(_<=Oe.row.length||C>=Oe.pivotDatas.length-Oe.values.length)return}else if(_<=Oe.row.length-1||C>=Oe.pivotDatas.length-1)return}ve.addNewSheet(g),Oe.drillDown(C,_);return}if($("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible"))$("#luckysheet-cell-selected").hide();else{if($("#luckysheet-conditionformat-dialog").is(":visible")||$("#luckysheet-administerRule-dialog").is(":visible")||$("#luckysheet-newConditionRule-dialog").is(":visible")||$("#luckysheet-editorConditionRule-dialog").is(":visible")||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;if($("#luckysheet-modal-dialog-slider-alternateformat").is(":visible")||$("#luckysheet-alternateformat-rangeDialog").is(":visible"))return;{ke.luckysheetPaintModelOn&&ke.cancelPaintModel();let A=h.luckysheet_select_save[0].column_focus,R=h.luckysheet_select_save[0].row_focus;(A!==_||R!==C)&&(C=R,_=A),Rl(C,_,h.flowdata),lt()}}}),document.getElementById("luckysheet-cell-main").addEventListener("drop",function(g){g.preventDefault(),g.stopPropagation();let y=g.dataTransfer.files;if(y.length==1&&y[0].type.indexOf("image")>-1){if(!$t(h.currentSheetIndex,"editObjects"))return;Re.insertImg(y[0])}u(g)},!1),document.getElementById("luckysheet-cell-main").addEventListener("dragover",function(g){g.preventDefault(),g.stopPropagation()},!1);function u(g){if(de&&de.hook&&de.hook.cellDragStop){let y=nt(g.pageX,g.pageY),v=y[0]+$("#luckysheet-cell-main").scrollLeft(),b=y[1]+$("#luckysheet-cell-main").scrollTop(),k=_t(b),w=k[1],x=k[0],C=k[2],S=wt(v),_=S[1],T=S[0],A=S[2],R=ke.mergeborer(h.flowdata,C,A);R&&(w=R.row[1],x=R.row[0],C=R.row[2],_=R.column[1],T=R.column[0],A=R.column[2]);let I=ve.getSheetByIndex(),F=$("#luckysheetTableContent").get(0).getContext("2d");Je.createHookFunction("cellDragStop",h.flowdata[C][A],{r:C,c:A,start_r:x,start_c:T,end_r:w,end_c:_},I,F,g)}}$(document).on("mousemove.luckysheetEvent",function(g){if(He.overshow(g),Cl.overshow(g),window.cancelAnimationFrame(h.jfautoscrollTimeout),de&&de.hook&&de.hook.sheetMousemove){let y=nt(g.pageX,g.pageY),v=y[0]+$("#luckysheet-cell-main").scrollLeft(),b=y[1]+$("#luckysheet-cell-main").scrollTop(),k=_t(b),w=k[1],x=k[0],C=k[2],S=wt(v),_=S[1],T=S[0],A=S[2],R=ke.mergeborer(h.flowdata,C,A);R&&(w=R.row[1],x=R.row[0],C=R.row[2],_=R.column[1],T=R.column[0],A=R.column[2]);let I=ve.getSheetByIndex(),F={functionResizeStatus:p.functionResizeStatus,horizontalmoveState:!!Y.horizontalmovestate,verticalmoveState:!!Y.verticalmovestate,pivotTableMoveState:!!Oe&&Oe.movestate,sheetMoveStatus:h.luckysheet_sheet_move_status,scrollStatus:!!h.luckysheet_scroll_status,selectStatus:!!h.luckysheet_select_status,rowsSelectedStatus:!!h.luckysheet_rows_selected_status,colsSelectedStatus:!!h.luckysheet_cols_selected_status,cellSelectedMove:!!h.luckysheet_cell_selected_move,cellSelectedExtend:!!h.luckysheet_cell_selected_extend,colsChangeSize:!!h.luckysheet_cols_change_size,rowsChangeSize:!!h.luckysheet_rows_change_size,chartMove:!!h.chartparam.luckysheetCurrentChartMove,chartResize:!!h.chartparam.luckysheetCurrentChartResize,rangeResize:!!p.rangeResize,rangeMove:!!p.rangeMove},z=$("#luckysheetTableContent").get(0).getContext("2d");h.flowdata&&h.flowdata[C]&&Je.createHookFunction("sheetMousemove",h.flowdata[C][A],{r:C,c:A,start_r:x,start_c:T,end_r:w,end_c:_},I,F,z)}if(p.functionResizeStatus){let v=g.pageY-p.functionResizeData.y,b=p.functionResizeData.calculatebarHeight+v,k=Math.round($(window).height()/2);if(b<=28){if(b<=20)return;b=28}else if(b>=k){if(b>=k+8)return;b=k}h.calculatebarHeight=b,$("#luckysheet-wa-calculate").css("height",h.calculatebarHeight-2),$("#luckysheet-wa-calculate-size").css({background:"#5e5e5e",cursor:"ns-resize"}),clearTimeout(p.functionResizeTimeout),p.functionResizeTimeout=setTimeout(function(){zt()},15)}else if(Y.horizontalmovestate){let y=nt(g.pageX,g.pageY),v=$("#luckysheet-cell-main").scrollLeft(),b=$("#luckysheet-cell-main").scrollTop(),k=y[0]+v,w=y[1]+b,x=_t(w),C=x[1],S=x[0],_=x[2],T=y[1]+h.columnHeaderHeight;T<h.columnHeaderHeight&&(T=h.columnHeaderHeight),T>Y.windowHeight-4&&(T=Y.windowHeight-4),$("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css({top:T}),T+b-h.columnHeaderHeight>=S+(C-S)/2?(T=C-2-b+h.columnHeaderHeight,Y.freezenhorizontaldata=[C,_+1,b,Y.cutVolumn(h.visibledatarow,_+1),T]):(T=S-2-b+h.columnHeaderHeight,Y.freezenhorizontaldata=[S,_,b,Y.cutVolumn(h.visibledatarow,_),T]),$("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-drop").css({top:T}),Y.saveFreezen(Y.freezenhorizontaldata,T,null,null)}else if(Y.verticalmovestate){let y=nt(g.pageX,g.pageY),v=$("#luckysheet-cell-main").scrollLeft(),b=$("#luckysheet-cell-main").scrollTop(),k=y[0]+v,w=y[1]+b,x=wt(k),C=x[1],S=x[0],_=x[2],T=y[0]+h.rowHeaderWidth;T<h.rowHeaderWidth&&(T=h.rowHeaderWidth),T>Y.windowWidth-4&&(T=Y.windowWidth-4),$("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css({left:T}),T+v-h.rowHeaderWidth>=S+(C-S)/2?(T=C-2-v+h.rowHeaderWidth,Y.freezenverticaldata=[C,_+1,v,Y.cutVolumn(h.visibledatacolumn,_+1),T]):(T=S-2-v+h.rowHeaderWidth,Y.freezenverticaldata=[S,_,v,Y.cutVolumn(h.visibledatacolumn,_),T]),$("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-drop").css({left:T}),Y.saveFreezen(null,null,Y.freezenverticaldata,T),zt()}else if(!!Oe&&Oe.movestate){let y=g.pageX,v=g.pageY;$("#luckysheet-modal-dialog-slider-pivot-move").css({left:y-Oe.movesave.width/2,top:v-Oe.movesave.height})}else if(h.luckysheet_sheet_move_status){let y=$("#luckysheet-sheet-container-c").scrollLeft(),v=g.pageX+y;if(Math.abs(g.pageX-h.luckysheet_sheet_move_data.pageX)<3)return;let b=$("#luckysheet-sheet-container").width(),k=v-h.luckysheet_sheet_move_data.curleft-$("#luckysheet-sheet-container").offset().left;h.luckysheet_sheet_move_data.activeobject.css({left:k});let w=st(h.luckysheet_sheet_move_data.widthlist,k+h.luckysheet_sheet_move_data.curleft);h.luckysheet_sheet_move_data.cursorobject.css({cursor:"move"}),k-y<=6&&$("#luckysheet-sheets-leftscroll").click(),k-y>=b-40&&$("#luckysheet-sheets-rightscroll").click(),w!=h.luckysheet_sheet_move_data.curindex&&(w==-1&&k>0?(w=h.luckysheet_sheet_move_data.widthlist.length-1,$("#luckysheet-sheets-item-clone").insertAfter($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").eq(w))):w==-1&&k<=0?$("#luckysheet-sheets-item-clone").insertBefore($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").eq(0)):$("#luckysheet-sheets-item-clone").insertAfter($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").eq(w)),h.luckysheet_sheet_move_data.widthlist=[],$("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").each(function(x){x==0?h.luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth())):h.luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth())+h.luckysheet_sheet_move_data.widthlist[x-1])}),h.luckysheet_sheet_move_data.curindex=$("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").index($("#luckysheet-sheets-item-clone")))}else if(h.luckysheet_model_move_state){let y=$(document).scrollTop(),v=$(document).scrollLeft(),b=g.pageY+y,k=g.pageX+v,w=$(window).height(),x=$(window).width(),C=h.luckysheet_model_move_obj.height(),S=h.luckysheet_model_move_obj.width(),_=b-h.luckysheet_model_xy[1],T=k-h.luckysheet_model_xy[0];_<0&&(_=0),_+C+62>w&&(_=w-C-62),T<0&&(T=0),T+S+86>x&&(T=x-S-86),h.luckysheet_model_move_obj.css({top:_,left:T}),g.preventDefault()}else if(!!h.luckysheet_scroll_status||!!h.luckysheet_select_status||!!h.luckysheet_rows_selected_status||!!h.luckysheet_cols_selected_status||!!h.luckysheet_cell_selected_move||!!h.luckysheet_cell_selected_extend||!!h.luckysheet_cols_change_size||!!h.luckysheet_rows_change_size||!!h.chartparam.luckysheetCurrentChartMove||!!h.chartparam.luckysheetCurrentChartResize||!!p.rangeResize||!!p.rangeMove){let y=function(){if(h.luckysheet_scroll_status&&!h.luckysheet_cols_change_size&&!h.luckysheet_rows_change_size){let v=nt(g.pageX,g.pageY),b=$("#luckysheet-scrollbar-x").scrollLeft(),k=$("#luckysheet-scrollbar-y").scrollTop(),w=v[0],x=v[1],C=$("#luckysheet-cell-main").height()-20*h.zoomRatio,S=$("#luckysheet-cell-main").width()-60*h.zoomRatio;if(x<0||x>C){let _;x<0?_=k+x/2:_=k+(x-C)/2,$("#luckysheet-scrollbar-y").scrollTop(_)}if(w<0||w>S){let _;w<0?_=b+w/2:_=b+(w-S)/2,$("#luckysheet-scrollbar-x").scrollLeft(_)}}if(h.luckysheet_select_status){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop(),w=_t(k),x=w[1],C=w[0],S=w[2],_=wt(b),T=_[1],A=_[0],R=_[2];if(!rc(S,R,h.currentSheetIndex))return;let I=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),F=0,z=0,M=[];I.top>C?(F=C,z=I.top+I.height-C,I.row[1]>I.row_focus&&(I.row[1]=I.row_focus),M=[S,I.row[1]]):I.top==C?(F=C,z=I.top+I.height-C,M=[S,I.row[0]]):(F=I.top,z=x-I.top-1,I.row[0]<I.row_focus&&(I.row[0]=I.row_focus),M=[I.row[0],S]);let E=0,N=0,L=[];I.left>A?(E=A,N=I.left+I.width-A,I.column[1]>I.column_focus&&(I.column[1]=I.column_focus),L=[R,I.column[1]]):I.left==A?(E=A,N=I.left+I.width-A,L=[R,I.column[0]]):(E=I.left,N=T-I.left-1,I.column[0]<I.column_focus&&(I.column[0]=I.column_focus),L=[I.column[0],R]);let O=ke.mergeMoveMain(L,M,I,F,z,E,N);O!=null&&(L=O[0],M=O[1],F=O[2],z=O[3],E=O[4],N=O[5]),I.row=M,I.column=L,I.left_move=E,I.width_move=N,I.top_move=F,I.height_move=z,h.luckysheet_select_save[h.luckysheet_select_save.length-1]=I,lt(),Y.scrollFreezen(),$("#luckysheet-alternateformat-rangeDialog").is(":visible")&&$("#luckysheet-alternateformat-rangeDialog input").val(xt(h.currentSheetIndex,h.luckysheet_select_save[h.luckysheet_select_save.length-1])),Oe.luckysheet_pivotTable_select_state&&$("#luckysheet-pivotTable-range-selection-input").val(h.luckysheetfile[Z(h.currentSheetIndex)].name+"!"+tt(h.luckysheet_select_save[0].column[0])+(h.luckysheet_select_save[0].row[0]+1)+":"+tt(h.luckysheet_select_save[0].column[1])+(h.luckysheet_select_save[0].row[1]+1))}else if($e.selectStatus){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop(),w=_t(k),x=w[1],C=w[0],S=w[2],_=wt(b),T=_[1],A=_[0],R=_[2],I=$e.selectRange[$e.selectRange.length-1],F=0,z=0,M=[];I.top>C?(F=C,z=I.top+I.height-C,I.row[1]>I.row_focus&&(I.row[1]=I.row_focus),M=[S,I.row[1]]):I.top==C?(F=C,z=I.top+I.height-C,M=[S,I.row[0]]):(F=I.top,z=x-I.top-1,I.row[0]<I.row_focus&&(I.row[0]=I.row_focus),M=[I.row[0],S]);let E=0,N=0,L=[];I.left>A?(E=A,N=I.left+I.width-A,I.column[1]>I.column_focus&&(I.column[1]=I.column_focus),L=[R,I.column[1]]):I.left==A?(E=A,N=I.left+I.width-A,L=[R,I.column[0]]):(E=I.left,N=T-I.left-1,I.column[0]<I.column_focus&&(I.column[0]=I.column_focus),L=[I.column[0],R]);let O=ke.mergeMoveMain(L,M,I,F,z,E,N);O!=null&&(L=O[0],M=O[1],F=O[2],z=O[3],E=O[4],N=O[5]),I.row=M,I.column=L,I.left_move=E,I.width_move=N,I.top_move=F,I.height_move=z,$e.selectRange[$e.selectRange.length-1]=I,Ot($e.selectRange);let V=$e.getTxtByRange($e.selectRange);$("#luckysheet-multiRange-dialog input").val(V)}else if(Ye.selectStatus){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop(),w=_t(k),x=w[1],C=w[0],S=w[2],_=wt(b),T=_[1],A=_[0],R=_[2],I=Ye.selectRange[Ye.selectRange.length-1],F=0,z=0,M=[];I.top>C?(F=C,z=I.top+I.height-C,I.row[1]>I.row_focus&&(I.row[1]=I.row_focus),M=[S,I.row[1]]):I.top==C?(F=C,z=I.top+I.height-C,M=[S,I.row[0]]):(F=I.top,z=x-I.top-1,I.row[0]<I.row_focus&&(I.row[0]=I.row_focus),M=[I.row[0],S]);let E=0,N=0,L=[];I.left>A?(E=A,N=I.left+I.width-A,I.column[1]>I.column_focus&&(I.column[1]=I.column_focus),L=[R,I.column[1]]):I.left==A?(E=A,N=I.left+I.width-A,L=[R,I.column[0]]):(E=I.left,N=T-I.left-1,I.column[0]<I.column_focus&&(I.column[0]=I.column_focus),L=[I.column[0],R]);let O=ke.mergeMoveMain(L,M,I,F,z,E,N);O!=null&&(L=O[0],M=O[1],F=O[2],z=O[3],E=O[4],N=O[5]),I.row=M,I.column=L,I.left_move=E,I.width_move=N,I.top_move=F,I.height_move=z,Ye.selectRange[Ye.selectRange.length-1]=I,Ot(Ye.selectRange);let V=Ye.getTxtByRange(Ye.selectRange);p.rangetosheet!=h.currentSheetIndex&&(V=h.luckysheetfile[Z(h.currentSheetIndex)].name+"!"+V),$("#luckysheet-dataVerificationRange-dialog input").val(V)}else if(p.rangestart)p.rangedrag(g);else if(p.rangedrag_row_start)p.rangedrag_row(g);else if(p.rangedrag_column_start)p.rangedrag_column(g);else if(h.luckysheet_rows_selected_status){let b=nt(g.pageX,g.pageY)[1]+$("#luckysheet-rows-h").scrollTop();if(b<0)return!1;let k=_t(b),w=k[1],x=k[0],C=k[2],S=h.visibledatacolumn.length-1,_=h.visibledatacolumn[S],T=0,A=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),R=0,I=0,F=[];A.top>x?(R=x,I=A.top+A.height-x,A.row[1]>A.row_focus&&(A.row[1]=A.row_focus),F=[C,A.row[1]]):A.top==x?(R=x,I=A.top+A.height-x,F=[C,A.row[0]]):(R=A.top,I=w-A.top-1,A.row[0]<A.row_focus&&(A.row[0]=A.row_focus),F=[A.row[0],C]),A.row=F,A.top_move=R,A.height_move=I,h.luckysheet_select_save[h.luckysheet_select_save.length-1]=A,lt(),clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},500)}else if(h.luckysheet_cols_selected_status){let b=nt(g.pageX,g.pageY)[0]+$("#luckysheet-cols-h-c").scrollLeft();if(b<0)return!1;let k=h.visibledatarow.length-1,w=h.visibledatarow[k],x=0,C=wt(b),S=C[1],_=C[0],T=C[2],A=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),R=0,I=0,F=[];A.left>_?(R=_,I=A.left+A.width-_,A.column[1]>A.column_focus&&(A.column[1]=A.column_focus),F=[T,A.column[1]]):A.left==_?(R=_,I=A.left+A.width-_,F=[T,A.column[0]]):(R=A.left,I=S-A.left-1,A.column[0]<A.column_focus&&(A.column[0]=A.column_focus),F=[A.column[0],T]),A.column=F,A.left_move=R,A.width_move=I,h.luckysheet_select_save[h.luckysheet_select_save.length-1]=A,lt(),clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},500)}else if(h.luckysheet_cell_selected_move){let v=nt(g.pageX,g.pageY),b=$("#luckysheet-cell-main").scrollLeft(),k=$("#luckysheet-cell-main").scrollTop(),w=v[0]+b,x=v[1]+k,C=$(window).height()+k-h.sheetBarHeight-h.statisticBarHeight,S=$(window).width()+b,_=_t(x),T=_[1],A=_[0],R=_[2],I=wt(w),F=I[1],z=I[0],M=I[2],E=h.luckysheet_cell_selected_move_index[0],N=h.luckysheet_cell_selected_move_index[1],L=h.luckysheet_select_save[0].row[0]-E+R,O=h.luckysheet_select_save[0].row[1]-E+R,V=h.luckysheet_select_save[0].column[0]-N+M,q=h.luckysheet_select_save[0].column[1]-N+M;(L<0||x<0)&&(L=0,O=h.luckysheet_select_save[0].row[1]-h.luckysheet_select_save[0].row[0]),(V<0||w<0)&&(V=0,q=h.luckysheet_select_save[0].column[1]-h.luckysheet_select_save[0].column[0]),(O>=h.visibledatarow[h.visibledatarow.length-1]||x>C)&&(L=h.visibledatarow.length-1-h.luckysheet_select_save[0].row[1]+h.luckysheet_select_save[0].row[0],O=h.visibledatarow.length-1),(q>=h.visibledatacolumn[h.visibledatacolumn.length-1]||w>S)&&(V=h.visibledatacolumn.length-1-h.luckysheet_select_save[0].column[1]+h.luckysheet_select_save[0].column[0],q=h.visibledatacolumn.length-1),z=V-1==-1?0:h.visibledatacolumn[V-1],F=h.visibledatacolumn[q],A=L-1==-1?0:h.visibledatarow[L-1],T=h.visibledatarow[O],$("#luckysheet-cell-selected-move").css({left:z,width:F-z-2,top:A,height:T-A-2,display:"block"})}else if(h.luckysheet_cell_selected_extend){let v=nt(g.pageX,g.pageY),b=$("#luckysheet-cell-main").scrollLeft()-5,k=$("#luckysheet-cell-main").scrollTop()-5,w=v[0]+b,x=v[1]+k,C=$(window).height()+k-h.sheetBarHeight-h.statisticBarHeight,S=$(window).width()+b,_=_t(x),T=_[1],A=_[0],R=_[2],I=wt(w),F=I[1],z=I[0],M=I[2],E=h.luckysheet_cell_selected_extend_index[0],N=h.luckysheet_cell_selected_extend_index[1],L=h.luckysheet_select_save[0].row[0],O=h.luckysheet_select_save[0].row[1],V=h.luckysheet_select_save[0].column[0],q=h.luckysheet_select_save[0].column[1];(L<0||x<0)&&(L=0,O=h.luckysheet_select_save[0].row[1]-h.luckysheet_select_save[0].row[0]),(V<0||w<0)&&(V=0,q=h.luckysheet_select_save[0].column[1]-h.luckysheet_select_save[0].column[0]),(O>=h.visibledatarow[h.visibledatarow.length-1]||x>C)&&(L=h.visibledatarow.length-1-h.luckysheet_select_save[0].row[1]+h.luckysheet_select_save[0].row[0],O=h.visibledatarow.length-1),(q>=h.visibledatacolumn[h.visibledatacolumn.length-1]||w>S)&&(V=h.visibledatacolumn.length-1-h.luckysheet_select_save[0].column[1]+h.luckysheet_select_save[0].column[0],q=h.visibledatacolumn.length-1);let W=h.luckysheet_select_save[0].top_move,X=h.luckysheet_select_save[0].height_move,te=h.luckysheet_select_save[0].left_move,le=h.luckysheet_select_save[0].width_move;Math.abs(E-R)>Math.abs(N-M)?R>=L&&R<=O||(h.luckysheet_select_save[0].top_move>=A?(W=A,X=h.luckysheet_select_save[0].top_move+h.luckysheet_select_save[0].height_move-A):(W=h.luckysheet_select_save[0].top_move,X=T-h.luckysheet_select_save[0].top_move-1)):M>=V&&M<=q||(h.luckysheet_select_save[0].left_move>=z?(te=z,le=h.luckysheet_select_save[0].left_move+h.luckysheet_select_save[0].width_move-z):(te=h.luckysheet_select_save[0].left_move,le=F-h.luckysheet_select_save[0].left_move-1)),$("#luckysheet-cell-selected-extend").css({left:te,width:le,top:W,height:X,display:"block"})}else if(h.luckysheet_cols_change_size){let v=nt(g.pageX,g.pageY),b=$("#luckysheet-cols-h-c").scrollLeft(),k=v[0]+b,w=$(window).width(),x=h.visibledatarow.length-1,C=h.visibledatarow[x],S=0,_=wt(k),T=_[1],A=_[0],R=_[2];k+3-h.luckysheet_cols_change_size_start[0]>30&&k<w+b-100&&($("#luckysheet-change-size-line").css({left:k}),$("#luckysheet-cols-change-size").css({left:k-2}))}else if(h.luckysheet_rows_change_size){let v=nt(g.pageX,g.pageY),b=$("#luckysheet-rows-h").scrollTop(),k=v[1]+b,w=$(window).height(),x=_t(k),C=x[1],S=x[0],_=x[2];k+3-h.luckysheet_rows_change_size_start[0]>19&&k<w+b-200&&($("#luckysheet-change-size-line").css({top:k}),$("#luckysheet-rows-change-size").css({top:k}))}else if(h.chartparam.luckysheetCurrentChartMove){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop(),w=h.chartparam.luckysheetCurrentChartMoveObj.height(),x=h.chartparam.luckysheetCurrentChartMoveObj.width(),C=k-h.chartparam.luckysheetCurrentChartMoveXy[1],S=b-h.chartparam.luckysheetCurrentChartMoveXy[0];if(C<0&&(C=0),C+w+42+6>h.chartparam.luckysheetCurrentChartMoveWinH&&(C=h.chartparam.luckysheetCurrentChartMoveWinH-w-42-6),S<0&&(S=0),S+x+22+36>h.chartparam.luckysheetCurrentChartMoveWinW&&(S=h.chartparam.luckysheetCurrentChartMoveWinW-x-22-36),h.chartparam.luckysheetCurrentChartMoveObj.css({top:C,left:S}),Y.freezenhorizontaldata!=null||Y.freezenverticaldata!=null){Y.scrollAdapt();let _=h.chartparam.luckysheetCurrentChartMoveObj.offset(),T=h.chartparam.luckysheetCurrentChartMoveObj.position();h.chartparam.luckysheetCurrentChartMoveXy=[g.pageX-_.left,g.pageY-_.top,T.left,T.top,$("#luckysheet-scrollbar-x").scrollLeft(),$("#luckysheet-scrollbar-y").scrollTop()]}}else if(h.chartparam.luckysheetCurrentChartResize){let v=$("#luckysheet-cell-main").scrollTop(),b=$("#luckysheet-cell-main").scrollLeft(),k=nt(g.pageX,g.pageY),w=k[0]+b,x=k[1]+v;if(w<0||x<0)return!1;let C=h.chartparam.luckysheetCurrentChartResizeObj.height(),S=h.chartparam.luckysheetCurrentChartResizeObj.width(),_=x-h.chartparam.luckysheetCurrentChartResizeXy[1],T=w-h.chartparam.luckysheetCurrentChartResizeXy[0],A=h.chartparam.luckysheetCurrentChartResizeXy[5],R=h.chartparam.luckysheetCurrentChartResizeXy[3],I=h.chartparam.luckysheetCurrentChartResizeXy[4],F=h.chartparam.luckysheetCurrentChartResizeXy[2];(h.chartparam.luckysheetCurrentChartResize=="lm"||h.chartparam.luckysheetCurrentChartResize=="lt"||h.chartparam.luckysheetCurrentChartResize=="lb")&&(I=w,F=h.chartparam.luckysheetCurrentChartResizeXy[2]-T,I>h.chartparam.luckysheetCurrentChartResizeXy[2]+h.chartparam.luckysheetCurrentChartResizeXy[4]-60?(I=h.chartparam.luckysheetCurrentChartResizeXy[2]+h.chartparam.luckysheetCurrentChartResizeXy[4]-60,F=h.chartparam.luckysheetCurrentChartResizeXy[2]-(h.chartparam.luckysheetCurrentChartResizeXy[2]+h.chartparam.luckysheetCurrentChartResizeXy[4]-60-h.chartparam.luckysheetCurrentChartResizeXy[0])):I<=0&&(I=0,F=h.chartparam.luckysheetCurrentChartResizeXy[2]+h.chartparam.luckysheetCurrentChartResizeXy[0])),(h.chartparam.luckysheetCurrentChartResize=="rm"||h.chartparam.luckysheetCurrentChartResize=="rt"||h.chartparam.luckysheetCurrentChartResize=="rb")&&(F=h.chartparam.luckysheetCurrentChartResizeXy[2]+T,F<60?F=60:F>=h.chartparam.luckysheetCurrentChartResizeWinW-h.chartparam.luckysheetCurrentChartResizeXy[4]-22-36&&(F=h.chartparam.luckysheetCurrentChartResizeWinW-h.chartparam.luckysheetCurrentChartResizeXy[4]-22-36)),(h.chartparam.luckysheetCurrentChartResize=="mt"||h.chartparam.luckysheetCurrentChartResize=="lt"||h.chartparam.luckysheetCurrentChartResize=="rt")&&(A=x,R=h.chartparam.luckysheetCurrentChartResizeXy[3]-_,A>h.chartparam.luckysheetCurrentChartResizeXy[3]+h.chartparam.luckysheetCurrentChartResizeXy[5]-60?(A=h.chartparam.luckysheetCurrentChartResizeXy[3]+h.chartparam.luckysheetCurrentChartResizeXy[5]-60,R=h.chartparam.luckysheetCurrentChartResizeXy[3]-(h.chartparam.luckysheetCurrentChartResizeXy[3]+h.chartparam.luckysheetCurrentChartResizeXy[5]-60-h.chartparam.luckysheetCurrentChartResizeXy[1])):A<=0&&(A=0,R=h.chartparam.luckysheetCurrentChartResizeXy[3]+h.chartparam.luckysheetCurrentChartResizeXy[1])),(h.chartparam.luckysheetCurrentChartResize=="mb"||h.chartparam.luckysheetCurrentChartResize=="lb"||h.chartparam.luckysheetCurrentChartResize=="rb")&&(R=h.chartparam.luckysheetCurrentChartResizeXy[3]+_,R<60?R=60:R>=h.chartparam.luckysheetCurrentChartResizeWinH-h.chartparam.luckysheetCurrentChartResizeXy[5]-42-6&&(R=h.chartparam.luckysheetCurrentChartResizeWinH-h.chartparam.luckysheetCurrentChartResizeXy[5]-42-6));let z={top:A,left:I,height:R,width:F};h.chartparam.luckysheetCurrentChartResizeObj.css(z),h.resizeChart(h.chartparam.luckysheetCurrentChart)}else if(Re.move){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop(),w=Re.images[Re.currentImgId];w.isFixedPos&&(b=g.pageX,k=g.pageY);let x=$("#luckysheet-modal-dialog-activeImage").height(),C=$("#luckysheet-modal-dialog-activeImage").width(),S=k-Re.moveXY[1],_=b-Re.moveXY[0],T=0,A=Re.currentWinH-x-42-6,R=0,I=Re.currentWinW-C-22-36;w.isFixedPos&&(T=h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight,A=T+h.cellmainHeight-h.cellMainSrollBarSize-x,R=h.rowHeaderWidth,I=R+h.cellmainWidth-h.cellMainSrollBarSize-C),S<T&&(S=T),S>A&&(S=A),_<R&&(_=R),_>I&&(_=I),$("#luckysheet-modal-dialog-activeImage").css({left:_,top:S})}else if(Re.resize){let v=nt(g.pageX,g.pageY),b=$("#luckysheet-cell-main").scrollLeft(),k=$("#luckysheet-cell-main").scrollTop(),w=v[0]+b,x=v[1]+k;if(w<0||x<0)return!1;let C=Re.resizeXY,S=x-C[1],_=w-C[0],T=C[5],A=C[3],R=C[4],I=C[2],F=Re.resize,z=Re.images[Re.currentImgId];if(z.isFixedPos){let q=h.infobarHeight+h.toolbarHeight+h.calculatebarHeight+h.columnHeaderHeight,W=h.rowHeaderWidth;F=="lt"?(R=C[4]-C[6]+_,R<W&&(R=W),R>C[4]-C[6]+C[2]-1&&(R=C[4]-C[6]+C[2]-1),I=C[4]-C[6]+C[2]-R,A=Math.round(I*(C[3]/C[2])),T=C[5]-C[7]+C[3]-A,T<q&&(T=q,A=C[5]-C[7]+C[3]-T,I=Math.round(A*(C[2]/C[3])),R=C[4]-C[6]+C[2]-I),T>C[5]-C[7]+C[3]-1&&(T=C[5]-C[7]+C[3]-1,A=C[5]-C[7]+C[3]-T,I=Math.round(A*(C[2]/C[3])),R=C[4]-C[6]+C[2]-I)):F=="lm"?(R=C[4]-C[6]+_,R<W&&(R=W),R>C[4]-C[6]+C[2]-1&&(R=C[4]-C[6]+C[2]-1),I=C[4]-C[6]+C[2]-R,T=C[5]-C[7],A=C[3]):F=="lb"?(R=C[4]-C[6]+_,R<W&&(R=W),R>C[4]-C[6]+C[2]-1&&(R=C[4]-C[6]+C[2]-1),I=C[4]-C[6]+C[2]-R,A=Math.round(I*(C[3]/C[2])),T=C[5]-C[7],A<1&&(A=1,I=Math.round(A*(C[2]/C[3])),R=C[4]-C[6]+C[2]-I),A>q+h.cellmainHeight-h.cellMainSrollBarSize-T&&(A=q+h.cellmainHeight-h.cellMainSrollBarSize-T,I=Math.round(A*(C[2]/C[3])),R=C[4]-C[6]+C[2]-I)):F=="rt"?(R=C[4]-C[6],I=C[2]+_,I<1&&(I=1),I>W+h.cellmainWidth-h.cellMainSrollBarSize-R&&(I=W+h.cellmainWidth-h.cellMainSrollBarSize-R),A=Math.round(I*(C[3]/C[2])),T=C[5]-C[7]+C[3]-A,T<q&&(T=q,A=C[5]-C[7]+C[3]-T,I=Math.round(A*(C[2]/C[3]))),T>C[5]-C[7]+C[3]-1&&(T=C[5]-C[7]+C[3]-1,A=C[5]-C[7]+C[3]-T,I=Math.round(A*(C[2]/C[3])))):F=="rm"?(R=C[4]-C[6],I=C[2]+_,I<1&&(I=1),I>W+h.cellmainWidth-h.cellMainSrollBarSize-R&&(I=W+h.cellmainWidth-h.cellMainSrollBarSize-R),T=C[5]-C[7],A=C[3]):F=="rb"?(R=C[4]-C[6],I=C[2]+_,I<1&&(I=1),I>W+h.cellmainWidth-h.cellMainSrollBarSize-R&&(I=W+h.cellmainWidth-h.cellMainSrollBarSize-R),A=Math.round(I*(C[3]/C[2])),T=C[5]-C[7],A<1&&(A=1,I=Math.round(A*(C[2]/C[3]))),A>q+h.cellmainHeight-h.cellMainSrollBarSize-T&&(A=q+h.cellmainHeight-h.cellMainSrollBarSize-T,I=Math.round(A*(C[2]/C[3])))):F=="mt"?(R=C[4]-C[6],I=C[2],T=C[5]-C[7]+S,T<q&&(T=q),T>C[5]-C[7]+C[3]-1&&(T=C[5]-C[7]+C[3]-1),A=C[5]-C[7]+C[3]-T):F=="mb"&&(R=C[4]-C[6],I=C[2],T=C[5]-C[7],A=C[3]+S,A<1&&(A=1),A>q+h.cellmainHeight-h.cellMainSrollBarSize-T&&(A=q+h.cellmainHeight-h.cellMainSrollBarSize-T))}else F=="lt"?(R=w,I=C[2]-_,R>C[2]+C[4]-1?(R=C[2]+C[4]-1,I=C[2]+C[0]-(C[2]+C[4]-1)):R<=0&&(R=0,I=C[2]+C[0]),A=Math.round(I*(C[3]/C[2])),T=C[3]+C[1]-A,T>C[3]+C[5]-1?(T=C[3]+C[5]-1,A=C[3]+C[1]-(C[3]+C[5]-1),I=Math.round(A*(C[2]/C[3])),R=C[2]+C[0]-I):T<=0&&(T=0,A=C[3]+C[1],I=Math.round(A*(C[2]/C[3])),R=C[2]+C[0]-I)):F=="lm"?(R=w,I=C[2]-_,R>C[2]+C[4]-1?(R=C[2]+C[4]-1,I=C[2]+C[0]-(C[2]+C[4]-1)):R<=0&&(R=0,I=C[2]+C[0])):F=="lb"?(R=w,I=C[2]-_,R>C[2]+C[4]-1?(R=C[2]+C[4]-1,I=C[2]+C[0]-(C[2]+C[4]-1)):R<=0&&(R=0,I=C[2]+C[0]),A=Math.round(I*(C[3]/C[2])),A<1?(A=1,I=Math.round(A*(C[2]/C[3])),R=C[2]+C[0]-I):A>=Re.currentWinH-C[5]-42-6&&(A=Re.currentWinH-C[5]-42-6,I=Math.round(A*(C[2]/C[3])),R=C[2]+C[0]-I)):F=="rt"?(I=C[2]+_,I<1?I=1:I>=Re.currentWinW-C[4]-22-36&&(I=Re.currentWinW-C[4]-22-36),A=Math.round(I*(C[3]/C[2])),T=C[3]+C[1]-A,T>C[3]+C[5]-1?(T=C[3]+C[5]-1,A=C[3]+C[1]-(C[3]+C[5]-1),I=Math.round(A*(C[2]/C[3]))):T<=0&&(T=0,A=C[3]+C[1],I=Math.round(A*(C[2]/C[3])))):F=="rm"?(I=C[2]+_,I<1?I=1:I>=Re.currentWinW-C[4]-22-36&&(I=Re.currentWinW-C[4]-22-36)):F=="rb"?(I=C[2]+_,I<1?I=1:I>=Re.currentWinW-C[4]-22-36&&(I=Re.currentWinW-C[4]-22-36),A=Math.round(I*(C[3]/C[2])),A<1?(A=1,I=Math.round(A*(C[2]/C[3]))):A>=Re.currentWinH-C[5]-42-6&&(A=Re.currentWinH-C[5]-42-6,I=Math.round(A*(C[2]/C[3])))):F=="mt"?(T=x,A=C[3]-S,T>C[3]+C[5]-1?(T=C[3]+C[5]-1,A=C[3]+C[1]-(C[3]+C[5]-1)):T<=0&&(T=0,A=C[3]+C[1])):F=="mb"&&(A=C[3]+S,A<1?A=1:A>=Re.currentWinH-C[5]-42-6&&(A=Re.currentWinH-C[5]-42-6));$("#luckysheet-modal-dialog-activeImage").css({width:I,height:A,left:R,top:T});let M=I/z.crop.width,E=A/z.crop.height,N=Math.round(z.default.width*M),L=Math.round(z.default.height*E),O=Math.round(z.crop.offsetLeft*M),V=Math.round(z.crop.offsetTop*E);$("#luckysheet-modal-dialog-activeImage .luckysheet-modal-dialog-content").css({"background-size":N+"px "+L+"px","background-position":-O+"px "+-V+"px"})}else if(Re.cropChange){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop();if(b<0||k<0)return!1;let w=Re.cropChangeXY,x=k-w[1],C=b-w[0],S=Re.images[Re.currentImgId],_=Re.cropChange,T,A,R,I;_=="lt"?(R=S.crop.offsetLeft+C,R<0&&(R=0),R>S.crop.width+S.crop.offsetLeft-1&&(R=S.crop.width+S.crop.offsetLeft-1),T=S.crop.width+S.crop.offsetLeft-R,I=S.crop.offsetTop+x,I<0&&(I=0),I>S.crop.height+S.crop.offsetTop-1&&(I=S.crop.height+S.crop.offsetTop-1),A=S.crop.height+S.crop.offsetTop-I):_=="lm"?(R=S.crop.offsetLeft+C,R<0&&(R=0),R>S.crop.width+S.crop.offsetLeft-1&&(R=S.crop.width+S.crop.offsetLeft-1),T=S.crop.width+S.crop.offsetLeft-R,I=S.crop.offsetTop,A=S.crop.height):_=="lb"?(R=S.crop.offsetLeft+C,R<0&&(R=0),R>S.crop.width+S.crop.offsetLeft-1&&(R=S.crop.width+S.crop.offsetLeft-1),T=S.crop.width+S.crop.offsetLeft-R,I=S.crop.offsetTop,A=S.crop.height+x,A<1&&(A=1),A>S.default.height-I&&(A=S.default.height-I)):_=="rt"?(R=S.crop.offsetLeft,T=S.crop.width+C,T<1&&(T=1),T>S.default.width-R&&(T=S.default.width-R),I=S.crop.offsetTop+x,I<0&&(I=0),I>S.crop.height+S.crop.offsetTop-1&&(I=S.crop.height+S.crop.offsetTop-1),A=S.crop.height+S.crop.offsetTop-I):_=="rm"?(R=S.crop.offsetLeft,T=S.crop.width+C,T<1&&(T=1),T>S.default.width-R&&(T=S.default.width-R),I=S.crop.offsetTop,A=S.crop.height):_=="rb"?(R=S.crop.offsetLeft,T=S.crop.width+C,T<1&&(T=1),T>S.default.width-R&&(T=S.default.width-R),I=S.crop.offsetTop,A=S.crop.height+x,A<1&&(A=1),A>S.default.height-I&&(A=S.default.height-I)):_=="mt"?(R=S.crop.offsetLeft,T=S.crop.width,I=S.crop.offsetTop+x,I<0&&(I=0),I>S.crop.height+S.crop.offsetTop-1&&(I=S.crop.height+S.crop.offsetTop-1),A=S.crop.height+S.crop.offsetTop-I):_=="mb"&&(R=S.crop.offsetLeft,T=S.crop.width,I=S.crop.offsetTop,A=S.crop.height+x,A<1&&(A=1),A>S.default.height-I&&(A=S.default.height-I));let F=S.default.left+R,z=S.default.top+I;S.isFixedPos&&(F=S.fixedLeft+R,z=S.fixedTop+I),$("#luckysheet-modal-dialog-cropping").show().css({width:T,height:A,left:F,top:z});let M=h.toJsonOptions&&h.toJsonOptions.imageUrlHandle,E=typeof M=="function"?M(S.src):S.src;$("#luckysheet-modal-dialog-cropping .cropping-mask").css({width:S.default.width,height:S.default.height,"background-image":"url("+E+")",left:-R,top:-I}),$("#luckysheet-modal-dialog-cropping .cropping-content").css({"background-image":"url("+E+")","background-size":S.default.width+"px "+S.default.height+"px","background-position":-R+"px "+-I+"px"}),Re.cropChangeObj={width:T,height:A,offsetLeft:R,offsetTop:I}}else if(He.move){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop(),w=He.currentObj.outerHeight(),x=He.currentObj.outerWidth(),C=k-He.moveXY[1],S=b-He.moveXY[0];C<0&&(C=0),C+w+42+6>He.currentWinH&&(C=He.currentWinH-w-42-6),S<0&&(S=0),S+x+22+36>He.currentWinW&&(S=He.currentWinW-x-22-36),He.currentObj.css({left:S,top:C})}else if(He.resize){let v=nt(g.pageX,g.pageY),b=v[0]+$("#luckysheet-cell-main").scrollLeft(),k=v[1]+$("#luckysheet-cell-main").scrollTop();if(b<0||k<0)return!1;let w=He.resizeXY,x=k-w[1],C=b-w[0],S=w[5],_=w[3],T=w[4],A=w[2],R=He.resize;(R=="lm"||R=="lt"||R=="lb")&&(T=b,A=w[2]-C,T>w[2]+w[4]-60?(T=w[2]+w[4]-60,A=w[2]-(w[2]+w[4]-60-w[0])):T<=0&&(T=0,A=w[2]+w[0])),(R=="rm"||R=="rt"||R=="rb")&&(A=w[2]+C,A<60?A=60:A>=He.currentWinW-w[4]-22-36&&(A=He.currentWinW-w[4]-22-36)),(R=="mt"||R=="lt"||R=="rt")&&(S=k,_=w[3]-x,S>w[3]+w[5]-60?(S=w[3]+w[5]-60,_=w[3]-(w[3]+w[5]-60-w[1])):S<=0&&(S=0,_=w[3]+w[1])),(R=="mb"||R=="lb"||R=="rb")&&(_=w[3]+x,_<60?_=60:_>=He.currentWinH-w[5]-42-6&&(_=He.currentWinH-w[5]-42-6)),He.currentObj.css({width:A,height:_,left:T,top:S})}else p.rangeResize?p.rangeResizeDraging(g,p.rangeResizeObj,p.rangeResizexy,p.rangeResize,p.rangeResizeWinW,p.rangeResizeWinH,h.ch_width,h.rh_height):p.rangeMove?p.rangeMoveDraging(g,p.rangeMovexy,p.rangeMoveObj.data("range"),p.rangeMoveObj,h.sheetBarHeight,h.statisticBarHeight):h.chart_selection.rangeResize?h.chart_selection.rangeResizeDraging(g,h.sheetBarHeight,h.statisticBarHeight):h.chart_selection.rangeMove&&h.chart_selection.rangeMoveDraging(g,h.sheetBarHeight,h.statisticBarHeight);h.jfautoscrollTimeout=window.requestAnimationFrame(y)};h.luckysheet_select_status&&(clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},500)),h.jfautoscrollTimeout=window.requestAnimationFrame(y)}}),$(document).on("mouseup.luckysheetEvent",function(g){if(de&&de.hook&&de.hook.sheetMouseup){let F=nt(g.pageX,g.pageY),z=F[0]+$("#luckysheet-cell-main").scrollLeft(),M=F[1]+$("#luckysheet-cell-main").scrollTop(),E=_t(M),N=E[1],L=E[0],O=E[2],V=wt(z),q=V[1],W=V[0],X=V[2],te=ke.mergeborer(h.flowdata,O,X);te&&(N=te.row[1],L=te.row[0],O=te.row[2],q=te.column[1],W=te.column[0],X=te.column[2]);let le=ve.getSheetByIndex(),oe={functionResizeStatus:p.functionResizeStatus,horizontalmoveState:!!Y.horizontalmovestate,verticalmoveState:!!Y.verticalmovestate,pivotTableMoveState:!!Oe&&Oe.movestate,sheetMoveStatus:h.luckysheet_sheet_move_status,scrollStatus:!!h.luckysheet_scroll_status,selectStatus:!!h.luckysheet_select_status,rowsSelectedStatus:!!h.luckysheet_rows_selected_status,colsSelectedStatus:!!h.luckysheet_cols_selected_status,cellSelectedMove:!!h.luckysheet_cell_selected_move,cellSelectedExtend:!!h.luckysheet_cell_selected_extend,colsChangeSize:!!h.luckysheet_cols_change_size,rowsChangeSize:!!h.luckysheet_rows_change_size,chartMove:!!h.chartparam.luckysheetCurrentChartMove,chartResize:!!h.chartparam.luckysheetCurrentChartResize,rangeResize:!!p.rangeResize,rangeMove:!!p.rangeMove},se=$("#luckysheetTableContent").get(0).getContext("2d");Je.createHookFunction("sheetMouseup",h.flowdata[O][X],{r:O,c:X,start_r:L,start_c:W,end_r:N,end_c:q},le,oe,se)}if(h.luckysheet_select_status&&(clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},0),ke.luckysheetPaintModelOn&&(Ct.pasteHandlerOfPaintModel(h.luckysheet_copy_save),ke.luckysheetPaintSingle&&ke.cancelPaintModel())),h.luckysheet_select_status=!1,window.cancelAnimationFrame(h.jfautoscrollTimeout),h.luckysheet_scroll_status=!1,$("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle").css("cursor","crosshair").end().find(".luckysheet-cs-draghandle").css("cursor","move"),$("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","default"),h.luckysheet_rows_selected_status=!1,h.luckysheet_cols_selected_status=!1,h.luckysheet_model_move_state=!1,p.functionResizeStatus&&(p.functionResizeStatus=!1,$("#luckysheet-wa-calculate-size").removeAttr("style")),Y.horizontalmovestate&&(Y.horizontalmovestate=!1,$("#luckysheet-freezebar-horizontal").removeClass("luckysheet-freezebar-active"),$("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css("cursor","-webkit-grab"),Y.freezenhorizontaldata[4]<=h.columnHeaderHeight&&Y.cancelFreezenHorizontal(),Y.createAssistCanvas(),Be()),Y.verticalmovestate&&(Y.verticalmovestate=!1,$("#luckysheet-freezebar-vertical").removeClass("luckysheet-freezebar-active"),$("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css("cursor","-webkit-grab"),Y.freezenverticaldata[4]<=h.rowHeaderWidth&&Y.cancelFreezenVertical(),Y.createAssistCanvas(),Be()),!!Oe&&Oe.movestate&&($("#luckysheet-modal-dialog-slider-pivot-move").remove(),Oe.movestate=!1,$("#luckysheet-modal-dialog-pivotTable-list, #luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").css("cursor","default"),Oe.movesave.containerid!="luckysheet-modal-dialog-pivotTable-list"&&$(g.target).closest(".luckysheet-modal-dialog-slider-config-list").length==0&&(Oe.movesave.containerid=="luckysheet-modal-dialog-config-value"&&Oe.resetOrderby(Oe.movesave.obj),Oe.movesave.obj.remove(),Oe.showvaluecolrow(),$("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function(){$(this).find(".luckysheet-slider-list-item-selected").find("i").remove()}),$("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function(){let z=$(this).data("index");$("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function(){let M=$(this).find(".luckysheet-slider-list-item-selected");$(this).data("index")==z&&M.find("i").length==0&&M.append('<i class="fa fa-check luckysheet-mousedown-cancel"></i>')})}),Oe.refreshPivotTable())),h.luckysheet_sheet_move_status&&(h.luckysheet_sheet_move_status=!1,h.luckysheet_sheet_move_data.activeobject.insertBefore($("#luckysheet-sheets-item-clone")),h.luckysheet_sheet_move_data.activeobject.removeAttr("style"),$("#luckysheet-sheets-item-clone").remove(),h.luckysheet_sheet_move_data.cursorobject.css({cursor:"pointer"}),h.luckysheet_sheet_move_data={},ve.reOrderAllSheet()),clearTimeout(h.chartparam.luckysheetCurrentChartMoveTimeout),h.chartparam.luckysheetCurrentChartMove&&(h.chartparam.luckysheetCurrentChartMove=!1,h.chartparam.luckysheetInsertChartTosheetChange)){var y=h.chartparam.luckysheetCurrentChartMoveObj.css("top"),v=h.chartparam.luckysheetCurrentChartMoveObj.css("left"),b=$("#luckysheet-cell-main").scrollLeft(),k=$("#luckysheet-cell-main").scrollTop(),w=h.chartparam.luckysheetCurrentChartMoveXy[2],x=h.chartparam.luckysheetCurrentChartMoveXy[3],C=h.chartparam.luckysheetCurrentChartMoveXy[4],S=h.chartparam.luckysheetCurrentChartMoveXy[5],_=h.chartparam.luckysheetCurrentChartMoveObj.find(".luckysheet-modal-dialog-content").attr("id");h.jfredo.push({type:"moveChart",chart_id:_,sheetIndex:h.currentSheetIndex,myTop:y,myLeft:v,scrollTop:k,scrollLeft:b,x:w,y:x,scrollTop1:S,scrollLeft1:C})}if(h.chartparam.luckysheetCurrentChartResize&&(h.chartparam.luckysheetCurrentChartResize=null,h.chartparam.luckysheetInsertChartTosheetChange)){var T=h.chartparam.luckysheetCurrentChartResizeObj.height(),A=h.chartparam.luckysheetCurrentChartResizeObj.width(),b=$("#luckysheet-cell-main").scrollLeft(),k=$("#luckysheet-cell-main").scrollTop(),y=h.chartparam.luckysheetCurrentChartMoveObj.css("top"),v=h.chartparam.luckysheetCurrentChartMoveObj.css("left"),_=h.chartparam.luckysheetCurrentChartResizeObj.find(".luckysheet-modal-dialog-content").attr("id"),R=h.chartparam.luckysheetCurrentChartResizeXy[2],I=h.chartparam.luckysheetCurrentChartResizeXy[3],w=h.chartparam.luckysheetCurrentChartResizeXy[4],x=h.chartparam.luckysheetCurrentChartResizeXy[5],C=h.chartparam.luckysheetCurrentChartResizeXy[6],S=h.chartparam.luckysheetCurrentChartResizeXy[7];h.jfredo.push({type:"resizeChart",chart_id:_,sheetIndex:h.currentSheetIndex,myTop:y,myLeft:v,myHeight:T,myWidth:A,scrollTop:k,scrollLeft:b,x:w,y:x,myWidth1:R,myHeight1:I,scrollTop1:S,scrollLeft1:C})}if(p.rangeResize&&p.rangeResizeDragged(g,p.rangeResizeObj,p.rangeResize,p.rangeResizexy,p.rangeResizeWinW,p.rangeResizeWinH),Re.move&&Re.moveImgItem(),Re.resize&&Re.resizeImgItem(),Re.cropChange&&Re.cropChangeImgItem(),He.move){He.move=!1;let F=He.currentObj.closest(".luckysheet-postil-show").attr("id"),z=F.split("luckysheet-postil-show_")[1].split("_")[0],M=F.split("luckysheet-postil-show_")[1].split("_")[1],E=xe.deepCopyFlowData(h.flowdata),N=[];E[z][M].ps.left=He.currentObj.position().left,E[z][M].ps.top=He.currentObj.position().top,E[z][M].ps.value=He.currentObj.find(".formulaInputFocus").html().replaceAll("<div>",` |
| | | `).replaceAll(/<(.*)>.*?|<(.*) \/>/g,"").trim(),N.push(z+"_"+M),He.ref(E,N),$("#"+F).remove(),E[z][M].ps.isshow?(He.buildPs(z,M,E[z][M].ps),$("#"+F).addClass("luckysheet-postil-show-active"),$("#"+F).find(".luckysheet-postil-dialog-resize").show()):He.editPs(z,M)}if(He.resize){He.resize=null;let F=He.currentObj.closest(".luckysheet-postil-show").attr("id"),z=F.split("luckysheet-postil-show_")[1].split("_")[0],M=F.split("luckysheet-postil-show_")[1].split("_")[1],E=xe.deepCopyFlowData(h.flowdata),N=[];E[z][M].ps.left=He.currentObj.position().left,E[z][M].ps.top=He.currentObj.position().top,E[z][M].ps.width=He.currentObj.outerWidth(),E[z][M].ps.height=He.currentObj.outerHeight(),E[z][M].ps.value=He.currentObj.find(".formulaInputFocus").html().replaceAll("<div>",` |
| | | `).replaceAll(/<(.*)>.*?|<(.*) \/>/g,"").trim(),N.push(z+"_"+M),He.ref(E,N),$("#"+F).remove(),E[z][M].ps.isshow?(He.buildPs(z,M,E[z][M].ps),$("#"+F).addClass("luckysheet-postil-show-active"),$("#"+F).find(".luckysheet-postil-dialog-resize").show()):He.editPs(z,M)}if(h.luckysheet_rows_change_size){h.luckysheet_rows_change_size=!1,$("#luckysheet-change-size-line").hide(),$("#luckysheet-rows-change-size").css("opacity",0),$("#luckysheet-sheettable, #luckysheet-rows-h, #luckysheet-rows-h canvas").css("cursor","default");let F=nt(g.pageX,g.pageY),z=$("#luckysheet-rows-h").scrollTop(),M=F[1]+z,E=$(window).height(),N=_t(M),L=N[1],O=N[0],V=N[2],q=M+3-h.luckysheet_rows_change_size_start[0];M+3-h.luckysheet_rows_change_size_start[0]<19&&(q=19),M>=E-200+z&&(q=E-200-h.luckysheet_rows_change_size_start[0]+z);let W=$.extend(!0,{},h.config);W.rowlen==null&&(W.rowlen={}),W.customHeight==null&&(W.customHeight={}),W.customHeight[h.luckysheet_rows_change_size_start[1]]=1;let X=h.luckysheet_rows_change_size_start[1],te=!1;h.luckysheet_select_save.length>0&&h.luckysheet_select_save.filter(oe=>oe.row_select).some(oe=>(X>=oe.row[0]&&X<=oe.row[1]&&(te=!0),te)),te?h.luckysheet_select_save.filter(oe=>oe.row_select).forEach(oe=>{for(let se=oe.row[0];se<=oe.row[1];se++)W.rowlen[se]=Math.ceil(q/h.zoomRatio)}):W.rowlen[h.luckysheet_rows_change_size_start[1]]=Math.ceil(q/h.zoomRatio);let le=Re.moveChangeSize("row",h.luckysheet_rows_change_size_start[1],q);h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"resize",ctrlType:"resizeR",sheetIndex:h.currentSheetIndex,config:$.extend(!0,{},h.config),curconfig:$.extend(!0,{},W),images:$.extend(!0,{},Re.images),curImages:$.extend(!0,{},le)})),h.config=W,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,W.rowlen,{k:"rowlen"}),h.luckysheetfile[Z(h.currentSheetIndex)].images=le,ne.saveParam("all",h.currentSheetIndex,le,{k:"images"}),Re.images=le,Re.allImagesShow(),St(h.flowdata.length,null)}if(h.luckysheet_cols_change_size){h.luckysheet_cols_change_size=!1,$("#luckysheet-change-size-line").hide(),$("#luckysheet-cols-change-size").css("opacity",0),$("#luckysheet-sheettable, #luckysheet-cols-h-c, .luckysheet-cols-h-cells, .luckysheet-cols-h-cells canvas").css("cursor","default");let F=nt(g.pageX,g.pageY),z=$("#luckysheet-cols-h-c").scrollLeft(),M=F[0]+z,E=$(window).width(),N=h.visibledatarow.length-1,L=h.visibledatarow[N],O=0,V=wt(M),q=V[1],W=V[0],X=V[2],te=M+3-h.luckysheet_cols_change_size_start[0],le=h.defaultcollen;if(h.config.columnlen!=null&&h.config.columnlen[h.luckysheet_cols_change_size_start[1]]!=null&&(le=h.config.columnlen[h.luckysheet_cols_change_size_start[1]]),Math.abs(te-le)<3)return;M+3-h.luckysheet_cols_change_size_start[0]<30&&(te=30),M>=E-100+z&&(te=E-100-h.luckysheet_cols_change_size_start[0]+z);let oe=$.extend(!0,{},h.config);oe.columnlen==null&&(oe.columnlen={}),oe.customWidth==null&&(oe.customWidth={}),oe.customWidth[h.luckysheet_cols_change_size_start[1]]=1;let se=h.luckysheet_cols_change_size_start[1],ce=!1;h.luckysheet_select_save.length>0&&h.luckysheet_select_save.filter(ue=>ue.column_select).some(ue=>(se>=ue.column[0]&&se<=ue.column[1]&&(ce=!0),ce)),ce?h.luckysheet_select_save.filter(ue=>ue.column_select).forEach(ue=>{for(let K=ue.column[0];K<=ue.column[1];K++)oe.columnlen[K]=Math.ceil(te/h.zoomRatio)}):oe.columnlen[h.luckysheet_cols_change_size_start[1]]=Math.ceil(te/h.zoomRatio);let he=Re.moveChangeSize("column",h.luckysheet_cols_change_size_start[1],te);h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"resize",ctrlType:"resizeC",sheetIndex:h.currentSheetIndex,config:$.extend(!0,{},h.config),curconfig:$.extend(!0,{},oe),images:$.extend(!0,{},Re.images),curImages:$.extend(!0,{},he)})),h.config=oe,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,oe.columnlen,{k:"columnlen"}),h.luckysheetfile[Z(h.currentSheetIndex)].images=he,ne.saveParam("all",h.currentSheetIndex,he,{k:"images"}),Re.images=he,Re.allImagesShow(),St(null,h.flowdata[0].length),setTimeout(function(){Be()},1)}if(p.rangeMove&&p.rangeMoveDragged(p.rangeMoveObj),h.luckysheet_cell_selected_move){$("#luckysheet-cell-selected-move").hide(),h.luckysheet_cell_selected_move=!1;let F=nt(g.pageX,g.pageY);if(!vr(h.luckysheet_select_save,h.currentSheetIndex))return;let z=$("#luckysheet-cell-main").scrollLeft(),M=$("#luckysheet-cell-main").scrollTop(),E=F[0]+z,N=F[1]+M,L=$(window).height()+M-h.sheetBarHeight-h.statisticBarHeight,O=$(window).width()+z,V=_t(N)[2],q=wt(E)[2],W=h.luckysheet_cell_selected_move_index[0],X=h.luckysheet_cell_selected_move_index[1];if(V==W&&q==X)return;let te=xe.deepCopyFlowData(h.flowdata),le=h.luckysheet_select_save[h.luckysheet_select_save.length-1],oe=Pt(le),se=$.extend(!0,{},h.config);if(se.merge==null&&(se.merge={}),se.rowlen==null&&(se.rowlen={}),Mt(se,le.row[0],le.row[1],le.column[0],le.column[1])){de()?alert(l.noMerge):U.info('<i class="fa fa-exclamation-triangle"></i>',l.noMerge);return}let ce=le.row[0]-W+V,he=le.row[1]-W+V,ue=le.column[0]-X+q,K=le.column[1]-X+q;if(!vr([{row:[ce,he],column:[ue,K]}],h.currentSheetIndex))return;if((ce<0||N<0)&&(ce=0,he=le.row[1]-le.row[0]),(ue<0||E<0)&&(ue=0,K=le.column[1]-le.column[0]),(he>=h.visibledatarow[h.visibledatarow.length-1]||N>L)&&(ce=h.visibledatarow.length-1-le.row[1]+le.row[0],he=h.visibledatarow.length-1),(K>=h.visibledatacolumn[h.visibledatacolumn.length-1]||E>O)&&(ue=h.visibledatacolumn.length-1-le.column[1]+le.column[0],K=h.visibledatacolumn.length-1),Mt(se,ce,he,ue,K)){de()?alert(l.noMerge):U.info('<i class="fa fa-exclamation-triangle"></i>',l.noMerge);return}let G=Gr(h.currentSheetIndex),ee=null;for(let Ce=le.row[0];Ce<=le.row[1];Ce++){Ce in se.rowlen&&(ee=!0);for(let Le=le.column[0];Le<=le.column[1];Le++){let Ge=te[Ce][Le];P(Ge)=="object"&&"mc"in Ge&&Ge.mc.r+"_"+Ge.mc.c in se.merge&&delete se.merge[Ge.mc.r+"_"+Ge.mc.c],te[Ce][Le]=null}}if(se.borderInfo&&se.borderInfo.length>0){let Ce=[];for(let Le=0;Le<se.borderInfo.length;Le++){let Ge=se.borderInfo[Le].rangeType;if(Ge=="range"){let Ne=se.borderInfo[Le].range,et=[];for(let vt=0;vt<Ne.length;vt++)et=et.concat($e.CFSplitRange(Ne[vt],{row:le.row,column:le.column},{row:[ce,he],column:[ue,K]},"restPart"));se.borderInfo[Le].range=et,Ce.push(se.borderInfo[Le])}else if(Ge=="cell"){let Ne=se.borderInfo[Le].value.row_index,et=se.borderInfo[Le].value.col_index;Ne>=le.row[0]&&Ne<=le.row[1]&&et>=le.column[0]&&et<=le.column[1]||Ce.push(se.borderInfo[Le])}}se.borderInfo=Ce}let pe={};for(let Ce=0;Ce<oe.length;Ce++)for(let Le=0;Le<oe[0].length;Le++){if(G[Ce+le.row[0]+"_"+(Le+le.column[0])]){let Ne={rangeType:"cell",value:{row_index:Ce+ce,col_index:Le+ue,l:G[Ce+le.row[0]+"_"+(Le+le.column[0])].l,r:G[Ce+le.row[0]+"_"+(Le+le.column[0])].r,t:G[Ce+le.row[0]+"_"+(Le+le.column[0])].t,b:G[Ce+le.row[0]+"_"+(Le+le.column[0])].b}};se.borderInfo==null&&(se.borderInfo=[]),se.borderInfo.push(Ne)}let Ge="";if(oe[Ce]!=null&&oe[Ce][Le]!=null&&(Ge=oe[Ce][Le]),P(Ge)=="object"&&"mc"in Ge){let Ne=$.extend(!0,{},Ge.mc);"rs"in Ge.mc?(pe[Ne.r+"_"+Ne.c]=[Ce+ce,Le+ue],Ge.mc.r=Ce+ce,Ge.mc.c=Le+ue,se.merge[Ce+ce+"_"+(Le+ue)]=Ge.mc):(Ge.mc.r=pe[Ne.r+"_"+Ne.c][0],Ge.mc.c=pe[Ne.r+"_"+Ne.c][1])}te[Ce+ce][Le+ue]=Ge}ee&&(se=yl(te,le.row[0],le.row[1],se),se=yl(te,ce,he,se));let ae=$.extend(!0,[],h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save);if(ae!=null&&ae.length>0)for(let Ce=0;Ce<ae.length;Ce++){let Le=ae[Ce].cellrange,Ge=[];for(let Ne=0;Ne<Le.length;Ne++){let et=$e.CFSplitRange(Le[Ne],{row:le.row,column:le.column},{row:[ce,he],column:[ue,K]},"allPart");Ge=Ge.concat(et)}ae[Ce].cellrange=Ge}let Te;h.luckysheet_select_save[0].row_focus==h.luckysheet_select_save[0].row[0]?Te=ce:Te=he;let ie;h.luckysheet_select_save[0].column_focus==h.luckysheet_select_save[0].column[0]?ie=ue:ie=K;let Ee=[];Ee.push({row:le.row,column:le.column}),Ee.push({row:[ce,he],column:[ue,K]}),le.row=[ce,he],le.column=[ue,K],le.row_focus=Te,le.column_focus=ie,Ze(te,Ee,{cfg:se,RowlChange:ee,cdformat:ae}),lt(),$("#luckysheet-sheettable").css("cursor","default"),clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},500)}if(h.chart_selection.rangeMove&&h.chart_selection.rangeMoveDragged(),h.chart_selection.rangeResize&&h.chart_selection.rangeResizeDragged(),h.luckysheet_cell_selected_extend){if(h.luckysheet_cell_selected_extend=!1,$("#luckysheet-cell-selected-extend").hide(),!vr(h.luckysheet_select_save,h.currentSheetIndex))return;let F=nt(g.pageX,g.pageY),z=$("#luckysheet-cell-main").scrollLeft(),M=$("#luckysheet-cell-main").scrollTop(),E=F[0]+z-5,N=F[1]+M-5,L=$(window).height()+M-h.sheetBarHeight-h.statisticBarHeight,O=$(window).width()+z,V=_t(N),q=V[1],W=V[0],X=V[2],te=wt(E),le=te[1],oe=te[0],se=te[2],ce=h.luckysheet_cell_selected_extend_index[0],he=h.luckysheet_cell_selected_extend_index[1],ue=h.luckysheet_select_save[h.luckysheet_select_save.length-1],K=ue.row[0],G=ue.row[1],ee=ue.column[0],pe=ue.column[1];(K<0||N<0)&&(K=0,G=ue.row[1]-ue.row[0]),(ee<0||E<0)&&(ee=0,pe=ue.column[1]-ue.column[0]),(G>=h.visibledatarow[h.visibledatarow.length-1]||N>L)&&(K=h.visibledatarow.length-1-ue.row[1]+ue.row[0],G=h.visibledatarow.length-1),(pe>=h.visibledatacolumn[h.visibledatacolumn.length-1]||E>O)&&(ee=h.visibledatacolumn.length-1-ue.column[1]+ue.column[0],pe=h.visibledatacolumn.length-1),nl.copyRange={row:$.extend(!0,[],ue.row),column:$.extend(!0,[],ue.column)};let ae=nl.typeItemHide();if(!ae[0]&&!ae[1]&&!ae[2]&&!ae[3]&&!ae[4]&&!ae[5]&&!ae[6]?nl.applyType="0":nl.applyType="1",Math.abs(ce-X)>Math.abs(he-se)){if(X>=K&&X<=G)return;if(h.luckysheet_select_save[0].top_move>=W){if(nl.applyRange={row:[X,ue.row[0]-1],column:ue.column},nl.direction="up",K-=ue.row[0]-X,Oe.isPivotRange(K,pe)){U.info(l.affectPivot,"");return}}else if(nl.applyRange={row:[ue.row[1]+1,X],column:ue.column},nl.direction="down",G+=X-ue.row[1],Oe.isPivotRange(G,pe)){U.info(l.affectPivot,"");return}}else{if(se>=ee&&se<=pe)return;if(h.luckysheet_select_save[0].left_move>=oe){if(nl.applyRange={row:ue.row,column:[se,ue.column[0]-1]},nl.direction="left",ee-=ue.column[0]-se,Oe.isPivotRange(G,ee)){U.info(l.affectPivot,"");return}}else if(nl.applyRange={row:ue.row,column:[ue.column[1]+1,se]},nl.direction="right",pe+=se-ue.column[1],Oe.isPivotRange(G,pe)){U.info(l.affectPivot,"");return}}if(h.config.merge!=null){let Te=!1;for(let ie=ue.row[0];ie<=ue.row[1];ie++)for(let Ee=ue.column[0];Ee<=ue.column[1];Ee++){let je=h.flowdata[ie][Ee];if(je!=null&&je.mc!=null){Te=!0;break}}if(Te){de()?alert(l.noMerge):U.info(l.noMerge,"");return}for(let ie=K;ie<=G;ie++)for(let Ee=ee;Ee<=pe;Ee++){let je=h.flowdata[ie][Ee];if(je!=null&&je.mc!=null){Te=!0;break}}if(Te){de()?alert(l.noMerge):U.info(l.noMerge,"");return}}ue.row=[K,G],ue.column=[ee,pe],nl.update(),nl.createIcon(),$("#luckysheet-cell-selected-move").hide(),$("#luckysheet-sheettable").css("cursor","default"),clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},500)}}),$(".luckysheet-grid-container, #luckysheet-rightclick-menu").on("contextmenu",function(g){g.preventDefault()}),$("#luckysheet-cell-main div.luckysheet-cs-draghandle").mousedown(function(g){if(de()||h.allowEdit===!1)return;$("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle").css("cursor","move").end().find(".luckysheet-cs-draghandle").css("cursor","move"),$("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","move"),h.luckysheet_cell_selected_move=!0,h.luckysheet_scroll_status=!0;let y=nt(g.pageX,g.pageY),v=y[0]+$("#luckysheet-cell-main").scrollLeft(),b=y[1]+$("#luckysheet-cell-main").scrollTop(),k=_t(b),w=k[0],x=k[1],C=k[2],S=wt(v),_=S[0],T=S[1],A=S[2];h.luckysheet_cell_selected_move_index=[C,A],$("#luckysheet-cell-selected-move").css({left:_,width:T-_-1,top:w,height:x-w-1,display:"block"}),g.stopPropagation()}),$("#luckysheet-cell-main div.luckysheet-cs-fillhandle").mousedown(function(g){de()||h.allowEdit===!1||($("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle").css("cursor","crosshair").end().find(".luckysheet-cs-draghandle").css("cursor","crosshair"),$("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","crosshair"),h.luckysheet_cell_selected_extend_time=setTimeout(function(){h.luckysheet_cell_selected_extend=!0,h.luckysheet_scroll_status=!0;let y=nt(g.pageX,g.pageY),v=y[0]+$("#luckysheet-cell-main").scrollLeft()-5,b=y[1]+$("#luckysheet-cell-main").scrollTop()-5,k=_t(b),w=k[0],x=k[1],C=k[2],S=wt(v),_=S[0],T=S[1],A=S[2];h.luckysheet_cell_selected_extend_index=[C,A],$("#luckysheet-cell-selected-extend").css({left:_,width:T-_-1,top:w,height:x-w-1,display:"block"})},100),g.stopPropagation())}).click(function(){clearTimeout(h.luckysheet_cell_selected_extend_time),event.stopPropagation()}).dblclick(function(){let g=h.luckysheet_select_save[0],y=g.row[0],v=g.row[1],b=g.column[0],k=g.column[1];if(Oe.isPivotRange(y,b))return;let w=!1,x=0;for(let S=v+1;S<h.flowdata.length;S++)if(b-1>=0&&k+1<h.flowdata[0].length){let _=h.flowdata[S][b-1],T=h.flowdata[S][k+1];if(S==v+1)if((_==null||me(_.v))&&(T==null||me(T.v))){w=!1;break}else w=!0,x++;else{if((_==null||me(_.v))&&(T==null||me(T.v)))break;x++}}else if(b-1>=0){let _=h.flowdata[S][b-1];if(S==v+1)if(_==null||me(_.v)){w=!1;break}else w=!0,x++;else{if(_==null||me(_.v))break;x++}}else if(k+1<h.flowdata[0].length){let _=h.flowdata[S][k+1];if(S==v+1)if(_==null||me(_.v)){w=!1;break}else w=!0,x++;else{if(_==null||me(_.v))break;x++}}if(!w||x==0){event.stopPropagation();return}nl.copyRange={row:[y,v],column:[b,k]};let C=nl.typeItemHide();!C[0]&&!C[1]&&!C[2]&&!C[3]&&!C[4]&&!C[5]&&!C[6]?nl.applyType="0":nl.applyType="1",nl.applyRange={row:[v+1,v+x],column:[b,k]},nl.direction="down",h.luckysheet_select_save=[{row:[y,v+x],column:[b,k]}],nl.update(),nl.createIcon(),$("#luckysheet-cell-selected-move").hide(),$("#luckysheet-sheettable").css("cursor","default"),clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},500),event.stopPropagation()}),$("#luckysheet-bottom-add-row, #luckysheet-bottom-add-row-input, #luckysheet-bottom-return-top").on("mousedown dblclick mouseup",function(g){g.stopPropagation()}),$("#luckysheet-bottom-add-row").on("click",function(g){$("#luckysheet-rightclick-menu").hide(),rt();let y=$(this),v=$("#luckysheet-bottom-add-row-input").val();if(v==""&&(v=fe.addRowCount||100),isNaN(parseInt(v))){de()?alert(a.tipInputNumber):U.info("error",a.tipInputNumber);return}if(v=parseInt(v),v<1||v>100){de()?alert(a.tipInputNumberLimit):U.info("error",a.tipInputNumberLimit);return}Ir("row",h.flowdata.length-1,v)}),$("#luckysheet-bottom-return-top").on("click",function(g){$("#luckysheet-scrollbar-y").scrollTop(0)}),$("#luckysheet-copy-btn, #luckysheet-cols-copy-btn, #luckysheet-paste-btn-title").click(function(g){if($(this).parent().hide(),h.config.merge!=null){let v=!1;for(let b=0;b<h.luckysheet_select_save.length;b++){let k=h.luckysheet_select_save[b].row[0],w=h.luckysheet_select_save[b].row[1],x=h.luckysheet_select_save[b].column[0],C=h.luckysheet_select_save[b].column[1];if(v=Mt(h.config,k,w,x,C),v)break}if(v){de()?alert(l.noPartMerge):U.info(l.noPartMerge,"");return}}let y=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save;if(h.luckysheet_select_save.length>1&&y!=null&&y.length>0){let v=!1,b=$e.getComputeMap();e:for(let k=0;k<h.luckysheet_select_save.length&&!v;k++){let w=h.luckysheet_select_save[k].row[0],x=h.luckysheet_select_save[k].row[1],C=h.luckysheet_select_save[k].column[0],S=h.luckysheet_select_save[k].column[1];for(let _=w;_<=x;_++)for(let T=C;T<=S;T++)if($e.checksCF(_,T,b)!=null){v=!0;continue e}}if(v){de()?alert(l.noMulti):U.info(l.noMulti,"");return}}if(h.luckysheet_select_save.length>1){let v=!0,b=h.luckysheet_select_save[0].row[0],k=h.luckysheet_select_save[0].row[1],w=!0,x=h.luckysheet_select_save[0].column[0],C=h.luckysheet_select_save[0].column[1];for(let S=1;S<h.luckysheet_select_save.length;S++)(h.luckysheet_select_save[S].row[0]!=b||h.luckysheet_select_save[S].row[1]!=k)&&(v=!1),(h.luckysheet_select_save[S].column[0]!=x||h.luckysheet_select_save[S].column[1]!=C)&&(w=!1);if(!v&&!w||Yr()){de()?alert(l.noMulti):U.info(l.noMulti,"");return}}Ct.copy(g)}),$("#luckysheet-copy-paste, #luckysheet-cols-paste-btn, #luckysheet-paste-btn-title").click(function(g){Ct.paste(g,"btn"),$(this).parent().hide()}),$("#luckysheet-chart-btn-title").click(function(){_c()}),$("#luckysheetdatavisual").click(function(){_c(),$("#luckysheet-rightclick-menu").hide()}),$("#luckysheet-pivot-btn-title").click(function(g){!$t(h.currentSheetIndex,"usePivotTablereports")||Oe.createPivotTable(g)}),$("#luckysheet-chart-btn-screenshot").click(function(){let g=t.screenshot;if(h.luckysheet_select_save.length==0){de()?alert(g.screenshotTipNoSelection):U.info(g.screenshotTipTitle,g.screenshotTipNoSelection);return}if(h.luckysheet_select_save.length>1){de()?alert(g.screenshotTipHasMulti):U.info(g.screenshotTipTitle,g.screenshotTipHasMulti);return}if(h.config.merge!=null){let F=!1;for(let z=0;z<h.luckysheet_select_save.length;z++){let M=h.luckysheet_select_save[z].row[0],E=h.luckysheet_select_save[z].row[1],N=h.luckysheet_select_save[z].column[0],L=h.luckysheet_select_save[z].column[1];if(F=Mt(h.config,M,E,N,L),F)break}if(F){de()?alert(g.screenshotTipHasMerge):U.info(g.screenshotTipTitle,g.screenshotTipHasMerge);return}}let y=h.luckysheet_select_save[0].row[0],v=h.luckysheet_select_save[0].row[1],b=h.luckysheet_select_save[0].column[0],k=h.luckysheet_select_save[0].column[1],w,x;y-1<0?(w=0,x=h.visibledatarow[v]):(w=h.visibledatarow[y-1],x=h.visibledatarow[v]-h.visibledatarow[y-1]);let C,S;b-1<0?(C=0,S=h.visibledatacolumn[k]):(C=h.visibledatacolumn[b-1],S=h.visibledatacolumn[k]-h.visibledatacolumn[b-1]);let _=$("<canvas>").attr({width:Math.ceil(S*h.devicePixelRatio),height:Math.ceil(x*h.devicePixelRatio)}).css({width:S,height:x});nr(C,w,S,x,1,1,null,null,_);let T=_.get(0).getContext("2d");T.beginPath(),T.moveTo(0,0),T.lineTo(0,h.devicePixelRatio*x),T.lineWidth=h.devicePixelRatio*2,T.strokeStyle=Sl.strokeStyle,T.stroke(),T.closePath(),T.beginPath(),T.moveTo(0,0),T.lineTo(h.devicePixelRatio*S,0),T.lineWidth=h.devicePixelRatio*2,T.strokeStyle=Sl.strokeStyle,T.stroke(),T.closePath();let A=new Image,R=_.get(0).toDataURL("image/png");A.src=R,S>x?A.style.width="100%":A.style.height="100%";let I=$(window).height()-200;U.screenshot(g.screenshotTipSuccess,'<div id="luckysheet-confirm-screenshot-save" style="height:'+I+'px;overflow:auto;"></div>',R),$("#luckysheet-confirm-screenshot-save").append(A),_.remove()}),$(document).on("click.luckysheetEvent","a.download",function(){let g=$("#luckysheet-confirm-screenshot-save img").attr("src"),y=t.screenshot,v=atob(g.split(",")[1]),b=v.length,k=new Uint8Array(b);for(let S=0;S<b;S++)k[S]=v.charCodeAt(S);let w=new Blob([k]),x=document.createElement("a");x.setAttribute("href",URL.createObjectURL(w)),x.setAttribute("download",y.screenshotImageName+".png"),x.style.display="none",document.body.appendChild(x),x.click();let C;x.addEventListener("click",C=function(){requestAnimationFrame(function(){URL.revokeObjectURL(x.href)}),x.removeAttribute("href"),x.removeEventListener("click",C)}),document.body.removeChild(x)}),$("#luckysheet-splitColumn-btn-title").click(function(){if(!jr(h.currentSheetIndex)||h.luckysheet_select_save==null||h.luckysheet_select_save.length==0)return;let g=t.splitText;if(h.luckysheet_select_save.length>1){U.info(g.tipNoMulti,"");return}if(h.luckysheet_select_save[0].column[0]!=h.luckysheet_select_save[0].column[1]){U.info(g.tipNoMultiColumn,"");return}Jc.createDialog(),Jc.init()}),$("#luckysheet-insertImg-btn-title").click(function(){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}!$t(h.currentSheetIndex,"editObjects")||$("#luckysheet-imgUpload").click()}),$("#luckysheetInsertImage").click(function(){!$t(h.currentSheetIndex,"editObjects")||($("#luckysheet-imgUpload").click(),$("#luckysheet-rightclick-menu").hide())}),$("#luckysheet-imgUpload").click(function(g){g.stopPropagation()}),$("#luckysheet-imgUpload").on("change",function(g){if(!$t(h.currentSheetIndex,"editObjects",!1))return;let y=g.currentTarget.files[0];Re.insertImg(y)}),$("#luckysheet-insertLink-btn-title").click(function(){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}!jr(h.currentSheetIndex)||h.luckysheet_select_save==null||h.luckysheet_select_save.length==0||(Cl.createDialog(),Cl.init())}),$("#luckysheetInsertLink").click(function(){$("#luckysheet-insertLink-btn-title").click(),$("#luckysheet-rightclick-menu").hide()}),$("#luckysheet-dataVerification-btn-title").click(function(){!jr(h.currentSheetIndex)||h.luckysheet_select_save==null||h.luckysheet_select_save.length==0||(Ye.createDialog(),Ye.init())}),$("#luckysheetDataVerification").click(function(){$("#luckysheet-dataVerification-btn-title").click(),$("#luckysheet-rightclick-menu").hide()}),$("#luckysheetCellFormatRightClickMenu").click(function(){fm()}),$("#luckysheet-freezen-btn-horizontal").click(function(){$.trim($(this).text())==Q().freezen.freezenCancel?(Y.saveFrozen("freezenCancel"),Y.freezenverticaldata!=null&&(Y.cancelFreezenVertical(),Y.createAssistCanvas(),Be()),Y.freezenhorizontaldata!=null&&(Y.cancelFreezenHorizontal(),Y.createAssistCanvas(),Be()),Y.scrollAdapt(),$("#luckysheet-icon-freezen-menu-menuButton").find(".fa.fa-check").remove()):(Y.saveFrozen("freezenRow"),Y.freezenverticaldata!=null&&(Y.cancelFreezenVertical(),Y.createAssistCanvas(),Be()),Y.freezenhorizontaldata==null&&(Y.createFreezenHorizontal(),Y.createAssistCanvas()))}),$("#luckysheet-freezen-btn-vertical").click(function(){Y.freezenverticaldata!=null?(Y.saveFrozen("freezenCancel"),Y.cancelFreezenVertical(),Be()):(Y.saveFrozen("freezenColumn"),Y.createFreezenVertical()),Y.createAssistCanvas()}),$("#luckysheet-rightclick-menu input").on("keydown",function(g){g.stopPropagation()}),$("#luckysheet-modal-dialog-mask").on("click dbclick mousedown mousemove mouseup",function(g){g.stopPropagation(),g.preventDefault()});let d=function(){(document.hidden||document.webkitHidden||document.msHidden)&&(h.iscopyself=!1)};$(document).on("visibilitychange.luckysheetEvent webkitvisibilitychange.luckysheetEvent msvisibilitychange.luckysheetEvent",d).on("mouseleave.luckysheetEvent",function(){h.iscopyself=!1}).on("mousedown.luckysheetEvent",function(g){He.removeActivePs(),Cr(g),$(g.target).closest("#luckysheet-wa-editor").length>0&&parseInt($("#luckysheet-input-box").css("top"))>0&&(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",0,"rangeOfSelect"))}),$("#luckysheet-left-top").click(function(g){!Di(h.currentSheetIndex)||($("#luckysheet-wa-functionbox-confirm").click(),h.luckysheet_select_status=!1,h.luckysheet_select_save=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1],row_focus:0,column_focus:0,row_select:!0,column_select:!0}],lt(),clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},500),ne.saveParam("mv",h.currentSheetIndex,h.luckysheet_select_save),g.stopPropagation())}),$("#luckysheet-icon-undo").click(function(g){$(this).hasClass("disabled")||Tn.redo(g)}),$("#luckysheet-icon-redo").click(function(g){$(this).hasClass("disabled")||Tn.undo(g)}),$(document).on("mousedown.luckysheetEvent","div.luckysheet-modal-dialog",function(g){if(!$(g.target).is(".luckysheet-modal-dialog"))return;h.luckysheet_model_move_state=!0,h.luckysheet_model_move_obj=$(g.currentTarget);let y=h.luckysheet_model_move_obj.offset();h.luckysheet_model_xy=[g.pageX-y.left,g.pageY-y.top]}),$(document).on("click.luckysheetEvent",".luckysheet-modal-dialog-title-close, .luckysheet-model-close-btn",function(g){($("#textcolorselect").is(":visible")||$("#cellcolorselect").is(":visible"))&&$("#luckysheet-conditionformat-dialog").show(),$(g.currentTarget).parents(".luckysheet-modal-dialog").hide(),$("#luckysheet-modal-dialog-mask").hide(),$(this).parents(".luckysheet-modal-dialog").hasClass("luckysheet-search-formula")&&(p.dontupdate(),jt("down",0,"rangeOfSelect")),$(this).parents(".luckysheet-modal-dialog").hasClass("luckysheet-search-formula-parm")&&(p.dontupdate(),jt("down",0,"rangeOfSelect")),$(this).parents(".luckysheet-modal-dialog").hasClass("luckysheet-search-formula-parm-select")&&(p.dontupdate(),jt("down",0,"rangeOfSelect")),rt()}),$("#luckysheet_info_detail_title").click(function(){window.open(fe.myFolderUrl,"_self")}),$("#luckysheet-chart-rangeShow").on("mousedown.chartRangeShowMove",".luckysheet-chart-rangeShow-move",function(g){h.chart_selection.rangeMove=!0,h.luckysheet_scroll_status=!0,h.chart_selection.rangeMoveObj=$(this).parent();let y=h.currentChart,v=$(this).parent().attr("id");if(v=="luckysheet-chart-rangeShow-content"){let _=y.rangeArray[0].row[0]+y.rangeSplitArray.content.row[0],T=y.rangeArray[0].column[0]+y.rangeSplitArray.content.column[0];h.chart_selection.rangeMoveIndex=[_,T]}else if(v=="luckysheet-chart-rangeShow-rowtitle"){let _=y.rangeArray[0].row[0]+y.rangeSplitArray.rowtitle.row[0],T=y.rangeArray[0].column[0]+y.rangeSplitArray.rowtitle.column[0];h.chart_selection.rangeMoveIndex=[_,T]}else if(v=="luckysheet-chart-rangeShow-coltitle"){let _=y.rangeArray[0].row[0]+y.rangeSplitArray.coltitle.row[0],T=y.rangeArray[0].column[0]+y.rangeSplitArray.coltitle.column[0];h.chart_selection.rangeMoveIndex=[_,T]}let b=nt(g.pageX,g.pageY),k=b[0]+$("#luckysheet-cell-main").scrollLeft(),w=b[1]+$("#luckysheet-cell-main").scrollTop(),x=$(this).data("type");x=="top"?w+=3:x=="right"?k-=3:x=="bottom"?w-=3:x=="left"&&(k+=3);let C=_t(w)[2],S=wt(k)[2];h.chart_selection.rangeMovexy=[C,S],g.stopPropagation()}),$("#luckysheet-chart-rangeShow").on("mousedown.chartRangeShowResize",".luckysheet-chart-rangeShow-resize",function(g){h.chart_selection.rangeResize=$(this).data("type"),h.luckysheet_scroll_status=!0,h.chart_selection.rangeResizeObj=$(this).parent();let y=h.currentChart,v,b,k,w,x=$(this).parent().attr("id");if(x=="luckysheet-chart-rangeShow-content")y.rangeRowCheck.exits?(v=y.rangeArray[0].row[0]+y.rangeSplitArray.content.row[0],b=y.rangeArray[0].row[0]+y.rangeSplitArray.content.row[1]):(v=y.rangeSplitArray.content.row[0],b=y.rangeSplitArray.content.row[0]),y.rangeColCheck.exits?(k=y.rangeArray[0].column[0]+y.rangeSplitArray.content.column[0],w=y.rangeArray[0].column[0]+y.rangeSplitArray.content.column[1]):(k=y.rangeSplitArray.content.column[0],w=y.rangeSplitArray.content.column[1]),h.chart_selection.rangeResizeIndex={row:[v,b],column:[k,w]};else if(x=="luckysheet-chart-rangeShow-rowtitle"){let R=y.rangeArray[0].row[0]+y.rangeSplitArray.rowtitle.row[0],I=y.rangeArray[0].row[0]+y.rangeSplitArray.rowtitle.row[1],F=y.rangeArray[0].column[0]+y.rangeSplitArray.rowtitle.column[0],z=y.rangeArray[0].column[0]+y.rangeSplitArray.rowtitle.column[1];h.chart_selection.rangeResizeIndex={row:[R,I],column:[F,z]}}else if(x=="luckysheet-chart-rangeShow-coltitle"){let R=y.rangeArray[0].row[0]+y.rangeSplitArray.coltitle.row[0],I=y.rangeArray[0].row[0]+y.rangeSplitArray.coltitle.row[1],F=y.rangeArray[0].column[0]+y.rangeSplitArray.coltitle.column[0],z=y.rangeArray[0].column[0]+y.rangeSplitArray.coltitle.column[1];h.chart_selection.rangeResizeIndex={row:[R,I],column:[F,z]}}let C=nt(g.pageX,g.pageY),S=C[0]+$("#luckysheet-cell-main").scrollLeft(),_=C[1]+$("#luckysheet-cell-main").scrollTop();h.chart_selection.rangeResize=="lt"?(S+=3,_+=3):h.chart_selection.rangeResize=="lb"?(S+=3,_-=3):h.chart_selection.rangeResize=="rt"?(S-=3,_+=3):h.chart_selection.rangeResize=="rb"&&(S-=3,_-=3);let T=_t(_)[2],A=wt(S)[2];h.chart_selection.rangeResizexy=[T,A],g.stopPropagation()}),$("#luckysheet-wa-calculate-size").mousedown(function(g){let y=g.pageY;p.functionResizeData.y=y,p.functionResizeStatus=!0,p.functionResizeData.calculatebarHeight=h.calculatebarHeight,p.rangetosheet!=null&&p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1])}),ke.initialMenuButton();let f=document.getElementById("testdpidiv").offsetWidth*h.devicePixelRatio,m=document.getElementById("testdpidiv").offsetHeight*h.devicePixelRatio;$(document).on("paste.luckysheetEvent",function(g){if(!de()){if(Ct.isPasteAction){$("#luckysheet-rich-text-editor").blur(),Ct.isPasteAction=!1;let y=window.clipboardData;y||(y=g.originalEvent.clipboardData);let v=y.getData("text/html")||y.getData("text/plain"),b=!0;if(v.indexOf("luckysheet_copy_action_table")>-1&&h.luckysheet_copy_save.copyRange!=null&&h.luckysheet_copy_save.copyRange.length>0){let w=[],x=new RegExp("<tr.*?>(.*?)</tr>","gs"),C=new RegExp("<td.*?>(.*?)</td>","gs"),S=v.match(x)||[];for(let z=0;z<S.length;z++){let M=[],E=S[z].match(C);if(E!=null)for(let N=0;N<E.length;N++){let L=E[N].replace(/<td.*?>/gs,"").replace(/<\/td>/gs,"");M.push(L)}w.push(M)}let _=h.luckysheet_copy_save.copyRange[0].row[0],T=h.luckysheet_copy_save.copyRange[0].row[1],A=h.luckysheet_copy_save.copyRange[0].column[0],R=h.luckysheet_copy_save.copyRange[0].column[1],I=h.luckysheet_copy_save.dataSheetIndex,F;I==h.currentSheetIndex?F=xe.deepCopyFlowData(h.flowdata):F=h.luckysheetfile[Z(I)].data;for(let z=_;z<=T&&!(z-_>w.length-1);z++)for(let M=A;M<=R;M++){let E=F[z][M],N=!1;if(E!=null&&E.mc!=null&&E.mc.rs==null)continue;let L;if(E!=null?E.ct!=null&&E.ct.fa.indexOf("w")>-1?L=F[z][M].v:L=F[z][M].m:L="",L==null&&F[z][M]&&F[z][M].ct&&F[z][M].ct.t=="inlineStr"&&(L=F[z][M].ct.s.map(O=>O.v).join(""),N=!0),L==null&&(L=""),N){let O=$(w[z-_][M-A]).text().replace(/\s|\n/g," "),V=L.replace(/\n/g,"").replace(/\s/g," ");if(O!=V){b=!1;break}}else if(w[z-_][M-A]!=L){b=!1;break}}}let k=Q().fontjson;if(!Je.createHookFunction("rangePasteBefore",h.luckysheet_select_save,v))return;if(v.indexOf("luckysheet_copy_action_table")>-1&&h.luckysheet_copy_save.copyRange!=null&&h.luckysheet_copy_save.copyRange.length>0&&b)h.luckysheet_paste_iscut?(h.luckysheet_paste_iscut=!1,Ct.pasteHandlerOfCutPaste(h.luckysheet_copy_save),Ct.clearcopy(g)):Ct.pasteHandlerOfCopyPaste(h.luckysheet_copy_save);else if(v.indexOf("luckysheet_copy_action_image")>-1)Re.pasteImgItem();else{let w;try{w=$("#luckysheet-copy-content").html(v)}catch(x){}if(w&&(w.find("table").length!==0||w.children("span[data-sheets-value]").length===1)){if(w.find("table").length===0){let A=w.children("span[data-sheets-value]")[0].outerHTML.replace(/^<span/,"<td").replace(/<\/span>$/,"</td>");w.html("<table><tbody><tr>"+A+"</tr></tbody></table>")}let x=new Array(w.find("table tr").length),C=0,S="th, td";w.find("table tr").eq(0).find(S).each(function(){let A=parseInt($(this).attr("colspan"));isNaN(A)&&(A=1),C+=A});for(let A=0;A<x.length;A++)x[A]=new Array(C);let _=0,T={};w.find("table tr").each(function(){let A=$(this),R=0;A.find(S).each(function(){let I=$(this),F={},z=I.attr("data-sheets-formula"),M=I.text();if(z&&z.startsWith("=")){let oe=h.luckysheet_select_save[0],se=oe.row[0]+_,ce=oe.column[0]+R,he=z.replace(/([^a-zA-Z0-9])R(\[?)(-?[0-9]+)\]?C(\[?)(-?[0-9]+)\]?/g,function(K,G,ee,pe,ae,Te){return[G,ae?tt(ce+ +Te):`$${tt(+Te-1)}`,ee?se+ +pe+1:`$${pe}`].join("")}).replace(/\bTRUE\b/g,"true").replace(/\bFALSE\b/g,"false"),ue=p.execfunction(he,se,ce);F.f=ue[2],F.v=ue[1],F.ct=at(M)[1],F.ct&&F.ct.fa&&(F.m=mt(F.ct.fa,F.v))}else if(M.trim().length===0)F.v=null,F.m="";else{let oe=at(M);F.v=oe[2],F.ct=oe[1],F.m=oe[0]}let E=I.css("background-color");E=="rgba(0, 0, 0, 0)"&&(E=null),F.bg=E;let N=I.css("font-weight");N==400||N=="normal"?F.bl=0:F.bl=1,I.css("text-decoration").indexOf("underline")!=-1&&(F.un=1),I.css("font-style")=="normal"?F.it=0:F.it=1;let q=I.css("font-family").split(",");for(let oe=0;oe<q.length;oe++){let se=$.trim(q[oe].toLowerCase());if(se=k[se],se==null)F.ff=0;else{F.ff=se;break}}let W=Math.round(parseInt(I.css("font-size"))*72/96);F.fs=W;let X=I.css("color");F.fc=X;let te=I.css("text-align");te=="center"?F.ht=0:te=="right"?F.ht=2:F.ht=1;let le=I.css("vertical-align");for(le=="middle"?F.vt=0:le=="top"||le=="text-top"?F.vt=1:F.vt=2;R<C&&x[_][R]!=null;)R++;if(R==C)return!0;if(x[_][R]==null){x[_][R]=F;let oe=parseInt(I.attr("rowspan")),se=parseInt(I.attr("colspan"));isNaN(oe)&&(oe=1),isNaN(se)&&(se=1);let ce=h.luckysheet_select_save[0].row[0]+_,he=h.luckysheet_select_save[0].column[0]+R;for(let ue=0;ue<oe;ue++)for(let K=0;K<se;K++){if(ue==0){let G=I.css("border-top");if(G!=null&&G.length>0&&G.substr(0,3).toLowerCase()!="0px"){let ee=I.css("border-top-width"),pe=I.css("border-top-style"),ae=I.css("border-top-color"),Te=ke.getQKBorder(ee,pe,ae);T[_+ue+"_"+(R+K)]==null&&(T[_+ue+"_"+(R+K)]={}),T[_+ue+"_"+(R+K)].t={style:Te[0],color:Te[1]}}}if(ue==oe-1){let G=I.css("border-bottom");if(G!=null&&G.length>0&&G.substr(0,3).toLowerCase()!="0px"){let ee=I.css("border-bottom-width"),pe=I.css("border-bottom-style"),ae=I.css("border-bottom-color"),Te=ke.getQKBorder(ee,pe,ae);T[_+ue+"_"+(R+K)]==null&&(T[_+ue+"_"+(R+K)]={}),T[_+ue+"_"+(R+K)].b={style:Te[0],color:Te[1]}}}if(K==0){let G=I.css("border-left");if(G!=null&&G.length>0&&G.substr(0,3).toLowerCase()!="0px"){let ee=I.css("border-left-width"),pe=I.css("border-left-style"),ae=I.css("border-left-color"),Te=ke.getQKBorder(ee,pe,ae);T[_+ue+"_"+(R+K)]==null&&(T[_+ue+"_"+(R+K)]={}),T[_+ue+"_"+(R+K)].l={style:Te[0],color:Te[1]}}}if(K==se-1){let G=I.css("border-right");if(G!=null&&G.length>0&&G.substr(0,3).toLowerCase()!="0px"){let ee=I.css("border-right-width"),pe=I.css("border-right-style"),ae=I.css("border-right-color"),Te=ke.getQKBorder(ee,pe,ae);T[_+ue+"_"+(R+K)]==null&&(T[_+ue+"_"+(R+K)]={}),T[_+ue+"_"+(R+K)].r={style:Te[0],color:Te[1]}}}ue==0&&K==0||(x[_+ue][R+K]={mc:{r:ce,c:he}})}if(oe>1||se>1){let ue={rs:oe,cs:se,r:ce,c:he};x[_][R].mc=ue}}if(R++,R==C)return!0}),_++}),h.luckysheet_selection_range=[],Ct.pasteHandler(x,T)}else if(y.files.length==1&&y.files[0].type.indexOf("image")>-1){Re.insertImg(y.files[0]);return}else v=y.getData("text/plain"),Ct.pasteHandler(v);$("#luckysheet-copy-content").empty()}}else if($(g.target).closest("#luckysheet-rich-text-editor").length>0){g.preventDefault();let y=window.clipboardData;y||(y=g.originalEvent.clipboardData);let v=y.getData("text/plain");document.execCommand("insertText",!1,v)}}}),fe.enablePage&&$("#luckysheet-bottom-page-next").click(function(){let g=fe.pageInfo.queryExps,y=fe.pageInfo.reportId,v=fe.pageInfo.fields,b=fe.pageInfo.mobile,k=fe.pageInfo.frezon,w=fe.pageInfo.currentPage,x=fe.pageInfo.totalPage,C=fe.pageInfo.pageUrl;Je.addDataAjax({queryExps:g,reportId:y,fields:v,mobile:b,frezon:k,pageIndex:w,currentPage:w},h.currentSheetIndex,C,function(){if(fe.pageInfo.currentPage++,fe.pageInfo.totalPage==fe.pageInfo.currentPage){$("#luckysheet-bottom-page-next").hide();let S=_e(a.pageInfoFull,{total:fe.total,totalPage:fe.pageInfo.totalPage});$("#luckysheet-bottom-page-info").html(S)}else{let S=_e(a.pageInfo,{total:fe.total,totalPage:fe.pageInfo.totalPage,currentPage:fe.pageInfo.currentPage});$("#luckysheet-bottom-page-info").html(S)}})}).mousedown(function(g){g.stopPropagation()}),$("#luckysheet-bottom-bottom-top").click(function(){$("#luckysheet-scrollbar-y").scrollTop(0)}).mousedown(function(g){g.stopPropagation()}),$("#luckysheet-wa-editor,#luckysheet-icon-morebtn-div,.luckysheet-toolbar-button").click(function(g){this.id!="luckysheet-icon-paintformat"&&ke.luckysheetPaintModelOn&&ke.cancelPaintModel()})}function Cb(){let e=We(".luckysheet-multipleRange-show");e.length===void 0&&(e=[e]),e.forEach(n=>{let t=n.id.replace("luckysheet-multipleRange-show-","");h.cooperativeEdit.usernameTimeout["user"+t]===null&&(We(".username",n).style.display="none")})}var gm=Ie(()=>{cm();xl();Vl();on();Xs();Ur();qr();Ua();yr();il();gr();Oa();Wc();fl();Qt();ba();Lr();pr();za();Zt();Wa();Mo();um();pn();Gt();Ml();mm();dt();Nt();Ol();mr();Ft();Pa();xa();Ut();da();pm();Yt();Kt();ll();Jt();Al();Ll();Va();Co();bt();Xe();$o()});function ym(){let e=Q().drag;$("#luckysheet-copy-json-head").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let o=!1;for(let s=0;s<h.luckysheet_select_save.length;s++){let u=h.luckysheet_select_save[s].row[0],d=h.luckysheet_select_save[s].row[1],f=h.luckysheet_select_save[s].column[0],m=h.luckysheet_select_save[s].column[1];if(o=Mt(h.config,u,d,f,m),o)break}if(o){de()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length!=0){if(l.length==1){let o={};for(let s=0;s<l[0].length;s++)o[ze(0,s,l)]="";a.push(o)}else for(let o=1;o<l.length;o++){let s={};for(let u=0;u<l[0].length;u++)ze(0,u,l)==null?s[""]=ze(o,u,l):s[ze(0,u,l)]=ze(o,u,l);a.push(s)}Ct.copybyformat(t,JSON.stringify(a))}}),$("#luckysheet-copy-json-nohead").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let s=!1;for(let u=0;u<h.luckysheet_select_save.length;u++){let d=h.luckysheet_select_save[u].row[0],f=h.luckysheet_select_save[u].row[1],m=h.luckysheet_select_save[u].column[0],g=h.luckysheet_select_save[u].column[1];if(s=Mt(h.config,d,f,m,g),s)break}if(s){de()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length==0)return;let o=h.luckysheet_select_save[0].column[0];for(let s=0;s<l.length;s++){let u={};for(let d=0;d<l[0].length;d++)u[tt(d+o)]=ze(s,d,l);a.push(u)}Ct.copybyformat(t,JSON.stringify(a))}),$("#luckysheet-copy-array1").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let o=!1;for(let s=0;s<h.luckysheet_select_save.length;s++){let u=h.luckysheet_select_save[s].row[0],d=h.luckysheet_select_save[s].row[1],f=h.luckysheet_select_save[s].column[0],m=h.luckysheet_select_save[s].column[1];if(o=Mt(h.config,u,d,f,m),o)break}if(o){de()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length!=0){for(let o=0;o<l.length;o++)for(let s=0;s<l[0].length;s++)a.push(ze(o,s,l));Ct.copybyformat(t,JSON.stringify(a))}}),$("#luckysheet-copy-array2").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let o=!1;for(let s=0;s<h.luckysheet_select_save.length;s++){let u=h.luckysheet_select_save[s].row[0],d=h.luckysheet_select_save[s].row[1],f=h.luckysheet_select_save[s].column[0],m=h.luckysheet_select_save[s].column[1];if(o=Mt(h.config,u,d,f,m),o)break}if(o){de()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length!=0){for(let o=0;o<l.length;o++){let s=[];for(let u=0;u<l[0].length;u++)s.push(ze(o,u,l));a.push(s)}Ct.copybyformat(t,JSON.stringify(a))}}),$("#luckysheet-copy-arraymore-confirm").click(function(t){if(t.target.nodeName==="INPUT")return;if($("body .luckysheet-cols-menu").hide(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let m=!1;for(let g=0;g<h.luckysheet_select_save.length;g++){let y=h.luckysheet_select_save[g].row[0],v=h.luckysheet_select_save[g].row[1],b=h.luckysheet_select_save[g].column[0],k=h.luckysheet_select_save[g].column[1];if(m=Mt(h.config,y,v,b,k),m)break}if(m){de()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length==0)return;for(let m=0;m<l.length;m++)for(let g=0;g<l[0].length;g++)a.push(l[m][g]);let o=$("#luckysheet-copy-arraymore-row").val(),s=$("#luckysheet-copy-arraymore-col").val();if(o==""&&s==""){Ct.copybyformat(t,JSON.stringify(a)),$("body .luckysheet-cols-menu").hide();return}if(o==""?o=1:(o=parseInt(o),o==null&&(o=1)),s==""?s=1:(s=parseInt(s),s==null&&(s=1)),o.toString()=="NaN"||s.toString()=="NaN"){de()?alert(e.inputCorrect):U.info(e.inputCorrect,"");return}if(o<1||s<1){de()?alert(e.notLessOne):U.info(e.notLessOne,"");return}let u=a.length,d=0,f=[];for(let m=0;m<o;m++){let g=[];for(let y=0;y<s;y++)if(g.push(a[d++]),d>=u){Ct.copybyformat(t,JSON.stringify(f)),$("body .luckysheet-cols-menu").hide();return}f.push(g)}Ct.copybyformat(t,JSON.stringify(f))}),$("#luckysheet-copy-diagonal").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let s=!1;for(let u=0;u<h.luckysheet_select_save.length;u++){let d=h.luckysheet_select_save[u].row[0],f=h.luckysheet_select_save[u].row[1],m=h.luckysheet_select_save[u].column[0],g=h.luckysheet_select_save[u].column[1];if(s=Mt(h.config,d,f,m,g),s)break}if(s){de()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length==0)return;let o=l[0].length;for(let s=0;s<l.length&&!(s>=o);s++)a.push(l[s][s]);Ct.copybyformat(t,JSON.stringify(a))}),$("#luckysheet-copy-antidiagonal").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let s=!1;for(let u=0;u<h.luckysheet_select_save.length;u++){let d=h.luckysheet_select_save[u].row[0],f=h.luckysheet_select_save[u].row[1],m=h.luckysheet_select_save[u].column[0],g=h.luckysheet_select_save[u].column[1];if(s=Mt(h.config,d,f,m,g),s)break}if(s){de()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length==0)return;let o=l[0].length;for(let s=0;s<l.length&&!(s>=o);s++)a.push(l[s][o-s-1]);Ct.copybyformat(t,JSON.stringify(a))}),$("#luckysheet-copy-diagonaloffset").click(function(t){if(t.target.nodeName==="INPUT")return;if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let u=!1;for(let d=0;d<h.luckysheet_select_save.length;d++){let f=h.luckysheet_select_save[d].row[0],m=h.luckysheet_select_save[d].row[1],g=h.luckysheet_select_save[d].column[0],y=h.luckysheet_select_save[d].column[1];if(u=Mt(h.config,f,m,g,y),u)break}if(u){de()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length==0)return;let o=l[0].length,s=parseInt($("#luckysheet-copy-diagonaloffset-value").val());if(s.toString()=="NaN"){de()?alert(e.inputCorrect):U.info(e.inputCorrect,"");return}if(s<0){de()?alert(e.offsetColumnLessZero):U.info(e.offsetColumnLessZero,"");return}s==null&&(s=1);for(let u=0;u<l.length&&!(u+s>=o);u++)a.push(l[u][u+s]);Ct.copybyformat(t,JSON.stringify(a))}),$("#luckysheet-copy-boolvalue").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let o=!1;for(let s=0;s<h.luckysheet_select_save.length;s++){let u=h.luckysheet_select_save[s].row[0],d=h.luckysheet_select_save[s].row[1],f=h.luckysheet_select_save[s].column[0],m=h.luckysheet_select_save[s].column[1];if(o=Mt(h.config,u,d,f,m),o)break}if(o){de()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length!=0){for(let o=0;o<l.length;o++){let s=[];for(let u=0;u<l[0].length;u++){let d=!1,f;P(l[o][u])=="object"?f=l[o][u].v:f=l[o][u],f==null||f==""?d=!1:(f=parseInt(f),f==null||f>0?d=!0:d=!1),s.push(d)}a.push(s)}Ct.copybyformat(t,JSON.stringify(a))}}),$("#luckysheet-matrix-turn-up").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[];for(let o=l.length-1;o>=0;o--){let s=[];for(let u=0;u<l[0].length;u++){let d="";l[o]!=null&&l[o][u]!=null&&(d=l[o][u]),s.push(d)}a.push(s)}xe.controlHandler(a)}),$("#luckysheet-matrix-turn-left").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[];for(let o=0;o<l.length;o++){let s=[];for(let u=l[0].length-1;u>=0;u--){let d="";l[o]!=null&&l[o][u]!=null&&(d=l[o][u]),s.push(d)}a.push(s)}xe.controlHandler(a)}),$("#luckysheet-matrix-turn-cw").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[];for(let o=0;o<l[0].length;o++){let s=[];for(let u=l.length-1;u>=0;u--){let d="";l[u]!=null&&l[u][o]!=null&&(d=l[u][o]),s.push(d)}a.push(s)}xe.controlHandlerD(a)}),$("#luckysheet-matrix-turn-anticw").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[];for(let o=l[0].length-1;o>=0;o--){let s=[];for(let u=0;u<l.length;u++){let d="";l[u]!=null&&l[u][o]!=null&&(d=l[u][o]),s.push(d)}a.push(s)}xe.controlHandlerD(a)}),$("#luckysheet-matrix-turn-trans").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[];for(let o=0;o<l[0].length;o++){let s=[];for(let u=0;u<l.length;u++){let d="";l[u]!=null&&l[u][o]!=null&&(d=l[u][o]),s.push(d)}a.push(s)}xe.controlHandlerD(a)});let n=function(t,l){if(t==0)return 0;let a,o;for(a=t,o=(l-1)*a/l+t/(Math.pow(a,l-1)*l);Math.abs(o-a)>1e-6;)a=o,o=(l-1)*a/l+t/(Math.pow(a,l-1)*l);return o};$("#luckysheet-matrix-cal-confirm").click(function(t){if(t.target.nodeName==="INPUT"||t.target.nodeName==="SELECT")return;if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=$("#luckysheet-matrix-cal-type").val(),o=parseInt($("#luckysheet-matrix-cal-value").val());if(o.toString()=="NaN"){de()?alert(e.inputCorrect):U.info(e.inputCorrect,"");return}o==null&&(o=2);let s=[];for(let u=0;u<l.length;u++){let d=[];for(let f=0;f<l[0].length;f++){let m="";l[u]!=null&&l[u][f]!=null&&(m=l[u][f],parseInt(m)!=null&&l[u][f].ct!=null&&l[u][f].ct.t=="n"&&(a=="minus"?m.v=m.v-o:a=="multiply"?m.v=m.v*o:a=="divided"?m.v=Il(m.v/o,4):a=="power"?m.v=Math.pow(m.v,o):a=="root"?o==2?m.v=Il(Math.sqrt(m.v),4):o==3&&Math.cbrt?m.v=Il(Math.cbrt(m.v),4):m.v=Il(n(m.v,o),4):a=="log"?m.v=Il(Math.log(m.v)*1e4/Math.log(Math.abs(o)),4):m.v=m.v+o,m.v==null?m.m="":m.m=m.v.toString())),d.push(m)}s.push(d)}xe.controlHandler(s)}),$("#luckysheet-matrix-delezero-row").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[],o=l[0].length;for(let s=0;s<l.length;s++){let u=[],d=!0,f=!0;for(let g=0;g<o;g++){let y="";if(l[s]!=null&&l[s][g]!=null){if(y=l[s][g],(y.v=="0"||y.v==0)&&d)continue;d=!1}u.push(y)}let m=[];if(u.length==o)m=u;else{for(let y=u.length-1;y>=0;y--){let v="";if(u[y]!=null){if(v=u[y],(v.v=="0"||v.v==0)&&f)continue;f=!1}m.unshift(v)}let g=o-m.length;for(let y=0;y<g;y++)m.push("")}a.push(m)}xe.controlHandler(a)}),$("#luckysheet-matrix-delezero-column").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[],o=l.length,s=l[0].length;for(let d=0;d<s;d++){let f=[],m=!0,g=!0;for(let v=0;v<o;v++){let b="";if(l[v]!=null&&l[v][d]!=null){if(b=l[v][d],(b.v=="0"||b.v==0)&&m)continue;m=!1}f.push(b)}let y=[];if(f.length==o)y=f;else{for(let b=f.length-1;b>=0;b--){let k="";if(f[b]!=null){if(k=f[b],(k.v=="0"||k.v==0)&&g)continue;g=!1}y.unshift(k)}let v=o-y.length;for(let b=0;b<v;b++)y.push("")}a.push(y)}let u=[];for(let d=0;d<a[0].length;d++){let f=[];for(let m=0;m<a.length;m++){let g="";a[m]!=null&&a[m][d]!=null&&(g=a[m][d]),f.push(g)}u.push(f)}xe.controlHandler(u)}),$("#luckysheet-matrix-delerpt-row").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[],o=l[0].length;for(let s=0;s<l.length;s++){let u=[],d={};for(let m=0;m<o;m++){let g=null;l[s]!=null&&l[s][m]!=null&&(g=l[s][m],g.v in d||(d[g.v]=[]),d[g.v].push(g))}for(let m=0;m<o;m++){let g=null;l[s]!=null&&l[s][m]!=null&&(g=l[s][m],d[g.v].length==1&&u.push(g))}let f=o-u.length;for(let m=0;m<f;m++)u.push(null);a.push(u)}xe.controlHandler(a)}),$("#luckysheet-matrix-delerpt-column").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){de()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[],o=l.length,s=l[0].length;for(let d=0;d<s;d++){let f=[],m={};for(let y=0;y<o;y++){let v=null;l[y]!=null&&l[y][d]!=null&&(v=l[y][d],v.v in m||(m[v.v]=[]),m[v.v].push(v))}for(let y=0;y<o;y++){let v=null;l[y]!=null&&l[y][d]!=null&&(v=l[y][d],m[v.v].length==1&&f.push(v))}a1=f;let g=o-a1.length;for(let y=0;y<g;y++)a1.push(null);a.push(a1)}let u=[];for(let d=0;d<a[0].length;d++){let f=[];for(let m=0;m<a.length;m++){let g=null;a[m]!=null&&a[m][d]!=null&&(g=a[m][d]),f.push(g)}u.push(f)}xe.controlHandler(u)})}var vm=Ie(()=>{Wa();dt();Ft();Kt();ll();Jt();bt();Xe()});function wm(){if(!eu){eu=!0;let t=Q(),l=t.toolbar;$("#luckysheetsheetconfigcolorur").spectrum({showPalette:!0,preferredFormat:"hex",clickoutFiresChange:!1,showInitial:!0,showInput:!0,flat:!0,hideAfterPaletteSelect:!1,showSelectionPalette:!0,maxPaletteSize:10,cancelText:t.sheetconfig.cancelText,chooseText:t.sheetconfig.chooseText,togglePaletteMoreText:l.toolMore,togglePaletteLessText:l.toolLess,clearText:l.clearText,noColorSelectedText:l.noColorSelectedText,palette:[["rgb(0, 0, 0)","rgb(67, 67, 67)","rgb(102, 102, 102)","rgb(204, 204, 204)","rgb(217, 217, 217)","rgb(255, 255, 255)"],["rgb(152, 0, 0)","rgb(255, 0, 0)","rgb(255, 153, 0)","rgb(255, 255, 0)","rgb(0, 255, 0)","rgb(0, 255, 255)","rgb(74, 134, 232)","rgb(0, 0, 255)","rgb(153, 0, 255)","rgb(255, 0, 255)"],["rgb(230, 184, 175)","rgb(244, 204, 204)","rgb(252, 229, 205)","rgb(255, 242, 204)","rgb(217, 234, 211)","rgb(208, 224, 227)","rgb(201, 218, 248)","rgb(207, 226, 243)","rgb(217, 210, 233)","rgb(234, 209, 220)"],["rgb(221, 126, 107)","rgb(234, 153, 153)","rgb(249, 203, 156)","rgb(255, 229, 153)","rgb(182, 215, 168)","rgb(162, 196, 201)","rgb(164, 194, 244)","rgb(159, 197, 232)","rgb(180, 167, 214)","rgb(213, 166, 189)"],["rgb(204, 65, 37)","rgb(224, 102, 102)","rgb(246, 178, 107)","rgb(255, 217, 102)","rgb(147, 196, 125)","rgb(118, 165, 175)","rgb(109, 158, 235)","rgb(111, 168, 220)","rgb(142, 124, 195)","rgb(194, 123, 160)"],["rgb(166, 28, 0)","rgb(204, 0, 0)","rgb(230, 145, 56)","rgb(241, 194, 50)","rgb(106, 168, 79)","rgb(69, 129, 142)","rgb(60, 120, 216)","rgb(61, 133, 198)","rgb(103, 78, 167)","rgb(166, 77, 121)"],["rgb(91, 15, 0)","rgb(102, 0, 0)","rgb(120, 63, 4)","rgb(127, 96, 0)","rgb(39, 78, 19)","rgb(12, 52, 61)","rgb(28, 69, 135)","rgb(7, 55, 99)","rgb(32, 18, 77)","rgb(76, 17, 48)"],["#c1232b","#27727b","#fcce10","#e87c25","#b5c334","#fe8463","#9bca63","#fad860","#f3a43b","#60c0dd","#d7504b","#c6e579","#f4e001","#f0805a","#26c0c0","#c12e34","#e6b600","#0098d9","#2b821d","#005eaa","#339ca8","#cda819","#32a487","#3fb1e3","#6be6c1","#626c91","#a0a7e6","#c4ebad","#96dee8"]],change:function(a){let o=$(this);a!=null?a=a.toHexString():a="rgb(0, 0, 0)";let s=null;pl.find(".luckysheet-sheets-item-color").length>0&&(s=pl.find(".luckysheet-sheets-item-color").css("background-color")),pl.find(".luckysheet-sheets-item-color").remove(),pl.append('<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+a+';"></div>');let u=Z(h.currentSheetIndex);if(h.luckysheetfile[u].color=a,ne.saveParam("all",h.currentSheetIndex,a,{k:"color"}),h.clearjfundo){let d={};d.type="sheetColor",d.sheetIndex=h.currentSheetIndex,d.oldcolor=s,d.color=a,h.jfundo.length=0,h.jfredo.push(d)}}}),$("#luckysheetsheetconfigcolorreset").click(function(){let a=null;pl.find(".luckysheet-sheets-item-color").length>0&&(a=pl.find(".luckysheet-sheets-item-color").css("background-color")),pl.find(".luckysheet-sheets-item-color").remove();let o=Z(h.currentSheetIndex);if(h.luckysheetfile[o].color=null,ne.saveParam("all",h.currentSheetIndex,null,{k:"color"}),h.clearjfundo){let s={};s.type="sheetColor",s.sheetIndex=h.currentSheetIndex,s.oldcolor=a,s.color=null,h.jfundo.length=0,h.jfredo.push(s)}})}let e=Z(h.currentSheetIndex);h.luckysheetfile[e].color!=null&&h.luckysheetfile[e].color.length>0&&$("#luckysheetsheetconfigcolorur").spectrum("set",h.luckysheetfile[e].color),$("#luckysheetsheetconfigcolorur").parent().find("span, div, button, input, a").addClass("luckysheet-mousedown-cancel");let n=fe.sheetRightClickConfig;Object.values(n).every(t=>!t)||setTimeout(function(){ml($("#luckysheet-rightclick-sheet-menu"),pl.offset().left+pl.width(),pl.offset().top-18,"leftbottom")},1)}function _m(){let n=Q().sheetconfig;eu=!1,$("#luckysheet-sheet-area").on("mousedown","div.luckysheet-sheets-item",function(f){if(de())return;let m=$(this),g=$(f.target),y=g.closest(".luckysheet-sheets-item");f.which=="3"&&setTimeout(()=>{xm(m,g,f),pl=y,wm()},0),y.hasClass("luckysheet-sheets-item-active")&&y.find(".luckysheet-sheets-item-name").attr("contenteditable")=="false"&&(bm=setTimeout(function(){h.luckysheet_sheet_move_status=!0,h.luckysheet_sheet_move_data={},h.luckysheet_sheet_move_data.widthlist=[],$("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").each(function(k){k==0?h.luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth())):h.luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth())+h.luckysheet_sheet_move_data.widthlist[k-1])}),h.luckysheet_sheet_move_data.curindex=$("#luckysheet-sheet-area div.luckysheet-sheets-item").index(y);let v=f.pageX;h.luckysheet_sheet_move_data.curleft=v-y.offset().left,h.luckysheet_sheet_move_data.pageX=v,h.luckysheet_sheet_move_data.activeobject=y,h.luckysheet_sheet_move_data.cursorobject=g;let b=y.clone().css("visibility","hidden").attr("id","luckysheet-sheets-item-clone");y.after(b),y.css({position:"absolute",opacity:.8,cursor:"move",transition:"initial","z-index":10})},200))}).on("click","div.luckysheet-sheets-item",function(f){if(de())return;let m=$(this),g=$(f.target);xm(m,g,f),ne.keepHighLightBox()});let t=function(f){h.allowEdit!==!1&&(f.attr("contenteditable","true").addClass("luckysheet-mousedown-cancel").data("oldtxt",f.text()),setTimeout(function(){$d(f.get(0))},1))};$("#luckysheet-sheet-area").on("dblclick","span.luckysheet-sheets-item-name",function(f){t($(this))});let l=!0;$("#luckysheet-sheet-area").on("compositionstart","span.luckysheet-sheets-item-name",()=>l=!1),$("#luckysheet-sheet-area").on("compositionend","span.luckysheet-sheets-item-name",()=>l=!0),$("#luckysheet-sheet-area").on("input","span.luckysheet-sheets-item-name",function(){if(h.allowEdit===!1||h.limitSheetNameLength===!1)return;let f=h.defaultSheetNameMaxLength;f!==0&&setTimeout(()=>{l&&$(this).text().length>=f&&setTimeout(()=>{$(this).text($(this).text().substring(0,f));let m=window.getSelection();m.selectAllChildren(this),m.collapseToEnd()},0)},0)}),$("#luckysheet-sheet-area").on("blur","span.luckysheet-sheets-item-name",function(f){if(h.allowEdit===!1)return;let m=$(this),g=m.text(),y=m.data("oldtxt");if($(this).text().length===0){U.info("",n.sheetNamecannotIsEmptyError),m.text(y).attr("contenteditable","false");return}if(g.length>31||g.charAt(0)=="'"||g.charAt(g.length-1)=="'"||/[:\:\\\/?\?\*\[\]]+/.test(g)){U.info("",n.sheetNameSpecCharError),m.text(y).attr("contenteditable","false");return}let v=Z(h.currentSheetIndex);for(let b=0;b<h.luckysheetfile.length;b++)if(v!=b&&h.luckysheetfile[b].name==g){de()?alert(n.tipNameRepeat):U.info("",n.tipNameRepeat),m.text(y).attr("contenteditable","false");return}if(ve.sheetArrowShowAndHide(),h.luckysheetfile[v].name=g,ne.saveParam("all",h.currentSheetIndex,g,{k:"name"}),m.attr("contenteditable","false").removeClass("luckysheet-mousedown-cancel"),h.clearjfundo){let b={};b.type="sheetName",b.sheetIndex=h.currentSheetIndex,b.oldtxt=y,b.txt=g,h.jfundo.length=0,h.jfredo.push(b)}Je.createHookFunction("sheetEditNameAfter",{i:h.luckysheetfile[v].index,oldName:y,newName:g})}),$("#luckysheet-sheet-area").on("keydown","span.luckysheet-sheets-item-name",function(f){if(h.allowEdit===!1)return;let m=f.keyCode,g=$(this);if(m==it.ENTER){let y=Z(h.currentSheetIndex);km=h.luckysheetfile[y].name||km,h.luckysheetfile[y].name=g.text(),g.attr("contenteditable","false")}}),$("#luckysheetsheetconfigrename").click(function(){var f=pl.find("span.luckysheet-sheets-item-name");!Je.createHookFunction("sheetEditNameBefore",{i:pl.data("index"),name:f.text()})||(t(pl.find("span.luckysheet-sheets-item-name")),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide())}),$("#luckysheetsheetconfigshow").click(function(){$("#luckysheet-sheets-m").click(),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-rightclick-sheet-menu").hide()}),$("#luckysheetsheetconfigmoveleft").click(function(){pl.prevAll(":visible").length>0&&(pl.insertBefore(pl.prevAll(":visible").eq(0)),ve.reOrderAllSheet()),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide()}),$("#luckysheetsheetconfigmoveright").click(function(){pl.nextAll(":visible").length>0&&(pl.insertAfter(pl.nextAll(":visible").eq(0)),ve.reOrderAllSheet()),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide()}),$("#luckysheetsheetconfigdelete").click(function(f){if($("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(),$("#luckysheet-sheet-container-c .luckysheet-sheets-item:visible").length<=1){de()?alert(n.noMoreSheet):U.info(n.noMoreSheet,"");return}let m=Z(h.currentSheetIndex);U.confirm(n.confirmDelete+"\u3010"+h.luckysheetfile[m].name+"\u3011\uFF1F","<span style='color:#9e9e9e;font-size:12px;'>"+n.redoDelete+"</span>",function(){ve.deleteSheet(pl.data("index"))},null),$("#luckysheet-input-box").removeAttr("style")}),$("#luckysheetsheetconfigcopy").click(function(f){ve.copySheet(pl.data("index"),f),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide()}),$("#luckysheetsheetconfighide").click(function(){if($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").length==1){de()?alert(n.noHide):U.info("",n.noHide);return}ve.setSheetHide(pl.data("index")),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide()}),$("#luckysheet-sheets-add").click(function(f){parseInt($("#luckysheet-input-box").css("top"))>0&&p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),ve.addNewSheet(f),ve.locationSheet(),$("#luckysheet-input-box").removeAttr("style")});let a=null,o=0,s=0,u=150;$("#luckysheet-sheets-leftscroll").click(function(){let f=$("#luckysheet-sheet-container-c");o=f.scrollLeft(),s=f.scrollLeft()-u,s<=0&&$("#luckysheet-sheet-container .docs-sheet-fade-left").hide(),$("#luckysheet-sheet-container .docs-sheet-fade-right").show(),clearInterval(a),a=setInterval(function(){o-=4,f.scrollLeft(o),o<=s&&clearInterval(a)},1)}),$("#luckysheet-sheets-rightscroll").click(function(){let f=$("#luckysheet-sheet-container-c");o=f.scrollLeft(),s=f.scrollLeft()+u,o>0&&$("#luckysheet-sheet-container .docs-sheet-fade-right").hide(),$("#luckysheet-sheet-container .docs-sheet-fade-left").show(),clearInterval(a),a=setInterval(function(){o+=4,f.scrollLeft(o),o>=s&&clearInterval(a)},1)});let d=!0;$("#luckysheet-sheets-m").click(function(f){parseInt($("#luckysheet-input-box").css("top"))>0&&p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),$("#luckysheet-sheet-list").html("");let m="";for(let b=0;b<h.luckysheetfile.length;b++){let k=h.luckysheetfile[b],w="",x="";k.status==1&&(w='<i class="fa fa-check" aria-hidden="true"></i>'),k.hide==1&&(w='<i class="fa fa-low-vision" aria-hidden="true"></i>',x+="color:#BBBBBB;"),k.color!=null&&k.color.length>0&&(x+="border-right:4px solid "+k.color+";"),m+=_e($u,{index:k.index,name:k.name,icon:w,style:x})}d?($("#"+h.container).append(_e(Su,{item:m})),$("#luckysheet-sheet-list").on("click",".luckysheet-cols-menuitem",function(b){if(de()){alert(n.chartEditNoOpt);return}let k=$(this),w=k.data("index");k.data("index")!=h.currentSheetIndex&&(ve.setSheetShow(w),ve.locationSheet()),ne.keepHighLightBox()}),d=!1):$("#luckysheet-sheet-list").html(m);let g=$("#luckysheet-sheet-list"),y=$(this).offset().left-$("#"+h.container).offset().left,v=$(this).height()+$("#luckysheet-sta-content").height()+12;g.css({left:y+"px",bottom:v+"px"}).show(),$("#luckysheet-input-box").removeAttr("style")}),fe.pager&&Vc(fe.pager)}var eu,pl,bm,km,xm,Cm=Ie(()=>{fl();Qt();Gt();dt();Nt();Ft();Ut();Vr();ll();pn();bt();Xe();xl();va();Ll();eu=!1,pl=null,bm=null,km="";xm=function(e,n,t){clearTimeout(bm),!(n.hasClass("luckysheet-sheets-item-name")&&n.attr("contenteditable")=="true")&&(p.rangestart||p.rangedrag_column_start||p.rangedrag_row_start||p.israngeseleciton()?setTimeout(function(){p.setCaretPosition(p.rangeSetValueTo.get(0),0,p.rangeSetValueTo.text().length),p.createRangeHightlight(),$("#luckysheet-input-box-index").find(".luckysheet-input-box-index-sheettxt").remove().end().prepend("<span class='luckysheet-input-box-index-sheettxt'>"+ve.getSheetName(p.rangetosheet)+"!</span>").show(),$("#luckysheet-input-box-index").css({left:$("#luckysheet-input-box").css("left"),top:parseInt($("#luckysheet-input-box").css("top"))-20+"px","z-index":$("#luckysheet-input-box").css("z-index")})},1):(parseInt($("#luckysheet-input-box").css("top"))>0&&p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove()),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),e.addClass("luckysheet-sheets-item-active"),rl(t),ve.changeSheet(e.data("index")),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(),(n.hasClass("luckysheet-sheets-item-menu")||n.hasClass("fa-sort-desc")||t.which=="3")&&(pl=n.closest(".luckysheet-sheets-item"),wm()))}});function Tm(){let n=Q().formula;$("#luckysheet-functionbox-cell").focus(function(){if(!de()&&h.luckysheet_select_save.length>0){let t=h.luckysheet_select_save[h.luckysheet_select_save.length-1],l=t.row_focus,a=t.column_focus;Rl(l,a,h.flowdata,null,!0),p.rangeResizeTo=$("#luckysheet-functionbox-cell")}}).keydown(function(t){if(de())return;let l=t.ctrlKey,a=t.altKey,o=t.shiftKey,s=t.keyCode,u=$("#luckysheet-input-box");if(s==it.ENTER&&parseInt(u.css("top"))>0)$("#luckysheet-formula-search-c").is(":visible")&&p.searchFunctionCell!=null?p.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")):(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),h.luckysheet_select_save=[{row:[h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[0]],column:[h.luckysheetCellUpdate[1],h.luckysheetCellUpdate[1]],row_focus:h.luckysheetCellUpdate[0],column_focus:h.luckysheetCellUpdate[1]}],jt("down",1,"rangeOfSelect"),$("#luckysheet-rich-text-editor").focus()),t.preventDefault();else if(s==it.ESC&&parseInt(u.css("top"))>0)p.dontupdate(),jt("down",0,"rangeOfSelect"),$("#luckysheet-rich-text-editor").focus(),t.preventDefault();else if(s==it.F4&&parseInt(u.css("top"))>0)p.setfreezonFuc(t),t.preventDefault();else if(s==it.UP&&parseInt(u.css("top"))>0){if($("#luckysheet-formula-search-c").is(":visible")){let d=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").prev();d.length==0&&(d=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").last()),$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"),d.addClass("luckysheet-formula-search-item-active"),t.preventDefault()}}else if(s==it.DOWN&&parseInt(u.css("top"))>0){if($("#luckysheet-formula-search-c").is(":visible")){let d=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").next();d.length==0&&(d=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").first()),$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"),d.addClass("luckysheet-formula-search-item-active"),t.preventDefault()}}else s==it.LEFT&&parseInt(u.css("top"))>0?p.rangeHightlightselected($("#luckysheet-functionbox-cell")):s==it.RIGHT&&parseInt(u.css("top"))>0?p.rangeHightlightselected($("#luckysheet-functionbox-cell")):(!(s>=112&&s<=123||s<=46||s==144||s==108||t.ctrlKey||t.altKey||t.shiftKey&&(s==37||s==38||s==39||s==40))||s==8||s==32||s==46||t.ctrlKey&&s==86)&&p.functionInputHanddler($("#luckysheet-rich-text-editor"),$("#luckysheet-functionbox-cell"),s)}).click(function(){de()||p.rangeHightlightselected($("#luckysheet-functionbox-cell"))}),$("#luckysheet-wa-functionbox-cancel").click(function(){!$(this).hasClass("luckysheet-wa-calculate-active")||($("#luckysheet-search-formula-parm").is(":visible")&&$("#luckysheet-search-formula-parm").hide(),$("#luckysheet-search-formula-parm-select").is(":visible")&&$("#luckysheet-search-formula-parm-select").hide(),p.dontupdate(),jt("down",0,"rangeOfSelect"))}),$("#luckysheet-wa-functionbox-confirm").click(function(){!$(this).hasClass("luckysheet-wa-calculate-active")||($("#luckysheet-search-formula-parm").is(":visible")&&$("#luckysheet-search-formula-parm").hide(),$("#luckysheet-search-formula-parm-select").is(":visible")&&$("#luckysheet-search-formula-parm-select").hide(),p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",0,"rangeOfSelect"))}),$("#luckysheet-wa-functionbox-fx").click(function(){if(h.luckysheet_select_save.length==0){de()?alert(n.tipSelectCell):U.info(n.tipSelectCell,"");return}let t=h.luckysheet_select_save[h.luckysheet_select_save.length-1],l=t.row_focus,a=t.column_focus;Rl(l,a,h.flowdata);let o=h.flowdata[l][a];if(o!=null&&o.f!=null){let s=p.getfunctionParam(o.f);s.fn!=null?hn.formulaParmDialog(s.fn,s.param):hn.formulaListDialog()}else $("#luckysheet-rich-text-editor").html('<span dir="auto" class="luckysheet-formula-text-color">=</span>'),$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()),hn.formulaListDialog();hn.init()}),$("#luckysheet-formula-functionrange").on("mousedown",".luckysheet-copy",function(t){p.rangeMove=!0,h.luckysheet_scroll_status=!0,p.rangeMoveObj=$(this).parent(),p.rangeMoveIndex=$(this).parent().attr("rangeindex");let l=nt(t.pageX,t.pageY),a=l[0]+$("#luckysheet-cell-main").scrollLeft(),o=l[1]+$("#luckysheet-cell-main").scrollTop();$("#luckysheet-formula-functionrange-highlight-"+p.rangeMoveIndex).find(".luckysheet-selection-copy-hc").css("opacity",.13);let s=$(this).data("type");s=="top"?o+=3:s=="right"?a-=3:s=="bottom"?o-=3:s=="left"&&(a+=3);let u=_t(o)[2],d=wt(a)[2];p.rangeMovexy=[u,d],$("#luckysheet-sheettable").css("cursor","move"),t.stopPropagation()}),$("#luckysheet-formula-functionrange").on("mousedown",".luckysheet-highlight",function(t){p.rangeResize=$(this).data("type"),p.rangeResizeIndex=$(this).parent().attr("rangeindex");let l=nt(t.pageX,t.pageY),a=$("#luckysheet-cell-main").scrollLeft(),o=$("#luckysheet-cell-main").scrollTop(),s=l[0]+a,u=l[1]+o;p.rangeResizeObj=$(this).parent(),$("#luckysheet-formula-functionrange-highlight-"+p.rangeResizeIndex).find(".luckysheet-selection-copy-hc").css("opacity",.13),p.rangeResize=="lt"?(s+=3,u+=3):p.rangeResize=="lb"?(s+=3,u-=3):p.rangeResize=="rt"?(s-=3,u+=3):p.rangeResize=="rb"&&(s-=3,u-=3);let d=_t(u),f=d[1],m=d[0],g=d[2],y=wt(s),v=y[1],b=y[0],k=y[2],w=p.rangeResizeObj.position();p.rangeResizexy=[b,m,p.rangeResizeObj.width(),p.rangeResizeObj.height(),w.left+a,w.top+o,v,f],p.rangeResizeWinH=$("#luckysheet-cell-main")[0].scrollHeight,p.rangeResizeWinW=$("#luckysheet-cell-main")[0].scrollWidth,h.luckysheet_scroll_status=!0,t.stopPropagation()})}var Sm=Ie(()=>{il();ba();Gt();za();Yc();Ol();Ft();Ut();ll();bt();Xe()});function $m(){$("#luckysheet-rows-h").mousedown(function(e){if(!Di(h.currentSheetIndex))return;He.removeActivePs(),($("#luckysheet-modal-dialog-activeImage").is(":visible")||$("#luckysheet-modal-dialog-cropping").is(":visible"))&&Re.cancelActiveImgItem();let t=nt(e.pageX,e.pageY)[1]+$("#luckysheet-rows-h").scrollTop(),l=_t(t),a=l[1],o=l[0],s=l[2],u=h.visibledatacolumn.length-1,d=h.visibledatacolumn[u],f=0;if($("#luckysheet-rightclick-menu").hide(),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(),e.which=="3"){let b=!1;for(let k=0;k<h.luckysheet_select_save.length;k++){let w=h.luckysheet_select_save[k];if(w.row!=null&&s>=w.row[0]&&s<=w.row[1]&&w.column[0]==0&&w.column[1]==h.flowdata[0].length-1){b=!0;break}}if(b)return}let m=o,g=a-o-1,y=[s,s];h.luckysheet_scroll_status=!0;let v=$("#luckysheet-input-box");if(parseInt(v.css("top"))>0)if(p.rangestart||p.rangedrag_column_start||p.rangedrag_row_start||p.israngeseleciton()||$("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){let b=ke.mergeMoveMain([0,u],y,{row_focus:s,column_focus:0},m,g,f,d);if(b!=null&&(y=b[1],m=b[2],g=b[3]),e.shiftKey){let k=p.func_selectedrange,w=0,x=0,C=[];k.top>o?(w=o,x=k.top+k.height-o,k.row[1]>k.row_focus&&(k.row[1]=k.row_focus),C=[s,k.row[1]]):k.top==o?(w=o,x=k.top+k.height-o,C=[s,k.row[0]]):(w=k.top,x=a-k.top-1,k.row[0]<k.row_focus&&(k.row[0]=k.row_focus),C=[k.row[0],s]);let S=ke.mergeMoveMain([0,u],C,{row_focus:s,column_focus:0},w,x,f,d);S!=null&&(C=S[1],w=S[2],x=S[3]),k.row=C,k.top_move=w,k.height_move=x,p.func_selectedrange=k}else if(e.ctrlKey&&$("#luckysheet-rich-text-editor").find("span").last().text()!=","){let k=$("#luckysheet-rich-text-editor").text()+",";if(k.length>0&&k.substr(0,1)=="="){if(k=p.functionHTMLGenerate(k),window.getSelection){let w=window.getSelection();p.functionRangeIndex=[$(w.anchorNode).parent().index(),w.anchorOffset]}else{let w=document.selection.createRange();p.functionRangeIndex=w}$("#luckysheet-rich-text-editor").html(k),p.canceFunctionrangeSelected(),p.createRangeHightlight()}p.rangestart=!1,p.rangedrag_column_start=!1,p.rangedrag_row_start=!1,$("#luckysheet-functionbox-cell").html(k),p.rangeHightlightselected($("#luckysheet-rich-text-editor")),p.israngeseleciton(),p.func_selectedrange={left:At(0)[0],width:At(0)[1]-At(0)[0]-1,top:m,height:g,left_move:f,width_move:d-f-1,top_move:m,height_move:g,row:y,column:[0,u],row_focus:s,column_focus:0}}else p.func_selectedrange={left:At(0)[0],width:At(0)[1]-At(0)[0]-1,top:m,height:g,left_move:f,width_move:d-f-1,top_move:m,height_move:g,row:y,column:[0,u],row_focus:s,column_focus:0};if(p.rangestart||p.rangedrag_column_start||p.rangedrag_row_start||p.israngeseleciton())p.rangeSetValue({row:y,column:[null,null]});else if($("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){let k=xt(h.currentSheetIndex,{row:y,column:[0,u]},h.currentSheetIndex);$("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(k)}p.rangedrag_row_start=!0,p.rangestart=!1,p.rangedrag_column_start=!1,$("#luckysheet-formula-functionrange-select").css({left:f,width:d-f-1,top:m,height:g}).show(),$("#luckysheet-formula-help-c").hide(),or(f,m,d-f-1,g,y,[0,u]),setTimeout(function(){let w=window.getSelection().anchorNode,x;$("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible")?(x=$("#luckysheet-rich-text-editor"),p.rangechangeindex=p.data_parm_index):x=$(w).closest("div");let C=x.find("span[rangeindex='"+p.rangechangeindex+"']");p.setCaretPosition(C.get(0),0,C.html().length)},1);return}else p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),h.luckysheet_rows_selected_status=!0;else h.luckysheet_rows_selected_status=!0;if(h.luckysheet_rows_selected_status){if(e.shiftKey){let b=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),k=0,w=0,x=[];b.top>o?(k=o,w=b.top+b.height-o,b.row[1]>b.row_focus&&(b.row[1]=b.row_focus),x=[s,b.row[1]]):b.top==o?(k=o,w=b.top+b.height-o,x=[s,b.row[0]]):(k=b.top,w=a-b.top-1,b.row[0]<b.row_focus&&(b.row[0]=b.row_focus),x=[b.row[0],s]),b.row=x,b.top_move=k,b.height_move=w,h.luckysheet_select_save[h.luckysheet_select_save.length-1]=b}else e.ctrlKey?h.luckysheet_select_save.push({left:At(0)[0],width:At(0)[1]-At(0)[0]-1,top:m,height:g,left_move:f,width_move:d-f-1,top_move:m,height_move:g,row:y,column:[0,u],row_focus:s,column_focus:0,row_select:!0}):(h.luckysheet_select_save.length=0,h.luckysheet_select_save.push({left:At(0)[0],width:At(0)[1]-At(0)[0]-1,top:m,height:g,left_move:f,width_move:d-f-1,top_move:m,height_move:g,row:y,column:[0,u],row_focus:s,column_focus:0,row_select:!0}));lt(),ne.saveParam("mv",h.currentSheetIndex,h.luckysheet_select_save)}Go(),setTimeout(function(){clearTimeout(h.countfuncTimeout),wl()},101)}).mousemove(function(e){if(h.luckysheet_rows_selected_status||h.luckysheet_rows_change_size||h.luckysheet_select_status){$("#luckysheet-rows-h-hover").hide();return}let t=nt(e.pageX,e.pageY)[1]+$("#luckysheet-rows-h").scrollTop(),l=_t(t),a=l[1],o=l[0],s=l[2];$("#luckysheet-rows-h-hover").css({top:o,height:a-o-1,display:"block"}),t<a-1&&t>=a-5?$("#luckysheet-rows-change-size").css({top:a-3,opacity:0}):$("#luckysheet-rows-change-size").css("opacity",0)}).mouseleave(function(e){$("#luckysheet-rows-h-hover").hide(),$("#luckysheet-rows-change-size").css("opacity",0)}).mouseup(function(e){if(e.which==3){if(!El()||de())return;$("#luckysheet-cols-rows-shift").hide(),h.luckysheetRightHeadClickIs="row",$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(Q().rightclick.row),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text(Q().rightclick.height),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(Q().rightclick.top),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(Q().rightclick.bottom),$("#luckysheet-cols-rows-add").show(),$("#luckysheet-cols-rows-data").show(),$("#luckysheet-cols-rows-shift").hide(),$("#luckysheet-cols-rows-handleincell").hide(),We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="block",We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="block";let n=fe.cellRightClickConfig;if(!n.copy&&!n.copyAs&&!n.paste&&!n.insertRow&&!n.deleteRow&&!n.hideRow&&!n.rowHeight&&!n.clear&&!n.matrix&&!n.sort&&!n.filter&&!n.chart&&!n.image&&!n.link&&!n.data&&!n.cellFormat)return;We("#luckysheet-top-left-add-selected").style.display=n.insertRow?"block":"none",We("#luckysheet-bottom-right-add-selected").style.display=n.insertRow?"block":"none",We("#luckysheet-del-selected").style.display=n.deleteRow?"block":"none",We("#luckysheet-hide-selected").style.display=n.hideRow?"block":"none",We("#luckysheet-show-selected").style.display=n.hideRow?"block":"none",We("#luckysheet-column-row-width-selected").style.display=n.rowHeight?"block":"none",!n.copy&&!n.copyAs&&!n.paste&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none",!n.insertRow&&!n.deleteRow&&!n.hideRow&&!n.rowHeight&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none")),!n.insertRow&&!n.deleteRow&&!n.hideRow&&!n.rowHeight&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none"),!n.clear&&!n.matrix&&!n.sort&&!n.filter&&!n.chart&&!n.image&&!n.link&&!n.data&&!n.cellFormat&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none"),sn($("#luckysheet-rightclick-menu"),$(this).offset().left+46,e.pageY),h.luckysheet_cols_menu_status=!0;let t=$.extend(!0,{},h.config);t.rowlen==null&&(t.rowlen={});let l=t.rowlen[h.luckysheet_select_save[0].row[0]]==null?h.defaultrowlen:t.rowlen[h.luckysheet_select_save[0].row[0]],a=!0;for(let o=0;o<h.luckysheet_select_save.length;o++){let s=h.luckysheet_select_save[o],u=s.row[0],d=s.row[1];for(let f=u;f<=d;f++)if((t.rowlen[f]==null?h.defaultrowlen:t.rowlen[f])!=l){a=!1;break}}a?$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(l):$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val("")}}),$("#luckysheet-cols-h-c").mousedown(function(e){if(!Di(h.currentSheetIndex))return;He.removeActivePs(),($("#luckysheet-modal-dialog-activeImage").is(":visible")||$("#luckysheet-modal-dialog-cropping").is(":visible"))&&Re.cancelActiveImgItem();let t=nt(e.pageX,e.pageY)[0]+$(this).scrollLeft(),l=h.visibledatarow.length-1,a=h.visibledatarow[l],o=0,s=wt(t),u=s[1],d=s[0],f=s[2];if(h.orderbyindex=f,$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(),e.which=="3"){let b=!1;for(let k=0;k<h.luckysheet_select_save.length;k++){let w=h.luckysheet_select_save[k];if(w.column!=null&&f>=w.column[0]&&f<=w.column[1]&&w.row[0]==0&&w.row[1]==h.flowdata.length-1){b=!0;break}}if(b)return}let m=d,g=u-d-1,y=[f,f];h.luckysheet_scroll_status=!0;let v=$("#luckysheet-input-box");if(parseInt(v.css("top"))>0)if(p.rangestart||p.rangedrag_column_start||p.rangedrag_row_start||p.israngeseleciton()||$("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){let b=ke.mergeMoveMain(y,[0,l],{row_focus:0,column_focus:f},o,a,m,g);if(b!=null&&(y=b[0],m=b[4],g=b[5]),e.shiftKey){let k=p.func_selectedrange,w=0,x=0,C=[];k.left>d?(w=d,x=k.left+k.width-d,k.column[1]>k.column_focus&&(k.column[1]=k.column_focus),C=[f,k.column[1]]):k.left==d?(w=d,x=k.left+k.width-d,C=[f,k.column[0]]):(w=k.left,x=u-k.left-1,k.column[0]<k.column_focus&&(k.column[0]=k.column_focus),C=[k.column[0],f]);let S=ke.mergeMoveMain(C,[0,l],{row_focus:0,column_focus:f},o,a,w,x);S!=null&&(C=S[0],w=S[4],x=S[5]),k.column=C,k.left_move=w,k.width_move=x,p.func_selectedrange=k}else if(e.ctrlKey&&$("#luckysheet-rich-text-editor").find("span").last().text()!=","){let k=$("#luckysheet-rich-text-editor").text()+",";if(k.length>0&&k.substr(0,1)=="="){if(k=p.functionHTMLGenerate(k),window.getSelection){let w=window.getSelection();p.functionRangeIndex=[$(w.anchorNode).parent().index(),w.anchorOffset]}else{let w=document.selection.createRange();p.functionRangeIndex=w}$("#luckysheet-rich-text-editor").html(k),p.canceFunctionrangeSelected(),p.createRangeHightlight()}p.rangestart=!1,p.rangedrag_column_start=!1,p.rangedrag_row_start=!1,$("#luckysheet-functionbox-cell").html(k),p.rangeHightlightselected($("#luckysheet-rich-text-editor")),p.israngeseleciton(),p.func_selectedrange={left:m,width:g,top:tl(0)[0],height:tl(0)[1]-tl(0)[0]-1,left_move:m,width_move:g,top_move:o,height_move:a-o-1,row:[0,l],column:y,row_focus:0,column_focus:f}}else p.func_selectedrange={left:m,width:g,top:tl(0)[0],height:tl(0)[1]-tl(0)[0]-1,left_move:m,width_move:g,top_move:o,height_move:a-o-1,row:[0,l],column:y,row_focus:0,column_focus:f};if(p.rangestart||p.rangedrag_column_start||p.rangedrag_row_start||p.israngeseleciton())p.rangeSetValue({row:[null,null],column:y});else if($("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){let k=xt(h.currentSheetIndex,{row:[0,l],column:y},h.currentSheetIndex);$("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(k)}p.rangedrag_column_start=!0,p.rangestart=!1,p.rangedrag_row_start=!1,$("#luckysheet-formula-functionrange-select").css({left:m,width:g,top:o,height:a-o-1}).show(),$("#luckysheet-formula-help-c").hide(),or(m,o,g,a-o-1,[0,l],y);return}else p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),h.luckysheet_cols_selected_status=!0;else h.luckysheet_cols_selected_status=!0;if(h.luckysheet_cols_selected_status){if(e.shiftKey){let b=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),k=0,w=0,x=[];b.left>d?(k=d,w=b.left+b.width-d,b.column[1]>b.column_focus&&(b.column[1]=b.column_focus),x=[f,b.column[1]]):b.left==d?(k=d,w=b.left+b.width-d,x=[f,b.column[0]]):(k=b.left,w=u-b.left-1,b.column[0]<b.column_focus&&(b.column[0]=b.column_focus),x=[b.column[0],f]),b.column=x,b.left_move=k,b.width_move=w,h.luckysheet_select_save[h.luckysheet_select_save.length-1]=b}else e.ctrlKey?h.luckysheet_select_save.push({left:m,width:g,top:tl(0)[0],height:tl(0)[1]-tl(0)[0]-1,left_move:m,width_move:g,top_move:o,height_move:a-o-1,row:[0,l],column:y,row_focus:0,column_focus:f,column_select:!0}):(h.luckysheet_select_save.length=0,h.luckysheet_select_save.push({left:m,width:g,top:tl(0)[0],height:tl(0)[1]-tl(0)[0]-1,left_move:m,width_move:g,top_move:o,height_move:a-o-1,row:[0,l],column:y,row_focus:0,column_focus:f,column_select:!0}));lt(),ne.saveParam("mv",h.currentSheetIndex,h.luckysheet_select_save)}Go(),setTimeout(function(){clearTimeout(h.countfuncTimeout),wl()},101),h.luckysheet_cols_menu_status&&($("#luckysheet-rightclick-menu").hide(),$("#luckysheet-cols-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide(),h.luckysheet_cols_menu_status=!1),e.stopPropagation()}).mousemove(function(e){if(h.luckysheet_cols_selected_status||h.luckysheet_select_status){$("#luckysheet-cols-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide();return}if(h.luckysheet_cols_menu_status||h.luckysheet_cols_change_size)return;let t=nt(e.pageX,e.pageY)[0]+$("#luckysheet-cols-h-c").scrollLeft(),l=wt(t),a=l[1],o=l[0],s=l[2];$("#luckysheet-cols-h-hover").css({left:o,width:a-o-1,display:"block"}),$("#luckysheet-cols-menu-btn").css({left:a-19,display:"block"}),$("#luckysheet-cols-change-size").css({left:a-5}),t<a&&t>=a-5?($("#luckysheet-cols-change-size").css({opacity:0}),$("#luckysheet-cols-menu-btn").hide()):($("#luckysheet-change-size-line").hide(),$("#luckysheet-cols-change-size").css("opacity",0))}).mouseleave(function(e){h.luckysheet_cols_menu_status||h.luckysheet_cols_change_size||($("#luckysheet-cols-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide(),$("#luckysheet-cols-change-size").css("opacity",0))}).mouseup(function(e){if(e.which==3){if(!El()||de())return;h.luckysheetRightHeadClickIs="column",$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(Q().rightclick.column),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text(Q().rightclick.width),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(Q().rightclick.left),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(Q().rightclick.right),$("#luckysheet-cols-rows-add").show(),$("#luckysheet-cols-rows-data").show(),$("#luckysheet-cols-rows-shift").hide(),$("#luckysheet-cols-rows-handleincell").hide(),We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="block",We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="block";let n=fe.cellRightClickConfig;if(!n.copy&&!n.copyAs&&!n.paste&&!n.insertColumn&&!n.deleteColumn&&!n.hideColumn&&!n.columnWidth&&!n.clear&&!n.matrix&&!n.sort&&!n.filter&&!n.chart&&!n.image&&!n.link&&!n.data&&!n.cellFormat)return;We("#luckysheet-top-left-add-selected").style.display=n.insertColumn?"block":"none",We("#luckysheet-bottom-right-add-selected").style.display=n.insertColumn?"block":"none",We("#luckysheet-del-selected").style.display=n.deleteColumn?"block":"none",We("#luckysheet-hide-selected").style.display=n.hideColumn?"block":"none",We("#luckysheet-show-selected").style.display=n.hideColumn?"block":"none",We("#luckysheet-column-row-width-selected").style.display=n.columnWidth?"block":"none",!n.copy&&!n.copyAs&&!n.paste&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none",!n.insertColumn&&!n.deleteColumn&&!n.hideColumn&&!n.columnWidth&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none")),!n.insertColumn&&!n.deleteColumn&&!n.hideColumn&&!n.columnWidth&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none"),!n.clear&&!n.matrix&&!n.sort&&!n.filter&&!n.chart&&!n.image&&!n.link&&!n.data&&!n.cellFormat&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none"),sn($("#luckysheet-rightclick-menu"),e.pageX,$(this).offset().top+18),h.luckysheet_cols_menu_status=!0;let t=$.extend(!0,{},h.config);t.columnlen==null&&(t.columnlen={});let l=t.columnlen[h.luckysheet_select_save[0].column[0]]==null?h.defaultcollen:t.columnlen[h.luckysheet_select_save[0].column[0]],a=!0;for(let o=0;o<h.luckysheet_select_save.length;o++){let s=h.luckysheet_select_save[o],u=s.column[0],d=s.column[1];for(let f=u;f<=d;f++)if((t.columnlen[f]==null?h.defaultcollen:t.columnlen[f])!=l){a=!1;break}}a?$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(l):$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val("")}}),$("#luckysheet-rows-change-size").mousedown(function(e){if(!El())return;He.removeActivePs(),($("#luckysheet-modal-dialog-activeImage").is(":visible")||$("#luckysheet-modal-dialog-cropping").is(":visible"))&&Re.cancelActiveImgItem(),$("#luckysheet-input-box").hide(),$("#luckysheet-rows-change-size").css({opacity:1});let t=nt(e.pageX,e.pageY)[1]+$("#luckysheet-rows-h").scrollTop(),l=$("#luckysheet-cell-main").scrollLeft(),a=$("#luckysheet-cell-main").width(),o=_t(t),s=o[1],u=o[0],d=o[2];h.luckysheet_rows_change_size=!0,h.luckysheet_scroll_status=!0,$("#luckysheet-change-size-line").css({height:"1px","border-width":"0 0px 1px 0",top:s-3,left:0,width:l+a,display:"block",cursor:"ns-resize"}),$("#luckysheet-sheettable, #luckysheet-rows-h, #luckysheet-rows-h canvas").css("cursor","ns-resize"),h.luckysheet_rows_change_size_start=[u,d],$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-rows-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide(),e.stopPropagation()}),$("#luckysheet-cols-change-size").mousedown(function(e){if(!El())return;He.removeActivePs(),($("#luckysheet-modal-dialog-activeImage").is(":visible")||$("#luckysheet-modal-dialog-cropping").is(":visible"))&&Re.cancelActiveImgItem(),$("#luckysheet-input-box").hide(),$("#luckysheet-cols-change-size").css({opacity:1});let n=nt(e.pageX,e.pageY),t=$("#luckysheet-cols-h-c").scrollLeft(),l=$("#luckysheet-cell-main").scrollTop(),a=$("#luckysheet-cell-main").height(),o=n[0]+t,s=h.visibledatarow.length-1,u=h.visibledatarow[s],d=0,f=wt(o),m=f[1],g=f[0],y=f[2];h.luckysheet_cols_change_size=!0,h.luckysheet_scroll_status=!0,$("#luckysheet-change-size-line").css({height:a+l,"border-width":"0 1px 0 0",top:0,left:m-3,width:"1px",display:"block",cursor:"ew-resize"}),$("#luckysheet-sheettable, #luckysheet-cols-h-c, .luckysheet-cols-h-cells, .luckysheet-cols-h-cells canvas").css("cursor","ew-resize"),h.luckysheet_cols_change_size_start=[g,y],$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-cols-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide(),h.luckysheet_cols_dbclick_times=0,e.stopPropagation()}).dblclick(function(){Tb()}),$("#luckysheet-cols-menu-btn").click(function(e){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}let n=$("#luckysheet-rightclick-menu"),t=$(this).offset();$("#luckysheet-cols-rows-shift").show(),h.luckysheetRightHeadClickIs="column",$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(Q().rightclick.column),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(Q().rightclick.left),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(Q().rightclick.right),$("#luckysheet-cols-rows-add").show(),$("#luckysheet-cols-rows-data").hide(),$("#luckysheet-cols-rows-shift").show(),$("#luckysheet-cols-rows-handleincell").hide(),We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="block",We("#luckysheet-cols-rows-shift .luckysheet-menuseparator").style.display="block";let l=fe.cellRightClickConfig;!l.copy&&!l.copyAs&&!l.paste&&!l.insertColumn&&!l.deleteColumn&&!l.hideColumn&&!l.columnWidth&&!l.sort||(We("#luckysheet-top-left-add-selected").style.display=l.insertColumn?"block":"none",We("#luckysheet-bottom-right-add-selected").style.display=l.insertColumn?"block":"none",We("#luckysheet-del-selected").style.display=l.deleteColumn?"block":"none",We("#luckysheet-hide-selected").style.display=l.hideColumn?"block":"none",We("#luckysheet-show-selected").style.display=l.hideColumn?"block":"none",We("#luckysheet-column-row-width-selected").style.display=l.columnWidth?"block":"none",!l.copy&&!l.copyAs&&!l.paste&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none",!l.insertColumn&&!l.deleteColumn&&!l.hideColumn&&!l.columnWidth&&(We("#luckysheet-cols-rows-shift .luckysheet-menuseparator").style.display="none")),!l.insertColumn&&!l.deleteColumn&&!l.hideColumn&&!l.columnWidth&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none"),l.sort||(We("#luckysheet-cols-rows-shift .luckysheet-menuseparator").style.display="none"),sn(n,t.left,t.top+18),h.luckysheet_cols_menu_status=!0)}),$("#luckysheet-top-left-add-selected").click(function(e){if(e.target.nodeName==="INPUT")return;$("#luckysheet-rightclick-menu").hide(),rt();let n=Q(),t=n.drag,l=n.info;if(h.luckysheet_select_save.length>1){de()?alert(t.noMulti):U.info(t.noMulti,"");return}let a=$(this),o=a.find("input").val();if(!B(o)){de()?alert(l.tipInputNumber):U.info(l.tipInputNumber,"");return}if(o=parseInt(o),o<1||o>100){de()?alert(l.tipInputNumberLimit):U.info(l.tipInputNumberLimit,"");return}let s=h.luckysheet_select_save[0][h.luckysheetRightHeadClickIs][0];!Je.createHookFunction("rowInsertBefore",s,o,"lefttop")||Ir(h.luckysheetRightHeadClickIs,s,o,"lefttop")}),$("#luckysheetColsRowsHandleAdd_row").click(function(e){if($("#luckysheet-rightclick-menu").hide(),rt(),h.allowEdit===!1)return;let n=h.luckysheet_select_save[0].row[0];!Je.createHookFunction("rowInsertBefore",n,1,"lefttop")||Ir("row",n,1,"lefttop")}),$("#luckysheetColsRowsHandleAdd_column").click(function(e){if($("#luckysheet-rightclick-menu").hide(),rt(),h.allowEdit===!1)return;let n=h.luckysheet_select_save[0].column[0];Ir("column",n,1,"lefttop")}),$(".luckysheetColsRowsHandleAdd_custom").click(function(e){$("#luckysheet-rightclick-menu").hide();let n=fe.cellRightClickConfig,t=h.luckysheet_select_save[0].row[0],l=h.luckysheet_select_save[0].column[0];if(n.customs[Number(e.currentTarget.dataset.index)])try{n.customs[Number(e.currentTarget.dataset.index)].onClick(e,event,{rowIndex:t,columnIndex:l})}catch(a){console.error("custom click error",a)}}),$("#luckysheet-bottom-right-add-selected").click(function(e){if(e.target.nodeName==="INPUT")return;$("#luckysheet-rightclick-menu").hide(),rt();let n=Q(),t=n.drag,l=n.info;if(h.luckysheet_select_save.length>1){de()?alert(t.noMulti):U.info(t.noMulti,"");return}let a=$(this),o=a.find("input").val();if(!B(o)){de()?alert(l.tipInputNumber):U.info(l.tipInputNumber,"");return}if(o=parseInt(o),o<1||o>100){de()?alert(l.tipInputNumberLimit):U.info(l.tipInputNumberLimit,"");return}let s=h.luckysheet_select_save[0][h.luckysheetRightHeadClickIs][1];!Je.createHookFunction("rowInsertBefore",s,o,"rightbottom")||Ir(h.luckysheetRightHeadClickIs,s,o,"rightbottom")}),$("#luckysheet-del-selected, #luckysheet-del-selected_t").click(function(e){$("#luckysheet-rightclick-menu").hide(),rt();let n=Q().drag;if(h.luckysheet_select_save.length>1){h.luckysheetRightHeadClickIs=="row"?de()?alert(n.noMulti):U.info(n.noMulti,""):h.luckysheetRightHeadClickIs=="column"&&(de()?alert(n.noMulti):U.info(n.noMulti,""));return}let t=h.luckysheet_select_save[0][h.luckysheetRightHeadClickIs][0],l=h.luckysheet_select_save[0][h.luckysheetRightHeadClickIs][1];!Je.createHookFunction("rowDeleteBefore",t,l)||qn(h.luckysheetRightHeadClickIs,t,l)}),$("#luckysheet-delRows").click(function(e){$("#luckysheet-rightclick-menu").hide(),rt();let n=Q().drag;if(h.luckysheet_select_save.length>1){h.luckysheetRightHeadClickIs=="row"?de()?alert(n.noMulti):U.info(n.noMulti,""):h.luckysheetRightHeadClickIs=="column"&&(de()?alert(n.noMulti):U.info(n.noMulti,""));return}let t=h.luckysheet_select_save[0].row[0],l=h.luckysheet_select_save[0].row[1];!Je.createHookFunction("rowDeleteBefore",t,l)||qn("row",t,l)}),$("#luckysheet-delCols").click(function(e){$("#luckysheet-rightclick-menu").hide(),rt();let n=Q().drag;if(h.luckysheet_select_save.length>1){h.luckysheetRightHeadClickIs=="row"?de()?alert(n.noMulti):U.info(n.noMulti,""):h.luckysheetRightHeadClickIs=="column"&&(de()?alert(n.noMulti):U.info(n.noMulti,""));return}let t=h.luckysheet_select_save[0].column[0],l=h.luckysheet_select_save[0].column[1];qn("column",t,l)}),$("#luckysheet-hide-selected").click(function(e){$("#luckysheet-rightclick-menu").hide(),rt();let n=Q().drag;if(h.luckysheet_select_save.length>1){h.luckysheetRightHeadClickIs=="row"?de()?alert(n.noMulti):U.info(n.noMulti,""):h.luckysheetRightHeadClickIs=="column"&&(de()?alert(n.noMulti):U.info(n.noMulti,""));return}if(h.luckysheetRightHeadClickIs=="row"){if(!$t(h.currentSheetIndex,"formatRows"))return;let t=$.extend(!0,{},h.config);t.rowhidden==null&&(t.rowhidden={});for(let l=0;l<h.luckysheet_select_save.length;l++){let a=h.luckysheet_select_save[l].row[0],o=h.luckysheet_select_save[l].row[1];for(let s=a;s<=o;s++)t.rowhidden[s]=0}if(h.clearjfundo){let l={};l.type="showHidRows",l.sheetIndex=h.currentSheetIndex,l.config=$.extend(!0,{},h.config),l.curconfig=t,h.jfundo.length=0,h.jfredo.push(l)}h.config=t,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,t.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length)}else if(h.luckysheetRightHeadClickIs=="column"){if(!$t(h.currentSheetIndex,"formatColumns"))return;let t=$.extend(!0,{},h.config);t.colhidden==null&&(t.colhidden={});for(let l=0;l<h.luckysheet_select_save.length;l++){let a=h.luckysheet_select_save[l].column[0],o=h.luckysheet_select_save[l].column[1];for(let s=a;s<=o;s++)t.colhidden[s]=0}if(h.clearjfundo){let l={};l.type="showHidCols",l.sheetIndex=h.currentSheetIndex,l.config=$.extend(!0,{},h.config),l.curconfig=t,h.jfundo.length=0,h.jfredo.push(l)}h.config=t,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,t.colhidden,{k:"colhidden"}),St(h.flowdata.length,h.flowdata[0].length)}}),$("#luckysheet-show-selected").click(function(e){$("#luckysheet-rightclick-menu").hide(),rt();let n=Q().drag;if(h.luckysheet_select_save.length>1){h.luckysheetRightHeadClickIs=="row"?de()?alert(n.noMulti):U.info(n.noMulti,""):h.luckysheetRightHeadClickIs=="column"&&(de()?alert(n.noMulti):U.info(n.noMulti,""));return}if(h.luckysheetRightHeadClickIs=="row"){if(!$t(h.currentSheetIndex,"formatRows"))return;let t=$.extend(!0,{},h.config);if(t.rowhidden==null)return;for(let l=0;l<h.luckysheet_select_save.length;l++){let a=h.luckysheet_select_save[l].row[0],o=h.luckysheet_select_save[l].row[1];for(let s=a;s<=o;s++)delete t.rowhidden[s]}if(h.clearjfundo){let l={};l.type="showHidRows",l.sheetIndex=h.currentSheetIndex,l.config=$.extend(!0,{},h.config),l.curconfig=t,h.jfundo.length=0,h.jfredo.push(l)}h.config=t,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,t.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length)}else if(h.luckysheetRightHeadClickIs=="column"){if(!$t(h.currentSheetIndex,"formatColumns"))return;let t=$.extend(!0,{},h.config);if(t.colhidden==null)return;for(let l=0;l<h.luckysheet_select_save.length;l++){let a=h.luckysheet_select_save[l].column[0],o=h.luckysheet_select_save[l].column[1];for(let s=a;s<=o;s++)delete t.colhidden[s]}if(h.clearjfundo){let l={};l.type="showHidCols",l.sheetIndex=h.currentSheetIndex,l.config=$.extend(!0,{},h.config),l.curconfig=t,h.jfundo.length=0,h.jfredo.push(l)}h.config=t,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,t.colhidden,{k:"colhidden"}),St(h.flowdata.length,h.flowdata[0].length)}}),$("#luckysheet-delCellsMoveLeft").click(function(e){$("body .luckysheet-cols-menu").hide(),rt();let n=Q().drag;if(h.luckysheet_select_save.length>1){de()?alert(n.noMulti):U.info(n.noMulti,"");return}let t=h.luckysheet_select_save[0].row[0],l=h.luckysheet_select_save[0].row[1],a=h.luckysheet_select_save[0].column[0],o=h.luckysheet_select_save[0].column[1];ha("moveLeft",t,l,a,o)}),$("#luckysheet-delCellsMoveUp").click(function(e){$("body .luckysheet-cols-menu").hide(),rt();let n=Q().drag;if(h.luckysheet_select_save.length>1){de()?alert(n.noMulti):U.info(n.noMulti,"");return}let t=h.luckysheet_select_save[0].row[0],l=h.luckysheet_select_save[0].row[1],a=h.luckysheet_select_save[0].column[0],o=h.luckysheet_select_save[0].column[1];ha("moveUp",t,l,a,o)}),$("#luckysheet-delete-text").click(function(){if(!!vr(h.luckysheet_select_save,h.currentSheetIndex)&&($("#luckysheet-rightclick-menu").hide(),rt(),h.allowEdit!==!1&&h.luckysheet_select_save.length>0)){let e=xe.deepCopyFlowData(h.flowdata),n=!1;for(let o=0;o<h.luckysheet_select_save.length;o++){let s=h.luckysheet_select_save[o].row[0],u=h.luckysheet_select_save[o].row[1],d=h.luckysheet_select_save[o].column[0],f=h.luckysheet_select_save[o].column[1];if(Mt(h.config,s,u,d,f)){n=!0;break}}if(n){let o=Q().drag;de()?alert(o.noPartMerge):U.info(o.noPartMerge,"");return}let t=h.luckysheetfile[Z(h.currentSheetIndex)],l=t.hyperlink&&$.extend(!0,{},t.hyperlink),a;for(let o=0;o<h.luckysheet_select_save.length;o++){let s=h.luckysheet_select_save[o].row[0],u=h.luckysheet_select_save[o].row[1],d=h.luckysheet_select_save[o].column[0],f=h.luckysheet_select_save[o].column[1];for(let m=s;m<=u;m++)for(let g=d;g<=f;g++)Oe.isPivotRange(m,g)||(P(e[m][g])=="object"?(delete e[m][g].m,delete e[m][g].v,e[m][g].f!=null&&(delete e[m][g].f,p.delFunctionGroup(m,g,h.currentSheetIndex),delete e[m][g].spl),e[m][g].ct!=null&&e[m][g].ct.t=="inlineStr"&&delete e[m][g].ct):e[m][g]=null,(l==null?void 0:l[`${m}_${g}`])&&(delete l[`${m}_${g}`],a=!0))}Ze(e,h.luckysheet_select_save,a&&{hyperlink:l}),$("#luckysheet-rich-text-editor").html("")}}),$("#luckysheet-column-row-width-selected").click(function(e){if(e.target.nodeName==="INPUT")return;$("#luckysheet-rightclick-menu").hide(),rt();let n=parseInt($(this).closest(".luckysheet-cols-menuitem").find("input[type='number']").val().trim()),t=Q().info;if(isNaN(n)){U.info("\u53EA\u5141\u8BB8\u4F7F\u7528\u6570\u5B57\u6765\u8BBE\u7F6E\u884C\u5217\u7684\u5BBD\u9AD8!","");return}let l=$.extend(!0,{},h.config),a,o=null;if(h.luckysheetRightHeadClickIs=="row"){if(!$t(h.currentSheetIndex,"formatRows"))return;if(n<0||n>545){de()?alert(t.tipRowHeightLimit):U.info(t.tipRowHeightLimit,"");return}a="resizeR",l.rowlen==null&&(l.rowlen={});for(let s=0;s<h.luckysheet_select_save.length;s++){let u=h.luckysheet_select_save[s].row[0],d=h.luckysheet_select_save[s].row[1];for(let f=u;f<=d;f++)l.rowlen[f]=n,o=Re.moveChangeSize("row",f,n)}}else if(h.luckysheetRightHeadClickIs=="column"){if(!$t(h.currentSheetIndex,"formatColumns"))return;if(n<0||n>2038){de()?alert(t.tipColumnWidthLimit):U.info(t.tipColumnWidthLimit,"");return}a="resizeC",l.columnlen==null&&(l.columnlen={});for(let s=0;s<h.luckysheet_select_save.length;s++){let u=h.luckysheet_select_save[s].column[0],d=h.luckysheet_select_save[s].column[1];for(let f=u;f<=d;f++)l.columnlen[f]=n,o=Re.moveChangeSize("column",f,n)}}h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"resize",ctrlType:a,sheetIndex:h.currentSheetIndex,config:$.extend(!0,{},h.config),curconfig:$.extend(!0,{},l),images:$.extend(!0,{},Re.images),curImages:$.extend(!0,{},o)})),h.config=l,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,h.luckysheetfile[Z(h.currentSheetIndex)].images=o,ne.saveParam("all",h.currentSheetIndex,o,{k:"images"}),Re.images=o,Re.allImagesShow(),h.luckysheetRightHeadClickIs=="row"?(ne.saveParam("cg",h.currentSheetIndex,l.rowlen,{k:"rowlen"}),St(h.flowdata.length,null)):h.luckysheetRightHeadClickIs=="column"&&(ne.saveParam("cg",h.currentSheetIndex,l.columnlen,{k:"columnlen"}),St(null,h.flowdata[0].length))})}function Tb(){h.luckysheet_cols_change_size=!1,$("#luckysheet-change-size-line").hide(),$("#luckysheet-cols-change-size").css("opacity",0),$("#luckysheet-sheettable, #luckysheet-cols-h-c, .luckysheet-cols-h-cells, .luckysheet-cols-h-cells canvas").css("cursor","default");let e=nt(event.pageX,event.pageY),n=$("#luckysheet-cols-h-c").scrollLeft(),t=e[0]+n,l=wt(t)[2],a=xe.deepCopyFlowData(h.flowdata),o=$("#luckysheetTableContent").get(0).getContext("2d"),s=$.extend(!0,{},h.config);s.columnlen==null&&(s.columnlen={});let u={},d=$("#luckysheet-cell-main").scrollTop(),f=h.luckysheetTableContentHW[1],m=st(h.visibledatarow,d),g=st(h.visibledatarow,d+f);g+=g-m,g>=a.length&&(g=a.length-1);for(let y=0;y<h.luckysheet_select_save.length;y++){let v=h.luckysheet_select_save[y].column[0],b=h.luckysheet_select_save[y].column[1];if(l<v||l>b){if(l in u)continue;let k=h.defaultcollen;for(let w=m;w<=g;w++){let x=a[w][l];if(x==null||me(x.v)&&!_l(x))continue;let C=At(l)[1]-At(l)[0]-2,S=Sr(x,o,{r:w,c:l,cellWidth:C}),_=0;S!=null&&(_=S.textWidthAll),_+6>k&&(k=_+6)}k!=h.defaultcollen&&(s.columnlen[l]=k,s.customWidth&&delete s.customWidth[l]),u[l]=1}else for(let k=v;k<=b;k++){if(k in u)continue;let w=h.defaultcollen;for(let x=m;x<=g;x++){let C=a[x][k];if(C==null||me(C.v)&&!_l(C))continue;let S=At(k)[1]-At(k)[0]-2,_=Sr(C,o,{r:x,c:k,cellWidth:S}),T=0;_!=null&&(T=_.textWidthAll),T+6>w&&(w=T+6)}w!=h.defaultcollen&&(s.columnlen[k]=w,s.customWidth&&delete s.customWidth[k]),u[k]=1}}Zl(h.flowdata[0].length,h.flowdata.length,h.flowdata,s,h.luckysheet_select_save,"resizeC","columnlen")}var Im=Ie(()=>{on();Ur();qr();il();Qt();Ll();Zt();dt();Nt();Ol();Ft();Pa();Ut();da();Yt();Kt();ll();Jt();bt();mr();Lr();gn();Ml();Xe();xl()});function Zo(e,n,t,l){if($("#luckysheet-formula-search-c").is(":visible")&&(e=="up"||e=="down")){let a;e=="down"?(a=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").next(),a.length==0&&(a=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").first())):e=="up"&&(a=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").prev(),a.length==0&&(a=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").last())),$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"),a.addClass("luckysheet-formula-search-item-active"),l.preventDefault()}else if($("#luckysheet-formula-functionrange-select").is(":visible")){if(n&&t)an(e,"rangeOfFormula");else if(n)ca(e,"rangeOfFormula");else if(t){let a=e,o=1;e=="up"&&(a="down",o=-1),e=="left"&&(a="right",o=-1),Bn(a,o,"rangeOfFormula")}else{let a=e,o=1;e=="up"&&(a="down",o=-1),e=="left"&&(a="right",o=-1),jt(a,o,"rangeOfFormula")}l.preventDefault()}else if(p.israngeseleciton()){let a=$(window.getSelection().anchorNode);if(a.parent().next().text()==null||a.parent().next().text()==""){let o=$("#luckysheet-input-box #luckysheet-input-box-index").text(),s=p.getcellrange(o);s==null&&(s=p.getcellrange($("#luckysheet-input-box-index").text()));let u=s.row[0],d=s.row[1],f=s.column[0],m=s.column[1],g=h.visibledatarow[d],y=u-1==-1?0:h.visibledatarow[u-1],v=h.visibledatacolumn[m],b=f-1==-1?0:h.visibledatacolumn[f-1];if(p.func_selectedrange={left:b,width:v-b-1,top:y,height:g-y-1,left_move:b,width_move:v-b-1,top_move:y,height_move:g-y-1,row:[u,d],column:[f,m],row_focus:u,column_focus:f},p.rangeSetValue({row:[u,d],column:[f,m]}),p.rangestart=!0,p.rangedrag_column_start=!1,p.rangedrag_row_start=!1,n&&t)an(e,"rangeOfFormula");else if(n)ca(e,"rangeOfFormula");else if(t){let k=e,w=1;e=="up"&&(k="down",w=-1),e=="left"&&(k="right",w=-1),Bn(k,w,"rangeOfFormula")}else{let k=e,w=1;e=="up"&&(k="down",w=-1),e=="left"&&(k="right",w=-1),jt(k,w,"rangeOfFormula")}l.preventDefault()}}else if(!n&&!t){let a=$(window.getSelection().anchorNode),o=window.getSelection().anchorOffset;e=="up"?a.parent().is("span")&&a.parent().next().length==0&&o>0?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",-1,"rangeOfSelect"),l.preventDefault()):a.is("#luckysheet-rich-text-editor")&&a.context.childElementCount==o?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",-1,"rangeOfSelect"),l.preventDefault()):a.parent().is("#luckysheet-rich-text-editor")&&a.context.length==o&&(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",-1,"rangeOfSelect"),l.preventDefault()):e=="down"?a.parent().is("span")&&a.parent().next().length==0&&o>0?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",1,"rangeOfSelect"),l.preventDefault()):a.is("#luckysheet-rich-text-editor")&&a.context.childElementCount==o?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",1,"rangeOfSelect"),l.preventDefault()):a.parent().is("#luckysheet-rich-text-editor")&&a.context.length==o&&(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",1,"rangeOfSelect"),l.preventDefault()):e=="left"?a.parent().is("span")&&a.parent().prev().length==0&&o==0?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("right",-1,"rangeOfSelect"),l.preventDefault()):a.is("#luckysheet-rich-text-editor")&&o==1?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("right",-1,"rangeOfSelect"),l.preventDefault()):a.parent().is("#luckysheet-rich-text-editor")&&o==0?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("right",-1,"rangeOfSelect"),l.preventDefault()):p.rangeHightlightselected($("#luckysheet-rich-text-editor")):e=="right"&&(a.parent().is("span")&&a.parent().next().length==0&&o>0?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("right",1,"rangeOfSelect"),l.preventDefault()):a.is("#luckysheet-rich-text-editor")&&a.context.childElementCount==o?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("right",1,"rangeOfSelect"),l.preventDefault()):a.parent().is("#luckysheet-rich-text-editor")&&a.context.length==o?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("right",1,"rangeOfSelect"),l.preventDefault()):p.rangeHightlightselected($("#luckysheet-rich-text-editor")))}}function Am(){let n=Q().drag;$("#luckysheet-input-box").click(function(){p.rangeHightlightselected($("#luckysheet-rich-text-editor"))}).add("#"+h.container).on("keydown",function(t){let l=t.ctrlKey,a=t.altKey,o=t.shiftKey,s=t.keyCode;if($("#luckysheet-modal-dialog-mask").is(":visible")||$(t.target).hasClass("luckysheet-mousedown-cancel")||$(t.target).hasClass("sp-input")||parseInt($("#luckysheet-input-box").css("top"))>0&&$(t.target).closest(".luckysheet-input-box").length>0&&s!=it.ENTER&&s!=it.TAB&&s!=it.UP&&s!=it.DOWN&&s!=it.LEFT&&s!=it.RIGHT){let d=$(window.getSelection().anchorNode);if((d.parent().is("#luckysheet-helpbox-cell")||d.is("#luckysheet-helpbox-cell"))&&s==it.ENTER){let f=$("#luckysheet-helpbox-cell").text();if(p.iscelldata(f)){let m=p.getcellrange(f);h.luckysheet_select_save=[{row:m.row,column:m.column,row_focus:m.row[0],column_focus:m.column[0]}],lt(),$("#luckysheet-helpbox-cell").blur();let g=$("#luckysheet-cell-main").scrollLeft(),y=$("#luckysheet-cell-main").scrollTop(),v=$("#luckysheet-cell-main").height(),b=$("#luckysheet-cell-main").width(),k=h.visibledatarow[m.row[1]],w=m.row[0]-1==-1?0:h.visibledatarow[m.row[0]-1],x=h.visibledatacolumn[m.column[1]],C=m.column[0]-1==-1?0:h.visibledatacolumn[m.column[0]-1];x-g-b+20>0?$("#luckysheet-scrollbar-x").scrollLeft(x-b+20):C-g-20<0&&$("#luckysheet-scrollbar-x").scrollLeft(C-20),k-y-v+20>0?$("#luckysheet-scrollbar-y").scrollTop(k-v+20):w-y-20<0&&$("#luckysheet-scrollbar-y").scrollTop(w-20)}}return}if($("#luckysheet-modal-dialog-mask").is(":visible")||$(t.target).hasClass("luckysheet-mousedown-cancel")||$(t.target).hasClass("formulaInputFocus"))return;let u=$("#luckysheet-input-box");if((a||t.metaKey)&&s==it.ENTER&&parseInt(u.css("top"))>0){let d=h.luckysheet_select_save[h.luckysheet_select_save.length-1],f=d.row_focus,m=d.column_focus;Ed(h.flowdata[f][m]),t.preventDefault()}else if(s==it.ENTER&&parseInt(u.css("top"))>0)$("#luckysheet-formula-search-c").is(":visible")&&p.searchFunctionCell!=null?p.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")):(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),h.luckysheet_select_save=[{row:[h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[0]],column:[h.luckysheetCellUpdate[1],h.luckysheetCellUpdate[1]],row_focus:h.luckysheetCellUpdate[0],column_focus:h.luckysheetCellUpdate[1]}],jt("down",1,"rangeOfSelect")),$("#luckysheet-search-formula-parm").is(":visible")&&$("#luckysheet-search-formula-parm").hide(),$("#luckysheet-search-formula-parm-select").is(":visible")&&$("#luckysheet-search-formula-parm-select").hide(),t.preventDefault();else if(s==it.TAB){if(parseInt(u.css("top"))>0)return;jt("right",1,"rangeOfSelect"),t.preventDefault()}else if(s==it.F2){if(parseInt(u.css("top"))>0)return;let d=h.luckysheet_select_save[h.luckysheet_select_save.length-1],f=d.row_focus,m=d.column_focus;Rl(f,m,h.flowdata),t.preventDefault()}else if(s==it.F4&&parseInt(u.css("top"))>0)p.setfreezonFuc(t),t.preventDefault();else if(s==it.ESC&&parseInt(u.css("top"))>0)p.dontupdate(),jt("down",0,"rangeOfSelect"),t.preventDefault();else if(s==it.ENTER){if($(t.target).hasClass("formulaInputFocus")||$("#luckysheet-conditionformat-dialog").is(":visible"))return;if(String.fromCharCode(s)!=null&&$("#luckysheet-cell-selected").is(":visible")){let d=h.luckysheet_select_save[h.luckysheet_select_save.length-1],f=d.row_focus,m=d.column_focus;Rl(f,m,h.flowdata),t.preventDefault()}}else if(l||t.metaKey){if(o){if(Rm||(h.luckysheet_shiftpositon=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),h.luckysheet_shiftkeydown=!0),s==it.UP){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;an("up","rangeOfSelect")}else if(s==it.DOWN){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;an("down","rangeOfSelect")}else if(s==it.LEFT){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;an("left","rangeOfSelect")}else if(s==it.RIGHT){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;an("right","rangeOfSelect")}else if(s==186||s==222){let d=h.luckysheet_select_save[h.luckysheet_select_save.length-1],f=d.row_focus,m=d.column_focus;Rl(f,m,h.flowdata,!0);let g=Yo(2);$("#luckysheet-rich-text-editor").html(g),_r($("#luckysheet-rich-text-editor")[0]),p.functionInputHanddler($("#luckysheet-functionbox-cell"),$("#luckysheet-rich-text-editor"),s)}}else if(s==66)$("#luckysheet-icon-bold").click();else if(s==67){if(Re.currentImgId!=null){Re.copyImgItem(t);return}if(ke.luckysheetPaintModelOn&&ke.cancelPaintModel(),h.luckysheet_select_save.length==0)return;if(h.config.merge!=null){let f=!1;for(let m=0;m<h.luckysheet_select_save.length;m++){let g=h.luckysheet_select_save[m].row[0],y=h.luckysheet_select_save[m].row[1],v=h.luckysheet_select_save[m].column[0],b=h.luckysheet_select_save[m].column[1];if(f=Mt(h.config,g,y,v,b),f)break}if(f){de()?alert(n.noMerge):U.info(n.noMerge,"");return}}let d=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save;if(h.luckysheet_select_save.length>1&&d!=null&&d.length>0){let f=!1,m=$e.getComputeMap();e:for(let g=0;g<h.luckysheet_select_save.length&&!f;g++){let y=h.luckysheet_select_save[g].row[0],v=h.luckysheet_select_save[g].row[1],b=h.luckysheet_select_save[g].column[0],k=h.luckysheet_select_save[g].column[1];for(let w=y;w<=v;w++)for(let x=b;x<=k;x++)if($e.checksCF(w,x,m)!=null){f=!0;continue e}}if(f){de()?alert(n.noMulti):U.info(n.noMulti,"");return}}if(h.luckysheet_select_save.length>1){let f=!0,m=h.luckysheet_select_save[0].row[0],g=h.luckysheet_select_save[0].row[1],y=!0,v=h.luckysheet_select_save[0].column[0],b=h.luckysheet_select_save[0].column[1];for(let k=1;k<h.luckysheet_select_save.length;k++)(h.luckysheet_select_save[k].row[0]!=m||h.luckysheet_select_save[k].row[1]!=g)&&(f=!1),(h.luckysheet_select_save[k].column[0]!=v||h.luckysheet_select_save[k].column[1]!=b)&&(y=!1);if(!f&&!y||Yr()){de()?alert(n.noMulti):U.info(n.noMulti,"");return}}Ct.copy(t),h.luckysheet_paste_iscut=!1,Mr(),t.stopPropagation();return}else if(s==70)$n.createDialog(0),$n.init(),$("#luckysheet-search-replace #searchInput input").focus();else if(s==72)$n.createDialog(1),$n.init(),$("#luckysheet-search-replace #searchInput input").focus();else if(s==73)$("#luckysheet-icon-italic").click();else if(s==86){if(de()||h.allowEdit===!1||$(t.target).hasClass("formulaInputFocus"))return;if(h.luckysheet_select_save.length>1){de()?alert(n.noPaste):U.info(n.noPaste,"");return}Ct.isPasteAction=!0,Mr(),t.stopPropagation();return}else if(s==88){if(ke.luckysheetPaintModelOn&&ke.cancelPaintModel(),h.luckysheet_select_save.length==0)return;if(h.config.merge!=null){let d=!1;for(let f=0;f<h.luckysheet_select_save.length;f++){let m=h.luckysheet_select_save[f].row[0],g=h.luckysheet_select_save[f].row[1],y=h.luckysheet_select_save[f].column[0],v=h.luckysheet_select_save[f].column[1];if(d=Mt(h.config,m,g,y,v),d)break}if(d){fe.editMode?alert(_locale_drag.noMerge):U.info(_locale_drag.noMerge,"");return}}if(h.luckysheet_select_save.length>1){de()?alert(n.noMulti):U.info(n.noMulti,"");return}Ct.copy(t),h.luckysheet_paste_iscut=!0,Mr(),t.stopPropagation();return}else if(s==90){Tn.redo(t),Mr(),t.stopPropagation();return}else if(s==89){Tn.undo(t),Mr(),t.stopPropagation();return}else if(s==it.UP){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;ca("up","rangeOfSelect")}else if(s==it.DOWN){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;ca("down","rangeOfSelect")}else if(s==it.LEFT){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;ca("left","rangeOfSelect")}else if(s==it.RIGHT){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;ca("right","rangeOfSelect")}else if(s==186){let d=h.luckysheet_select_save[h.luckysheet_select_save.length-1],f=d.row_focus,m=d.column_focus;Rl(f,m,h.flowdata,!0);let g=Yo(1);$("#luckysheet-rich-text-editor").html(g),_r($("#luckysheet-rich-text-editor")[0]),p.functionInputHanddler($("#luckysheet-functionbox-cell"),$("#luckysheet-rich-text-editor"),s)}else if(s==222){let d=h.luckysheet_select_save[h.luckysheet_select_save.length-1],f=d.row_focus,m=d.column_focus;Rl(f,m,h.flowdata,!0);let g=Yo(2);$("#luckysheet-rich-text-editor").html(g),_r($("#luckysheet-rich-text-editor")[0]),p.functionInputHanddler($("#luckysheet-functionbox-cell"),$("#luckysheet-rich-text-editor"),s)}else String.fromCharCode(s).toLocaleUpperCase()=="A"&&$("#luckysheet-left-top").click();t.preventDefault();return}else if(o&&(s==it.UP||s==it.DOWN||s==it.LEFT||s==it.RIGHT||a&&(s==53||s==101))){if(parseInt(u.css("top"))>0||$(t.target).hasClass("formulaInputFocus"))return;if(Rm||(h.luckysheet_shiftpositon=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),h.luckysheet_shiftkeydown=!0),s==it.UP){if($("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;Bn("down",-1,"rangeOfSelect")}else if(s==it.DOWN){if($("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;Bn("down",1,"rangeOfSelect")}else if(s==it.LEFT){if($("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;Bn("right",-1,"rangeOfSelect")}else if(s==it.RIGHT){if($("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;Bn("right",1,"rangeOfSelect")}else a&&(s==53||s==101)&&$("#luckysheet-icon-strikethrough").click();t.preventDefault()}else if(s==it.ESC)ke.luckysheetPaintModelOn?ke.cancelPaintModel():(rl(t),t.preventDefault()),lt();else if(s==it.DELETE||s==it.BACKSPACE)Re.currentImgId!=null?Re.removeImgItem():$("#luckysheet-delete-text").click(),t.preventDefault();else if(s==8&&Re.currentImgId!=null)Re.removeImgItem(),t.preventDefault();else if(s==it.UP){if(parseInt(u.css("top"))>0||h.luckysheet_cell_selected_move||h.luckysheet_cell_selected_extend||$(t.target).hasClass("formulaInputFocus")||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;jt("down",-1,"rangeOfSelect"),t.preventDefault()}else if(s==it.DOWN){if(parseInt(u.css("top"))>0||h.luckysheet_cell_selected_move||h.luckysheet_cell_selected_extend||$(t.target).hasClass("formulaInputFocus")||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;jt("down",1,"rangeOfSelect"),t.preventDefault()}else if(s==it.LEFT){if(parseInt(u.css("top"))>0||h.luckysheet_cell_selected_move||h.luckysheet_cell_selected_extend||$(t.target).hasClass("formulaInputFocus")||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;jt("right",-1,"rangeOfSelect"),t.preventDefault()}else if(s==it.RIGHT){if(parseInt(u.css("top"))>0||h.luckysheet_cell_selected_move||h.luckysheet_cell_selected_extend||$(t.target).hasClass("formulaInputFocus")||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;jt("right",1,"rangeOfSelect"),t.preventDefault()}else if((!(s>=112&&s<=123||s<=46||s==144||s==108||t.ctrlKey||t.altKey||t.shiftKey&&(s==37||s==38||s==39||s==40))||s==8||s==32||s==46||s==0||t.ctrlKey&&s==86)&&String.fromCharCode(s)!=null&&$("#luckysheet-cell-selected").is(":visible")&&s!=it.CAPSLOCK&&s!=it.WIN&&s!=18){let d=h.luckysheet_select_save[h.luckysheet_select_save.length-1],f=d.row_focus,m=d.column_focus;Rl(f,m,h.flowdata,!0),s==8&&$("#luckysheet-rich-text-editor").html("<br/>"),p.functionInputHanddler($("#luckysheet-functionbox-cell"),$("#luckysheet-rich-text-editor"),s)}Mr(),t.stopPropagation()}),$("#"+h.container).add("#luckysheet-input-box").keydown(function(t){if($("#luckysheet-modal-dialog-mask").is(":visible")||$(t.target).hasClass("luckysheet-mousedown-cancel")||$(t.target).hasClass("formulaInputFocus"))return;let l=t.ctrlKey,a=t.altKey,o=t.shiftKey,s=t.keyCode,u=$("#luckysheet-input-box");s==it.ESC&&parseInt($("#luckysheet-input-box").css("top"))>0?(p.dontupdate(),jt("down",0,"rangeOfSelect"),t.preventDefault()):s==it.ENTER&&parseInt(u.css("top"))>0?$("#luckysheet-formula-search-c").is(":visible")&&p.searchFunctionCell!=null&&(p.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")),t.preventDefault()):s==it.TAB&&parseInt(u.css("top"))>0?($("#luckysheet-formula-search-c").is(":visible")&&p.searchFunctionCell!=null?p.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")):(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("right",1,"rangeOfSelect")),t.preventDefault()):s==it.F4&&parseInt(u.css("top"))>0?(p.setfreezonFuc(t),t.preventDefault()):s==it.UP&&parseInt(u.css("top"))>0?Zo("up",l,o,t):s==it.DOWN&&parseInt(u.css("top"))>0?Zo("down",l,o,t):s==it.LEFT&&parseInt(u.css("top"))>0?Zo("left",l,o,t):s==it.RIGHT&&parseInt(u.css("top"))>0?Zo("right",l,o,t):(!(s>=112&&s<=123||s<=46||s==144||s==108||t.ctrlKey||t.altKey||t.shiftKey&&(s==37||s==38||s==39||s==40||s==it.WIN||s==it.WIN_R||s==it.MENU))||s==8||s==32||s==46||t.ctrlKey&&s==86)&&(p.functionInputHanddler($("#luckysheet-functionbox-cell"),$("#luckysheet-rich-text-editor"),s),Yf(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1],h.flowdata))}).keyup(function(t){let l=t.keyCode;!t.shiftKey&&l==16&&(h.luckysheet_shiftkeydown=!1,h.luckysheet_shiftpositon=null),parseInt($("#luckysheet-input-box").css("top"))>0&&(l==13||l==16||l==32),t.preventDefault()}),$("#luckysheet_info_detail_input").val(ne.title).css("width",ya(ne.title)*10).keydown(function(){let t=event.ctrlKey,l=event.altKey,a=event.shiftKey,o=event.keyCode,s=$(this);o==it.ENTER&&s.blur().change()}).bind("input propertychange",function(){let t=$(this),l=ya(t.val())*10,a=$("#luckysheet_info_detail_update").outerWidth(),o=$("#luckysheet_info_detail_save").outerWidth(),s=$("#luckysheet_info_detail_user").parent().outerWidth()+60,u=$("#"+h.container).outerWidth(),d=100,f=u-o-a-s-d;l>f?$("#luckysheet_info_detail_input").css("width",f):$("#luckysheet_info_detail_input").css("width",l)}).change(function(){ne.saveParam("na",null,$(this).val())}),$("#"+h.container).add("input.luckysheet-mousedown-cancel").keydown(function(t){let l=t.target.closest(".luckysheet-cols-menuitem");typeof l!="undefined"&&l!=null&&t.keyCode===13&&$(l).trigger("click")})}var Rm,Dm=Ie(()=>{xl();il();gr();Qt();ba();Gt();za();Zt();Wa();Gc();Mo();qr();dt();Nt();Ft();pn();Ut();Vr();ll();bt();gn();Xe();Rm=!1});function Mm(){let e=Q();$("#luckysheetorderbyasc, #luckysheetorderbyasc_t").mousedown(function(t){rl(t),ac(h.orderbyindex,!0),lt()}),$("#luckysheetorderbydesc, #luckysheetorderbydesc_t").click(function(t){rl(t),ac(h.orderbyindex,!1),lt()});let n=!0;$("#luckysheetorderby").click(function(){if(!$t(h.currentSheetIndex,"sort"))return;$("body .luckysheet-cols-menu").hide();let t=e.sort;if(h.luckysheet_select_save.length>1){de()?alert(t.noRangeError):U.info(t.noRangeError,"");return}let l=h.luckysheet_select_save[0],a=l.row[0],o=l.row[1],s=l.column[0],u=l.column[1];if(n){n=!1;let w=`<div style="overflow: hidden;" class="luckysheet-sort-modal"><div><label><input type="checkbox" id="luckysheet-sort-haveheader"/><span>${t.hasTitle}</span></label></div><div style="overflow-y:auto;" id="luckysheet-sort-dialog-tablec"><table data-itemcount="0" cellspacing="0"> <tr><td>${t.hasTitle} <select name="sort_0"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> </td> <td> <div><label><input value="asc" type="radio" checked="checked" name="sort_0"><span>${t.asc}A-Z</span></label></div> <div><label><input value="desc" type="radio" name="sort_0"><span>${t.desc}Z-A</span></label></div></td></tr></table></div><div style="background: #e5e5e5;border-top: 1px solid #f5f5f5; height: 1px; width: 100%;margin:2px 0px;margin-bottom:10px;"></div> <div> <span style="font-weight: bold; text-decoration: underline;text-align:center;color: blue;cursor: pointer;" class="luckysheet-sort-dialog-additem">+ ${t.addOthers}</span> </div> </div>`;$("body").append(_e(ft,{id:"luckysheet-sort-dialog",addclass:"",title:e.sort.sortTitle,content:w,botton:`<button id="luckysheet-sort-modal-confirm" class="btn btn-primary">${t.confirm}</button><button class="btn btn-default luckysheet-model-close-btn">${t.close}</button>`})),$("#luckysheet-sort-dialog .luckysheet-sort-dialog-additem").click(function(){let x=h.luckysheet_select_save[0],C=x.row[0],S=x.row[1],_=x.column[0],T=x.column[1],A="",R=$("#luckysheet-sort-dialog table").data("itemcount")+1,I=$("#luckysheet-sort-haveheader").is(":checked");for(let F=_;F<=T;F++)if(I){let z=ze(C,F,h.flowdata,"m");z==null&&(z=t.columnOperation+(F-_+1)),A+='<option value="'+F+'">'+z+"</option>"}else A+='<option value="'+F+'">'+tt(F)+"</option>";$("#luckysheet-sort-dialog table").append(` |
| | | `).replaceAll(/<(.*)>.*?|<(.*) \/>/g,"").trim(),N.push(z+"_"+M),He.ref(E,N),$("#"+F).remove(),E[z][M].ps.isshow?(He.buildPs(z,M,E[z][M].ps),$("#"+F).addClass("luckysheet-postil-show-active"),$("#"+F).find(".luckysheet-postil-dialog-resize").show()):He.editPs(z,M)}if(h.luckysheet_rows_change_size){h.luckysheet_rows_change_size=!1,$("#luckysheet-change-size-line").hide(),$("#luckysheet-rows-change-size").css("opacity",0),$("#luckysheet-sheettable, #luckysheet-rows-h, #luckysheet-rows-h canvas").css("cursor","default");let F=nt(g.pageX,g.pageY),z=$("#luckysheet-rows-h").scrollTop(),M=F[1]+z,E=$(window).height(),N=_t(M),L=N[1],O=N[0],V=N[2],q=M+3-h.luckysheet_rows_change_size_start[0];M+3-h.luckysheet_rows_change_size_start[0]<19&&(q=19),M>=E-200+z&&(q=E-200-h.luckysheet_rows_change_size_start[0]+z);let W=$.extend(!0,{},h.config);W.rowlen==null&&(W.rowlen={}),W.customHeight==null&&(W.customHeight={}),W.customHeight[h.luckysheet_rows_change_size_start[1]]=1;let X=h.luckysheet_rows_change_size_start[1],te=!1;h.luckysheet_select_save.length>0&&h.luckysheet_select_save.filter(oe=>oe.row_select).some(oe=>(X>=oe.row[0]&&X<=oe.row[1]&&(te=!0),te)),te?h.luckysheet_select_save.filter(oe=>oe.row_select).forEach(oe=>{for(let se=oe.row[0];se<=oe.row[1];se++)W.rowlen[se]=Math.ceil(q/h.zoomRatio)}):W.rowlen[h.luckysheet_rows_change_size_start[1]]=Math.ceil(q/h.zoomRatio);let le=Re.moveChangeSize("row",h.luckysheet_rows_change_size_start[1],q);h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"resize",ctrlType:"resizeR",sheetIndex:h.currentSheetIndex,config:$.extend(!0,{},h.config),curconfig:$.extend(!0,{},W),images:$.extend(!0,{},Re.images),curImages:$.extend(!0,{},le)})),h.config=W,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,W.rowlen,{k:"rowlen"}),h.luckysheetfile[Z(h.currentSheetIndex)].images=le,ne.saveParam("all",h.currentSheetIndex,le,{k:"images"}),Re.images=le,Re.allImagesShow(),St(h.flowdata.length,null)}if(h.luckysheet_cols_change_size){h.luckysheet_cols_change_size=!1,$("#luckysheet-change-size-line").hide(),$("#luckysheet-cols-change-size").css("opacity",0),$("#luckysheet-sheettable, #luckysheet-cols-h-c, .luckysheet-cols-h-cells, .luckysheet-cols-h-cells canvas").css("cursor","default");let F=nt(g.pageX,g.pageY),z=$("#luckysheet-cols-h-c").scrollLeft(),M=F[0]+z,E=$(window).width(),N=h.visibledatarow.length-1,L=h.visibledatarow[N],O=0,V=wt(M),q=V[1],W=V[0],X=V[2],te=M+3-h.luckysheet_cols_change_size_start[0],le=h.defaultcollen;if(h.config.columnlen!=null&&h.config.columnlen[h.luckysheet_cols_change_size_start[1]]!=null&&(le=h.config.columnlen[h.luckysheet_cols_change_size_start[1]]),Math.abs(te-le)<3)return;M+3-h.luckysheet_cols_change_size_start[0]<30&&(te=30),M>=E-100+z&&(te=E-100-h.luckysheet_cols_change_size_start[0]+z);let oe=$.extend(!0,{},h.config);oe.columnlen==null&&(oe.columnlen={}),oe.customWidth==null&&(oe.customWidth={}),oe.customWidth[h.luckysheet_cols_change_size_start[1]]=1;let se=h.luckysheet_cols_change_size_start[1],ce=!1;h.luckysheet_select_save.length>0&&h.luckysheet_select_save.filter(ue=>ue.column_select).some(ue=>(se>=ue.column[0]&&se<=ue.column[1]&&(ce=!0),ce)),ce?h.luckysheet_select_save.filter(ue=>ue.column_select).forEach(ue=>{for(let K=ue.column[0];K<=ue.column[1];K++)oe.columnlen[K]=Math.ceil(te/h.zoomRatio)}):oe.columnlen[h.luckysheet_cols_change_size_start[1]]=Math.ceil(te/h.zoomRatio);let he=Re.moveChangeSize("column",h.luckysheet_cols_change_size_start[1],te);h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"resize",ctrlType:"resizeC",sheetIndex:h.currentSheetIndex,config:$.extend(!0,{},h.config),curconfig:$.extend(!0,{},oe),images:$.extend(!0,{},Re.images),curImages:$.extend(!0,{},he)})),h.config=oe,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,oe.columnlen,{k:"columnlen"}),h.luckysheetfile[Z(h.currentSheetIndex)].images=he,ne.saveParam("all",h.currentSheetIndex,he,{k:"images"}),Re.images=he,Re.allImagesShow(),St(null,h.flowdata[0].length),setTimeout(function(){Be()},1)}if(p.rangeMove&&p.rangeMoveDragged(p.rangeMoveObj),h.luckysheet_cell_selected_move){$("#luckysheet-cell-selected-move").hide(),h.luckysheet_cell_selected_move=!1;let F=nt(g.pageX,g.pageY);if(!vr(h.luckysheet_select_save,h.currentSheetIndex))return;let z=$("#luckysheet-cell-main").scrollLeft(),M=$("#luckysheet-cell-main").scrollTop(),E=F[0]+z,N=F[1]+M,L=$(window).height()+M-h.sheetBarHeight-h.statisticBarHeight,O=$(window).width()+z,V=_t(N)[2],q=wt(E)[2],W=h.luckysheet_cell_selected_move_index[0],X=h.luckysheet_cell_selected_move_index[1];if(V==W&&q==X)return;let te=xe.deepCopyFlowData(h.flowdata),le=h.luckysheet_select_save[h.luckysheet_select_save.length-1],oe=Pt(le),se=$.extend(!0,{},h.config);if(se.merge==null&&(se.merge={}),se.rowlen==null&&(se.rowlen={}),Mt(se,le.row[0],le.row[1],le.column[0],le.column[1])){fe()?alert(l.noMerge):U.info('<i class="fa fa-exclamation-triangle"></i>',l.noMerge);return}let ce=le.row[0]-W+V,he=le.row[1]-W+V,ue=le.column[0]-X+q,K=le.column[1]-X+q;if(!vr([{row:[ce,he],column:[ue,K]}],h.currentSheetIndex))return;if((ce<0||N<0)&&(ce=0,he=le.row[1]-le.row[0]),(ue<0||E<0)&&(ue=0,K=le.column[1]-le.column[0]),(he>=h.visibledatarow[h.visibledatarow.length-1]||N>L)&&(ce=h.visibledatarow.length-1-le.row[1]+le.row[0],he=h.visibledatarow.length-1),(K>=h.visibledatacolumn[h.visibledatacolumn.length-1]||E>O)&&(ue=h.visibledatacolumn.length-1-le.column[1]+le.column[0],K=h.visibledatacolumn.length-1),Mt(se,ce,he,ue,K)){fe()?alert(l.noMerge):U.info('<i class="fa fa-exclamation-triangle"></i>',l.noMerge);return}let G=Gr(h.currentSheetIndex),ee=null;for(let Ce=le.row[0];Ce<=le.row[1];Ce++){Ce in se.rowlen&&(ee=!0);for(let Le=le.column[0];Le<=le.column[1];Le++){let Ge=te[Ce][Le];P(Ge)=="object"&&"mc"in Ge&&Ge.mc.r+"_"+Ge.mc.c in se.merge&&delete se.merge[Ge.mc.r+"_"+Ge.mc.c],te[Ce][Le]=null}}if(se.borderInfo&&se.borderInfo.length>0){let Ce=[];for(let Le=0;Le<se.borderInfo.length;Le++){let Ge=se.borderInfo[Le].rangeType;if(Ge=="range"){let Ne=se.borderInfo[Le].range,et=[];for(let vt=0;vt<Ne.length;vt++)et=et.concat($e.CFSplitRange(Ne[vt],{row:le.row,column:le.column},{row:[ce,he],column:[ue,K]},"restPart"));se.borderInfo[Le].range=et,Ce.push(se.borderInfo[Le])}else if(Ge=="cell"){let Ne=se.borderInfo[Le].value.row_index,et=se.borderInfo[Le].value.col_index;Ne>=le.row[0]&&Ne<=le.row[1]&&et>=le.column[0]&&et<=le.column[1]||Ce.push(se.borderInfo[Le])}}se.borderInfo=Ce}let pe={};for(let Ce=0;Ce<oe.length;Ce++)for(let Le=0;Le<oe[0].length;Le++){if(G[Ce+le.row[0]+"_"+(Le+le.column[0])]){let Ne={rangeType:"cell",value:{row_index:Ce+ce,col_index:Le+ue,l:G[Ce+le.row[0]+"_"+(Le+le.column[0])].l,r:G[Ce+le.row[0]+"_"+(Le+le.column[0])].r,t:G[Ce+le.row[0]+"_"+(Le+le.column[0])].t,b:G[Ce+le.row[0]+"_"+(Le+le.column[0])].b}};se.borderInfo==null&&(se.borderInfo=[]),se.borderInfo.push(Ne)}let Ge="";if(oe[Ce]!=null&&oe[Ce][Le]!=null&&(Ge=oe[Ce][Le]),P(Ge)=="object"&&"mc"in Ge){let Ne=$.extend(!0,{},Ge.mc);"rs"in Ge.mc?(pe[Ne.r+"_"+Ne.c]=[Ce+ce,Le+ue],Ge.mc.r=Ce+ce,Ge.mc.c=Le+ue,se.merge[Ce+ce+"_"+(Le+ue)]=Ge.mc):(Ge.mc.r=pe[Ne.r+"_"+Ne.c][0],Ge.mc.c=pe[Ne.r+"_"+Ne.c][1])}te[Ce+ce][Le+ue]=Ge}ee&&(se=yl(te,le.row[0],le.row[1],se),se=yl(te,ce,he,se));let ae=$.extend(!0,[],h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save);if(ae!=null&&ae.length>0)for(let Ce=0;Ce<ae.length;Ce++){let Le=ae[Ce].cellrange,Ge=[];for(let Ne=0;Ne<Le.length;Ne++){let et=$e.CFSplitRange(Le[Ne],{row:le.row,column:le.column},{row:[ce,he],column:[ue,K]},"allPart");Ge=Ge.concat(et)}ae[Ce].cellrange=Ge}let Te;h.luckysheet_select_save[0].row_focus==h.luckysheet_select_save[0].row[0]?Te=ce:Te=he;let ie;h.luckysheet_select_save[0].column_focus==h.luckysheet_select_save[0].column[0]?ie=ue:ie=K;let Ee=[];Ee.push({row:le.row,column:le.column}),Ee.push({row:[ce,he],column:[ue,K]}),le.row=[ce,he],le.column=[ue,K],le.row_focus=Te,le.column_focus=ie,Ze(te,Ee,{cfg:se,RowlChange:ee,cdformat:ae}),lt(),$("#luckysheet-sheettable").css("cursor","default"),clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},500)}if(h.chart_selection.rangeMove&&h.chart_selection.rangeMoveDragged(),h.chart_selection.rangeResize&&h.chart_selection.rangeResizeDragged(),h.luckysheet_cell_selected_extend){if(h.luckysheet_cell_selected_extend=!1,$("#luckysheet-cell-selected-extend").hide(),!vr(h.luckysheet_select_save,h.currentSheetIndex))return;let F=nt(g.pageX,g.pageY),z=$("#luckysheet-cell-main").scrollLeft(),M=$("#luckysheet-cell-main").scrollTop(),E=F[0]+z-5,N=F[1]+M-5,L=$(window).height()+M-h.sheetBarHeight-h.statisticBarHeight,O=$(window).width()+z,V=_t(N),q=V[1],W=V[0],X=V[2],te=wt(E),le=te[1],oe=te[0],se=te[2],ce=h.luckysheet_cell_selected_extend_index[0],he=h.luckysheet_cell_selected_extend_index[1],ue=h.luckysheet_select_save[h.luckysheet_select_save.length-1],K=ue.row[0],G=ue.row[1],ee=ue.column[0],pe=ue.column[1];(K<0||N<0)&&(K=0,G=ue.row[1]-ue.row[0]),(ee<0||E<0)&&(ee=0,pe=ue.column[1]-ue.column[0]),(G>=h.visibledatarow[h.visibledatarow.length-1]||N>L)&&(K=h.visibledatarow.length-1-ue.row[1]+ue.row[0],G=h.visibledatarow.length-1),(pe>=h.visibledatacolumn[h.visibledatacolumn.length-1]||E>O)&&(ee=h.visibledatacolumn.length-1-ue.column[1]+ue.column[0],pe=h.visibledatacolumn.length-1),nl.copyRange={row:$.extend(!0,[],ue.row),column:$.extend(!0,[],ue.column)};let ae=nl.typeItemHide();if(!ae[0]&&!ae[1]&&!ae[2]&&!ae[3]&&!ae[4]&&!ae[5]&&!ae[6]?nl.applyType="0":nl.applyType="1",Math.abs(ce-X)>Math.abs(he-se)){if(X>=K&&X<=G)return;if(h.luckysheet_select_save[0].top_move>=W){if(nl.applyRange={row:[X,ue.row[0]-1],column:ue.column},nl.direction="up",K-=ue.row[0]-X,Oe.isPivotRange(K,pe)){U.info(l.affectPivot,"");return}}else if(nl.applyRange={row:[ue.row[1]+1,X],column:ue.column},nl.direction="down",G+=X-ue.row[1],Oe.isPivotRange(G,pe)){U.info(l.affectPivot,"");return}}else{if(se>=ee&&se<=pe)return;if(h.luckysheet_select_save[0].left_move>=oe){if(nl.applyRange={row:ue.row,column:[se,ue.column[0]-1]},nl.direction="left",ee-=ue.column[0]-se,Oe.isPivotRange(G,ee)){U.info(l.affectPivot,"");return}}else if(nl.applyRange={row:ue.row,column:[ue.column[1]+1,se]},nl.direction="right",pe+=se-ue.column[1],Oe.isPivotRange(G,pe)){U.info(l.affectPivot,"");return}}if(h.config.merge!=null){let Te=!1;for(let ie=ue.row[0];ie<=ue.row[1];ie++)for(let Ee=ue.column[0];Ee<=ue.column[1];Ee++){let je=h.flowdata[ie][Ee];if(je!=null&&je.mc!=null){Te=!0;break}}if(Te){fe()?alert(l.noMerge):U.info(l.noMerge,"");return}for(let ie=K;ie<=G;ie++)for(let Ee=ee;Ee<=pe;Ee++){let je=h.flowdata[ie][Ee];if(je!=null&&je.mc!=null){Te=!0;break}}if(Te){fe()?alert(l.noMerge):U.info(l.noMerge,"");return}}ue.row=[K,G],ue.column=[ee,pe],nl.update(),nl.createIcon(),$("#luckysheet-cell-selected-move").hide(),$("#luckysheet-sheettable").css("cursor","default"),clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},500)}}),$(".luckysheet-grid-container, #luckysheet-rightclick-menu").on("contextmenu",function(g){g.preventDefault()}),$("#luckysheet-cell-main div.luckysheet-cs-draghandle").mousedown(function(g){if(fe()||h.allowEdit===!1)return;$("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle").css("cursor","move").end().find(".luckysheet-cs-draghandle").css("cursor","move"),$("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","move"),h.luckysheet_cell_selected_move=!0,h.luckysheet_scroll_status=!0;let y=nt(g.pageX,g.pageY),v=y[0]+$("#luckysheet-cell-main").scrollLeft(),b=y[1]+$("#luckysheet-cell-main").scrollTop(),k=_t(b),w=k[0],x=k[1],C=k[2],S=wt(v),_=S[0],T=S[1],A=S[2];h.luckysheet_cell_selected_move_index=[C,A],$("#luckysheet-cell-selected-move").css({left:_,width:T-_-1,top:w,height:x-w-1,display:"block"}),g.stopPropagation()}),$("#luckysheet-cell-main div.luckysheet-cs-fillhandle").mousedown(function(g){fe()||h.allowEdit===!1||($("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle").css("cursor","crosshair").end().find(".luckysheet-cs-draghandle").css("cursor","crosshair"),$("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","crosshair"),h.luckysheet_cell_selected_extend_time=setTimeout(function(){h.luckysheet_cell_selected_extend=!0,h.luckysheet_scroll_status=!0;let y=nt(g.pageX,g.pageY),v=y[0]+$("#luckysheet-cell-main").scrollLeft()-5,b=y[1]+$("#luckysheet-cell-main").scrollTop()-5,k=_t(b),w=k[0],x=k[1],C=k[2],S=wt(v),_=S[0],T=S[1],A=S[2];h.luckysheet_cell_selected_extend_index=[C,A],$("#luckysheet-cell-selected-extend").css({left:_,width:T-_-1,top:w,height:x-w-1,display:"block"})},100),g.stopPropagation())}).click(function(){clearTimeout(h.luckysheet_cell_selected_extend_time),event.stopPropagation()}).dblclick(function(){let g=h.luckysheet_select_save[0],y=g.row[0],v=g.row[1],b=g.column[0],k=g.column[1];if(Oe.isPivotRange(y,b))return;let w=!1,x=0;for(let S=v+1;S<h.flowdata.length;S++)if(b-1>=0&&k+1<h.flowdata[0].length){let _=h.flowdata[S][b-1],T=h.flowdata[S][k+1];if(S==v+1)if((_==null||me(_.v))&&(T==null||me(T.v))){w=!1;break}else w=!0,x++;else{if((_==null||me(_.v))&&(T==null||me(T.v)))break;x++}}else if(b-1>=0){let _=h.flowdata[S][b-1];if(S==v+1)if(_==null||me(_.v)){w=!1;break}else w=!0,x++;else{if(_==null||me(_.v))break;x++}}else if(k+1<h.flowdata[0].length){let _=h.flowdata[S][k+1];if(S==v+1)if(_==null||me(_.v)){w=!1;break}else w=!0,x++;else{if(_==null||me(_.v))break;x++}}if(!w||x==0){event.stopPropagation();return}nl.copyRange={row:[y,v],column:[b,k]};let C=nl.typeItemHide();!C[0]&&!C[1]&&!C[2]&&!C[3]&&!C[4]&&!C[5]&&!C[6]?nl.applyType="0":nl.applyType="1",nl.applyRange={row:[v+1,v+x],column:[b,k]},nl.direction="down",h.luckysheet_select_save=[{row:[y,v+x],column:[b,k]}],nl.update(),nl.createIcon(),$("#luckysheet-cell-selected-move").hide(),$("#luckysheet-sheettable").css("cursor","default"),clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},500),event.stopPropagation()}),$("#luckysheet-bottom-add-row, #luckysheet-bottom-add-row-input, #luckysheet-bottom-return-top").on("mousedown dblclick mouseup",function(g){g.stopPropagation()}),$("#luckysheet-bottom-add-row").on("click",function(g){$("#luckysheet-rightclick-menu").hide(),rt();let y=$(this),v=$("#luckysheet-bottom-add-row-input").val();if(v==""&&(v=de.addRowCount||100),isNaN(parseInt(v))){fe()?alert(a.tipInputNumber):U.info("error",a.tipInputNumber);return}if(v=parseInt(v),v<1||v>100){fe()?alert(a.tipInputNumberLimit):U.info("error",a.tipInputNumberLimit);return}Ir("row",h.flowdata.length-1,v)}),$("#luckysheet-bottom-return-top").on("click",function(g){$("#luckysheet-scrollbar-y").scrollTop(0)}),$("#luckysheet-copy-btn, #luckysheet-cols-copy-btn, #luckysheet-paste-btn-title").click(function(g){if($(this).parent().hide(),h.config.merge!=null){let v=!1;for(let b=0;b<h.luckysheet_select_save.length;b++){let k=h.luckysheet_select_save[b].row[0],w=h.luckysheet_select_save[b].row[1],x=h.luckysheet_select_save[b].column[0],C=h.luckysheet_select_save[b].column[1];if(v=Mt(h.config,k,w,x,C),v)break}if(v){fe()?alert(l.noPartMerge):U.info(l.noPartMerge,"");return}}let y=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save;if(h.luckysheet_select_save.length>1&&y!=null&&y.length>0){let v=!1,b=$e.getComputeMap();e:for(let k=0;k<h.luckysheet_select_save.length&&!v;k++){let w=h.luckysheet_select_save[k].row[0],x=h.luckysheet_select_save[k].row[1],C=h.luckysheet_select_save[k].column[0],S=h.luckysheet_select_save[k].column[1];for(let _=w;_<=x;_++)for(let T=C;T<=S;T++)if($e.checksCF(_,T,b)!=null){v=!0;continue e}}if(v){fe()?alert(l.noMulti):U.info(l.noMulti,"");return}}if(h.luckysheet_select_save.length>1){let v=!0,b=h.luckysheet_select_save[0].row[0],k=h.luckysheet_select_save[0].row[1],w=!0,x=h.luckysheet_select_save[0].column[0],C=h.luckysheet_select_save[0].column[1];for(let S=1;S<h.luckysheet_select_save.length;S++)(h.luckysheet_select_save[S].row[0]!=b||h.luckysheet_select_save[S].row[1]!=k)&&(v=!1),(h.luckysheet_select_save[S].column[0]!=x||h.luckysheet_select_save[S].column[1]!=C)&&(w=!1);if(!v&&!w||Yr()){fe()?alert(l.noMulti):U.info(l.noMulti,"");return}}Ct.copy(g)}),$("#luckysheet-copy-paste, #luckysheet-cols-paste-btn, #luckysheet-paste-btn-title").click(function(g){Ct.paste(g,"btn"),$(this).parent().hide()}),$("#luckysheet-chart-btn-title").click(function(){_c()}),$("#luckysheetdatavisual").click(function(){_c(),$("#luckysheet-rightclick-menu").hide()}),$("#luckysheet-pivot-btn-title").click(function(g){!$t(h.currentSheetIndex,"usePivotTablereports")||Oe.createPivotTable(g)}),$("#luckysheet-chart-btn-screenshot").click(function(){let g=t.screenshot;if(h.luckysheet_select_save.length==0){fe()?alert(g.screenshotTipNoSelection):U.info(g.screenshotTipTitle,g.screenshotTipNoSelection);return}if(h.luckysheet_select_save.length>1){fe()?alert(g.screenshotTipHasMulti):U.info(g.screenshotTipTitle,g.screenshotTipHasMulti);return}if(h.config.merge!=null){let F=!1;for(let z=0;z<h.luckysheet_select_save.length;z++){let M=h.luckysheet_select_save[z].row[0],E=h.luckysheet_select_save[z].row[1],N=h.luckysheet_select_save[z].column[0],L=h.luckysheet_select_save[z].column[1];if(F=Mt(h.config,M,E,N,L),F)break}if(F){fe()?alert(g.screenshotTipHasMerge):U.info(g.screenshotTipTitle,g.screenshotTipHasMerge);return}}let y=h.luckysheet_select_save[0].row[0],v=h.luckysheet_select_save[0].row[1],b=h.luckysheet_select_save[0].column[0],k=h.luckysheet_select_save[0].column[1],w,x;y-1<0?(w=0,x=h.visibledatarow[v]):(w=h.visibledatarow[y-1],x=h.visibledatarow[v]-h.visibledatarow[y-1]);let C,S;b-1<0?(C=0,S=h.visibledatacolumn[k]):(C=h.visibledatacolumn[b-1],S=h.visibledatacolumn[k]-h.visibledatacolumn[b-1]);let _=$("<canvas>").attr({width:Math.ceil(S*h.devicePixelRatio),height:Math.ceil(x*h.devicePixelRatio)}).css({width:S,height:x});nr(C,w,S,x,1,1,null,null,_);let T=_.get(0).getContext("2d");T.beginPath(),T.moveTo(0,0),T.lineTo(0,h.devicePixelRatio*x),T.lineWidth=h.devicePixelRatio*2,T.strokeStyle=Sl.strokeStyle,T.stroke(),T.closePath(),T.beginPath(),T.moveTo(0,0),T.lineTo(h.devicePixelRatio*S,0),T.lineWidth=h.devicePixelRatio*2,T.strokeStyle=Sl.strokeStyle,T.stroke(),T.closePath();let A=new Image,R=_.get(0).toDataURL("image/png");A.src=R,S>x?A.style.width="100%":A.style.height="100%";let I=$(window).height()-200;U.screenshot(g.screenshotTipSuccess,'<div id="luckysheet-confirm-screenshot-save" style="height:'+I+'px;overflow:auto;"></div>',R),$("#luckysheet-confirm-screenshot-save").append(A),_.remove()}),$(document).on("click.luckysheetEvent","a.download",function(){let g=$("#luckysheet-confirm-screenshot-save img").attr("src"),y=t.screenshot,v=atob(g.split(",")[1]),b=v.length,k=new Uint8Array(b);for(let S=0;S<b;S++)k[S]=v.charCodeAt(S);let w=new Blob([k]),x=document.createElement("a");x.setAttribute("href",URL.createObjectURL(w)),x.setAttribute("download",y.screenshotImageName+".png"),x.style.display="none",document.body.appendChild(x),x.click();let C;x.addEventListener("click",C=function(){requestAnimationFrame(function(){URL.revokeObjectURL(x.href)}),x.removeAttribute("href"),x.removeEventListener("click",C)}),document.body.removeChild(x)}),$("#luckysheet-splitColumn-btn-title").click(function(){if(!jr(h.currentSheetIndex)||h.luckysheet_select_save==null||h.luckysheet_select_save.length==0)return;let g=t.splitText;if(h.luckysheet_select_save.length>1){U.info(g.tipNoMulti,"");return}if(h.luckysheet_select_save[0].column[0]!=h.luckysheet_select_save[0].column[1]){U.info(g.tipNoMultiColumn,"");return}Jc.createDialog(),Jc.init()}),$("#luckysheet-insertImg-btn-title").click(function(){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}!$t(h.currentSheetIndex,"editObjects")||$("#luckysheet-imgUpload").click()}),$("#luckysheetInsertImage").click(function(){!$t(h.currentSheetIndex,"editObjects")||($("#luckysheet-imgUpload").click(),$("#luckysheet-rightclick-menu").hide())}),$("#luckysheet-imgUpload").click(function(g){g.stopPropagation()}),$("#luckysheet-imgUpload").on("change",function(g){if(!$t(h.currentSheetIndex,"editObjects",!1))return;let y=g.currentTarget.files[0];Re.insertImg(y)}),$("#luckysheet-insertLink-btn-title").click(function(){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}!jr(h.currentSheetIndex)||h.luckysheet_select_save==null||h.luckysheet_select_save.length==0||(Cl.createDialog(),Cl.init())}),$("#luckysheetInsertLink").click(function(){$("#luckysheet-insertLink-btn-title").click(),$("#luckysheet-rightclick-menu").hide()}),$("#luckysheet-dataVerification-btn-title").click(function(){!jr(h.currentSheetIndex)||h.luckysheet_select_save==null||h.luckysheet_select_save.length==0||(Ye.createDialog(),Ye.init())}),$("#luckysheetDataVerification").click(function(){$("#luckysheet-dataVerification-btn-title").click(),$("#luckysheet-rightclick-menu").hide()}),$("#luckysheetCellFormatRightClickMenu").click(function(){dm()}),$("#luckysheet-freezen-btn-horizontal").click(function(){$.trim($(this).text())==Q().freezen.freezenCancel?(Y.saveFrozen("freezenCancel"),Y.freezenverticaldata!=null&&(Y.cancelFreezenVertical(),Y.createAssistCanvas(),Be()),Y.freezenhorizontaldata!=null&&(Y.cancelFreezenHorizontal(),Y.createAssistCanvas(),Be()),Y.scrollAdapt(),$("#luckysheet-icon-freezen-menu-menuButton").find(".fa.fa-check").remove()):(Y.saveFrozen("freezenRow"),Y.freezenverticaldata!=null&&(Y.cancelFreezenVertical(),Y.createAssistCanvas(),Be()),Y.freezenhorizontaldata==null&&(Y.createFreezenHorizontal(),Y.createAssistCanvas()))}),$("#luckysheet-freezen-btn-vertical").click(function(){Y.freezenverticaldata!=null?(Y.saveFrozen("freezenCancel"),Y.cancelFreezenVertical(),Be()):(Y.saveFrozen("freezenColumn"),Y.createFreezenVertical()),Y.createAssistCanvas()}),$("#luckysheet-rightclick-menu input").on("keydown",function(g){g.stopPropagation()}),$("#luckysheet-modal-dialog-mask").on("click dbclick mousedown mousemove mouseup",function(g){g.stopPropagation(),g.preventDefault()});let f=function(){(document.hidden||document.webkitHidden||document.msHidden)&&(h.iscopyself=!1)};$(document).on("visibilitychange.luckysheetEvent webkitvisibilitychange.luckysheetEvent msvisibilitychange.luckysheetEvent",f).on("mouseleave.luckysheetEvent",function(){h.iscopyself=!1}).on("mousedown.luckysheetEvent",function(g){He.removeActivePs(),Cr(g),$(g.target).closest("#luckysheet-wa-editor").length>0&&parseInt($("#luckysheet-input-box").css("top"))>0&&(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",0,"rangeOfSelect"))}),$("#luckysheet-left-top").click(function(g){!Di(h.currentSheetIndex)||($("#luckysheet-wa-functionbox-confirm").click(),h.luckysheet_select_status=!1,h.luckysheet_select_save=[{row:[0,h.flowdata.length-1],column:[0,h.flowdata[0].length-1],row_focus:0,column_focus:0,row_select:!0,column_select:!0}],lt(),clearTimeout(h.countfuncTimeout),h.countfuncTimeout=setTimeout(function(){wl()},500),ne.saveParam("mv",h.currentSheetIndex,h.luckysheet_select_save),g.stopPropagation())}),$("#luckysheet-icon-undo").click(function(g){$(this).hasClass("disabled")||Tn.redo(g)}),$("#luckysheet-icon-redo").click(function(g){$(this).hasClass("disabled")||Tn.undo(g)}),$(document).on("mousedown.luckysheetEvent","div.luckysheet-modal-dialog",function(g){if(!$(g.target).is(".luckysheet-modal-dialog"))return;h.luckysheet_model_move_state=!0,h.luckysheet_model_move_obj=$(g.currentTarget);let y=h.luckysheet_model_move_obj.offset();h.luckysheet_model_xy=[g.pageX-y.left,g.pageY-y.top]}),$(document).on("click.luckysheetEvent",".luckysheet-modal-dialog-title-close, .luckysheet-model-close-btn",function(g){($("#textcolorselect").is(":visible")||$("#cellcolorselect").is(":visible"))&&$("#luckysheet-conditionformat-dialog").show(),$(g.currentTarget).parents(".luckysheet-modal-dialog").hide(),$("#luckysheet-modal-dialog-mask").hide(),$(this).parents(".luckysheet-modal-dialog").hasClass("luckysheet-search-formula")&&(p.dontupdate(),jt("down",0,"rangeOfSelect")),$(this).parents(".luckysheet-modal-dialog").hasClass("luckysheet-search-formula-parm")&&(p.dontupdate(),jt("down",0,"rangeOfSelect")),$(this).parents(".luckysheet-modal-dialog").hasClass("luckysheet-search-formula-parm-select")&&(p.dontupdate(),jt("down",0,"rangeOfSelect")),rt()}),$("#luckysheet_info_detail_title").click(function(){window.open(de.myFolderUrl,"_self")}),$("#luckysheet-chart-rangeShow").on("mousedown.chartRangeShowMove",".luckysheet-chart-rangeShow-move",function(g){h.chart_selection.rangeMove=!0,h.luckysheet_scroll_status=!0,h.chart_selection.rangeMoveObj=$(this).parent();let y=h.currentChart,v=$(this).parent().attr("id");if(v=="luckysheet-chart-rangeShow-content"){let _=y.rangeArray[0].row[0]+y.rangeSplitArray.content.row[0],T=y.rangeArray[0].column[0]+y.rangeSplitArray.content.column[0];h.chart_selection.rangeMoveIndex=[_,T]}else if(v=="luckysheet-chart-rangeShow-rowtitle"){let _=y.rangeArray[0].row[0]+y.rangeSplitArray.rowtitle.row[0],T=y.rangeArray[0].column[0]+y.rangeSplitArray.rowtitle.column[0];h.chart_selection.rangeMoveIndex=[_,T]}else if(v=="luckysheet-chart-rangeShow-coltitle"){let _=y.rangeArray[0].row[0]+y.rangeSplitArray.coltitle.row[0],T=y.rangeArray[0].column[0]+y.rangeSplitArray.coltitle.column[0];h.chart_selection.rangeMoveIndex=[_,T]}let b=nt(g.pageX,g.pageY),k=b[0]+$("#luckysheet-cell-main").scrollLeft(),w=b[1]+$("#luckysheet-cell-main").scrollTop(),x=$(this).data("type");x=="top"?w+=3:x=="right"?k-=3:x=="bottom"?w-=3:x=="left"&&(k+=3);let C=_t(w)[2],S=wt(k)[2];h.chart_selection.rangeMovexy=[C,S],g.stopPropagation()}),$("#luckysheet-chart-rangeShow").on("mousedown.chartRangeShowResize",".luckysheet-chart-rangeShow-resize",function(g){h.chart_selection.rangeResize=$(this).data("type"),h.luckysheet_scroll_status=!0,h.chart_selection.rangeResizeObj=$(this).parent();let y=h.currentChart,v,b,k,w,x=$(this).parent().attr("id");if(x=="luckysheet-chart-rangeShow-content")y.rangeRowCheck.exits?(v=y.rangeArray[0].row[0]+y.rangeSplitArray.content.row[0],b=y.rangeArray[0].row[0]+y.rangeSplitArray.content.row[1]):(v=y.rangeSplitArray.content.row[0],b=y.rangeSplitArray.content.row[0]),y.rangeColCheck.exits?(k=y.rangeArray[0].column[0]+y.rangeSplitArray.content.column[0],w=y.rangeArray[0].column[0]+y.rangeSplitArray.content.column[1]):(k=y.rangeSplitArray.content.column[0],w=y.rangeSplitArray.content.column[1]),h.chart_selection.rangeResizeIndex={row:[v,b],column:[k,w]};else if(x=="luckysheet-chart-rangeShow-rowtitle"){let R=y.rangeArray[0].row[0]+y.rangeSplitArray.rowtitle.row[0],I=y.rangeArray[0].row[0]+y.rangeSplitArray.rowtitle.row[1],F=y.rangeArray[0].column[0]+y.rangeSplitArray.rowtitle.column[0],z=y.rangeArray[0].column[0]+y.rangeSplitArray.rowtitle.column[1];h.chart_selection.rangeResizeIndex={row:[R,I],column:[F,z]}}else if(x=="luckysheet-chart-rangeShow-coltitle"){let R=y.rangeArray[0].row[0]+y.rangeSplitArray.coltitle.row[0],I=y.rangeArray[0].row[0]+y.rangeSplitArray.coltitle.row[1],F=y.rangeArray[0].column[0]+y.rangeSplitArray.coltitle.column[0],z=y.rangeArray[0].column[0]+y.rangeSplitArray.coltitle.column[1];h.chart_selection.rangeResizeIndex={row:[R,I],column:[F,z]}}let C=nt(g.pageX,g.pageY),S=C[0]+$("#luckysheet-cell-main").scrollLeft(),_=C[1]+$("#luckysheet-cell-main").scrollTop();h.chart_selection.rangeResize=="lt"?(S+=3,_+=3):h.chart_selection.rangeResize=="lb"?(S+=3,_-=3):h.chart_selection.rangeResize=="rt"?(S-=3,_+=3):h.chart_selection.rangeResize=="rb"&&(S-=3,_-=3);let T=_t(_)[2],A=wt(S)[2];h.chart_selection.rangeResizexy=[T,A],g.stopPropagation()}),$("#luckysheet-wa-calculate-size").mousedown(function(g){let y=g.pageY;p.functionResizeData.y=y,p.functionResizeStatus=!0,p.functionResizeData.calculatebarHeight=h.calculatebarHeight,p.rangetosheet!=null&&p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1])}),ke.initialMenuButton();let d=document.getElementById("testdpidiv").offsetWidth*h.devicePixelRatio,m=document.getElementById("testdpidiv").offsetHeight*h.devicePixelRatio;$(document).on("paste.luckysheetEvent",function(g){if(!fe()){if(Ct.isPasteAction){$("#luckysheet-rich-text-editor").blur(),Ct.isPasteAction=!1;let y=window.clipboardData;y||(y=g.originalEvent.clipboardData);let v=y.getData("text/html")||y.getData("text/plain"),b=!0;if(v.indexOf("luckysheet_copy_action_table")>-1&&h.luckysheet_copy_save.copyRange!=null&&h.luckysheet_copy_save.copyRange.length>0){let w=[],x=new RegExp("<tr.*?>(.*?)</tr>","gs"),C=new RegExp("<td.*?>(.*?)</td>","gs"),S=v.match(x)||[];for(let z=0;z<S.length;z++){let M=[],E=S[z].match(C);if(E!=null)for(let N=0;N<E.length;N++){let L=E[N].replace(/<td.*?>/gs,"").replace(/<\/td>/gs,"");M.push(L)}w.push(M)}let _=h.luckysheet_copy_save.copyRange[0].row[0],T=h.luckysheet_copy_save.copyRange[0].row[1],A=h.luckysheet_copy_save.copyRange[0].column[0],R=h.luckysheet_copy_save.copyRange[0].column[1],I=h.luckysheet_copy_save.dataSheetIndex,F;I==h.currentSheetIndex?F=xe.deepCopyFlowData(h.flowdata):F=h.luckysheetfile[Z(I)].data;for(let z=_;z<=T&&!(z-_>w.length-1);z++)for(let M=A;M<=R;M++){let E=F[z][M],N=!1;if(E!=null&&E.mc!=null&&E.mc.rs==null)continue;let L;if(E!=null?E.ct!=null&&E.ct.fa.indexOf("w")>-1?L=F[z][M].v:L=F[z][M].m:L="",L==null&&F[z][M]&&F[z][M].ct&&F[z][M].ct.t=="inlineStr"&&(L=F[z][M].ct.s.map(O=>O.v).join(""),N=!0),L==null&&(L=""),N){let O=$(w[z-_][M-A]).text().replace(/\s|\n/g," "),V=L.replace(/\n/g,"").replace(/\s/g," ");if(O!=V){b=!1;break}}else if(w[z-_][M-A]!=L){b=!1;break}}}let k=Q().fontjson;if(!Je.createHookFunction("rangePasteBefore",h.luckysheet_select_save,v))return;if(v.indexOf("luckysheet_copy_action_table")>-1&&h.luckysheet_copy_save.copyRange!=null&&h.luckysheet_copy_save.copyRange.length>0&&b)h.luckysheet_paste_iscut?(h.luckysheet_paste_iscut=!1,Ct.pasteHandlerOfCutPaste(h.luckysheet_copy_save),Ct.clearcopy(g)):Ct.pasteHandlerOfCopyPaste(h.luckysheet_copy_save);else if(v.indexOf("luckysheet_copy_action_image")>-1)Re.pasteImgItem();else{let w;try{w=$("#luckysheet-copy-content").html(v)}catch(x){}if(w&&(w.find("table").length!==0||w.children("span[data-sheets-value]").length===1)){if(w.find("table").length===0){let A=w.children("span[data-sheets-value]")[0].outerHTML.replace(/^<span/,"<td").replace(/<\/span>$/,"</td>");w.html("<table><tbody><tr>"+A+"</tr></tbody></table>")}let x=new Array(w.find("table tr").length),C=0,S="th, td";w.find("table tr").eq(0).find(S).each(function(){let A=parseInt($(this).attr("colspan"));isNaN(A)&&(A=1),C+=A});for(let A=0;A<x.length;A++)x[A]=new Array(C);let _=0,T={};w.find("table tr").each(function(){let A=$(this),R=0;A.find(S).each(function(){let I=$(this),F={},z=I.attr("data-sheets-formula"),M=I.text();if(z&&z.startsWith("=")){let oe=h.luckysheet_select_save[0],se=oe.row[0]+_,ce=oe.column[0]+R,he=z.replace(/([^a-zA-Z0-9])R(\[?)(-?[0-9]+)\]?C(\[?)(-?[0-9]+)\]?/g,function(K,G,ee,pe,ae,Te){return[G,ae?tt(ce+ +Te):`$${tt(+Te-1)}`,ee?se+ +pe+1:`$${pe}`].join("")}).replace(/\bTRUE\b/g,"true").replace(/\bFALSE\b/g,"false"),ue=p.execfunction(he,se,ce);F.f=ue[2],F.v=ue[1],F.ct=at(M)[1],F.ct&&F.ct.fa&&(F.m=mt(F.ct.fa,F.v))}else if(M.trim().length===0)F.v=null,F.m="";else{let oe=at(M);F.v=oe[2],F.ct=oe[1],F.m=oe[0]}let E=I.css("background-color");E=="rgba(0, 0, 0, 0)"&&(E=null),F.bg=E;let N=I.css("font-weight");N==400||N=="normal"?F.bl=0:F.bl=1,I.css("text-decoration").indexOf("underline")!=-1&&(F.un=1),I.css("font-style")=="normal"?F.it=0:F.it=1;let q=I.css("font-family").split(",");for(let oe=0;oe<q.length;oe++){let se=$.trim(q[oe].toLowerCase());if(se=k[se],se==null)F.ff=0;else{F.ff=se;break}}let W=Math.round(parseInt(I.css("font-size"))*72/96);F.fs=W;let X=I.css("color");F.fc=X;let te=I.css("text-align");te=="center"?F.ht=0:te=="right"?F.ht=2:F.ht=1;let le=I.css("vertical-align");for(le=="middle"?F.vt=0:le=="top"||le=="text-top"?F.vt=1:F.vt=2;R<C&&x[_][R]!=null;)R++;if(R==C)return!0;if(x[_][R]==null){x[_][R]=F;let oe=parseInt(I.attr("rowspan")),se=parseInt(I.attr("colspan"));isNaN(oe)&&(oe=1),isNaN(se)&&(se=1);let ce=h.luckysheet_select_save[0].row[0]+_,he=h.luckysheet_select_save[0].column[0]+R;for(let ue=0;ue<oe;ue++)for(let K=0;K<se;K++){if(ue==0){let G=I.css("border-top");if(G!=null&&G.length>0&&G.substr(0,3).toLowerCase()!="0px"){let ee=I.css("border-top-width"),pe=I.css("border-top-style"),ae=I.css("border-top-color"),Te=ke.getQKBorder(ee,pe,ae);T[_+ue+"_"+(R+K)]==null&&(T[_+ue+"_"+(R+K)]={}),T[_+ue+"_"+(R+K)].t={style:Te[0],color:Te[1]}}}if(ue==oe-1){let G=I.css("border-bottom");if(G!=null&&G.length>0&&G.substr(0,3).toLowerCase()!="0px"){let ee=I.css("border-bottom-width"),pe=I.css("border-bottom-style"),ae=I.css("border-bottom-color"),Te=ke.getQKBorder(ee,pe,ae);T[_+ue+"_"+(R+K)]==null&&(T[_+ue+"_"+(R+K)]={}),T[_+ue+"_"+(R+K)].b={style:Te[0],color:Te[1]}}}if(K==0){let G=I.css("border-left");if(G!=null&&G.length>0&&G.substr(0,3).toLowerCase()!="0px"){let ee=I.css("border-left-width"),pe=I.css("border-left-style"),ae=I.css("border-left-color"),Te=ke.getQKBorder(ee,pe,ae);T[_+ue+"_"+(R+K)]==null&&(T[_+ue+"_"+(R+K)]={}),T[_+ue+"_"+(R+K)].l={style:Te[0],color:Te[1]}}}if(K==se-1){let G=I.css("border-right");if(G!=null&&G.length>0&&G.substr(0,3).toLowerCase()!="0px"){let ee=I.css("border-right-width"),pe=I.css("border-right-style"),ae=I.css("border-right-color"),Te=ke.getQKBorder(ee,pe,ae);T[_+ue+"_"+(R+K)]==null&&(T[_+ue+"_"+(R+K)]={}),T[_+ue+"_"+(R+K)].r={style:Te[0],color:Te[1]}}}ue==0&&K==0||(x[_+ue][R+K]={mc:{r:ce,c:he}})}if(oe>1||se>1){let ue={rs:oe,cs:se,r:ce,c:he};x[_][R].mc=ue}}if(R++,R==C)return!0}),_++}),h.luckysheet_selection_range=[],Ct.pasteHandler(x,T)}else if(y.files.length==1&&y.files[0].type.indexOf("image")>-1){Re.insertImg(y.files[0]);return}else v=y.getData("text/plain"),Ct.pasteHandler(v);$("#luckysheet-copy-content").empty()}}else if($(g.target).closest("#luckysheet-rich-text-editor").length>0){g.preventDefault();let y=window.clipboardData;y||(y=g.originalEvent.clipboardData);let v=y.getData("text/plain");document.execCommand("insertText",!1,v)}}}),de.enablePage&&$("#luckysheet-bottom-page-next").click(function(){let g=de.pageInfo.queryExps,y=de.pageInfo.reportId,v=de.pageInfo.fields,b=de.pageInfo.mobile,k=de.pageInfo.frezon,w=de.pageInfo.currentPage,x=de.pageInfo.totalPage,C=de.pageInfo.pageUrl;Je.addDataAjax({queryExps:g,reportId:y,fields:v,mobile:b,frezon:k,pageIndex:w,currentPage:w},h.currentSheetIndex,C,function(){if(de.pageInfo.currentPage++,de.pageInfo.totalPage==de.pageInfo.currentPage){$("#luckysheet-bottom-page-next").hide();let S=_e(a.pageInfoFull,{total:de.total,totalPage:de.pageInfo.totalPage});$("#luckysheet-bottom-page-info").html(S)}else{let S=_e(a.pageInfo,{total:de.total,totalPage:de.pageInfo.totalPage,currentPage:de.pageInfo.currentPage});$("#luckysheet-bottom-page-info").html(S)}})}).mousedown(function(g){g.stopPropagation()}),$("#luckysheet-bottom-bottom-top").click(function(){$("#luckysheet-scrollbar-y").scrollTop(0)}).mousedown(function(g){g.stopPropagation()}),$("#luckysheet-wa-editor,#luckysheet-icon-morebtn-div,.luckysheet-toolbar-button").click(function(g){this.id!="luckysheet-icon-paintformat"&&ke.luckysheetPaintModelOn&&ke.cancelPaintModel()})}function Cb(){let e=We(".luckysheet-multipleRange-show");e.length===void 0&&(e=[e]),e.forEach(n=>{let t=n.id.replace("luckysheet-multipleRange-show-","");h.cooperativeEdit.usernameTimeout["user"+t]===null&&(We(".username",n).style.display="none")})}var gm=Ie(()=>{cm();xl();Vl();on();Xs();Ur();qr();Ua();yr();il();gr();Oa();Wc();dl();Qt();ba();Lr();pr();za();Zt();Wa();Mo();um();pn();Gt();Ml();mm();ft();Nt();Ol();mr();Ft();Pa();xa();Ut();fa();pm();Yt();Kt();ll();Jt();Al();Ll();Va();Co();bt();Xe();$o()});function ym(){let e=Q().drag;$("#luckysheet-copy-json-head").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let o=!1;for(let s=0;s<h.luckysheet_select_save.length;s++){let u=h.luckysheet_select_save[s].row[0],f=h.luckysheet_select_save[s].row[1],d=h.luckysheet_select_save[s].column[0],m=h.luckysheet_select_save[s].column[1];if(o=Mt(h.config,u,f,d,m),o)break}if(o){fe()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length!=0){if(l.length==1){let o={};for(let s=0;s<l[0].length;s++)o[ze(0,s,l)]="";a.push(o)}else for(let o=1;o<l.length;o++){let s={};for(let u=0;u<l[0].length;u++)ze(0,u,l)==null?s[""]=ze(o,u,l):s[ze(0,u,l)]=ze(o,u,l);a.push(s)}Ct.copybyformat(t,JSON.stringify(a))}}),$("#luckysheet-copy-json-nohead").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let s=!1;for(let u=0;u<h.luckysheet_select_save.length;u++){let f=h.luckysheet_select_save[u].row[0],d=h.luckysheet_select_save[u].row[1],m=h.luckysheet_select_save[u].column[0],g=h.luckysheet_select_save[u].column[1];if(s=Mt(h.config,f,d,m,g),s)break}if(s){fe()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length==0)return;let o=h.luckysheet_select_save[0].column[0];for(let s=0;s<l.length;s++){let u={};for(let f=0;f<l[0].length;f++)u[tt(f+o)]=ze(s,f,l);a.push(u)}Ct.copybyformat(t,JSON.stringify(a))}),$("#luckysheet-copy-array1").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let o=!1;for(let s=0;s<h.luckysheet_select_save.length;s++){let u=h.luckysheet_select_save[s].row[0],f=h.luckysheet_select_save[s].row[1],d=h.luckysheet_select_save[s].column[0],m=h.luckysheet_select_save[s].column[1];if(o=Mt(h.config,u,f,d,m),o)break}if(o){fe()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length!=0){for(let o=0;o<l.length;o++)for(let s=0;s<l[0].length;s++)a.push(ze(o,s,l));Ct.copybyformat(t,JSON.stringify(a))}}),$("#luckysheet-copy-array2").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let o=!1;for(let s=0;s<h.luckysheet_select_save.length;s++){let u=h.luckysheet_select_save[s].row[0],f=h.luckysheet_select_save[s].row[1],d=h.luckysheet_select_save[s].column[0],m=h.luckysheet_select_save[s].column[1];if(o=Mt(h.config,u,f,d,m),o)break}if(o){fe()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length!=0){for(let o=0;o<l.length;o++){let s=[];for(let u=0;u<l[0].length;u++)s.push(ze(o,u,l));a.push(s)}Ct.copybyformat(t,JSON.stringify(a))}}),$("#luckysheet-copy-arraymore-confirm").click(function(t){if(t.target.nodeName==="INPUT")return;if($("body .luckysheet-cols-menu").hide(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let m=!1;for(let g=0;g<h.luckysheet_select_save.length;g++){let y=h.luckysheet_select_save[g].row[0],v=h.luckysheet_select_save[g].row[1],b=h.luckysheet_select_save[g].column[0],k=h.luckysheet_select_save[g].column[1];if(m=Mt(h.config,y,v,b,k),m)break}if(m){fe()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length==0)return;for(let m=0;m<l.length;m++)for(let g=0;g<l[0].length;g++)a.push(l[m][g]);let o=$("#luckysheet-copy-arraymore-row").val(),s=$("#luckysheet-copy-arraymore-col").val();if(o==""&&s==""){Ct.copybyformat(t,JSON.stringify(a)),$("body .luckysheet-cols-menu").hide();return}if(o==""?o=1:(o=parseInt(o),o==null&&(o=1)),s==""?s=1:(s=parseInt(s),s==null&&(s=1)),o.toString()=="NaN"||s.toString()=="NaN"){fe()?alert(e.inputCorrect):U.info(e.inputCorrect,"");return}if(o<1||s<1){fe()?alert(e.notLessOne):U.info(e.notLessOne,"");return}let u=a.length,f=0,d=[];for(let m=0;m<o;m++){let g=[];for(let y=0;y<s;y++)if(g.push(a[f++]),f>=u){Ct.copybyformat(t,JSON.stringify(d)),$("body .luckysheet-cols-menu").hide();return}d.push(g)}Ct.copybyformat(t,JSON.stringify(d))}),$("#luckysheet-copy-diagonal").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let s=!1;for(let u=0;u<h.luckysheet_select_save.length;u++){let f=h.luckysheet_select_save[u].row[0],d=h.luckysheet_select_save[u].row[1],m=h.luckysheet_select_save[u].column[0],g=h.luckysheet_select_save[u].column[1];if(s=Mt(h.config,f,d,m,g),s)break}if(s){fe()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length==0)return;let o=l[0].length;for(let s=0;s<l.length&&!(s>=o);s++)a.push(l[s][s]);Ct.copybyformat(t,JSON.stringify(a))}),$("#luckysheet-copy-antidiagonal").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let s=!1;for(let u=0;u<h.luckysheet_select_save.length;u++){let f=h.luckysheet_select_save[u].row[0],d=h.luckysheet_select_save[u].row[1],m=h.luckysheet_select_save[u].column[0],g=h.luckysheet_select_save[u].column[1];if(s=Mt(h.config,f,d,m,g),s)break}if(s){fe()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length==0)return;let o=l[0].length;for(let s=0;s<l.length&&!(s>=o);s++)a.push(l[s][o-s-1]);Ct.copybyformat(t,JSON.stringify(a))}),$("#luckysheet-copy-diagonaloffset").click(function(t){if(t.target.nodeName==="INPUT")return;if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let u=!1;for(let f=0;f<h.luckysheet_select_save.length;f++){let d=h.luckysheet_select_save[f].row[0],m=h.luckysheet_select_save[f].row[1],g=h.luckysheet_select_save[f].column[0],y=h.luckysheet_select_save[f].column[1];if(u=Mt(h.config,d,m,g,y),u)break}if(u){fe()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length==0)return;let o=l[0].length,s=parseInt($("#luckysheet-copy-diagonaloffset-value").val());if(s.toString()=="NaN"){fe()?alert(e.inputCorrect):U.info(e.inputCorrect,"");return}if(s<0){fe()?alert(e.offsetColumnLessZero):U.info(e.offsetColumnLessZero,"");return}s==null&&(s=1);for(let u=0;u<l.length&&!(u+s>=o);u++)a.push(l[u][u+s]);Ct.copybyformat(t,JSON.stringify(a))}),$("#luckysheet-copy-boolvalue").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}if(h.config.merge!=null){let o=!1;for(let s=0;s<h.luckysheet_select_save.length;s++){let u=h.luckysheet_select_save[s].row[0],f=h.luckysheet_select_save[s].row[1],d=h.luckysheet_select_save[s].column[0],m=h.luckysheet_select_save[s].column[1];if(o=Mt(h.config,u,f,d,m),o)break}if(o){fe()?alert(e.noPartMerge):U.info(e.noPartMerge,"");return}}let l=Pt(h.luckysheet_select_save[0]),a=[];if(l.length!=0){for(let o=0;o<l.length;o++){let s=[];for(let u=0;u<l[0].length;u++){let f=!1,d;P(l[o][u])=="object"?d=l[o][u].v:d=l[o][u],d==null||d==""?f=!1:(d=parseInt(d),d==null||d>0?f=!0:f=!1),s.push(f)}a.push(s)}Ct.copybyformat(t,JSON.stringify(a))}}),$("#luckysheet-matrix-turn-up").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[];for(let o=l.length-1;o>=0;o--){let s=[];for(let u=0;u<l[0].length;u++){let f="";l[o]!=null&&l[o][u]!=null&&(f=l[o][u]),s.push(f)}a.push(s)}xe.controlHandler(a)}),$("#luckysheet-matrix-turn-left").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[];for(let o=0;o<l.length;o++){let s=[];for(let u=l[0].length-1;u>=0;u--){let f="";l[o]!=null&&l[o][u]!=null&&(f=l[o][u]),s.push(f)}a.push(s)}xe.controlHandler(a)}),$("#luckysheet-matrix-turn-cw").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[];for(let o=0;o<l[0].length;o++){let s=[];for(let u=l.length-1;u>=0;u--){let f="";l[u]!=null&&l[u][o]!=null&&(f=l[u][o]),s.push(f)}a.push(s)}xe.controlHandlerD(a)}),$("#luckysheet-matrix-turn-anticw").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[];for(let o=l[0].length-1;o>=0;o--){let s=[];for(let u=0;u<l.length;u++){let f="";l[u]!=null&&l[u][o]!=null&&(f=l[u][o]),s.push(f)}a.push(s)}xe.controlHandlerD(a)}),$("#luckysheet-matrix-turn-trans").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[];for(let o=0;o<l[0].length;o++){let s=[];for(let u=0;u<l.length;u++){let f="";l[u]!=null&&l[u][o]!=null&&(f=l[u][o]),s.push(f)}a.push(s)}xe.controlHandlerD(a)});let n=function(t,l){if(t==0)return 0;let a,o;for(a=t,o=(l-1)*a/l+t/(Math.pow(a,l-1)*l);Math.abs(o-a)>1e-6;)a=o,o=(l-1)*a/l+t/(Math.pow(a,l-1)*l);return o};$("#luckysheet-matrix-cal-confirm").click(function(t){if(t.target.nodeName==="INPUT"||t.target.nodeName==="SELECT")return;if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=$("#luckysheet-matrix-cal-type").val(),o=parseInt($("#luckysheet-matrix-cal-value").val());if(o.toString()=="NaN"){fe()?alert(e.inputCorrect):U.info(e.inputCorrect,"");return}o==null&&(o=2);let s=[];for(let u=0;u<l.length;u++){let f=[];for(let d=0;d<l[0].length;d++){let m="";l[u]!=null&&l[u][d]!=null&&(m=l[u][d],parseInt(m)!=null&&l[u][d].ct!=null&&l[u][d].ct.t=="n"&&(a=="minus"?m.v=m.v-o:a=="multiply"?m.v=m.v*o:a=="divided"?m.v=Il(m.v/o,4):a=="power"?m.v=Math.pow(m.v,o):a=="root"?o==2?m.v=Il(Math.sqrt(m.v),4):o==3&&Math.cbrt?m.v=Il(Math.cbrt(m.v),4):m.v=Il(n(m.v,o),4):a=="log"?m.v=Il(Math.log(m.v)*1e4/Math.log(Math.abs(o)),4):m.v=m.v+o,m.v==null?m.m="":m.m=m.v.toString())),f.push(m)}s.push(f)}xe.controlHandler(s)}),$("#luckysheet-matrix-delezero-row").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[],o=l[0].length;for(let s=0;s<l.length;s++){let u=[],f=!0,d=!0;for(let g=0;g<o;g++){let y="";if(l[s]!=null&&l[s][g]!=null){if(y=l[s][g],(y.v=="0"||y.v==0)&&f)continue;f=!1}u.push(y)}let m=[];if(u.length==o)m=u;else{for(let y=u.length-1;y>=0;y--){let v="";if(u[y]!=null){if(v=u[y],(v.v=="0"||v.v==0)&&d)continue;d=!1}m.unshift(v)}let g=o-m.length;for(let y=0;y<g;y++)m.push("")}a.push(m)}xe.controlHandler(a)}),$("#luckysheet-matrix-delezero-column").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[],o=l.length,s=l[0].length;for(let f=0;f<s;f++){let d=[],m=!0,g=!0;for(let v=0;v<o;v++){let b="";if(l[v]!=null&&l[v][f]!=null){if(b=l[v][f],(b.v=="0"||b.v==0)&&m)continue;m=!1}d.push(b)}let y=[];if(d.length==o)y=d;else{for(let b=d.length-1;b>=0;b--){let k="";if(d[b]!=null){if(k=d[b],(k.v=="0"||k.v==0)&&g)continue;g=!1}y.unshift(k)}let v=o-y.length;for(let b=0;b<v;b++)y.push("")}a.push(y)}let u=[];for(let f=0;f<a[0].length;f++){let d=[];for(let m=0;m<a.length;m++){let g="";a[m]!=null&&a[m][f]!=null&&(g=a[m][f]),d.push(g)}u.push(d)}xe.controlHandler(u)}),$("#luckysheet-matrix-delerpt-row").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[],o=l[0].length;for(let s=0;s<l.length;s++){let u=[],f={};for(let m=0;m<o;m++){let g=null;l[s]!=null&&l[s][m]!=null&&(g=l[s][m],g.v in f||(f[g.v]=[]),f[g.v].push(g))}for(let m=0;m<o;m++){let g=null;l[s]!=null&&l[s][m]!=null&&(g=l[s][m],f[g.v].length==1&&u.push(g))}let d=o-u.length;for(let m=0;m<d;m++)u.push(null);a.push(u)}xe.controlHandler(a)}),$("#luckysheet-matrix-delerpt-column").click(function(t){if($("body .luckysheet-cols-menu").hide(),rt(),h.luckysheet_select_save.length>1){fe()?alert(e.noMulti):U.info(e.noMulti,"");return}let l=Pt(h.luckysheet_select_save[0]);if(l.length==0)return;let a=[],o=l.length,s=l[0].length;for(let f=0;f<s;f++){let d=[],m={};for(let y=0;y<o;y++){let v=null;l[y]!=null&&l[y][f]!=null&&(v=l[y][f],v.v in m||(m[v.v]=[]),m[v.v].push(v))}for(let y=0;y<o;y++){let v=null;l[y]!=null&&l[y][f]!=null&&(v=l[y][f],m[v.v].length==1&&d.push(v))}a1=d;let g=o-a1.length;for(let y=0;y<g;y++)a1.push(null);a.push(a1)}let u=[];for(let f=0;f<a[0].length;f++){let d=[];for(let m=0;m<a.length;m++){let g=null;a[m]!=null&&a[m][f]!=null&&(g=a[m][f]),d.push(g)}u.push(d)}xe.controlHandler(u)})}var vm=Ie(()=>{Wa();ft();Ft();Kt();ll();Jt();bt();Xe()});function wm(){if(!eu){eu=!0;let t=Q(),l=t.toolbar;$("#luckysheetsheetconfigcolorur").spectrum({showPalette:!0,preferredFormat:"hex",clickoutFiresChange:!1,showInitial:!0,showInput:!0,flat:!0,hideAfterPaletteSelect:!1,showSelectionPalette:!0,maxPaletteSize:10,cancelText:t.sheetconfig.cancelText,chooseText:t.sheetconfig.chooseText,togglePaletteMoreText:l.toolMore,togglePaletteLessText:l.toolLess,clearText:l.clearText,noColorSelectedText:l.noColorSelectedText,palette:[["rgb(0, 0, 0)","rgb(67, 67, 67)","rgb(102, 102, 102)","rgb(204, 204, 204)","rgb(217, 217, 217)","rgb(255, 255, 255)"],["rgb(152, 0, 0)","rgb(255, 0, 0)","rgb(255, 153, 0)","rgb(255, 255, 0)","rgb(0, 255, 0)","rgb(0, 255, 255)","rgb(74, 134, 232)","rgb(0, 0, 255)","rgb(153, 0, 255)","rgb(255, 0, 255)"],["rgb(230, 184, 175)","rgb(244, 204, 204)","rgb(252, 229, 205)","rgb(255, 242, 204)","rgb(217, 234, 211)","rgb(208, 224, 227)","rgb(201, 218, 248)","rgb(207, 226, 243)","rgb(217, 210, 233)","rgb(234, 209, 220)"],["rgb(221, 126, 107)","rgb(234, 153, 153)","rgb(249, 203, 156)","rgb(255, 229, 153)","rgb(182, 215, 168)","rgb(162, 196, 201)","rgb(164, 194, 244)","rgb(159, 197, 232)","rgb(180, 167, 214)","rgb(213, 166, 189)"],["rgb(204, 65, 37)","rgb(224, 102, 102)","rgb(246, 178, 107)","rgb(255, 217, 102)","rgb(147, 196, 125)","rgb(118, 165, 175)","rgb(109, 158, 235)","rgb(111, 168, 220)","rgb(142, 124, 195)","rgb(194, 123, 160)"],["rgb(166, 28, 0)","rgb(204, 0, 0)","rgb(230, 145, 56)","rgb(241, 194, 50)","rgb(106, 168, 79)","rgb(69, 129, 142)","rgb(60, 120, 216)","rgb(61, 133, 198)","rgb(103, 78, 167)","rgb(166, 77, 121)"],["rgb(91, 15, 0)","rgb(102, 0, 0)","rgb(120, 63, 4)","rgb(127, 96, 0)","rgb(39, 78, 19)","rgb(12, 52, 61)","rgb(28, 69, 135)","rgb(7, 55, 99)","rgb(32, 18, 77)","rgb(76, 17, 48)"],["#c1232b","#27727b","#fcce10","#e87c25","#b5c334","#fe8463","#9bca63","#fad860","#f3a43b","#60c0dd","#d7504b","#c6e579","#f4e001","#f0805a","#26c0c0","#c12e34","#e6b600","#0098d9","#2b821d","#005eaa","#339ca8","#cda819","#32a487","#3fb1e3","#6be6c1","#626c91","#a0a7e6","#c4ebad","#96dee8"]],change:function(a){let o=$(this);a!=null?a=a.toHexString():a="rgb(0, 0, 0)";let s=null;pl.find(".luckysheet-sheets-item-color").length>0&&(s=pl.find(".luckysheet-sheets-item-color").css("background-color")),pl.find(".luckysheet-sheets-item-color").remove(),pl.append('<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: '+a+';"></div>');let u=Z(h.currentSheetIndex);if(h.luckysheetfile[u].color=a,ne.saveParam("all",h.currentSheetIndex,a,{k:"color"}),h.clearjfundo){let f={};f.type="sheetColor",f.sheetIndex=h.currentSheetIndex,f.oldcolor=s,f.color=a,h.jfundo.length=0,h.jfredo.push(f)}}}),$("#luckysheetsheetconfigcolorreset").click(function(){let a=null;pl.find(".luckysheet-sheets-item-color").length>0&&(a=pl.find(".luckysheet-sheets-item-color").css("background-color")),pl.find(".luckysheet-sheets-item-color").remove();let o=Z(h.currentSheetIndex);if(h.luckysheetfile[o].color=null,ne.saveParam("all",h.currentSheetIndex,null,{k:"color"}),h.clearjfundo){let s={};s.type="sheetColor",s.sheetIndex=h.currentSheetIndex,s.oldcolor=a,s.color=null,h.jfundo.length=0,h.jfredo.push(s)}})}let e=Z(h.currentSheetIndex);h.luckysheetfile[e].color!=null&&h.luckysheetfile[e].color.length>0&&$("#luckysheetsheetconfigcolorur").spectrum("set",h.luckysheetfile[e].color),$("#luckysheetsheetconfigcolorur").parent().find("span, div, button, input, a").addClass("luckysheet-mousedown-cancel");let n=de.sheetRightClickConfig;Object.values(n).every(t=>!t)||setTimeout(function(){ml($("#luckysheet-rightclick-sheet-menu"),pl.offset().left+pl.width(),pl.offset().top-18,"leftbottom")},1)}function _m(){let n=Q().sheetconfig;eu=!1,$("#luckysheet-sheet-area").on("mousedown","div.luckysheet-sheets-item",function(d){if(fe())return;let m=$(this),g=$(d.target),y=g.closest(".luckysheet-sheets-item");d.which=="3"&&setTimeout(()=>{xm(m,g,d),pl=y,wm()},0),y.hasClass("luckysheet-sheets-item-active")&&y.find(".luckysheet-sheets-item-name").attr("contenteditable")=="false"&&(bm=setTimeout(function(){h.luckysheet_sheet_move_status=!0,h.luckysheet_sheet_move_data={},h.luckysheet_sheet_move_data.widthlist=[],$("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").each(function(k){k==0?h.luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth())):h.luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth())+h.luckysheet_sheet_move_data.widthlist[k-1])}),h.luckysheet_sheet_move_data.curindex=$("#luckysheet-sheet-area div.luckysheet-sheets-item").index(y);let v=d.pageX;h.luckysheet_sheet_move_data.curleft=v-y.offset().left,h.luckysheet_sheet_move_data.pageX=v,h.luckysheet_sheet_move_data.activeobject=y,h.luckysheet_sheet_move_data.cursorobject=g;let b=y.clone().css("visibility","hidden").attr("id","luckysheet-sheets-item-clone");y.after(b),y.css({position:"absolute",opacity:.8,cursor:"move",transition:"initial","z-index":10})},200))}).on("click","div.luckysheet-sheets-item",function(d){if(fe())return;let m=$(this),g=$(d.target);xm(m,g,d),ne.keepHighLightBox()});let t=function(d){h.allowEdit!==!1&&(d.attr("contenteditable","true").addClass("luckysheet-mousedown-cancel").data("oldtxt",d.text()),setTimeout(function(){If(d.get(0))},1))};$("#luckysheet-sheet-area").on("dblclick","span.luckysheet-sheets-item-name",function(d){t($(this))});let l=!0;$("#luckysheet-sheet-area").on("compositionstart","span.luckysheet-sheets-item-name",()=>l=!1),$("#luckysheet-sheet-area").on("compositionend","span.luckysheet-sheets-item-name",()=>l=!0),$("#luckysheet-sheet-area").on("input","span.luckysheet-sheets-item-name",function(){if(h.allowEdit===!1||h.limitSheetNameLength===!1)return;let d=h.defaultSheetNameMaxLength;d!==0&&setTimeout(()=>{l&&$(this).text().length>=d&&setTimeout(()=>{$(this).text($(this).text().substring(0,d));let m=window.getSelection();m.selectAllChildren(this),m.collapseToEnd()},0)},0)}),$("#luckysheet-sheet-area").on("blur","span.luckysheet-sheets-item-name",function(d){if(h.allowEdit===!1)return;let m=$(this),g=m.text(),y=m.data("oldtxt");if($(this).text().length===0){U.info("",n.sheetNamecannotIsEmptyError),m.text(y).attr("contenteditable","false");return}if(g.length>31||g.charAt(0)=="'"||g.charAt(g.length-1)=="'"||/[:\:\\\/?\?\*\[\]]+/.test(g)){U.info("",n.sheetNameSpecCharError),m.text(y).attr("contenteditable","false");return}let v=Z(h.currentSheetIndex);for(let b=0;b<h.luckysheetfile.length;b++)if(v!=b&&h.luckysheetfile[b].name==g){fe()?alert(n.tipNameRepeat):U.info("",n.tipNameRepeat),m.text(y).attr("contenteditable","false");return}if(ve.sheetArrowShowAndHide(),h.luckysheetfile[v].name=g,ne.saveParam("all",h.currentSheetIndex,g,{k:"name"}),m.attr("contenteditable","false").removeClass("luckysheet-mousedown-cancel"),h.clearjfundo){let b={};b.type="sheetName",b.sheetIndex=h.currentSheetIndex,b.oldtxt=y,b.txt=g,h.jfundo.length=0,h.jfredo.push(b)}Je.createHookFunction("sheetEditNameAfter",{i:h.luckysheetfile[v].index,oldName:y,newName:g})}),$("#luckysheet-sheet-area").on("keydown","span.luckysheet-sheets-item-name",function(d){if(h.allowEdit===!1)return;let m=d.keyCode,g=$(this);if(m==it.ENTER){let y=Z(h.currentSheetIndex);km=h.luckysheetfile[y].name||km,h.luckysheetfile[y].name=g.text(),g.attr("contenteditable","false")}}),$("#luckysheetsheetconfigrename").click(function(){var d=pl.find("span.luckysheet-sheets-item-name");!Je.createHookFunction("sheetEditNameBefore",{i:pl.data("index"),name:d.text()})||(t(pl.find("span.luckysheet-sheets-item-name")),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide())}),$("#luckysheetsheetconfigshow").click(function(){$("#luckysheet-sheets-m").click(),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-rightclick-sheet-menu").hide()}),$("#luckysheetsheetconfigmoveleft").click(function(){pl.prevAll(":visible").length>0&&(pl.insertBefore(pl.prevAll(":visible").eq(0)),ve.reOrderAllSheet()),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide()}),$("#luckysheetsheetconfigmoveright").click(function(){pl.nextAll(":visible").length>0&&(pl.insertAfter(pl.nextAll(":visible").eq(0)),ve.reOrderAllSheet()),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide()}),$("#luckysheetsheetconfigdelete").click(function(d){if($("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(),$("#luckysheet-sheet-container-c .luckysheet-sheets-item:visible").length<=1){fe()?alert(n.noMoreSheet):U.info(n.noMoreSheet,"");return}let m=Z(h.currentSheetIndex);U.confirm(n.confirmDelete+"\u3010"+h.luckysheetfile[m].name+"\u3011\uFF1F","<span style='color:#9e9e9e;font-size:12px;'>"+n.redoDelete+"</span>",function(){ve.deleteSheet(pl.data("index"))},null),$("#luckysheet-input-box").removeAttr("style")}),$("#luckysheetsheetconfigcopy").click(function(d){ve.copySheet(pl.data("index"),d),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide()}),$("#luckysheetsheetconfighide").click(function(){if($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").length==1){fe()?alert(n.noHide):U.info("",n.noHide);return}ve.setSheetHide(pl.data("index")),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide()}),$("#luckysheet-sheets-add").click(function(d){parseInt($("#luckysheet-input-box").css("top"))>0&&p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),ve.addNewSheet(d),ve.locationSheet(),$("#luckysheet-input-box").removeAttr("style")});let a=null,o=0,s=0,u=150;$("#luckysheet-sheets-leftscroll").click(function(){let d=$("#luckysheet-sheet-container-c");o=d.scrollLeft(),s=d.scrollLeft()-u,s<=0&&$("#luckysheet-sheet-container .docs-sheet-fade-left").hide(),$("#luckysheet-sheet-container .docs-sheet-fade-right").show(),clearInterval(a),a=setInterval(function(){o-=4,d.scrollLeft(o),o<=s&&clearInterval(a)},1)}),$("#luckysheet-sheets-rightscroll").click(function(){let d=$("#luckysheet-sheet-container-c");o=d.scrollLeft(),s=d.scrollLeft()+u,o>0&&$("#luckysheet-sheet-container .docs-sheet-fade-right").hide(),$("#luckysheet-sheet-container .docs-sheet-fade-left").show(),clearInterval(a),a=setInterval(function(){o+=4,d.scrollLeft(o),o>=s&&clearInterval(a)},1)});let f=!0;$("#luckysheet-sheets-m").click(function(d){parseInt($("#luckysheet-input-box").css("top"))>0&&p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),$("#luckysheet-sheet-list").html("");let m="";for(let b=0;b<h.luckysheetfile.length;b++){let k=h.luckysheetfile[b],w="",x="";k.status==1&&(w='<i class="fa fa-check" aria-hidden="true"></i>'),k.hide==1&&(w='<i class="fa fa-low-vision" aria-hidden="true"></i>',x+="color:#BBBBBB;"),k.color!=null&&k.color.length>0&&(x+="border-right:4px solid "+k.color+";"),m+=_e($u,{index:k.index,name:k.name,icon:w,style:x})}f?($("#"+h.container).append(_e(Su,{item:m})),$("#luckysheet-sheet-list").on("click",".luckysheet-cols-menuitem",function(b){if(fe()){alert(n.chartEditNoOpt);return}let k=$(this),w=k.data("index");k.data("index")!=h.currentSheetIndex&&(ve.setSheetShow(w),ve.locationSheet()),ne.keepHighLightBox()}),f=!1):$("#luckysheet-sheet-list").html(m);let g=$("#luckysheet-sheet-list"),y=$(this).offset().left-$("#"+h.container).offset().left,v=$(this).height()+$("#luckysheet-sta-content").height()+12;g.css({left:y+"px",bottom:v+"px"}).show(),$("#luckysheet-input-box").removeAttr("style")}),de.pager&&Vc(de.pager)}var eu,pl,bm,km,xm,Cm=Ie(()=>{dl();Qt();Gt();ft();Nt();Ft();Ut();Vr();ll();pn();bt();Xe();xl();va();Ll();eu=!1,pl=null,bm=null,km="";xm=function(e,n,t){clearTimeout(bm),!(n.hasClass("luckysheet-sheets-item-name")&&n.attr("contenteditable")=="true")&&(p.rangestart||p.rangedrag_column_start||p.rangedrag_row_start||p.israngeseleciton()?setTimeout(function(){p.setCaretPosition(p.rangeSetValueTo.get(0),0,p.rangeSetValueTo.text().length),p.createRangeHightlight(),$("#luckysheet-input-box-index").find(".luckysheet-input-box-index-sheettxt").remove().end().prepend("<span class='luckysheet-input-box-index-sheettxt'>"+ve.getSheetName(p.rangetosheet)+"!</span>").show(),$("#luckysheet-input-box-index").css({left:$("#luckysheet-input-box").css("left"),top:parseInt($("#luckysheet-input-box").css("top"))-20+"px","z-index":$("#luckysheet-input-box").css("z-index")})},1):(parseInt($("#luckysheet-input-box").css("top"))>0&&p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),$("#luckysheet-input-box").removeAttr("style"),$("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove()),$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"),e.addClass("luckysheet-sheets-item-active"),rl(t),ve.changeSheet(e.data("index")),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(),(n.hasClass("luckysheet-sheets-item-menu")||n.hasClass("fa-sort-desc")||t.which=="3")&&(pl=n.closest(".luckysheet-sheets-item"),wm()))}});function Tm(){let n=Q().formula;$("#luckysheet-functionbox-cell").focus(function(){if(!fe()&&h.luckysheet_select_save.length>0){let t=h.luckysheet_select_save[h.luckysheet_select_save.length-1],l=t.row_focus,a=t.column_focus;Rl(l,a,h.flowdata,null,!0),p.rangeResizeTo=$("#luckysheet-functionbox-cell")}}).keydown(function(t){if(fe())return;let l=t.ctrlKey,a=t.altKey,o=t.shiftKey,s=t.keyCode,u=$("#luckysheet-input-box");if(s==it.ENTER&&parseInt(u.css("top"))>0)$("#luckysheet-formula-search-c").is(":visible")&&p.searchFunctionCell!=null?p.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")):(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),h.luckysheet_select_save=[{row:[h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[0]],column:[h.luckysheetCellUpdate[1],h.luckysheetCellUpdate[1]],row_focus:h.luckysheetCellUpdate[0],column_focus:h.luckysheetCellUpdate[1]}],jt("down",1,"rangeOfSelect"),$("#luckysheet-rich-text-editor").focus()),t.preventDefault();else if(s==it.ESC&&parseInt(u.css("top"))>0)p.dontupdate(),jt("down",0,"rangeOfSelect"),$("#luckysheet-rich-text-editor").focus(),t.preventDefault();else if(s==it.F4&&parseInt(u.css("top"))>0)p.setfreezonFuc(t),t.preventDefault();else if(s==it.UP&&parseInt(u.css("top"))>0){if($("#luckysheet-formula-search-c").is(":visible")){let f=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").prev();f.length==0&&(f=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").last()),$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"),f.addClass("luckysheet-formula-search-item-active"),t.preventDefault()}}else if(s==it.DOWN&&parseInt(u.css("top"))>0){if($("#luckysheet-formula-search-c").is(":visible")){let f=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").next();f.length==0&&(f=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").first()),$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"),f.addClass("luckysheet-formula-search-item-active"),t.preventDefault()}}else s==it.LEFT&&parseInt(u.css("top"))>0?p.rangeHightlightselected($("#luckysheet-functionbox-cell")):s==it.RIGHT&&parseInt(u.css("top"))>0?p.rangeHightlightselected($("#luckysheet-functionbox-cell")):(!(s>=112&&s<=123||s<=46||s==144||s==108||t.ctrlKey||t.altKey||t.shiftKey&&(s==37||s==38||s==39||s==40))||s==8||s==32||s==46||t.ctrlKey&&s==86)&&p.functionInputHanddler($("#luckysheet-rich-text-editor"),$("#luckysheet-functionbox-cell"),s)}).click(function(){fe()||p.rangeHightlightselected($("#luckysheet-functionbox-cell"))}),$("#luckysheet-wa-functionbox-cancel").click(function(){!$(this).hasClass("luckysheet-wa-calculate-active")||($("#luckysheet-search-formula-parm").is(":visible")&&$("#luckysheet-search-formula-parm").hide(),$("#luckysheet-search-formula-parm-select").is(":visible")&&$("#luckysheet-search-formula-parm-select").hide(),p.dontupdate(),jt("down",0,"rangeOfSelect"))}),$("#luckysheet-wa-functionbox-confirm").click(function(){!$(this).hasClass("luckysheet-wa-calculate-active")||($("#luckysheet-search-formula-parm").is(":visible")&&$("#luckysheet-search-formula-parm").hide(),$("#luckysheet-search-formula-parm-select").is(":visible")&&$("#luckysheet-search-formula-parm-select").hide(),p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",0,"rangeOfSelect"))}),$("#luckysheet-wa-functionbox-fx").click(function(){if(h.luckysheet_select_save.length==0){fe()?alert(n.tipSelectCell):U.info(n.tipSelectCell,"");return}let t=h.luckysheet_select_save[h.luckysheet_select_save.length-1],l=t.row_focus,a=t.column_focus;Rl(l,a,h.flowdata);let o=h.flowdata[l][a];if(o!=null&&o.f!=null){let s=p.getfunctionParam(o.f);s.fn!=null?hn.formulaParmDialog(s.fn,s.param):hn.formulaListDialog()}else $("#luckysheet-rich-text-editor").html('<span dir="auto" class="luckysheet-formula-text-color">=</span>'),$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()),hn.formulaListDialog();hn.init()}),$("#luckysheet-formula-functionrange").on("mousedown",".luckysheet-copy",function(t){p.rangeMove=!0,h.luckysheet_scroll_status=!0,p.rangeMoveObj=$(this).parent(),p.rangeMoveIndex=$(this).parent().attr("rangeindex");let l=nt(t.pageX,t.pageY),a=l[0]+$("#luckysheet-cell-main").scrollLeft(),o=l[1]+$("#luckysheet-cell-main").scrollTop();$("#luckysheet-formula-functionrange-highlight-"+p.rangeMoveIndex).find(".luckysheet-selection-copy-hc").css("opacity",.13);let s=$(this).data("type");s=="top"?o+=3:s=="right"?a-=3:s=="bottom"?o-=3:s=="left"&&(a+=3);let u=_t(o)[2],f=wt(a)[2];p.rangeMovexy=[u,f],$("#luckysheet-sheettable").css("cursor","move"),t.stopPropagation()}),$("#luckysheet-formula-functionrange").on("mousedown",".luckysheet-highlight",function(t){p.rangeResize=$(this).data("type"),p.rangeResizeIndex=$(this).parent().attr("rangeindex");let l=nt(t.pageX,t.pageY),a=$("#luckysheet-cell-main").scrollLeft(),o=$("#luckysheet-cell-main").scrollTop(),s=l[0]+a,u=l[1]+o;p.rangeResizeObj=$(this).parent(),$("#luckysheet-formula-functionrange-highlight-"+p.rangeResizeIndex).find(".luckysheet-selection-copy-hc").css("opacity",.13),p.rangeResize=="lt"?(s+=3,u+=3):p.rangeResize=="lb"?(s+=3,u-=3):p.rangeResize=="rt"?(s-=3,u+=3):p.rangeResize=="rb"&&(s-=3,u-=3);let f=_t(u),d=f[1],m=f[0],g=f[2],y=wt(s),v=y[1],b=y[0],k=y[2],w=p.rangeResizeObj.position();p.rangeResizexy=[b,m,p.rangeResizeObj.width(),p.rangeResizeObj.height(),w.left+a,w.top+o,v,d],p.rangeResizeWinH=$("#luckysheet-cell-main")[0].scrollHeight,p.rangeResizeWinW=$("#luckysheet-cell-main")[0].scrollWidth,h.luckysheet_scroll_status=!0,t.stopPropagation()})}var Sm=Ie(()=>{il();ba();Gt();za();Yc();Ol();Ft();Ut();ll();bt();Xe()});function $m(){$("#luckysheet-rows-h").mousedown(function(e){if(!Di(h.currentSheetIndex))return;He.removeActivePs(),($("#luckysheet-modal-dialog-activeImage").is(":visible")||$("#luckysheet-modal-dialog-cropping").is(":visible"))&&Re.cancelActiveImgItem();let t=nt(e.pageX,e.pageY)[1]+$("#luckysheet-rows-h").scrollTop(),l=_t(t),a=l[1],o=l[0],s=l[2],u=h.visibledatacolumn.length-1,f=h.visibledatacolumn[u],d=0;if($("#luckysheet-rightclick-menu").hide(),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(),e.which=="3"){let b=!1;for(let k=0;k<h.luckysheet_select_save.length;k++){let w=h.luckysheet_select_save[k];if(w.row!=null&&s>=w.row[0]&&s<=w.row[1]&&w.column[0]==0&&w.column[1]==h.flowdata[0].length-1){b=!0;break}}if(b)return}let m=o,g=a-o-1,y=[s,s];h.luckysheet_scroll_status=!0;let v=$("#luckysheet-input-box");if(parseInt(v.css("top"))>0)if(p.rangestart||p.rangedrag_column_start||p.rangedrag_row_start||p.israngeseleciton()||$("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){let b=ke.mergeMoveMain([0,u],y,{row_focus:s,column_focus:0},m,g,d,f);if(b!=null&&(y=b[1],m=b[2],g=b[3]),e.shiftKey){let k=p.func_selectedrange,w=0,x=0,C=[];k.top>o?(w=o,x=k.top+k.height-o,k.row[1]>k.row_focus&&(k.row[1]=k.row_focus),C=[s,k.row[1]]):k.top==o?(w=o,x=k.top+k.height-o,C=[s,k.row[0]]):(w=k.top,x=a-k.top-1,k.row[0]<k.row_focus&&(k.row[0]=k.row_focus),C=[k.row[0],s]);let S=ke.mergeMoveMain([0,u],C,{row_focus:s,column_focus:0},w,x,d,f);S!=null&&(C=S[1],w=S[2],x=S[3]),k.row=C,k.top_move=w,k.height_move=x,p.func_selectedrange=k}else if(e.ctrlKey&&$("#luckysheet-rich-text-editor").find("span").last().text()!=","){let k=$("#luckysheet-rich-text-editor").text()+",";if(k.length>0&&k.substr(0,1)=="="){if(k=p.functionHTMLGenerate(k),window.getSelection){let w=window.getSelection();p.functionRangeIndex=[$(w.anchorNode).parent().index(),w.anchorOffset]}else{let w=document.selection.createRange();p.functionRangeIndex=w}$("#luckysheet-rich-text-editor").html(k),p.canceFunctionrangeSelected(),p.createRangeHightlight()}p.rangestart=!1,p.rangedrag_column_start=!1,p.rangedrag_row_start=!1,$("#luckysheet-functionbox-cell").html(k),p.rangeHightlightselected($("#luckysheet-rich-text-editor")),p.israngeseleciton(),p.func_selectedrange={left:At(0)[0],width:At(0)[1]-At(0)[0]-1,top:m,height:g,left_move:d,width_move:f-d-1,top_move:m,height_move:g,row:y,column:[0,u],row_focus:s,column_focus:0}}else p.func_selectedrange={left:At(0)[0],width:At(0)[1]-At(0)[0]-1,top:m,height:g,left_move:d,width_move:f-d-1,top_move:m,height_move:g,row:y,column:[0,u],row_focus:s,column_focus:0};if(p.rangestart||p.rangedrag_column_start||p.rangedrag_row_start||p.israngeseleciton())p.rangeSetValue({row:y,column:[null,null]});else if($("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){let k=xt(h.currentSheetIndex,{row:y,column:[0,u]},h.currentSheetIndex);$("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(k)}p.rangedrag_row_start=!0,p.rangestart=!1,p.rangedrag_column_start=!1,$("#luckysheet-formula-functionrange-select").css({left:d,width:f-d-1,top:m,height:g}).show(),$("#luckysheet-formula-help-c").hide(),or(d,m,f-d-1,g,y,[0,u]),setTimeout(function(){let w=window.getSelection().anchorNode,x;$("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible")?(x=$("#luckysheet-rich-text-editor"),p.rangechangeindex=p.data_parm_index):x=$(w).closest("div");let C=x.find("span[rangeindex='"+p.rangechangeindex+"']");p.setCaretPosition(C.get(0),0,C.html().length)},1);return}else p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),h.luckysheet_rows_selected_status=!0;else h.luckysheet_rows_selected_status=!0;if(h.luckysheet_rows_selected_status){if(e.shiftKey){let b=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),k=0,w=0,x=[];b.top>o?(k=o,w=b.top+b.height-o,b.row[1]>b.row_focus&&(b.row[1]=b.row_focus),x=[s,b.row[1]]):b.top==o?(k=o,w=b.top+b.height-o,x=[s,b.row[0]]):(k=b.top,w=a-b.top-1,b.row[0]<b.row_focus&&(b.row[0]=b.row_focus),x=[b.row[0],s]),b.row=x,b.top_move=k,b.height_move=w,h.luckysheet_select_save[h.luckysheet_select_save.length-1]=b}else e.ctrlKey?h.luckysheet_select_save.push({left:At(0)[0],width:At(0)[1]-At(0)[0]-1,top:m,height:g,left_move:d,width_move:f-d-1,top_move:m,height_move:g,row:y,column:[0,u],row_focus:s,column_focus:0,row_select:!0}):(h.luckysheet_select_save.length=0,h.luckysheet_select_save.push({left:At(0)[0],width:At(0)[1]-At(0)[0]-1,top:m,height:g,left_move:d,width_move:f-d-1,top_move:m,height_move:g,row:y,column:[0,u],row_focus:s,column_focus:0,row_select:!0}));lt(),ne.saveParam("mv",h.currentSheetIndex,h.luckysheet_select_save)}Go(),setTimeout(function(){clearTimeout(h.countfuncTimeout),wl()},101)}).mousemove(function(e){if(h.luckysheet_rows_selected_status||h.luckysheet_rows_change_size||h.luckysheet_select_status){$("#luckysheet-rows-h-hover").hide();return}let t=nt(e.pageX,e.pageY)[1]+$("#luckysheet-rows-h").scrollTop(),l=_t(t),a=l[1],o=l[0],s=l[2];$("#luckysheet-rows-h-hover").css({top:o,height:a-o-1,display:"block"}),t<a-1&&t>=a-5?$("#luckysheet-rows-change-size").css({top:a-3,opacity:0}):$("#luckysheet-rows-change-size").css("opacity",0)}).mouseleave(function(e){$("#luckysheet-rows-h-hover").hide(),$("#luckysheet-rows-change-size").css("opacity",0)}).mouseup(function(e){if(e.which==3){if(!El()||fe())return;$("#luckysheet-cols-rows-shift").hide(),h.luckysheetRightHeadClickIs="row",$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(Q().rightclick.row),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text(Q().rightclick.height),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(Q().rightclick.top),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(Q().rightclick.bottom),$("#luckysheet-cols-rows-add").show(),$("#luckysheet-cols-rows-data").show(),$("#luckysheet-cols-rows-shift").hide(),$("#luckysheet-cols-rows-handleincell").hide(),We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="block",We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="block";let n=de.cellRightClickConfig;if(!n.copy&&!n.copyAs&&!n.paste&&!n.insertRow&&!n.deleteRow&&!n.hideRow&&!n.rowHeight&&!n.clear&&!n.matrix&&!n.sort&&!n.filter&&!n.chart&&!n.image&&!n.link&&!n.data&&!n.cellFormat)return;We("#luckysheet-top-left-add-selected").style.display=n.insertRow?"block":"none",We("#luckysheet-bottom-right-add-selected").style.display=n.insertRow?"block":"none",We("#luckysheet-del-selected").style.display=n.deleteRow?"block":"none",We("#luckysheet-hide-selected").style.display=n.hideRow?"block":"none",We("#luckysheet-show-selected").style.display=n.hideRow?"block":"none",We("#luckysheet-column-row-width-selected").style.display=n.rowHeight?"block":"none",!n.copy&&!n.copyAs&&!n.paste&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none",!n.insertRow&&!n.deleteRow&&!n.hideRow&&!n.rowHeight&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none")),!n.insertRow&&!n.deleteRow&&!n.hideRow&&!n.rowHeight&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none"),!n.clear&&!n.matrix&&!n.sort&&!n.filter&&!n.chart&&!n.image&&!n.link&&!n.data&&!n.cellFormat&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none"),sn($("#luckysheet-rightclick-menu"),$(this).offset().left+46,e.pageY),h.luckysheet_cols_menu_status=!0;let t=$.extend(!0,{},h.config);t.rowlen==null&&(t.rowlen={});let l=t.rowlen[h.luckysheet_select_save[0].row[0]]==null?h.defaultrowlen:t.rowlen[h.luckysheet_select_save[0].row[0]],a=!0;for(let o=0;o<h.luckysheet_select_save.length;o++){let s=h.luckysheet_select_save[o],u=s.row[0],f=s.row[1];for(let d=u;d<=f;d++)if((t.rowlen[d]==null?h.defaultrowlen:t.rowlen[d])!=l){a=!1;break}}a?$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(l):$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val("")}}),$("#luckysheet-cols-h-c").mousedown(function(e){if(!Di(h.currentSheetIndex))return;He.removeActivePs(),($("#luckysheet-modal-dialog-activeImage").is(":visible")||$("#luckysheet-modal-dialog-cropping").is(":visible"))&&Re.cancelActiveImgItem();let t=nt(e.pageX,e.pageY)[0]+$(this).scrollLeft(),l=h.visibledatarow.length-1,a=h.visibledatarow[l],o=0,s=wt(t),u=s[1],f=s[0],d=s[2];if(h.orderbyindex=d,$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(),$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(),e.which=="3"){let b=!1;for(let k=0;k<h.luckysheet_select_save.length;k++){let w=h.luckysheet_select_save[k];if(w.column!=null&&d>=w.column[0]&&d<=w.column[1]&&w.row[0]==0&&w.row[1]==h.flowdata.length-1){b=!0;break}}if(b)return}let m=f,g=u-f-1,y=[d,d];h.luckysheet_scroll_status=!0;let v=$("#luckysheet-input-box");if(parseInt(v.css("top"))>0)if(p.rangestart||p.rangedrag_column_start||p.rangedrag_row_start||p.israngeseleciton()||$("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){let b=ke.mergeMoveMain(y,[0,l],{row_focus:0,column_focus:d},o,a,m,g);if(b!=null&&(y=b[0],m=b[4],g=b[5]),e.shiftKey){let k=p.func_selectedrange,w=0,x=0,C=[];k.left>f?(w=f,x=k.left+k.width-f,k.column[1]>k.column_focus&&(k.column[1]=k.column_focus),C=[d,k.column[1]]):k.left==f?(w=f,x=k.left+k.width-f,C=[d,k.column[0]]):(w=k.left,x=u-k.left-1,k.column[0]<k.column_focus&&(k.column[0]=k.column_focus),C=[k.column[0],d]);let S=ke.mergeMoveMain(C,[0,l],{row_focus:0,column_focus:d},o,a,w,x);S!=null&&(C=S[0],w=S[4],x=S[5]),k.column=C,k.left_move=w,k.width_move=x,p.func_selectedrange=k}else if(e.ctrlKey&&$("#luckysheet-rich-text-editor").find("span").last().text()!=","){let k=$("#luckysheet-rich-text-editor").text()+",";if(k.length>0&&k.substr(0,1)=="="){if(k=p.functionHTMLGenerate(k),window.getSelection){let w=window.getSelection();p.functionRangeIndex=[$(w.anchorNode).parent().index(),w.anchorOffset]}else{let w=document.selection.createRange();p.functionRangeIndex=w}$("#luckysheet-rich-text-editor").html(k),p.canceFunctionrangeSelected(),p.createRangeHightlight()}p.rangestart=!1,p.rangedrag_column_start=!1,p.rangedrag_row_start=!1,$("#luckysheet-functionbox-cell").html(k),p.rangeHightlightselected($("#luckysheet-rich-text-editor")),p.israngeseleciton(),p.func_selectedrange={left:m,width:g,top:tl(0)[0],height:tl(0)[1]-tl(0)[0]-1,left_move:m,width_move:g,top_move:o,height_move:a-o-1,row:[0,l],column:y,row_focus:0,column_focus:d}}else p.func_selectedrange={left:m,width:g,top:tl(0)[0],height:tl(0)[1]-tl(0)[0]-1,left_move:m,width_move:g,top_move:o,height_move:a-o-1,row:[0,l],column:y,row_focus:0,column_focus:d};if(p.rangestart||p.rangedrag_column_start||p.rangedrag_row_start||p.israngeseleciton())p.rangeSetValue({row:[null,null],column:y});else if($("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){let k=xt(h.currentSheetIndex,{row:[0,l],column:y},h.currentSheetIndex);$("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(k)}p.rangedrag_column_start=!0,p.rangestart=!1,p.rangedrag_row_start=!1,$("#luckysheet-formula-functionrange-select").css({left:m,width:g,top:o,height:a-o-1}).show(),$("#luckysheet-formula-help-c").hide(),or(m,o,g,a-o-1,[0,l],y);return}else p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),h.luckysheet_cols_selected_status=!0;else h.luckysheet_cols_selected_status=!0;if(h.luckysheet_cols_selected_status){if(e.shiftKey){let b=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),k=0,w=0,x=[];b.left>f?(k=f,w=b.left+b.width-f,b.column[1]>b.column_focus&&(b.column[1]=b.column_focus),x=[d,b.column[1]]):b.left==f?(k=f,w=b.left+b.width-f,x=[d,b.column[0]]):(k=b.left,w=u-b.left-1,b.column[0]<b.column_focus&&(b.column[0]=b.column_focus),x=[b.column[0],d]),b.column=x,b.left_move=k,b.width_move=w,h.luckysheet_select_save[h.luckysheet_select_save.length-1]=b}else e.ctrlKey?h.luckysheet_select_save.push({left:m,width:g,top:tl(0)[0],height:tl(0)[1]-tl(0)[0]-1,left_move:m,width_move:g,top_move:o,height_move:a-o-1,row:[0,l],column:y,row_focus:0,column_focus:d,column_select:!0}):(h.luckysheet_select_save.length=0,h.luckysheet_select_save.push({left:m,width:g,top:tl(0)[0],height:tl(0)[1]-tl(0)[0]-1,left_move:m,width_move:g,top_move:o,height_move:a-o-1,row:[0,l],column:y,row_focus:0,column_focus:d,column_select:!0}));lt(),ne.saveParam("mv",h.currentSheetIndex,h.luckysheet_select_save)}Go(),setTimeout(function(){clearTimeout(h.countfuncTimeout),wl()},101),h.luckysheet_cols_menu_status&&($("#luckysheet-rightclick-menu").hide(),$("#luckysheet-cols-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide(),h.luckysheet_cols_menu_status=!1),e.stopPropagation()}).mousemove(function(e){if(h.luckysheet_cols_selected_status||h.luckysheet_select_status){$("#luckysheet-cols-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide();return}if(h.luckysheet_cols_menu_status||h.luckysheet_cols_change_size)return;let t=nt(e.pageX,e.pageY)[0]+$("#luckysheet-cols-h-c").scrollLeft(),l=wt(t),a=l[1],o=l[0],s=l[2];$("#luckysheet-cols-h-hover").css({left:o,width:a-o-1,display:"block"}),$("#luckysheet-cols-menu-btn").css({left:a-19,display:"block"}),$("#luckysheet-cols-change-size").css({left:a-5}),t<a&&t>=a-5?($("#luckysheet-cols-change-size").css({opacity:0}),$("#luckysheet-cols-menu-btn").hide()):($("#luckysheet-change-size-line").hide(),$("#luckysheet-cols-change-size").css("opacity",0))}).mouseleave(function(e){h.luckysheet_cols_menu_status||h.luckysheet_cols_change_size||($("#luckysheet-cols-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide(),$("#luckysheet-cols-change-size").css("opacity",0))}).mouseup(function(e){if(e.which==3){if(!El()||fe())return;h.luckysheetRightHeadClickIs="column",$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(Q().rightclick.column),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text(Q().rightclick.width),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(Q().rightclick.left),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(Q().rightclick.right),$("#luckysheet-cols-rows-add").show(),$("#luckysheet-cols-rows-data").show(),$("#luckysheet-cols-rows-shift").hide(),$("#luckysheet-cols-rows-handleincell").hide(),We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="block",We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="block";let n=de.cellRightClickConfig;if(!n.copy&&!n.copyAs&&!n.paste&&!n.insertColumn&&!n.deleteColumn&&!n.hideColumn&&!n.columnWidth&&!n.clear&&!n.matrix&&!n.sort&&!n.filter&&!n.chart&&!n.image&&!n.link&&!n.data&&!n.cellFormat)return;We("#luckysheet-top-left-add-selected").style.display=n.insertColumn?"block":"none",We("#luckysheet-bottom-right-add-selected").style.display=n.insertColumn?"block":"none",We("#luckysheet-del-selected").style.display=n.deleteColumn?"block":"none",We("#luckysheet-hide-selected").style.display=n.hideColumn?"block":"none",We("#luckysheet-show-selected").style.display=n.hideColumn?"block":"none",We("#luckysheet-column-row-width-selected").style.display=n.columnWidth?"block":"none",!n.copy&&!n.copyAs&&!n.paste&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none",!n.insertColumn&&!n.deleteColumn&&!n.hideColumn&&!n.columnWidth&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none")),!n.insertColumn&&!n.deleteColumn&&!n.hideColumn&&!n.columnWidth&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none"),!n.clear&&!n.matrix&&!n.sort&&!n.filter&&!n.chart&&!n.image&&!n.link&&!n.data&&!n.cellFormat&&(We("#luckysheet-cols-rows-data .luckysheet-menuseparator").style.display="none"),sn($("#luckysheet-rightclick-menu"),e.pageX,$(this).offset().top+18),h.luckysheet_cols_menu_status=!0;let t=$.extend(!0,{},h.config);t.columnlen==null&&(t.columnlen={});let l=t.columnlen[h.luckysheet_select_save[0].column[0]]==null?h.defaultcollen:t.columnlen[h.luckysheet_select_save[0].column[0]],a=!0;for(let o=0;o<h.luckysheet_select_save.length;o++){let s=h.luckysheet_select_save[o],u=s.column[0],f=s.column[1];for(let d=u;d<=f;d++)if((t.columnlen[d]==null?h.defaultcollen:t.columnlen[d])!=l){a=!1;break}}a?$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(l):$("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val("")}}),$("#luckysheet-rows-change-size").mousedown(function(e){if(!El())return;He.removeActivePs(),($("#luckysheet-modal-dialog-activeImage").is(":visible")||$("#luckysheet-modal-dialog-cropping").is(":visible"))&&Re.cancelActiveImgItem(),$("#luckysheet-input-box").hide(),$("#luckysheet-rows-change-size").css({opacity:1});let t=nt(e.pageX,e.pageY)[1]+$("#luckysheet-rows-h").scrollTop(),l=$("#luckysheet-cell-main").scrollLeft(),a=$("#luckysheet-cell-main").width(),o=_t(t),s=o[1],u=o[0],f=o[2];h.luckysheet_rows_change_size=!0,h.luckysheet_scroll_status=!0,$("#luckysheet-change-size-line").css({height:"1px","border-width":"0 0px 1px 0",top:s-3,left:0,width:l+a,display:"block",cursor:"ns-resize"}),$("#luckysheet-sheettable, #luckysheet-rows-h, #luckysheet-rows-h canvas").css("cursor","ns-resize"),h.luckysheet_rows_change_size_start=[u,f],$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-rows-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide(),e.stopPropagation()}),$("#luckysheet-cols-change-size").mousedown(function(e){if(!El())return;He.removeActivePs(),($("#luckysheet-modal-dialog-activeImage").is(":visible")||$("#luckysheet-modal-dialog-cropping").is(":visible"))&&Re.cancelActiveImgItem(),$("#luckysheet-input-box").hide(),$("#luckysheet-cols-change-size").css({opacity:1});let n=nt(e.pageX,e.pageY),t=$("#luckysheet-cols-h-c").scrollLeft(),l=$("#luckysheet-cell-main").scrollTop(),a=$("#luckysheet-cell-main").height(),o=n[0]+t,s=h.visibledatarow.length-1,u=h.visibledatarow[s],f=0,d=wt(o),m=d[1],g=d[0],y=d[2];h.luckysheet_cols_change_size=!0,h.luckysheet_scroll_status=!0,$("#luckysheet-change-size-line").css({height:a+l,"border-width":"0 1px 0 0",top:0,left:m-3,width:"1px",display:"block",cursor:"ew-resize"}),$("#luckysheet-sheettable, #luckysheet-cols-h-c, .luckysheet-cols-h-cells, .luckysheet-cols-h-cells canvas").css("cursor","ew-resize"),h.luckysheet_cols_change_size_start=[g,y],$("#luckysheet-rightclick-menu").hide(),$("#luckysheet-cols-h-hover").hide(),$("#luckysheet-cols-menu-btn").hide(),h.luckysheet_cols_dbclick_times=0,e.stopPropagation()}).dblclick(function(){Tb()}),$("#luckysheet-cols-menu-btn").click(function(e){if(!El()){U.info("",Q().pivotTable.errorNotAllowEdit);return}let n=$("#luckysheet-rightclick-menu"),t=$(this).offset();$("#luckysheet-cols-rows-shift").show(),h.luckysheetRightHeadClickIs="column",$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(Q().rightclick.column),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(Q().rightclick.left),$("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(Q().rightclick.right),$("#luckysheet-cols-rows-add").show(),$("#luckysheet-cols-rows-data").hide(),$("#luckysheet-cols-rows-shift").show(),$("#luckysheet-cols-rows-handleincell").hide(),We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="block",We("#luckysheet-cols-rows-shift .luckysheet-menuseparator").style.display="block";let l=de.cellRightClickConfig;!l.copy&&!l.copyAs&&!l.paste&&!l.insertColumn&&!l.deleteColumn&&!l.hideColumn&&!l.columnWidth&&!l.sort||(We("#luckysheet-top-left-add-selected").style.display=l.insertColumn?"block":"none",We("#luckysheet-bottom-right-add-selected").style.display=l.insertColumn?"block":"none",We("#luckysheet-del-selected").style.display=l.deleteColumn?"block":"none",We("#luckysheet-hide-selected").style.display=l.hideColumn?"block":"none",We("#luckysheet-show-selected").style.display=l.hideColumn?"block":"none",We("#luckysheet-column-row-width-selected").style.display=l.columnWidth?"block":"none",!l.copy&&!l.copyAs&&!l.paste&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none",!l.insertColumn&&!l.deleteColumn&&!l.hideColumn&&!l.columnWidth&&(We("#luckysheet-cols-rows-shift .luckysheet-menuseparator").style.display="none")),!l.insertColumn&&!l.deleteColumn&&!l.hideColumn&&!l.columnWidth&&(We("#luckysheet-cols-rows-add .luckysheet-menuseparator").style.display="none"),l.sort||(We("#luckysheet-cols-rows-shift .luckysheet-menuseparator").style.display="none"),sn(n,t.left,t.top+18),h.luckysheet_cols_menu_status=!0)}),$("#luckysheet-top-left-add-selected").click(function(e){if(e.target.nodeName==="INPUT")return;$("#luckysheet-rightclick-menu").hide(),rt();let n=Q(),t=n.drag,l=n.info;if(h.luckysheet_select_save.length>1){fe()?alert(t.noMulti):U.info(t.noMulti,"");return}let a=$(this),o=a.find("input").val();if(!B(o)){fe()?alert(l.tipInputNumber):U.info(l.tipInputNumber,"");return}if(o=parseInt(o),o<1||o>100){fe()?alert(l.tipInputNumberLimit):U.info(l.tipInputNumberLimit,"");return}let s=h.luckysheet_select_save[0][h.luckysheetRightHeadClickIs][0];!Je.createHookFunction("rowInsertBefore",s,o,"lefttop")||Ir(h.luckysheetRightHeadClickIs,s,o,"lefttop")}),$("#luckysheetColsRowsHandleAdd_row").click(function(e){if($("#luckysheet-rightclick-menu").hide(),rt(),h.allowEdit===!1)return;let n=h.luckysheet_select_save[0].row[0];!Je.createHookFunction("rowInsertBefore",n,1,"lefttop")||Ir("row",n,1,"lefttop")}),$("#luckysheetColsRowsHandleAdd_column").click(function(e){if($("#luckysheet-rightclick-menu").hide(),rt(),h.allowEdit===!1)return;let n=h.luckysheet_select_save[0].column[0];Ir("column",n,1,"lefttop")}),$(".luckysheetColsRowsHandleAdd_custom").click(function(e){$("#luckysheet-rightclick-menu").hide();let n=de.cellRightClickConfig,t=h.luckysheet_select_save[0].row[0],l=h.luckysheet_select_save[0].column[0];if(n.customs[Number(e.currentTarget.dataset.index)])try{n.customs[Number(e.currentTarget.dataset.index)].onClick(e,event,{rowIndex:t,columnIndex:l})}catch(a){console.error("custom click error",a)}}),$("#luckysheet-bottom-right-add-selected").click(function(e){if(e.target.nodeName==="INPUT")return;$("#luckysheet-rightclick-menu").hide(),rt();let n=Q(),t=n.drag,l=n.info;if(h.luckysheet_select_save.length>1){fe()?alert(t.noMulti):U.info(t.noMulti,"");return}let a=$(this),o=a.find("input").val();if(!B(o)){fe()?alert(l.tipInputNumber):U.info(l.tipInputNumber,"");return}if(o=parseInt(o),o<1||o>100){fe()?alert(l.tipInputNumberLimit):U.info(l.tipInputNumberLimit,"");return}let s=h.luckysheet_select_save[0][h.luckysheetRightHeadClickIs][1];!Je.createHookFunction("rowInsertBefore",s,o,"rightbottom")||Ir(h.luckysheetRightHeadClickIs,s,o,"rightbottom")}),$("#luckysheet-del-selected, #luckysheet-del-selected_t").click(function(e){$("#luckysheet-rightclick-menu").hide(),rt();let n=Q().drag;if(h.luckysheet_select_save.length>1){h.luckysheetRightHeadClickIs=="row"?fe()?alert(n.noMulti):U.info(n.noMulti,""):h.luckysheetRightHeadClickIs=="column"&&(fe()?alert(n.noMulti):U.info(n.noMulti,""));return}let t=h.luckysheet_select_save[0][h.luckysheetRightHeadClickIs][0],l=h.luckysheet_select_save[0][h.luckysheetRightHeadClickIs][1];!Je.createHookFunction("rowDeleteBefore",t,l)||qn(h.luckysheetRightHeadClickIs,t,l)}),$("#luckysheet-delRows").click(function(e){$("#luckysheet-rightclick-menu").hide(),rt();let n=Q().drag;if(h.luckysheet_select_save.length>1){h.luckysheetRightHeadClickIs=="row"?fe()?alert(n.noMulti):U.info(n.noMulti,""):h.luckysheetRightHeadClickIs=="column"&&(fe()?alert(n.noMulti):U.info(n.noMulti,""));return}let t=h.luckysheet_select_save[0].row[0],l=h.luckysheet_select_save[0].row[1];!Je.createHookFunction("rowDeleteBefore",t,l)||qn("row",t,l)}),$("#luckysheet-delCols").click(function(e){$("#luckysheet-rightclick-menu").hide(),rt();let n=Q().drag;if(h.luckysheet_select_save.length>1){h.luckysheetRightHeadClickIs=="row"?fe()?alert(n.noMulti):U.info(n.noMulti,""):h.luckysheetRightHeadClickIs=="column"&&(fe()?alert(n.noMulti):U.info(n.noMulti,""));return}let t=h.luckysheet_select_save[0].column[0],l=h.luckysheet_select_save[0].column[1];qn("column",t,l)}),$("#luckysheet-hide-selected").click(function(e){$("#luckysheet-rightclick-menu").hide(),rt();let n=Q().drag;if(h.luckysheet_select_save.length>1){h.luckysheetRightHeadClickIs=="row"?fe()?alert(n.noMulti):U.info(n.noMulti,""):h.luckysheetRightHeadClickIs=="column"&&(fe()?alert(n.noMulti):U.info(n.noMulti,""));return}if(h.luckysheetRightHeadClickIs=="row"){if(!$t(h.currentSheetIndex,"formatRows"))return;let t=$.extend(!0,{},h.config);t.rowhidden==null&&(t.rowhidden={});for(let l=0;l<h.luckysheet_select_save.length;l++){let a=h.luckysheet_select_save[l].row[0],o=h.luckysheet_select_save[l].row[1];for(let s=a;s<=o;s++)t.rowhidden[s]=0}if(h.clearjfundo){let l={};l.type="showHidRows",l.sheetIndex=h.currentSheetIndex,l.config=$.extend(!0,{},h.config),l.curconfig=t,h.jfundo.length=0,h.jfredo.push(l)}h.config=t,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,t.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length)}else if(h.luckysheetRightHeadClickIs=="column"){if(!$t(h.currentSheetIndex,"formatColumns"))return;let t=$.extend(!0,{},h.config);t.colhidden==null&&(t.colhidden={});for(let l=0;l<h.luckysheet_select_save.length;l++){let a=h.luckysheet_select_save[l].column[0],o=h.luckysheet_select_save[l].column[1];for(let s=a;s<=o;s++)t.colhidden[s]=0}if(h.clearjfundo){let l={};l.type="showHidCols",l.sheetIndex=h.currentSheetIndex,l.config=$.extend(!0,{},h.config),l.curconfig=t,h.jfundo.length=0,h.jfredo.push(l)}h.config=t,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,t.colhidden,{k:"colhidden"}),St(h.flowdata.length,h.flowdata[0].length)}}),$("#luckysheet-show-selected").click(function(e){$("#luckysheet-rightclick-menu").hide(),rt();let n=Q().drag;if(h.luckysheet_select_save.length>1){h.luckysheetRightHeadClickIs=="row"?fe()?alert(n.noMulti):U.info(n.noMulti,""):h.luckysheetRightHeadClickIs=="column"&&(fe()?alert(n.noMulti):U.info(n.noMulti,""));return}if(h.luckysheetRightHeadClickIs=="row"){if(!$t(h.currentSheetIndex,"formatRows"))return;let t=$.extend(!0,{},h.config);if(t.rowhidden==null)return;for(let l=0;l<h.luckysheet_select_save.length;l++){let a=h.luckysheet_select_save[l].row[0],o=h.luckysheet_select_save[l].row[1];for(let s=a;s<=o;s++)delete t.rowhidden[s]}if(h.clearjfundo){let l={};l.type="showHidRows",l.sheetIndex=h.currentSheetIndex,l.config=$.extend(!0,{},h.config),l.curconfig=t,h.jfundo.length=0,h.jfredo.push(l)}h.config=t,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,t.rowhidden,{k:"rowhidden"}),St(h.flowdata.length,h.flowdata[0].length)}else if(h.luckysheetRightHeadClickIs=="column"){if(!$t(h.currentSheetIndex,"formatColumns"))return;let t=$.extend(!0,{},h.config);if(t.colhidden==null)return;for(let l=0;l<h.luckysheet_select_save.length;l++){let a=h.luckysheet_select_save[l].column[0],o=h.luckysheet_select_save[l].column[1];for(let s=a;s<=o;s++)delete t.colhidden[s]}if(h.clearjfundo){let l={};l.type="showHidCols",l.sheetIndex=h.currentSheetIndex,l.config=$.extend(!0,{},h.config),l.curconfig=t,h.jfundo.length=0,h.jfredo.push(l)}h.config=t,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,ne.saveParam("cg",h.currentSheetIndex,t.colhidden,{k:"colhidden"}),St(h.flowdata.length,h.flowdata[0].length)}}),$("#luckysheet-delCellsMoveLeft").click(function(e){$("body .luckysheet-cols-menu").hide(),rt();let n=Q().drag;if(h.luckysheet_select_save.length>1){fe()?alert(n.noMulti):U.info(n.noMulti,"");return}let t=h.luckysheet_select_save[0].row[0],l=h.luckysheet_select_save[0].row[1],a=h.luckysheet_select_save[0].column[0],o=h.luckysheet_select_save[0].column[1];ha("moveLeft",t,l,a,o)}),$("#luckysheet-delCellsMoveUp").click(function(e){$("body .luckysheet-cols-menu").hide(),rt();let n=Q().drag;if(h.luckysheet_select_save.length>1){fe()?alert(n.noMulti):U.info(n.noMulti,"");return}let t=h.luckysheet_select_save[0].row[0],l=h.luckysheet_select_save[0].row[1],a=h.luckysheet_select_save[0].column[0],o=h.luckysheet_select_save[0].column[1];ha("moveUp",t,l,a,o)}),$("#luckysheet-delete-text").click(function(){if(!!vr(h.luckysheet_select_save,h.currentSheetIndex)&&($("#luckysheet-rightclick-menu").hide(),rt(),h.allowEdit!==!1&&h.luckysheet_select_save.length>0)){let e=xe.deepCopyFlowData(h.flowdata),n=!1;for(let o=0;o<h.luckysheet_select_save.length;o++){let s=h.luckysheet_select_save[o].row[0],u=h.luckysheet_select_save[o].row[1],f=h.luckysheet_select_save[o].column[0],d=h.luckysheet_select_save[o].column[1];if(Mt(h.config,s,u,f,d)){n=!0;break}}if(n){let o=Q().drag;fe()?alert(o.noPartMerge):U.info(o.noPartMerge,"");return}let t=h.luckysheetfile[Z(h.currentSheetIndex)],l=t.hyperlink&&$.extend(!0,{},t.hyperlink),a;for(let o=0;o<h.luckysheet_select_save.length;o++){let s=h.luckysheet_select_save[o].row[0],u=h.luckysheet_select_save[o].row[1],f=h.luckysheet_select_save[o].column[0],d=h.luckysheet_select_save[o].column[1];for(let m=s;m<=u;m++)for(let g=f;g<=d;g++)Oe.isPivotRange(m,g)||(P(e[m][g])=="object"?(delete e[m][g].m,delete e[m][g].v,e[m][g].f!=null&&(delete e[m][g].f,p.delFunctionGroup(m,g,h.currentSheetIndex),delete e[m][g].spl),e[m][g].ct!=null&&e[m][g].ct.t=="inlineStr"&&delete e[m][g].ct):e[m][g]=null,(l==null?void 0:l[`${m}_${g}`])&&(delete l[`${m}_${g}`],a=!0))}Ze(e,h.luckysheet_select_save,a&&{hyperlink:l}),$("#luckysheet-rich-text-editor").html("")}}),$("#luckysheet-column-row-width-selected").click(function(e){if(e.target.nodeName==="INPUT")return;$("#luckysheet-rightclick-menu").hide(),rt();let n=parseInt($(this).closest(".luckysheet-cols-menuitem").find("input[type='number']").val().trim()),t=Q().info;if(isNaN(n)){U.info("\u53EA\u5141\u8BB8\u4F7F\u7528\u6570\u5B57\u6765\u8BBE\u7F6E\u884C\u5217\u7684\u5BBD\u9AD8!","");return}let l=$.extend(!0,{},h.config),a,o=null;if(h.luckysheetRightHeadClickIs=="row"){if(!$t(h.currentSheetIndex,"formatRows"))return;if(n<0||n>545){fe()?alert(t.tipRowHeightLimit):U.info(t.tipRowHeightLimit,"");return}a="resizeR",l.rowlen==null&&(l.rowlen={});for(let s=0;s<h.luckysheet_select_save.length;s++){let u=h.luckysheet_select_save[s].row[0],f=h.luckysheet_select_save[s].row[1];for(let d=u;d<=f;d++)l.rowlen[d]=n,o=Re.moveChangeSize("row",d,n)}}else if(h.luckysheetRightHeadClickIs=="column"){if(!$t(h.currentSheetIndex,"formatColumns"))return;if(n<0||n>2038){fe()?alert(t.tipColumnWidthLimit):U.info(t.tipColumnWidthLimit,"");return}a="resizeC",l.columnlen==null&&(l.columnlen={});for(let s=0;s<h.luckysheet_select_save.length;s++){let u=h.luckysheet_select_save[s].column[0],f=h.luckysheet_select_save[s].column[1];for(let d=u;d<=f;d++)l.columnlen[d]=n,o=Re.moveChangeSize("column",d,n)}}h.clearjfundo&&(h.jfundo.length=0,h.jfredo.push({type:"resize",ctrlType:a,sheetIndex:h.currentSheetIndex,config:$.extend(!0,{},h.config),curconfig:$.extend(!0,{},l),images:$.extend(!0,{},Re.images),curImages:$.extend(!0,{},o)})),h.config=l,h.luckysheetfile[Z(h.currentSheetIndex)].config=h.config,h.luckysheetfile[Z(h.currentSheetIndex)].images=o,ne.saveParam("all",h.currentSheetIndex,o,{k:"images"}),Re.images=o,Re.allImagesShow(),h.luckysheetRightHeadClickIs=="row"?(ne.saveParam("cg",h.currentSheetIndex,l.rowlen,{k:"rowlen"}),St(h.flowdata.length,null)):h.luckysheetRightHeadClickIs=="column"&&(ne.saveParam("cg",h.currentSheetIndex,l.columnlen,{k:"columnlen"}),St(null,h.flowdata[0].length))})}function Tb(){h.luckysheet_cols_change_size=!1,$("#luckysheet-change-size-line").hide(),$("#luckysheet-cols-change-size").css("opacity",0),$("#luckysheet-sheettable, #luckysheet-cols-h-c, .luckysheet-cols-h-cells, .luckysheet-cols-h-cells canvas").css("cursor","default");let e=nt(event.pageX,event.pageY),n=$("#luckysheet-cols-h-c").scrollLeft(),t=e[0]+n,l=wt(t)[2],a=xe.deepCopyFlowData(h.flowdata),o=$("#luckysheetTableContent").get(0).getContext("2d"),s=$.extend(!0,{},h.config);s.columnlen==null&&(s.columnlen={});let u={},f=$("#luckysheet-cell-main").scrollTop(),d=h.luckysheetTableContentHW[1],m=st(h.visibledatarow,f),g=st(h.visibledatarow,f+d);g+=g-m,g>=a.length&&(g=a.length-1);for(let y=0;y<h.luckysheet_select_save.length;y++){let v=h.luckysheet_select_save[y].column[0],b=h.luckysheet_select_save[y].column[1];if(l<v||l>b){if(l in u)continue;let k=h.defaultcollen;for(let w=m;w<=g;w++){let x=a[w][l];if(x==null||me(x.v)&&!_l(x))continue;let C=At(l)[1]-At(l)[0]-2,S=Sr(x,o,{r:w,c:l,cellWidth:C}),_=0;S!=null&&(_=S.textWidthAll),_+6>k&&(k=_+6)}k!=h.defaultcollen&&(s.columnlen[l]=k,s.customWidth&&delete s.customWidth[l]),u[l]=1}else for(let k=v;k<=b;k++){if(k in u)continue;let w=h.defaultcollen;for(let x=m;x<=g;x++){let C=a[x][k];if(C==null||me(C.v)&&!_l(C))continue;let S=At(k)[1]-At(k)[0]-2,_=Sr(C,o,{r:x,c:k,cellWidth:S}),T=0;_!=null&&(T=_.textWidthAll),T+6>w&&(w=T+6)}w!=h.defaultcollen&&(s.columnlen[k]=w,s.customWidth&&delete s.customWidth[k]),u[k]=1}}Zl(h.flowdata[0].length,h.flowdata.length,h.flowdata,s,h.luckysheet_select_save,"resizeC","columnlen")}var Im=Ie(()=>{on();Ur();qr();il();Qt();Ll();Zt();ft();Nt();Ol();Ft();Pa();Ut();fa();Yt();Kt();ll();Jt();bt();mr();Lr();gn();Ml();Xe();xl()});function Zo(e,n,t,l){if($("#luckysheet-formula-search-c").is(":visible")&&(e=="up"||e=="down")){let a;e=="down"?(a=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").next(),a.length==0&&(a=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").first())):e=="up"&&(a=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").prev(),a.length==0&&(a=$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").last())),$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"),a.addClass("luckysheet-formula-search-item-active"),l.preventDefault()}else if($("#luckysheet-formula-functionrange-select").is(":visible")){if(n&&t)an(e,"rangeOfFormula");else if(n)ca(e,"rangeOfFormula");else if(t){let a=e,o=1;e=="up"&&(a="down",o=-1),e=="left"&&(a="right",o=-1),Bn(a,o,"rangeOfFormula")}else{let a=e,o=1;e=="up"&&(a="down",o=-1),e=="left"&&(a="right",o=-1),jt(a,o,"rangeOfFormula")}l.preventDefault()}else if(p.israngeseleciton()){let a=$(window.getSelection().anchorNode);if(a.parent().next().text()==null||a.parent().next().text()==""){let o=$("#luckysheet-input-box #luckysheet-input-box-index").text(),s=p.getcellrange(o);s==null&&(s=p.getcellrange($("#luckysheet-input-box-index").text()));let u=s.row[0],f=s.row[1],d=s.column[0],m=s.column[1],g=h.visibledatarow[f],y=u-1==-1?0:h.visibledatarow[u-1],v=h.visibledatacolumn[m],b=d-1==-1?0:h.visibledatacolumn[d-1];if(p.func_selectedrange={left:b,width:v-b-1,top:y,height:g-y-1,left_move:b,width_move:v-b-1,top_move:y,height_move:g-y-1,row:[u,f],column:[d,m],row_focus:u,column_focus:d},p.rangeSetValue({row:[u,f],column:[d,m]}),p.rangestart=!0,p.rangedrag_column_start=!1,p.rangedrag_row_start=!1,n&&t)an(e,"rangeOfFormula");else if(n)ca(e,"rangeOfFormula");else if(t){let k=e,w=1;e=="up"&&(k="down",w=-1),e=="left"&&(k="right",w=-1),Bn(k,w,"rangeOfFormula")}else{let k=e,w=1;e=="up"&&(k="down",w=-1),e=="left"&&(k="right",w=-1),jt(k,w,"rangeOfFormula")}l.preventDefault()}}else if(!n&&!t){let a=$(window.getSelection().anchorNode),o=window.getSelection().anchorOffset;e=="up"?a.parent().is("span")&&a.parent().next().length==0&&o>0?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",-1,"rangeOfSelect"),l.preventDefault()):a.is("#luckysheet-rich-text-editor")&&a.context.childElementCount==o?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",-1,"rangeOfSelect"),l.preventDefault()):a.parent().is("#luckysheet-rich-text-editor")&&a.context.length==o&&(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",-1,"rangeOfSelect"),l.preventDefault()):e=="down"?a.parent().is("span")&&a.parent().next().length==0&&o>0?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",1,"rangeOfSelect"),l.preventDefault()):a.is("#luckysheet-rich-text-editor")&&a.context.childElementCount==o?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",1,"rangeOfSelect"),l.preventDefault()):a.parent().is("#luckysheet-rich-text-editor")&&a.context.length==o&&(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("down",1,"rangeOfSelect"),l.preventDefault()):e=="left"?a.parent().is("span")&&a.parent().prev().length==0&&o==0?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("right",-1,"rangeOfSelect"),l.preventDefault()):a.is("#luckysheet-rich-text-editor")&&o==1?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("right",-1,"rangeOfSelect"),l.preventDefault()):a.parent().is("#luckysheet-rich-text-editor")&&o==0?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("right",-1,"rangeOfSelect"),l.preventDefault()):p.rangeHightlightselected($("#luckysheet-rich-text-editor")):e=="right"&&(a.parent().is("span")&&a.parent().next().length==0&&o>0?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("right",1,"rangeOfSelect"),l.preventDefault()):a.is("#luckysheet-rich-text-editor")&&a.context.childElementCount==o?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("right",1,"rangeOfSelect"),l.preventDefault()):a.parent().is("#luckysheet-rich-text-editor")&&a.context.length==o?(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("right",1,"rangeOfSelect"),l.preventDefault()):p.rangeHightlightselected($("#luckysheet-rich-text-editor")))}}function Am(){let n=Q().drag;$("#luckysheet-input-box").click(function(){p.rangeHightlightselected($("#luckysheet-rich-text-editor"))}).add("#"+h.container).on("keydown",function(t){let l=t.ctrlKey,a=t.altKey,o=t.shiftKey,s=t.keyCode;if($("#luckysheet-modal-dialog-mask").is(":visible")||$(t.target).hasClass("luckysheet-mousedown-cancel")||$(t.target).hasClass("sp-input")||parseInt($("#luckysheet-input-box").css("top"))>0&&$(t.target).closest(".luckysheet-input-box").length>0&&s!=it.ENTER&&s!=it.TAB&&s!=it.UP&&s!=it.DOWN&&s!=it.LEFT&&s!=it.RIGHT){let f=$(window.getSelection().anchorNode);if((f.parent().is("#luckysheet-helpbox-cell")||f.is("#luckysheet-helpbox-cell"))&&s==it.ENTER){let d=$("#luckysheet-helpbox-cell").text();if(p.iscelldata(d)){let m=p.getcellrange(d);h.luckysheet_select_save=[{row:m.row,column:m.column,row_focus:m.row[0],column_focus:m.column[0]}],lt(),$("#luckysheet-helpbox-cell").blur();let g=$("#luckysheet-cell-main").scrollLeft(),y=$("#luckysheet-cell-main").scrollTop(),v=$("#luckysheet-cell-main").height(),b=$("#luckysheet-cell-main").width(),k=h.visibledatarow[m.row[1]],w=m.row[0]-1==-1?0:h.visibledatarow[m.row[0]-1],x=h.visibledatacolumn[m.column[1]],C=m.column[0]-1==-1?0:h.visibledatacolumn[m.column[0]-1];x-g-b+20>0?$("#luckysheet-scrollbar-x").scrollLeft(x-b+20):C-g-20<0&&$("#luckysheet-scrollbar-x").scrollLeft(C-20),k-y-v+20>0?$("#luckysheet-scrollbar-y").scrollTop(k-v+20):w-y-20<0&&$("#luckysheet-scrollbar-y").scrollTop(w-20)}}return}if($("#luckysheet-modal-dialog-mask").is(":visible")||$(t.target).hasClass("luckysheet-mousedown-cancel")||$(t.target).hasClass("formulaInputFocus"))return;let u=$("#luckysheet-input-box");if((a||t.metaKey)&&s==it.ENTER&&parseInt(u.css("top"))>0){let f=h.luckysheet_select_save[h.luckysheet_select_save.length-1],d=f.row_focus,m=f.column_focus;Nf(h.flowdata[d][m]),t.preventDefault()}else if(s==it.ENTER&&parseInt(u.css("top"))>0)$("#luckysheet-formula-search-c").is(":visible")&&p.searchFunctionCell!=null?p.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")):(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),h.luckysheet_select_save=[{row:[h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[0]],column:[h.luckysheetCellUpdate[1],h.luckysheetCellUpdate[1]],row_focus:h.luckysheetCellUpdate[0],column_focus:h.luckysheetCellUpdate[1]}],jt("down",1,"rangeOfSelect")),$("#luckysheet-search-formula-parm").is(":visible")&&$("#luckysheet-search-formula-parm").hide(),$("#luckysheet-search-formula-parm-select").is(":visible")&&$("#luckysheet-search-formula-parm-select").hide(),t.preventDefault();else if(s==it.TAB){if(parseInt(u.css("top"))>0)return;jt("right",1,"rangeOfSelect"),t.preventDefault()}else if(s==it.F2){if(parseInt(u.css("top"))>0)return;let f=h.luckysheet_select_save[h.luckysheet_select_save.length-1],d=f.row_focus,m=f.column_focus;Rl(d,m,h.flowdata),t.preventDefault()}else if(s==it.F4&&parseInt(u.css("top"))>0)p.setfreezonFuc(t),t.preventDefault();else if(s==it.ESC&&parseInt(u.css("top"))>0)p.dontupdate(),jt("down",0,"rangeOfSelect"),t.preventDefault();else if(s==it.ENTER){if($(t.target).hasClass("formulaInputFocus")||$("#luckysheet-conditionformat-dialog").is(":visible"))return;if(String.fromCharCode(s)!=null&&$("#luckysheet-cell-selected").is(":visible")){let f=h.luckysheet_select_save[h.luckysheet_select_save.length-1],d=f.row_focus,m=f.column_focus;Rl(d,m,h.flowdata),t.preventDefault()}}else if(l||t.metaKey){if(o){if(Rm||(h.luckysheet_shiftpositon=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),h.luckysheet_shiftkeydown=!0),s==it.UP){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;an("up","rangeOfSelect")}else if(s==it.DOWN){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;an("down","rangeOfSelect")}else if(s==it.LEFT){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;an("left","rangeOfSelect")}else if(s==it.RIGHT){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;an("right","rangeOfSelect")}else if(s==186||s==222){let f=h.luckysheet_select_save[h.luckysheet_select_save.length-1],d=f.row_focus,m=f.column_focus;Rl(d,m,h.flowdata,!0);let g=Yo(2);$("#luckysheet-rich-text-editor").html(g),_r($("#luckysheet-rich-text-editor")[0]),p.functionInputHanddler($("#luckysheet-functionbox-cell"),$("#luckysheet-rich-text-editor"),s)}}else if(s==66)$("#luckysheet-icon-bold").click();else if(s==67){if(Re.currentImgId!=null){Re.copyImgItem(t);return}if(ke.luckysheetPaintModelOn&&ke.cancelPaintModel(),h.luckysheet_select_save.length==0)return;if(h.config.merge!=null){let d=!1;for(let m=0;m<h.luckysheet_select_save.length;m++){let g=h.luckysheet_select_save[m].row[0],y=h.luckysheet_select_save[m].row[1],v=h.luckysheet_select_save[m].column[0],b=h.luckysheet_select_save[m].column[1];if(d=Mt(h.config,g,y,v,b),d)break}if(d){fe()?alert(n.noMerge):U.info(n.noMerge,"");return}}let f=h.luckysheetfile[Z(h.currentSheetIndex)].luckysheet_conditionformat_save;if(h.luckysheet_select_save.length>1&&f!=null&&f.length>0){let d=!1,m=$e.getComputeMap();e:for(let g=0;g<h.luckysheet_select_save.length&&!d;g++){let y=h.luckysheet_select_save[g].row[0],v=h.luckysheet_select_save[g].row[1],b=h.luckysheet_select_save[g].column[0],k=h.luckysheet_select_save[g].column[1];for(let w=y;w<=v;w++)for(let x=b;x<=k;x++)if($e.checksCF(w,x,m)!=null){d=!0;continue e}}if(d){fe()?alert(n.noMulti):U.info(n.noMulti,"");return}}if(h.luckysheet_select_save.length>1){let d=!0,m=h.luckysheet_select_save[0].row[0],g=h.luckysheet_select_save[0].row[1],y=!0,v=h.luckysheet_select_save[0].column[0],b=h.luckysheet_select_save[0].column[1];for(let k=1;k<h.luckysheet_select_save.length;k++)(h.luckysheet_select_save[k].row[0]!=m||h.luckysheet_select_save[k].row[1]!=g)&&(d=!1),(h.luckysheet_select_save[k].column[0]!=v||h.luckysheet_select_save[k].column[1]!=b)&&(y=!1);if(!d&&!y||Yr()){fe()?alert(n.noMulti):U.info(n.noMulti,"");return}}Ct.copy(t),h.luckysheet_paste_iscut=!1,Mr(),t.stopPropagation();return}else if(s==70)$n.createDialog(0),$n.init(),$("#luckysheet-search-replace #searchInput input").focus();else if(s==72)$n.createDialog(1),$n.init(),$("#luckysheet-search-replace #searchInput input").focus();else if(s==73)$("#luckysheet-icon-italic").click();else if(s==86){if(fe()||h.allowEdit===!1||$(t.target).hasClass("formulaInputFocus"))return;if(h.luckysheet_select_save.length>1){fe()?alert(n.noPaste):U.info(n.noPaste,"");return}Ct.isPasteAction=!0,Mr(),t.stopPropagation();return}else if(s==88){if(ke.luckysheetPaintModelOn&&ke.cancelPaintModel(),h.luckysheet_select_save.length==0)return;if(h.config.merge!=null){let f=!1;for(let d=0;d<h.luckysheet_select_save.length;d++){let m=h.luckysheet_select_save[d].row[0],g=h.luckysheet_select_save[d].row[1],y=h.luckysheet_select_save[d].column[0],v=h.luckysheet_select_save[d].column[1];if(f=Mt(h.config,m,g,y,v),f)break}if(f){de.editMode?alert(_locale_drag.noMerge):U.info(_locale_drag.noMerge,"");return}}if(h.luckysheet_select_save.length>1){fe()?alert(n.noMulti):U.info(n.noMulti,"");return}Ct.copy(t),h.luckysheet_paste_iscut=!0,Mr(),t.stopPropagation();return}else if(s==90){Tn.redo(t),Mr(),t.stopPropagation();return}else if(s==89){Tn.undo(t),Mr(),t.stopPropagation();return}else if(s==it.UP){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;ca("up","rangeOfSelect")}else if(s==it.DOWN){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;ca("down","rangeOfSelect")}else if(s==it.LEFT){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;ca("left","rangeOfSelect")}else if(s==it.RIGHT){if(parseInt(u.css("top"))>0||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;ca("right","rangeOfSelect")}else if(s==186){let f=h.luckysheet_select_save[h.luckysheet_select_save.length-1],d=f.row_focus,m=f.column_focus;Rl(d,m,h.flowdata,!0);let g=Yo(1);$("#luckysheet-rich-text-editor").html(g),_r($("#luckysheet-rich-text-editor")[0]),p.functionInputHanddler($("#luckysheet-functionbox-cell"),$("#luckysheet-rich-text-editor"),s)}else if(s==222){let f=h.luckysheet_select_save[h.luckysheet_select_save.length-1],d=f.row_focus,m=f.column_focus;Rl(d,m,h.flowdata,!0);let g=Yo(2);$("#luckysheet-rich-text-editor").html(g),_r($("#luckysheet-rich-text-editor")[0]),p.functionInputHanddler($("#luckysheet-functionbox-cell"),$("#luckysheet-rich-text-editor"),s)}else String.fromCharCode(s).toLocaleUpperCase()=="A"&&$("#luckysheet-left-top").click();t.preventDefault();return}else if(o&&(s==it.UP||s==it.DOWN||s==it.LEFT||s==it.RIGHT||a&&(s==53||s==101))){if(parseInt(u.css("top"))>0||$(t.target).hasClass("formulaInputFocus"))return;if(Rm||(h.luckysheet_shiftpositon=$.extend(!0,{},h.luckysheet_select_save[h.luckysheet_select_save.length-1]),h.luckysheet_shiftkeydown=!0),s==it.UP){if($("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;Bn("down",-1,"rangeOfSelect")}else if(s==it.DOWN){if($("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;Bn("down",1,"rangeOfSelect")}else if(s==it.LEFT){if($("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;Bn("right",-1,"rangeOfSelect")}else if(s==it.RIGHT){if($("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;Bn("right",1,"rangeOfSelect")}else a&&(s==53||s==101)&&$("#luckysheet-icon-strikethrough").click();t.preventDefault()}else if(s==it.ESC)ke.luckysheetPaintModelOn?ke.cancelPaintModel():(rl(t),t.preventDefault()),lt();else if(s==it.DELETE||s==it.BACKSPACE)Re.currentImgId!=null?Re.removeImgItem():$("#luckysheet-delete-text").click(),t.preventDefault();else if(s==8&&Re.currentImgId!=null)Re.removeImgItem(),t.preventDefault();else if(s==it.UP){if(parseInt(u.css("top"))>0||h.luckysheet_cell_selected_move||h.luckysheet_cell_selected_extend||$(t.target).hasClass("formulaInputFocus")||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;jt("down",-1,"rangeOfSelect"),t.preventDefault()}else if(s==it.DOWN){if(parseInt(u.css("top"))>0||h.luckysheet_cell_selected_move||h.luckysheet_cell_selected_extend||$(t.target).hasClass("formulaInputFocus")||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;jt("down",1,"rangeOfSelect"),t.preventDefault()}else if(s==it.LEFT){if(parseInt(u.css("top"))>0||h.luckysheet_cell_selected_move||h.luckysheet_cell_selected_extend||$(t.target).hasClass("formulaInputFocus")||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;jt("right",-1,"rangeOfSelect"),t.preventDefault()}else if(s==it.RIGHT){if(parseInt(u.css("top"))>0||h.luckysheet_cell_selected_move||h.luckysheet_cell_selected_extend||$(t.target).hasClass("formulaInputFocus")||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible"))return;jt("right",1,"rangeOfSelect"),t.preventDefault()}else if((!(s>=112&&s<=123||s<=46||s==144||s==108||t.ctrlKey||t.altKey||t.shiftKey&&(s==37||s==38||s==39||s==40))||s==8||s==32||s==46||s==0||t.ctrlKey&&s==86)&&String.fromCharCode(s)!=null&&$("#luckysheet-cell-selected").is(":visible")&&s!=it.CAPSLOCK&&s!=it.WIN&&s!=18){let f=h.luckysheet_select_save[h.luckysheet_select_save.length-1],d=f.row_focus,m=f.column_focus;Rl(d,m,h.flowdata,!0),s==8&&$("#luckysheet-rich-text-editor").html("<br/>"),p.functionInputHanddler($("#luckysheet-functionbox-cell"),$("#luckysheet-rich-text-editor"),s)}Mr(),t.stopPropagation()}),$("#"+h.container).add("#luckysheet-input-box").keydown(function(t){if($("#luckysheet-modal-dialog-mask").is(":visible")||$(t.target).hasClass("luckysheet-mousedown-cancel")||$(t.target).hasClass("formulaInputFocus"))return;let l=t.ctrlKey,a=t.altKey,o=t.shiftKey,s=t.keyCode,u=$("#luckysheet-input-box");s==it.ESC&&parseInt($("#luckysheet-input-box").css("top"))>0?(p.dontupdate(),jt("down",0,"rangeOfSelect"),t.preventDefault()):s==it.ENTER&&parseInt(u.css("top"))>0?$("#luckysheet-formula-search-c").is(":visible")&&p.searchFunctionCell!=null&&(p.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")),t.preventDefault()):s==it.TAB&&parseInt(u.css("top"))>0?($("#luckysheet-formula-search-c").is(":visible")&&p.searchFunctionCell!=null?p.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")):(p.updatecell(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1]),jt("right",1,"rangeOfSelect")),t.preventDefault()):s==it.F4&&parseInt(u.css("top"))>0?(p.setfreezonFuc(t),t.preventDefault()):s==it.UP&&parseInt(u.css("top"))>0?Zo("up",l,o,t):s==it.DOWN&&parseInt(u.css("top"))>0?Zo("down",l,o,t):s==it.LEFT&&parseInt(u.css("top"))>0?Zo("left",l,o,t):s==it.RIGHT&&parseInt(u.css("top"))>0?Zo("right",l,o,t):(!(s>=112&&s<=123||s<=46||s==144||s==108||t.ctrlKey||t.altKey||t.shiftKey&&(s==37||s==38||s==39||s==40||s==it.WIN||s==it.WIN_R||s==it.MENU))||s==8||s==32||s==46||t.ctrlKey&&s==86)&&(p.functionInputHanddler($("#luckysheet-functionbox-cell"),$("#luckysheet-rich-text-editor"),s),Yd(h.luckysheetCellUpdate[0],h.luckysheetCellUpdate[1],h.flowdata))}).keyup(function(t){let l=t.keyCode;!t.shiftKey&&l==16&&(h.luckysheet_shiftkeydown=!1,h.luckysheet_shiftpositon=null),parseInt($("#luckysheet-input-box").css("top"))>0&&(l==13||l==16||l==32),t.preventDefault()}),$("#luckysheet_info_detail_input").val(ne.title).css("width",ya(ne.title)*10).keydown(function(){let t=event.ctrlKey,l=event.altKey,a=event.shiftKey,o=event.keyCode,s=$(this);o==it.ENTER&&s.blur().change()}).bind("input propertychange",function(){let t=$(this),l=ya(t.val())*10,a=$("#luckysheet_info_detail_update").outerWidth(),o=$("#luckysheet_info_detail_save").outerWidth(),s=$("#luckysheet_info_detail_user").parent().outerWidth()+60,u=$("#"+h.container).outerWidth(),f=100,d=u-o-a-s-f;l>d?$("#luckysheet_info_detail_input").css("width",d):$("#luckysheet_info_detail_input").css("width",l)}).change(function(){ne.saveParam("na",null,$(this).val())}),$("#"+h.container).add("input.luckysheet-mousedown-cancel").keydown(function(t){let l=t.target.closest(".luckysheet-cols-menuitem");typeof l!="undefined"&&l!=null&&t.keyCode===13&&$(l).trigger("click")})}var Rm,Dm=Ie(()=>{xl();il();gr();Qt();ba();Gt();za();Zt();Wa();Gc();Mo();qr();ft();Nt();Ft();pn();Ut();Vr();ll();bt();gn();Xe();Rm=!1});function Mm(){let e=Q();$("#luckysheetorderbyasc, #luckysheetorderbyasc_t").mousedown(function(t){rl(t),ac(h.orderbyindex,!0),lt()}),$("#luckysheetorderbydesc, #luckysheetorderbydesc_t").click(function(t){rl(t),ac(h.orderbyindex,!1),lt()});let n=!0;$("#luckysheetorderby").click(function(){if(!$t(h.currentSheetIndex,"sort"))return;$("body .luckysheet-cols-menu").hide();let t=e.sort;if(h.luckysheet_select_save.length>1){fe()?alert(t.noRangeError):U.info(t.noRangeError,"");return}let l=h.luckysheet_select_save[0],a=l.row[0],o=l.row[1],s=l.column[0],u=l.column[1];if(n){n=!1;let w=`<div style="overflow: hidden;" class="luckysheet-sort-modal"><div><label><input type="checkbox" id="luckysheet-sort-haveheader"/><span>${t.hasTitle}</span></label></div><div style="overflow-y:auto;" id="luckysheet-sort-dialog-tablec"><table data-itemcount="0" cellspacing="0"> <tr><td>${t.hasTitle} <select name="sort_0"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> </td> <td> <div><label><input value="asc" type="radio" checked="checked" name="sort_0"><span>${t.asc}A-Z</span></label></div> <div><label><input value="desc" type="radio" name="sort_0"><span>${t.desc}Z-A</span></label></div></td></tr></table></div><div style="background: #e5e5e5;border-top: 1px solid #f5f5f5; height: 1px; width: 100%;margin:2px 0px;margin-bottom:10px;"></div> <div> <span style="font-weight: bold; text-decoration: underline;text-align:center;color: blue;cursor: pointer;" class="luckysheet-sort-dialog-additem">+ ${t.addOthers}</span> </div> </div>`;$("body").append(_e(dt,{id:"luckysheet-sort-dialog",addclass:"",title:e.sort.sortTitle,content:w,botton:`<button id="luckysheet-sort-modal-confirm" class="btn btn-primary">${t.confirm}</button><button class="btn btn-default luckysheet-model-close-btn">${t.close}</button>`})),$("#luckysheet-sort-dialog .luckysheet-sort-dialog-additem").click(function(){let x=h.luckysheet_select_save[0],C=x.row[0],S=x.row[1],_=x.column[0],T=x.column[1],A="",R=$("#luckysheet-sort-dialog table").data("itemcount")+1,I=$("#luckysheet-sort-haveheader").is(":checked");for(let F=_;F<=T;F++)if(I){let z=ze(C,F,h.flowdata,"m");z==null&&(z=t.columnOperation+(F-_+1)),A+='<option value="'+F+'">'+z+"</option>"}else A+='<option value="'+F+'">'+tt(F)+"</option>";$("#luckysheet-sort-dialog table").append(` |
| | | <tr class="luckysheet-sort-dialog-tr"> |
| | | <td><span class="luckysheet-sort-item-close" onclick="$(this).parent().parent().remove();"><i class="fa fa-times" |
| | | aria-hidden="true"></i></span>${t.secondaryTitle} <select |
| | |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | `),$("#luckysheet-sort-dialog table").data("itemcount",R)}),$("#luckysheet-sort-haveheader").change(function(){let x=h.luckysheet_select_save[0],C=x.row[0],S=x.row[1],_=x.column[0],T=x.column[1],A=$(this).is(":checked"),R="";for(let I=_;I<=T;I++)if(A){let F=ze(C,I,h.flowdata,"m");F==null&&(F=t.columnOperation+(I-_+1)),R+='<option value="'+I+'">'+F+"</option>"}else R+='<option value="'+I+'">'+tt(I)+"</option>";$("#luckysheet-sort-dialog tr select").each(function(){$(this).html(R)})}),$("#luckysheet-sort-modal-confirm").click(function(){if(h.luckysheet_select_save.length>1){de()?alert(t.noRangeError):U.info(t.noRangeError,"");return}let x=xe.deepCopyFlowData(h.flowdata),C=h.luckysheet_select_save[0],S=C.row[0],_=C.row[1],T=C.column[0],A=C.column[1],R=$("#luckysheet-sort-haveheader").is(":checked"),I;R?I=S+1:I=S;let F=!1,z=[];for(let E=I;E<=_;E++){let N=[];for(let L=T;L<=A;L++){if(x[E][L]!=null&&x[E][L].mc!=null){F=!0;break}N.push(x[E][L])}z.push(N)}if(F){de()?alert(t.mergeError):U.info(t.mergeError,"");return}$($("#luckysheet-sort-dialog table tr").toArray().reverse()).each(function(){let E=$(this).find("select").val(),N=$(this).find("input:radio:checked").val();E-=T,N=="asc"?N=!0:N=!1,z=Hr([].concat(z),E,N)});for(let E=I;E<=_;E++)for(let N=T;N<=A;N++)x[E][N]=z[E-I][N-T];let M={};if(h.config.rowlen!=null){let E=$.extend(!0,{},h.config);E=yl(x,I,_,E),M={cfg:E,RowlChange:!0}}Ze(x,[{row:[I,_],column:[T,A]}],M),$("#luckysheet-sort-dialog").hide(),$("#luckysheet-modal-dialog-mask").hide()})}let d="";for(let w=s;w<=u;w++)d+='<option value="'+w+'">'+tt(w)+"</option>";$("#luckysheet-sort-dialog select").html(d),$("#luckysheet-sort-dialog .luckysheet-sort-dialog-tr").remove(),$("#luckysheet-sort-haveheader").prop("checked",!1),$("#luckysheet-sort-dialog input:radio:first").prop("checked","checked"),$("#luckysheet-sort-dialog .luckysheet-modal-dialog-title-text").html(t.sortRangeTitle+"<span>"+tt(s)+(a+1)+"</span>"+t.sortRangeTitleTo+"<span>"+tt(u)+(o+1)+"</span>");let f=$("#luckysheet-sort-dialog"),m=f.outerHeight(),g=f.outerWidth(),y=$(window).width(),v=$(window).height(),b=$(document).scrollLeft(),k=$(document).scrollTop();$("#luckysheet-sort-dialog-tablec").css("max-height",(v-m)/2),$("#luckysheet-sort-dialog").css({left:(y+b-g)/2,top:(v+k-m)/2}).show(),$("#luckysheet-modal-dialog-mask").show(),a<o&&setTimeout(function(){let w=h.flowdata[a],x=h.flowdata[a+1],C=!1;for(let S=s;S<=u;S++){let _=tr(w[S]),T=tr(x[S]);_!=T&&(C=!0)}C&&$("#luckysheet-sort-haveheader").prop("checked",!0).change()},10)})}var Fm=Ie(()=>{Gt();Zt();Ml();dt();mr();Ft();Vr();Yt();Kt();ua();ll();Jt();Or();Xe();bt()});function Em(e,n){Ro($b),Io(Sb,null,function(){})}var Sb,$b,Nm=Ie(()=>{dt();Sb=["http://localhost:8080/luckysheetPluginPrint.umd.js"],$b=["http://localhost:8080/luckysheetPluginPrint.css"]});function Pm(e,n){e.length&&e.forEach(t=>{Ib[t](n,Rb)})}var Ib,Rb,Lm=Ie(()=>{$o();Nm();Ib={chart:If,print:Em},Rb=!0});var j,Ui,Ab,zm,Om=Ie(()=>{xl();Oi();yc();Nt();il();uc();Ut();Li();Jt();Or();Ft();Yt();Al();ua();Kt();dt();Xe();j=Fl(vn()),Ui=Fl(sa()),Ab={SUM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else if(B(l))t.push(l);else if(P(l)=="boolean")l.toString().toLowerCase()=="true"?t.push(1):l.toString().toLowerCase()=="false"&&t.push(0);else return p.error.v}var a=0;if(t.length>0)for(var e=0;e<t.length;e++){if(H(t[e]))return t[e];!B(t[e])||(a=Tt(a,"+",t[e]))}return a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},AVERAGE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array")if(P(l[0])=="array"){if(!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else t=t.concat(l);else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"text",!0)):t.push(l)}for(var a=0,o=0,e=0;e<t.length;e++){if(H(t[e]))return t[e];if(!B(t[e]))return p.error.v;a=Tt(a,"+",t[e]),o++}return o==0?p.error.d:Tt(a,"/",o)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},COUNT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array")if(P(l[0])=="array"){if(!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else t=t.concat(l);else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"text",!0)):P(l)=="boolean"?l.toString().toLowerCase()=="true"?t.push(1):l.toString().toLowerCase()=="false"&&t.push(0):t.push(l)}for(var a=0,e=0;e<t.length;e++)B(t[e])&&a++;return a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},COUNTA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array")if(P(l[0])=="array"){if(!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l))}else t=t.concat(l);else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"text",!0)):t.push(l)}return t.length}catch(a){return a=p.errorInfo(a),[p.error.v,a]}},MAX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array")if(P(l[0])=="array"){if(!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else t=t.concat(l);else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!0)):t.push(l)}for(var a=null,e=0;e<t.length;e++){if(H(t[e]))return t[e];!B(t[e])||(a==null||parseFloat(t[e])>a)&&(a=parseFloat(t[e]))}return a==null?0:a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},MIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array")if(P(l[0])=="array"){if(!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else t=t.concat(l);else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!0)):t.push(l)}for(var a=null,e=0;e<t.length;e++){if(H(t[e]))return t[e];!B(t[e])||(a==null||parseFloat(t[e])<a)&&(a=parseFloat(t[e]))}return a==null?0:a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},AGE_BY_IDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!window.luckysheet_function.ISIDCARD.f(t))return p.error.v;var l=window.luckysheet_function.BIRTHDAY_BY_IDCARD.f(t);if(H(l))return l;l=(0,j.default)(l);var a=(0,j.default)();if(arguments.length==2){if(a=D.getFirstValue(arguments[1]),H(a))return a;a=(0,j.default)(a)}var o=a.diff(l,"years");return o<0||o.toString()=="NaN"?p.error.v:o}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},SEX_BY_IDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]).toString();return H(t)?t:window.luckysheet_function.ISIDCARD.f(t)?parseInt(t.substr(16,1))%2==1?"\u7537":"\u5973":p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},BIRTHDAY_BY_IDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]).toString();if(H(t))return t;if(!window.luckysheet_function.ISIDCARD.f(t))return p.error.v;var l="";if(t.length==15){var a="19"+t.substring(6,8)+"/"+t.substring(8,10)+"/"+t.substring(10,12);l=a}else if(t.length==18){var a=t.substring(6,10)+"/"+t.substring(10,12)+"/"+t.substring(12,14);l=a}var o=0;if(arguments[1]!=null&&(o=D.getFirstValue(arguments[1]),H(o)))return o;if(!B(o))return p.error.v;if(o=parseInt(o),o<0||o>2)return p.error.v;if(parseInt(o)==0)return l;if(parseInt(o)==1)return(0,j.default)(l).format("YYYY-MM-DD");if(parseInt(o)==2)return(0,j.default)(l).format("YYYY\u5E74M\u6708D\u65E5")}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},PROVINCE_BY_IDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]).toString();if(H(t))return t;if(!window.luckysheet_function.ISIDCARD.f(t))return p.error.v;var l="\u672A\u77E5",a=p.classlist.province;return t.substring(0,2)in a&&(l=a[t.substring(0,2)]),l}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},CITY_BY_IDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]).toString();if(H(t))return t;if(!window.luckysheet_function.ISIDCARD.f(t))return p.error.v;for(var l=cityData.length,a="\u672A\u77E5",e=0;e<l;e++)if(t.substring(0,6)==cityData[e].code){a=cityData[e].title;break}return a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},STAR_BY_IDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!window.luckysheet_function.ISIDCARD.f(t))return p.error.v;var l=window.luckysheet_function.BIRTHDAY_BY_IDCARD.f(t);if(H(l))return l;l=new Date(l);var a=l.getMonth(),o=l.getDate(),s=new Date(1999,a,o,0,0,0),u=[];u.push(["\u9B54\u7FAF\u5EA7",new Date(1999,0,1,0,0,0)]),u.push(["\u6C34\u74F6\u5EA7",new Date(1999,0,20,0,0,0)]),u.push(["\u53CC\u9C7C\u5EA7",new Date(1999,1,19,0,0,0)]),u.push(["\u767D\u7F8A\u5EA7",new Date(1999,2,21,0,0,0)]),u.push(["\u91D1\u725B\u5EA7",new Date(1999,3,21,0,0,0)]),u.push(["\u53CC\u5B50\u5EA7",new Date(1999,4,21,0,0,0)]),u.push(["\u5DE8\u87F9\u5EA7",new Date(1999,5,22,0,0,0)]),u.push(["\u72EE\u5B50\u5EA7",new Date(1999,6,23,0,0,0)]),u.push(["\u5904\u5973\u5EA7",new Date(1999,7,23,0,0,0)]),u.push(["\u5929\u79E4\u5EA7",new Date(1999,8,23,0,0,0)]),u.push(["\u5929\u874E\u5EA7",new Date(1999,9,23,0,0,0)]),u.push(["\u5C04\u624B\u5EA7",new Date(1999,10,22,0,0,0)]),u.push(["\u9B54\u7FAF\u5EA7",new Date(1999,11,22,0,0,0)]);for(var e=u.length-1;e>=0;e--)if(s>=u[e][1])return u[e][0];return"\u672A\u627E\u5230\u5339\u914D\u661F\u5EA7\u4FE1\u606F"}catch(f){var d=f;return d=p.errorInfo(d),[p.error.v,d]}},ANIMAL_BY_IDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!window.luckysheet_function.ISIDCARD.f(t))return p.error.v;var l=window.luckysheet_function.BIRTHDAY_BY_IDCARD.f(t);if(H(l))return l;l=new Date(l);var a=new Array("\u732A","\u9F20","\u725B","\u864E","\u5154","\u9F99","\u86C7","\u9A6C","\u7F8A","\u7334","\u9E21","\u72D7"),o=(parseInt(l.getFullYear())+9)%12;return o!=null&&!isNaN(o)?a[o]:"\u672A\u627E\u5230\u5339\u914D\u751F\u8096\u4FE1\u606F"}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},ISIDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;return!!l.test(t)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},DM_TEXT_CUTWORD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0],"text");if(H(o))return o;var s=0;return arguments[1]!=null&&(s=D.getFirstValue(arguments[1]),H(s))?s:B(s)?(s=parseInt(s),s!=0&&s!=1&&s!=2?p.error.v:($.post("/dataqk/tu/api/cutword",{text:o,type:s},function(d){var f=[].concat(h.flowdata);p.execFunctionGroup(t,l,d),f[t][l]={v:d,f:a},Ze(f,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},DM_TEXT_TFIDF:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0],"text");if(H(o))return o;var s=20;if(arguments[1]!=null&&(s=D.getFirstValue(arguments[1]),H(s)))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=0;return arguments[2]!=null&&(u=D.getFirstValue(arguments[2]),H(u))?u:B(u)?(u=parseInt(u),s<0?p.error.v:u!=0&&u!=1&&u!=2?p.error.v:($.post("/dataqk/tu/api/tfidf",{text:o,count:s,set:u},function(f){var m=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(t,l,f),m[t][l]={v:f,f:a},Ze(m,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(f){var d=f;return d=p.errorInfo(d),[p.error.v,d]}},DM_TEXT_TEXTRANK:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0],"text");if(H(o))return o;var s=20;if(arguments[1]!=null&&(s=D.getFirstValue(arguments[1]),H(s)))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=0;return arguments[2]!=null&&(u=D.getFirstValue(arguments[2]),H(u))?u:B(u)?(u=parseInt(u),s<0?p.error.v:u!=0&&u!=1&&u!=2?p.error.v:($.post("/dataqk/tu/api/tfidf",{text:o,count:s,set:u},function(f){var m=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(t,l,f),m[t][l]={v:f,f:a},Ze(m,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(f){var d=f;return d=p.errorInfo(d),[p.error.v,d]}},DATA_CN_STOCK_CLOSE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0]);if(H(o))return o;var s=null;if(arguments[1]!=null){var u=arguments[1];if(P(u)=="array")return p.error.v;if(P(u)=="object"&&u.startCell!=null)if(u.data!=null&&P(u.data)!="array"&&u.data.ct!=null&&u.data.ct.t=="d")s=mt("yyyy-mm-dd",u.data.v);else return p.error.v;else s=u;if(!Lt(s))return[p.error.v,"\u65E5\u671F\u9519\u8BEF"];s=(0,j.default)(s).format("YYYY-MM-DD")}var d=0;return arguments[2]!=null&&(d=D.getFirstValue(arguments[2]),H(d))?d:B(d)?(d=parseInt(d),d!=0&&d!=1&&d!=2?p.error.v:($.post("/dataqk/tu/api/getstockinfo",{stockCode:o,date:s,price:d,type:"0"},function(m){var g=xe.deepCopyFlowData(h.flowdata),y=Il(m);y==null&&(y=m),p.execFunctionGroup(t,l,y),g[t][l]={v:y,f:a},Ze(g,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},DATA_CN_STOCK_OPEN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0]);if(H(o))return o;var s=null;if(arguments[1]!=null){var u=arguments[1];if(P(u)=="array")return p.error.v;if(P(u)=="object"&&u.startCell!=null)if(u.data!=null&&P(u.data)!="array"&&u.data.ct!=null&&u.data.ct.t=="d")s=mt("yyyy-mm-dd",u.data.v);else return p.error.v;else s=u;if(!Lt(s))return[p.error.v,"\u65E5\u671F\u9519\u8BEF"];s=(0,j.default)(s).format("YYYY-MM-DD")}var d=0;return arguments[2]!=null&&(d=D.getFirstValue(arguments[2]),H(d))?d:B(d)?(d=parseInt(d),d!=0&&d!=1&&d!=2?p.error.v:($.post("/dataqk/tu/api/getstockinfo",{stockCode:o,date:s,price:d,type:"1"},function(m){var g=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(t,l,m),g[t][l]={v:m,f:a},Ze(g,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},DATA_CN_STOCK_MAX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0]);if(H(o))return o;var s=null;if(arguments[1]!=null){var u=arguments[1];if(P(u)=="array")return p.error.v;if(P(u)=="object"&&u.startCell!=null)if(u.data!=null&&P(u.data)!="array"&&u.data.ct!=null&&u.data.ct.t=="d")s=mt("yyyy-mm-dd",u.data.v);else return p.error.v;else s=u;if(!Lt(s))return[p.error.v,"\u65E5\u671F\u9519\u8BEF"];s=(0,j.default)(s).format("YYYY-MM-DD")}var d=0;return arguments[2]!=null&&(d=D.getFirstValue(arguments[2]),H(d))?d:B(d)?(d=parseInt(d),d!=0&&d!=1&&d!=2?p.error.v:($.post("/dataqk/tu/api/getstockinfo",{stockCode:o,date:s,price:d,type:"2"},function(m){var g=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(t,l,m),g[t][l]={v:m,f:a},Ze(g,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},DATA_CN_STOCK_MIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0]);if(H(o))return o;var s=null;if(arguments[1]!=null){var u=arguments[1];if(P(u)=="array")return p.error.v;if(P(u)=="object"&&u.startCell!=null)if(u.data!=null&&P(u.data)!="array"&&u.data.ct!=null&&u.data.ct.t=="d")s=mt("yyyy-mm-dd",u.data.v);else return p.error.v;else s=u;if(!Lt(s))return[p.error.v,"\u65E5\u671F\u9519\u8BEF"];s=(0,j.default)(s).format("YYYY-MM-DD")}var d=0;return arguments[2]!=null&&(d=D.getFirstValue(arguments[2]),H(d))?d:B(d)?(d=parseInt(d),d!=0&&d!=1&&d!=2?p.error.v:($.post("/dataqk/tu/api/getstockinfo",{stockCode:o,date:s,price:d,type:"3"},function(m){var g=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(t,l,m),g[t][l]={v:m,f:a},Ze(g,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},DATA_CN_STOCK_VOLUMN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0]);if(H(o))return o;var s=null;if(arguments[1]!=null){var u=arguments[1];if(P(u)=="array")return p.error.v;if(P(u)=="object"&&u.startCell!=null)if(u.data!=null&&P(u.data)!="array"&&u.data.ct!=null&&u.data.ct.t=="d")s=mt("yyyy-mm-dd",u.data.v);else return p.error.v;else s=u;if(!Lt(s))return[p.error.v,"\u65E5\u671F\u9519\u8BEF"];s=(0,j.default)(s).format("YYYY-MM-DD")}var d=0;return arguments[2]!=null&&(d=D.getFirstValue(arguments[2]),H(d))?d:B(d)?(d=parseInt(d),d!=0&&d!=1&&d!=2?p.error.v:($.post("/dataqk/tu/api/getstockinfo",{stockCode:o,date:s,price:d,type:"4"},function(m){var g=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(t,l,m),g[t][l]={v:m,f:a},Ze(g,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},DATA_CN_STOCK_AMOUNT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0]);if(H(o))return o;var s=null;if(arguments[1]!=null){var u=arguments[1];if(P(u)=="array")return p.error.v;if(P(u)=="object"&&u.startCell!=null)if(u.data!=null&&P(u.data)!="array"&&u.data.ct!=null&&u.data.ct.t=="d")s=mt("yyyy-mm-dd",u.data.v);else return p.error.v;else s=u;if(!Lt(s))return[p.error.v,"\u65E5\u671F\u9519\u8BEF"];s=(0,j.default)(s).format("YYYY-MM-DD")}var d=0;return arguments[2]!=null&&(d=D.getFirstValue(arguments[2]),H(d))?d:B(d)?(d=parseInt(d),d!=0&&d!=1&&d!=2?p.error.v:($.post("/dataqk/tu/api/getstockinfo",{stockCode:o,date:s,price:d,type:"5"},function(m){var g=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(t,l,m),g[t][l]={v:m,f:a},Ze(g,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},ISDATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:Lt(t)}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},SUMIF:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=0,l=arguments[0].data,a=arguments[0].rowl,o=arguments[0].coll,s=Xa(arguments[1]);if(l=p.getRangeArray(l)[0],arguments[2]){var u=[],d=arguments[2].startCell,f=arguments[2].rowl,m=arguments[2].coll,g=arguments[2].sheetName;if(a==f&&o==m)u=arguments[2].data;else{var y=[],v=[],b="",k="";y[0]=parseInt(d.replace(/[^0-9]/g,""))-1,v[0]=hl(d.replace(/[^A-Za-z]/g,"")),y[1]=y[0]+a-1,v[1]=v[0]+o-1;var w=tt(v[1]),x=y[1]+1;b=w+x,k=g+"!"+d+":"+b,u=ar(k).data}u=p.getRangeArray(u)[0];for(var e=0;e<l.length;e++){var C=l[e];if(!!C&&p.acompareb(C,s)){if(!B(u[e]))continue;t=Tt(t,"+",u[e])}}}else for(var e=0;e<l.length;e++){var C=l[e];if(!!C&&p.acompareb(C,s)){if(!B(C))continue;t=Tt(t,"",C)}}return t}catch(_){var S=_;return S=p.errorInfo(S),[p.error.v,S]}},TAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),Math.tan(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},TANH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=Math.exp(2*t);return(l-1)/(l+1)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},CEILING:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),l==0?0:t>0&&l<0?p.error.nm:Math.ceil(t/l)*l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ATAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),Math.atan(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ASINH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),Math.log(t+Math.sqrt(t*t+1))):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ABS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),Math.abs(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ACOS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<-1||t>1?p.error.nm:Math.acos(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ACOSH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<1?p.error.nm:Math.log(t+Math.sqrt(t*t-1))):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},MULTINOMIAL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!0)):t.push(l)}for(var a=0,o=1,e=0;e<t.length;e++){var s=t[e];if(!B(s))return p.error.v;if(s=parseFloat(s),s<0)return p.error.nm;a+=s,o*=D.factorial(s)}return D.factorial(a)/o}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},ATANH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<=-1||t>=1?p.error.nm:Math.log((1+t)/(1-t))/2):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ATAN2:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t==0&&l==0?p.error.d:Math.atan2(l,t)):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},COUNTBLANK:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=0;if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return 1;if(P(t.data)=="array")for(var a=0;a<t.data.length;a++)for(var o=0;o<t.data[a].length;o++)(t.data[a][o]==null||me(t.data[a][o].v))&&l++;else me(t.data.v)&&l++}return l}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},COSH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),(Math.exp(t)+Math.exp(-t))/2):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},INT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0];if(P(t)=="array")return P(t[0])=="array"?D.isDyadicArr(t)?B(t[0][0])?Math.floor(parseFloat(t[0][0])):p.error.v:p.error.v:B(t[0])?Math.floor(parseFloat(t[0])):p.error.v;if(P(t)=="object"&&t.startCell!=null){if(t.coll>1)return p.error.v;if(t.rowl>1){var l=p.getcellrange(t.startCell),a=l.row[0];if(window.luckysheetCurrentRow<a||window.luckysheetCurrentRow>a+t.rowl-1)return p.error.v;var o=t.data[window.luckysheetCurrentRow-a][0]}else var o=t.data;return o==null||me(o.v)?0:B(o.v)?Math.floor(parseFloat(o.v)):p.error.v}else{if(P(t)=="boolean"){if(t.toString().toLowerCase()=="true")return 1;if(t.toString().toLowerCase()=="false")return 0}return B(t)?Math.floor(parseFloat(t)):p.error.v}}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},ISEVEN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseInt(t),!(Math.abs(t)&1)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ISODD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseInt(t),!!(Math.abs(t)&1)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},LCM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array")if(P(l[0])=="array"){if(!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l))}else t=t.concat(l);else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!0)):t.push(l)}for(var a=0;a<t.length;a++){var o=t[a];if(!B(o))return p.error.v;if(o=parseInt(o),o<0)return p.error.nm;t[a]=o}for(var e,s,u,d,f=1;(u=t.pop())!==void 0;)for(u==0&&(f=0);u>1;){if(u%2){for(e=3,s=Math.floor(Math.sqrt(u));e<=s&&u%e;e+=2);d=e<=s?e:u}else d=2;for(u/=d,f*=d,e=t.length;e;t[--e]%d==0&&(t[e]/=d)===1&&t.splice(e,1));}return f>=Math.pow(2,53)?p.error.nm:f}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},LN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<=0?p.error.nm:Math.log(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},LOG:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;if(t=parseFloat(t),t<=0)return p.error.nm;if(arguments.length==2){var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;if(l=parseFloat(l),l<=0)return p.error.nm}else var l=10;return Math.log(t)/Math.log(l)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},LOG10:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<=0?p.error.nm:Math.log(t)/Math.log(10)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},MOD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;if(l=parseFloat(l),l==0)return p.error.d;var a=Math.abs(t%l);return l>0?a:-a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},MROUND:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t*l<0?p.error.nm:Math.round(t/l)*l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ODD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=Math.ceil(Math.abs(t));return l=l&1?l:l+1,t>=0?l:-l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},SUMSQ:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!0)):t.push(l)}var a=0;if(t.length>0)for(var e=0;e<t.length;e++){var o=t[e];if(!B(o))return p.error.v;o=parseFloat(o),a+=o*o}return a}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},COMBIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t<0||l<0||t<l?p.error.nm:D.factorial(t)/(D.factorial(l)*D.factorial(t-l))):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},SUBTOTAL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let m=function(g){switch(g){case 1:case 101:return window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE,s);case 2:case 102:return window.luckysheet_function.COUNT.f.apply(window.luckysheet_function.COUNT,s);case 3:case 103:return window.luckysheet_function.COUNTA.f.apply(window.luckysheet_function.COUNTA,s);case 4:case 104:return window.luckysheet_function.MAX.f.apply(window.luckysheet_function.MAX,s);case 5:case 105:return window.luckysheet_function.MIN.f.apply(window.luckysheet_function.MIN,s);case 6:case 106:return window.luckysheet_function.PRODUCT.f.apply(window.luckysheet_function.PRODUCT,s);case 7:case 107:return window.luckysheet_function.STDEVA.f.apply(window.luckysheet_function.STDEVA,s);case 8:case 108:return window.luckysheet_function.STDEVP.f.apply(window.luckysheet_function.STDEVP,s);case 9:case 109:return window.luckysheet_function.SUM.f.apply(window.luckysheet_function.SUM,s);case 10:case 110:return window.luckysheet_function.VAR_S.f.apply(window.luckysheet_function.VAR_S,s);case 11:case 111:return window.luckysheet_function.VAR_P.f.apply(window.luckysheet_function.VAR_P,s)}};var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=[];for(var e=0;e<t.length;e++){for(var a=[],o=0;o<t[e].length;o++)a.push(t[e][o]);l.push(a)}}else{l=[];for(var e=0;e<t.length;e++)l.push(t[e])}else P(t)=="object"&&t.startCell!=null?l=D.getFirstValue(t):l=t;var s=Array.prototype.slice.apply(arguments);if(s.shift(),P(l)=="array"){var u=[];if(P(l[0])=="array")for(var e=0;e<l.length;e++){for(var a=[],o=0;o<l[e].length;o++){var d=l[e][o];H(d)?a.push(d):B(d)?(d=parseInt(d),d<1||d>111||d>11&&d<101?a.push(p.error.v):a.push(m(d))):a.push(p.error.v)}u.push(a)}else for(var e=0;e<l.length;e++){var d=l[e];H(d)?u.push(d):B(d)?(d=parseInt(d),d<1||d>111||d>11&&d<101?u.push(p.error.v):u.push(m(d))):u.push(p.error.v)}return u}else return H(l)?l:B(l)?(l=parseInt(l),l<1||l>111||l>11&&l<101?p.error.v:m(l)):p.error.v}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},ASIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<-1||t>1?p.error.nm:Math.asin(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},COUNTIF:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let m=function(g,y){/[<>=!*?]/.test(y)||(y='=="'+y+'"'),y=y.replace("<>","!=");var v=0;if(P(g)=="array"){for(var b=0;b<g.length;b++)for(var k=0;k<g[b].length;k++)if(g[b][k]!=null&&!me(g[b][k].v)){var w=g[b][k].v;y.indexOf("*")>-1||y.indexOf("?")>-1?p.isWildcard(w,y)&&v++:typeof w!="string"?new Function("return "+w+y)()&&v++:new Function('return "'+w+'"'+y)()&&v++}}else if(g!=null&&!me(g.v)){var w=g.v;y.indexOf("*")>-1||y.indexOf("?")>-1?p.isWildcard(w,y)&&v++:typeof w!="string"?new Function("return "+w+y)()&&v++:new Function('return "'+w+'"'+y)()&&v++}return v};var t=arguments[0],l;if(P(t)=="object"&&t.startCell!=null)l=t.data;else return p.error.v;var a=arguments[1],o;if(P(a)=="array")if(o=[],P(a[0])=="array"){if(!D.isDyadicArr(a))return p.error.v;for(var e=0;e<a.length;e++){for(var s=[],u=0;u<a[e].length;u++)s.push(a[e][u]);o.push(s)}}else for(var e=0;e<a.length;e++)o.push(a[e]);else if(P(a)=="object"&&a.startCell!=null){if(a.rowl>1||a.coll>1)return 0;o=a.data.v}else o=a;if(P(o)=="array"){var d=[];if(P(o[0])=="array")for(var e=0;e<o.length;e++){for(var s=[],u=0;u<o[e].length;u++)s.push(m(l,o[e][u]));d.push(s)}else for(var e=0;e<o.length;e++)d.push(m(l,o[e]));return d}else return m(l,o)}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},RADIANS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t*Math.PI/180):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},RAND:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;try{return Math.floor(Math.random()*1e9)/1e9}catch(n){var e=n;return e=p.errorInfo(e),[p.error.v,e]}},COUNTUNIQUE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"text",!0)):t.push(l)}return window.luckysheet_function.UNIQUE.f(t)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},DEGREES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t*180/Math.PI):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ERFC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),jStat.erfc(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},EVEN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=Math.ceil(Math.abs(t));return l=l&1?l+1:l,t>0?l:-l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},EXP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),Math.exp(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},FACT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))if(P(t)=="boolean")t.toString().toLowerCase()=="true"?t=1:t.toString().toLowerCase()=="false"&&(t=0);else return p.error.v;return t=parseInt(t),t<0?p.error.nm:D.factorial(t)}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},FACTDOUBLE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))if(P(t)=="boolean")t.toString().toLowerCase()=="true"?t=1:t.toString().toLowerCase()=="false"&&(t=0);else return p.error.v;return t=parseInt(t),t<0?p.error.nm:D.factorialDouble(t)}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},PI:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;try{return Math.PI}catch(n){var e=n;return e=p.errorInfo(e),[p.error.v,e]}},FLOOR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;if(l=parseFloat(l),l==0)return p.error.d;if(t>0&&l<0)return p.error.nm;var a=-Math.floor(Math.log(Math.abs(l))/Math.log(10));return t>=0?Math.floor(t/l)*l*Math.pow(10,a)/Math.pow(10,a):-(Math.ceil(Math.abs(t)/l)*l*Math.pow(10,a))/Math.pow(10,a)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},GCD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!1))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!1)):t.push(l)}if(!B(t[0]))return p.error.v;var a=parseInt(t[0]);if(a<0||a>=Math.pow(2,53))return p.error.nm;for(var e=1;e<t.length;e++){var o=t[e];if(!B(o))return p.error.v;if(o=parseInt(o),o<0||o>=Math.pow(2,53))return p.error.nm;for(;a&&o;)a>o?a%=o:o%=a;a+=o}return a}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},RANDBETWEEN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t>l?p.error.nm:t+Math.ceil((l-t+1)*Math.random())-1):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ROUND:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=t>0?1:-1;return a*Math.round(Math.abs(t)*Math.pow(10,l))/Math.pow(10,l)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},ROUNDDOWN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=t>0?1:-1;return a*Math.floor(Math.abs(t)*Math.pow(10,l))/Math.pow(10,l)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},ROUNDUP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=t>0?1:-1;return a*Math.ceil(Math.abs(t)*Math.pow(10,l))/Math.pow(10,l)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},SERIESSUM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=arguments[3],s=[];if(P(o)=="array"){if(P(o[0])=="array"&&!D.isDyadicArr(o))return p.error.v;s=s.concat(D.getDataArr(o,!1))}else P(o)=="object"&&o.startCell!=null?s=s.concat(D.getCellDataArr(o,"number",!1)):s.push(o);if(!B(s[0]))return p.error.v;for(var u=parseFloat(s[0])*Math.pow(t,l),e=1;e<s.length;e++){var d=s[e];if(!B(d))return p.error.v;d=parseFloat(d),u+=d*Math.pow(t,l+e*a)}return u}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},SIGN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;if(t=parseFloat(t),t>0)return 1;if(t==0)return 0;if(t<0)return-1}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},SIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),Math.sin(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},SINH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),(Math.exp(t)-Math.exp(-t))/2):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},SQRT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<0?p.error.nm:Math.sqrt(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},SQRTPI:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<0?p.error.nm:Math.sqrt(t*Math.PI)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},GAMMALN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<=0?p.error.nm:jStat.gammaln(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},COS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),Math.cos(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},TRUNC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;if(t=parseFloat(t),arguments.length==2){var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}else var l=0;var a=t>0?1:-1;return a*Math.floor(Math.abs(t)*Math.pow(10,l))/Math.pow(10,l)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},QUOTIENT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),l==0?p.error.d:parseInt(t/l,10)):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},POWER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t==0&&l==0?p.error.nm:t<0&&l.toString().indexOf(".")>-1?p.error.nm:Math.pow(t,l)):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},SUMIFS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=0,l=arguments;Wn(l);for(var a=p.getRangeArray(l[0])[0],o=new Array(a.length),e=0;e<o.length;e++)o[e]=!0;for(var e=1;e<l.length;e+=2)for(var s=p.getRangeArray(l[e])[0],u=l[e+1],d=0;d<s.length;d++){var f=s[d];o[d]=o[d]&&!!f&&p.acompareb(f,u)}for(var e=0;e<a.length;e++)o[e]&&(t=Tt(t,"+",a[e]));return t}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},COUNTIFS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments;Wn(t);for(var l=new Array(p.getRangeArray(t[0])[0].length),e=0;e<l.length;e++)l[e]=!0;for(var e=0;e<t.length;e+=2)for(var a=p.getRangeArray(t[e])[0],o=t[e+1],s=0;s<a.length;s++){var u=a[s];l[s]=l[s]&&!!u&&p.acompareb(u,o)}for(var d=0,e=0;e<l.length;e++)l[e]&&d++;return d}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},PRODUCT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!0)):t.push(l)}for(var a=1,e=0;e<t.length;e++){var o=t[e];if(!B(o))return p.error.v;o=parseFloat(o),a*=o}return a}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},HARMEAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!0)):t.push(l)}for(var a=0,o=0,e=0;e<t.length;e++){var s=t[e];if(!B(s))return p.error.v;if(s=parseFloat(s),s<=0)return p.error.nm;a+=1/s,o++}return o/a}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},HYPGEOMDIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let d=function(m,g,y,v){var b=D.factorial(y)/(D.factorial(m)*D.factorial(y-m)),k=D.factorial(v-y)/(D.factorial(g-m)*D.factorial(v-y-g+m)),w=D.factorial(v)/(D.factorial(g)*D.factorial(v-g));return b*k/w},f=function(m,g,y,v){for(var b=0,k=0;k<=m;k++)b+=d(k,g,y,v);return b};var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseInt(o);var s=D.getCellBoolen(arguments[4]);return H(s)?s:t<0||t>Math.min(l,a)||t<Math.max(0,l-o+a)?p.error.nm:l<=0||l>o?p.error.nm:a<=0||a>o?p.error.nm:o<=0?p.error.nm:s?f(t,l,a,o):d(t,l,a,o)}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},INTERCEPT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=0,l=arguments[0],a=[];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;a=a.concat(D.getDataArr(l,!1))}else P(l)=="object"&&l.startCell!=null?a=a.concat(D.getCellDataArr(l,"text",!1)):a.push(l);var o=arguments[1],s=[];if(P(o)=="array"){if(P(o[0])=="array"&&!D.isDyadicArr(o))return p.error.v;s=s.concat(D.getDataArr(o,!1))}else P(o)=="object"&&o.startCell!=null?s=s.concat(D.getCellDataArr(o,"text",!1)):s.push(o);if(a.length!=s.length)return p.error.na;for(var u=[],d=[],e=0;e<a.length;e++){var f=a[e],m=s[e];B(f)&&B(m)&&(u.push(parseFloat(f)),d.push(parseFloat(m)))}if(D.variance_s(d)==0)return p.error.d;for(var g=jStat.mean(d),y=jStat.mean(u),v=d.length,b=0,k=0,e=0;e<v;e++)b+=(d[e]-g)*(u[e]-y),k+=Math.pow(d[e]-g,2);var w=b/k,x=y-w*g;return x+w*t}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},KURT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"text",!0)):t.push(l)}for(var a=[],o=0;o<t.length;o++){var s=t[o];if(!B(s))return p.error.v;s=parseFloat(s),a.push(s)}if(a.length<4||D.standardDeviation_s(a)==0)return p.error.d;for(var u=jStat.mean(a),d=a.length,f=0,e=0;e<d;e++)f+=Math.pow(a[e]-u,4);return f=f/Math.pow(jStat.stdev(a,!0),4),d*(d+1)/((d-1)*(d-2)*(d-3))*f-3*(d-1)*(d-1)/((d-2)*(d-3))}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},LARGE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!0))}else P(arguments[0])=="object"&&arguments[0].startCell!=null?t=t.concat(D.getCellDataArr(arguments[0],"text",!0)):t.push(arguments[0]);for(var l=[],a=0;a<t.length;a++){var o=t[a];if(!B(o))return p.error.v;o=parseFloat(o),l.push(o)}var s;if(P(arguments[1])=="array"){if(P(arguments[1][0])=="array"&&!D.isDyadicArr(arguments[1]))return p.error.v;s=D.getDataArr(arguments[1])}else if(P(arguments[1])=="object"&&arguments[1].startCell!=null){if(arguments[1].rowl>1||arguments[1].coll>1)return p.error.v;var u=arguments[1].data;if(u==null||me(u.v))var s=0;else var s=u.v}else s=arguments[1];if(P(s)=="array"){if(l.length==0)return p.error.nm;for(var d=[],e=0;e<s.length;e++){if(!B(s[e])){d.push(p.error.v);continue}if(s[e]=Math.ceil(parseFloat(s[e])),s[e]<=0||s[e]>l.length){d.push(p.error.nm);continue}d.push(t.sort(function(g,y){return y-g})[s[e]-1])}return d}else return B(s)?(s=Math.ceil(parseFloat(s)),l.length==0?p.error.nm:s<=0||s>l.length?p.error.nm:t.sort(function(m,g){return g-m})[s-1]):p.error.v}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},STDEVA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!1))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"text",!1)):t.push(l)}for(var a=[],o=0;o<t.length;o++){var s=t[o];B(s)?s=parseFloat(s):s.toString().toLowerCase()=="true"?s=1:s=0,a.push(s)}return a.length==0?0:a.length==1?p.error.d:D.standardDeviation_s(a)}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},STDEVP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"text",!0)):t.push(l)}for(var a=[],o=0;o<t.length;o++){var s=t[o];if(!B(s))return p.error.v;s=parseFloat(s),a.push(s)}return a.length==0?0:a.length==1?p.error.d:D.standardDeviation(a)}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},GEOMEAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"text",!0));else if(P(l)=="boolean")l.toString().toLowerCase()=="true"?t.push(1):l.toString().toLowerCase()=="false"&&t.push(0);else if(B(l))t.push(l);else return p.error.v}for(var a=[],o=0;o<t.length;o++){var s=t[o];if(!!B(s)){if(s=parseFloat(s),s<=0)return p.error.nm;a.push(s)}}return a.length==0?p.error.nm:jStat.geomean(a)}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},RANK_EQ:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=arguments[1],a=[];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;a=a.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?a=a.concat(D.getCellDataArr(l,"number",!0)):a.push(l);for(var o=[],s=0;s<a.length;s++){var u=a[s];if(!B(u))return p.error.v;u=parseFloat(u),o.push(u)}if(arguments.length==3){var d=D.getCellBoolen(arguments[2]);if(H(d))return d}else var d=!1;var f=d?function(y,v){return y-v}:function(y,v){return v-y};o=o.sort(f);var m=o.indexOf(t);return m==-1?p.error.na:m+1}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},RANK_AVG:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=arguments[1],a=[];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;a=a.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?a=a.concat(D.getCellDataArr(l,"number",!0)):a.push(l);for(var o=[],s=0;s<a.length;s++){var u=a[s];if(!B(u))return p.error.v;u=parseFloat(u),o.push(u)}if(arguments.length==3){var d=D.getFirstValue(arguments[2]);if(H(d))return d;if(P(d)!="boolean")if(P(d)=="string"&&(d.toLowerCase()=="true"||d.toLowerCase()=="false"))d.toLowerCase()=="true"&&(d=!0),d.toLowerCase()=="false"&&(d=!1);else if(B(d))d=parseFloat(d),d=d!=0;else return p.error.v}else var d=!1;var f=d?function(y,v){return y-v}:function(y,v){return v-y};o=o.sort(f);for(var m=0,e=0;e<o.length;e++)o[e]==t&&m++;return m>1?(2*o.indexOf(t)+m+1)/2:o.indexOf(t)+1}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},PERCENTRANK_EXC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!0))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!0)):l.push(t);for(var a=[],o=0;o<l.length;o++){var s=l[o];if(!B(s))return p.error.v;s=parseFloat(s),a.push(s)}var u=D.getFirstValue(arguments[1]);if(H(u))return u;if(!B(u))return p.error.v;if(u=parseFloat(u),arguments.length==3){var d=D.getFirstValue(arguments[2]);if(H(d))return d;if(!B(d))return p.error.v;d=parseInt(d)}else var d=3;if(a.length==0)return p.error.nm;if(d<1)return p.error.nm;if(a.length==1&&a[0]==u)return 1;a=a.sort(function(x,C){return x-C});for(var f=window.luckysheet_function.UNIQUE.f(a)[0],m=a.length,g=f.length,y=Math.pow(10,d),v=0,b=!1,e=0;!b&&e<g;)u===f[e]?(v=(a.indexOf(f[e])+1)/(m+1),b=!0):u>=f[e]&&(u<f[e+1]||e===g-1)&&(v=(a.lastIndexOf(f[e])+1+(u-f[e])/(f[e+1]-f[e]))/(m+1),b=!0),e++;return isNaN(v)?p.error.na:Math.floor(v*y)/y}catch(w){var k=w;return k=p.errorInfo(k),[p.error.v,k]}},PERCENTRANK_INC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!0))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!0)):l.push(t);for(var a=[],o=0;o<l.length;o++){var s=l[o];if(!B(s))return p.error.v;s=parseFloat(s),a.push(s)}var u=D.getFirstValue(arguments[1]);if(H(u))return u;if(!B(u))return p.error.v;if(u=parseFloat(u),arguments.length==3){var d=D.getFirstValue(arguments[2]);if(H(d))return d;if(!B(d))return p.error.v;d=parseInt(d)}else var d=3;if(a.length==0)return p.error.nm;if(d<1)return p.error.nm;if(a.length==1&&a[0]==u)return 1;a=a.sort(function(x,C){return x-C});for(var f=window.luckysheet_function.UNIQUE.f(a)[0],m=a.length,g=f.length,y=Math.pow(10,d),v=0,b=!1,e=0;!b&&e<g;)u===f[e]?(v=a.indexOf(f[e])/(m-1),b=!0):u>=f[e]&&(u<f[e+1]||e===g-1)&&(v=(a.lastIndexOf(f[e])+(u-f[e])/(f[e+1]-f[e]))/(m-1),b=!0),e++;return isNaN(v)?p.error.na:Math.floor(v*y)/y}catch(w){var k=w;return k=p.errorInfo(k),[p.error.v,k]}},FORECAST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=arguments[1],a=[];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;a=a.concat(D.getDataArr(l,!1))}else P(l)=="object"&&l.startCell!=null?a=a.concat(D.getCellDataArr(l,"text",!1)):a.push(l);var o=arguments[2],s=[];if(P(o)=="array"){if(P(o[0])=="array"&&!D.isDyadicArr(o))return p.error.v;s=s.concat(D.getDataArr(o,!1))}else P(o)=="object"&&o.startCell!=null?s=s.concat(D.getCellDataArr(o,"text",!1)):s.push(o);if(a.length!=s.length)return p.error.na;for(var u=[],d=[],e=0;e<a.length;e++){var f=a[e],m=s[e];B(f)&&B(m)&&(u.push(parseFloat(f)),d.push(parseFloat(m)))}if(D.variance_s(d)==0)return p.error.d;for(var g=jStat.mean(d),y=jStat.mean(u),v=d.length,b=0,k=0,e=0;e<v;e++)b+=(d[e]-g)*(u[e]-y),k+=Math.pow(d[e]-g,2);var w=b/k,x=y-w*g;return x+w*t}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},FISHERINV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=Math.exp(2*t);return(l-1)/(l+1)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},FISHER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<=-1||t>=1?p.error.nm:Math.log((1+t)/(1-t))/2):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},MODE_SNGL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else{if(!B(l))return p.error.v;t.push(l)}}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}for(var s={},u=[],d=0,f,e=0;e<a.length;e++)f=a[e],s[f]=s[f]?s[f]+1:1,s[f]>d&&(d=s[f],u=[]),s[f]==d&&(u[u.length]=f);if(d<=1)return p.error.na;for(var m=a.indexOf(u[0]),g=0;g<u.length;g++){var y=a.indexOf(u[g]);y<m&&(m=y)}return a[m]}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},WEIBULL_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getCellBoolen(arguments[3]);return H(o)?o:t<0||l<=0||a<=0?p.error.nm:o?1-Math.exp(-Math.pow(t/a,l)):Math.pow(t,l-1)*Math.exp(-Math.pow(t/a,l))*l/Math.pow(a,l)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},AVEDEV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else{if(!B(l))return p.error.v;t.push(l)}}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}return a.length==0?p.error.nm:jStat.sum(jStat(a).subtract(jStat.mean(a)).abs()[0])/a.length}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},AVERAGEA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!1))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else if(s.toString.toLowerCase()=="true")t.push(1);else if(s.toString.toLowerCase()=="false")t.push(0);else if(B(l))t.push(l);else return p.error.v}for(var a=0,o=0,e=0;e<t.length;e++){var s=t[e];B(s)?a+=parseFloat(s):s.toString().toLowerCase()=="true"?a+=1:a+=0,o++}return o==0?p.error.d:a/o}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},BINOM_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getCellBoolen(arguments[3]);return H(o)?o:t<0||t>l?p.error.nm:a<0||a>1?p.error.nm:o?jStat.binomial.cdf(t,l,a):jStat.binomial.pdf(t,l,a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},BINOM_INV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;if(a=parseFloat(a),t<0)return p.error.nm;if(l<0||l>1)return p.error.nm;if(a<0||a>1)return p.error.nm;for(var o=0;o<=t;){if(jStat.binomial.cdf(o,t,l)>=a)return o;o++}}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},CONFIDENCE_NORM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseInt(a),t<=0||t>=1?p.error.nm:l<=0?p.error.nm:a<1?p.error.nm:jStat.normalci(1,t,l,a)[1]-1):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},CORREL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"text",!1)):l.push(t);var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?o=o.concat(D.getCellDataArr(a,"text",!1)):o.push(a);if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var d=l[e],f=o[e];B(d)&&B(f)&&(s.push(parseFloat(d)),u.push(parseFloat(f)))}return s.length==0||u.length==0||D.standardDeviation(s)==0||D.standardDeviation(u)==0?p.error.d:jStat.corrcoeff(s,u)}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},COVARIANCE_P:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"text",!1)):l.push(t);var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?o=o.concat(D.getCellDataArr(a,"text",!1)):o.push(a);if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var d=l[e],f=o[e];B(d)&&B(f)&&(s.push(parseFloat(d)),u.push(parseFloat(f)))}if(s.length==0||u.length==0)return p.error.d;for(var m=jStat.mean(s),g=jStat.mean(u),y=0,e=0;e<s.length;e++)y+=(s[e]-m)*(u[e]-g);return y=y/s.length,y}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},COVARIANCE_S:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"text",!1)):l.push(t);var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?o=o.concat(D.getCellDataArr(a,"text",!1)):o.push(a);if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var d=l[e],f=o[e];B(d)&&B(f)&&(s.push(parseFloat(d)),u.push(parseFloat(f)))}return s.length==0||u.length==0?p.error.d:jStat.covariance(s,u)}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},DEVSQ:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else if(B(l))t.push(l);else if(P(l)=="boolean")l.toString().toLowerCase()=="true"?t.push(1):l.toString().toLowerCase()=="false"&&t.push(0);else return p.error.v}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}for(var s=jStat.mean(a),u=0,e=0;e<a.length;e++)u+=Math.pow(a[e]-s,2);return u}catch(f){var d=f;return d=p.errorInfo(d),[p.error.v,d]}},EXPON_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getCellBoolen(arguments[2]);return H(a)?a:t<0?p.error.nm:l<0?p.error.nm:a?jStat.exponential.cdf(t,l):jStat.exponential.pdf(t,l)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},AVERAGEIF:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=0,l=0,a=arguments[0].data,o=arguments[0].rowl,s=arguments[0].coll,u=Xa(arguments[1]),d=[];if(arguments[2]){var f=arguments[2].startCell,m=arguments[2].rowl,g=arguments[2].coll,y=arguments[2].sheetName;if(o==m&&s==g)d=arguments[2].data;else{var v=[],b=[],k="",w="";v[0]=parseInt(f.replace(/[^0-9]/g,""))-1,b[0]=hl(f.replace(/[^A-Za-z]/g,"")),v[1]=v[0]+o-1,b[1]=b[0]+s-1;var x=tt(b[1]),C=v[1]+1;k=x+C,w=y+"!"+f+":"+k,d=ar(w).data}d=p.getRangeArray(d)[0]}a=p.getRangeArray(a)[0];for(var e=0;e<a.length;e++){var S=a[e];if(!!S&&p.acompareb(S,u)){var _=d[e]||S;if(!B(_))continue;t+=parseFloat(_),l++}}return t==0||l==0?p.error.d:Il(t/l)}catch(A){var T=A;return T=p.errorInfo(T),[p.error.v,T]}},AVERAGEIFS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=0,l=0,a=arguments;Wn(a);for(var o=p.getRangeArray(a[0])[0],s=new Array(o.length),e=0;e<s.length;e++)s[e]=!0;for(var e=1;e<a.length;e+=2)for(var u=p.getRangeArray(a[e])[0],d=a[e+1],f=0;f<u.length;f++){var m=u[f];s[f]=s[f]&&!!m&&p.acompareb(m,d)}for(var e=0;e<o.length;e++)s[e]&&B(o[e])&&(t+=parseFloat(o[e]),l++);return t==0||l==0?p.error.d:Il(t/l)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},PERMUT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t<=0||l<0?p.error.nm:t<l?p.error.nm:D.factorial(t)/D.factorial(t-l)):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},TRIMMEAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let m=function(y,v){return v=v||1,!y||typeof y.slice!="function"?y:y.slice(v)},g=function(y,v){return v=v||1,!y||typeof y.slice!="function"?y:y.slice(0,y.length-v)};var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!1)):l.push(t);for(var a=[],e=0;e<l.length;e++){var o=l[e];B(o)&&a.push(parseFloat(o))}var s=D.getFirstValue(arguments[1]);if(H(s))return s;if(!B(s))return p.error.v;if(s=parseFloat(s),a.length==0)return p.error.nm;if(s<0||s>1)return p.error.nm;a.sort(function(y,v){return y-v});var u=window.luckysheet_function.FLOOR.f(a.length*s,2)/2,d=m(a,u);return d=g(d,u),d=jStat.mean(d),d}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},PERCENTILE_EXC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!1)):l.push(t);for(var a=[],e=0;e<l.length;e++){var o=l[e];B(o)&&a.push(parseFloat(o))}var s=D.getFirstValue(arguments[1]);if(H(s))return s;if(!B(s))return p.error.v;if(s=parseFloat(s),a.length==0)return p.error.nm;if(s<=0||s>=1)return p.error.nm;a=a.sort(function(g,y){return g-y});var u=a.length;if(s<1/(u+1)||s>1-1/(u+1))return p.error.nm;var d=s*(u+1)-1,f=Math.floor(d);return d===f?a[d]:a[f]+(d-f)*(a[f+1]-a[f])}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},PERCENTILE_INC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!1)):l.push(t);for(var a=[],e=0;e<l.length;e++){var o=l[e];B(o)&&a.push(parseFloat(o))}var s=D.getFirstValue(arguments[1]);if(H(s))return s;if(!B(s))return p.error.v;if(s=parseFloat(s),a.length==0)return p.error.nm;if(s<0||s>1)return p.error.nm;a=a.sort(function(g,y){return g-y});var u=a.length,d=s*(u-1),f=Math.floor(d);return d===f?a[d]:a[f]+(d-f)*(a[f+1]-a[f])}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},PEARSON:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"text",!1)):l.push(t);var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?o=o.concat(D.getCellDataArr(a,"text",!1)):o.push(a);if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var d=l[e],f=o[e];B(d)&&B(f)&&(s.push(parseFloat(d)),u.push(parseFloat(f)))}if(u.length==0||s.length==0)return p.error.d;for(var m=jStat.mean(s),g=jStat.mean(u),y=s.length,v=0,b=0,k=0,e=0;e<y;e++)v+=(s[e]-m)*(u[e]-g),b+=Math.pow(s[e]-m,2),k+=Math.pow(u[e]-g,2);return v/Math.sqrt(b*k)}catch(x){var w=x;return w=p.errorInfo(w),[p.error.v,w]}},NORM_S_INV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<=0||t>=1?p.error.nm:jStat.normal.inv(t,0,1)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},NORM_S_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getCellBoolen(arguments[1]);return H(l)?l:l?jStat.normal.cdf(t,0,1):jStat.normal.pdf(t,0,1)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},NORM_INV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))if(P(t)=="boolean")t.toString().toLowerCase()=="true"?t=1:t.toString().toLowerCase()=="false"&&(t=0);else return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))if(P(l)=="boolean")l.toString().toLowerCase()=="true"?l=1:l.toString().toLowerCase()=="false"&&(l=0);else return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))if(P(a)=="boolean")a.toString().toLowerCase()=="true"?a=1:a.toString().toLowerCase()=="false"&&(a=0);else return p.error.v;return a=parseFloat(a),t<=0||t>=1?p.error.nm:a<=0?p.error.nm:jStat.normal.inv(t,l,a)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},NORM_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))if(P(t)=="boolean")t.toString().toLowerCase()=="true"?t=1:t.toString().toLowerCase()=="false"&&(t=0);else return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getCellBoolen(arguments[3]);return H(o)?o:a<=0?p.error.nm:o?jStat.normal.cdf(t,l,a):jStat.normal.pdf(t,l,a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},NEGBINOM_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getCellBoolen(arguments[3]);return H(o)?o:a<0||a>1?p.error.nm:t<0||l<1?p.error.nm:o?jStat.negbin.cdf(t,l,a):jStat.negbin.pdf(t,l,a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},MINA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!1))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else if(o.toString.toLowerCase()=="true")t.push(1);else if(o.toString.toLowerCase()=="false")t.push(0);else if(B(l))t.push(l);else return p.error.v}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)?a.push(parseFloat(o)):o.toString().toLowerCase()=="true"?a.push(1):a.push(0)}return a.length===0?0:Math.min.apply(Math,a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},MEDIAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else{if(!B(l))return p.error.v;t.push(l)}}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}return jStat.median(a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},MAXA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!1))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else if(o.toString.toLowerCase()=="true")t.push(1);else if(o.toString.toLowerCase()=="false")t.push(0);else if(B(l))t.push(l);else return p.error.v}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)?a.push(parseFloat(o)):o.toString().toLowerCase()=="true"?a.push(1):a.push(0)}return a.length===0?0:Math.max.apply(Math,a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},LOGNORM_INV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseFloat(a),t<=0||t>=1?p.error.nm:a<=0?p.error.nm:jStat.lognormal.inv(t,l,a)):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},LOGNORM_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getCellBoolen(arguments[3]);return H(o)?o:t<=0||a<=0?p.error.nm:o?jStat.lognormal.cdf(t,l,a):jStat.lognormal.pdf(t,l,a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},Z_TEST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!0))}else P(arguments[0])=="object"&&arguments[0].startCell!=null?t=t.concat(D.getCellDataArr(arguments[0],"text",!0)):t.push(arguments[0]);for(var l=[],a=0;a<t.length;a++){var o=t[a];B(o)&&l.push(parseFloat(o))}var s=D.getFirstValue(arguments[1]);if(H(s))return s;if(!B(s))return p.error.v;if(s=parseFloat(s),l.length==0)return p.error.na;var u=D.standardDeviation_s(l);if(arguments.length==3){if(u=D.getFirstValue(arguments[2]),H(u))return u;if(!B(u))return p.error.v;u=parseFloat(u)}var d=l.length,f=window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE,l);return 1-window.luckysheet_function.NORM_S_DIST.f((f-s)/(u/Math.sqrt(d)),"true")}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},PROB:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!1))}else P(arguments[0])=="object"&&arguments[0].startCell!=null?t=t.concat(D.getCellDataArr(arguments[0],"text",!1)):t.push(arguments[0]);var l=[];if(P(arguments[1])=="array"){if(P(arguments[1][0])=="array"&&!D.isDyadicArr(arguments[1]))return p.error.v;l=l.concat(D.getDataArr(arguments[1],!1))}else P(arguments[1])=="object"&&arguments[1].startCell!=null?l=l.concat(D.getCellDataArr(arguments[1],"text",!1)):l.push(arguments[1]);if(t.length!=l.length)return p.error.na;for(var a=[],o=[],s=0,e=0;e<t.length;e++){var u=t[e],d=l[e];if(B(u)&&B(d)&&(a.push(parseFloat(u)),o.push(parseFloat(d)),s+=parseFloat(d),parseFloat(d)<=0||parseFloat(d)>1))return p.error.nm}if(s!=1)return p.error.nm;var f=D.getFirstValue(arguments[2]);if(H(f))return f;if(!B(f))return p.error.v;f=parseFloat(f);var m=f;if(arguments.length==4){if(m=D.getFirstValue(arguments[3]),H(m))return m;if(!B(m))return p.error.v;m=parseFloat(m)}for(var g=0,e=0;e<a.length;e++)a[e]>=f&&a[e]<=m&&(g+=o[e]);return g}catch(v){var y=v;return y=p.errorInfo(y),[p.error.v,y]}},QUARTILE_EXC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!0))}else if(P(arguments[0])=="object"&&arguments[0].startCell!=null)t=t.concat(D.getCellDataArr(arguments[0],"text",!0));else{if(!B(arguments[0]))return p.error.v;t.push(arguments[0])}for(var l=[],e=0;e<t.length;e++){var a=t[e];B(a)&&l.push(parseFloat(a))}var o=D.getFirstValue(arguments[1]);if(H(o))return o;if(!B(o))return p.error.v;if(o=parseInt(o),l.length==0)return p.error.nm;if(o<=0||o>=4)return p.error.nm;switch(o){case 1:return window.luckysheet_function.PERCENTILE_EXC.f(l,.25);case 2:return window.luckysheet_function.PERCENTILE_EXC.f(l,.5);case 3:return window.luckysheet_function.PERCENTILE_EXC.f(l,.75)}}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},QUARTILE_INC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!0))}else if(P(arguments[0])=="object"&&arguments[0].startCell!=null)t=t.concat(D.getCellDataArr(arguments[0],"text",!0));else{if(!B(arguments[0]))return p.error.v;t.push(arguments[0])}for(var l=[],e=0;e<t.length;e++){var a=t[e];B(a)&&l.push(parseFloat(a))}var o=D.getFirstValue(arguments[1]);if(H(o))return o;if(!B(o))return p.error.v;if(o=parseInt(o),l.length==0)return p.error.nm;if(o<0||o>4)return p.error.nm;switch(o){case 0:return Math.min.apply(Math,l);case 1:return window.luckysheet_function.PERCENTILE_INC.f(l,.25);case 2:return window.luckysheet_function.PERCENTILE_INC.f(l,.5);case 3:return window.luckysheet_function.PERCENTILE_INC.f(l,.75);case 4:return Math.max.apply(Math,l)}}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},POISSON_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getCellBoolen(arguments[2]);return H(a)?a:t<0||l<0?p.error.nm:a?jStat.poisson.cdf(t,l):jStat.poisson.pdf(t,l)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},RSQ:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else if(P(t)=="object"&&t.startCell!=null)l=l.concat(D.getCellDataArr(t,"text",!1));else{if(!B(t))return p.error.v;l.push(t)}var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else if(P(a)=="object"&&a.startCell!=null)o=o.concat(D.getCellDataArr(a,"text",!1));else{if(!B(a))return p.error.v;o.push(a)}if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var d=l[e],f=o[e];B(d)&&B(f)&&(s.push(parseFloat(d)),u.push(parseFloat(f)))}return s.length==0||u.length==0?p.error.d:Math.pow(window.luckysheet_function.PEARSON.f(s,u),2)}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},T_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getCellBoolen(arguments[2]);return H(a)?a:l<1?p.error.nm:a?jStat.studentt.cdf(t,l):jStat.studentt.pdf(t,l)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},T_DIST_2T:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t<0||l<1?p.error.nm:(1-jStat.studentt.cdf(t,l))*2):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},T_DIST_RT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),l<1?p.error.nm:1-jStat.studentt.cdf(t,l)):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},T_INV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t<=0||t>1?p.error.nm:l<1?p.error.nm:jStat.studentt.inv(t,l)):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},T_INV_2T:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t<=0||t>1?p.error.nm:l<1?p.error.nm:Math.abs(jStat.studentt.inv(t/2,l))):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},T_TEST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!1))}else if(P(arguments[0])=="object"&&arguments[0].startCell!=null)t=t.concat(D.getCellDataArr(arguments[0],"text",!1));else{if(!B(arguments[0]))return p.error.v;t.push(arguments[0])}var l=t,a=[];if(P(arguments[1])=="array"){if(P(arguments[1][0])=="array"&&!D.isDyadicArr(arguments[1]))return p.error.v;a=a.concat(D.getDataArr(arguments[1],!1))}else if(P(arguments[1])=="object"&&arguments[1].startCell!=null)a=a.concat(D.getCellDataArr(arguments[1],"text",!1));else{if(!B(arguments[1]))return p.error.v;a.push(arguments[1])}var o=a,s=D.getFirstValue(arguments[2]);if(H(s))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=D.getFirstValue(arguments[3]);if(H(u))return u;if(!B(u))return p.error.v;if(u=parseInt(u),[1,2].indexOf(s)==-1)return p.error.nm;if([1,2,3].indexOf(u)==-1)return p.error.nm;var d=null,f=null;if(u==1){var m=[];for(e=0;e<l.length;e++)m.push(l[e]-o[e]);var g=Math.abs(jStat.mean(m)),y=D.standardDeviation_s(m);d=g/(y/Math.sqrt(l.length)),f=l.length-1}else{var v=jStat.mean(l),b=jStat.mean(o),k=D.variance_s(l),w=D.variance_s(o);switch(d=Math.abs(v-b)/Math.sqrt(k/l.length+w/o.length),u){case 2:f=l.length+o.length-2;break;case 3:f=Math.pow(k/l.length+w/o.length,2)/(Math.pow(k/l.length,2)/(l.length-1)+Math.pow(w/o.length,2)/(o.length-1));break}}if(s==1)var x=window.luckysheet_function.T_DIST_RT.f(d,f);else if(s==2)var x=window.luckysheet_function.T_DIST_2T.f(d,f);return x}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},F_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=D.getCellBoolen(arguments[3]);return H(o)?o:t<0?p.error.nm:l<1?p.error.nm:a<1?p.error.nm:o?jStat.centralF.cdf(t,l,a):jStat.centralF.pdf(t,l,a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},F_DIST_RT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseInt(a),t<0?p.error.nm:l<1?p.error.nm:a<1?p.error.nm:1-jStat.centralF.cdf(t,l,a)):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},VAR_P:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else{if(!B(l))return p.error.v;t.push(l)}}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}if(a.length==0)return p.error.d;for(var s=a.length,u=0,d=window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE,a),e=0;e<s;e++)u+=Math.pow(a[e]-d,2);return u/s}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},VAR_S:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else{if(!B(l))return p.error.v;t.push(l)}}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}if(a.length==0)return p.error.d;for(var s=a.length,u=0,d=window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE,a),e=0;e<s;e++)u+=Math.pow(a[e]-d,2);return u/(s-1)}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},VARA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!1))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else if(o.toString.toLowerCase()=="true")t.push(1);else if(o.toString.toLowerCase()=="false")t.push(0);else if(B(l))t.push(l);else return p.error.v}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)?a.push(parseFloat(o)):o.toString().toLowerCase()=="true"?a.push(1):a.push(0)}for(var s=a.length,u=0,d=window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE,a),e=0;e<s;e++)u+=Math.pow(a[e]-d,2);return u/(s-1)}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},VARPA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!1))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else if(o.toString.toLowerCase()=="true")t.push(1);else if(o.toString.toLowerCase()=="false")t.push(0);else if(B(l))t.push(l);else return p.error.v}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)?a.push(parseFloat(o)):o.toString().toLowerCase()=="true"?a.push(1):a.push(0)}for(var s=a.length,u=0,d=window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE,a),e=0;e<s;e++)u+=Math.pow(a[e]-d,2);return u/s}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},STEYX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!1))}else if(P(arguments[0])=="object"&&arguments[0].startCell!=null)t=t.concat(D.getCellDataArr(arguments[0],"text",!1));else{if(!B(arguments[0]))return p.error.v;t.push(arguments[0])}var l=[];if(P(arguments[1])=="array"){if(P(arguments[1][0])=="array"&&!D.isDyadicArr(arguments[1]))return p.error.v;l=l.concat(D.getDataArr(arguments[1],!1))}else if(P(arguments[1])=="object"&&arguments[1].startCell!=null)l=l.concat(D.getCellDataArr(arguments[1],"text",!1));else{if(!B(arguments[1]))return p.error.v;l.push(arguments[1])}if(t.length!=l.length)return p.error.na;for(var a=[],o=[],e=0;e<t.length;e++){var s=t[e],u=l[e];B(s)&&B(u)&&(a.push(parseFloat(s)),o.push(parseFloat(u)))}if(a.length<3||o.length<3)return p.error.d;for(var d=jStat.mean(o),f=jStat.mean(a),m=o.length,g=0,y=0,v=0,e=0;e<m;e++)g+=Math.pow(a[e]-f,2),y+=(o[e]-d)*(a[e]-f),v+=Math.pow(o[e]-d,2);return Math.sqrt((g-y*y/v)/(m-2))}catch(k){var b=k;return b=p.errorInfo(b),[p.error.v,b]}},STANDARDIZE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseFloat(a),a<=0?p.error.nm:(t-l)/a):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},SMALL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!0))}else if(P(arguments[0])=="object"&&arguments[0].startCell!=null)t=t.concat(D.getCellDataArr(arguments[0],"number",!0));else{if(!B(arguments[0]))return p.error.v;t.push(arguments[0])}for(var l=[],e=0;e<t.length;e++){var a=t[e];B(a)&&l.push(parseFloat(a))}var o=D.getFirstValue(arguments[1]);return H(o)?o:B(o)?(o=parseInt(o),l.length==0?p.error.nm:o<=0||o>l.length?p.error.nm:l.sort(function(u,d){return u-d})[o-1]):p.error.v}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},SLOPE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!1))}else if(P(arguments[0])=="object"&&arguments[0].startCell!=null)t=t.concat(D.getCellDataArr(arguments[0],"text",!1));else{if(!B(arguments[0]))return p.error.v;t.push(arguments[0])}var l=[];if(P(arguments[1])=="array"){if(P(arguments[1][0])=="array"&&!D.isDyadicArr(arguments[1]))return p.error.v;l=l.concat(D.getDataArr(arguments[1],!1))}else if(P(arguments[1])=="object"&&arguments[1].startCell!=null)l=l.concat(D.getCellDataArr(arguments[1],"text",!1));else{if(!B(arguments[1]))return p.error.v;l.push(arguments[1])}if(t.length!=l.length)return p.error.na;for(var a=[],o=[],e=0;e<t.length;e++){var s=t[e],u=l[e];B(s)&&B(u)&&(a.push(parseFloat(s)),o.push(parseFloat(u)))}if(a.length<3||o.length<3)return p.error.d;for(var d=jStat.mean(o),f=jStat.mean(a),m=o.length,g=0,y=0,e=0;e<m;e++)g+=(o[e]-d)*(a[e]-f),y+=Math.pow(o[e]-d,2);return g/y}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},SKEW:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else{if(!B(l))return p.error.v;t.push(l)}}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}if(a.length<3||D.standardDeviation_s(a)==0)return p.error.d;for(var s=jStat.mean(a),u=a.length,d=0,e=0;e<u;e++)d+=Math.pow(a[e]-s,3);return u*d/((u-1)*(u-2)*Math.pow(jStat.stdev(a,!0),3))}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},SKEW_P:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else{if(!B(l))return p.error.v;t.push(l)}}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}if(a.length<3||D.standardDeviation_s(a)==0)return p.error.d;for(var s=jStat.mean(a),u=a.length,d=0,f=0,e=0;e<u;e++)f+=Math.pow(a[e]-s,3),d+=Math.pow(a[e]-s,2);return f=f/u,d=d/u,f/Math.pow(d,3/2)}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},ADDRESS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=1;if(arguments.length>=3){if(a=D.getFirstValue(arguments[2]),H(a))return a;if(!B(a))return p.error.v;a=parseInt(a)}var o=!0;if(arguments.length>=4&&(o=D.getCellBoolen(arguments[3]),H(o)))return o;if(t<=0||l<=0)return p.error.v;if([1,2,3,4].indexOf(a)==-1)return p.error.v;var s;if(o)switch(l=tt(l-1),a){case 1:s="$"+l+"$"+t;break;case 2:s=l+"$"+t;break;case 3:s="$"+l+t;break;case 4:s=l+t;break}else switch(a){case 1:s="R"+t+"C"+l;break;case 2:s="R"+t+"C["+l+"]";break;case 3:s="R["+t+"]C"+l;break;case 4:s="R["+t+"]C["+l+"]";break}if(arguments.length==5){var u=D.getFirstValue(arguments[4]);return H(u)?u:u+"!"+s}else return s}catch(f){var d=f;return d=p.errorInfo(d),[p.error.v,d]}},INDIRECT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;var l=!0;if(arguments.length==2&&(l=D.getCellBoolen(arguments[1]),H(l)))return l;let o=Et(),s=Z(h.calculateSheetIndex),u=o[s],d=u.data;if(p.iscelldata(t)){let f=p.getcellrange(t),m=f.row[0],g=f.column[0];if(m<0||m>=d.length||g<0||g>=d[0].length)return p.error.r;if(d[m][g]==null||me(d[m][g].v))return 0;let y=d[m][g].v;if(p.execFunctionGlobalData!=null){let b=p.execFunctionGlobalData[m+"_"+g+"_"+h.calculateSheetIndex];b!=null&&(y=b.v)}return{sheetName:u.name,startCell:t,rowl:m,coll:g,data:y}}else return p.error.r}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ROW:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{if(arguments.length==1){var t;if(P(arguments[0])=="array")return p.error.v;if(P(arguments[0])=="object"&&arguments[0].startCell!=null?t=arguments[0].startCell:t=arguments[0],p.iscelldata(t)){var l=p.getcellrange(t);return l.row[0]+1}else return p.error.v}else return window.luckysheetCurrentRow+1}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ROWS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return P(arguments[0])=="array"?P(arguments[0][0])=="array"?arguments[0].length:1:P(arguments[0])=="object"&&arguments[0].startCell!=null?arguments[0].rowl:1}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},COLUMN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{if(arguments.length==1){var t;if(P(arguments[0])=="array")return p.error.v;if(P(arguments[0])=="object"&&arguments[0].startCell!=null?t=arguments[0].startCell:t=arguments[0],p.iscelldata(t)){var l=p.getcellrange(t);return l.column[0]+1}else return p.error.v}else return window.luckysheetCurrentColumn+1}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},COLUMNS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return P(arguments[0])=="array"?P(arguments[0][0])=="array"?arguments[0][0].length:arguments[0].length:P(arguments[0])=="object"&&arguments[0].startCell!=null?arguments[0].coll:1}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},OFFSET:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{if(!(P(arguments[0])=="object"&&arguments[0].startCell!=null))return p.error.v;var t=arguments[0].startCell;let x=arguments[0].sheetName;var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=arguments[0].rowl;if(arguments.length>=4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}var s=arguments[0].coll;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseInt(s)}if(o<1||s<1)return p.error.r;var u=p.getcellrange(t),d=u.row[0],f=u.column[0];d+=l,f+=a;var m=d+o-1,g=f+s-1;let C=Et(),S=Z(h.calculateSheetIndex),_=C[S].data;if(d<0||m>=_.length||f<0||g>=_[0].length)return p.error.r;for(var y=[],v=d;v<=m;v++){for(var b=[],k=f;k<=g;k++)if(p.execFunctionGlobalData!=null&&p.execFunctionGlobalData[v+"_"+k+"_"+h.calculateSheetIndex]!=null){let A=p.execFunctionGlobalData[v+"_"+k+"_"+h.calculateSheetIndex];A!=null?b.push(A.v):b.push(0)}else _[v][k]!=null&&!me(_[v][k].v)?b.push(_[v][k].v):b.push(0);y.push(b)}return{sheetName:x,startCell:xt(h.calculateSheetIndex,{row:[d,m],column:[f,g]}),rowl:d,coll:f,data:y}}catch(x){var w=x;return w=p.errorInfo(w),[p.error.v,w]}},MATCH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=arguments[1],a=[];if(P(l)=="array"){if(P(l[0])=="array")return D.isDyadicArr(l)?p.error.na:p.error.v;for(var e=0;e<l.length;e++)a.push(l[e])}else if(P(l)=="object"&&l.startCell!=null){if(l.rowl>1&&l.coll>1)return p.error.na;if(l.data!=null)if(P(l.data)=="array")for(var e=0;e<l.data.length;e++)for(var o=0;o<l.data[e].length;o++)l.data[e][o]!=null&&!me(l.data[e][o].v)&&a.push(l.data[e][o].v);else a.push(l.data.v)}var s=1;if(arguments.length==3){if(s=D.getFirstValue(arguments[2]),H(s))return s;if(!B(s))return p.error.v;s=Math.ceil(parseFloat(s))}if([-1,0,1].indexOf(s)==-1)return p.error.na;for(var u,d,f=0;f<a.length;f++)if(s===1){if(a[f]===t)return f+1;a[f]<t&&(d?a[f]>d&&(u=f+1,d=a[f]):(u=f+1,d=a[f]))}else if(s===0){if(typeof t=="string"){if(t=t.replace(/\?/g,"."),a[f].toLowerCase().match(t.toLowerCase()))return f+1}else if(a[f]===t)return f+1}else if(s===-1){if(a[f]===t)return f+1;a[f]>t&&(d?a[f]<d&&(u=f+1,d=a[f]):(u=f+1,d=a[f]))}return u||p.error.na}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},VLOOKUP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;if(t.toString().replace(/\s/g,"")=="")return p.error.na;var l=arguments[1],a=[];if(P(l)=="array")if(P(l[0])=="array"){if(!D.isDyadicArr(l))return p.error.v;for(var e=0;e<l.length;e++){for(var o=[],s=0;s<l[e].length;s++)o.push(l[e][s]);a.push(o)}}else{for(var o=[],e=0;e<l.length;e++)o.push(l[e]);a.push(o)}else if(P(l)=="object"&&l.startCell!=null)a=D.getCellDataDyadicArr(l,"text");else return p.error.v;var u=D.getFirstValue(arguments[2]);if(H(u))return u;if(!B(u))return p.error.v;u=parseInt(u);var d=!0;if(arguments.length==4&&(d=D.getCellBoolen(arguments[3]),H(d)))return d;if(u<1)return p.error.v;if(u>a[0].length)return p.error.r;if(d){a=Hr(a,0,!0);for(var f=0;f<a.length;f++){var m=a[f][0],g;if(Lt(t)&&Lt(m)?g=ul(t,m):B(t)&&B(m)?g=(0,Ui.default)(t).value()-(0,Ui.default)(m).value():!B(t)&&!B(m)?g=t.localeCompare(m,"zh"):B(t)?B(m)||(g=-1):g=1,g<0)return f==0?p.error.na:a[f-1][u-1];if(f==a.length-1)return a[f][u-1]}}else{for(var y=null,f=0;f<a.length;f++)if(t.toString()==a[f][0].toString()){y=f;break}return y==null?p.error.na:a[y][u-1]}}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},HLOOKUP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=arguments[0];typeof a=="object"&&(a=arguments[0].data,P(a)=="array"?(a=a[r],P(a)=="array"&&(a=a[f])):a=a.v);var o=arguments[1].data,s=arguments[2],u=!1;if(arguments.length>3&&(u=!!arguments[3]),s>o.rowl)return[p.error.v,"\u7D22\u5F15\u8D85\u8FC7\u4E86\u8303\u56F4\u7684\u957F\u5EA6\uFF0C"+o[0].length];if(s<1)return[p.error.v,"\u7D22\u5F15\u5FC5\u987B\u5927\u4E8E1"];for(var d=p.error.na,f=0;f<o[0].length;f++){var m=ze(0,f,o),g=ze(s-1,f,o);if(u)m.indexOf(a)>-1&&(d=g);else if(p.acompareb(m,a))return d=g,d}return d}catch(v){var y=v;return y=p.errorInfo(y),[p.error.v,y]}},LOOKUP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let b=function(k,w){return w-k};var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=arguments[0];typeof a=="object"&&(a=arguments[0].data,P(a)=="array"?(a=a[r],P(a)=="array"&&(a=a[c])):a=a.v);var o=arguments[1].data,s,u=p.error.na;if(o=p.getRangeArray(o)[0],arguments[2]&&(s=arguments[2].data,s=p.getRangeArray(s)[0]),typeof a=="string")for(var e=0;e<o.length;e++){var d=o[e],f;arguments[2]?(f=s[e],d==a&&(u=f)):p.acompareb(d,a)&&(u=d)}else if(tr(a)=="num"){for(var m=[],e=0;e<o.length;e++){var d=o[e],f;if(arguments[2]){if(f=s[e],d==a)return u=f,u;d!=a&&tr(d)=="num"&&m.push(d)}else{if(d==a)return u=d,u;d!=a&&tr(d)=="num"&&m.push(d)}}if(m.length!=0){m.push(a),m.sort(b);var g=m.indexOf(a);if(g==m.length-1)return[p.error.na,"\u627E\u4E0D\u5230\u5BF9\u5E94\u53C2\u6570"];var y=m[g+1];if(arguments[2]){var e=o.indexOf(y);u=s[e]}else u=y}}return u}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},INDEX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];let y=!1;if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else P(t)=="object"&&t.startCell!=null&&(l=D.getCellDataDyadicArr(t,"number"),y=!0);var a=l.length,o=l[0].length,s=D.getFirstValue(arguments[1]);if(H(s))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=D.getFirstValue(arguments[2]);if(H(u))return u;if(s<0||B(u)&&u<0)return p.error.v;if(s>a||B(u)&&u>o)return p.error.r;if(y){var d=p.getcellrange(t.startCell),f=d.row[0],m=d.column[0];let v=l;s==0||u==0?(s==0?(v=l[0],s=1):v=l[s-1],B(u)?u==0?(v=v[0],u=1):v=v[u-1]:u=1):(B(s)||(s=1),B(u)||(u=1),v=l[s-1][u-1]);let b=f+s-1,k=m+u-1;return{sheetName:t.sheetName,startCell:xt(h.calculateSheetIndex,{row:[b,b],column:[k,k]}),rowl:b,coll:k,data:v}}else return B(u)?(u=parseInt(u),s<=0||u<=0?p.error.v:l[s-1][u-1]):p.error.v}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},GETPIVOTDATA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return p.error.v}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},CHOOSE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;if(t=parseInt(t),t<1||t>arguments.length-1)return p.error.v;var l=arguments[t];if(P(l)=="array")return P(l[0])=="array"&&!D.isDyadicArr(l)?p.error.v:l;if(P(l)=="object"&&l.startCell!=null){if(l.data==null)return 0;if(P(l.data)=="array"){var a=D.getCellDataDyadicArr(l.data,"number");return a}else return me(l.data.v)?0:l.data.v}else return l}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},HYPERLINK:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return p.error.v}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},TIME:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;if(a=parseInt(a),t<0||t>32767)return p.error.nm;if(t>24&&(t=t%24),l<0||l>32767)return p.error.nm;if(a<0||a>32767)return p.error.nm;var o=(0,j.default)().set({hour:t,minute:l,second:a});return(0,j.default)(o).format("h:mm:ss a")}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},TIMEVALUE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);return H(t)?t:(0,j.default)(t).isValid()?(3600*(0,j.default)(t).get("hour")+60*(0,j.default)(t).get("minute")+(0,j.default)(t).get("second"))/86400:p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},EOMONTH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;if(l=parseInt(l),!(0,j.default)(t).isValid())return p.error.v;var a=(0,j.default)(t).add(l+1,"months").set("date",1).subtract(1,"days"),o=at((0,j.default)(a).format("YYYY-MM-DD H:mm:ss")),s=o[2];return s}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},EDATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;if(l=parseInt(l),!(0,j.default)(t).isValid())return p.error.v;var a=(0,j.default)(t).add(l,"months"),o=at((0,j.default)(a).format("YYYY-MM-DD h:mm:ss")),s=o[2];return s}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},SECOND:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=(0,j.default)(t).seconds();return l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},MINUTE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=(0,j.default)(t).minutes();return l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},HOUR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=(0,j.default)(t).hours();return l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},NOW:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return(0,j.default)().format("YYYY-M-D HH:mm")}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},NETWORKDAYS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{if(arguments.length==3)var t=window.luckysheet_function.NETWORKDAYS_INTL.f(arguments[0],arguments[1],1,arguments[2]);else var t=window.luckysheet_function.NETWORKDAYS_INTL.f(arguments[0],arguments[1],1);return t}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},NETWORKDAYS_INTL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[[],[6,0],[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],void 0,void 0,void 0,[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]],l=D.getCellDate(arguments[0]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getCellDate(arguments[1]);if(H(a))return a;if(!(0,j.default)(a).isValid())return p.error.v;var o=t[1];if(arguments.length>=3&&(o=arguments[2],!(typeof o=="string"&&o.length=="7"&&/^[0-1]{7}$/g.test(o)))){if(o=D.getFirstValue(arguments[2]),H(o))return o;if(!B(o))return p.error.v;if(o=parseInt(o),o<1||o>7&&o<11||o>17)return p.error.nm;o=t[o]}var s=[];if(arguments.length==4&&(s=D.getCellrangeDate(arguments[3]),H(s)))return s;for(var e=0;e<s.length;e++)if(!(0,j.default)(s[e]).isValid())return p.error.v;var u=(0,j.default)(a).diff((0,j.default)(l),"days")+1,d=u,f=(0,j.default)(l);for(e=0;e<u;e++){var m=(0,j.default)(f).weekday(),g=!1;P(o)=="array"?(m===o[0]||m===o[1])&&(g=!0):(m==0&&(m=7),o.charAt(m-1)=="0"&&(g=!0));for(var y=0;y<s.length;y++)if((0,j.default)(f).diff((0,j.default)(s[y]),"days")===0){g=!0;break}g&&d--,f=(0,j.default)(f).add(1,"days")}return d}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},ISOWEEKNUM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);return H(t)?t:(0,j.default)(t).isValid()?(0,j.default)(t).isoWeeks():p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},WEEKNUM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[void 0,7,1,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,1,2,3,4,5,6,7],l=D.getCellDate(arguments[0]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=1;if(arguments.length==2){if(a=D.getFirstValue(arguments[1]),H(a))return a;if(!B(a))return p.error.v;a=parseInt(a)}if(a==21)return window.luckysheet_function.ISOWEEKNUM.f(arguments[0]);if([1,2,11,12,13,14,15,16,17].indexOf(a)==-1)return p.error.nm;var o=t[a],s=(0,j.default)(l).isoWeekday()>=o?1:0,u=(0,j.default)(l).isoWeeks()+s;return u}catch(f){var d=f;return d=p.errorInfo(d),[p.error.v,d]}},WEEKDAY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[[],[1,2,3,4,5,6,7],[7,1,2,3,4,5,6],[6,0,1,2,3,4,5],[],[],[],[],[],[],[],[7,1,2,3,4,5,6],[6,7,1,2,3,4,5],[5,6,7,1,2,3,4],[4,5,6,7,1,2,3],[3,4,5,6,7,1,2],[2,3,4,5,6,7,1],[1,2,3,4,5,6,7]],l=D.getCellDate(arguments[0]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=1;if(arguments.length==2){if(a=D.getFirstValue(arguments[1]),H(a))return a;if(!B(a))return p.error.v;a=parseInt(a)}if([1,2,3,11,12,13,14,15,16,17].indexOf(a)==-1)return p.error.nm;var o=t[a][(0,j.default)(l).day()];return o}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},DAY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);return H(t)?t:(0,j.default)(t).isValid()?(0,j.default)(t).date():p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},DAYS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=(0,j.default)(t).diff((0,j.default)(l),"days");return a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},DAYS360:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=!1;if(arguments.length==3&&(a=D.getCellBoolen(arguments[2]),H(a)))return a;var o=(0,j.default)(t).month(),s=(0,j.default)(l).month(),u,d;if(a)u=(0,j.default)(t).date()===31?30:(0,j.default)(t).date(),d=(0,j.default)(l).date()===31?30:(0,j.default)(l).date();else{var f=(0,j.default)().set({year:(0,j.default)(t).year(),month:o+1,date:0}).date(),m=(0,j.default)().set({year:(0,j.default)(l).year(),month:s+1,date:0}).date();u=(0,j.default)(t).date()===f?30:(0,j.default)(t).date(),(0,j.default)(l).date()===m?u<30?(s++,d=1):d=30:d=(0,j.default)(l).date()}var g=360*(0,j.default)(l).diff((0,j.default)(t),"years")+30*(s-o)+(d-u);return g}catch(v){var y=v;return y=p.errorInfo(y),[p.error.v,y]}},DATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;if(a=parseInt(a),t<0||t>=1e4)return p.error.nm;t>=0&&t<=1899&&(t=t+1900);var o=(0,j.default)().set({year:t,month:l-1,date:a});return(0,j.default)(o).year()<1900?p.error.nm:(0,j.default)(o).format("YYYY-MM-DD")}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},DATEVALUE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;t=(0,j.default)(t).format("YYYY-MM-DD");var l=at(t)[2];return l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},DATEDIF:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var e=0;e<arguments.length-1;e++)if(arguments[e]=D.getCellDate(arguments[e]),!Lt(arguments[e]))return p.error.v;var t=(0,j.default)(arguments[0]),l=(0,j.default)(arguments[1]),a=arguments[2],o=p.error.v;if(window.luckysheet_function.DAYS.f(l,t)<0)return p.error.v;switch(a){case"Y":case"y":o=l.diff(t,"years",!1);break;case"M":case"m":o=l.diff(t,"months",!1);break;case"D":case"d":o=l.diff(t,"days",!1);break;case"MD":case"md":o=l.format("DD")-t.format("DD");break;case"YM":case"ym":var s=parseInt(t.format("M")),u=parseInt(l.format("M"));o=s<=u?u-s:u+12-s;break;case"YD":case"yd":let f=`${l.$y}-MM-DD`;var s=at(t.format(f))[2],u=at(l.format(f))[2];o=s<=u?u-s:u+365-s;break;default:o=p.error.v}return o}catch(f){var d=f;return d=p.errorInfo(d),[p.error.v,d]}},WORKDAY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{if(arguments.length==3)var t=window.luckysheet_function.WORKDAY_INTL.f(arguments[0],arguments[1],1,arguments[2]);else var t=window.luckysheet_function.WORKDAY_INTL.f(arguments[0],arguments[1],1);return t}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},WORKDAY_INTL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[[],[6,0],[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],void 0,void 0,void 0,[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]],l=D.getCellDate(arguments[0]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[1]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=t[1];if(arguments.length>=3&&(o=arguments[2],!(typeof o=="string"&&o.length=="7"&&/^[0-1]{7}$/g.test(o)))){if(o=D.getFirstValue(arguments[2]),H(o))return o;if(!B(o))return p.error.v;if(o=parseInt(o),o<1||o>7&&o<11||o>17)return p.error.nm;o=t[o]}var s=[];if(arguments.length==4&&(s=D.getCellrangeDate(arguments[3]),H(s)))return s;for(var e=0;e<s.length;e++)if(!(0,j.default)(s[e]).isValid())return p.error.v;for(var u=0;u<a;){l=(0,j.default)(l).add(1,"days");var d=(0,j.default)(l).weekday();if(P(o)){if(d===o[0]||d===o[1])continue}else if(d==0&&(d=7),o.charAt(d-1)=="0")continue;for(var f=0;f<s.length;f++)if((0,j.default)(l).diff((0,j.default)(s[f]),"days")===0){u--;break}u++}return(0,j.default)(l).format("YYYY-MM-DD")}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},YEAR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);return H(t)?t:(0,j.default)(t).isValid()?(0,j.default)(t).year():p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},YEARFRAC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=0;if(arguments.length==3){if(a=D.getFirstValue(arguments[2]),H(a))return a;if(!B(a))return p.error.v;a=parseInt(a)}if(a<0||a>4)return p.error.nm;var o=(0,j.default)(t).date(),s=(0,j.default)(t).month()+1,u=(0,j.default)(t).year(),d=(0,j.default)(l).date(),f=(0,j.default)(l).month()+1,m=(0,j.default)(l).year(),g;switch(a){case 0:o===31&&d===31?(o=30,d=30):o===31?o=30:o===30&&d===31&&(d=30),g=(d+f*30+m*360-(o+s*30+u*360))/360;break;case 1:var y=365;if(u===m||u+1===m&&(s>f||s===f&&o>=d))return(u===m&&D.isLeapYear(u)||D.feb29Between(t,l)||f===1&&d===29)&&(y=366),(0,j.default)(l).diff((0,j.default)(t),"days")/y;var v=m-u+1,b=((0,j.default)().set({year:m+1,month:0,date:1})-(0,j.default)().set({year:u,month:0,date:1}))/1e3/60/60/24,k=b/v;g=(0,j.default)(l).diff((0,j.default)(t),"days")/k;break;case 2:g=(0,j.default)(l).diff((0,j.default)(t),"days")/360;break;case 3:g=(0,j.default)(l).diff((0,j.default)(t),"days")/365;break;case 4:g=(d+f*30+m*360-(o+s*30+u*360))/360;break}return g}catch(x){var w=x;return w=p.errorInfo(w),[p.error.v,w]}},TODAY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return(0,j.default)().format("YYYY-MM-DD")}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},MONTH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);return H(t)?t:(0,j.default)(t).isValid()?(0,j.default)(t).month()+1:p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},EFFECT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t<=0||l<1?p.error.nm:Math.pow(1+t/l,l)-1):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},DOLLAR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=2;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}l>9&&(l=9);for(var a="0.",e=1;e<=l;e++)a+="0";var o=t>0?1:-1;return o*Math.floor(Math.abs(t)*Math.pow(10,l))/Math.pow(10,l)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},DOLLARDE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;if(l=parseInt(l),l<0)return p.error.nm;if(l==0)return p.error.d;var a=parseInt(t,10);a+=t%1*Math.pow(10,Math.ceil(Math.log(l)/Math.LN10))/l;var o=Math.pow(10,Math.ceil(Math.log(l)/Math.LN2)+1);return a=Math.round(a*o)/o,a}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},DOLLARFR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;if(l=parseInt(l),l<0)return p.error.nm;if(l==0)return p.error.d;var a=parseInt(t,10);return a+=t%1*Math.pow(10,-Math.ceil(Math.log(l)/Math.LN10))*l,a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},DB:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseInt(o);var s=12;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseInt(s)}if(t<0||l<0||a<0||o<0)return p.error.nm;if(s<1||s>12)return p.error.nm;if(o>a)return p.error.nm;if(l>=t)return 0;for(var u=(1-Math.pow(l/t,1/a)).toFixed(3),d=t*u*s/12,f=d,m=0,g=o===a?a-1:o,e=2;e<=g;e++)m=(t-f)*u,f+=m;if(o===1)var y=d;else if(o===a)var y=(t-f)*u;else var y=m;return y}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},DDB:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseInt(o);var s=2;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}if(t<0||l<0||a<0||o<0||s<=0)return p.error.nm;if(o>a)return p.error.nm;if(l>=t)return 0;for(var u=0,d=0,e=1;e<=o;e++)d=Math.min((t-u)*(s/a),t-l-u),u+=d;return d}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},RATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=0;if(arguments.length>=4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o)}var s=0;if(arguments.length>=5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}var u=.1;if(arguments.length==6){if(u=D.getFirstValue(arguments[5]),H(u))return u;if(!B(u))return p.error.v;u=parseFloat(u)}if(s!=0&&s!=1)return p.error.nm;for(var d=1e-6,f=100,m=0,g=!1,y=u;m<f&&!g;){var v=Math.pow(y+1,t),b=Math.pow(y+1,t-1),k=o+v*a+l*(v-1)*(y*s+1)/y,w=t*b*a-l*(v-1)*(y*s+1)/Math.pow(y,2),x=t*l*b*(y*s+1)/y+l*(v-1)*s/y,C=y-k/(w+x);Math.abs(C-y)<d&&(g=!0),m++,y=C}return g?y:p.error.nm}catch(_){var S=_;return S=p.errorInfo(S),[p.error.v,S]}},CUMPRINC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseInt(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=D.getFirstValue(arguments[5]);if(H(u))return u;if(!B(u))return p.error.v;if(u=parseFloat(u),t<=0||l<=0||a<=0)return p.error.nm;if(o<1||s<1||o>s)return p.error.nm;if(u!=0&&u!=1)return p.error.nm;var d=window.luckysheet_function.PMT.f(t,l,a,0,u),f=0;o===1&&(u===0?f=d+a*t:f=d,o++);for(var e=o;e<=s;e++)u>0?f+=d-(window.luckysheet_function.FV.f(t,e-2,d,a,1)-d)*t:f+=d-window.luckysheet_function.FV.f(t,e-1,d,a,0)*t;return f}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},COUPNUM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=0;if(arguments.length==4){var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}if(a!=1&&a!=2&&a!=4)return p.error.nm;if(o<0||o>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var s=(0,j.default)(t).date(),u=(0,j.default)(t).month()+1,d=(0,j.default)(t).year(),f=(0,j.default)(l).date(),m=(0,j.default)(l).month()+1,g=(0,j.default)(l).year(),y;switch(o){case 0:s===31&&f===31?(s=30,f=30):s===31?s=30:s===30&&f===31&&(f=30),y=(f+m*30+g*360-(s+u*30+d*360))/(360/a);break;case 1:var v=365;if(d===g||d+1===g&&(u>m||u===m&&s>=f))return(d===g&&D.isLeapYear(d)||D.feb29Between(t,l)||m===1&&f===29)&&(v=366),(0,j.default)(l).diff((0,j.default)(t),"days")/(v/a);var b=g-d+1,k=((0,j.default)().set({year:g+1,month:0,date:1})-(0,j.default)().set({year:d,month:0,date:1}))/1e3/60/60/24,w=k/b;y=(0,j.default)(l).diff((0,j.default)(t),"days")/(w/a);break;case 2:y=(0,j.default)(l).diff((0,j.default)(t),"days")/(360/a);break;case 3:y=(0,j.default)(l).diff((0,j.default)(t),"days")/(365/a);break;case 4:y=(f+m*30+g*360-(s+u*30+d*360))/(360/a);break}return Math.round(y)}catch(C){var x=C;return x=p.errorInfo(x),[p.error.v,x]}},SYD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);return H(o)?o:B(o)?(o=parseInt(o),a==0?p.error.nm:o<1||o>a?p.error.nm:(t-l)*(a-o+1)*2/(a*(a+1))):p.error.v}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},TBILLEQ:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseFloat(a),a<=0?p.error.nm:(0,j.default)(t)-(0,j.default)(l)>0?p.error.nm:(0,j.default)(l)-(0,j.default)(t)>365*24*60*60*1e3?p.error.nm:365*a/(360-a*(0,j.default)(l).diff((0,j.default)(t),"days"))):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},TBILLYIELD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseFloat(a),a<=0?p.error.nm:(0,j.default)(t)-(0,j.default)(l)>=0?p.error.nm:(0,j.default)(l)-(0,j.default)(t)>365*24*60*60*1e3?p.error.nm:(100-a)/a*(360/(0,j.default)(l).diff((0,j.default)(t),"days"))):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},TBILLPRICE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseFloat(a),a<=0?p.error.nm:(0,j.default)(t)-(0,j.default)(l)>0?p.error.nm:(0,j.default)(l)-(0,j.default)(t)>365*24*60*60*1e3?p.error.nm:100*(1-a*(0,j.default)(l).diff((0,j.default)(t),"days")/360)):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},PV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=0;if(arguments.length>=4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o)}var s=0;if(arguments.length>=5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}if(s!=0&&s!=1)return p.error.nm;if(t===0)var u=-a*l-o;else var u=((1-Math.pow(1+t,l))/t*a*(1+t*s)-o)/Math.pow(1+t,l);return u}catch(f){var d=f;return d=p.errorInfo(d),[p.error.v,d]}},ACCRINT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getCellDate(arguments[2]);if(H(a))return a;if(!(0,j.default)(a).isValid())return p.error.v;var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s);var u=D.getFirstValue(arguments[5]);if(H(u))return u;if(!B(u))return p.error.v;u=parseInt(u);var d=0;if(arguments.length>=7){if(d=D.getFirstValue(arguments[6]),H(d))return d;if(!B(d))return p.error.v;d=parseInt(d)}var f=!0;if(arguments.length==8&&(f=D.getCellBoolen(arguments[7]),H(f)))return f;if(o<=0||s<=0)return p.error.nm;if(u!=1&&u!=2&&u!=4)return p.error.nm;if(d<0||d>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(a)>=0)return p.error.nm;var m;if((0,j.default)(a)-(0,j.default)(l)>=0&&!f){var g=(0,j.default)(l).date(),y=(0,j.default)(l).month()+1,v=(0,j.default)(l).year(),b=(0,j.default)(a).date(),k=(0,j.default)(a).month()+1,w=(0,j.default)(a).year();switch(d){case 0:g===31&&b===31?(g=30,b=30):g===31?g=30:g===30&&b===31&&(b=30),m=(b+k*30+w*360-(g+y*30+v*360))/360;break;case 1:var x=365;if(v===w||v+1===w&&(y>k||y===k&&g>=b))return(v===w&&D.isLeapYear(v)||D.feb29Between(l,a)||k===1&&b===29)&&(x=366),(0,j.default)(a).diff((0,j.default)(l),"days")/x;var C=w-v+1,S=((0,j.default)().set({year:w+1,month:0,date:1})-(0,j.default)().set({year:v,month:0,date:1}))/1e3/60/60/24,_=S/C;m=(0,j.default)(a).diff((0,j.default)(l),"days")/_;break;case 2:m=(0,j.default)(a).diff((0,j.default)(l),"days")/360;break;case 3:m=(0,j.default)(a).diff((0,j.default)(l),"days")/365;break;case 4:m=(b+k*30+w*360-(g+y*30+v*360))/360;break}}else{var g=(0,j.default)(t).date(),y=(0,j.default)(t).month()+1,v=(0,j.default)(t).year(),b=(0,j.default)(a).date(),k=(0,j.default)(a).month()+1,w=(0,j.default)(a).year();switch(d){case 0:g===31&&b===31?(g=30,b=30):g===31?g=30:g===30&&b===31&&(b=30),m=(b+k*30+w*360-(g+y*30+v*360))/360;break;case 1:var x=365;if(v===w||v+1===w&&(y>k||y===k&&g>=b))return(v===w&&D.isLeapYear(v)||D.feb29Between(t,a)||k===1&&b===29)&&(x=366),(0,j.default)(a).diff((0,j.default)(t),"days")/x;var C=w-v+1,S=((0,j.default)().set({year:w+1,month:0,date:1})-(0,j.default)().set({year:v,month:0,date:1}))/1e3/60/60/24,_=S/C;m=(0,j.default)(a).diff((0,j.default)(t),"days")/_;break;case 2:m=(0,j.default)(a).diff((0,j.default)(t),"days")/360;break;case 3:m=(0,j.default)(a).diff((0,j.default)(t),"days")/365;break;case 4:m=(b+k*30+w*360-(g+y*30+v*360))/360;break}}return s*o*m}catch(A){var T=A;return T=p.errorInfo(T),[p.error.v,T]}},ACCRINTM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseInt(s)}if(a<=0||o<=0)return p.error.nm;if(s<0||s>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var u=(0,j.default)(t).date(),d=(0,j.default)(t).month()+1,f=(0,j.default)(t).year(),m=(0,j.default)(l).date(),g=(0,j.default)(l).month()+1,y=(0,j.default)(l).year(),v;switch(s){case 0:u===31&&m===31?(u=30,m=30):u===31?u=30:u===30&&m===31&&(m=30),v=(m+g*30+y*360-(u+d*30+f*360))/360;break;case 1:var b=365;if(f===y||f+1===y&&(d>g||d===g&&u>=m))return(f===y&&D.isLeapYear(f)||D.feb29Between(t,l)||g===1&&m===29)&&(b=366),(0,j.default)(l).diff((0,j.default)(t),"days")/b;var k=y-f+1,w=((0,j.default)().set({year:y+1,month:0,date:1})-(0,j.default)().set({year:f,month:0,date:1}))/1e3/60/60/24,x=w/k;v=(0,j.default)(l).diff((0,j.default)(t),"days")/x;break;case 2:v=(0,j.default)(l).diff((0,j.default)(t),"days")/360;break;case 3:v=(0,j.default)(l).diff((0,j.default)(t),"days")/365;break;case 4:v=(m+g*30+y*360-(u+d*30+f*360))/360;break}return o*a*v}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},COUPDAYBS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=0;if(arguments.length==4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}if(a!=1&&a!=2&&a!=4)return p.error.nm;if(o<0||o>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;for(var s,u=Math.ceil((0,j.default)(l).diff((0,j.default)(t),"months")/(12/a))+1,e=1;e<=u;e++){var d=(0,j.default)(l).subtract(12/a*e,"months");if(d<=(0,j.default)(t)){s=d;break}}var f;switch(o){case 0:var m=(0,j.default)(s).date(),g=(0,j.default)(s).month()+1,y=(0,j.default)(s).year(),v=(0,j.default)(t).date(),b=(0,j.default)(t).month()+1,k=(0,j.default)(t).year();m===31&&v===31?(m=30,v=30):m===31?m=30:m===30&&v===31&&(v=30),f=v+b*30+k*360-(m+g*30+y*360);break;case 1:case 2:case 3:f=(0,j.default)(t).diff((0,j.default)(s),"days");break;case 4:var m=(0,j.default)(s).date(),g=(0,j.default)(s).month()+1,y=(0,j.default)(s).year(),v=(0,j.default)(t).date(),b=(0,j.default)(t).month()+1,k=(0,j.default)(t).year();f=v+b*30+k*360-(m+g*30+y*360);break}return f}catch(x){var w=x;return w=p.errorInfo(w),[p.error.v,w]}},COUPDAYS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=0;if(arguments.length==4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}if(a!=1&&a!=2&&a!=4)return p.error.nm;if(o<0||o>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var s;switch(o){case 0:s=360/a;break;case 1:for(var u=Math.ceil((0,j.default)(l).diff((0,j.default)(t),"months")/(12/a))+1,e=1;e<=u;e++){var d=(0,j.default)(l).subtract(12/a*e,"months");if(d<=(0,j.default)(t)){var f=(0,j.default)(l).subtract(12/a*(e-1),"months");s=(0,j.default)(f).diff((0,j.default)(d),"days");break}}break;case 2:s=360/a;break;case 3:s=365/a;break;case 4:s=360/a;break}return s}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},COUPDAYSNC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=0;if(arguments.length==4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}if(a!=1&&a!=2&&a!=4)return p.error.nm;if(o<0||o>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;for(var s,u=Math.ceil((0,j.default)(l).diff((0,j.default)(t),"months")/(12/a))+1,e=1;e<=u;e++){var d=(0,j.default)(l).subtract(12/a*e,"months");if(d<=(0,j.default)(t)){s=(0,j.default)(l).subtract(12/a*(e-1),"months");break}}var f;switch(o){case 0:var m=(0,j.default)(t).date(),g=(0,j.default)(t).month()+1,y=(0,j.default)(t).year(),v=(0,j.default)(s).date(),b=(0,j.default)(s).month()+1,k=(0,j.default)(s).year();m===31&&v===31?(m=30,v=30):m===31?m=30:m===30&&v===31&&(v=30),f=v+b*30+k*360-(m+g*30+y*360);break;case 1:case 2:case 3:f=(0,j.default)(s).diff((0,j.default)(t),"days");break;case 4:var m=(0,j.default)(t).date(),g=(0,j.default)(t).month()+1,y=(0,j.default)(t).year(),v=(0,j.default)(s).date(),b=(0,j.default)(s).month()+1,k=(0,j.default)(s).year();f=v+b*30+k*360-(m+g*30+y*360);break}return f}catch(x){var w=x;return w=p.errorInfo(w),[p.error.v,w]}},COUPNCD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=0;if(arguments.length==4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}if(a!=1&&a!=2&&a!=4)return p.error.nm;if(o<0||o>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;for(var s,u=Math.ceil((0,j.default)(l).diff((0,j.default)(t),"months")/(12/a))+1,e=1;e<=u;e++){var d=(0,j.default)(l).subtract(12/a*e,"months");if(d<=(0,j.default)(t)){s=(0,j.default)(l).subtract(12/a*(e-1),"months");break}}return(0,j.default)(s).format("YYYY-MM-DD")}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},COUPPCD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=0;if(arguments.length==4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}if(a!=1&&a!=2&&a!=4)return p.error.nm;if(o<0||o>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;for(var s,u=Math.ceil((0,j.default)(l).diff((0,j.default)(t),"months")/(12/a))+1,e=1;e<=u;e++){var d=(0,j.default)(l).subtract(12/a*e,"months");if(d<=(0,j.default)(t)){s=d;break}}return(0,j.default)(s).format("YYYY-MM-DD")}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},FV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=0;if(arguments.length>=4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o)}var s=0;if(arguments.length>=5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}if(s!=0&&s!=1)return p.error.nm;var u;if(t===0)u=o+a*l;else{var d=Math.pow(1+t,l);s===1?u=o*d+a*(1+t)*(d-1)/t:u=o*d+a*(d-1)/t}return-u}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},FVSCHEDULE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=arguments[1],a=[];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;a=a.concat(D.getDataArr(l,!1))}else P(l)=="object"&&l.startCell!=null?a=a.concat(D.getCellDataArr(l,"number",!1)):a.push(l);for(var o=[],e=0;e<a.length;e++){var s=a[e];if(!B(s))return p.error.v;o.push(parseFloat(s))}for(var u=o.length,d=t,e=0;e<u;e++)d*=1+o[e];return d}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},YIELD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s);var u=D.getFirstValue(arguments[5]);if(H(u))return u;if(!B(u))return p.error.v;u=parseInt(u);var d=0;if(arguments.length==7){if(d=D.getFirstValue(arguments[6]),H(d))return d;if(!B(d))return p.error.v;d=parseInt(d)}if(a<0)return p.error.nm;if(o<=0||s<=0)return p.error.nm;if(u!=1&&u!=2&&u!=4)return p.error.nm;if(d<0||d>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var f=window.luckysheet_function.COUPNUM.f(t,l,u,d);if(f>1){for(var m=1,g=0,y=m,e=1;e<=100;e++){var v=window.luckysheet_function.PRICE.f(t,l,a,y,s,u,d);if(Math.abs(v-o)<1e-6)break;v>o?g=y:m=y,y=(m+g)/2}var b=y}else var k=window.luckysheet_function.COUPDAYSNC.f(t,l,u,d),w=window.luckysheet_function.COUPDAYS.f(t,l,u,d),x=window.luckysheet_function.COUPDAYBS.f(t,l,u,d),C=s/100+a/u,S=o/100+x/w*(a/u),_=u*w/k,b=(C-S)/S*_;return b}catch(A){var T=A;return T=p.errorInfo(T),[p.error.v,T]}},YIELDDISC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseInt(s)}if(a<=0||o<=0)return p.error.nm;if(s<0||s>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var u=window.luckysheet_function.YEARFRAC.f(t,l,s);return(o/a-1)/u}catch(f){var d=f;return d=p.errorInfo(d),[p.error.v,d]}},NOMINAL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t<=0||l<1?p.error.nm:(Math.pow(t+1,1/l)-1)*l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},XIRR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!1)):l.push(t);for(var a=[],e=0;e<l.length;e++){var o=l[e];if(!B(o))return p.error.v;a.push(parseFloat(o))}var s=D.getCellrangeDate(arguments[1]);if(H(s))return s;for(var e=0;e<s.length;e++)if(!(0,j.default)(s[e]).isValid())return p.error.v;var u=.1;if(arguments.length==3){if(u=D.getFirstValue(arguments[2]),H(u))return u;if(!B(u))return p.error.v;u=parseFloat(u)}for(var d=!1,f=!1,e=0;e<a.length&&(a[e]>0&&(d=!0),a[e]<0&&(f=!0),!(d&&f));e++);if(!d||!f)return p.error.nm;if(a.length!=s.length)return p.error.nm;var m=function(S,_,T){for(var A=T+1,R=S[0],I=1;I<S.length;I++)R+=S[I]/Math.pow(A,window.luckysheet_function.DAYS.f(_[I],_[0])/365);return R},g=function(S,_,T){for(var A=T+1,R=0,I=1;I<S.length;I++){var F=window.luckysheet_function.DAYS.f(_[I],_[0])/365;R-=F*S[I]/Math.pow(A,F+1)}return R},y=u,v=1e-10,b,k,w,x=!0;do w=m(a,s,y),b=y-w/g(a,s,y),k=Math.abs(b-y),y=b,x=k>v&&Math.abs(w)>v;while(x);return y}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},MIRR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!1)):l.push(t);for(var a=[],e=0;e<l.length;e++){var o=l[e];if(!B(o))return p.error.v;a.push(parseFloat(o))}var s=D.getFirstValue(arguments[1]);if(H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s);var u=D.getFirstValue(arguments[2]);if(H(u))return u;if(!B(u))return p.error.v;u=parseFloat(u);for(var d=a.length,f=[],m=[],e=0;e<d;e++)a[e]<0?f.push(a[e]):m.push(a[e]);if(f.length==0||m.length==0)return p.error.d;var g=-window.luckysheet_function.NPV.f(u,m)*Math.pow(1+u,d-1),y=window.luckysheet_function.NPV.f(s,f)*(1+s);return Math.pow(g/y,1/(d-1))-1}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},IRR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!0)):l.push(t);for(var a=[],e=0;e<l.length;e++){var o=l[e];if(!B(o))return p.error.v;a.push(parseFloat(o))}var s=.1;if(arguments.length==2){if(s=D.getFirstValue(arguments[1]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}for(var u=[],d=!1,f=!1,e=0;e<l.length;e++)u[e]=e===0?0:u[e-1]+365,l[e]>0&&(d=!0),l[e]<0&&(f=!0);if(!d||!f)return p.error.nm;var m=function(S,_,T){for(var A=T+1,R=S[0],I=1;I<S.length;I++)R+=S[I]/Math.pow(A,(_[I]-_[0])/365);return R},g=function(S,_,T){for(var A=T+1,R=0,I=1;I<S.length;I++){var F=(_[I]-_[0])/365;R-=F*S[I]/Math.pow(A,F+1)}return R},y=s,v=1e-10,b,k,w,x=!0;do w=m(a,u,y),b=y-w/g(a,u,y),k=Math.abs(b-y),y=b,x=k>v&&Math.abs(w)>v;while(x);return y}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},NPV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);for(var l=[],e=1;e<arguments.length;e++){var a=arguments[e];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;l=l.concat(D.getDataArr(a,!0))}else P(a)=="object"&&a.startCell!=null?l=l.concat(D.getCellDataArr(a,"number",!0)):l.push(a)}for(var o=[],e=0;e<l.length;e++){var s=l[e];B(s)&&o.push(parseFloat(s))}var u=0;if(o.length>0)for(var e=0;e<o.length;e++)u+=o[e]/Math.pow(1+t,e+1);return u}catch(f){var d=f;return d=p.errorInfo(d),[p.error.v,d]}},XNPV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=arguments[1],a=[];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;a=a.concat(D.getDataArr(l,!1))}else P(l)=="object"&&l.startCell!=null?a=a.concat(D.getCellDataArr(l,"number",!1)):a.push(l);for(var o=[],e=0;e<a.length;e++){var s=a[e];if(!B(s))return p.error.v;o.push(parseFloat(s))}var u=D.getCellrangeDate(arguments[2]);if(H(u))return u;for(var e=0;e<u.length;e++)if(!(0,j.default)(u[e]).isValid())return p.error.v;if(o.length!=u.length)return p.error.nm;for(var d=0,e=0;e<o.length;e++)d+=o[e]/Math.pow(1+t,window.luckysheet_function.DAYS.f(u[e],u[0])/365);return d}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},CUMIPMT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseInt(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=D.getFirstValue(arguments[5]);if(H(u))return u;if(!B(u))return p.error.v;if(u=parseFloat(u),t<=0||l<=0||a<=0)return p.error.nm;if(o<1||s<1||o>s)return p.error.nm;if(u!=0&&u!=1)return p.error.nm;var d=window.luckysheet_function.PMT.f(t,l,a,0,u),f=0;o===1&&u===0&&(f=-a,o++);for(var e=o;e<=s;e++)u===1?f+=window.luckysheet_function.FV.f(t,e-2,d,a,1)-d:f+=window.luckysheet_function.FV.f(t,e-1,d,a,0);return f*=t,f}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},PMT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=0;if(arguments.length>=4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o)}var s=0;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}if(s!=0&&s!=1)return p.error.nm;var u;if(t===0)u=(a+o)/l;else{var d=Math.pow(1+t,l);s===1?u=(o*t/(d-1)+a*t/(1-1/d))/(1+t):u=o*t/(d-1)+a*t/(1-1/d)}return-u}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},IPMT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length>=5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}var u=0;if(arguments.length>=6){if(u=D.getFirstValue(arguments[5]),H(u))return u;if(!B(u))return p.error.v;u=parseFloat(u)}if(l<1||l>a)return p.error.nm;if(u!=0&&u!=1)return p.error.nm;var d=window.luckysheet_function.PMT.f(t,a,o,s,u),f;l===1?u===1?f=0:f=-o:u===1?f=window.luckysheet_function.FV.f(t,l-2,d,o,1)-d:f=window.luckysheet_function.FV.f(t,l-1,d,o,0);var m=f*t;return m}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},PPMT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length>=5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}var u=0;if(arguments.length>=6){if(u=D.getFirstValue(arguments[5]),H(u))return u;if(!B(u))return p.error.v;u=parseFloat(u)}if(l<1||l>a)return p.error.nm;if(u!=0&&u!=1)return p.error.nm;var d=window.luckysheet_function.PMT.f(t,a,o,s,u),f=window.luckysheet_function.IPMT.f(t,l,a,o,s,u);return d-f}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},INTRATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseInt(s)}if(a<=0||o<=0)return p.error.nm;if(s<0||s>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var u=(0,j.default)(t).date(),d=(0,j.default)(t).month()+1,f=(0,j.default)(t).year(),m=(0,j.default)(l).date(),g=(0,j.default)(l).month()+1,y=(0,j.default)(l).year(),v;switch(s){case 0:u===31&&m===31?(u=30,m=30):u===31?u=30:u===30&&m===31&&(m=30),v=360/(m+g*30+y*360-(u+d*30+f*360));break;case 1:var b=365;if(f===y||f+1===y&&(d>g||d===g&&u>=m))return(f===y&&D.isLeapYear(f)||D.feb29Between(t,l)||g===1&&m===29)&&(b=366),v=b/(0,j.default)(l).diff((0,j.default)(t),"days"),v=(o-a)/a*v,v;var k=y-f+1,w=((0,j.default)().set({year:y+1,month:0,date:1})-(0,j.default)().set({year:f,month:0,date:1}))/1e3/60/60/24,x=w/k;v=x/(0,j.default)(l).diff((0,j.default)(t),"days");break;case 2:v=360/(0,j.default)(l).diff((0,j.default)(t),"days");break;case 3:v=365/(0,j.default)(l).diff((0,j.default)(t),"days");break;case 4:v=360/(m+g*30+y*360-(u+d*30+f*360));break}return v=(o-a)/a*v,v}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},PRICE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s);var u=D.getFirstValue(arguments[5]);if(H(u))return u;if(!B(u))return p.error.v;u=parseInt(u);var d=0;if(arguments.length==7){if(d=D.getFirstValue(arguments[6]),H(d))return d;if(!B(d))return p.error.v;d=parseInt(d)}if(a<0||o<0)return p.error.nm;if(s<=0)return p.error.nm;if(u!=1&&u!=2&&u!=4)return p.error.nm;if(d<0||d>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var f=window.luckysheet_function.COUPDAYSNC.f(t,l,u,d),m=window.luckysheet_function.COUPDAYS.f(t,l,u,d),g=window.luckysheet_function.COUPDAYBS.f(t,l,u,d),y=window.luckysheet_function.COUPNUM.f(t,l,u,d);if(y>1){for(var v=s/Math.pow(1+o/u,y-1+f/m),b=0,e=1;e<=y;e++)b+=100*a/u/Math.pow(1+o/u,e-1+f/m);var k=100*(a/u)*(g/m),w=v+b-k}else var x=m-g,v=100*(a/u)+s,b=o/u*(x/m)+1,k=100*(a/u)*(g/m),w=v/b-k;return w}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},PRICEDISC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseInt(s)}if(a<=0||o<=0)return p.error.nm;if(s<0||s>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var u=(0,j.default)(t).date(),d=(0,j.default)(t).month()+1,f=(0,j.default)(t).year(),m=(0,j.default)(l).date(),g=(0,j.default)(l).month()+1,y=(0,j.default)(l).year(),v;switch(s){case 0:u===31&&m===31?(u=30,m=30):u===31?u=30:u===30&&m===31&&(m=30),v=(m+g*30+y*360-(u+d*30+f*360))/360;break;case 1:var b=365;if(f===y||f+1===y&&(d>g||d===g&&u>=m))return(f===y&&D.isLeapYear(f)||D.feb29Between(t,l)||g===1&&m===29)&&(b=366),v=(0,j.default)(l).diff((0,j.default)(t),"days")/b,v=o-a*o*v,v;var k=y-f+1,w=((0,j.default)().set({year:y+1,month:0,date:1})-(0,j.default)().set({year:f,month:0,date:1}))/1e3/60/60/24,x=w/k;v=(0,j.default)(l).diff((0,j.default)(t),"days")/x;break;case 2:v=(0,j.default)(l).diff((0,j.default)(t),"days")/360;break;case 3:v=(0,j.default)(l).diff((0,j.default)(t),"days")/365;break;case 4:v=(m+g*30+y*360-(u+d*30+f*360))/360;break}return v=o-a*o*v,v}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},PRICEMAT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getCellDate(arguments[2]);if(H(a))return a;if(!(0,j.default)(a).isValid())return p.error.v;var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s);var u=0;if(arguments.length==6){if(u=D.getFirstValue(arguments[5]),H(u))return u;if(!B(u))return p.error.v;u=parseInt(u)}if(o<0||s<0)return p.error.nm;if(u<0||u>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var d=(0,j.default)(t).date(),f=(0,j.default)(t).month()+1,m=(0,j.default)(t).year(),g=(0,j.default)(l).date(),y=(0,j.default)(l).month()+1,v=(0,j.default)(l).year(),b=(0,j.default)(a).date(),k=(0,j.default)(a).month()+1,w=(0,j.default)(a).year(),x;switch(u){case 0:d==31&&(d=30),g==31&&(g=30),b==31&&(b=30);var C=360,S=g+y*30+v*360-(d+f*30+m*360),_=g+y*30+v*360-(b+k*30+w*360),T=d+f*30+m*360-(b+k*30+w*360);break;case 1:var A=365;if(m===v||m+1===v&&(f>y||f===y&&d>=g)){(m===v&&D.isLeapYear(m)||D.feb29Between(t,l)||y===1&&g===29)&&(A=366);var C=A,S=(0,j.default)(l).diff((0,j.default)(t),"days"),_=(0,j.default)(t).diff((0,j.default)(a),"days"),T=(0,j.default)(l).diff((0,j.default)(a),"days");return x=(100+_/C*o*100)/(1+S/C*s)-T/C*o*100,x}var R=v-m+1,I=((0,j.default)().set({year:v+1,month:0,date:1})-(0,j.default)().set({year:m,month:0,date:1}))/1e3/60/60/24,F=I/R,C=F,S=(0,j.default)(l).diff((0,j.default)(t),"days"),_=(0,j.default)(t).diff((0,j.default)(a),"days"),T=(0,j.default)(l).diff((0,j.default)(a),"days");break;case 2:var C=360,S=(0,j.default)(l).diff((0,j.default)(t),"days"),_=(0,j.default)(t).diff((0,j.default)(a),"days"),T=(0,j.default)(l).diff((0,j.default)(a),"days");break;case 3:var C=365,S=(0,j.default)(l).diff((0,j.default)(t),"days"),_=(0,j.default)(t).diff((0,j.default)(a),"days"),T=(0,j.default)(l).diff((0,j.default)(a),"days");break;case 4:var C=360,S=g+y*30+v*360-(d+f*30+m*360),_=g+y*30+v*360-(b+k*30+w*360),T=d+f*30+m*360-(b+k*30+w*360);break}return x=(100+_/C*o*100)/(1+S/C*s)-T/C*o*100,x}catch(M){var z=M;return z=p.errorInfo(z),[p.error.v,z]}},RECEIVED:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}if(a<=0||o<=0)return p.error.nm;if(s<0||s>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var u=(0,j.default)(t).date(),d=(0,j.default)(t).month()+1,f=(0,j.default)(t).year(),m=(0,j.default)(l).date(),g=(0,j.default)(l).month()+1,y=(0,j.default)(l).year(),v;switch(s){case 0:u==31&&(u=30),m==31&&(m=30);var b=360,k=m+g*30+y*360-(u+d*30+f*360);break;case 1:var w=365;if(f===y||f+1===y&&(d>g||d===g&&u>=m)){(f===y&&D.isLeapYear(f)||D.feb29Between(t,l)||g===1&&m===29)&&(w=366);var b=w,k=(0,j.default)(l).diff((0,j.default)(t),"days");return v=a/(1-o*k/b),v}var x=y-f+1,C=((0,j.default)().set({year:y+1,month:0,date:1})-(0,j.default)().set({year:f,month:0,date:1}))/1e3/60/60/24,S=C/x,b=S,k=(0,j.default)(l).diff((0,j.default)(t),"days");break;case 2:var b=360,k=(0,j.default)(l).diff((0,j.default)(t),"days");break;case 3:var b=365,k=(0,j.default)(l).diff((0,j.default)(t),"days");break;case 4:var b=360,k=m+g*30+y*360-(u+d*30+f*360);break}return v=a/(1-o*k/b),v}catch(T){var _=T;return _=p.errorInfo(_),[p.error.v,_]}},DISC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}if(a<=0||o<=0)return p.error.nm;if(s<0||s>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var u=(0,j.default)(t).date(),d=(0,j.default)(t).month()+1,f=(0,j.default)(t).year(),m=(0,j.default)(l).date(),g=(0,j.default)(l).month()+1,y=(0,j.default)(l).year(),v;switch(s){case 0:u==31&&(u=30),m==31&&(m=30);var b=360,k=m+g*30+y*360-(u+d*30+f*360);break;case 1:var w=365;if(f===y||f+1===y&&(d>g||d===g&&u>=m)){(f===y&&D.isLeapYear(f)||D.feb29Between(t,l)||g===1&&m===29)&&(w=366);var b=w,k=(0,j.default)(l).diff((0,j.default)(t),"days");return v=(o-a)/o*(b/k),v}var x=y-f+1,C=((0,j.default)().set({year:y+1,month:0,date:1})-(0,j.default)().set({year:f,month:0,date:1}))/1e3/60/60/24,S=C/x,b=S,k=(0,j.default)(l).diff((0,j.default)(t),"days");break;case 2:var b=360,k=(0,j.default)(l).diff((0,j.default)(t),"days");break;case 3:var b=365,k=(0,j.default)(l).diff((0,j.default)(t),"days");break;case 4:var b=360,k=m+g*30+y*360-(u+d*30+f*360);break}return v=(o-a)/o*(b/k),v}catch(T){var _=T;return _=p.errorInfo(_),[p.error.v,_]}},NPER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=0;if(arguments.length>=4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o)}var s=0;if(arguments.length>=5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}if(s!=0&&s!=1)return p.error.nm;var u=l*(1+t*s)-o*t,d=a*t+l*(1+t*s);return Math.log(u/d)/Math.log(1+t)}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},SLN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseFloat(a),a==0?p.error.d:(t-l)/a):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},DURATION:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=0;if(arguments.length==6){if(u=D.getFirstValue(arguments[5]),H(u))return u;if(!B(u))return p.error.v;u=parseInt(u)}if(a<0||o<0)return p.error.nm;if(s!=1&&s!=2&&s!=4)return p.error.nm;if(u<0||u>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;for(var d=window.luckysheet_function.COUPNUM.f(t,l,s,u),f=0,m=0,e=1;e<=d;e++)f+=100*(a/s)*e/Math.pow(1+o/s,e),m+=100*(a/s)/Math.pow(1+o/s,e);var g=(f+100*d/Math.pow(1+o/s,d))/(m+100/Math.pow(1+o/s,d));return g=g/s,g}catch(v){var y=v;return y=p.errorInfo(y),[p.error.v,y]}},MDURATION:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=0;if(arguments.length==6){if(u=D.getFirstValue(arguments[5]),H(u))return u;if(!B(u))return p.error.v;u=parseInt(u)}if(a<0||o<0)return p.error.nm;if(s!=1&&s!=2&&s!=4)return p.error.nm;if(u<0||u>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var d=window.luckysheet_function.DURATION.f(t,l,a,o,s,u);return d/(1+o/s)}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},BIN2DEC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!/^[01]{1,10}$/g.test(t))return p.error.nm;var l=parseInt(t,2),a=t.toString();return a.length===10&&a.substring(0,1)==="1"?parseInt(a.substring(1),2)-512:l}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},BIN2HEX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^[01]{1,10}$/g.test(t))return p.error.nm;var a=parseInt(t,2).toString(16).toUpperCase();return l==null?a:l<0||l<a.length?p.error.nm:new Array(l-a.length+1).join("0")+a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},BIN2OCT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^[01]{1,10}$/g.test(t))return p.error.nm;var a=t.toString();if(a.length===10&&a.substring(0,1)==="1")return(1073741312+parseInt(a.substring(1),2)).toString(8);var o=parseInt(t,2).toString(8);return l==null?o:l<0||l<o.length?p.error.nm:new Array(l-o.length+1).join("0")+o}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},DEC2BIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^-?[0-9]{1,3}$/.test(t)||t<-512||t>511)return p.error.nm;if(t<0)return"1"+new Array(9-(512+t).toString(2).length).join("0")+(512+t).toString(2);var a=parseInt(t,10).toString(2);return l==null?a:l<0||l<a.length?p.error.nm:new Array(l-a.length+1).join("0")+a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},DEC2HEX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^-?[0-9]{1,12}$/.test(t)||t<-549755813888||t>549755813887)return p.error.nm;if(t<0)return(1099511627776+t).toString(16).toUpperCase();var a=parseInt(t,10).toString(16).toUpperCase();return l==null?a:l<0||l<a.length?p.error.nm:new Array(l-a.length+1).join("0")+a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},DEC2OCT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^-?[0-9]{1,9}$/.test(t)||t<-536870912||t>536870911)return p.error.nm;if(t<0)return(1073741824+t).toString(8);var a=parseInt(t,10).toString(8);return l==null?a:l<0||l<a.length?p.error.nm:new Array(l-a.length+1).join("0")+a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},HEX2BIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^[0-9A-Fa-f]{1,10}$/.test(t))return p.error.nm;var a=t.length===10&&t.substring(0,1).toLowerCase()==="f",o=a?parseInt(t,16)-1099511627776:parseInt(t,16);if(o<-512||o>511)return p.error.nm;if(a)return"1"+new Array(9-(512+o).toString(2).length).join("0")+(512+o).toString(2);var s=o.toString(2);return l==null?s:l<0||l<s.length?p.error.nm:new Array(l-s.length+1).join("0")+s}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},HEX2DEC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!/^[0-9A-Fa-f]{1,10}$/.test(t))return p.error.nm;var l=parseInt(t,16);return l>=549755813888?l-1099511627776:l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},HEX2OCT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^[0-9A-Fa-f]{1,10}$/.test(t))return p.error.nm;var a=parseInt(t,16);if(a>536870911&&a<1098974756864)return p.error.nm;if(a>=1098974756864)return(a-1098437885952).toString(8);var o=a.toString(8);return l==null?o:l<0||l<o.length?p.error.nm:new Array(l-o.length+1).join("0")+o}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},OCT2BIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^[0-7]{1,10}$/.test(t))return p.error.nm;t=t.toString();var a=t.length===10&&t.substring(0,1)==="7",o=a?parseInt(t,8)-1073741824:parseInt(t,8);if(o<-512||o>511)return Me.num;if(a)return"1"+new Array(9-(512+o).toString(2).length).join("0")+(512+o).toString(2);var s=o.toString(2);return l==null?s:l<0||l<s.length?p.error.nm:new Array(l-s.length+1).join("0")+s}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},OCT2DEC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!/^[0-7]{1,10}$/.test(t))return p.error.nm;var l=parseInt(t,8);return l>=536870912?l-1073741824:l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},OCT2HEX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^[0-7]{1,10}$/.test(t))return p.error.nm;var a=parseInt(t,8);if(a>=536870912)return"FF"+(a+3221225472).toString(16).toUpperCase();var o=a.toString(16).toUpperCase();return l==null?o:l<0||l<o.length?p.error.nm:new Array(l-o.length+1).join("0")+o}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},COMPLEX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a="i";if(arguments.length==3&&(a=arguments[2].toString()),a!="i"&&a!="j")return p.error.v;if(t===0&&l===0)return 0;if(t===0)return l===1?a:l.toString()+a;if(l===0)return t.toString();var o=l>0?"+":"";return t.toString()+o+(l===1?a:l.toString()+a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},IMREAL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(t=t.toString(),t.toLowerCase()=="true"||t.toLowerCase()=="false")return p.error.v;if(t=="0"||["i","+i","1i","+1i","-i","-1i","j","+j","1j","+1j","-j","-1j"].indexOf(t)>=0)return 0;var l=t.indexOf("+"),a=t.indexOf("-");l===0&&(l=t.indexOf("+",1)),a===0&&(a=t.indexOf("-",1));var o=t.substring(t.length-1,t.length),s=o==="i"||o==="j";return l>=0||a>=0?s?l>=0?isNaN(t.substring(0,l))||isNaN(t.substring(l+1,t.length-1))?p.error.nm:Number(t.substring(0,l)):isNaN(t.substring(0,a))||isNaN(t.substring(a+1,t.length-1))?p.error.nm:Number(t.substring(0,a)):p.error.nm:s?isNaN(t.substring(0,t.length-1))?p.error.nm:0:isNaN(t)?p.error.nm:t}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},IMAGINARY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(t=t.toString(),t.toLowerCase()=="true"||t.toLowerCase()=="false")return p.error.v;if(t=="0")return 0;if(["i","j"].indexOf(t)>=0)return 1;t=t.replace("+i","+1i").replace("-i","-1i").replace("+j","+1j").replace("-j","-1j");var l=t.indexOf("+"),a=t.indexOf("-");l===0&&(l=t.indexOf("+",1)),a===0&&(a=t.indexOf("-",1));var o=t.substring(t.length-1,t.length),s=o==="i"||o==="j";return l>=0||a>=0?s?l>=0?isNaN(t.substring(0,l))||isNaN(t.substring(l+1,t.length-1))?p.error.nm:Number(t.substring(l+1,t.length-1)):isNaN(t.substring(0,a))||isNaN(t.substring(a+1,t.length-1))?p.error.nm:-Number(t.substring(a+1,t.length-1)):p.error.nm:s?isNaN(t.substring(0,t.length-1))?p.error.nm:t.substring(0,t.length-1):isNaN(t)?p.error.nm:0}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},IMCONJUGATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;t=t.toString();var l=window.luckysheet_function.IMREAL.f(t);if(H(l))return l;var a=window.luckysheet_function.IMAGINARY.f(t);if(H(a))return a;var o=t.substring(t.length-1);return o=o==="i"||o==="j"?o:"i",a!==0?window.luckysheet_function.COMPLEX.f(l,-a,o):t}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},IMABS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheet_function.IMREAL.f(arguments[0]);if(H(t))return t;var l=window.luckysheet_function.IMAGINARY.f(arguments[0]);return H(l)?l:Math.sqrt(Math.pow(t,2)+Math.pow(l,2))}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},DELTA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=0;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l)}return t===l?1:0}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},IMSUM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheet_function.IMREAL.f(arguments[0]);if(H(t))return t;var l=window.luckysheet_function.IMAGINARY.f(arguments[0]);if(H(l))return l;for(var a=arguments[0],e=1;e<arguments.length;e++){var o=window.luckysheet_function.IMREAL.f(a);if(H(o))return o;var s=window.luckysheet_function.IMAGINARY.f(a);if(H(s))return s;var u=window.luckysheet_function.IMREAL.f(arguments[e]);if(H(u))return u;var d=window.luckysheet_function.IMAGINARY.f(arguments[e]);if(H(d))return d;a=window.luckysheet_function.COMPLEX.f(o+u,s+d)}return a}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},IMSUB:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(t=t.toString(),t.toLowerCase()=="true"||t.toLowerCase()=="false")return p.error.v;var l=window.luckysheet_function.IMREAL.f(t);if(H(l))return l;var a=window.luckysheet_function.IMAGINARY.f(t);if(H(a))return a;var o=D.getFirstValue(arguments[1]);if(H(o))return o;if(o=o.toString(),o.toLowerCase()=="true"||o.toLowerCase()=="false")return p.error.v;var s=window.luckysheet_function.IMREAL.f(o);if(H(s))return s;var u=window.luckysheet_function.IMAGINARY.f(o);if(H(u))return u;var d=t.substring(t.length-1),f=o.substring(o.length-1),m="i";return(d==="j"||f==="j")&&(m="j"),window.luckysheet_function.COMPLEX.f(l-s,a-u,m)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},IMPRODUCT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheet_function.IMREAL.f(arguments[0]);if(H(t))return t;var l=window.luckysheet_function.IMAGINARY.f(arguments[0]);if(H(l))return l;for(var a=arguments[0],e=1;e<arguments.length;e++){var o=window.luckysheet_function.IMREAL.f(a);if(H(o))return o;var s=window.luckysheet_function.IMAGINARY.f(a);if(H(s))return s;var u=window.luckysheet_function.IMREAL.f(arguments[e]);if(H(u))return u;var d=window.luckysheet_function.IMAGINARY.f(arguments[e]);if(H(d))return d;a=window.luckysheet_function.COMPLEX.f(o*u-s*d,o*d+s*u)}return a}catch(m){var f=m;return f=p.errorInfo(f),[p.error.v,f]}},IMDIV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(t=t.toString(),t.toLowerCase()=="true"||t.toLowerCase()=="false")return p.error.v;var l=window.luckysheet_function.IMREAL.f(t);if(H(l))return l;var a=window.luckysheet_function.IMAGINARY.f(t);if(H(a))return a;var o=D.getFirstValue(arguments[1]);if(H(o))return o;if(o=o.toString(),o.toLowerCase()=="true"||o.toLowerCase()=="false")return p.error.v;var s=window.luckysheet_function.IMREAL.f(o);if(H(s))return s;var u=window.luckysheet_function.IMAGINARY.f(o);if(H(u))return u;var d=t.substring(t.length-1),f=o.substring(o.length-1),m="i";if((d==="j"||f==="j")&&(m="j"),s===0&&u===0)return p.error.nm;var g=s*s+u*u;return window.luckysheet_function.COMPLEX.f((l*s+a*u)/g,(a*s-l*u)/g,m)}catch(v){var y=v;return y=p.errorInfo(y),[p.error.v,y]}},NOT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellBoolen(arguments[0]);return H(t)?t:!t}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},TRUE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return!0}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},FALSE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return!1}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},AND:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=!0,e=0;e<arguments.length;e++){var l=D.getCellBoolen(arguments[e]);if(H(l))return l;if(!l){t=!1;break}}return t}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},IFERROR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[1],"text"),l=D.getFirstValue(arguments[0],"text");return H(l)||P(l)==="string"&&$.trim(l)===""?t:l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},IF:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellBoolen(arguments[0]);if(H(t))return t;var l=D.getFirstValue(arguments[1],"text");if(H(l)&&a!=Me.d)return l;var a="";return arguments.length==3&&(a=D.getFirstValue(arguments[2],"text"),H(a)&&a!=Me.d)?a:t?l:a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},OR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=!1,e=0;e<arguments.length;e++){var l=D.getCellBoolen(arguments[e]);if(H(l))return l;if(l){t=!0;break}}return t}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},NE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=D.getFirstValue(arguments[1]);return H(l)?l:t!=l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},EQ:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=D.getFirstValue(arguments[1]);return H(l)?l:t==l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},GT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t>l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},GTE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t>=l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},LT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t<l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},LTE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t<=l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ADD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t+l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},MINUS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t-l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},MULTIPLY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t*l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},DIVIDE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),l==0?p.error.d:t/l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},CONCAT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;var l=D.getFirstValue(arguments[1],"text");return H(l)?l:t+""+l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},UNARY_PERCENT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=t/100;return Math.round(l*100)/100}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},CONCATENATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t="",e=0;e<arguments.length;e++){var l=D.getFirstValue(arguments[e],"text");if(H(l))return l;t=t+""+l}return t}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},CODE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:t==""?p.error.v:t.charCodeAt(0)}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},CHAR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseInt(t),t<1||t>255?p.error.v:String.fromCharCode(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ARABIC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;if(t=t.toString().toUpperCase(),!/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/.test(t))return p.error.v;var l=0;return t.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g,function(o){l+={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}[o]}),l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ROMAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let a=function(o){var s=[["","I","II","III","IV","V","VI","VII","VIII","IX"],["","X","XX","XXX","XL","L","LX","LXX","LXXX","XC"],["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM"],["","M","MM","MMM"]],u=s[3][Math.floor(o/1e3)],d=s[2][Math.floor(o%1e3/100)],f=s[1][Math.floor(o%100/10)],m=s[0][o%10];return u+d+f+m};var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseInt(t),t==0?"":t<1||t>3999?p.error.v:a(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},REGEXEXTRACT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;var a=t.match(new RegExp(l));return a?a[a.length>1?a.length-1:0]:null}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},REGEXMATCH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;var a=t.match(new RegExp(l));return!!a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},REGEXREPLACE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;var a=D.getFirstValue(arguments[2],"text");return H(a)?a:t.replace(new RegExp(l),a)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},T:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)||P(t)=="string"?t:""}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},FIXED:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=2;if(arguments.length>=2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}var a=!1;if(arguments.length==3&&(a=D.getCellBoolen(arguments[2]),H(a)))return a;if(l>127)return p.error.v;var o=a?"0":"#,##0";return l<=0?t=Math.round(t*Math.pow(10,l))/Math.pow(10,l):l>0&&(o+="."+new Array(l+1).join("0")),mt(o,t)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},FIND:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;l=l.toString();var a=1;if(arguments.length==3){if(a=D.getFirstValue(arguments[2]),H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a)}if(a<0||a>l.length)return p.error.v;if(t=="")return a;if(l.indexOf(t)==-1)return p.error.v;var o=l.indexOf(t,a-1)+1;return o}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},FINDB:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;l=l.toString();var a=1;if(arguments.length==3){if(a=D.getFirstValue(arguments[2]),H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a)}if(a<0||a>l.length)return p.error.v;if(t=="")return a;if(l.indexOf(t)==-1)return p.error.v;for(var o=l.split(""),s=l.indexOf(t,a-1),u=0,e=0;e<s;e++)/[^\x00-\xff]/g.test(o[e])?u+=2:u+=1;return u}catch(f){var d=f;return d=p.errorInfo(d),[p.error.v,d]}},JOIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;for(var l=[],e=1;e<arguments.length;e++){var a=arguments[e];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;l=l.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?l=l.concat(D.getCellDataArr(a,"text",!1)):l.push(a)}return l.join(t)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},LEFT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=1;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}return l<0?p.error.v:l>=t.length?t:l==0?"":t.substr(0,l)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},RIGHT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=1;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}return l<0?p.error.v:l>=t.length?t:l==0?"":t.substr(-l,l)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},MID:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseInt(a),l<1||a<0?p.error.v:l>t.length?"":l+a>t.length?t.substr(l-1,t.length-l+1):t.substr(l-1,a)):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},LEN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(t=t.toString(),t.length)}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},LENB:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(t=t.toString(),t.replace(/[^\x00-\xff]/g,"aa").length)}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},LOWER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(t=t.toString(),t&&t.toLowerCase())}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},UPPER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(t=t.toString(),t&&t.toUpperCase())}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},EXACT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1],"text");return H(l)?l:(l=l.toString(),t===l)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},REPLACE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=D.getFirstValue(arguments[3],"text");return H(o)?o:(o=o.toString(),t.substr(0,l-1)+o+t.substr(l-1+a))}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},REPT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),l<0?p.error.v:(l>100&&(l=100),new Array(l+1).join(t))):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},SEARCH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;l=l.toString();var a=1;if(arguments.length==3){if(a=D.getFirstValue(arguments[2]),H(a))return a;if(!B(a))return p.error.v;a=parseInt(a)}if(a<=0||a>l.length)return p.error.v;var o=l.toLowerCase().indexOf(t.toLowerCase(),a-1)+1;return o===0?p.error.v:o}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},SUBSTITUTE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;l=l.toString();var a=D.getFirstValue(arguments[2],"text");if(H(a))return a;a=a.toString();var o=null;if(arguments.length==4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}var s=new RegExp(l,"g"),u;if(o==null)u=t.replace(s,a);else{if(o<=0)return p.error.v;var d=t.match(s);if(d==null||o>d.length)return t;for(var f=l.length,m=0,e=1;e<=o;e++)m=t.indexOf(l,m)+1;u=t.substring(0,m-1)+a+t.substring(m-1+f)}return u}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},CLEAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();for(var l=[],e=0;e<t.length;e++){var a=t.charCodeAt(e);(/[\u4e00-\u9fa5]/g.test(t.charAt(e))||a>31&&a<127)&&l.push(t.charAt(e))}return l.join("")}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},TEXT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1],"text");return H(l)?l:(l=l.toString(),mt(l,t))}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},TRIM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(t=t.toString(),t.replace(/ +/g," ").trim())}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},VALUE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(t=t.toString(),at(t)[2])}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},PROPER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(t=t.toString().toLowerCase(),t.replace(/[a-zA-Z]+/g,function(a){return a.substring(0,1).toUpperCase()+a.substring(1)}))}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},CONVERT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;l=l.toString();var a=D.getFirstValue(arguments[2],"text");if(H(a))return a;a=a.toString();for(var o=[["a.u. of action","?",null,"action",!1,!1,105457168181818e-48],["a.u. of charge","e",null,"electric_charge",!1,!1,160217653141414e-33],["a.u. of energy","Eh",null,"energy",!1,!1,435974417757576e-32],["a.u. of length","a?",null,"length",!1,!1,529177210818182e-25],["a.u. of mass","m?",null,"mass",!1,!1,910938261616162e-45],["a.u. of time","?/Eh",null,"time",!1,!1,241888432650516e-31],["admiralty knot","admkn",null,"speed",!1,!0,.514773333],["ampere","A",null,"electric_current",!0,!1,1],["ampere per meter","A/m",null,"magnetic_field_intensity",!0,!1,1],["\xE5ngstr\xF6m","\xC5",["ang"],"length",!1,!0,1e-10],["are","ar",null,"area",!1,!0,100],["astronomical unit","ua",null,"length",!1,!1,149597870691667e-25],["bar","bar",null,"pressure",!1,!1,1e5],["barn","b",null,"area",!1,!1,1e-28],["becquerel","Bq",null,"radioactivity",!0,!1,1],["bit","bit",["b"],"information",!1,!0,1],["btu","BTU",["btu"],"energy",!1,!0,1055.05585262],["byte","byte",null,"information",!1,!0,8],["candela","cd",null,"luminous_intensity",!0,!1,1],["candela per square metre","cd/m?",null,"luminance",!0,!1,1],["coulomb","C",null,"electric_charge",!0,!1,1],["cubic \xE5ngstr\xF6m","ang3",["ang^3"],"volume",!1,!0,1e-30],["cubic foot","ft3",["ft^3"],"volume",!1,!0,.028316846592],["cubic inch","in3",["in^3"],"volume",!1,!0,16387064e-12],["cubic light-year","ly3",["ly^3"],"volume",!1,!0,846786664623715e-61],["cubic metre","m?",null,"volume",!0,!0,1],["cubic mile","mi3",["mi^3"],"volume",!1,!0,416818182544058e-5],["cubic nautical mile","Nmi3",["Nmi^3"],"volume",!1,!0,6352182208],["cubic Pica","Pica3",["Picapt3","Pica^3","Picapt^3"],"volume",!1,!0,758660370370369e-22],["cubic yard","yd3",["yd^3"],"volume",!1,!0,.764554857984],["cup","cup",null,"volume",!1,!0,.0002365882365],["dalton","Da",["u"],"mass",!1,!1,166053886282828e-41],["day","d",["day"],"time",!1,!0,86400],["degree","\xB0",null,"angle",!1,!1,.0174532925199433],["degrees Rankine","Rank",null,"temperature",!1,!0,.555555555555556],["dyne","dyn",["dy"],"force",!1,!0,1e-5],["electronvolt","eV",["ev"],"energy",!1,!0,1.60217656514141],["ell","ell",null,"length",!1,!0,1.143],["erg","erg",["e"],"energy",!1,!0,1e-7],["farad","F",null,"electric_capacitance",!0,!1,1],["fluid ounce","oz",null,"volume",!1,!0,295735295625e-16],["foot","ft",null,"length",!1,!0,.3048],["foot-pound","flb",null,"energy",!1,!0,1.3558179483314],["gal","Gal",null,"acceleration",!1,!1,.01],["gallon","gal",null,"volume",!1,!0,.003785411784],["gauss","G",["ga"],"magnetic_flux_density",!1,!0,1],["grain","grain",null,"mass",!1,!0,647989e-10],["gram","g",null,"mass",!1,!0,.001],["gray","Gy",null,"absorbed_dose",!0,!1,1],["gross registered ton","GRT",["regton"],"volume",!1,!0,2.8316846592],["hectare","ha",null,"area",!1,!0,1e4],["henry","H",null,"inductance",!0,!1,1],["hertz","Hz",null,"frequency",!0,!1,1],["horsepower","HP",["h"],"power",!1,!0,745.69987158227],["horsepower-hour","HPh",["hh","hph"],"energy",!1,!0,2684519538e-3],["hour","h",["hr"],"time",!1,!0,3600],["imperial gallon (U.K.)","uk_gal",null,"volume",!1,!0,.00454609],["imperial hundredweight","lcwt",["uk_cwt","hweight"],"mass",!1,!0,50.802345],["imperial quart (U.K)","uk_qt",null,"volume",!1,!0,.0011365225],["imperial ton","brton",["uk_ton","LTON"],"mass",!1,!0,1016.046909],["inch","in",null,"length",!1,!0,.0254],["international acre","uk_acre",null,"area",!1,!0,4046.8564224],["IT calorie","cal",null,"energy",!1,!0,4.1868],["joule","J",null,"energy",!0,!0,1],["katal","kat",null,"catalytic_activity",!0,!1,1],["kelvin","K",["kel"],"temperature",!0,!0,1],["kilogram","kg",null,"mass",!0,!0,1],["knot","kn",null,"speed",!1,!0,.514444444444444],["light-year","ly",null,"length",!1,!0,9460730472580800],["litre","L",["l","lt"],"volume",!1,!0,.001],["lumen","lm",null,"luminous_flux",!0,!1,1],["lux","lx",null,"illuminance",!0,!1,1],["maxwell","Mx",null,"magnetic_flux",!1,!1,1e-18],["measurement ton","MTON",null,"volume",!1,!0,1.13267386368],["meter per hour","m/h",["m/hr"],"speed",!1,!0,.00027777777777778],["meter per second","m/s",["m/sec"],"speed",!0,!0,1],["meter per second squared","m?s??",null,"acceleration",!0,!1,1],["parsec","pc",["parsec"],"length",!1,!0,30856775814671900],["meter squared per second","m?/s",null,"kinematic_viscosity",!0,!1,1],["metre","m",null,"length",!0,!0,1],["miles per hour","mph",null,"speed",!1,!0,.44704],["millimetre of mercury","mmHg",null,"pressure",!1,!1,133.322],["minute","?",null,"angle",!1,!1,.000290888208665722],["minute","min",["mn"],"time",!1,!0,60],["modern teaspoon","tspm",null,"volume",!1,!0,5e-6],["mole","mol",null,"amount_of_substance",!0,!1,1],["morgen","Morgen",null,"area",!1,!0,2500],["n.u. of action","?",null,"action",!1,!1,105457168181818e-48],["n.u. of mass","m?",null,"mass",!1,!1,910938261616162e-45],["n.u. of speed","c?",null,"speed",!1,!1,299792458],["n.u. of time","?/(me?c??)",null,"time",!1,!1,128808866778687e-35],["nautical mile","M",["Nmi"],"length",!1,!0,1852],["newton","N",null,"force",!0,!0,1],["\u0153rsted","Oe ",null,"magnetic_field_intensity",!1,!1,79.5774715459477],["ohm","\u03A9",null,"electric_resistance",!0,!1,1],["ounce mass","ozm",null,"mass",!1,!0,.028349523125],["pascal","Pa",null,"pressure",!0,!1,1],["pascal second","Pa?s",null,"dynamic_viscosity",!0,!1,1],["pferdest\xE4rke","PS",null,"power",!1,!0,735.49875],["phot","ph",null,"illuminance",!1,!1,1e-4],["pica (1/6 inch)","pica",null,"length",!1,!0,.00035277777777778],["pica (1/72 inch)","Pica",["Picapt"],"length",!1,!0,.00423333333333333],["poise","P",null,"dynamic_viscosity",!1,!1,.1],["pond","pond",null,"force",!1,!0,.00980665],["pound force","lbf",null,"force",!1,!0,4.4482216152605],["pound mass","lbm",null,"mass",!1,!0,.45359237],["quart","qt",null,"volume",!1,!0,.000946352946],["radian","rad",null,"angle",!0,!1,1],["second","?",null,"angle",!1,!1,484813681109536e-20],["second","s",["sec"],"time",!0,!0,1],["short hundredweight","cwt",["shweight"],"mass",!1,!0,45.359237],["siemens","S",null,"electrical_conductance",!0,!1,1],["sievert","Sv",null,"equivalent_dose",!0,!1,1],["slug","sg",null,"mass",!1,!0,14.59390294],["square \xE5ngstr\xF6m","ang2",["ang^2"],"area",!1,!0,1e-20],["square foot","ft2",["ft^2"],"area",!1,!0,.09290304],["square inch","in2",["in^2"],"area",!1,!0,64516e-8],["square light-year","ly2",["ly^2"],"area",!1,!0,895054210748189e17],["square meter","m?",null,"area",!0,!0,1],["square mile","mi2",["mi^2"],"area",!1,!0,2589988110336e-6],["square nautical mile","Nmi2",["Nmi^2"],"area",!1,!0,3429904],["square Pica","Pica2",["Picapt2","Pica^2","Picapt^2"],"area",!1,!0,1792111111111e-17],["square yard","yd2",["yd^2"],"area",!1,!0,.83612736],["statute mile","mi",null,"length",!1,!0,1609.344],["steradian","sr",null,"solid_angle",!0,!1,1],["stilb","sb",null,"luminance",!1,!1,1e-4],["stokes","St",null,"kinematic_viscosity",!1,!1,1e-4],["stone","stone",null,"mass",!1,!0,6.35029318],["tablespoon","tbs",null,"volume",!1,!0,147868e-10],["teaspoon","tsp",null,"volume",!1,!0,492892e-11],["tesla","T",null,"magnetic_flux_density",!0,!0,1],["thermodynamic calorie","c",null,"energy",!1,!0,4.184],["ton","ton",null,"mass",!1,!0,907.18474],["tonne","t",null,"mass",!1,!1,1e3],["U.K. pint","uk_pt",null,"volume",!1,!0,.00056826125],["U.S. bushel","bushel",null,"volume",!1,!0,.03523907],["U.S. oil barrel","barrel",null,"volume",!1,!0,.158987295],["U.S. pint","pt",["us_pt"],"volume",!1,!0,.000473176473],["U.S. survey mile","survey_mi",null,"length",!1,!0,1609.347219],["U.S. survey/statute acre","us_acre",null,"area",!1,!0,4046.87261],["volt","V",null,"voltage",!0,!1,1],["watt","W",null,"power",!0,!0,1],["watt-hour","Wh",["wh"],"energy",!1,!0,3600],["weber","Wb",null,"magnetic_flux",!0,!1,1],["yard","yd",null,"length",!1,!0,.9144],["year","yr",null,"time",!1,!0,31557600]],s={Yi:["yobi",80,12089258196146292e8,"Yi","yotta"],Zi:["zebi",70,11805916207174113e5,"Zi","zetta"],Ei:["exbi",60,1152921504606847e3,"Ei","exa"],Pi:["pebi",50,1125899906842624,"Pi","peta"],Ti:["tebi",40,1099511627776,"Ti","tera"],Gi:["gibi",30,1073741824,"Gi","giga"],Mi:["mebi",20,1048576,"Mi","mega"],ki:["kibi",10,1024,"ki","kilo"]},u={Y:["yotta",1e24,"Y"],Z:["zetta",1e21,"Z"],E:["exa",1e18,"E"],P:["peta",1e15,"P"],T:["tera",1e12,"T"],G:["giga",1e9,"G"],M:["mega",1e6,"M"],k:["kilo",1e3,"k"],h:["hecto",100,"h"],e:["dekao",10,"e"],d:["deci",.1,"d"],c:["centi",.01,"c"],m:["milli",.001,"m"],u:["micro",1e-6,"u"],n:["nano",1e-9,"n"],p:["pico",1e-12,"p"],f:["femto",1e-15,"f"],a:["atto",1e-18,"a"],z:["zepto",1e-21,"z"],y:["yocto",1e-24,"y"]},d=null,f=null,m=l,g=a,y=1,v=1,b,e=0;e<o.length;e++)b=o[e][2]===null?[]:o[e][2],(o[e][1]===m||b.indexOf(m)>=0)&&(d=o[e]),(o[e][1]===g||b.indexOf(g)>=0)&&(f=o[e]);if(d===null){var k=s[l.substring(0,2)],w=u[l.substring(0,1)];l.substring(0,2)==="da"&&(w=["dekao",10,"da"]),k?(y=k[2],m=l.substring(2)):w&&(y=w[1],m=l.substring(w[2].length));for(var x=0;x<o.length;x++)b=o[x][2]===null?[]:o[x][2],(o[x][1]===m||b.indexOf(m)>=0)&&(d=o[x])}if(f===null){var C=s[a.substring(0,2)],S=u[a.substring(0,1)];a.substring(0,2)==="da"&&(S=["dekao",10,"da"]),C?(v=C[2],g=a.substring(2)):S&&(v=S[1],g=a.substring(S[2].length));for(var _=0;_<o.length;_++)b=o[_][2]===null?[]:o[_][2],(o[_][1]===g||b.indexOf(g)>=0)&&(f=o[_])}return d===null||f===null?p.error.na:d[3]!==f[3]?p.error.na:t*d[6]*y/(f[6]*v)}catch(A){var T=A;return T=p.errorInfo(T),[p.error.v,T]}},SUMX2MY2:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"text",!1)):l.push(t);var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?o=o.concat(D.getCellDataArr(a,"text",!1)):o.push(a);if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var d=l[e],f=o[e];B(d)&&B(f)&&(s.push(parseFloat(d)),u.push(parseFloat(f)))}for(var m=0,e=0;e<s.length;e++)m+=Math.pow(s[e],2)-Math.pow(u[e],2);return m}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},SUMX2PY2:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"text",!1)):l.push(t);var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?o=o.concat(D.getCellDataArr(a,"text",!1)):o.push(a);if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var d=l[e],f=o[e];B(d)&&B(f)&&(s.push(parseFloat(d)),u.push(parseFloat(f)))}for(var m=0,e=0;e<s.length;e++)m+=Math.pow(s[e],2)+Math.pow(u[e],2);return m}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},SUMXMY2:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"text",!1)):l.push(t);var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?o=o.concat(D.getCellDataArr(a,"text",!1)):o.push(a);if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var d=l[e],f=o[e];B(d)&&B(f)&&(s.push(parseFloat(d)),u.push(parseFloat(f)))}for(var m=0,e=0;e<s.length;e++)m+=Math.pow(s[e]-u[e],2);return m}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},TRANSPOSE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else P(t)=="object"&&t.startCell!=null&&(l=D.getCellDataDyadicArr(t,"number"));return l=l[0].map(function(o,s){return l.map(function(u){return u[s]})}),l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},TREND:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let R=function(I,F){for(var z=0,M=0,E=0,N=0,L=0;L<I.length;L++)for(var O=0;O<I[L].length;O++)z+=I[L][O],M+=F[L][O],E+=I[L][O]*F[L][O],N+=I[L][O]*I[L][O];var V=I.length*I[0].length,q=z/V,W=M/V,X=E/V,te=N/V,le=(X-q*W)/(te-q*q),oe=W-le*q;return[le,oe]};var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"text");else{if(!B(t))return p.error.v;var a=[];a.push(parseFloat(t)),l.push(a)}for(var o=l.length,s=l[0].length,e=0;e<o;e++)for(var u=0;u<s;u++){if(!B(l[e][u]))return p.error.v;l[e][u]=parseFloat(l[e][u])}for(var d=[],e=1;e<=o;e++)for(var u=1;u<=s;u++){var f=(e-1)*s+u;d.push(f)}if(arguments.length>=2){var m=arguments[1];if(d=[],P(m)=="array"){if(P(m[0])=="array"&&!D.isDyadicArr(m))return p.error.v;d=D.getDataDyadicArr(m)}else if(P(m)=="object"&&m.startCell!=null)d=D.getCellDataDyadicArr(m,"text");else{if(!B(m))return p.error.v;var a=[];a.push(parseFloat(m)),d.push(a)}for(var e=0;e<d.length;e++)for(var u=0;u<d[0].length;u++){if(!B(d[e][u]))return p.error.v;d[e][u]=parseFloat(d[e][u])}}var g=d.length,y=d[0].length,v=d;if(arguments.length>=3){var b=arguments[2];if(v=[],P(b)=="array"){if(P(b[0])=="array"&&!D.isDyadicArr(b))return p.error.v;v=D.getDataDyadicArr(b)}else if(P(b)=="object"&&b.startCell!=null)v=D.getCellDataDyadicArr(b,"text");else{if(!B(b))return p.error.v;var a=[];a.push(parseFloat(b)),v.push(a)}for(var e=0;e<v.length;e++)for(var u=0;u<v[0].length;u++){if(!B(v[e][u]))return p.error.v;v[e][u]=parseFloat(v[e][u])}}var k=!0;if(arguments.length==4&&(k=D.getCellBoolen(arguments[3]),H(k)))return k;if(o!=g||s!=y)return p.error.r;var w=R(d,l),x=w[0];if(k)var C=w[1];else var C=0;for(var S=[],e=0;e<v.length;e++)for(var u=0;u<v[e].length;u++){var _=v[e][u],T=x*_+C;S.push(Math.round(T*1e9)/1e9)}return S}catch(R){var A=R;return A=p.errorInfo(A),[p.error.v,A]}},FREQUENCY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!0))}else if(P(t)=="object"&&t.startCell!=null)l=l.concat(D.getCellDataArr(t,"number",!0));else{if(!B(t))return p.error.v;l.push(t)}for(var a=[],e=0;e<l.length;e++)B(l[e])&&a.push(parseFloat(l[e]));var o=arguments[1],s=[];if(P(o)=="array"){if(P(o[0])=="array"&&!D.isDyadicArr(o))return p.error.v;s=s.concat(D.getDataArr(o,!0))}else if(P(o)=="object"&&o.startCell!=null)s=s.concat(D.getCellDataArr(o,"number",!0));else{if(!B(o))return p.error.v;s.push(o)}for(var u=[],e=0;e<s.length;e++)B(s[e])&&u.push(parseFloat(s[e]));if(a.length==0&&u.length==0)return[[0],[0]];if(a.length==0){for(var d=[[0]],e=0;e<u.length;e++)d.push([0]);return d}else{if(u.length==0)return[[0],[a.length]];u.sort(function(k,w){return k-w});for(var d=[],e=0;e<u.length;e++)if(e==0){for(var f=0,m=0;m<a.length;m++)a[m]<=u[0]&&f++;d.push([f])}else if(e==u.length-1){for(var g=0,y=0,m=0;m<a.length;m++)a[m]<=u[e]&&a[m]>u[e-1]&&g++,a[m]>u[e]&&y++;d.push([g]),d.push([y])}else{for(var f=0,m=0;m<a.length;m++)a[m]<=u[e]&&a[m]>u[e-1]&&f++;d.push([f])}return d}}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},GROWTH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let R=function(I,F){for(var z=0,M=0,E=0,N=0,L=0;L<I.length;L++)for(var O=0;O<I[L].length;O++)z+=I[L][O],M+=Math.log(F[L][O]),E+=I[L][O]*Math.log(F[L][O]),N+=I[L][O]*I[L][O];var V=I.length*I[0].length,q=z/V,W=M/V,X=E/V,te=N/V,le=(X-q*W)/(te-q*q),oe=W-le*q;return[Math.exp(le),Math.exp(oe)]};var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"text");else{if(!B(t))return p.error.v;var a=[];a.push(parseFloat(t)),l.push(a)}for(var o=l.length,s=l[0].length,e=0;e<o;e++)for(var u=0;u<s;u++){if(!B(l[e][u]))return p.error.v;l[e][u]=parseFloat(l[e][u])}for(var d=[],e=1;e<=o;e++)for(var u=1;u<=s;u++){var f=(e-1)*s+u;d.push(f)}if(arguments.length>=2){var m=arguments[1];if(d=[],P(m)=="array"){if(P(m[0])=="array"&&!D.isDyadicArr(m))return p.error.v;d=D.getDataDyadicArr(m)}else if(P(m)=="object"&&m.startCell!=null)d=D.getCellDataDyadicArr(m,"text");else{if(!B(m))return p.error.v;var a=[];a.push(parseFloat(m)),d.push(a)}for(var e=0;e<d.length;e++)for(var u=0;u<d[0].length;u++){if(!B(d[e][u]))return p.error.v;d[e][u]=parseFloat(d[e][u])}}var g=d.length,y=d[0].length,v=d;if(arguments.length>=3){var b=arguments[2];if(v=[],P(b)=="array"){if(P(b[0])=="array"&&!D.isDyadicArr(b))return p.error.v;v=D.getDataDyadicArr(b)}else if(P(b)=="object"&&b.startCell!=null)v=D.getCellDataDyadicArr(b,"text");else{if(!B(b))return p.error.v;var a=[];a.push(parseFloat(b)),v.push(a)}for(var e=0;e<v.length;e++)for(var u=0;u<v[0].length;u++){if(!B(v[e][u]))return p.error.v;v[e][u]=parseFloat(v[e][u])}}var k=!0;if(arguments.length==4&&(k=D.getCellBoolen(arguments[3]),H(k)))return k;if(o!=g||s!=y)return p.error.r;var w=R(d,l),x=w[0];if(k)var C=w[1];else var C=1;for(var S=[],e=0;e<v.length;e++)for(var u=0;u<v[e].length;u++){var _=v[e][u],T=C*Math.pow(x,_);S.push(Math.round(T*1e9)/1e9)}return S}catch(R){var A=R;return A=p.errorInfo(A),[p.error.v,A]}},LINEST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return p.error.v}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},LOGEST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return p.error.v}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},MDETERM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let u=function(d,f){var m,g=new Array;if(f==1)return m=d[0][0],m;if(f==2)return m=d[0][0]*d[1][1]-d[0][1]*d[1][0],m;if(f==3)return m=d[0][0]*d[1][1]*d[2][2]+d[1][0]*d[2][1]*d[0][2]+d[2][0]*d[0][1]*d[1][2]-d[2][0]*d[1][1]*d[0][2]-d[0][0]*d[2][1]*d[1][2]-d[1][0]*d[0][1]*d[2][2],m;m=0;for(var y=new Array,v=new Array,b=0;b<f;b++)g[b]=d[b][0]*Math.pow(-1,b+1+1);for(var b=0;b<f;b++){v[b]=new Array;for(var k=0;k<f-1;k++)v[b][k]=d[b][k+1]}for(var b=0;b<f;b++){for(var k=0;k<f;k++){y[k]=new Array;for(var w=0;w<f-1;w++)b>k?y[k][w]=v[k][w]:b<k&&(y[k-1][w]=v[k][w])}m+=g[b]*arguments.callee(y,f-1)}return m};var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"text");else{var a=[];a.push(t),l.push(a)}for(var e=0;e<l.length;e++)for(var o=0;o<l[e].length;o++){if(!B(l[e][o]))return p.error.v;l[e][o]=parseFloat(l[e][o])}return l.length!=l[0].length?p.error.v:u(l,l.length)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},MINVERSE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"text");else{var a=[];a.push(t),l.push(a)}for(var e=0;e<l.length;e++)for(var o=0;o<l[e].length;o++){if(!B(l[e][o]))return p.error.v;l[e][o]=parseFloat(l[e][o])}return l.length!=l[0].length?p.error.v:So(l)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},MMULT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"text");else{var a=[];a.push(t),l.push(a)}for(var e=0;e<l.length;e++)for(var o=0;o<l[e].length;o++){if(!B(l[e][o]))return p.error.v;l[e][o]=parseFloat(l[e][o])}var s=arguments[1],u=[];if(P(s)=="array"){if(P(s[0])=="array"&&!D.isDyadicArr(s))return p.error.v;u=D.getDataDyadicArr(s)}else if(P(s)=="object"&&s.startCell!=null)u=D.getCellDataDyadicArr(s,"text");else{var a=[];a.push(s),u.push(a)}for(var e=0;e<u.length;e++)for(var o=0;o<u[e].length;o++){if(!B(u[e][o]))return p.error.v;u[e][o]=parseFloat(u[e][o])}if(l[0].length!=u.length)return p.error.v;for(var d=l.length,f=u[0].length,m=[],g=0;g<d;g++){for(var a=[],y=0;y<f;y++){for(var v=0,n=0;n<l[0].length;n++)v+=l[g][n]*u[n][y];a.push(v)}m.push(a)}return m}catch(k){var b=k;return b=p.errorInfo(b),[p.error.v,b]}},SUMPRODUCT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"text");else{var a=[];a.push(t),l.push(a)}for(var e=0;e<l.length;e++)for(var o=0;o<l[e].length;o++)B(l[e][o])?l[e][o]=parseFloat(l[e][o]):l[e][o]=0;var s=l.length,u=l[0].length;if(arguments.length>=2)for(var e=1;e<arguments.length;e++){var d=arguments[e],f=[];if(P(d)=="array"){if(P(d[0])=="array"&&!D.isDyadicArr(d))return p.error.v;f=D.getDataDyadicArr(d)}else if(P(d)=="object"&&d.startCell!=null)f=D.getCellDataDyadicArr(d,"text");else{var a=[];a.push(d),f.push(a)}if(f.length!=s||f[0].length!=u)return p.error.v;for(var m=0;m<s;m++)for(var g=0;g<u;g++)B(f[m][g])?l[m][g]=l[m][g]*parseFloat(f[m][g]):l[m][g]=0}for(var y=0,m=0;m<s;m++)for(var g=0;g<u;g++)y+=l[m][g];return y}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},ISFORMULA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;return P(t)=="object"&&t.startCell!=null?t.data==null?!1:(P(t.data)=="array"?l=t.data[0][0]:l=t.data,l!=null&&l.f!=null):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},CELL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;if(P(t.data)=="array")return p.error.v;if(l=t.data.v,me(l))return p.error.v}else l=t;var a=arguments[1],o;if(P(a)=="object"&&a.startCell!=null)o=a.startCell;else return p.error.v;if(["address","col","color","contents","filename","format","parentheses","prefix","protect","row","type","width"].indexOf(l)==-1)return p.error.v;var s=Et()[Z(h.currentSheetIndex)],u=p.getcellrange(o),d=u.row[0],f=u.column[0];let y=Et(),v=Z(h.calculateSheetIndex),b=y[v].data,k;switch(p.execFunctionGlobalData!=null&&p.execFunctionGlobalData[d+"_"+f+"_"+h.calculateSheetIndex]!=null?k=p.execFunctionGlobalData[d+"_"+f+"_"+h.calculateSheetIndex].v:b[d][f]!=null&&b[d][f].v!=null&&b[d][f].v!=""?(k=b[d][f],k instanceof Object&&(k=k.v)):k=0,l){case"address":return o;case"col":return f+1;case"color":return 0;case"contents":return k;case"filename":return s.name;case"format":return b[d][f]==null||b[d][f].ct==null?"G":b[d][f].ct.fa;case"parentheses":return b[d][f]==null||b[d][f].v==null||b[d][f].v==""?0:b[d][f].v>0?1:0;case"prefix":return k==0?"":b[d][f].ht==0?"^":b[d][f].ht==1?"'":b[d][f].ht==2?'"':"";case"protect":return 0;case"row":return d+1;case"type":return k==0?"b":"l";case"width":var m=s.config;return m.columnlen!=null&&f in m.columnlen?m.columnlen[f]:h.defaultcollen}}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},NA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return p.error.na}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},ERROR_TYPE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.na;if(P(t.data)=="array"){if(l=t.data[0][0],l==null||me(l.v))return p.error.na;l=l.v}else{if(me(t.data.v))return p.error.na;l=t.data.v}}else l=t;var a={"#NULL!":1,"#DIV/0!":2,"#VALUE!":3,"#REF!":4,"#NAME?":5,"#NUM!":6,"#N/A":7,"#GETTING_DATA":8};return l in a?a[l]:p.error.na}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},ISBLANK:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;return P(t)=="object"&&t.startCell!=null?t.data==null:!1}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ISERR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array")return!0;if(t.data==null||me(t.data.v))return!1;l=t.data.v}else l=t;return["#VALUE!","#REF!","#DIV/0!","#NUM!","#NAME?","#NULL!"].indexOf(l)>-1}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ISERROR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array")return!0;if(t.data==null||me(t.data.v))return!1;l=t.data.v}else l=t;return["#N/A","#VALUE!","#REF!","#DIV/0!","#NUM!","#NAME?","#NULL!"].indexOf(l)>-1}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ISLOGICAL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array"||t.data==null||me(t.data.v))return!1;l=t.data.v}else l=t;return l.toString().toLowerCase()=="true"||l.toString().toLowerCase()=="false"}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ISNA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array"||t.data==null||me(t.data.v))return!1;l=t.data.v}else l=t;return l.toString()=="#N/A"}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ISNONTEXT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array"||t.data==null||me(t.data.v))return!0;l=t.data.v}else l=t;return["#N/A","#VALUE!","#REF!","#DIV/0!","#NUM!","#NAME?","#NULL!"].indexOf(l)>-1||l.toString().toLowerCase()=="true"||l.toString().toLowerCase()=="false"?!0:!!B(l)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ISNUMBER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array"||t.data==null||me(t.data.v))return!1;l=t.data.v}else l=t;return!!B(l)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ISREF:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return P(arguments[0])=="object"&&arguments[0].startCell!=null}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},ISTEXT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array"||t.data==null||me(t.data.v))return!1;l=t.data.v}else l=t;return["#N/A","#VALUE!","#REF!","#DIV/0!","#NUM!","#NAME?","#NULL!"].indexOf(l)>-1||l.toString().toLowerCase()=="true"||l.toString().toLowerCase()=="false"?!1:!B(l)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},TYPE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")return 64;if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array")return 16;if(t.data==null||me(t.data.v))return 1;l=t.data.v}else l=t;return["#N/A","#VALUE!","#REF!","#DIV/0!","#NUM!","#NAME?","#NULL!"].indexOf(l)>-1?16:l.toString().toLowerCase()=="true"||l.toString().toLowerCase()=="false"?4:B(l)?1:2}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},N:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null)if(P(t.data)=="array"){if(l=t.data[0][0],l==null||me(l.v))return 0;l=l.v}else{if(t.data==null||me(t.data.v))return 0;l=t.data.v}else l=t;return["#N/A","#VALUE!","#REF!","#DIV/0!","#NUM!","#NAME?","#NULL!"].indexOf(l)>-1?l:l.toString().toLowerCase()=="true"||l.toString().toLowerCase()=="false"?l.toString().toLowerCase()=="true"?1:0:B(l)?parseFloat(l):0}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},TO_DATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),mt("yyyy-mm-dd",t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},TO_PURE_NUMBER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(0,j.default)(t).isValid()?at(t)[2]:(0,Ui.default)(t).value()==null?t:(0,Ui.default)(t).value()}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},TO_TEXT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:mt("@",t)}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},TO_DOLLARS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),mt("$ 0.00",t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},TO_PERCENT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),mt("0%",t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},DGET:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),d=[];if(P(a)==="string"){var f=D.findField(l,a);d=D.rest(l[f])}else d=D.rest(l[a]);return u.length===0?p.error.v:u.length>1?p.error.nm:d[u[0]]}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},DMAX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),d=[];if(P(a)==="string"){var f=D.findField(l,a);d=D.rest(l[f])}else d=D.rest(l[a]);for(var m=d[u[0]],e=1;e<u.length;e++)m<d[u[e]]&&(m=d[u[e]]);return m}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DMIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=findResultIndex(l,s),d=[];if(P(a)==="string"){var f=findField(l,a);d=rest(l[f])}else d=rest(l[a]);for(var m=d[u[0]],e=1;e<u.length;e++)m>d[u[e]]&&(m=d[u[e]]);return m}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DAVERAGE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),d=[];if(P(a)==="string"){var f=D.findField(l,a);d=D.rest(l[f])}else d=D.rest(l[a]);for(var m=0,e=0;e<u.length;e++)m+=d[u[e]];return u.length===0?p.error.d:m/u.length}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DCOUNT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),d=[];if(P(a)==="string"){var f=D.findField(l,a);d=D.rest(l[f])}else d=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=d[u[e]];return window.luckysheet_function.COUNT.f.apply(window.luckysheet_function.COUNT,m)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DCOUNTA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),d=[];if(P(a)==="string"){var f=D.findField(l,a);d=D.rest(l[f])}else d=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=d[u[e]];return window.luckysheet_function.COUNTA.f.apply(window.luckysheet_function.COUNTA,m)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DPRODUCT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),d=[];if(P(a)==="string"){var f=D.findField(l,a);d=D.rest(l[f])}else d=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=d[u[e]];m=D.compact(m);var g=1;for(e=0;e<m.length;e++)g*=m[e];return g}catch(v){var y=v;return y=p.errorInfo(y),[p.error.v,y]}},DSTDEV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),d=[];if(P(a)==="string"){var f=D.findField(l,a);d=D.rest(l[f])}else d=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=d[u[e]];return m=D.compact(m),window.luckysheet_function.STDEVA.f.apply(window.luckysheet_function.STDEVA,m)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DSTDEVP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),d=[];if(P(a)==="string"){var f=D.findField(l,a);d=D.rest(l[f])}else d=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=d[u[e]];return m=D.compact(m),window.luckysheet_function.STDEVP.f.apply(window.luckysheet_function.STDEVP,m)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DSUM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),d=[];if(P(a)==="string"){var f=D.findField(l,a);d=D.rest(l[f])}else d=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=d[u[e]];m=D.compact(m);var g=0;for(e=0;e<m.length;e++)g+=m[e];return g}catch(v){var y=v;return y=p.errorInfo(y),[p.error.v,y]}},DVAR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),d=[];if(P(a)==="string"){var f=D.findField(l,a);d=D.rest(l[f])}else d=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=d[u[e]];return m=D.compact(m),window.luckysheet_function.VAR_S.f.apply(window.luckysheet_function.VAR_S,m)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DVARP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),d=[];if(P(a)==="string"){var f=D.findField(l,a);d=D.rest(l[f])}else d=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=d[u[e]];return m=D.compact(m),window.luckysheet_function.VAR_P.f.apply(window.luckysheet_function.VAR_P,m)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},LINESPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=arguments[1],d=arguments[2],f=arguments[3],m=arguments[4],g=arguments[5],y=arguments[6],v=arguments[7];let R=Et(),I=Z(h.calculateSheetIndex),F=R[I].data;var b=p.readCellDataToOneArray(s),k=ke.getCellRealSize(F,t,l),w=k[0],x=k[1],C={};d==null&&(d=1),C.lineWidth=d,C.offsetY=d+1,C.height=x-(d+1),C.width=w;var S=function(z,M){M&&(typeof M=="number"&&(M>19&&(M=M%20),M=o[M]),C[z]=M)};if(u==null&&(u="#2ec7c9"),S("lineColor",u),C.fillColor=0,f)if(typeof f=="string"){f=f.toLowerCase();var _=null;f=="min"?_=window.luckysheet_function.MIN.f({data:b}):f=="max"?_=window.luckysheet_function.MAX.f({data:b}):f=="avg"||f=="mean"?_=window.luckysheet_function.AVERAGE.f({data:b}):f=="median"&&(_=window.luckysheet_function.MEDIAN.f({data:b})),_&&(C.normalRangeMin=_,C.normalRangeMax=_)}else C.normalRangeMin=f,C.normalRangeMax=f;m==null&&(m="#000"),S("normalRangeColor",m),S("maxSpotColor",g),S("minSpotColor",y),v==null&&(v="1.5"),C.spotRadius=v;var T=Jl.init(b,C);return T}catch(R){var A=R;return A=p.errorInfo(A),[p.error.v,A]}},AREASPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=arguments[1],d=arguments[2],f=arguments[3],m=arguments[4],g=arguments[5],y=p.readCellDataToOneArray(s);let T=Et(),A=Z(h.calculateSheetIndex),R=T[A].data;var v=ke.getCellRealSize(R,t,l),b=v[0],k=v[1],w={};f==null&&(f=1),w.lineWidth=f,w.offsetY=f+1,w.height=k-(f+1),w.width=b;var x=function(I,F){F&&(typeof F=="number"&&(F>19&&(F=F%20),F=o[F]),w[I]=F)};if(u==null&&(u="#2ec7c9"),x("lineColor",u),x("fillColor",d),f==null&&(f="1"),w.lineWidth=f,m)if(typeof m=="string"){m=m.toLowerCase();var C=null;m=="min"?C=window.luckysheet_function.MIN.f({data:y}):m=="max"?C=window.luckysheet_function.MAX.f({data:y}):m=="avg"||m=="mean"?C=window.luckysheet_function.AVERAGE.f({data:y}):m=="median"&&(C=window.luckysheet_function.MEDIAN.f({data:y})),C&&(w.normalRangeMin=C,w.normalRangeMax=C)}else w.normalRangeMin=m,w.normalRangeMax=m;g==null&&(g="#000"),x("normalRangeColor",g);var S=Jl.init(y,w);return S}catch(T){var _=T;return _=p.errorInfo(_),[p.error.v,_]}},COLUMNSPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=p.readCellDataToOneArray(s);let _=Et(),T=Z(h.calculateSheetIndex),A=_[T].data;var d=ke.getCellRealSize(A,t,l),f=d[0],m=d[1],g={};g.height=m,g.width=f;var y=function(R,I){I&&(typeof I=="number"&&(I>19&&(I=I%20),I=o[I]),g[R]=I)},v=arguments[1],b=arguments[2],k=arguments[3],w=arguments[4];g.type="column",v==null&&(v="1"),g.barSpacing=v,b==null&&(b="#fc5c5c"),y("barColor",b),k==null&&(k="#97b552"),y("negBarColor",k),w==null||w===!1||typeof w!="number"?g.chartRangeMax=void 0:g.chartRangeMax=w;var x=p.sparklinesColorMap(arguments);x&&(g.colorMap=x);var C=Jl.init(u,g);return C}catch(_){var S=_;return S=p.errorInfo(S),[p.error.v,S]}},STACKCOLUMNSPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=[],d=[];if(s!=null&&s.data!=null&&(d=s.data),P(d)=="array")d=p.getPureValueByData(d);else{if(P(d)=="object")return d=d.v,[d];/\{.*?\}/.test(d)&&(d=d.replace(/\{/g,"[").replace(/\}/g,"]")),d=new Function("return "+d)()}var f=arguments[1],m=d.length;if(f==null||!!f)for(var g=0;g<d[0].length;g++){for(var y="",v=0;v<d.length;v++)y+=d[v][g]+":";y=y.substr(0,y.length-1),u.push(y)}else{for(var v=0;v<d.length;v++){for(var b="",g=0;g<d[0].length;g++)b+=d[v][g]+":";b=b.substr(0,b.length-1),u.push(b)}var m=d[0].length}let F=Et(),z=Z(h.calculateSheetIndex),M=F[z].data;var k=ke.getCellRealSize(M,t,l),w=k[0],x=k[1],C={};C.height=x,C.width=w;var S=function(E,N){N&&(typeof N=="number"&&(N>19&&(N=N%20),N=o[N]),C[E]=N)},_=arguments[2],T=arguments[3];C.type="column",_==null&&(_="1"),C.barSpacing=_,T==null||T===!1||typeof T!="number"?C.chartRangeMax=void 0:C.chartRangeMax=T;var A=p.sparklinesColorMap(arguments,4);A&&(C.colorMap=A);var R=Jl.init(u,C);return R}catch(F){var I=F;return I=p.errorInfo(I),[p.error.v,I]}},BARSPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=p.readCellDataToOneArray(s);let _=Et(),T=Z(h.calculateSheetIndex),A=_[T].data;var d=ke.getCellRealSize(A,t,l),f=d[0],m=d[1],g={};g.height=m,g.width=f;var y=function(R,I){I&&(typeof I=="number"&&(I>19&&(I=I%20),I=o[I]),g[R]=I)},v=arguments[1],b=arguments[2],k=arguments[3],w=arguments[4];g.type="bar",v==null&&(v="1"),g.barSpacing=v,b==null&&(b="#fc5c5c"),y("barColor",b),k==null&&(k="#97b552"),y("negBarColor",k),w==null||w===!1||typeof w!="number"?g.chartRangeMax=void 0:g.chartRangeMax=w;var x=p.sparklinesColorMap(arguments);x&&(g.colorMap=x);var C=Jl.init(u,g);return C}catch(_){var S=_;return S=p.errorInfo(S),[p.error.v,S]}},STACKBARSPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=[],d=[];if(s!=null&&s.data!=null&&(d=s.data),P(d)=="array")d=p.getPureValueByData(d);else{if(P(d)=="object")return d=d.v,[d];/\{.*?\}/.test(d)&&(d=d.replace(/\{/g,"[").replace(/\}/g,"]")),d=new Function("return "+d)()}var f=arguments[1],m=d.length;if(f==null||!!f)for(var g=0;g<d[0].length;g++){for(var y="",v=0;v<d.length;v++)y+=d[v][g]+":";y=y.substr(0,y.length-1),u.push(y)}else{for(var v=0;v<d.length;v++){for(var b="",g=0;g<d[0].length;g++)b+=d[v][g]+":";b=b.substr(0,b.length-1),u.push(b)}var m=d[0].length}let F=Et(),z=Z(h.calculateSheetIndex),M=F[z].data;var k=ke.getCellRealSize(M,t,l),w=k[0],x=k[1],C={};C.height=x,C.width=w;var S=function(E,N){N&&(typeof N=="number"&&(N>19&&(N=N%20),N=o[N]),C[E]=N)},_=arguments[2],T=arguments[3];C.type="bar",_==null&&(_="1"),C.barSpacing=_,T==null||T===!1||typeof T!="number"?C.chartRangeMax=void 0:C.chartRangeMax=T;var A=p.sparklinesColorMap(arguments,4);A&&(C.colorMap=A);var R=Jl.init(u,C);return R}catch(F){var I=F;return I=p.errorInfo(I),[p.error.v,I]}},DISCRETESPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=p.readCellDataToOneArray(s);let C=Et(),S=Z(h.calculateSheetIndex),_=C[S].data;var d=ke.getCellRealSize(_,t,l),f=d[0],m=d[1],g={};g.height=m,g.width=f;var y=function(T,A){A&&(typeof A=="number"&&(A>19&&(A=A%20),A=o[A]),g[T]=A)},v=arguments[1],b=arguments[2],k=arguments[3];g.type="discrete",v==null&&(v=0),g.thresholdValue=v,b==null&&(b="#2ec7c9"),y("lineColor",b),k==null&&(k="#fc5c5c"),y("thresholdColor",k);var w=Jl.init(u,g);return w}catch(C){var x=C;return x=p.errorInfo(x),[p.error.v,x]}},TRISTATESPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=p.readCellDataToOneArray(s);let _=Et(),T=Z(h.calculateSheetIndex),A=_[T].data;var d=ke.getCellRealSize(A,t,l),f=d[0],m=d[1],g={};g.height=m,g.width=f;var y=function(R,I){I&&(typeof I=="number"&&(I>19&&(I=I%20),I=o[I]),g[R]=I)},v=arguments[1],b=arguments[2],k=arguments[3],w=arguments[4];g.type="tristate",v==null&&(v="1"),g.barSpacing=v,b==null&&(b="#fc5c5c"),y("barColor",b),k==null&&(k="#97b552"),y("negBarColor",k),w==null&&(w="#999"),y("zeroBarColor",w);var x=p.sparklinesColorMap(arguments);x&&(g.colorMap=x);var C=Jl.init(u,g);return C}catch(_){var S=_;return S=p.errorInfo(S),[p.error.v,S]}},PIESPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=p.readCellDataToOneArray(s);let S=Et(),_=Z(h.calculateSheetIndex),T=S[_].data;var d=ke.getCellRealSize(T,t,l),f=d[0],m=d[1],g={};g.height=m,g.width=f;var y=function(A,R){R&&(typeof R=="number"&&(R>19&&(R=R%20),R=o[R]),g[A]=R)},v=arguments[1],b=arguments[2],k=arguments[3];g.type="pie",v==null&&(v=0),g.offset=v,b==null&&(b=0),y("borderWidth",b),k==null&&(k="#97b552"),y("borderColor",k);var w=p.sparklinesColorMap(arguments,4);w&&(g.colorMap=w);var x=Jl.init(u,g);return x}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},BOXSPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=p.readCellDataToOneArray(s);let C=Et(),S=Z(h.calculateSheetIndex),_=C[S].data;var d=ke.getCellRealSize(_,t,l),f=d[0],m=d[1],g={};g.height=m,g.width=f;var y=function(T,A){A&&(typeof A=="number"&&(A>19&&(A=A%20),A=o[A]),g[T]=A)},v=arguments[1],b=arguments[2],k=arguments[3];g.type="box",v==null&&(v=1.5),g.outlierIQR=v,b==null?b=0:y("target",b),k==null&&(k=1.5),y("spotRadius",k);var w=Jl.init(u,g);return w}catch(C){var x=C;return x=p.errorInfo(x),[p.error.v,x]}},BULLETSPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList;let w=Et(),x=Z(h.calculateSheetIndex),C=w[x].data;var s=ke.getCellRealSize(C,t,l),u=s[0],d=s[1],f={};f.height=d,f.width=u;var m=function(S,_){_&&(typeof _=="number"&&(_>19&&(_=_%20),_=o[_]),f[S]=_)},g=[];Wn(arguments);var y=p.getValueByFuncData(arguments[0]),v=p.getValueByFuncData(arguments[1]);g.push(y),g.push(v);for(var e=2;e<arguments.length;e++)g.push(p.getValueByFuncData(arguments[e]));f.type="bullet";var b=Jl.init(g,f);return b}catch(w){var k=w;return k=p.errorInfo(k),[p.error.v,k]}},SORT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[],a=1,o=1;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;for(var e=0;e<t.length;e++){for(var s=[],u=0;u<t[e].length;u++){var d=t[e][u];s.push(d)}l.push(s)}a=l.length,o=l[0].length}else{for(var e=0;e<t.length;e++){var d=t[e];l.push(d)}a=l.length}else if(P(t)=="object"&&t.startCell!=null)if(t.data!=null)if(P(t.data)=="array"){for(var e=0;e<t.data.length;e++){for(var s=[],u=0;u<t.data[e].length;u++)if(t.data[e][u]!=null){var d=t.data[e][u].v;me(d)&&(d=0),s.push(d)}else s.push(0);l.push(s)}a=l.length,o=l[0].length}else{var d=t.data.v;me(d)&&(d=0),l.push(d)}else l.push(0);else{var d=t;l.push(d)}var f=1;if(arguments.length>=2){if(f=D.getFirstValue(arguments[1]),H(f))return f;if(!B(f))return p.error.v;f=parseInt(f)}var m=1;if(arguments.length>=3){if(m=D.getFirstValue(arguments[2]),H(m))return m;if(!B(m))return p.error.v;m=Math.floor(parseFloat(m))}var g=!1;if(arguments.length==4&&(g=D.getCellBoolen(arguments[3]),H(g)))return g;if(g){if(f<1||f>a)return p.error.v}else if(f<1||f>o)return p.error.v;if(m!=1&&m!=-1)return p.error.v;var y=function(k,w){if(P(k)=="array"&&(k=k[f-1]),P(w)=="array"&&(w=w[f-1]),!isNaN(k)&&!isNaN(w))return k-w;if(isNaN(k))if(isNaN(w)){if(k>w)return 1;if(k<w)return-1}else return 1;else return-1},v=function(k,w){if(P(k)=="array"&&(k=k[f-1]),P(w)=="array"&&(w=w[f-1]),!isNaN(k)&&!isNaN(w))return w-k;if(isNaN(k))if(isNaN(w)){if(k>w)return-1;if(k<w)return 1}else return-1;else return 1};return g?(l=l[0].map(function(k,w){return l.map(function(x){return x[w]})}),m==1&&l.sort(y),m==-1&&l.sort(v),l=l[0].map(function(k,w){return l.map(function(x){return x[w]})})):(m==1&&l.sort(y),m==-1&&l.sort(v)),l}catch(k){var b=k;return b=p.errorInfo(b),[p.error.v,b]}},FILTER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"number");else{var a=[];a.push(parseFloat(t)),l.push(a)}var o=l.length,s=l[0].length,u=arguments[1],d=[],f="row";if(P(u)=="array")if(P(u[0])=="array"){if(!D.isDyadicArr(u))return p.error.v;if(u.length>1&&u[0].length>1)return p.error.v;if(u.length>1){if(u.length!=l.length)return p.error.v;f="row";for(var e=0;e<u.length;e++){var m=u[e][0];if(P(m)!="boolean")if(P(m)=="string"&&(m.toLowerCase()=="true"||m.toLowerCase()=="false"))m.toLowerCase()=="true"?m=!0:m.toLowerCase()=="false"&&(m=!1);else if(B(m))m=parseFloat(m),m=m!=0;else return p.error.v;d.push(m)}}if(u[0].length>1){if(u[0].length!=l[0].length)return p.error.v;f="col";for(var e=0;e<u[0].length;e++){var m=u[0][e];if(P(m)!="boolean")if(P(m)=="string"&&(m.toLowerCase()=="true"||m.toLowerCase()=="false"))m.toLowerCase()=="true"?m=!0:m.toLowerCase()=="false"&&(m=!1);else if(B(m))m=parseFloat(m),m=m!=0;else return p.error.v;d.push(m)}}}else{if(u.length!=l[0].length)return p.error.v;f="col";for(var e=0;e<u.length;e++){var m=u[e];if(P(m)!="boolean")if(P(m)=="string"&&(m.toLowerCase()=="true"||m.toLowerCase()=="false"))m.toLowerCase()=="true"?m=!0:m.toLowerCase()=="false"&&(m=!1);else if(B(m))m=parseFloat(m),m=m!=0;else return p.error.v;d.push(m)}}else if(P(u)=="object"&&u.data!=null&&P(u.data)=="array"){if(u.data.length>1&&u.data[0].length>1)return p.error.v;if(u.data.length>1){if(u.data.length!=l.length)return p.error.v;f="row";for(var e=0;e<u.data.length;e++){var m=u.data[e][0].v;if(me(m)&&(m=0),P(m)!="boolean")if(P(m)=="string"&&(m.toLowerCase()=="true"||m.toLowerCase()=="false"))m.toLowerCase()=="true"?m=!0:m.toLowerCase()=="false"&&(m=!1);else if(B(m))m=parseFloat(m),m=m!=0;else return p.error.v;d.push(m)}}if(u.data[0].length>1){if(u.data[0].length!=l[0].length)return p.error.v;f="col";for(var e=0;e<u.data[0].length;e++){var m=u.data[0][e].v;if(me(m)&&(m=0),P(m)!="boolean")if(P(m)=="string"&&(m.toLowerCase()=="true"||m.toLowerCase()=="false"))m.toLowerCase()=="true"?m=!0:m.toLowerCase()=="false"&&(m=!1);else if(B(m))m=parseFloat(m),m=m!=0;else return p.error.v;d.push(m)}}}else return p.error.v;var g="";if(arguments.length==3&&(g=D.getFirstValue(arguments[2],"text"),H(g)))return g;var y=[];if(f=="row")for(var e=0;e<l.length;e++)d[e]&&y.push(l[e]);else for(var e=0;e<l.length;e++){for(var a=[],v=0;v<l[0].length;v++)d[v]&&a.push(l[e][v]);a.length>0&&y.push(a)}return y.length==0?g:y}catch(k){var b=k;return b=p.errorInfo(b),[p.error.v,b]}},UNIQUE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"number");else{var a=[];a.push(parseFloat(t)),l.push(a)}var o=!1;if(arguments.length>=2&&(o=D.getCellBoolen(arguments[1]),H(o)))return o;var s=!1;if(arguments.length==3&&(s=D.getCellBoolen(arguments[2]),H(s)))return s;if(o){l=l[0].map(function(b,k){return l.map(function(w){return w[k]})});for(var u={},d=[],f=[],e=0;e<l.length;e++){for(var m="",g=0;g<l[e].length;g++)m+=l[e][g].toString()+"|||";d.push(m),m in u||(u[m]=0,f.push(l[e]))}if(s){for(var y=[],e=0;e<d.length;e++)d.indexOf(d[e])==d.lastIndexOf(d[e])&&y.push(l[e]);return y=y[0].map(function(b,k){return y.map(function(w){return w[k]})}),y}else return f=f[0].map(function(b,k){return f.map(function(w){return w[k]})}),f}else{for(var u={},d=[],f=[],e=0;e<l.length;e++){for(var m="",g=0;g<l[e].length;g++)m+=l[e][g].toString()+"|||";d.push(m),m in u||(u[m]=0,f.push(l[e]))}if(s){for(var y=[],e=0;e<d.length;e++)d.indexOf(d[e])==d.lastIndexOf(d[e])&&y.push(l[e]);return y}else return f}}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},RANDARRAY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=1;if(arguments.length>=1){if(t=D.getFirstValue(arguments[0]),H(t))return t;if(!B(t))return p.error.v;t=parseInt(t)}var l=1;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(t<=0||l<=0)return p.error.v;for(var a=[],e=0;e<t;e++){for(var o=[],s=0;s<l;s++)o.push(Math.random().toFixed(9));a.push(o)}return a}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},SEQUENCE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=1;if(arguments.length>=2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}var a=1;if(arguments.length>=3){if(a=D.getFirstValue(arguments[2]),H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a)}var o=1;if(arguments.length==4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o)}if(t<=0||l<=0)return p.error.v;for(var s=[],e=0;e<t;e++){for(var u=[],d=0;d<l;d++){var f=a+o*(d+l*e);u.push(f)}s.push(u)}return s}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},EVALUATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentIndex,o=D.getFirstValue(arguments[0]).toString();if(H(o))return o;o.trim().indexOf("=")!=0&&(o="="+o);var s=p.execstringformula(o,t,l,a);return s[1]}catch(d){var u=d;return u=p.errorInfo(u),[p.error.v,u]}},REMOTE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;try{let n=window.luckysheetCurrentRow,t=window.luckysheetCurrentColumn,l=window.luckysheetCurrentFunction,a=D.getFirstValue(arguments[0]);return H(a)?a:(fe.remoteFunction(a,o=>{let s=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(n,t,o),s[n][t]={v:o,f:l},Ze(s,[{row:[n,n],column:[t,t]}])}),"Loading...")}catch(n){console.log(n);var e=n;return e=p.errorInfo(e),[p.error.v,e]}}},zm=Ab});var tu,Bm=Ie(()=>{tu=[{n:"SUMIF",t:0,m:[2,3],p:[{example:"A1:A10",require:"m",repeat:"n",type:"range"},{example:'">20"',require:"m",repeat:"n",type:"rangeall"},{example:"B1:B10",require:"o",repeat:"n",type:"range"}]},{n:"TAN",t:0,m:[1,1],p:[{example:"45*PI()/180",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TANH",t:0,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"CEILING",t:0,m:[2,2],p:[{example:"23.25",require:"m",repeat:"n",type:"rangenumber"},{example:"0.1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ATAN",t:0,m:[1,1],p:[{example:"0",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ASINH",t:0,m:[1,1],p:[{example:"0.9",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ABS",t:0,m:[1,1],p:[{example:"-2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ACOS",t:0,m:[1,1],p:[{example:"0",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ACOSH",t:0,m:[1,1],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MULTINOMIAL",t:0,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"y",type:"rangeall"}]},{n:"ATANH",t:0,m:[1,1],p:[{example:"0.9",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ATAN2",t:0,m:[2,2],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COUNTBLANK",t:1,m:[1,1],p:[{example:"A2:C100",require:"m",repeat:"n",type:"range"}]},{n:"COSH",t:0,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"INT",t:0,m:[1,1],p:[{example:"99.44",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ISEVEN",t:0,m:[1,1],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ISODD",t:0,m:[1,1],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"LCM",t:0,m:[1,255],p:[{example:"A2:A5",require:"m",repeat:"n",type:"rangeall"},{example:"3",require:"o",repeat:"y",type:"rangeall"}]},{n:"LN",t:0,m:[1,1],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"LOG",t:0,m:[1,2],p:[{example:"128",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"n",type:"rangenumber"}]},{n:"LOG10",t:0,m:[1,1],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MOD",t:0,m:[2,2],p:[{example:"10",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MROUND",t:0,m:[2,2],p:[{example:"21",require:"m",repeat:"n",type:"rangenumber"},{example:"14",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ODD",t:0,m:[1,1],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SUMSQ",t:0,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"y",type:"rangeall"}]},{n:"COMBIN",t:0,m:[2,2],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SUM",t:0,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"y",type:"rangeall"}]},{n:"SUBTOTAL",t:0,m:[2,256],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A5",require:"m",repeat:"n",type:"range"},{example:"B2:B8",require:"o",repeat:"y",type:"range"}]},{n:"ASIN",t:0,m:[1,1],p:[{example:"0",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COUNTIF",t:1,m:[2,2],p:[{example:"A1:A10",require:"m",repeat:"n",type:"range"},{example:'">20"',require:"m",repeat:"n",type:"rangeall"}]},{n:"RADIANS",t:0,m:[1,1],p:[{example:"180",require:"m",repeat:"n",type:"rangenumber"}]},{n:"RAND",t:0,m:[0,0],p:[]},{n:"COUNTUNIQUE",t:0,m:[1,255],p:[{example:"A1:C100",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"}]},{n:"DEGREES",t:0,m:[1,1],p:[{example:"PI()",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ERFC",t:9,m:[1,1],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"EVEN",t:0,m:[1,1],p:[{example:"3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"EXP",t:0,m:[1,1],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"FACT",t:0,m:[1,1],p:[{example:"3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"FACTDOUBLE",t:0,m:[1,1],p:[{example:"6",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PI",t:0,m:[0,0],p:[]},{n:"FLOOR",t:0,m:[2,2],p:[{example:"23.25",require:"m",repeat:"n",type:"rangenumber"},{example:"0.1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"GCD",t:0,m:[1,255],p:[{example:"A2:A5",require:"m",repeat:"n",type:"rangeall"},{example:"96",require:"o",repeat:"y",type:"rangeall"}]},{n:"RANDBETWEEN",t:0,m:[2,2],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"10",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ROUND",t:0,m:[2,2],p:[{example:"99.44",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ROUNDDOWN",t:0,m:[2,2],p:[{example:"99.44",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ROUNDUP",t:0,m:[2,2],p:[{example:"99.44",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SERIESSUM",t:0,m:[4,4],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"{FACT(0)",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SIGN",t:0,m:[1,1],p:[{example:"-42",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SIN",t:0,m:[1,1],p:[{example:"PI()",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SINH",t:0,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SQRT",t:0,m:[1,1],p:[{example:"9",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SQRTPI",t:0,m:[1,1],p:[{example:"9",require:"m",repeat:"n",type:"rangenumber"}]},{n:"GAMMALN",t:1,m:[1,1],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COS",t:0,m:[1,1],p:[{example:"PI()",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TRUNC",t:0,m:[1,2],p:[{example:"3.141592654",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"n",type:"rangenumber"}]},{n:"QUOTIENT",t:0,m:[2,2],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"POWER",t:0,m:[2,2],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"0.5",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SUMIFS",t:0,m:[3,257],p:[{example:"A1:A10",require:"m",repeat:"n",type:"range"},{example:" B1:B10",require:"m",repeat:"n",type:"range"},{example:' ">20"',require:"m",repeat:"n",type:"rangeall"},{example:" C1:C10",require:"o",repeat:"y",type:"rangeall"}]},{n:"COUNTIFS",t:1,m:[2,256],p:[{example:"A1:A10",require:"m",repeat:"n",type:"range"},{example:' ">20"',require:"m",repeat:"n",type:"rangeall"},{example:" B1:B10",require:"o",repeat:"y",type:"rangeall"}]},{n:"PRODUCT",t:0,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"HARMEAN",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"HYPGEOMDIST",t:1,m:[5,5],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:"20",require:"m",repeat:"n",type:"rangenumber"},{example:"40",require:"m",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"INTERCEPT",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"KURT",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"LARGE",t:1,m:[2,2],p:[{example:"A2:B100",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"STDEVA",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"STDEVP",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"GEOMEAN",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"y",type:"rangeall"}]},{n:"RANK_EQ",t:1,m:[2,3],p:[{example:"A10",require:"m",repeat:"n",type:"rangenumber"},{example:"A1:A100",require:"m",repeat:"n",type:"range"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"RANK_AVG",t:1,m:[2,3],p:[{example:"A10",require:"m",repeat:"n",type:"rangenumber"},{example:"A1:A100",require:"m",repeat:"n",type:"range"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"PERCENTRANK_EXC",t:1,m:[2,3],p:[{example:"A1:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"o",repeat:"n",type:"rangenumber"}]},{n:"PERCENTRANK_INC",t:1,m:[2,3],p:[{example:"A1:A100",require:"m",repeat:"n",type:"rangenumber"},{example:" A2",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"o",repeat:"n",type:"rangenumber"}]},{n:"FORECAST",t:1,m:[3,3],p:[{example:"A1",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"FISHERINV",t:1,m:[1,1],p:[{example:"0.962",require:"m",repeat:"n",type:"rangenumber"}]},{n:"FISHER",t:1,m:[1,1],p:[{example:"0.962",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MODE_SNGL",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"o",repeat:"y",type:"rangenumber"}]},{n:"WEIBULL_DIST",t:1,m:[4,4],p:[{example:"2.4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"3",require:"m",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"COUNT",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangeall"},{example:"B2:B100",require:"o",repeat:"y",type:"rangeall"}]},{n:"COUNTA",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangeall"},{example:"B2:B100",require:"o",repeat:"y",type:"rangeall"}]},{n:"AVEDEV",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"AVERAGE",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangeall"},{example:"B2:B100",require:"o",repeat:"y",type:"rangeall"}]},{n:"AVERAGEA",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangeall"},{example:"B2:B100",require:"o",repeat:"y",type:"rangeall"}]},{n:"BINOM_DIST",t:1,m:[4,4],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"0.005",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"BINOM_INV",t:1,m:[3,3],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"0.005",require:"m",repeat:"n",type:"rangenumber"},{example:"0.8",require:"m",repeat:"n",type:"rangenumber"}]},{n:"CONFIDENCE_NORM",t:1,m:[3,3],p:[{example:"0.05",require:"m",repeat:"n",type:"rangenumber"},{example:"1.6",require:"m",repeat:"n",type:"rangenumber"},{example:"250",require:"m",repeat:"n",type:"rangenumber"}]},{n:"CORREL",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COVARIANCE_P",t:1,m:[2,2],p:[{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COVARIANCE_S",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DEVSQ",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"EXPON_DIST",t:1,m:[3,3],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"0.5",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"AVERAGEIF",t:1,m:[2,3],p:[{example:"A1:A10",require:"m",repeat:"n",type:"rangeall"},{example:'">20"',require:"m",repeat:"n",type:"rangeall"},{example:"B1:B10",require:"o",repeat:"n",type:"rangeall"}]},{n:"AVERAGEIFS",t:1,m:[2,255],p:[{example:"A1:A10",require:"m",repeat:"n",type:"rangeall"},{example:" B1:B10",require:"m",repeat:"n",type:"rangeall"},{example:' ">20"',require:"m",repeat:"n",type:"rangeall"},{example:" C1:C10",require:"m",repeat:"n",type:"rangeall"}]},{n:"PERMUT",t:1,m:[2,2],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TRIMMEAN",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"range"},{example:"0.1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PERCENTILE_EXC",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"0.25",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PERCENTILE_INC",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"0.25",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PEARSON",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"NORM_S_INV",t:1,m:[1,1],p:[{example:"0.75",require:"m",repeat:"n",type:"rangenumber"}]},{n:"NORM_S_DIST",t:1,m:[2,2],p:[{example:"2.4",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"NORM_INV",t:1,m:[3,3],p:[{example:"0.75",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"NORM_DIST",t:1,m:[4,4],p:[{example:"2.4",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"NEGBINOM_DIST",t:1,m:[4,4],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"0.1",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"MINA",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"o",repeat:"y",type:"rangenumber"}]},{n:"MIN",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"o",repeat:"y",type:"rangenumber"}]},{n:"MEDIAN",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"o",repeat:"y",type:"rangenumber"}]},{n:"MAXA",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"o",repeat:"y",type:"rangenumber"}]},{n:"MAX",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"o",repeat:"y",type:"rangenumber"}]},{n:"LOGNORM_INV",t:1,m:[3,3],p:[{example:"0.4",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"6",require:"m",repeat:"n",type:"rangenumber"}]},{n:"LOGNORM_DIST",t:1,m:[4,4],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"6",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"Z_TEST",t:1,m:[2,3],p:[{example:"A2:A100",require:"m",repeat:"n",type:"range"},{example:"B2",require:"m",repeat:"n",type:"rangenumber"},{example:"3",require:"o",repeat:"n",type:"rangenumber"}]},{n:"PROB",t:1,m:[3,4],p:[{example:"A3:A6",require:"m",repeat:"n",type:"range"},{example:"2",require:"m",repeat:"n",type:"range"},{example:"3",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"o",repeat:"n",type:"rangenumber"}]},{n:"QUARTILE_EXC",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"QUARTILE_INC",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"POISSON_DIST",t:1,m:[3,3],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"RSQ",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"T_DIST",t:1,m:[3,3],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"30",require:"m",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"T_DIST_2T",t:1,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"30",require:"m",repeat:"n",type:"rangenumber"}]},{n:"T_DIST_RT",t:1,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"30",require:"m",repeat:"n",type:"rangenumber"}]},{n:"T_INV",t:1,m:[2,2],p:[{example:"0.35",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"T_INV_2T",t:1,m:[2,2],p:[{example:"0.35",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"T_TEST",t:1,m:[4,4],p:[{example:"A1:A4",require:"m",repeat:"n",type:"rangenumber"},{example:"B1:B4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"F_DIST",t:1,m:[4,4],p:[{example:"15.35",require:"m",repeat:"n",type:"rangenumber"},{example:"7",require:"m",repeat:"n",type:"rangenumber"},{example:"6",require:"m",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"F_DIST_RT",t:1,m:[3,3],p:[{example:"15.35",require:"m",repeat:"n",type:"rangenumber"},{example:"7",require:"m",repeat:"n",type:"rangenumber"},{example:"6",require:"m",repeat:"n",type:"rangenumber"}]},{n:"VAR_P",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"VAR_S",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"VARA",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"VARPA",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"STEYX",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"STANDARDIZE",t:1,m:[3,3],p:[{example:"96",require:"m",repeat:"n",type:"rangenumber"},{example:"80",require:"m",repeat:"n",type:"rangenumber"},{example:"6.7",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SMALL",t:1,m:[2,2],p:[{example:"A2:B100",require:"m",repeat:"n",type:"range"},{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SLOPE",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SKEW",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"y",type:"rangeall"}]},{n:"SKEW_P",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"y",type:"rangeall"}]},{n:"VLOOKUP",t:2,m:[3,4],p:[{example:"10003",require:"m",repeat:"n",type:"rangeall"},{example:"A2:B26",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"HLOOKUP",t:2,m:[3,4],p:[{example:"10003",require:"m",repeat:"n",type:"rangeall"},{example:"A2:Z6",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"LOOKUP",t:2,m:[2,3],p:[{example:"10003",require:"m",repeat:"n",type:"rangeall"},{example:"A1:A100",require:"m",repeat:"n",type:"rangeall"},{example:"B1:B100",require:"o",repeat:"n",type:"rangeall"}]},{n:"ADDRESS",t:2,m:[2,5],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"o",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"o",repeat:"n",type:"rangeall"},{example:'"Sheet2"',require:"o",repeat:"n",type:"rangeall"}]},{n:"INDIRECT",t:2,m:[1,2],p:[{example:'"Sheet2!"&B10',require:"m",repeat:"n",type:"rangeall"},{example:"FALSE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"ROW",t:2,m:[0,1],p:[{example:"A9",require:"o",repeat:"n",type:"rangeall"}]},{n:"ROWS",t:2,m:[1,1],p:[{example:"A9:A62",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COLUMN",t:2,m:[0,1],p:[{example:"A9",require:"o",repeat:"n",type:"rangeall"}]},{n:"COLUMNS",t:2,m:[1,1],p:[{example:"A9:W62",require:"m",repeat:"n",type:"rangenumber"}]},{n:"OFFSET",t:2,m:[3,5],p:[{example:"A2",require:"m",repeat:"n",type:"range"},{example:"3",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"n",type:"rangenumber"}]},{n:"MATCH",t:2,m:[2,3],p:[{example:'"Sunday"',require:"m",repeat:"n",type:"rangeall"},{example:"A2:A9",require:"m",repeat:"n",type:"range"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"INDEX",t:2,m:[2,3],p:[{example:"A1:C20",require:"m",repeat:"n",type:"range"},{example:"5",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"GETPIVOTDATA",t:2,m:[2,254],p:[{example:'"SUM of number of units"',require:"m",repeat:"n",type:"rangeall"},{example:"'Pivot table'!A1",require:"m",repeat:"n",type:"rangeall"},{example:'"division"',require:"o",repeat:"y",type:"rangeall"},{example:'"east"',require:"o",repeat:"y",type:"rangeall"}]},{n:"CHOOSE",t:2,m:[2,255],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:'"A"',require:"m",repeat:"n",type:"rangeall"},{example:'"B"',require:"o",repeat:"y",type:"rangeall"}]},{n:"HYPERLINK",t:2,p:[{example:'"http://www.luckysheet.com/"',require:"m",repeat:"n",type:"rangeall"},{example:'"luckysheet"',require:"m",repeat:"n",type:"rangeall"}]},{n:"TIME",t:6,m:[3,3],p:[{example:"11",require:"m",repeat:"n",type:"rangenumber"},{example:"40",require:"m",repeat:"n",type:"rangenumber"},{example:"59",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TIMEVALUE",t:6,m:[1,1],p:[{example:'"2:15 PM"',require:"m",repeat:"n",type:"rangeall"}]},{n:"EOMONTH",t:6,m:[2,2],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangenumber"}]},{n:"EDATE",t:6,m:[2,2],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SECOND",t:6,m:[1,1],p:[{example:"TIME(11",require:"m",repeat:"n",type:"rangeall"}]},{n:"MINUTE",t:6,m:[1,1],p:[{example:"TIME(11",require:"m",repeat:"n",type:"rangeall"}]},{n:"HOUR",t:6,m:[1,1],p:[{example:"TIME(11",require:"m",repeat:"n",type:"rangeall"}]},{n:"NOW",t:6,m:[0,0],p:[]},{n:"NETWORKDAYS",t:6,m:[2,3],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangeall"},{example:"16)",require:"o",repeat:"n",type:"rangeall"}]},{n:"NETWORKDAYS_INTL",t:6,m:[2,4],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangeall"},{example:"16)",require:"o",repeat:"n",type:"rangeall"},{example:"DATE(1969",require:"o",repeat:"n",type:"rangeall"}]},{n:"ISOWEEKNUM",t:6,m:[1,1],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"}]},{n:"WEEKNUM",t:6,m:[1,2],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"o",repeat:"n",type:"rangenumber"}]},{n:"WEEKDAY",t:6,m:[1,2],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DAY",t:6,m:[1,1],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"}]},{n:"DAYS",t:6,m:[2,2],p:[{example:"2011-3-15",require:"m",repeat:"n",type:"rangeall"},{example:"2011-2-1",require:"m",repeat:"n",type:"rangeall"}]},{n:"DAYS360",t:6,m:[2,3],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangeall"},{example:"FALSE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"DATE",t:6,m:[3,3],p:[{example:"1969",require:"m",repeat:"n",type:"rangenumber"},{example:"7",require:"m",repeat:"n",type:"rangenumber"},{example:"20",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DATEVALUE",t:6,m:[1,1],p:[{example:'"1969-7-20"',require:"m",repeat:"n",type:"rangeall"}]},{n:"DATEDIF",t:6,m:[3,3],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangeall"},{example:"16)",require:"m",repeat:"n",type:"rangeall"}]},{n:"WORKDAY",t:6,m:[2,3],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangenumber"},{example:"16)",require:"o",repeat:"n",type:"rangeall"}]},{n:"WORKDAY_INTL",t:6,m:[2,4],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangenumber"},{example:"16)",require:"o",repeat:"n",type:"rangeall"},{example:"DATE(1969",require:"o",repeat:"n",type:"rangeall"}]},{n:"YEAR",t:6,m:[1,1],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"}]},{n:"YEARFRAC",t:6,m:[2,3],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangeall"},{example:"16)",require:"o",repeat:"n",type:"rangenumber"}]},{n:"TODAY",t:6,m:[0,0],p:[]},{n:"MONTH",t:6,m:[1,1],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"}]},{n:"EFFECT",t:8,m:[2,2],p:[{example:"0.99",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DOLLAR",t:12,m:[1,2],p:[{example:"1.2351",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DOLLARDE",t:8,m:[2,2],p:[{example:"100.10",require:"m",repeat:"n",type:"rangenumber"},{example:"32",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DOLLARFR",t:8,m:[2,2],p:[{example:"100.125",require:"m",repeat:"n",type:"rangenumber"},{example:"32",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DB",t:8,m:[4,5],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"50",require:"m",repeat:"n",type:"rangenumber"},{example:"10",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"10",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DDB",t:8,m:[4,5],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"50",require:"m",repeat:"n",type:"rangenumber"},{example:"10",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"2.25",require:"m",repeat:"n",type:"rangenumber"}]},{n:"RATE",t:8,m:[3,6],p:[{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:"-100",require:"m",repeat:"n",type:"rangenumber"},{example:"400",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"},{example:"0.1",require:"o",repeat:"n",type:"rangenumber"}]},{n:"CUMPRINC",t:8,m:[6,6],p:[{example:"0.12",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"5",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COUPNUM",t:8,m:[3,4],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"02",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"SYD",t:8,m:[4,4],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"50",require:"m",repeat:"n",type:"rangenumber"},{example:"10",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TBILLEQ",t:8,m:[3,3],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"m",repeat:"n",type:"rangeall"},{example:"2)",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TBILLYIELD",t:8,m:[3,3],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"95",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TBILLPRICE",t:8,m:[3,3],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.09",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PV",t:8,m:[3,5],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"D2",require:"o",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"}]},{n:"ACCRINT",t:8,m:[6,8],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.1",require:"m",repeat:"n",type:"rangenumber"},{example:"10000",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"ACCRINTM",t:8,m:[4,5],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"0.1",require:"m",repeat:"n",type:"rangenumber"},{example:"1000",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COUPDAYBS",t:8,m:[3,4],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"COUPDAYS",t:8,m:[3,4],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"COUPDAYSNC",t:8,m:[3,4],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"COUPNCD",t:8,m:[3,4],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"01)",require:"m",repeat:"n",type:"rangenumber"},{example:"DATE(2019",require:"o",repeat:"n",type:"rangenumber"}]},{n:"COUPPCD",t:8,m:[3,4],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"01)",require:"m",repeat:"n",type:"rangenumber"},{example:"DATE(2019",require:"o",repeat:"n",type:"rangenumber"}]},{n:"FV",t:8,m:[3,5],p:[{example:"0.12",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"400",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"FVSCHEDULE",t:8,m:[2,2],p:[{example:"10000",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A100",require:"m",repeat:"n",type:"range"}]},{n:"YIELD",t:8,m:[6,7],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.057",require:"m",repeat:"n",type:"rangenumber"},{example:"95",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"m",repeat:"n",type:"rangenumber"}]},{n:"YIELDDISC",t:8,m:[4,5],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"95",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"m",repeat:"n",type:"rangenumber"}]},{n:"NOMINAL",t:8,m:[2,2],p:[{example:"0.85",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"}]},{n:"XIRR",t:8,m:[2,3],p:[{example:"B2:B25",require:"m",repeat:"n",type:"range"},{example:"C2:C25",require:"m",repeat:"n",type:"range"},{example:"250",require:"o",repeat:"n",type:"rangenumber"}]},{n:"MIRR",t:8,m:[3,3],p:[{example:"A2:A25",require:"m",repeat:"n",type:"range"},{example:"0.1",require:"m",repeat:"n",type:"rangenumber"},{example:"0.12",require:"m",repeat:"n",type:"rangenumber"}]},{n:"IRR",t:8,m:[1,2],p:[{example:"A2:A25",require:"m",repeat:"n",type:"range"},{example:"200",require:"o",repeat:"n",type:"rangenumber"}]},{n:"NPV",t:8,m:[2,255],p:[{example:"0.1",require:"m",repeat:"n",type:"rangenumber"},{example:"200",require:"m",repeat:"n",type:"rangeall"},{example:"250",require:"o",repeat:"y",type:"rangeall"}]},{n:"XNPV",t:8,m:[3,3],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B25",require:"m",repeat:"n",type:"range"},{example:"C2:C25",require:"m",repeat:"n",type:"range"}]},{n:"CUMIPMT",t:8,m:[6,6],p:[{example:"0.12",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"5",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PMT",t:8,m:[3,5],p:[{example:"0.08",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:" 100000",require:"m",repeat:"n",type:"rangenumber"},{example:"D2",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"IPMT",t:8,m:[4,6],p:[{example:"0.1",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:"80000",require:"m",repeat:"n",type:"rangenumber"},{example:"E2",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PPMT",t:8,m:[4,6],p:[{example:"0.1",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"3*12",require:"m",repeat:"n",type:"rangenumber"},{example:"100000",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"INTRATE",t:8,m:[4,5],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"100000",require:"m",repeat:"n",type:"rangenumber"},{example:"101200",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PRICE",t:8,m:[6,7],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.057",require:"m",repeat:"n",type:"rangenumber"},{example:"0.065",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"PRICEDISC",t:8,m:[4,5],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.0525",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"PRICEMAT",t:8,m:[5,6],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.061",require:"m",repeat:"n",type:"rangenumber"},{example:"0.061",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"RECEIVED",t:8,m:[4,5],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"10000000",require:"m",repeat:"n",type:"rangenumber"},{example:"0.0575",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DISC",t:8,m:[4,5],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"97.975",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"o",repeat:"n",type:"rangenumber"}]},{n:"NPER",t:8,m:[3,5],p:[{example:"0.12",require:"m",repeat:"n",type:"rangenumber"},{example:"500",require:"m",repeat:"n",type:"rangenumber"},{example:"40000",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"SLN",t:8,m:[3,3],p:[{example:"300000",require:"m",repeat:"n",type:"rangenumber"},{example:"75000",require:"m",repeat:"n",type:"rangenumber"},{example:"10",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DURATION",t:8,m:[5,6],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.08",require:"m",repeat:"n",type:"rangenumber"},{example:"0.09",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"MDURATION",t:8,m:[5,6],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.08",require:"m",repeat:"n",type:"rangenumber"},{example:"0.09",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"BIN2DEC",t:9,m:[1,1],p:[{example:"101",require:"m",repeat:"n",type:"rangeall"}]},{n:"BIN2HEX",t:9,m:[1,2],p:[{example:"101",require:"m",repeat:"n",type:"rangeall"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"BIN2OCT",t:9,m:[1,2],p:[{example:"101",require:"m",repeat:"n",type:"rangeall"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DEC2BIN",t:9,m:[1,2],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DEC2HEX",t:9,m:[1,2],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DEC2OCT",t:9,m:[1,2],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"HEX2BIN",t:9,m:[1,2],p:[{example:'"f3"',require:"m",repeat:"n",type:"rangeall"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"HEX2DEC",t:9,m:[1,1],p:[{example:'"f3"',require:"m",repeat:"n",type:"rangeall"}]},{n:"HEX2OCT",t:9,m:[1,2],p:[{example:'"f3"',require:"m",repeat:"n",type:"rangeall"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"OCT2BIN",t:9,m:[1,2],p:[{example:"37",require:"m",repeat:"n",type:"rangeall"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"OCT2DEC",t:9,m:[1,1],p:[{example:"37",require:"m",repeat:"n",type:"rangeall"}]},{n:"OCT2HEX",t:9,m:[1,2],p:[{example:"37",require:"m",repeat:"n",type:"rangeall"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"COMPLEX",t:9,m:[2,3],p:[{example:"3",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:'"j"',require:"o",repeat:"n",type:"rangestring"}]},{n:"IMREAL",t:9,m:[1,1],p:[{example:'"4+5i"',require:"m",repeat:"n",type:"rangeall"}]},{n:"IMAGINARY",t:9,m:[1,1],p:[{example:'"4+5i"',require:"m",repeat:"n",type:"rangeall"}]},{n:"IMCONJUGATE",t:9,m:[1,1],p:[{example:'"3+4i"',require:"m",repeat:"n",type:"rangeall"}]},{n:"IMABS",t:9,m:[1,1],p:[{example:'"3+4i"',require:"m",repeat:"n",type:"rangeall"}]},{n:"DELTA",t:9,m:[1,2],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"}]},{n:"IMSUM",t:9,m:[1,255],p:[{example:'"3+4i"',require:"m",repeat:"n",type:"rangeall"},{example:'"5-3i"',require:"o",repeat:"y",type:"rangeall"}]},{n:"IMSUB",t:9,m:[2,2],p:[{example:'"6+5i"',require:"m",repeat:"n",type:"rangeall"},{example:'"2+3i"',require:"m",repeat:"n",type:"rangeall"}]},{n:"IMPRODUCT",t:9,m:[1,255],p:[{example:'"3+4i"',require:"m",repeat:"n",type:"rangeall"},{example:'"5-3i"',require:"o",repeat:"y",type:"rangeall"}]},{n:"IMDIV",t:9,m:[2,2],p:[{example:'"11+16i"',require:"m",repeat:"n",type:"rangeall"},{example:'"3+2i"',require:"m",repeat:"n",type:"rangeall"}]},{n:"NOT",t:10,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"TRUE",t:10,m:[0,0],p:[]},{n:"FALSE",t:10,m:[0,0],p:[]},{n:"AND",t:10,m:[1,255],p:[{example:'A2 = "foo"',require:"m",repeat:"n",type:"rangeall"},{example:'A3 = "bar"',require:"o",repeat:"y",type:"rangeall"}]},{n:"IFERROR",t:10,m:[2,2],p:[{example:"A1",require:"m",repeat:"n",type:"rangeall"},{example:'"Error in cell A1"',require:"m",repeat:"n",type:"rangeall"}]},{n:"IF",t:10,m:[2,3],p:[{example:'A2 = "foo"',require:"m",repeat:"n",type:"rangeall"},{example:'"A2 is foo"',require:"m",repeat:"n",type:"rangeall"},{example:'"A2 was false"',require:"o",repeat:"n",type:"rangeall"}]},{n:"OR",t:10,m:[1,255],p:[{example:'A2 = "foo"',require:"m",repeat:"n",type:"rangeall"},{example:' A3 = "bar"',require:"m",repeat:"n",type:"rangeall"}]},{n:"NE",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"A3",require:"m",repeat:"n",type:"rangeall"}]},{n:"EQ",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"A3",require:"m",repeat:"n",type:"rangeall"}]},{n:"GT",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"A3",require:"m",repeat:"n",type:"rangeall"}]},{n:"GTE",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"A3",require:"m",repeat:"n",type:"rangeall"}]},{n:"LT",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"A3",require:"m",repeat:"n",type:"rangeall"}]},{n:"LTE",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"A3",require:"m",repeat:"n",type:"rangeall"}]},{n:"ADD",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"A3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MINUS",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"A3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MULTIPLY",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"B2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DIVIDE",t:11,m:[2,2],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"CONCAT",t:11,m:[2,2],p:[{example:'"de"',require:"m",repeat:"n",type:"rangeall"},{example:'"mystify"',require:"m",repeat:"n",type:"rangeall"}]},{n:"UNARY_PERCENT",t:11,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"CONCATENATE",t:12,m:[1,255],p:[{example:'"Super"',require:"m",repeat:"n",type:"rangeall"},{example:'"calla"',require:"o",repeat:"y",type:"rangeall"}]},{n:"CODE",t:12,m:[1,1],p:[{example:'"a"',require:"m",repeat:"n",type:"rangeall"}]},{n:"CHAR",t:12,m:[1,1],p:[{example:"97",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ARABIC",t:12,m:[1,1],p:[{example:'"XIV"',require:"m",repeat:"n",type:"rangeall"}]},{n:"ROMAN",t:12,m:[1,1],p:[{example:"499",require:"m",repeat:"n",type:"rangenumber"}]},{n:"REGEXEXTRACT",t:12,m:[2,2],p:[{example:'"Needle in a haystack"',require:"m",repeat:"n",type:"rangeall"},{example:'".e{2}dle"',require:"m",repeat:"n",type:"rangeall"}]},{n:"REGEXMATCH",t:12,m:[2,2],p:[{example:'"Spreadsheets"',require:"m",repeat:"n",type:"rangeall"},{example:'"S.r"',require:"m",repeat:"n",type:"rangeall"}]},{n:"REGEXREPLACE",t:12,m:[3,3],p:[{example:'"Spreadsheets"',require:"m",repeat:"n",type:"rangeall"},{example:'"S.*d"',require:"m",repeat:"n",type:"rangeall"},{example:'"Bed"',require:"m",repeat:"n",type:"rangeall"}]},{n:"T",t:12,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"FIXED",t:12,m:[1,3],p:[{example:"3.141592653",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"FIND",t:12,m:[2,3],p:[{example:'"n"',require:"m",repeat:"n",type:"rangeall"},{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"14",require:"o",repeat:"n",type:"rangenumber"}]},{n:"FINDB",t:12,m:[2,3],p:[{example:'"new"',require:"m",repeat:"n",type:"rangeall"},{example:'"new year"',require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"n",type:"rangenumber"}]},{n:"JOIN",t:12,m:[2,255],p:[{example:'" and-a "',require:"m",repeat:"n",type:"rangeall"},{example:"{1",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"y",type:"rangeall"}]},{n:"LEFT",t:12,m:[1,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"RIGHT",t:12,m:[1,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MID",t:12,m:[3,3],p:[{example:'"get this"',require:"m",repeat:"n",type:"rangeall"},{example:"5",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"LEN",t:12,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"LENB",t:12,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"LOWER",t:12,m:[1,1],p:[{example:'"LOREM IPSUM"',require:"m",repeat:"n",type:"rangeall"}]},{n:"UPPER",t:12,m:[1,1],p:[{example:'"lorem ipsum"',require:"m",repeat:"n",type:"rangeall"}]},{n:"EXACT",t:12,m:[2,2],p:[{example:"A1",require:"m",repeat:"n",type:"rangeall"},{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"REPLACE",t:12,m:[4,4],p:[{example:'"Spreadsheets"',require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"6",require:"m",repeat:"n",type:"rangenumber"},{example:'"Bed"',require:"m",repeat:"n",type:"rangeall"}]},{n:"REPT",t:12,m:[2,2],p:[{example:'"ha"',require:"m",repeat:"n",type:"rangeall"},{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SEARCH",t:12,m:[2,3],p:[{example:'"n"',require:"m",repeat:"n",type:"rangeall"},{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"14",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SUBSTITUTE",t:12,m:[3,4],p:[{example:'"search for it"',require:"m",repeat:"n",type:"rangeall"},{example:'"search for"',require:"m",repeat:"n",type:"rangeall"},{example:'"Google"',require:"m",repeat:"n",type:"rangeall"},{example:"3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"CLEAN",t:12,m:[1,1],p:[{example:'"AF"&CHAR(31)',require:"m",repeat:"n",type:"rangeall"}]},{n:"TEXT",t:12,m:[2,2],p:[{example:"1.23",require:"m",repeat:"n",type:"rangenumber"},{example:'"$0.00"',require:"m",repeat:"n",type:"rangeall"}]},{n:"TRIM",t:12,m:[1,1],p:[{example:'" lorem ipsum"',require:"m",repeat:"n",type:"rangeall"}]},{n:"VALUE",t:12,m:[1,1],p:[{example:'"123"',require:"m",repeat:"n",type:"rangeall"}]},{n:"PROPER",t:12,m:[1,1],p:[{example:'"united states"',require:"m",repeat:"n",type:"rangeall"}]},{n:"CONVERT",t:13,m:[3,3],p:[{example:"5.1",require:"m",repeat:"n",type:"rangenumber"},{example:'"g"',require:"m",repeat:"n",type:"rangeall"},{example:'"kg"',require:"m",repeat:"n",type:"rangeall"}]},{n:"SUMX2MY2",t:14,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SUMX2PY2",t:14,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SUMXMY2",t:14,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TRANSPOSE",t:14,m:[1,1],p:[{example:"{1,2}",require:"m",repeat:"n",type:"range"}]},{n:"TREND",t:14,m:[1,4],p:[{example:"B2:B10",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A10",require:"o",repeat:"n",type:"rangenumber"},{example:"A11:A13",require:"o",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"FREQUENCY",t:14,m:[2,2],p:[{example:"A2:A40",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B5",require:"m",repeat:"n",type:"rangenumber"}]},{n:"GROWTH",t:14,m:[1,4],p:[{example:"B2:B10",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A10",require:"o",repeat:"n",type:"rangenumber"},{example:"A11:A13",require:"o",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"LINEST",t:14,m:[1,4],p:[{example:"B2:B10",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A10",require:"o",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"LOGEST",t:14,m:[1,4],p:[{example:"B2:B10",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A10",require:"o",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"MDETERM",t:14,m:[1,1],p:[{example:"A1:D4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MINVERSE",t:14,m:[1,1],p:[{example:"A1:D4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MMULT",t:14,m:[2,2],p:[{example:"A1:B3",require:"m",repeat:"n",type:"rangenumber"},{example:"C1:F2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SUMPRODUCT",t:14,m:[1,255],p:[{example:"A2:C5",require:"m",repeat:"n",type:"rangenumber"},{example:"D2:F5",require:"o",repeat:"y",type:"rangenumber"}]},{n:"ISFORMULA",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"range"}]},{n:"CELL",t:15,m:[2,2],p:[{example:'"type"',require:"m",repeat:"n",type:"rangeall"},{example:"C2",require:"m",repeat:"n",type:"range"}]},{n:"NA",t:15,m:[0,0],p:[]},{n:"ERROR_TYPE",t:15,m:[1,1],p:[{example:"A3",require:"m",repeat:"n",type:"rangeall"}]},{n:"ISBLANK",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"range"}]},{n:"ISERR",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"ISERROR",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"ISLOGICAL",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"ISNA",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"ISNONTEXT",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"ISNUMBER",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"ISREF",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"range"}]},{n:"ISTEXT",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"TYPE",t:15,m:[1,1],p:[{example:"C4",require:"m",repeat:"n",type:"rangeall"}]},{n:"N",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"TO_DATE",t:16,m:[1,1],p:[{example:"25405",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TO_PURE_NUMBER",t:16,m:[1,1],p:[{example:"50%",require:"m",repeat:"n",type:"rangeall"}]},{n:"TO_TEXT",t:16,m:[1,1],p:[{example:"24",require:"m",repeat:"n",type:"rangeall"}]},{n:"TO_DOLLARS",t:16,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TO_PERCENT",t:16,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DGET",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DMAX",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DMIN",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DAVERAGE",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DCOUNT",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DCOUNTA",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DPRODUCT",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DSTDEV",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DSTDEVP",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DSUM",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DVAR",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DVARP",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"AGE_BY_IDCARD",t:"3",m:[1,2],p:[{example:"A1",require:"m",repeat:"n",type:"rangeall"},{example:'"2017-10-01"',require:"o",repeat:"n",type:"rangedatetime"}]},{n:"SEX_BY_IDCARD",t:"3",m:[1,1],p:[{example:'"31033519900101XXXX"',require:"m",repeat:"n",type:"rangeall"}]},{n:"BIRTHDAY_BY_IDCARD",t:"3",m:[1,2],p:[{example:'"31033519900101XXXX"',require:"m",repeat:"n",type:"rangeall"},{example:"0",require:"o",repeat:"n",type:"rangeall"}]},{n:"PROVINCE_BY_IDCARD",t:"3",m:[1,1],p:[{example:'"31033519900101XXXX"',require:"m",repeat:"n",type:"rangeall"}]},{n:"CITY_BY_IDCARD",t:"3",m:[1,1],p:[{example:'"31033519900101XXXX"',require:"m",repeat:"n",type:"rangeall"}]},{n:"STAR_BY_IDCARD",t:"3",m:[1,1],p:[{example:'"31033519900101XXXX"',require:"m",repeat:"n",type:"rangeall"}]},{n:"ANIMAL_BY_IDCARD",t:"3",m:[1,1],p:[{example:'"31033519900101XXXX"',require:"m",repeat:"n",type:"rangeall"}]},{n:"ISIDCARD",t:"3",m:[1,1],p:[{example:'"31033519900101XXXX"',require:"m",repeat:"n",type:"rangeall"}]},{n:"DM_TEXT_CUTWORD",t:"4",m:[1,2],p:[{example:'"I came to Beijing Tsinghua University"',require:"m",repeat:"n",type:"rangeall"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DM_TEXT_TFIDF",t:"4",m:[1,3],p:[{example:'"I came to Beijing Tsinghua University"',require:"m",repeat:"n",type:"rangeall"},{example:"20",require:"o",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DM_TEXT_TEXTRANK",t:"4",m:[1,3],p:[{example:'"I came to Beijing Tsinghua University"',require:"m",repeat:"n",type:"rangeall"},{example:"20",require:"o",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DATA_CN_STOCK_CLOSE",t:"5",m:[1,3],p:[{example:'"000001"',require:"m",repeat:"n",type:"rangeall"},{example:"2015-01-08",require:"o",repeat:"n",type:"rangedate"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DATA_CN_STOCK_OPEN",t:"5",m:[1,3],p:[{example:'"000001"',require:"m",repeat:"n",type:"rangeall"},{example:"2015-01-08",require:"o",repeat:"n",type:"rangedate"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DATA_CN_STOCK_MAX",t:"5",m:[1,3],p:[{example:'"000001"',require:"m",repeat:"n",type:"rangeall"},{example:"2015-01-08",require:"o",repeat:"n",type:"rangedate"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DATA_CN_STOCK_MIN",t:"5",m:[1,3],p:[{example:'"000001"',require:"m",repeat:"n",type:"rangeall"},{example:"2015-01-08",require:"o",repeat:"n",type:"rangedate"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DATA_CN_STOCK_VOLUMN",t:"5",m:[1,3],p:[{example:'"000001"',require:"m",repeat:"n",type:"rangeall"},{example:"2015-01-08",require:"o",repeat:"n",type:"rangedate"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DATA_CN_STOCK_AMOUNT",t:"5",m:[1,3],p:[{example:'"000001"',require:"m",repeat:"n",type:"rangeall"},{example:"2015-01-08",require:"o",repeat:"n",type:"rangedate"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"ISDATE",t:"6",m:[1,1],p:[{example:'"1990-01-01"',require:"m",repeat:"n",type:"rangeall"}]},{n:"LINESPLINES",t:"3",m:[1,8],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"#2ec7c9",require:"o",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"avg",require:"o",repeat:"n",type:"rangeall"},{example:"#000",require:"o",repeat:"n",type:"rangeall"},{example:"#fc5c5c",require:"o",repeat:"n",type:"rangeall"},{example:"#fc5c5c",require:"o",repeat:"n",type:"rangeall"},{example:"1.5",require:"o",repeat:"n",type:"rangeall"}]},{n:"AREASPLINES",t:"3",m:[1,5],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"#2ec7c9",require:"o",repeat:"n",type:"rangeall"},{example:"#CCF3F4",require:"o",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"avg",require:"o",repeat:"n",type:"rangeall"},{example:"#000",require:"o",repeat:"n",type:"rangeall"}]},{n:"COLUMNSPLINES",t:"3",m:[1,6],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"#fc5c5c",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"n",type:"rangeall"},{example:"100",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"y",type:"rangeall"}]},{n:"STACKCOLUMNSPLINES",t:"3",m:[1,5],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"100",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"y",type:"rangeall"}]},{n:"BARSPLINES",t:"3",m:[1,6],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"#fc5c5c",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"n",type:"rangeall"},{example:"100",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"y",type:"rangeall"}]},{n:"STACKBARSPLINES",t:"3",m:[1,5],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"100",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"y",type:"rangeall"}]},{n:"DISCRETESPLINES",t:"3",m:[1,4],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"#2ec7c9",require:"o",repeat:"n",type:"rangeall"},{example:"#fc5c5c",require:"o",repeat:"n",type:"rangeall"}]},{n:"TRISTATESPLINES",t:"3",m:[1,6],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"#fc5c5c",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"n",type:"rangeall"},{example:"#999",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"y",type:"rangeall"}]},{n:"PIESPLINES",t:"3",m:[1,5],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"0",require:"o",repeat:"n",type:"rangeall"},{example:"0",require:"o",repeat:"n",type:"rangeall"},{example:"#000",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"y",type:"rangeall"}]},{n:"BOXSPLINES",t:"3",m:[1,4],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"1.5",require:"o",repeat:"n",type:"rangeall"},{example:"10",require:"o",repeat:"n",type:"rangeall"},{example:"1.5",require:"o",repeat:"n",type:"rangeall"}]},{n:"BULLETSPLINES",t:"3",m:[2,3],p:[{example:"10",require:"m",repeat:"n",type:"rangeall"},{example:"8",require:"m",repeat:"n",type:"rangeall"},{example:"12",require:"o",repeat:"y",type:"rangeall"}]},{n:"COMPOSESPLINES",t:"3",m:[1,1],p:[{example:"PIESPLINES(A1:A20)",require:"m",repeat:"y",type:"rangeall"}]},{n:"SORT",t:"14",m:[1,4],p:[{example:"A2:A17",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"},{example:"-1",require:"o",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"FILTER",t:"14",m:[2,3],p:[{example:"A5:D20",require:"m",repeat:"n",type:"range"},{example:"1",require:"m",repeat:"n",type:"range"},{example:'""',require:"o",repeat:"n",type:"rangeall"}]},{n:"UNIQUE",t:"14",m:[1,3],p:[{example:"A2:B26",require:"m",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"},{example:"FALSE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"RANDARRAY",t:"14",m:[0,2],p:[{example:"1",require:"o",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"}]},{n:"SEQUENCE",t:"14",m:[1,4],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"}]},{n:"EVALUATE",t:"3",m:[1,1],p:[{example:'"A1+5*2^2"',require:"m",repeat:"n",type:"rangeall"}]},{n:"REMOTE",t:"5",m:[1,1],p:[{example:"SUM(A1:A10000000)",require:"m",repeat:"n",type:"string"}]}]});var Hm,Vm=Ie(()=>{Bm();Hm=e=>(tu.forEach(n=>{let t=e[n.n];n.d=t.d,n.a=t.a,n.p.forEach((l,a)=>{Object.assign(l,t.p[a])})}),tu)});var Db,qm,jm=Ie(()=>{Om();Xe();bt();Vm();Db=function(e){let n=Q(),t=[...Hm(n.functionlist)];for(let a=0;a<t.length;a++){let o=t[a];o.f=zm[o.n]}e&&t.push(...e),h.functionlist=t;let l={};for(let a=0;a<t.length;a++){let o=t[a];l[o.n]=o}window.luckysheet_function=l,h.luckysheet_function=l},qm=Db});function Mb(e,n){let t=ve.getSheetByIndex();t.config==null&&(t.config={}),t.config.sheetViewZoom==null&&(t.config.sheetViewZoom={});let l=1,a="zoomScaleNormal";Fb(t),e=="viewNormal"?a="viewNormalZoomScale":e=="viewLayout"?a="viewLayoutZoomScale":e=="viewPage"&&(a="viewPageZoomScale",l=.6,Eb(t));let o=t.config.sheetViewZoom[a];o==null&&(o=l),t.config.curentsheetView=e,h.clearjfundo&&h.jfredo.push({type:"viewChange",curType:e,preType:n,sheetIndex:h.currentSheetIndex}),ne.saveParam("cg",h.currentSheetIndex,e,{k:"curentsheetView"}),h.currentSheetView=e,Cn(o)}function Fb(e){}function Eb(e){}function Nb(e){let n=e.parent(),t=n.find("luckysheet-print-viewBtn-active").attr("type");if(e.attr("type")==t)return;let l=e.attr("type");if(l!=null)Mb(l,t);else return;e.parent().find(".luckysheet-print-viewBtn").removeClass("luckysheet-print-viewBtn-active"),e.addClass("luckysheet-print-viewBtn-active")}function Um(){let e=fe.container,n=this;$("#"+e).find(".luckysheet-print-viewBtn").click(function(){Nb($(this))})}var Gm=Ie(()=>{xl();Ja();fl();Qt();Ol();Xe()});var Ym=vl((Jo,Wm)=>{(function(e,n){typeof Jo=="object"&&typeof Wm!="undefined"?n(Jo):typeof define=="function"&&define.amd?define(["exports"],n):(e=typeof globalThis!="undefined"?globalThis:e||self,n(e.zh={}))})(Jo,function(e){"use strict";var n=typeof window!="undefined"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},t={weekdays:{shorthand:["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"],longhand:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"]},months:{shorthand:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],longhand:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"]},rangeSeparator:" \u81F3 ",weekAbbreviation:"\u5468",scrollTitle:"\u6EDA\u52A8\u5207\u6362",toggleTitle:"\u70B9\u51FB\u5207\u6362 12/24 \u5C0F\u65F6\u65F6\u5236"};n.l10ns.zh=t;var l=n.l10ns;e.Mandarin=t,e.default=l,Object.defineProperty(e,"__esModule",{value:!0})})});function Pb(e){clearTimeout(Xm),Xm=setTimeout(()=>{$("#luckysheet-icon-undo")[e?"removeClass":"addClass"]("disabled")},10)}function Lb(e){clearTimeout(Km),Km=setTimeout(()=>{$("#luckysheet-icon-redo")[e?"removeClass":"addClass"]("disabled")},10)}var Xm,Km,Zm,Jm=Ie(()=>{dt();Xe();Ll();Nt();va();Zm=function(){Xo(h,"jfredo",(e,n,t,l)=>{n!=="length"&&Je.createHookFunction("updated",t),Pb(h.jfredo.length)}),Xo(h,"jfundo",(e,n,t,l)=>{Lb(h.jfundo.length)}),Xo(h,"asyncLoad",(e,n,t,l)=>{n==="length"&&t===0&&Je.createHookFunction("workbookCreateAfter",Uo())})}});function ep(){Qc(),Yd(),ym(),_m(),Tm(),$m(),Am(),Mm(),Nf(),Um(),Zm()}var Qm,gl,tp=Ie(()=>{cu();dt();Xe();bt();Qt();xl();fl();pr();gm();kn();vm();Cm();Sm();Im();Dm();Fm();Lm();Nt();An();Yt();jm();Gt();Kt();$r();Zt();Ja();Gm();Ll();va();Ec();Qm=Fl(Ym());Jm();zs();da();gl={};gl=Xc(jc,gl);gl.create=function(e){Je.destroy(),h.toJsonOptions={};for(let d in e)d!=="data"&&(h.toJsonOptions[d]=e[d]);let n=Xc(su,e),t=n.loadUrl,l=n.menu,a=n.title,o=n.container;h.container=o,h.luckysheetfile=n.data,h.defaultcolumnNum=n.column,h.defaultrowNum=n.row,h.defaultFontSize=n.defaultFontSize,h.fullscreenmode=n.fullscreenmode,h.lang=n.lang,h.allowEdit=n.allowEdit,h.limitSheetNameLength=n.limitSheetNameLength,h.defaultSheetNameMaxLength=n.defaultSheetNameMaxLength,h.fontList=n.fontList,ne.gridKey=n.gridKey,ne.loadUrl=n.loadUrl,ne.updateUrl=n.updateUrl,ne.updateImageUrl=n.updateImageUrl,ne.title=n.title,ne.loadSheetUrl=n.loadSheetUrl,ne.allowUpdate=n.allowUpdate,fe.autoFormatw=n.autoFormatw,fe.accuracy=n.accuracy,fe.total=n.data[0].total,fe.loading=n.loading,fe.allowCopy=n.allowCopy,fe.showtoolbar=n.showtoolbar,fe.showtoolbarConfig=n.showtoolbarConfig,fe.showinfobar=n.showinfobar,fe.showsheetbar=n.showsheetbar,fe.showsheetbarConfig=n.showsheetbarConfig,fe.showstatisticBar=n.showstatisticBar,fe.showstatisticBarConfig=n.showstatisticBarConfig,fe.sheetFormulaBar=n.sheetFormulaBar,fe.cellRightClickConfig=n.cellRightClickConfig,fe.sheetRightClickConfig=n.sheetRightClickConfig,fe.pointEdit=n.pointEdit,fe.pointEditUpdate=n.pointEditUpdate,fe.pointEditZoom=n.pointEditZoom,fe.userInfo=n.userInfo,fe.userMenuItem=n.userMenuItem,fe.myFolderUrl=n.myFolderUrl,fe.functionButton=n.functionButton,fe.showConfigWindowResize=n.showConfigWindowResize,fe.enableAddRow=n.enableAddRow,fe.enableAddBackTop=n.enableAddBackTop,fe.addRowCount=n.addRowCount,fe.enablePage=n.enablePage,fe.pageInfo=n.pageInfo,fe.editMode=n.editMode,fe.beforeCreateDom=n.beforeCreateDom,fe.workbookCreateBefore=n.workbookCreateBefore,fe.workbookCreateAfter=n.workbookCreateAfter,fe.remoteFunction=n.remoteFunction,fe.customFunctions=n.customFunctions,fe.fireMousedown=n.fireMousedown,fe.forceCalculation=n.forceCalculation,fe.plugins=n.plugins,fe.rowHeaderWidth=n.rowHeaderWidth,fe.columnHeaderHeight=n.columnHeaderHeight,fe.defaultColWidth=n.defaultColWidth,fe.defaultRowHeight=n.defaultRowHeight,fe.title=n.title,fe.container=n.container,fe.hook=n.hook,fe.pager=n.pager,fe.initShowsheetbarConfig=!1,fe.imageUpdateMethodConfig=n.imageUpdateMethodConfig,h.lang==="zh"&&Bo.localize(Qm.default.zh),h.asyncLoad.push(...fe.plugins),Pm(n.plugins,n.data),qm(n.customFunctions);let s=n.devicePixelRatio;s==null&&(s=1),h.devicePixelRatio=Math.ceil(s);let u=Er("#"+o);h.loadingObj=u,t==""?(ve.initialjfFile(l,a),ep()):$.post(t,{gridKey:ne.gridKey},function(d){let f=new Function("return "+d)();h.luckysheetfile=f,ve.initialjfFile(l,a),ep(),ne.allowUpdate&&ne.openWebSocket()})};gl.getluckysheetfile=Et;gl.getluckysheet_select_save=Pu;gl.setluckysheet_select_save=zu;gl.getconfig=Lu;gl.getGridData=ve.getGridData;gl.buildGridData=ve.buildGridData;gl.luckysheetrefreshgrid=Be;gl.jfrefreshgrid=Ze;gl.getcellvalue=ze;gl.setcellvalue=Ht;gl.getdatabyselection=Pt;gl.sheetmanage=ve;gl.flowdata=function(){return h.flowdata};gl.selectHightlightShow=lt;gl.destroy=Je.destroy;gl.showLoadingProgress=Fa;gl.hideLoadingProgress=_i;gl.luckysheetextendData=ko;gl.locales=ts});function zb(){HTMLElement.prototype.__defineGetter__("runtimeStyle",Ob),window.constructor.prototype.__defineGetter__("event",Bb),Event.prototype.__defineGetter__("srcElement",Hb)}function Ob(){return this.style}function Bb(){return lp()}function Hb(){return this.target}function lp(){if(document.all)return window.event;for(var e=lp.caller;e!=null;){var n=e.arguments[0];if(n){var t=n.constructor;if(t.toString().indexOf("Event")!=-1)return n}e=e.caller}return null}var rp,np=Ie(()=>{rp=zb});var Vb=vl(($L,ap)=>{ou();tp();np();window.addEventListener&&navigator.userAgent.indexOf("Firefox")>0&&rp();ap.exports=gl});return Vb();})(); |
| | | `),$("#luckysheet-sort-dialog table").data("itemcount",R)}),$("#luckysheet-sort-haveheader").change(function(){let x=h.luckysheet_select_save[0],C=x.row[0],S=x.row[1],_=x.column[0],T=x.column[1],A=$(this).is(":checked"),R="";for(let I=_;I<=T;I++)if(A){let F=ze(C,I,h.flowdata,"m");F==null&&(F=t.columnOperation+(I-_+1)),R+='<option value="'+I+'">'+F+"</option>"}else R+='<option value="'+I+'">'+tt(I)+"</option>";$("#luckysheet-sort-dialog tr select").each(function(){$(this).html(R)})}),$("#luckysheet-sort-modal-confirm").click(function(){if(h.luckysheet_select_save.length>1){fe()?alert(t.noRangeError):U.info(t.noRangeError,"");return}let x=xe.deepCopyFlowData(h.flowdata),C=h.luckysheet_select_save[0],S=C.row[0],_=C.row[1],T=C.column[0],A=C.column[1],R=$("#luckysheet-sort-haveheader").is(":checked"),I;R?I=S+1:I=S;let F=!1,z=[];for(let E=I;E<=_;E++){let N=[];for(let L=T;L<=A;L++){if(x[E][L]!=null&&x[E][L].mc!=null){F=!0;break}N.push(x[E][L])}z.push(N)}if(F){fe()?alert(t.mergeError):U.info(t.mergeError,"");return}$($("#luckysheet-sort-dialog table tr").toArray().reverse()).each(function(){let E=$(this).find("select").val(),N=$(this).find("input:radio:checked").val();E-=T,N=="asc"?N=!0:N=!1,z=Hr([].concat(z),E,N)});for(let E=I;E<=_;E++)for(let N=T;N<=A;N++)x[E][N]=z[E-I][N-T];let M={};if(h.config.rowlen!=null){let E=$.extend(!0,{},h.config);E=yl(x,I,_,E),M={cfg:E,RowlChange:!0}}Ze(x,[{row:[I,_],column:[T,A]}],M),$("#luckysheet-sort-dialog").hide(),$("#luckysheet-modal-dialog-mask").hide()})}let f="";for(let w=s;w<=u;w++)f+='<option value="'+w+'">'+tt(w)+"</option>";$("#luckysheet-sort-dialog select").html(f),$("#luckysheet-sort-dialog .luckysheet-sort-dialog-tr").remove(),$("#luckysheet-sort-haveheader").prop("checked",!1),$("#luckysheet-sort-dialog input:radio:first").prop("checked","checked"),$("#luckysheet-sort-dialog .luckysheet-modal-dialog-title-text").html(t.sortRangeTitle+"<span>"+tt(s)+(a+1)+"</span>"+t.sortRangeTitleTo+"<span>"+tt(u)+(o+1)+"</span>");let d=$("#luckysheet-sort-dialog"),m=d.outerHeight(),g=d.outerWidth(),y=$(window).width(),v=$(window).height(),b=$(document).scrollLeft(),k=$(document).scrollTop();$("#luckysheet-sort-dialog-tablec").css("max-height",(v-m)/2),$("#luckysheet-sort-dialog").css({left:(y+b-g)/2,top:(v+k-m)/2}).show(),$("#luckysheet-modal-dialog-mask").show(),a<o&&setTimeout(function(){let w=h.flowdata[a],x=h.flowdata[a+1],C=!1;for(let S=s;S<=u;S++){let _=tr(w[S]),T=tr(x[S]);_!=T&&(C=!0)}C&&$("#luckysheet-sort-haveheader").prop("checked",!0).change()},10)})}var Fm=Ie(()=>{Gt();Zt();Ml();ft();mr();Ft();Vr();Yt();Kt();ua();ll();Jt();Or();Xe();bt()});function Em(e,n){Ro($b),Io(Sb,null,function(){})}var Sb,$b,Nm=Ie(()=>{ft();Sb=["http://localhost:8080/luckysheetPluginPrint.umd.js"],$b=["http://localhost:8080/luckysheetPluginPrint.css"]});function Pm(e,n){e.length&&e.forEach(t=>{Ib[t](n,Rb)})}var Ib,Rb,Lm=Ie(()=>{$o();Nm();Ib={chart:Id,print:Em},Rb=!0});var j,Ui,Ab,zm,Om=Ie(()=>{xl();Oi();yc();Nt();il();uc();Ut();Li();Jt();Or();Ft();Yt();Al();ua();Kt();ft();Xe();j=Fl(vn()),Ui=Fl(sa()),Ab={SUM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else if(B(l))t.push(l);else if(P(l)=="boolean")l.toString().toLowerCase()=="true"?t.push(1):l.toString().toLowerCase()=="false"&&t.push(0);else return p.error.v}var a=0;if(t.length>0)for(var e=0;e<t.length;e++){if(H(t[e]))return t[e];!B(t[e])||(a=Tt(a,"+",t[e]))}return a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},AVERAGE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array")if(P(l[0])=="array"){if(!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else t=t.concat(l);else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"text",!0)):t.push(l)}for(var a=0,o=0,e=0;e<t.length;e++){if(H(t[e]))return t[e];if(!B(t[e]))return p.error.v;a=Tt(a,"+",t[e]),o++}return o==0?p.error.d:Tt(a,"/",o)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},COUNT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array")if(P(l[0])=="array"){if(!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else t=t.concat(l);else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"text",!0)):P(l)=="boolean"?l.toString().toLowerCase()=="true"?t.push(1):l.toString().toLowerCase()=="false"&&t.push(0):t.push(l)}for(var a=0,e=0;e<t.length;e++)B(t[e])&&a++;return a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},COUNTA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array")if(P(l[0])=="array"){if(!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l))}else t=t.concat(l);else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"text",!0)):t.push(l)}return t.length}catch(a){return a=p.errorInfo(a),[p.error.v,a]}},MAX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array")if(P(l[0])=="array"){if(!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else t=t.concat(l);else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!0)):t.push(l)}for(var a=null,e=0;e<t.length;e++){if(H(t[e]))return t[e];!B(t[e])||(a==null||parseFloat(t[e])>a)&&(a=parseFloat(t[e]))}return a==null?0:a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},MIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array")if(P(l[0])=="array"){if(!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else t=t.concat(l);else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!0)):t.push(l)}for(var a=null,e=0;e<t.length;e++){if(H(t[e]))return t[e];!B(t[e])||(a==null||parseFloat(t[e])<a)&&(a=parseFloat(t[e]))}return a==null?0:a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},AGE_BY_IDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!window.luckysheet_function.ISIDCARD.f(t))return p.error.v;var l=window.luckysheet_function.BIRTHDAY_BY_IDCARD.f(t);if(H(l))return l;l=(0,j.default)(l);var a=(0,j.default)();if(arguments.length==2){if(a=D.getFirstValue(arguments[1]),H(a))return a;a=(0,j.default)(a)}var o=a.diff(l,"years");return o<0||o.toString()=="NaN"?p.error.v:o}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},SEX_BY_IDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]).toString();return H(t)?t:window.luckysheet_function.ISIDCARD.f(t)?parseInt(t.substr(16,1))%2==1?"\u7537":"\u5973":p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},BIRTHDAY_BY_IDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]).toString();if(H(t))return t;if(!window.luckysheet_function.ISIDCARD.f(t))return p.error.v;var l="";if(t.length==15){var a="19"+t.substring(6,8)+"/"+t.substring(8,10)+"/"+t.substring(10,12);l=a}else if(t.length==18){var a=t.substring(6,10)+"/"+t.substring(10,12)+"/"+t.substring(12,14);l=a}var o=0;if(arguments[1]!=null&&(o=D.getFirstValue(arguments[1]),H(o)))return o;if(!B(o))return p.error.v;if(o=parseInt(o),o<0||o>2)return p.error.v;if(parseInt(o)==0)return l;if(parseInt(o)==1)return(0,j.default)(l).format("YYYY-MM-DD");if(parseInt(o)==2)return(0,j.default)(l).format("YYYY\u5E74M\u6708D\u65E5")}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},PROVINCE_BY_IDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]).toString();if(H(t))return t;if(!window.luckysheet_function.ISIDCARD.f(t))return p.error.v;var l="\u672A\u77E5",a=p.classlist.province;return t.substring(0,2)in a&&(l=a[t.substring(0,2)]),l}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},CITY_BY_IDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]).toString();if(H(t))return t;if(!window.luckysheet_function.ISIDCARD.f(t))return p.error.v;for(var l=cityData.length,a="\u672A\u77E5",e=0;e<l;e++)if(t.substring(0,6)==cityData[e].code){a=cityData[e].title;break}return a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},STAR_BY_IDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!window.luckysheet_function.ISIDCARD.f(t))return p.error.v;var l=window.luckysheet_function.BIRTHDAY_BY_IDCARD.f(t);if(H(l))return l;l=new Date(l);var a=l.getMonth(),o=l.getDate(),s=new Date(1999,a,o,0,0,0),u=[];u.push(["\u9B54\u7FAF\u5EA7",new Date(1999,0,1,0,0,0)]),u.push(["\u6C34\u74F6\u5EA7",new Date(1999,0,20,0,0,0)]),u.push(["\u53CC\u9C7C\u5EA7",new Date(1999,1,19,0,0,0)]),u.push(["\u767D\u7F8A\u5EA7",new Date(1999,2,21,0,0,0)]),u.push(["\u91D1\u725B\u5EA7",new Date(1999,3,21,0,0,0)]),u.push(["\u53CC\u5B50\u5EA7",new Date(1999,4,21,0,0,0)]),u.push(["\u5DE8\u87F9\u5EA7",new Date(1999,5,22,0,0,0)]),u.push(["\u72EE\u5B50\u5EA7",new Date(1999,6,23,0,0,0)]),u.push(["\u5904\u5973\u5EA7",new Date(1999,7,23,0,0,0)]),u.push(["\u5929\u79E4\u5EA7",new Date(1999,8,23,0,0,0)]),u.push(["\u5929\u874E\u5EA7",new Date(1999,9,23,0,0,0)]),u.push(["\u5C04\u624B\u5EA7",new Date(1999,10,22,0,0,0)]),u.push(["\u9B54\u7FAF\u5EA7",new Date(1999,11,22,0,0,0)]);for(var e=u.length-1;e>=0;e--)if(s>=u[e][1])return u[e][0];return"\u672A\u627E\u5230\u5339\u914D\u661F\u5EA7\u4FE1\u606F"}catch(d){var f=d;return f=p.errorInfo(f),[p.error.v,f]}},ANIMAL_BY_IDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!window.luckysheet_function.ISIDCARD.f(t))return p.error.v;var l=window.luckysheet_function.BIRTHDAY_BY_IDCARD.f(t);if(H(l))return l;l=new Date(l);var a=new Array("\u732A","\u9F20","\u725B","\u864E","\u5154","\u9F99","\u86C7","\u9A6C","\u7F8A","\u7334","\u9E21","\u72D7"),o=(parseInt(l.getFullYear())+9)%12;return o!=null&&!isNaN(o)?a[o]:"\u672A\u627E\u5230\u5339\u914D\u751F\u8096\u4FE1\u606F"}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},ISIDCARD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;return!!l.test(t)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},DM_TEXT_CUTWORD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0],"text");if(H(o))return o;var s=0;return arguments[1]!=null&&(s=D.getFirstValue(arguments[1]),H(s))?s:B(s)?(s=parseInt(s),s!=0&&s!=1&&s!=2?p.error.v:($.post("/dataqk/tu/api/cutword",{text:o,type:s},function(f){var d=[].concat(h.flowdata);p.execFunctionGroup(t,l,f),d[t][l]={v:f,f:a},Ze(d,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},DM_TEXT_TFIDF:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0],"text");if(H(o))return o;var s=20;if(arguments[1]!=null&&(s=D.getFirstValue(arguments[1]),H(s)))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=0;return arguments[2]!=null&&(u=D.getFirstValue(arguments[2]),H(u))?u:B(u)?(u=parseInt(u),s<0?p.error.v:u!=0&&u!=1&&u!=2?p.error.v:($.post("/dataqk/tu/api/tfidf",{text:o,count:s,set:u},function(d){var m=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(t,l,d),m[t][l]={v:d,f:a},Ze(m,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(d){var f=d;return f=p.errorInfo(f),[p.error.v,f]}},DM_TEXT_TEXTRANK:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0],"text");if(H(o))return o;var s=20;if(arguments[1]!=null&&(s=D.getFirstValue(arguments[1]),H(s)))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=0;return arguments[2]!=null&&(u=D.getFirstValue(arguments[2]),H(u))?u:B(u)?(u=parseInt(u),s<0?p.error.v:u!=0&&u!=1&&u!=2?p.error.v:($.post("/dataqk/tu/api/tfidf",{text:o,count:s,set:u},function(d){var m=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(t,l,d),m[t][l]={v:d,f:a},Ze(m,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(d){var f=d;return f=p.errorInfo(f),[p.error.v,f]}},DATA_CN_STOCK_CLOSE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0]);if(H(o))return o;var s=null;if(arguments[1]!=null){var u=arguments[1];if(P(u)=="array")return p.error.v;if(P(u)=="object"&&u.startCell!=null)if(u.data!=null&&P(u.data)!="array"&&u.data.ct!=null&&u.data.ct.t=="d")s=mt("yyyy-mm-dd",u.data.v);else return p.error.v;else s=u;if(!Lt(s))return[p.error.v,"\u65E5\u671F\u9519\u8BEF"];s=(0,j.default)(s).format("YYYY-MM-DD")}var f=0;return arguments[2]!=null&&(f=D.getFirstValue(arguments[2]),H(f))?f:B(f)?(f=parseInt(f),f!=0&&f!=1&&f!=2?p.error.v:($.post("/dataqk/tu/api/getstockinfo",{stockCode:o,date:s,price:f,type:"0"},function(m){var g=xe.deepCopyFlowData(h.flowdata),y=Il(m);y==null&&(y=m),p.execFunctionGroup(t,l,y),g[t][l]={v:y,f:a},Ze(g,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},DATA_CN_STOCK_OPEN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0]);if(H(o))return o;var s=null;if(arguments[1]!=null){var u=arguments[1];if(P(u)=="array")return p.error.v;if(P(u)=="object"&&u.startCell!=null)if(u.data!=null&&P(u.data)!="array"&&u.data.ct!=null&&u.data.ct.t=="d")s=mt("yyyy-mm-dd",u.data.v);else return p.error.v;else s=u;if(!Lt(s))return[p.error.v,"\u65E5\u671F\u9519\u8BEF"];s=(0,j.default)(s).format("YYYY-MM-DD")}var f=0;return arguments[2]!=null&&(f=D.getFirstValue(arguments[2]),H(f))?f:B(f)?(f=parseInt(f),f!=0&&f!=1&&f!=2?p.error.v:($.post("/dataqk/tu/api/getstockinfo",{stockCode:o,date:s,price:f,type:"1"},function(m){var g=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(t,l,m),g[t][l]={v:m,f:a},Ze(g,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},DATA_CN_STOCK_MAX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0]);if(H(o))return o;var s=null;if(arguments[1]!=null){var u=arguments[1];if(P(u)=="array")return p.error.v;if(P(u)=="object"&&u.startCell!=null)if(u.data!=null&&P(u.data)!="array"&&u.data.ct!=null&&u.data.ct.t=="d")s=mt("yyyy-mm-dd",u.data.v);else return p.error.v;else s=u;if(!Lt(s))return[p.error.v,"\u65E5\u671F\u9519\u8BEF"];s=(0,j.default)(s).format("YYYY-MM-DD")}var f=0;return arguments[2]!=null&&(f=D.getFirstValue(arguments[2]),H(f))?f:B(f)?(f=parseInt(f),f!=0&&f!=1&&f!=2?p.error.v:($.post("/dataqk/tu/api/getstockinfo",{stockCode:o,date:s,price:f,type:"2"},function(m){var g=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(t,l,m),g[t][l]={v:m,f:a},Ze(g,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},DATA_CN_STOCK_MIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0]);if(H(o))return o;var s=null;if(arguments[1]!=null){var u=arguments[1];if(P(u)=="array")return p.error.v;if(P(u)=="object"&&u.startCell!=null)if(u.data!=null&&P(u.data)!="array"&&u.data.ct!=null&&u.data.ct.t=="d")s=mt("yyyy-mm-dd",u.data.v);else return p.error.v;else s=u;if(!Lt(s))return[p.error.v,"\u65E5\u671F\u9519\u8BEF"];s=(0,j.default)(s).format("YYYY-MM-DD")}var f=0;return arguments[2]!=null&&(f=D.getFirstValue(arguments[2]),H(f))?f:B(f)?(f=parseInt(f),f!=0&&f!=1&&f!=2?p.error.v:($.post("/dataqk/tu/api/getstockinfo",{stockCode:o,date:s,price:f,type:"3"},function(m){var g=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(t,l,m),g[t][l]={v:m,f:a},Ze(g,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},DATA_CN_STOCK_VOLUMN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0]);if(H(o))return o;var s=null;if(arguments[1]!=null){var u=arguments[1];if(P(u)=="array")return p.error.v;if(P(u)=="object"&&u.startCell!=null)if(u.data!=null&&P(u.data)!="array"&&u.data.ct!=null&&u.data.ct.t=="d")s=mt("yyyy-mm-dd",u.data.v);else return p.error.v;else s=u;if(!Lt(s))return[p.error.v,"\u65E5\u671F\u9519\u8BEF"];s=(0,j.default)(s).format("YYYY-MM-DD")}var f=0;return arguments[2]!=null&&(f=D.getFirstValue(arguments[2]),H(f))?f:B(f)?(f=parseInt(f),f!=0&&f!=1&&f!=2?p.error.v:($.post("/dataqk/tu/api/getstockinfo",{stockCode:o,date:s,price:f,type:"4"},function(m){var g=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(t,l,m),g[t][l]={v:m,f:a},Ze(g,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},DATA_CN_STOCK_AMOUNT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=D.getFirstValue(arguments[0]);if(H(o))return o;var s=null;if(arguments[1]!=null){var u=arguments[1];if(P(u)=="array")return p.error.v;if(P(u)=="object"&&u.startCell!=null)if(u.data!=null&&P(u.data)!="array"&&u.data.ct!=null&&u.data.ct.t=="d")s=mt("yyyy-mm-dd",u.data.v);else return p.error.v;else s=u;if(!Lt(s))return[p.error.v,"\u65E5\u671F\u9519\u8BEF"];s=(0,j.default)(s).format("YYYY-MM-DD")}var f=0;return arguments[2]!=null&&(f=D.getFirstValue(arguments[2]),H(f))?f:B(f)?(f=parseInt(f),f!=0&&f!=1&&f!=2?p.error.v:($.post("/dataqk/tu/api/getstockinfo",{stockCode:o,date:s,price:f,type:"5"},function(m){var g=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(t,l,m),g[t][l]={v:m,f:a},Ze(g,[{row:[t,t],column:[l,l]}])}),"loading...")):p.error.v}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},ISDATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:Lt(t)}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},SUMIF:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=0,l=arguments[0].data,a=arguments[0].rowl,o=arguments[0].coll,s=Xa(arguments[1]);if(l=p.getRangeArray(l)[0],arguments[2]){var u=[],f=arguments[2].startCell,d=arguments[2].rowl,m=arguments[2].coll,g=arguments[2].sheetName;if(a==d&&o==m)u=arguments[2].data;else{var y=[],v=[],b="",k="";y[0]=parseInt(f.replace(/[^0-9]/g,""))-1,v[0]=hl(f.replace(/[^A-Za-z]/g,"")),y[1]=y[0]+a-1,v[1]=v[0]+o-1;var w=tt(v[1]),x=y[1]+1;b=w+x,k=g+"!"+f+":"+b,u=ar(k).data}u=p.getRangeArray(u)[0];for(var e=0;e<l.length;e++){var C=l[e];if(!!C&&p.acompareb(C,s)){if(!B(u[e]))continue;t=Tt(t,"+",u[e])}}}else for(var e=0;e<l.length;e++){var C=l[e];if(!!C&&p.acompareb(C,s)){if(!B(C))continue;t=Tt(t,"",C)}}return t}catch(_){var S=_;return S=p.errorInfo(S),[p.error.v,S]}},TAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),Math.tan(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},TANH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=Math.exp(2*t);return(l-1)/(l+1)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},CEILING:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),l==0?0:t>0&&l<0?p.error.nm:Math.ceil(t/l)*l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ATAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),Math.atan(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ASINH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),Math.log(t+Math.sqrt(t*t+1))):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ABS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),Math.abs(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ACOS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<-1||t>1?p.error.nm:Math.acos(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ACOSH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<1?p.error.nm:Math.log(t+Math.sqrt(t*t-1))):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},MULTINOMIAL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!0)):t.push(l)}for(var a=0,o=1,e=0;e<t.length;e++){var s=t[e];if(!B(s))return p.error.v;if(s=parseFloat(s),s<0)return p.error.nm;a+=s,o*=D.factorial(s)}return D.factorial(a)/o}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},ATANH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<=-1||t>=1?p.error.nm:Math.log((1+t)/(1-t))/2):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ATAN2:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t==0&&l==0?p.error.d:Math.atan2(l,t)):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},COUNTBLANK:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=0;if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return 1;if(P(t.data)=="array")for(var a=0;a<t.data.length;a++)for(var o=0;o<t.data[a].length;o++)(t.data[a][o]==null||me(t.data[a][o].v))&&l++;else me(t.data.v)&&l++}return l}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},COSH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),(Math.exp(t)+Math.exp(-t))/2):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},INT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0];if(P(t)=="array")return P(t[0])=="array"?D.isDyadicArr(t)?B(t[0][0])?Math.floor(parseFloat(t[0][0])):p.error.v:p.error.v:B(t[0])?Math.floor(parseFloat(t[0])):p.error.v;if(P(t)=="object"&&t.startCell!=null){if(t.coll>1)return p.error.v;if(t.rowl>1){var l=p.getcellrange(t.startCell),a=l.row[0];if(window.luckysheetCurrentRow<a||window.luckysheetCurrentRow>a+t.rowl-1)return p.error.v;var o=t.data[window.luckysheetCurrentRow-a][0]}else var o=t.data;return o==null||me(o.v)?0:B(o.v)?Math.floor(parseFloat(o.v)):p.error.v}else{if(P(t)=="boolean"){if(t.toString().toLowerCase()=="true")return 1;if(t.toString().toLowerCase()=="false")return 0}return B(t)?Math.floor(parseFloat(t)):p.error.v}}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},ISEVEN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseInt(t),!(Math.abs(t)&1)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ISODD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseInt(t),!!(Math.abs(t)&1)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},LCM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array")if(P(l[0])=="array"){if(!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l))}else t=t.concat(l);else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!0)):t.push(l)}for(var a=0;a<t.length;a++){var o=t[a];if(!B(o))return p.error.v;if(o=parseInt(o),o<0)return p.error.nm;t[a]=o}for(var e,s,u,f,d=1;(u=t.pop())!==void 0;)for(u==0&&(d=0);u>1;){if(u%2){for(e=3,s=Math.floor(Math.sqrt(u));e<=s&&u%e;e+=2);f=e<=s?e:u}else f=2;for(u/=f,d*=f,e=t.length;e;t[--e]%f==0&&(t[e]/=f)===1&&t.splice(e,1));}return d>=Math.pow(2,53)?p.error.nm:d}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},LN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<=0?p.error.nm:Math.log(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},LOG:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;if(t=parseFloat(t),t<=0)return p.error.nm;if(arguments.length==2){var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;if(l=parseFloat(l),l<=0)return p.error.nm}else var l=10;return Math.log(t)/Math.log(l)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},LOG10:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<=0?p.error.nm:Math.log(t)/Math.log(10)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},MOD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;if(l=parseFloat(l),l==0)return p.error.d;var a=Math.abs(t%l);return l>0?a:-a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},MROUND:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t*l<0?p.error.nm:Math.round(t/l)*l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ODD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=Math.ceil(Math.abs(t));return l=l&1?l:l+1,t>=0?l:-l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},SUMSQ:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!0)):t.push(l)}var a=0;if(t.length>0)for(var e=0;e<t.length;e++){var o=t[e];if(!B(o))return p.error.v;o=parseFloat(o),a+=o*o}return a}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},COMBIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t<0||l<0||t<l?p.error.nm:D.factorial(t)/(D.factorial(l)*D.factorial(t-l))):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},SUBTOTAL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let m=function(g){switch(g){case 1:case 101:return window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE,s);case 2:case 102:return window.luckysheet_function.COUNT.f.apply(window.luckysheet_function.COUNT,s);case 3:case 103:return window.luckysheet_function.COUNTA.f.apply(window.luckysheet_function.COUNTA,s);case 4:case 104:return window.luckysheet_function.MAX.f.apply(window.luckysheet_function.MAX,s);case 5:case 105:return window.luckysheet_function.MIN.f.apply(window.luckysheet_function.MIN,s);case 6:case 106:return window.luckysheet_function.PRODUCT.f.apply(window.luckysheet_function.PRODUCT,s);case 7:case 107:return window.luckysheet_function.STDEVA.f.apply(window.luckysheet_function.STDEVA,s);case 8:case 108:return window.luckysheet_function.STDEVP.f.apply(window.luckysheet_function.STDEVP,s);case 9:case 109:return window.luckysheet_function.SUM.f.apply(window.luckysheet_function.SUM,s);case 10:case 110:return window.luckysheet_function.VAR_S.f.apply(window.luckysheet_function.VAR_S,s);case 11:case 111:return window.luckysheet_function.VAR_P.f.apply(window.luckysheet_function.VAR_P,s)}};var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=[];for(var e=0;e<t.length;e++){for(var a=[],o=0;o<t[e].length;o++)a.push(t[e][o]);l.push(a)}}else{l=[];for(var e=0;e<t.length;e++)l.push(t[e])}else P(t)=="object"&&t.startCell!=null?l=D.getFirstValue(t):l=t;var s=Array.prototype.slice.apply(arguments);if(s.shift(),P(l)=="array"){var u=[];if(P(l[0])=="array")for(var e=0;e<l.length;e++){for(var a=[],o=0;o<l[e].length;o++){var f=l[e][o];H(f)?a.push(f):B(f)?(f=parseInt(f),f<1||f>111||f>11&&f<101?a.push(p.error.v):a.push(m(f))):a.push(p.error.v)}u.push(a)}else for(var e=0;e<l.length;e++){var f=l[e];H(f)?u.push(f):B(f)?(f=parseInt(f),f<1||f>111||f>11&&f<101?u.push(p.error.v):u.push(m(f))):u.push(p.error.v)}return u}else return H(l)?l:B(l)?(l=parseInt(l),l<1||l>111||l>11&&l<101?p.error.v:m(l)):p.error.v}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},ASIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<-1||t>1?p.error.nm:Math.asin(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},COUNTIF:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let m=function(g,y){/[<>=!*?]/.test(y)||(y='=="'+y+'"'),y=y.replace("<>","!=");var v=0;if(P(g)=="array"){for(var b=0;b<g.length;b++)for(var k=0;k<g[b].length;k++)if(g[b][k]!=null&&!me(g[b][k].v)){var w=g[b][k].v;y.indexOf("*")>-1||y.indexOf("?")>-1?p.isWildcard(w,y)&&v++:typeof w!="string"?new Function("return "+w+y)()&&v++:new Function('return "'+w+'"'+y)()&&v++}}else if(g!=null&&!me(g.v)){var w=g.v;y.indexOf("*")>-1||y.indexOf("?")>-1?p.isWildcard(w,y)&&v++:typeof w!="string"?new Function("return "+w+y)()&&v++:new Function('return "'+w+'"'+y)()&&v++}return v};var t=arguments[0],l;if(P(t)=="object"&&t.startCell!=null)l=t.data;else return p.error.v;var a=arguments[1],o;if(P(a)=="array")if(o=[],P(a[0])=="array"){if(!D.isDyadicArr(a))return p.error.v;for(var e=0;e<a.length;e++){for(var s=[],u=0;u<a[e].length;u++)s.push(a[e][u]);o.push(s)}}else for(var e=0;e<a.length;e++)o.push(a[e]);else if(P(a)=="object"&&a.startCell!=null){if(a.rowl>1||a.coll>1)return 0;o=a.data.v}else o=a;if(P(o)=="array"){var f=[];if(P(o[0])=="array")for(var e=0;e<o.length;e++){for(var s=[],u=0;u<o[e].length;u++)s.push(m(l,o[e][u]));f.push(s)}else for(var e=0;e<o.length;e++)f.push(m(l,o[e]));return f}else return m(l,o)}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},RADIANS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t*Math.PI/180):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},RAND:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;try{return Math.floor(Math.random()*1e9)/1e9}catch(n){var e=n;return e=p.errorInfo(e),[p.error.v,e]}},COUNTUNIQUE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"text",!0)):t.push(l)}return window.luckysheet_function.UNIQUE.f(t)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},DEGREES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t*180/Math.PI):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ERFC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),jStat.erfc(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},EVEN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=Math.ceil(Math.abs(t));return l=l&1?l+1:l,t>0?l:-l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},EXP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),Math.exp(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},FACT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))if(P(t)=="boolean")t.toString().toLowerCase()=="true"?t=1:t.toString().toLowerCase()=="false"&&(t=0);else return p.error.v;return t=parseInt(t),t<0?p.error.nm:D.factorial(t)}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},FACTDOUBLE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))if(P(t)=="boolean")t.toString().toLowerCase()=="true"?t=1:t.toString().toLowerCase()=="false"&&(t=0);else return p.error.v;return t=parseInt(t),t<0?p.error.nm:D.factorialDouble(t)}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},PI:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;try{return Math.PI}catch(n){var e=n;return e=p.errorInfo(e),[p.error.v,e]}},FLOOR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;if(l=parseFloat(l),l==0)return p.error.d;if(t>0&&l<0)return p.error.nm;var a=-Math.floor(Math.log(Math.abs(l))/Math.log(10));return t>=0?Math.floor(t/l)*l*Math.pow(10,a)/Math.pow(10,a):-(Math.ceil(Math.abs(t)/l)*l*Math.pow(10,a))/Math.pow(10,a)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},GCD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!1))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!1)):t.push(l)}if(!B(t[0]))return p.error.v;var a=parseInt(t[0]);if(a<0||a>=Math.pow(2,53))return p.error.nm;for(var e=1;e<t.length;e++){var o=t[e];if(!B(o))return p.error.v;if(o=parseInt(o),o<0||o>=Math.pow(2,53))return p.error.nm;for(;a&&o;)a>o?a%=o:o%=a;a+=o}return a}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},RANDBETWEEN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t>l?p.error.nm:t+Math.ceil((l-t+1)*Math.random())-1):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ROUND:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=t>0?1:-1;return a*Math.round(Math.abs(t)*Math.pow(10,l))/Math.pow(10,l)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},ROUNDDOWN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=t>0?1:-1;return a*Math.floor(Math.abs(t)*Math.pow(10,l))/Math.pow(10,l)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},ROUNDUP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=t>0?1:-1;return a*Math.ceil(Math.abs(t)*Math.pow(10,l))/Math.pow(10,l)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},SERIESSUM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=arguments[3],s=[];if(P(o)=="array"){if(P(o[0])=="array"&&!D.isDyadicArr(o))return p.error.v;s=s.concat(D.getDataArr(o,!1))}else P(o)=="object"&&o.startCell!=null?s=s.concat(D.getCellDataArr(o,"number",!1)):s.push(o);if(!B(s[0]))return p.error.v;for(var u=parseFloat(s[0])*Math.pow(t,l),e=1;e<s.length;e++){var f=s[e];if(!B(f))return p.error.v;f=parseFloat(f),u+=f*Math.pow(t,l+e*a)}return u}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},SIGN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;if(t=parseFloat(t),t>0)return 1;if(t==0)return 0;if(t<0)return-1}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},SIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),Math.sin(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},SINH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),(Math.exp(t)-Math.exp(-t))/2):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},SQRT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<0?p.error.nm:Math.sqrt(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},SQRTPI:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<0?p.error.nm:Math.sqrt(t*Math.PI)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},GAMMALN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<=0?p.error.nm:jStat.gammaln(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},COS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),Math.cos(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},TRUNC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;if(t=parseFloat(t),arguments.length==2){var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}else var l=0;var a=t>0?1:-1;return a*Math.floor(Math.abs(t)*Math.pow(10,l))/Math.pow(10,l)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},QUOTIENT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),l==0?p.error.d:parseInt(t/l,10)):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},POWER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t==0&&l==0?p.error.nm:t<0&&l.toString().indexOf(".")>-1?p.error.nm:Math.pow(t,l)):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},SUMIFS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=0,l=arguments;Wn(l);for(var a=p.getRangeArray(l[0])[0],o=new Array(a.length),e=0;e<o.length;e++)o[e]=!0;for(var e=1;e<l.length;e+=2)for(var s=p.getRangeArray(l[e])[0],u=l[e+1],f=0;f<s.length;f++){var d=s[f];o[f]=o[f]&&!!d&&p.acompareb(d,u)}for(var e=0;e<a.length;e++)o[e]&&(t=Tt(t,"+",a[e]));return t}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},COUNTIFS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments;Wn(t);for(var l=new Array(p.getRangeArray(t[0])[0].length),e=0;e<l.length;e++)l[e]=!0;for(var e=0;e<t.length;e+=2)for(var a=p.getRangeArray(t[e])[0],o=t[e+1],s=0;s<a.length;s++){var u=a[s];l[s]=l[s]&&!!u&&p.acompareb(u,o)}for(var f=0,e=0;e<l.length;e++)l[e]&&f++;return f}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},PRODUCT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!0)):t.push(l)}for(var a=1,e=0;e<t.length;e++){var o=t[e];if(!B(o))return p.error.v;o=parseFloat(o),a*=o}return a}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},HARMEAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"number",!0)):t.push(l)}for(var a=0,o=0,e=0;e<t.length;e++){var s=t[e];if(!B(s))return p.error.v;if(s=parseFloat(s),s<=0)return p.error.nm;a+=1/s,o++}return o/a}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},HYPGEOMDIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let f=function(m,g,y,v){var b=D.factorial(y)/(D.factorial(m)*D.factorial(y-m)),k=D.factorial(v-y)/(D.factorial(g-m)*D.factorial(v-y-g+m)),w=D.factorial(v)/(D.factorial(g)*D.factorial(v-g));return b*k/w},d=function(m,g,y,v){for(var b=0,k=0;k<=m;k++)b+=f(k,g,y,v);return b};var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseInt(o);var s=D.getCellBoolen(arguments[4]);return H(s)?s:t<0||t>Math.min(l,a)||t<Math.max(0,l-o+a)?p.error.nm:l<=0||l>o?p.error.nm:a<=0||a>o?p.error.nm:o<=0?p.error.nm:s?d(t,l,a,o):f(t,l,a,o)}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},INTERCEPT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=0,l=arguments[0],a=[];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;a=a.concat(D.getDataArr(l,!1))}else P(l)=="object"&&l.startCell!=null?a=a.concat(D.getCellDataArr(l,"text",!1)):a.push(l);var o=arguments[1],s=[];if(P(o)=="array"){if(P(o[0])=="array"&&!D.isDyadicArr(o))return p.error.v;s=s.concat(D.getDataArr(o,!1))}else P(o)=="object"&&o.startCell!=null?s=s.concat(D.getCellDataArr(o,"text",!1)):s.push(o);if(a.length!=s.length)return p.error.na;for(var u=[],f=[],e=0;e<a.length;e++){var d=a[e],m=s[e];B(d)&&B(m)&&(u.push(parseFloat(d)),f.push(parseFloat(m)))}if(D.variance_s(f)==0)return p.error.d;for(var g=jStat.mean(f),y=jStat.mean(u),v=f.length,b=0,k=0,e=0;e<v;e++)b+=(f[e]-g)*(u[e]-y),k+=Math.pow(f[e]-g,2);var w=b/k,x=y-w*g;return x+w*t}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},KURT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"text",!0)):t.push(l)}for(var a=[],o=0;o<t.length;o++){var s=t[o];if(!B(s))return p.error.v;s=parseFloat(s),a.push(s)}if(a.length<4||D.standardDeviation_s(a)==0)return p.error.d;for(var u=jStat.mean(a),f=a.length,d=0,e=0;e<f;e++)d+=Math.pow(a[e]-u,4);return d=d/Math.pow(jStat.stdev(a,!0),4),f*(f+1)/((f-1)*(f-2)*(f-3))*d-3*(f-1)*(f-1)/((f-2)*(f-3))}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},LARGE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!0))}else P(arguments[0])=="object"&&arguments[0].startCell!=null?t=t.concat(D.getCellDataArr(arguments[0],"text",!0)):t.push(arguments[0]);for(var l=[],a=0;a<t.length;a++){var o=t[a];if(!B(o))return p.error.v;o=parseFloat(o),l.push(o)}var s;if(P(arguments[1])=="array"){if(P(arguments[1][0])=="array"&&!D.isDyadicArr(arguments[1]))return p.error.v;s=D.getDataArr(arguments[1])}else if(P(arguments[1])=="object"&&arguments[1].startCell!=null){if(arguments[1].rowl>1||arguments[1].coll>1)return p.error.v;var u=arguments[1].data;if(u==null||me(u.v))var s=0;else var s=u.v}else s=arguments[1];if(P(s)=="array"){if(l.length==0)return p.error.nm;for(var f=[],e=0;e<s.length;e++){if(!B(s[e])){f.push(p.error.v);continue}if(s[e]=Math.ceil(parseFloat(s[e])),s[e]<=0||s[e]>l.length){f.push(p.error.nm);continue}f.push(t.sort(function(g,y){return y-g})[s[e]-1])}return f}else return B(s)?(s=Math.ceil(parseFloat(s)),l.length==0?p.error.nm:s<=0||s>l.length?p.error.nm:t.sort(function(m,g){return g-m})[s-1]):p.error.v}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},STDEVA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!1))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"text",!1)):t.push(l)}for(var a=[],o=0;o<t.length;o++){var s=t[o];B(s)?s=parseFloat(s):s.toString().toLowerCase()=="true"?s=1:s=0,a.push(s)}return a.length==0?0:a.length==1?p.error.d:D.standardDeviation_s(a)}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},STDEVP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?t=t.concat(D.getCellDataArr(l,"text",!0)):t.push(l)}for(var a=[],o=0;o<t.length;o++){var s=t[o];if(!B(s))return p.error.v;s=parseFloat(s),a.push(s)}return a.length==0?0:a.length==1?p.error.d:D.standardDeviation(a)}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},GEOMEAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"text",!0));else if(P(l)=="boolean")l.toString().toLowerCase()=="true"?t.push(1):l.toString().toLowerCase()=="false"&&t.push(0);else if(B(l))t.push(l);else return p.error.v}for(var a=[],o=0;o<t.length;o++){var s=t[o];if(!!B(s)){if(s=parseFloat(s),s<=0)return p.error.nm;a.push(s)}}return a.length==0?p.error.nm:jStat.geomean(a)}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},RANK_EQ:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=arguments[1],a=[];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;a=a.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?a=a.concat(D.getCellDataArr(l,"number",!0)):a.push(l);for(var o=[],s=0;s<a.length;s++){var u=a[s];if(!B(u))return p.error.v;u=parseFloat(u),o.push(u)}if(arguments.length==3){var f=D.getCellBoolen(arguments[2]);if(H(f))return f}else var f=!1;var d=f?function(y,v){return y-v}:function(y,v){return v-y};o=o.sort(d);var m=o.indexOf(t);return m==-1?p.error.na:m+1}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},RANK_AVG:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=arguments[1],a=[];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;a=a.concat(D.getDataArr(l,!0))}else P(l)=="object"&&l.startCell!=null?a=a.concat(D.getCellDataArr(l,"number",!0)):a.push(l);for(var o=[],s=0;s<a.length;s++){var u=a[s];if(!B(u))return p.error.v;u=parseFloat(u),o.push(u)}if(arguments.length==3){var f=D.getFirstValue(arguments[2]);if(H(f))return f;if(P(f)!="boolean")if(P(f)=="string"&&(f.toLowerCase()=="true"||f.toLowerCase()=="false"))f.toLowerCase()=="true"&&(f=!0),f.toLowerCase()=="false"&&(f=!1);else if(B(f))f=parseFloat(f),f=f!=0;else return p.error.v}else var f=!1;var d=f?function(y,v){return y-v}:function(y,v){return v-y};o=o.sort(d);for(var m=0,e=0;e<o.length;e++)o[e]==t&&m++;return m>1?(2*o.indexOf(t)+m+1)/2:o.indexOf(t)+1}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},PERCENTRANK_EXC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!0))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!0)):l.push(t);for(var a=[],o=0;o<l.length;o++){var s=l[o];if(!B(s))return p.error.v;s=parseFloat(s),a.push(s)}var u=D.getFirstValue(arguments[1]);if(H(u))return u;if(!B(u))return p.error.v;if(u=parseFloat(u),arguments.length==3){var f=D.getFirstValue(arguments[2]);if(H(f))return f;if(!B(f))return p.error.v;f=parseInt(f)}else var f=3;if(a.length==0)return p.error.nm;if(f<1)return p.error.nm;if(a.length==1&&a[0]==u)return 1;a=a.sort(function(x,C){return x-C});for(var d=window.luckysheet_function.UNIQUE.f(a)[0],m=a.length,g=d.length,y=Math.pow(10,f),v=0,b=!1,e=0;!b&&e<g;)u===d[e]?(v=(a.indexOf(d[e])+1)/(m+1),b=!0):u>=d[e]&&(u<d[e+1]||e===g-1)&&(v=(a.lastIndexOf(d[e])+1+(u-d[e])/(d[e+1]-d[e]))/(m+1),b=!0),e++;return isNaN(v)?p.error.na:Math.floor(v*y)/y}catch(w){var k=w;return k=p.errorInfo(k),[p.error.v,k]}},PERCENTRANK_INC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!0))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!0)):l.push(t);for(var a=[],o=0;o<l.length;o++){var s=l[o];if(!B(s))return p.error.v;s=parseFloat(s),a.push(s)}var u=D.getFirstValue(arguments[1]);if(H(u))return u;if(!B(u))return p.error.v;if(u=parseFloat(u),arguments.length==3){var f=D.getFirstValue(arguments[2]);if(H(f))return f;if(!B(f))return p.error.v;f=parseInt(f)}else var f=3;if(a.length==0)return p.error.nm;if(f<1)return p.error.nm;if(a.length==1&&a[0]==u)return 1;a=a.sort(function(x,C){return x-C});for(var d=window.luckysheet_function.UNIQUE.f(a)[0],m=a.length,g=d.length,y=Math.pow(10,f),v=0,b=!1,e=0;!b&&e<g;)u===d[e]?(v=a.indexOf(d[e])/(m-1),b=!0):u>=d[e]&&(u<d[e+1]||e===g-1)&&(v=(a.lastIndexOf(d[e])+(u-d[e])/(d[e+1]-d[e]))/(m-1),b=!0),e++;return isNaN(v)?p.error.na:Math.floor(v*y)/y}catch(w){var k=w;return k=p.errorInfo(k),[p.error.v,k]}},FORECAST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=arguments[1],a=[];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;a=a.concat(D.getDataArr(l,!1))}else P(l)=="object"&&l.startCell!=null?a=a.concat(D.getCellDataArr(l,"text",!1)):a.push(l);var o=arguments[2],s=[];if(P(o)=="array"){if(P(o[0])=="array"&&!D.isDyadicArr(o))return p.error.v;s=s.concat(D.getDataArr(o,!1))}else P(o)=="object"&&o.startCell!=null?s=s.concat(D.getCellDataArr(o,"text",!1)):s.push(o);if(a.length!=s.length)return p.error.na;for(var u=[],f=[],e=0;e<a.length;e++){var d=a[e],m=s[e];B(d)&&B(m)&&(u.push(parseFloat(d)),f.push(parseFloat(m)))}if(D.variance_s(f)==0)return p.error.d;for(var g=jStat.mean(f),y=jStat.mean(u),v=f.length,b=0,k=0,e=0;e<v;e++)b+=(f[e]-g)*(u[e]-y),k+=Math.pow(f[e]-g,2);var w=b/k,x=y-w*g;return x+w*t}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},FISHERINV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=Math.exp(2*t);return(l-1)/(l+1)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},FISHER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<=-1||t>=1?p.error.nm:Math.log((1+t)/(1-t))/2):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},MODE_SNGL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else{if(!B(l))return p.error.v;t.push(l)}}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}for(var s={},u=[],f=0,d,e=0;e<a.length;e++)d=a[e],s[d]=s[d]?s[d]+1:1,s[d]>f&&(f=s[d],u=[]),s[d]==f&&(u[u.length]=d);if(f<=1)return p.error.na;for(var m=a.indexOf(u[0]),g=0;g<u.length;g++){var y=a.indexOf(u[g]);y<m&&(m=y)}return a[m]}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},WEIBULL_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getCellBoolen(arguments[3]);return H(o)?o:t<0||l<=0||a<=0?p.error.nm:o?1-Math.exp(-Math.pow(t/a,l)):Math.pow(t,l-1)*Math.exp(-Math.pow(t/a,l))*l/Math.pow(a,l)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},AVEDEV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else{if(!B(l))return p.error.v;t.push(l)}}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}return a.length==0?p.error.nm:jStat.sum(jStat(a).subtract(jStat.mean(a)).abs()[0])/a.length}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},AVERAGEA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!1))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else if(s.toString.toLowerCase()=="true")t.push(1);else if(s.toString.toLowerCase()=="false")t.push(0);else if(B(l))t.push(l);else return p.error.v}for(var a=0,o=0,e=0;e<t.length;e++){var s=t[e];B(s)?a+=parseFloat(s):s.toString().toLowerCase()=="true"?a+=1:a+=0,o++}return o==0?p.error.d:a/o}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},BINOM_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getCellBoolen(arguments[3]);return H(o)?o:t<0||t>l?p.error.nm:a<0||a>1?p.error.nm:o?jStat.binomial.cdf(t,l,a):jStat.binomial.pdf(t,l,a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},BINOM_INV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;if(a=parseFloat(a),t<0)return p.error.nm;if(l<0||l>1)return p.error.nm;if(a<0||a>1)return p.error.nm;for(var o=0;o<=t;){if(jStat.binomial.cdf(o,t,l)>=a)return o;o++}}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},CONFIDENCE_NORM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseInt(a),t<=0||t>=1?p.error.nm:l<=0?p.error.nm:a<1?p.error.nm:jStat.normalci(1,t,l,a)[1]-1):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},CORREL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"text",!1)):l.push(t);var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?o=o.concat(D.getCellDataArr(a,"text",!1)):o.push(a);if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var f=l[e],d=o[e];B(f)&&B(d)&&(s.push(parseFloat(f)),u.push(parseFloat(d)))}return s.length==0||u.length==0||D.standardDeviation(s)==0||D.standardDeviation(u)==0?p.error.d:jStat.corrcoeff(s,u)}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},COVARIANCE_P:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"text",!1)):l.push(t);var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?o=o.concat(D.getCellDataArr(a,"text",!1)):o.push(a);if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var f=l[e],d=o[e];B(f)&&B(d)&&(s.push(parseFloat(f)),u.push(parseFloat(d)))}if(s.length==0||u.length==0)return p.error.d;for(var m=jStat.mean(s),g=jStat.mean(u),y=0,e=0;e<s.length;e++)y+=(s[e]-m)*(u[e]-g);return y=y/s.length,y}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},COVARIANCE_S:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"text",!1)):l.push(t);var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?o=o.concat(D.getCellDataArr(a,"text",!1)):o.push(a);if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var f=l[e],d=o[e];B(f)&&B(d)&&(s.push(parseFloat(f)),u.push(parseFloat(d)))}return s.length==0||u.length==0?p.error.d:jStat.covariance(s,u)}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},DEVSQ:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else if(B(l))t.push(l);else if(P(l)=="boolean")l.toString().toLowerCase()=="true"?t.push(1):l.toString().toLowerCase()=="false"&&t.push(0);else return p.error.v}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}for(var s=jStat.mean(a),u=0,e=0;e<a.length;e++)u+=Math.pow(a[e]-s,2);return u}catch(d){var f=d;return f=p.errorInfo(f),[p.error.v,f]}},EXPON_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getCellBoolen(arguments[2]);return H(a)?a:t<0?p.error.nm:l<0?p.error.nm:a?jStat.exponential.cdf(t,l):jStat.exponential.pdf(t,l)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},AVERAGEIF:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=0,l=0,a=arguments[0].data,o=arguments[0].rowl,s=arguments[0].coll,u=Xa(arguments[1]),f=[];if(arguments[2]){var d=arguments[2].startCell,m=arguments[2].rowl,g=arguments[2].coll,y=arguments[2].sheetName;if(o==m&&s==g)f=arguments[2].data;else{var v=[],b=[],k="",w="";v[0]=parseInt(d.replace(/[^0-9]/g,""))-1,b[0]=hl(d.replace(/[^A-Za-z]/g,"")),v[1]=v[0]+o-1,b[1]=b[0]+s-1;var x=tt(b[1]),C=v[1]+1;k=x+C,w=y+"!"+d+":"+k,f=ar(w).data}f=p.getRangeArray(f)[0]}a=p.getRangeArray(a)[0];for(var e=0;e<a.length;e++){var S=a[e];if(!!S&&p.acompareb(S,u)){var _=f[e]||S;if(!B(_))continue;t+=parseFloat(_),l++}}return t==0||l==0?p.error.d:Il(t/l)}catch(A){var T=A;return T=p.errorInfo(T),[p.error.v,T]}},AVERAGEIFS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=0,l=0,a=arguments;Wn(a);for(var o=p.getRangeArray(a[0])[0],s=new Array(o.length),e=0;e<s.length;e++)s[e]=!0;for(var e=1;e<a.length;e+=2)for(var u=p.getRangeArray(a[e])[0],f=a[e+1],d=0;d<u.length;d++){var m=u[d];s[d]=s[d]&&!!m&&p.acompareb(m,f)}for(var e=0;e<o.length;e++)s[e]&&B(o[e])&&(t+=parseFloat(o[e]),l++);return t==0||l==0?p.error.d:Il(t/l)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},PERMUT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t<=0||l<0?p.error.nm:t<l?p.error.nm:D.factorial(t)/D.factorial(t-l)):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},TRIMMEAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let m=function(y,v){return v=v||1,!y||typeof y.slice!="function"?y:y.slice(v)},g=function(y,v){return v=v||1,!y||typeof y.slice!="function"?y:y.slice(0,y.length-v)};var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!1)):l.push(t);for(var a=[],e=0;e<l.length;e++){var o=l[e];B(o)&&a.push(parseFloat(o))}var s=D.getFirstValue(arguments[1]);if(H(s))return s;if(!B(s))return p.error.v;if(s=parseFloat(s),a.length==0)return p.error.nm;if(s<0||s>1)return p.error.nm;a.sort(function(y,v){return y-v});var u=window.luckysheet_function.FLOOR.f(a.length*s,2)/2,f=m(a,u);return f=g(f,u),f=jStat.mean(f),f}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},PERCENTILE_EXC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!1)):l.push(t);for(var a=[],e=0;e<l.length;e++){var o=l[e];B(o)&&a.push(parseFloat(o))}var s=D.getFirstValue(arguments[1]);if(H(s))return s;if(!B(s))return p.error.v;if(s=parseFloat(s),a.length==0)return p.error.nm;if(s<=0||s>=1)return p.error.nm;a=a.sort(function(g,y){return g-y});var u=a.length;if(s<1/(u+1)||s>1-1/(u+1))return p.error.nm;var f=s*(u+1)-1,d=Math.floor(f);return f===d?a[f]:a[d]+(f-d)*(a[d+1]-a[d])}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},PERCENTILE_INC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!1)):l.push(t);for(var a=[],e=0;e<l.length;e++){var o=l[e];B(o)&&a.push(parseFloat(o))}var s=D.getFirstValue(arguments[1]);if(H(s))return s;if(!B(s))return p.error.v;if(s=parseFloat(s),a.length==0)return p.error.nm;if(s<0||s>1)return p.error.nm;a=a.sort(function(g,y){return g-y});var u=a.length,f=s*(u-1),d=Math.floor(f);return f===d?a[f]:a[d]+(f-d)*(a[d+1]-a[d])}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},PEARSON:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"text",!1)):l.push(t);var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?o=o.concat(D.getCellDataArr(a,"text",!1)):o.push(a);if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var f=l[e],d=o[e];B(f)&&B(d)&&(s.push(parseFloat(f)),u.push(parseFloat(d)))}if(u.length==0||s.length==0)return p.error.d;for(var m=jStat.mean(s),g=jStat.mean(u),y=s.length,v=0,b=0,k=0,e=0;e<y;e++)v+=(s[e]-m)*(u[e]-g),b+=Math.pow(s[e]-m,2),k+=Math.pow(u[e]-g,2);return v/Math.sqrt(b*k)}catch(x){var w=x;return w=p.errorInfo(w),[p.error.v,w]}},NORM_S_INV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),t<=0||t>=1?p.error.nm:jStat.normal.inv(t,0,1)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},NORM_S_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getCellBoolen(arguments[1]);return H(l)?l:l?jStat.normal.cdf(t,0,1):jStat.normal.pdf(t,0,1)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},NORM_INV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))if(P(t)=="boolean")t.toString().toLowerCase()=="true"?t=1:t.toString().toLowerCase()=="false"&&(t=0);else return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))if(P(l)=="boolean")l.toString().toLowerCase()=="true"?l=1:l.toString().toLowerCase()=="false"&&(l=0);else return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))if(P(a)=="boolean")a.toString().toLowerCase()=="true"?a=1:a.toString().toLowerCase()=="false"&&(a=0);else return p.error.v;return a=parseFloat(a),t<=0||t>=1?p.error.nm:a<=0?p.error.nm:jStat.normal.inv(t,l,a)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},NORM_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))if(P(t)=="boolean")t.toString().toLowerCase()=="true"?t=1:t.toString().toLowerCase()=="false"&&(t=0);else return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getCellBoolen(arguments[3]);return H(o)?o:a<=0?p.error.nm:o?jStat.normal.cdf(t,l,a):jStat.normal.pdf(t,l,a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},NEGBINOM_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getCellBoolen(arguments[3]);return H(o)?o:a<0||a>1?p.error.nm:t<0||l<1?p.error.nm:o?jStat.negbin.cdf(t,l,a):jStat.negbin.pdf(t,l,a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},MINA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!1))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else if(o.toString.toLowerCase()=="true")t.push(1);else if(o.toString.toLowerCase()=="false")t.push(0);else if(B(l))t.push(l);else return p.error.v}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)?a.push(parseFloat(o)):o.toString().toLowerCase()=="true"?a.push(1):a.push(0)}return a.length===0?0:Math.min.apply(Math,a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},MEDIAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else{if(!B(l))return p.error.v;t.push(l)}}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}return jStat.median(a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},MAXA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!1))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else if(o.toString.toLowerCase()=="true")t.push(1);else if(o.toString.toLowerCase()=="false")t.push(0);else if(B(l))t.push(l);else return p.error.v}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)?a.push(parseFloat(o)):o.toString().toLowerCase()=="true"?a.push(1):a.push(0)}return a.length===0?0:Math.max.apply(Math,a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},LOGNORM_INV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseFloat(a),t<=0||t>=1?p.error.nm:a<=0?p.error.nm:jStat.lognormal.inv(t,l,a)):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},LOGNORM_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getCellBoolen(arguments[3]);return H(o)?o:t<=0||a<=0?p.error.nm:o?jStat.lognormal.cdf(t,l,a):jStat.lognormal.pdf(t,l,a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},Z_TEST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!0))}else P(arguments[0])=="object"&&arguments[0].startCell!=null?t=t.concat(D.getCellDataArr(arguments[0],"text",!0)):t.push(arguments[0]);for(var l=[],a=0;a<t.length;a++){var o=t[a];B(o)&&l.push(parseFloat(o))}var s=D.getFirstValue(arguments[1]);if(H(s))return s;if(!B(s))return p.error.v;if(s=parseFloat(s),l.length==0)return p.error.na;var u=D.standardDeviation_s(l);if(arguments.length==3){if(u=D.getFirstValue(arguments[2]),H(u))return u;if(!B(u))return p.error.v;u=parseFloat(u)}var f=l.length,d=window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE,l);return 1-window.luckysheet_function.NORM_S_DIST.f((d-s)/(u/Math.sqrt(f)),"true")}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},PROB:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!1))}else P(arguments[0])=="object"&&arguments[0].startCell!=null?t=t.concat(D.getCellDataArr(arguments[0],"text",!1)):t.push(arguments[0]);var l=[];if(P(arguments[1])=="array"){if(P(arguments[1][0])=="array"&&!D.isDyadicArr(arguments[1]))return p.error.v;l=l.concat(D.getDataArr(arguments[1],!1))}else P(arguments[1])=="object"&&arguments[1].startCell!=null?l=l.concat(D.getCellDataArr(arguments[1],"text",!1)):l.push(arguments[1]);if(t.length!=l.length)return p.error.na;for(var a=[],o=[],s=0,e=0;e<t.length;e++){var u=t[e],f=l[e];if(B(u)&&B(f)&&(a.push(parseFloat(u)),o.push(parseFloat(f)),s+=parseFloat(f),parseFloat(f)<=0||parseFloat(f)>1))return p.error.nm}if(s!=1)return p.error.nm;var d=D.getFirstValue(arguments[2]);if(H(d))return d;if(!B(d))return p.error.v;d=parseFloat(d);var m=d;if(arguments.length==4){if(m=D.getFirstValue(arguments[3]),H(m))return m;if(!B(m))return p.error.v;m=parseFloat(m)}for(var g=0,e=0;e<a.length;e++)a[e]>=d&&a[e]<=m&&(g+=o[e]);return g}catch(v){var y=v;return y=p.errorInfo(y),[p.error.v,y]}},QUARTILE_EXC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!0))}else if(P(arguments[0])=="object"&&arguments[0].startCell!=null)t=t.concat(D.getCellDataArr(arguments[0],"text",!0));else{if(!B(arguments[0]))return p.error.v;t.push(arguments[0])}for(var l=[],e=0;e<t.length;e++){var a=t[e];B(a)&&l.push(parseFloat(a))}var o=D.getFirstValue(arguments[1]);if(H(o))return o;if(!B(o))return p.error.v;if(o=parseInt(o),l.length==0)return p.error.nm;if(o<=0||o>=4)return p.error.nm;switch(o){case 1:return window.luckysheet_function.PERCENTILE_EXC.f(l,.25);case 2:return window.luckysheet_function.PERCENTILE_EXC.f(l,.5);case 3:return window.luckysheet_function.PERCENTILE_EXC.f(l,.75)}}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},QUARTILE_INC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!0))}else if(P(arguments[0])=="object"&&arguments[0].startCell!=null)t=t.concat(D.getCellDataArr(arguments[0],"text",!0));else{if(!B(arguments[0]))return p.error.v;t.push(arguments[0])}for(var l=[],e=0;e<t.length;e++){var a=t[e];B(a)&&l.push(parseFloat(a))}var o=D.getFirstValue(arguments[1]);if(H(o))return o;if(!B(o))return p.error.v;if(o=parseInt(o),l.length==0)return p.error.nm;if(o<0||o>4)return p.error.nm;switch(o){case 0:return Math.min.apply(Math,l);case 1:return window.luckysheet_function.PERCENTILE_INC.f(l,.25);case 2:return window.luckysheet_function.PERCENTILE_INC.f(l,.5);case 3:return window.luckysheet_function.PERCENTILE_INC.f(l,.75);case 4:return Math.max.apply(Math,l)}}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},POISSON_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getCellBoolen(arguments[2]);return H(a)?a:t<0||l<0?p.error.nm:a?jStat.poisson.cdf(t,l):jStat.poisson.pdf(t,l)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},RSQ:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else if(P(t)=="object"&&t.startCell!=null)l=l.concat(D.getCellDataArr(t,"text",!1));else{if(!B(t))return p.error.v;l.push(t)}var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else if(P(a)=="object"&&a.startCell!=null)o=o.concat(D.getCellDataArr(a,"text",!1));else{if(!B(a))return p.error.v;o.push(a)}if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var f=l[e],d=o[e];B(f)&&B(d)&&(s.push(parseFloat(f)),u.push(parseFloat(d)))}return s.length==0||u.length==0?p.error.d:Math.pow(window.luckysheet_function.PEARSON.f(s,u),2)}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},T_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getCellBoolen(arguments[2]);return H(a)?a:l<1?p.error.nm:a?jStat.studentt.cdf(t,l):jStat.studentt.pdf(t,l)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},T_DIST_2T:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t<0||l<1?p.error.nm:(1-jStat.studentt.cdf(t,l))*2):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},T_DIST_RT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),l<1?p.error.nm:1-jStat.studentt.cdf(t,l)):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},T_INV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t<=0||t>1?p.error.nm:l<1?p.error.nm:jStat.studentt.inv(t,l)):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},T_INV_2T:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t<=0||t>1?p.error.nm:l<1?p.error.nm:Math.abs(jStat.studentt.inv(t/2,l))):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},T_TEST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!1))}else if(P(arguments[0])=="object"&&arguments[0].startCell!=null)t=t.concat(D.getCellDataArr(arguments[0],"text",!1));else{if(!B(arguments[0]))return p.error.v;t.push(arguments[0])}var l=t,a=[];if(P(arguments[1])=="array"){if(P(arguments[1][0])=="array"&&!D.isDyadicArr(arguments[1]))return p.error.v;a=a.concat(D.getDataArr(arguments[1],!1))}else if(P(arguments[1])=="object"&&arguments[1].startCell!=null)a=a.concat(D.getCellDataArr(arguments[1],"text",!1));else{if(!B(arguments[1]))return p.error.v;a.push(arguments[1])}var o=a,s=D.getFirstValue(arguments[2]);if(H(s))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=D.getFirstValue(arguments[3]);if(H(u))return u;if(!B(u))return p.error.v;if(u=parseInt(u),[1,2].indexOf(s)==-1)return p.error.nm;if([1,2,3].indexOf(u)==-1)return p.error.nm;var f=null,d=null;if(u==1){var m=[];for(e=0;e<l.length;e++)m.push(l[e]-o[e]);var g=Math.abs(jStat.mean(m)),y=D.standardDeviation_s(m);f=g/(y/Math.sqrt(l.length)),d=l.length-1}else{var v=jStat.mean(l),b=jStat.mean(o),k=D.variance_s(l),w=D.variance_s(o);switch(f=Math.abs(v-b)/Math.sqrt(k/l.length+w/o.length),u){case 2:d=l.length+o.length-2;break;case 3:d=Math.pow(k/l.length+w/o.length,2)/(Math.pow(k/l.length,2)/(l.length-1)+Math.pow(w/o.length,2)/(o.length-1));break}}if(s==1)var x=window.luckysheet_function.T_DIST_RT.f(f,d);else if(s==2)var x=window.luckysheet_function.T_DIST_2T.f(f,d);return x}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},F_DIST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=D.getCellBoolen(arguments[3]);return H(o)?o:t<0?p.error.nm:l<1?p.error.nm:a<1?p.error.nm:o?jStat.centralF.cdf(t,l,a):jStat.centralF.pdf(t,l,a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},F_DIST_RT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseInt(a),t<0?p.error.nm:l<1?p.error.nm:a<1?p.error.nm:1-jStat.centralF.cdf(t,l,a)):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},VAR_P:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else{if(!B(l))return p.error.v;t.push(l)}}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}if(a.length==0)return p.error.d;for(var s=a.length,u=0,f=window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE,a),e=0;e<s;e++)u+=Math.pow(a[e]-f,2);return u/s}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},VAR_S:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else{if(!B(l))return p.error.v;t.push(l)}}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}if(a.length==0)return p.error.d;for(var s=a.length,u=0,f=window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE,a),e=0;e<s;e++)u+=Math.pow(a[e]-f,2);return u/(s-1)}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},VARA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!1))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else if(o.toString.toLowerCase()=="true")t.push(1);else if(o.toString.toLowerCase()=="false")t.push(0);else if(B(l))t.push(l);else return p.error.v}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)?a.push(parseFloat(o)):o.toString().toLowerCase()=="true"?a.push(1):a.push(0)}for(var s=a.length,u=0,f=window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE,a),e=0;e<s;e++)u+=Math.pow(a[e]-f,2);return u/(s-1)}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},VARPA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!1))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else if(o.toString.toLowerCase()=="true")t.push(1);else if(o.toString.toLowerCase()=="false")t.push(0);else if(B(l))t.push(l);else return p.error.v}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)?a.push(parseFloat(o)):o.toString().toLowerCase()=="true"?a.push(1):a.push(0)}for(var s=a.length,u=0,f=window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE,a),e=0;e<s;e++)u+=Math.pow(a[e]-f,2);return u/s}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},STEYX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!1))}else if(P(arguments[0])=="object"&&arguments[0].startCell!=null)t=t.concat(D.getCellDataArr(arguments[0],"text",!1));else{if(!B(arguments[0]))return p.error.v;t.push(arguments[0])}var l=[];if(P(arguments[1])=="array"){if(P(arguments[1][0])=="array"&&!D.isDyadicArr(arguments[1]))return p.error.v;l=l.concat(D.getDataArr(arguments[1],!1))}else if(P(arguments[1])=="object"&&arguments[1].startCell!=null)l=l.concat(D.getCellDataArr(arguments[1],"text",!1));else{if(!B(arguments[1]))return p.error.v;l.push(arguments[1])}if(t.length!=l.length)return p.error.na;for(var a=[],o=[],e=0;e<t.length;e++){var s=t[e],u=l[e];B(s)&&B(u)&&(a.push(parseFloat(s)),o.push(parseFloat(u)))}if(a.length<3||o.length<3)return p.error.d;for(var f=jStat.mean(o),d=jStat.mean(a),m=o.length,g=0,y=0,v=0,e=0;e<m;e++)g+=Math.pow(a[e]-d,2),y+=(o[e]-f)*(a[e]-d),v+=Math.pow(o[e]-f,2);return Math.sqrt((g-y*y/v)/(m-2))}catch(k){var b=k;return b=p.errorInfo(b),[p.error.v,b]}},STANDARDIZE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseFloat(a),a<=0?p.error.nm:(t-l)/a):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},SMALL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!0))}else if(P(arguments[0])=="object"&&arguments[0].startCell!=null)t=t.concat(D.getCellDataArr(arguments[0],"number",!0));else{if(!B(arguments[0]))return p.error.v;t.push(arguments[0])}for(var l=[],e=0;e<t.length;e++){var a=t[e];B(a)&&l.push(parseFloat(a))}var o=D.getFirstValue(arguments[1]);return H(o)?o:B(o)?(o=parseInt(o),l.length==0?p.error.nm:o<=0||o>l.length?p.error.nm:l.sort(function(u,f){return u-f})[o-1]):p.error.v}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},SLOPE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[];if(P(arguments[0])=="array"){if(P(arguments[0][0])=="array"&&!D.isDyadicArr(arguments[0]))return p.error.v;t=t.concat(D.getDataArr(arguments[0],!1))}else if(P(arguments[0])=="object"&&arguments[0].startCell!=null)t=t.concat(D.getCellDataArr(arguments[0],"text",!1));else{if(!B(arguments[0]))return p.error.v;t.push(arguments[0])}var l=[];if(P(arguments[1])=="array"){if(P(arguments[1][0])=="array"&&!D.isDyadicArr(arguments[1]))return p.error.v;l=l.concat(D.getDataArr(arguments[1],!1))}else if(P(arguments[1])=="object"&&arguments[1].startCell!=null)l=l.concat(D.getCellDataArr(arguments[1],"text",!1));else{if(!B(arguments[1]))return p.error.v;l.push(arguments[1])}if(t.length!=l.length)return p.error.na;for(var a=[],o=[],e=0;e<t.length;e++){var s=t[e],u=l[e];B(s)&&B(u)&&(a.push(parseFloat(s)),o.push(parseFloat(u)))}if(a.length<3||o.length<3)return p.error.d;for(var f=jStat.mean(o),d=jStat.mean(a),m=o.length,g=0,y=0,e=0;e<m;e++)g+=(o[e]-f)*(a[e]-d),y+=Math.pow(o[e]-f,2);return g/y}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},SKEW:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else{if(!B(l))return p.error.v;t.push(l)}}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}if(a.length<3||D.standardDeviation_s(a)==0)return p.error.d;for(var s=jStat.mean(a),u=a.length,f=0,e=0;e<u;e++)f+=Math.pow(a[e]-s,3);return u*f/((u-1)*(u-2)*Math.pow(jStat.stdev(a,!0),3))}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},SKEW_P:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=[],e=0;e<arguments.length;e++){var l=arguments[e];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;t=t.concat(D.getDataArr(l,!0))}else if(P(l)=="object"&&l.startCell!=null)t=t.concat(D.getCellDataArr(l,"number",!0));else{if(!B(l))return p.error.v;t.push(l)}}for(var a=[],e=0;e<t.length;e++){var o=t[e];B(o)&&a.push(parseFloat(o))}if(a.length<3||D.standardDeviation_s(a)==0)return p.error.d;for(var s=jStat.mean(a),u=a.length,f=0,d=0,e=0;e<u;e++)d+=Math.pow(a[e]-s,3),f+=Math.pow(a[e]-s,2);return d=d/u,f=f/u,d/Math.pow(f,3/2)}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},ADDRESS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=1;if(arguments.length>=3){if(a=D.getFirstValue(arguments[2]),H(a))return a;if(!B(a))return p.error.v;a=parseInt(a)}var o=!0;if(arguments.length>=4&&(o=D.getCellBoolen(arguments[3]),H(o)))return o;if(t<=0||l<=0)return p.error.v;if([1,2,3,4].indexOf(a)==-1)return p.error.v;var s;if(o)switch(l=tt(l-1),a){case 1:s="$"+l+"$"+t;break;case 2:s=l+"$"+t;break;case 3:s="$"+l+t;break;case 4:s=l+t;break}else switch(a){case 1:s="R"+t+"C"+l;break;case 2:s="R"+t+"C["+l+"]";break;case 3:s="R["+t+"]C"+l;break;case 4:s="R["+t+"]C["+l+"]";break}if(arguments.length==5){var u=D.getFirstValue(arguments[4]);return H(u)?u:u+"!"+s}else return s}catch(d){var f=d;return f=p.errorInfo(f),[p.error.v,f]}},INDIRECT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;var l=!0;if(arguments.length==2&&(l=D.getCellBoolen(arguments[1]),H(l)))return l;let o=Et(),s=Z(h.calculateSheetIndex),u=o[s],f=u.data;if(p.iscelldata(t)){let d=p.getcellrange(t),m=d.row[0],g=d.column[0];if(m<0||m>=f.length||g<0||g>=f[0].length)return p.error.r;if(f[m][g]==null||me(f[m][g].v))return 0;let y=f[m][g].v;if(p.execFunctionGlobalData!=null){let b=p.execFunctionGlobalData[m+"_"+g+"_"+h.calculateSheetIndex];b!=null&&(y=b.v)}return{sheetName:u.name,startCell:t,rowl:m,coll:g,data:y}}else return p.error.r}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ROW:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{if(arguments.length==1){var t;if(P(arguments[0])=="array")return p.error.v;if(P(arguments[0])=="object"&&arguments[0].startCell!=null?t=arguments[0].startCell:t=arguments[0],p.iscelldata(t)){var l=p.getcellrange(t);return l.row[0]+1}else return p.error.v}else return window.luckysheetCurrentRow+1}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ROWS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return P(arguments[0])=="array"?P(arguments[0][0])=="array"?arguments[0].length:1:P(arguments[0])=="object"&&arguments[0].startCell!=null?arguments[0].rowl:1}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},COLUMN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{if(arguments.length==1){var t;if(P(arguments[0])=="array")return p.error.v;if(P(arguments[0])=="object"&&arguments[0].startCell!=null?t=arguments[0].startCell:t=arguments[0],p.iscelldata(t)){var l=p.getcellrange(t);return l.column[0]+1}else return p.error.v}else return window.luckysheetCurrentColumn+1}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},COLUMNS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return P(arguments[0])=="array"?P(arguments[0][0])=="array"?arguments[0][0].length:arguments[0].length:P(arguments[0])=="object"&&arguments[0].startCell!=null?arguments[0].coll:1}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},OFFSET:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{if(!(P(arguments[0])=="object"&&arguments[0].startCell!=null))return p.error.v;var t=arguments[0].startCell;let x=arguments[0].sheetName;var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=arguments[0].rowl;if(arguments.length>=4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}var s=arguments[0].coll;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseInt(s)}if(o<1||s<1)return p.error.r;var u=p.getcellrange(t),f=u.row[0],d=u.column[0];f+=l,d+=a;var m=f+o-1,g=d+s-1;let C=Et(),S=Z(h.calculateSheetIndex),_=C[S].data;if(f<0||m>=_.length||d<0||g>=_[0].length)return p.error.r;for(var y=[],v=f;v<=m;v++){for(var b=[],k=d;k<=g;k++)if(p.execFunctionGlobalData!=null&&p.execFunctionGlobalData[v+"_"+k+"_"+h.calculateSheetIndex]!=null){let A=p.execFunctionGlobalData[v+"_"+k+"_"+h.calculateSheetIndex];A!=null?b.push(A.v):b.push(0)}else _[v][k]!=null&&!me(_[v][k].v)?b.push(_[v][k].v):b.push(0);y.push(b)}return{sheetName:x,startCell:xt(h.calculateSheetIndex,{row:[f,m],column:[d,g]}),rowl:f,coll:d,data:y}}catch(x){var w=x;return w=p.errorInfo(w),[p.error.v,w]}},MATCH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=arguments[1],a=[];if(P(l)=="array"){if(P(l[0])=="array")return D.isDyadicArr(l)?p.error.na:p.error.v;for(var e=0;e<l.length;e++)a.push(l[e])}else if(P(l)=="object"&&l.startCell!=null){if(l.rowl>1&&l.coll>1)return p.error.na;if(l.data!=null)if(P(l.data)=="array")for(var e=0;e<l.data.length;e++)for(var o=0;o<l.data[e].length;o++)l.data[e][o]!=null&&!me(l.data[e][o].v)&&a.push(l.data[e][o].v);else a.push(l.data.v)}var s=1;if(arguments.length==3){if(s=D.getFirstValue(arguments[2]),H(s))return s;if(!B(s))return p.error.v;s=Math.ceil(parseFloat(s))}if([-1,0,1].indexOf(s)==-1)return p.error.na;for(var u,f,d=0;d<a.length;d++)if(s===1){if(a[d]===t)return d+1;a[d]<t&&(f?a[d]>f&&(u=d+1,f=a[d]):(u=d+1,f=a[d]))}else if(s===0){if(typeof t=="string"){if(t=t.replace(/\?/g,"."),a[d].toLowerCase().match(t.toLowerCase()))return d+1}else if(a[d]===t)return d+1}else if(s===-1){if(a[d]===t)return d+1;a[d]>t&&(f?a[d]<f&&(u=d+1,f=a[d]):(u=d+1,f=a[d]))}return u||p.error.na}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},VLOOKUP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;if(t.toString().replace(/\s/g,"")=="")return p.error.na;var l=arguments[1],a=[];if(P(l)=="array")if(P(l[0])=="array"){if(!D.isDyadicArr(l))return p.error.v;for(var e=0;e<l.length;e++){for(var o=[],s=0;s<l[e].length;s++)o.push(l[e][s]);a.push(o)}}else{for(var o=[],e=0;e<l.length;e++)o.push(l[e]);a.push(o)}else if(P(l)=="object"&&l.startCell!=null)a=D.getCellDataDyadicArr(l,"text");else return p.error.v;var u=D.getFirstValue(arguments[2]);if(H(u))return u;if(!B(u))return p.error.v;u=parseInt(u);var f=!0;if(arguments.length==4&&(f=D.getCellBoolen(arguments[3]),H(f)))return f;if(u<1)return p.error.v;if(u>a[0].length)return p.error.r;if(f){a=Hr(a,0,!0);for(var d=0;d<a.length;d++){var m=a[d][0],g;if(Lt(t)&&Lt(m)?g=ul(t,m):B(t)&&B(m)?g=(0,Ui.default)(t).value()-(0,Ui.default)(m).value():!B(t)&&!B(m)?g=t.localeCompare(m,"zh"):B(t)?B(m)||(g=-1):g=1,g<0)return d==0?p.error.na:a[d-1][u-1];if(d==a.length-1)return a[d][u-1]}}else{for(var y=null,d=0;d<a.length;d++)if(t.toString()==a[d][0].toString()){y=d;break}return y==null?p.error.na:a[y][u-1]}}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},HLOOKUP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=arguments[0];typeof a=="object"&&(a=arguments[0].data,P(a)=="array"?(a=a[r],P(a)=="array"&&(a=a[d])):a=a.v);var o=arguments[1].data,s=arguments[2],u=!1;if(arguments.length>3&&(u=!!arguments[3]),s>o.rowl)return[p.error.v,"\u7D22\u5F15\u8D85\u8FC7\u4E86\u8303\u56F4\u7684\u957F\u5EA6\uFF0C"+o[0].length];if(s<1)return[p.error.v,"\u7D22\u5F15\u5FC5\u987B\u5927\u4E8E1"];for(var f=p.error.na,d=0;d<o[0].length;d++){var m=ze(0,d,o),g=ze(s-1,d,o);if(u)m.indexOf(a)>-1&&(f=g);else if(p.acompareb(m,a))return f=g,f}return f}catch(v){var y=v;return y=p.errorInfo(y),[p.error.v,y]}},LOOKUP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let b=function(k,w){return w-k};var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=arguments[0];typeof a=="object"&&(a=arguments[0].data,P(a)=="array"?(a=a[r],P(a)=="array"&&(a=a[c])):a=a.v);var o=arguments[1].data,s,u=p.error.na;if(o=p.getRangeArray(o)[0],arguments[2]&&(s=arguments[2].data,s=p.getRangeArray(s)[0]),typeof a=="string")for(var e=0;e<o.length;e++){var f=o[e],d;arguments[2]?(d=s[e],f==a&&(u=d)):p.acompareb(f,a)&&(u=f)}else if(tr(a)=="num"){for(var m=[],e=0;e<o.length;e++){var f=o[e],d;if(arguments[2]){if(d=s[e],f==a)return u=d,u;f!=a&&tr(f)=="num"&&m.push(f)}else{if(f==a)return u=f,u;f!=a&&tr(f)=="num"&&m.push(f)}}if(m.length!=0){m.push(a),m.sort(b);var g=m.indexOf(a);if(g==m.length-1)return[p.error.na,"\u627E\u4E0D\u5230\u5BF9\u5E94\u53C2\u6570"];var y=m[g+1];if(arguments[2]){var e=o.indexOf(y);u=s[e]}else u=y}}return u}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},INDEX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];let y=!1;if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else P(t)=="object"&&t.startCell!=null&&(l=D.getCellDataDyadicArr(t,"number"),y=!0);var a=l.length,o=l[0].length,s=D.getFirstValue(arguments[1]);if(H(s))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=D.getFirstValue(arguments[2]);if(H(u))return u;if(s<0||B(u)&&u<0)return p.error.v;if(s>a||B(u)&&u>o)return p.error.r;if(y){var f=p.getcellrange(t.startCell),d=f.row[0],m=f.column[0];let v=l;s==0||u==0?(s==0?(v=l[0],s=1):v=l[s-1],B(u)?u==0?(v=v[0],u=1):v=v[u-1]:u=1):(B(s)||(s=1),B(u)||(u=1),v=l[s-1][u-1]);let b=d+s-1,k=m+u-1;return{sheetName:t.sheetName,startCell:xt(h.calculateSheetIndex,{row:[b,b],column:[k,k]}),rowl:b,coll:k,data:v}}else return B(u)?(u=parseInt(u),s<=0||u<=0?p.error.v:l[s-1][u-1]):p.error.v}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},GETPIVOTDATA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return p.error.v}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},CHOOSE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;if(t=parseInt(t),t<1||t>arguments.length-1)return p.error.v;var l=arguments[t];if(P(l)=="array")return P(l[0])=="array"&&!D.isDyadicArr(l)?p.error.v:l;if(P(l)=="object"&&l.startCell!=null){if(l.data==null)return 0;if(P(l.data)=="array"){var a=D.getCellDataDyadicArr(l.data,"number");return a}else return me(l.data.v)?0:l.data.v}else return l}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},HYPERLINK:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return p.error.v}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},TIME:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;if(a=parseInt(a),t<0||t>32767)return p.error.nm;if(t>24&&(t=t%24),l<0||l>32767)return p.error.nm;if(a<0||a>32767)return p.error.nm;var o=(0,j.default)().set({hour:t,minute:l,second:a});return(0,j.default)(o).format("h:mm:ss a")}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},TIMEVALUE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);return H(t)?t:(0,j.default)(t).isValid()?(3600*(0,j.default)(t).get("hour")+60*(0,j.default)(t).get("minute")+(0,j.default)(t).get("second"))/86400:p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},EOMONTH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;if(l=parseInt(l),!(0,j.default)(t).isValid())return p.error.v;var a=(0,j.default)(t).add(l+1,"months").set("date",1).subtract(1,"days"),o=at((0,j.default)(a).format("YYYY-MM-DD H:mm:ss")),s=o[2];return s}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},EDATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;if(l=parseInt(l),!(0,j.default)(t).isValid())return p.error.v;var a=(0,j.default)(t).add(l,"months"),o=at((0,j.default)(a).format("YYYY-MM-DD h:mm:ss")),s=o[2];return s}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},SECOND:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=(0,j.default)(t).seconds();return l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},MINUTE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=(0,j.default)(t).minutes();return l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},HOUR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=(0,j.default)(t).hours();return l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},NOW:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return(0,j.default)().format("YYYY-M-D HH:mm")}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},NETWORKDAYS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{if(arguments.length==3)var t=window.luckysheet_function.NETWORKDAYS_INTL.f(arguments[0],arguments[1],1,arguments[2]);else var t=window.luckysheet_function.NETWORKDAYS_INTL.f(arguments[0],arguments[1],1);return t}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},NETWORKDAYS_INTL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[[],[6,0],[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],void 0,void 0,void 0,[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]],l=D.getCellDate(arguments[0]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getCellDate(arguments[1]);if(H(a))return a;if(!(0,j.default)(a).isValid())return p.error.v;var o=t[1];if(arguments.length>=3&&(o=arguments[2],!(typeof o=="string"&&o.length=="7"&&/^[0-1]{7}$/g.test(o)))){if(o=D.getFirstValue(arguments[2]),H(o))return o;if(!B(o))return p.error.v;if(o=parseInt(o),o<1||o>7&&o<11||o>17)return p.error.nm;o=t[o]}var s=[];if(arguments.length==4&&(s=D.getCellrangeDate(arguments[3]),H(s)))return s;for(var e=0;e<s.length;e++)if(!(0,j.default)(s[e]).isValid())return p.error.v;var u=(0,j.default)(a).diff((0,j.default)(l),"days")+1,f=u,d=(0,j.default)(l);for(e=0;e<u;e++){var m=(0,j.default)(d).weekday(),g=!1;P(o)=="array"?(m===o[0]||m===o[1])&&(g=!0):(m==0&&(m=7),o.charAt(m-1)=="0"&&(g=!0));for(var y=0;y<s.length;y++)if((0,j.default)(d).diff((0,j.default)(s[y]),"days")===0){g=!0;break}g&&f--,d=(0,j.default)(d).add(1,"days")}return f}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},ISOWEEKNUM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);return H(t)?t:(0,j.default)(t).isValid()?(0,j.default)(t).isoWeeks():p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},WEEKNUM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[void 0,7,1,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,1,2,3,4,5,6,7],l=D.getCellDate(arguments[0]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=1;if(arguments.length==2){if(a=D.getFirstValue(arguments[1]),H(a))return a;if(!B(a))return p.error.v;a=parseInt(a)}if(a==21)return window.luckysheet_function.ISOWEEKNUM.f(arguments[0]);if([1,2,11,12,13,14,15,16,17].indexOf(a)==-1)return p.error.nm;var o=t[a],s=(0,j.default)(l).isoWeekday()>=o?1:0,u=(0,j.default)(l).isoWeeks()+s;return u}catch(d){var f=d;return f=p.errorInfo(f),[p.error.v,f]}},WEEKDAY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[[],[1,2,3,4,5,6,7],[7,1,2,3,4,5,6],[6,0,1,2,3,4,5],[],[],[],[],[],[],[],[7,1,2,3,4,5,6],[6,7,1,2,3,4,5],[5,6,7,1,2,3,4],[4,5,6,7,1,2,3],[3,4,5,6,7,1,2],[2,3,4,5,6,7,1],[1,2,3,4,5,6,7]],l=D.getCellDate(arguments[0]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=1;if(arguments.length==2){if(a=D.getFirstValue(arguments[1]),H(a))return a;if(!B(a))return p.error.v;a=parseInt(a)}if([1,2,3,11,12,13,14,15,16,17].indexOf(a)==-1)return p.error.nm;var o=t[a][(0,j.default)(l).day()];return o}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},DAY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);return H(t)?t:(0,j.default)(t).isValid()?(0,j.default)(t).date():p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},DAYS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=(0,j.default)(t).diff((0,j.default)(l),"days");return a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},DAYS360:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=!1;if(arguments.length==3&&(a=D.getCellBoolen(arguments[2]),H(a)))return a;var o=(0,j.default)(t).month(),s=(0,j.default)(l).month(),u,f;if(a)u=(0,j.default)(t).date()===31?30:(0,j.default)(t).date(),f=(0,j.default)(l).date()===31?30:(0,j.default)(l).date();else{var d=(0,j.default)().set({year:(0,j.default)(t).year(),month:o+1,date:0}).date(),m=(0,j.default)().set({year:(0,j.default)(l).year(),month:s+1,date:0}).date();u=(0,j.default)(t).date()===d?30:(0,j.default)(t).date(),(0,j.default)(l).date()===m?u<30?(s++,f=1):f=30:f=(0,j.default)(l).date()}var g=360*(0,j.default)(l).diff((0,j.default)(t),"years")+30*(s-o)+(f-u);return g}catch(v){var y=v;return y=p.errorInfo(y),[p.error.v,y]}},DATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;if(a=parseInt(a),t<0||t>=1e4)return p.error.nm;t>=0&&t<=1899&&(t=t+1900);var o=(0,j.default)().set({year:t,month:l-1,date:a});return(0,j.default)(o).year()<1900?p.error.nm:(0,j.default)(o).format("YYYY-MM-DD")}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},DATEVALUE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;t=(0,j.default)(t).format("YYYY-MM-DD");var l=at(t)[2];return l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},DATEDIF:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var e=0;e<arguments.length-1;e++)if(arguments[e]=D.getCellDate(arguments[e]),!Lt(arguments[e]))return p.error.v;var t=(0,j.default)(arguments[0]),l=(0,j.default)(arguments[1]),a=arguments[2],o=p.error.v;if(window.luckysheet_function.DAYS.f(l,t)<0)return p.error.v;switch(a){case"Y":case"y":o=l.diff(t,"years",!1);break;case"M":case"m":o=l.diff(t,"months",!1);break;case"D":case"d":o=l.diff(t,"days",!1);break;case"MD":case"md":o=l.format("DD")-t.format("DD");break;case"YM":case"ym":var s=parseInt(t.format("M")),u=parseInt(l.format("M"));o=s<=u?u-s:u+12-s;break;case"YD":case"yd":let d=`${l.$y}-MM-DD`;var s=at(t.format(d))[2],u=at(l.format(d))[2];o=s<=u?u-s:u+365-s;break;default:o=p.error.v}return o}catch(d){var f=d;return f=p.errorInfo(f),[p.error.v,f]}},WORKDAY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{if(arguments.length==3)var t=window.luckysheet_function.WORKDAY_INTL.f(arguments[0],arguments[1],1,arguments[2]);else var t=window.luckysheet_function.WORKDAY_INTL.f(arguments[0],arguments[1],1);return t}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},WORKDAY_INTL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=[[],[6,0],[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],void 0,void 0,void 0,[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]],l=D.getCellDate(arguments[0]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[1]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=t[1];if(arguments.length>=3&&(o=arguments[2],!(typeof o=="string"&&o.length=="7"&&/^[0-1]{7}$/g.test(o)))){if(o=D.getFirstValue(arguments[2]),H(o))return o;if(!B(o))return p.error.v;if(o=parseInt(o),o<1||o>7&&o<11||o>17)return p.error.nm;o=t[o]}var s=[];if(arguments.length==4&&(s=D.getCellrangeDate(arguments[3]),H(s)))return s;for(var e=0;e<s.length;e++)if(!(0,j.default)(s[e]).isValid())return p.error.v;for(var u=0;u<a;){l=(0,j.default)(l).add(1,"days");var f=(0,j.default)(l).weekday();if(P(o)){if(f===o[0]||f===o[1])continue}else if(f==0&&(f=7),o.charAt(f-1)=="0")continue;for(var d=0;d<s.length;d++)if((0,j.default)(l).diff((0,j.default)(s[d]),"days")===0){u--;break}u++}return(0,j.default)(l).format("YYYY-MM-DD")}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},YEAR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);return H(t)?t:(0,j.default)(t).isValid()?(0,j.default)(t).year():p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},YEARFRAC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=0;if(arguments.length==3){if(a=D.getFirstValue(arguments[2]),H(a))return a;if(!B(a))return p.error.v;a=parseInt(a)}if(a<0||a>4)return p.error.nm;var o=(0,j.default)(t).date(),s=(0,j.default)(t).month()+1,u=(0,j.default)(t).year(),f=(0,j.default)(l).date(),d=(0,j.default)(l).month()+1,m=(0,j.default)(l).year(),g;switch(a){case 0:o===31&&f===31?(o=30,f=30):o===31?o=30:o===30&&f===31&&(f=30),g=(f+d*30+m*360-(o+s*30+u*360))/360;break;case 1:var y=365;if(u===m||u+1===m&&(s>d||s===d&&o>=f))return(u===m&&D.isLeapYear(u)||D.feb29Between(t,l)||d===1&&f===29)&&(y=366),(0,j.default)(l).diff((0,j.default)(t),"days")/y;var v=m-u+1,b=((0,j.default)().set({year:m+1,month:0,date:1})-(0,j.default)().set({year:u,month:0,date:1}))/1e3/60/60/24,k=b/v;g=(0,j.default)(l).diff((0,j.default)(t),"days")/k;break;case 2:g=(0,j.default)(l).diff((0,j.default)(t),"days")/360;break;case 3:g=(0,j.default)(l).diff((0,j.default)(t),"days")/365;break;case 4:g=(f+d*30+m*360-(o+s*30+u*360))/360;break}return g}catch(x){var w=x;return w=p.errorInfo(w),[p.error.v,w]}},TODAY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return(0,j.default)().format("YYYY-MM-DD")}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},MONTH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);return H(t)?t:(0,j.default)(t).isValid()?(0,j.default)(t).month()+1:p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},EFFECT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t<=0||l<1?p.error.nm:Math.pow(1+t/l,l)-1):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},DOLLAR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=2;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}l>9&&(l=9);for(var a="0.",e=1;e<=l;e++)a+="0";var o=t>0?1:-1;return o*Math.floor(Math.abs(t)*Math.pow(10,l))/Math.pow(10,l)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},DOLLARDE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;if(l=parseInt(l),l<0)return p.error.nm;if(l==0)return p.error.d;var a=parseInt(t,10);a+=t%1*Math.pow(10,Math.ceil(Math.log(l)/Math.LN10))/l;var o=Math.pow(10,Math.ceil(Math.log(l)/Math.LN2)+1);return a=Math.round(a*o)/o,a}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},DOLLARFR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;if(l=parseInt(l),l<0)return p.error.nm;if(l==0)return p.error.d;var a=parseInt(t,10);return a+=t%1*Math.pow(10,-Math.ceil(Math.log(l)/Math.LN10))*l,a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},DB:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseInt(o);var s=12;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseInt(s)}if(t<0||l<0||a<0||o<0)return p.error.nm;if(s<1||s>12)return p.error.nm;if(o>a)return p.error.nm;if(l>=t)return 0;for(var u=(1-Math.pow(l/t,1/a)).toFixed(3),f=t*u*s/12,d=f,m=0,g=o===a?a-1:o,e=2;e<=g;e++)m=(t-d)*u,d+=m;if(o===1)var y=f;else if(o===a)var y=(t-d)*u;else var y=m;return y}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},DDB:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseInt(o);var s=2;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}if(t<0||l<0||a<0||o<0||s<=0)return p.error.nm;if(o>a)return p.error.nm;if(l>=t)return 0;for(var u=0,f=0,e=1;e<=o;e++)f=Math.min((t-u)*(s/a),t-l-u),u+=f;return f}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},RATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=0;if(arguments.length>=4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o)}var s=0;if(arguments.length>=5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}var u=.1;if(arguments.length==6){if(u=D.getFirstValue(arguments[5]),H(u))return u;if(!B(u))return p.error.v;u=parseFloat(u)}if(s!=0&&s!=1)return p.error.nm;for(var f=1e-6,d=100,m=0,g=!1,y=u;m<d&&!g;){var v=Math.pow(y+1,t),b=Math.pow(y+1,t-1),k=o+v*a+l*(v-1)*(y*s+1)/y,w=t*b*a-l*(v-1)*(y*s+1)/Math.pow(y,2),x=t*l*b*(y*s+1)/y+l*(v-1)*s/y,C=y-k/(w+x);Math.abs(C-y)<f&&(g=!0),m++,y=C}return g?y:p.error.nm}catch(_){var S=_;return S=p.errorInfo(S),[p.error.v,S]}},CUMPRINC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseInt(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=D.getFirstValue(arguments[5]);if(H(u))return u;if(!B(u))return p.error.v;if(u=parseFloat(u),t<=0||l<=0||a<=0)return p.error.nm;if(o<1||s<1||o>s)return p.error.nm;if(u!=0&&u!=1)return p.error.nm;var f=window.luckysheet_function.PMT.f(t,l,a,0,u),d=0;o===1&&(u===0?d=f+a*t:d=f,o++);for(var e=o;e<=s;e++)u>0?d+=f-(window.luckysheet_function.FV.f(t,e-2,f,a,1)-f)*t:d+=f-window.luckysheet_function.FV.f(t,e-1,f,a,0)*t;return d}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},COUPNUM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=0;if(arguments.length==4){var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}if(a!=1&&a!=2&&a!=4)return p.error.nm;if(o<0||o>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var s=(0,j.default)(t).date(),u=(0,j.default)(t).month()+1,f=(0,j.default)(t).year(),d=(0,j.default)(l).date(),m=(0,j.default)(l).month()+1,g=(0,j.default)(l).year(),y;switch(o){case 0:s===31&&d===31?(s=30,d=30):s===31?s=30:s===30&&d===31&&(d=30),y=(d+m*30+g*360-(s+u*30+f*360))/(360/a);break;case 1:var v=365;if(f===g||f+1===g&&(u>m||u===m&&s>=d))return(f===g&&D.isLeapYear(f)||D.feb29Between(t,l)||m===1&&d===29)&&(v=366),(0,j.default)(l).diff((0,j.default)(t),"days")/(v/a);var b=g-f+1,k=((0,j.default)().set({year:g+1,month:0,date:1})-(0,j.default)().set({year:f,month:0,date:1}))/1e3/60/60/24,w=k/b;y=(0,j.default)(l).diff((0,j.default)(t),"days")/(w/a);break;case 2:y=(0,j.default)(l).diff((0,j.default)(t),"days")/(360/a);break;case 3:y=(0,j.default)(l).diff((0,j.default)(t),"days")/(365/a);break;case 4:y=(d+m*30+g*360-(s+u*30+f*360))/(360/a);break}return Math.round(y)}catch(C){var x=C;return x=p.errorInfo(x),[p.error.v,x]}},SYD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);return H(o)?o:B(o)?(o=parseInt(o),a==0?p.error.nm:o<1||o>a?p.error.nm:(t-l)*(a-o+1)*2/(a*(a+1))):p.error.v}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},TBILLEQ:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseFloat(a),a<=0?p.error.nm:(0,j.default)(t)-(0,j.default)(l)>0?p.error.nm:(0,j.default)(l)-(0,j.default)(t)>365*24*60*60*1e3?p.error.nm:365*a/(360-a*(0,j.default)(l).diff((0,j.default)(t),"days"))):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},TBILLYIELD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseFloat(a),a<=0?p.error.nm:(0,j.default)(t)-(0,j.default)(l)>=0?p.error.nm:(0,j.default)(l)-(0,j.default)(t)>365*24*60*60*1e3?p.error.nm:(100-a)/a*(360/(0,j.default)(l).diff((0,j.default)(t),"days"))):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},TBILLPRICE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseFloat(a),a<=0?p.error.nm:(0,j.default)(t)-(0,j.default)(l)>0?p.error.nm:(0,j.default)(l)-(0,j.default)(t)>365*24*60*60*1e3?p.error.nm:100*(1-a*(0,j.default)(l).diff((0,j.default)(t),"days")/360)):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},PV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=0;if(arguments.length>=4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o)}var s=0;if(arguments.length>=5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}if(s!=0&&s!=1)return p.error.nm;if(t===0)var u=-a*l-o;else var u=((1-Math.pow(1+t,l))/t*a*(1+t*s)-o)/Math.pow(1+t,l);return u}catch(d){var f=d;return f=p.errorInfo(f),[p.error.v,f]}},ACCRINT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getCellDate(arguments[2]);if(H(a))return a;if(!(0,j.default)(a).isValid())return p.error.v;var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s);var u=D.getFirstValue(arguments[5]);if(H(u))return u;if(!B(u))return p.error.v;u=parseInt(u);var f=0;if(arguments.length>=7){if(f=D.getFirstValue(arguments[6]),H(f))return f;if(!B(f))return p.error.v;f=parseInt(f)}var d=!0;if(arguments.length==8&&(d=D.getCellBoolen(arguments[7]),H(d)))return d;if(o<=0||s<=0)return p.error.nm;if(u!=1&&u!=2&&u!=4)return p.error.nm;if(f<0||f>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(a)>=0)return p.error.nm;var m;if((0,j.default)(a)-(0,j.default)(l)>=0&&!d){var g=(0,j.default)(l).date(),y=(0,j.default)(l).month()+1,v=(0,j.default)(l).year(),b=(0,j.default)(a).date(),k=(0,j.default)(a).month()+1,w=(0,j.default)(a).year();switch(f){case 0:g===31&&b===31?(g=30,b=30):g===31?g=30:g===30&&b===31&&(b=30),m=(b+k*30+w*360-(g+y*30+v*360))/360;break;case 1:var x=365;if(v===w||v+1===w&&(y>k||y===k&&g>=b))return(v===w&&D.isLeapYear(v)||D.feb29Between(l,a)||k===1&&b===29)&&(x=366),(0,j.default)(a).diff((0,j.default)(l),"days")/x;var C=w-v+1,S=((0,j.default)().set({year:w+1,month:0,date:1})-(0,j.default)().set({year:v,month:0,date:1}))/1e3/60/60/24,_=S/C;m=(0,j.default)(a).diff((0,j.default)(l),"days")/_;break;case 2:m=(0,j.default)(a).diff((0,j.default)(l),"days")/360;break;case 3:m=(0,j.default)(a).diff((0,j.default)(l),"days")/365;break;case 4:m=(b+k*30+w*360-(g+y*30+v*360))/360;break}}else{var g=(0,j.default)(t).date(),y=(0,j.default)(t).month()+1,v=(0,j.default)(t).year(),b=(0,j.default)(a).date(),k=(0,j.default)(a).month()+1,w=(0,j.default)(a).year();switch(f){case 0:g===31&&b===31?(g=30,b=30):g===31?g=30:g===30&&b===31&&(b=30),m=(b+k*30+w*360-(g+y*30+v*360))/360;break;case 1:var x=365;if(v===w||v+1===w&&(y>k||y===k&&g>=b))return(v===w&&D.isLeapYear(v)||D.feb29Between(t,a)||k===1&&b===29)&&(x=366),(0,j.default)(a).diff((0,j.default)(t),"days")/x;var C=w-v+1,S=((0,j.default)().set({year:w+1,month:0,date:1})-(0,j.default)().set({year:v,month:0,date:1}))/1e3/60/60/24,_=S/C;m=(0,j.default)(a).diff((0,j.default)(t),"days")/_;break;case 2:m=(0,j.default)(a).diff((0,j.default)(t),"days")/360;break;case 3:m=(0,j.default)(a).diff((0,j.default)(t),"days")/365;break;case 4:m=(b+k*30+w*360-(g+y*30+v*360))/360;break}}return s*o*m}catch(A){var T=A;return T=p.errorInfo(T),[p.error.v,T]}},ACCRINTM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseInt(s)}if(a<=0||o<=0)return p.error.nm;if(s<0||s>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var u=(0,j.default)(t).date(),f=(0,j.default)(t).month()+1,d=(0,j.default)(t).year(),m=(0,j.default)(l).date(),g=(0,j.default)(l).month()+1,y=(0,j.default)(l).year(),v;switch(s){case 0:u===31&&m===31?(u=30,m=30):u===31?u=30:u===30&&m===31&&(m=30),v=(m+g*30+y*360-(u+f*30+d*360))/360;break;case 1:var b=365;if(d===y||d+1===y&&(f>g||f===g&&u>=m))return(d===y&&D.isLeapYear(d)||D.feb29Between(t,l)||g===1&&m===29)&&(b=366),(0,j.default)(l).diff((0,j.default)(t),"days")/b;var k=y-d+1,w=((0,j.default)().set({year:y+1,month:0,date:1})-(0,j.default)().set({year:d,month:0,date:1}))/1e3/60/60/24,x=w/k;v=(0,j.default)(l).diff((0,j.default)(t),"days")/x;break;case 2:v=(0,j.default)(l).diff((0,j.default)(t),"days")/360;break;case 3:v=(0,j.default)(l).diff((0,j.default)(t),"days")/365;break;case 4:v=(m+g*30+y*360-(u+f*30+d*360))/360;break}return o*a*v}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},COUPDAYBS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=0;if(arguments.length==4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}if(a!=1&&a!=2&&a!=4)return p.error.nm;if(o<0||o>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;for(var s,u=Math.ceil((0,j.default)(l).diff((0,j.default)(t),"months")/(12/a))+1,e=1;e<=u;e++){var f=(0,j.default)(l).subtract(12/a*e,"months");if(f<=(0,j.default)(t)){s=f;break}}var d;switch(o){case 0:var m=(0,j.default)(s).date(),g=(0,j.default)(s).month()+1,y=(0,j.default)(s).year(),v=(0,j.default)(t).date(),b=(0,j.default)(t).month()+1,k=(0,j.default)(t).year();m===31&&v===31?(m=30,v=30):m===31?m=30:m===30&&v===31&&(v=30),d=v+b*30+k*360-(m+g*30+y*360);break;case 1:case 2:case 3:d=(0,j.default)(t).diff((0,j.default)(s),"days");break;case 4:var m=(0,j.default)(s).date(),g=(0,j.default)(s).month()+1,y=(0,j.default)(s).year(),v=(0,j.default)(t).date(),b=(0,j.default)(t).month()+1,k=(0,j.default)(t).year();d=v+b*30+k*360-(m+g*30+y*360);break}return d}catch(x){var w=x;return w=p.errorInfo(w),[p.error.v,w]}},COUPDAYS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=0;if(arguments.length==4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}if(a!=1&&a!=2&&a!=4)return p.error.nm;if(o<0||o>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var s;switch(o){case 0:s=360/a;break;case 1:for(var u=Math.ceil((0,j.default)(l).diff((0,j.default)(t),"months")/(12/a))+1,e=1;e<=u;e++){var f=(0,j.default)(l).subtract(12/a*e,"months");if(f<=(0,j.default)(t)){var d=(0,j.default)(l).subtract(12/a*(e-1),"months");s=(0,j.default)(d).diff((0,j.default)(f),"days");break}}break;case 2:s=360/a;break;case 3:s=365/a;break;case 4:s=360/a;break}return s}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},COUPDAYSNC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=0;if(arguments.length==4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}if(a!=1&&a!=2&&a!=4)return p.error.nm;if(o<0||o>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;for(var s,u=Math.ceil((0,j.default)(l).diff((0,j.default)(t),"months")/(12/a))+1,e=1;e<=u;e++){var f=(0,j.default)(l).subtract(12/a*e,"months");if(f<=(0,j.default)(t)){s=(0,j.default)(l).subtract(12/a*(e-1),"months");break}}var d;switch(o){case 0:var m=(0,j.default)(t).date(),g=(0,j.default)(t).month()+1,y=(0,j.default)(t).year(),v=(0,j.default)(s).date(),b=(0,j.default)(s).month()+1,k=(0,j.default)(s).year();m===31&&v===31?(m=30,v=30):m===31?m=30:m===30&&v===31&&(v=30),d=v+b*30+k*360-(m+g*30+y*360);break;case 1:case 2:case 3:d=(0,j.default)(s).diff((0,j.default)(t),"days");break;case 4:var m=(0,j.default)(t).date(),g=(0,j.default)(t).month()+1,y=(0,j.default)(t).year(),v=(0,j.default)(s).date(),b=(0,j.default)(s).month()+1,k=(0,j.default)(s).year();d=v+b*30+k*360-(m+g*30+y*360);break}return d}catch(x){var w=x;return w=p.errorInfo(w),[p.error.v,w]}},COUPNCD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=0;if(arguments.length==4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}if(a!=1&&a!=2&&a!=4)return p.error.nm;if(o<0||o>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;for(var s,u=Math.ceil((0,j.default)(l).diff((0,j.default)(t),"months")/(12/a))+1,e=1;e<=u;e++){var f=(0,j.default)(l).subtract(12/a*e,"months");if(f<=(0,j.default)(t)){s=(0,j.default)(l).subtract(12/a*(e-1),"months");break}}return(0,j.default)(s).format("YYYY-MM-DD")}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},COUPPCD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=0;if(arguments.length==4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}if(a!=1&&a!=2&&a!=4)return p.error.nm;if(o<0||o>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;for(var s,u=Math.ceil((0,j.default)(l).diff((0,j.default)(t),"months")/(12/a))+1,e=1;e<=u;e++){var f=(0,j.default)(l).subtract(12/a*e,"months");if(f<=(0,j.default)(t)){s=f;break}}return(0,j.default)(s).format("YYYY-MM-DD")}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},FV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=0;if(arguments.length>=4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o)}var s=0;if(arguments.length>=5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}if(s!=0&&s!=1)return p.error.nm;var u;if(t===0)u=o+a*l;else{var f=Math.pow(1+t,l);s===1?u=o*f+a*(1+t)*(f-1)/t:u=o*f+a*(f-1)/t}return-u}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},FVSCHEDULE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=arguments[1],a=[];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;a=a.concat(D.getDataArr(l,!1))}else P(l)=="object"&&l.startCell!=null?a=a.concat(D.getCellDataArr(l,"number",!1)):a.push(l);for(var o=[],e=0;e<a.length;e++){var s=a[e];if(!B(s))return p.error.v;o.push(parseFloat(s))}for(var u=o.length,f=t,e=0;e<u;e++)f*=1+o[e];return f}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},YIELD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s);var u=D.getFirstValue(arguments[5]);if(H(u))return u;if(!B(u))return p.error.v;u=parseInt(u);var f=0;if(arguments.length==7){if(f=D.getFirstValue(arguments[6]),H(f))return f;if(!B(f))return p.error.v;f=parseInt(f)}if(a<0)return p.error.nm;if(o<=0||s<=0)return p.error.nm;if(u!=1&&u!=2&&u!=4)return p.error.nm;if(f<0||f>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var d=window.luckysheet_function.COUPNUM.f(t,l,u,f);if(d>1){for(var m=1,g=0,y=m,e=1;e<=100;e++){var v=window.luckysheet_function.PRICE.f(t,l,a,y,s,u,f);if(Math.abs(v-o)<1e-6)break;v>o?g=y:m=y,y=(m+g)/2}var b=y}else var k=window.luckysheet_function.COUPDAYSNC.f(t,l,u,f),w=window.luckysheet_function.COUPDAYS.f(t,l,u,f),x=window.luckysheet_function.COUPDAYBS.f(t,l,u,f),C=s/100+a/u,S=o/100+x/w*(a/u),_=u*w/k,b=(C-S)/S*_;return b}catch(A){var T=A;return T=p.errorInfo(T),[p.error.v,T]}},YIELDDISC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseInt(s)}if(a<=0||o<=0)return p.error.nm;if(s<0||s>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var u=window.luckysheet_function.YEARFRAC.f(t,l,s);return(o/a-1)/u}catch(d){var f=d;return f=p.errorInfo(f),[p.error.v,f]}},NOMINAL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),t<=0||l<1?p.error.nm:(Math.pow(t+1,1/l)-1)*l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},XIRR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!1)):l.push(t);for(var a=[],e=0;e<l.length;e++){var o=l[e];if(!B(o))return p.error.v;a.push(parseFloat(o))}var s=D.getCellrangeDate(arguments[1]);if(H(s))return s;for(var e=0;e<s.length;e++)if(!(0,j.default)(s[e]).isValid())return p.error.v;var u=.1;if(arguments.length==3){if(u=D.getFirstValue(arguments[2]),H(u))return u;if(!B(u))return p.error.v;u=parseFloat(u)}for(var f=!1,d=!1,e=0;e<a.length&&(a[e]>0&&(f=!0),a[e]<0&&(d=!0),!(f&&d));e++);if(!f||!d)return p.error.nm;if(a.length!=s.length)return p.error.nm;var m=function(S,_,T){for(var A=T+1,R=S[0],I=1;I<S.length;I++)R+=S[I]/Math.pow(A,window.luckysheet_function.DAYS.f(_[I],_[0])/365);return R},g=function(S,_,T){for(var A=T+1,R=0,I=1;I<S.length;I++){var F=window.luckysheet_function.DAYS.f(_[I],_[0])/365;R-=F*S[I]/Math.pow(A,F+1)}return R},y=u,v=1e-10,b,k,w,x=!0;do w=m(a,s,y),b=y-w/g(a,s,y),k=Math.abs(b-y),y=b,x=k>v&&Math.abs(w)>v;while(x);return y}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},MIRR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!1)):l.push(t);for(var a=[],e=0;e<l.length;e++){var o=l[e];if(!B(o))return p.error.v;a.push(parseFloat(o))}var s=D.getFirstValue(arguments[1]);if(H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s);var u=D.getFirstValue(arguments[2]);if(H(u))return u;if(!B(u))return p.error.v;u=parseFloat(u);for(var f=a.length,d=[],m=[],e=0;e<f;e++)a[e]<0?d.push(a[e]):m.push(a[e]);if(d.length==0||m.length==0)return p.error.d;var g=-window.luckysheet_function.NPV.f(u,m)*Math.pow(1+u,f-1),y=window.luckysheet_function.NPV.f(s,d)*(1+s);return Math.pow(g/y,1/(f-1))-1}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},IRR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"number",!0)):l.push(t);for(var a=[],e=0;e<l.length;e++){var o=l[e];if(!B(o))return p.error.v;a.push(parseFloat(o))}var s=.1;if(arguments.length==2){if(s=D.getFirstValue(arguments[1]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}for(var u=[],f=!1,d=!1,e=0;e<l.length;e++)u[e]=e===0?0:u[e-1]+365,l[e]>0&&(f=!0),l[e]<0&&(d=!0);if(!f||!d)return p.error.nm;var m=function(S,_,T){for(var A=T+1,R=S[0],I=1;I<S.length;I++)R+=S[I]/Math.pow(A,(_[I]-_[0])/365);return R},g=function(S,_,T){for(var A=T+1,R=0,I=1;I<S.length;I++){var F=(_[I]-_[0])/365;R-=F*S[I]/Math.pow(A,F+1)}return R},y=s,v=1e-10,b,k,w,x=!0;do w=m(a,u,y),b=y-w/g(a,u,y),k=Math.abs(b-y),y=b,x=k>v&&Math.abs(w)>v;while(x);return y}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},NPV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);for(var l=[],e=1;e<arguments.length;e++){var a=arguments[e];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;l=l.concat(D.getDataArr(a,!0))}else P(a)=="object"&&a.startCell!=null?l=l.concat(D.getCellDataArr(a,"number",!0)):l.push(a)}for(var o=[],e=0;e<l.length;e++){var s=l[e];B(s)&&o.push(parseFloat(s))}var u=0;if(o.length>0)for(var e=0;e<o.length;e++)u+=o[e]/Math.pow(1+t,e+1);return u}catch(d){var f=d;return f=p.errorInfo(f),[p.error.v,f]}},XNPV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=arguments[1],a=[];if(P(l)=="array"){if(P(l[0])=="array"&&!D.isDyadicArr(l))return p.error.v;a=a.concat(D.getDataArr(l,!1))}else P(l)=="object"&&l.startCell!=null?a=a.concat(D.getCellDataArr(l,"number",!1)):a.push(l);for(var o=[],e=0;e<a.length;e++){var s=a[e];if(!B(s))return p.error.v;o.push(parseFloat(s))}var u=D.getCellrangeDate(arguments[2]);if(H(u))return u;for(var e=0;e<u.length;e++)if(!(0,j.default)(u[e]).isValid())return p.error.v;if(o.length!=u.length)return p.error.nm;for(var f=0,e=0;e<o.length;e++)f+=o[e]/Math.pow(1+t,window.luckysheet_function.DAYS.f(u[e],u[0])/365);return f}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},CUMIPMT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseInt(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=D.getFirstValue(arguments[5]);if(H(u))return u;if(!B(u))return p.error.v;if(u=parseFloat(u),t<=0||l<=0||a<=0)return p.error.nm;if(o<1||s<1||o>s)return p.error.nm;if(u!=0&&u!=1)return p.error.nm;var f=window.luckysheet_function.PMT.f(t,l,a,0,u),d=0;o===1&&u===0&&(d=-a,o++);for(var e=o;e<=s;e++)u===1?d+=window.luckysheet_function.FV.f(t,e-2,f,a,1)-f:d+=window.luckysheet_function.FV.f(t,e-1,f,a,0);return d*=t,d}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},PMT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=0;if(arguments.length>=4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o)}var s=0;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}if(s!=0&&s!=1)return p.error.nm;var u;if(t===0)u=(a+o)/l;else{var f=Math.pow(1+t,l);s===1?u=(o*t/(f-1)+a*t/(1-1/f))/(1+t):u=o*t/(f-1)+a*t/(1-1/f)}return-u}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},IPMT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length>=5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}var u=0;if(arguments.length>=6){if(u=D.getFirstValue(arguments[5]),H(u))return u;if(!B(u))return p.error.v;u=parseFloat(u)}if(l<1||l>a)return p.error.nm;if(u!=0&&u!=1)return p.error.nm;var f=window.luckysheet_function.PMT.f(t,a,o,s,u),d;l===1?u===1?d=0:d=-o:u===1?d=window.luckysheet_function.FV.f(t,l-2,f,o,1)-f:d=window.luckysheet_function.FV.f(t,l-1,f,o,0);var m=d*t;return m}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},PPMT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length>=5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}var u=0;if(arguments.length>=6){if(u=D.getFirstValue(arguments[5]),H(u))return u;if(!B(u))return p.error.v;u=parseFloat(u)}if(l<1||l>a)return p.error.nm;if(u!=0&&u!=1)return p.error.nm;var f=window.luckysheet_function.PMT.f(t,a,o,s,u),d=window.luckysheet_function.IPMT.f(t,l,a,o,s,u);return f-d}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},INTRATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseInt(s)}if(a<=0||o<=0)return p.error.nm;if(s<0||s>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var u=(0,j.default)(t).date(),f=(0,j.default)(t).month()+1,d=(0,j.default)(t).year(),m=(0,j.default)(l).date(),g=(0,j.default)(l).month()+1,y=(0,j.default)(l).year(),v;switch(s){case 0:u===31&&m===31?(u=30,m=30):u===31?u=30:u===30&&m===31&&(m=30),v=360/(m+g*30+y*360-(u+f*30+d*360));break;case 1:var b=365;if(d===y||d+1===y&&(f>g||f===g&&u>=m))return(d===y&&D.isLeapYear(d)||D.feb29Between(t,l)||g===1&&m===29)&&(b=366),v=b/(0,j.default)(l).diff((0,j.default)(t),"days"),v=(o-a)/a*v,v;var k=y-d+1,w=((0,j.default)().set({year:y+1,month:0,date:1})-(0,j.default)().set({year:d,month:0,date:1}))/1e3/60/60/24,x=w/k;v=x/(0,j.default)(l).diff((0,j.default)(t),"days");break;case 2:v=360/(0,j.default)(l).diff((0,j.default)(t),"days");break;case 3:v=365/(0,j.default)(l).diff((0,j.default)(t),"days");break;case 4:v=360/(m+g*30+y*360-(u+f*30+d*360));break}return v=(o-a)/a*v,v}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},PRICE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s);var u=D.getFirstValue(arguments[5]);if(H(u))return u;if(!B(u))return p.error.v;u=parseInt(u);var f=0;if(arguments.length==7){if(f=D.getFirstValue(arguments[6]),H(f))return f;if(!B(f))return p.error.v;f=parseInt(f)}if(a<0||o<0)return p.error.nm;if(s<=0)return p.error.nm;if(u!=1&&u!=2&&u!=4)return p.error.nm;if(f<0||f>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var d=window.luckysheet_function.COUPDAYSNC.f(t,l,u,f),m=window.luckysheet_function.COUPDAYS.f(t,l,u,f),g=window.luckysheet_function.COUPDAYBS.f(t,l,u,f),y=window.luckysheet_function.COUPNUM.f(t,l,u,f);if(y>1){for(var v=s/Math.pow(1+o/u,y-1+d/m),b=0,e=1;e<=y;e++)b+=100*a/u/Math.pow(1+o/u,e-1+d/m);var k=100*(a/u)*(g/m),w=v+b-k}else var x=m-g,v=100*(a/u)+s,b=o/u*(x/m)+1,k=100*(a/u)*(g/m),w=v/b-k;return w}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},PRICEDISC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseInt(s)}if(a<=0||o<=0)return p.error.nm;if(s<0||s>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var u=(0,j.default)(t).date(),f=(0,j.default)(t).month()+1,d=(0,j.default)(t).year(),m=(0,j.default)(l).date(),g=(0,j.default)(l).month()+1,y=(0,j.default)(l).year(),v;switch(s){case 0:u===31&&m===31?(u=30,m=30):u===31?u=30:u===30&&m===31&&(m=30),v=(m+g*30+y*360-(u+f*30+d*360))/360;break;case 1:var b=365;if(d===y||d+1===y&&(f>g||f===g&&u>=m))return(d===y&&D.isLeapYear(d)||D.feb29Between(t,l)||g===1&&m===29)&&(b=366),v=(0,j.default)(l).diff((0,j.default)(t),"days")/b,v=o-a*o*v,v;var k=y-d+1,w=((0,j.default)().set({year:y+1,month:0,date:1})-(0,j.default)().set({year:d,month:0,date:1}))/1e3/60/60/24,x=w/k;v=(0,j.default)(l).diff((0,j.default)(t),"days")/x;break;case 2:v=(0,j.default)(l).diff((0,j.default)(t),"days")/360;break;case 3:v=(0,j.default)(l).diff((0,j.default)(t),"days")/365;break;case 4:v=(m+g*30+y*360-(u+f*30+d*360))/360;break}return v=o-a*o*v,v}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},PRICEMAT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getCellDate(arguments[2]);if(H(a))return a;if(!(0,j.default)(a).isValid())return p.error.v;var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s);var u=0;if(arguments.length==6){if(u=D.getFirstValue(arguments[5]),H(u))return u;if(!B(u))return p.error.v;u=parseInt(u)}if(o<0||s<0)return p.error.nm;if(u<0||u>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var f=(0,j.default)(t).date(),d=(0,j.default)(t).month()+1,m=(0,j.default)(t).year(),g=(0,j.default)(l).date(),y=(0,j.default)(l).month()+1,v=(0,j.default)(l).year(),b=(0,j.default)(a).date(),k=(0,j.default)(a).month()+1,w=(0,j.default)(a).year(),x;switch(u){case 0:f==31&&(f=30),g==31&&(g=30),b==31&&(b=30);var C=360,S=g+y*30+v*360-(f+d*30+m*360),_=g+y*30+v*360-(b+k*30+w*360),T=f+d*30+m*360-(b+k*30+w*360);break;case 1:var A=365;if(m===v||m+1===v&&(d>y||d===y&&f>=g)){(m===v&&D.isLeapYear(m)||D.feb29Between(t,l)||y===1&&g===29)&&(A=366);var C=A,S=(0,j.default)(l).diff((0,j.default)(t),"days"),_=(0,j.default)(t).diff((0,j.default)(a),"days"),T=(0,j.default)(l).diff((0,j.default)(a),"days");return x=(100+_/C*o*100)/(1+S/C*s)-T/C*o*100,x}var R=v-m+1,I=((0,j.default)().set({year:v+1,month:0,date:1})-(0,j.default)().set({year:m,month:0,date:1}))/1e3/60/60/24,F=I/R,C=F,S=(0,j.default)(l).diff((0,j.default)(t),"days"),_=(0,j.default)(t).diff((0,j.default)(a),"days"),T=(0,j.default)(l).diff((0,j.default)(a),"days");break;case 2:var C=360,S=(0,j.default)(l).diff((0,j.default)(t),"days"),_=(0,j.default)(t).diff((0,j.default)(a),"days"),T=(0,j.default)(l).diff((0,j.default)(a),"days");break;case 3:var C=365,S=(0,j.default)(l).diff((0,j.default)(t),"days"),_=(0,j.default)(t).diff((0,j.default)(a),"days"),T=(0,j.default)(l).diff((0,j.default)(a),"days");break;case 4:var C=360,S=g+y*30+v*360-(f+d*30+m*360),_=g+y*30+v*360-(b+k*30+w*360),T=f+d*30+m*360-(b+k*30+w*360);break}return x=(100+_/C*o*100)/(1+S/C*s)-T/C*o*100,x}catch(M){var z=M;return z=p.errorInfo(z),[p.error.v,z]}},RECEIVED:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}if(a<=0||o<=0)return p.error.nm;if(s<0||s>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var u=(0,j.default)(t).date(),f=(0,j.default)(t).month()+1,d=(0,j.default)(t).year(),m=(0,j.default)(l).date(),g=(0,j.default)(l).month()+1,y=(0,j.default)(l).year(),v;switch(s){case 0:u==31&&(u=30),m==31&&(m=30);var b=360,k=m+g*30+y*360-(u+f*30+d*360);break;case 1:var w=365;if(d===y||d+1===y&&(f>g||f===g&&u>=m)){(d===y&&D.isLeapYear(d)||D.feb29Between(t,l)||g===1&&m===29)&&(w=366);var b=w,k=(0,j.default)(l).diff((0,j.default)(t),"days");return v=a/(1-o*k/b),v}var x=y-d+1,C=((0,j.default)().set({year:y+1,month:0,date:1})-(0,j.default)().set({year:d,month:0,date:1}))/1e3/60/60/24,S=C/x,b=S,k=(0,j.default)(l).diff((0,j.default)(t),"days");break;case 2:var b=360,k=(0,j.default)(l).diff((0,j.default)(t),"days");break;case 3:var b=365,k=(0,j.default)(l).diff((0,j.default)(t),"days");break;case 4:var b=360,k=m+g*30+y*360-(u+f*30+d*360);break}return v=a/(1-o*k/b),v}catch(T){var _=T;return _=p.errorInfo(_),[p.error.v,_]}},DISC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=0;if(arguments.length==5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}if(a<=0||o<=0)return p.error.nm;if(s<0||s>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var u=(0,j.default)(t).date(),f=(0,j.default)(t).month()+1,d=(0,j.default)(t).year(),m=(0,j.default)(l).date(),g=(0,j.default)(l).month()+1,y=(0,j.default)(l).year(),v;switch(s){case 0:u==31&&(u=30),m==31&&(m=30);var b=360,k=m+g*30+y*360-(u+f*30+d*360);break;case 1:var w=365;if(d===y||d+1===y&&(f>g||f===g&&u>=m)){(d===y&&D.isLeapYear(d)||D.feb29Between(t,l)||g===1&&m===29)&&(w=366);var b=w,k=(0,j.default)(l).diff((0,j.default)(t),"days");return v=(o-a)/o*(b/k),v}var x=y-d+1,C=((0,j.default)().set({year:y+1,month:0,date:1})-(0,j.default)().set({year:d,month:0,date:1}))/1e3/60/60/24,S=C/x,b=S,k=(0,j.default)(l).diff((0,j.default)(t),"days");break;case 2:var b=360,k=(0,j.default)(l).diff((0,j.default)(t),"days");break;case 3:var b=365,k=(0,j.default)(l).diff((0,j.default)(t),"days");break;case 4:var b=360,k=m+g*30+y*360-(u+f*30+d*360);break}return v=(o-a)/o*(b/k),v}catch(T){var _=T;return _=p.errorInfo(_),[p.error.v,_]}},NPER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=0;if(arguments.length>=4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o)}var s=0;if(arguments.length>=5){if(s=D.getFirstValue(arguments[4]),H(s))return s;if(!B(s))return p.error.v;s=parseFloat(s)}if(s!=0&&s!=1)return p.error.nm;var u=l*(1+t*s)-o*t,f=a*t+l*(1+t*s);return Math.log(u/f)/Math.log(1+t)}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},SLN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseFloat(a),a==0?p.error.d:(t-l)/a):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},DURATION:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=0;if(arguments.length==6){if(u=D.getFirstValue(arguments[5]),H(u))return u;if(!B(u))return p.error.v;u=parseInt(u)}if(a<0||o<0)return p.error.nm;if(s!=1&&s!=2&&s!=4)return p.error.nm;if(u<0||u>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;for(var f=window.luckysheet_function.COUPNUM.f(t,l,s,u),d=0,m=0,e=1;e<=f;e++)d+=100*(a/s)*e/Math.pow(1+o/s,e),m+=100*(a/s)/Math.pow(1+o/s,e);var g=(d+100*f/Math.pow(1+o/s,f))/(m+100/Math.pow(1+o/s,f));return g=g/s,g}catch(v){var y=v;return y=p.errorInfo(y),[p.error.v,y]}},MDURATION:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellDate(arguments[0]);if(H(t))return t;if(!(0,j.default)(t).isValid())return p.error.v;var l=D.getCellDate(arguments[1]);if(H(l))return l;if(!(0,j.default)(l).isValid())return p.error.v;var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a);var o=D.getFirstValue(arguments[3]);if(H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o);var s=D.getFirstValue(arguments[4]);if(H(s))return s;if(!B(s))return p.error.v;s=parseInt(s);var u=0;if(arguments.length==6){if(u=D.getFirstValue(arguments[5]),H(u))return u;if(!B(u))return p.error.v;u=parseInt(u)}if(a<0||o<0)return p.error.nm;if(s!=1&&s!=2&&s!=4)return p.error.nm;if(u<0||u>4)return p.error.nm;if((0,j.default)(t)-(0,j.default)(l)>=0)return p.error.nm;var f=window.luckysheet_function.DURATION.f(t,l,a,o,s,u);return f/(1+o/s)}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},BIN2DEC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!/^[01]{1,10}$/g.test(t))return p.error.nm;var l=parseInt(t,2),a=t.toString();return a.length===10&&a.substring(0,1)==="1"?parseInt(a.substring(1),2)-512:l}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},BIN2HEX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^[01]{1,10}$/g.test(t))return p.error.nm;var a=parseInt(t,2).toString(16).toUpperCase();return l==null?a:l<0||l<a.length?p.error.nm:new Array(l-a.length+1).join("0")+a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},BIN2OCT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^[01]{1,10}$/g.test(t))return p.error.nm;var a=t.toString();if(a.length===10&&a.substring(0,1)==="1")return(1073741312+parseInt(a.substring(1),2)).toString(8);var o=parseInt(t,2).toString(8);return l==null?o:l<0||l<o.length?p.error.nm:new Array(l-o.length+1).join("0")+o}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},DEC2BIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^-?[0-9]{1,3}$/.test(t)||t<-512||t>511)return p.error.nm;if(t<0)return"1"+new Array(9-(512+t).toString(2).length).join("0")+(512+t).toString(2);var a=parseInt(t,10).toString(2);return l==null?a:l<0||l<a.length?p.error.nm:new Array(l-a.length+1).join("0")+a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},DEC2HEX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^-?[0-9]{1,12}$/.test(t)||t<-549755813888||t>549755813887)return p.error.nm;if(t<0)return(1099511627776+t).toString(16).toUpperCase();var a=parseInt(t,10).toString(16).toUpperCase();return l==null?a:l<0||l<a.length?p.error.nm:new Array(l-a.length+1).join("0")+a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},DEC2OCT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^-?[0-9]{1,9}$/.test(t)||t<-536870912||t>536870911)return p.error.nm;if(t<0)return(1073741824+t).toString(8);var a=parseInt(t,10).toString(8);return l==null?a:l<0||l<a.length?p.error.nm:new Array(l-a.length+1).join("0")+a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},HEX2BIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^[0-9A-Fa-f]{1,10}$/.test(t))return p.error.nm;var a=t.length===10&&t.substring(0,1).toLowerCase()==="f",o=a?parseInt(t,16)-1099511627776:parseInt(t,16);if(o<-512||o>511)return p.error.nm;if(a)return"1"+new Array(9-(512+o).toString(2).length).join("0")+(512+o).toString(2);var s=o.toString(2);return l==null?s:l<0||l<s.length?p.error.nm:new Array(l-s.length+1).join("0")+s}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},HEX2DEC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!/^[0-9A-Fa-f]{1,10}$/.test(t))return p.error.nm;var l=parseInt(t,16);return l>=549755813888?l-1099511627776:l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},HEX2OCT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^[0-9A-Fa-f]{1,10}$/.test(t))return p.error.nm;var a=parseInt(t,16);if(a>536870911&&a<1098974756864)return p.error.nm;if(a>=1098974756864)return(a-1098437885952).toString(8);var o=a.toString(8);return l==null?o:l<0||l<o.length?p.error.nm:new Array(l-o.length+1).join("0")+o}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},OCT2BIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^[0-7]{1,10}$/.test(t))return p.error.nm;t=t.toString();var a=t.length===10&&t.substring(0,1)==="7",o=a?parseInt(t,8)-1073741824:parseInt(t,8);if(o<-512||o>511)return Me.num;if(a)return"1"+new Array(9-(512+o).toString(2).length).join("0")+(512+o).toString(2);var s=o.toString(2);return l==null?s:l<0||l<s.length?p.error.nm:new Array(l-s.length+1).join("0")+s}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},OCT2DEC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!/^[0-7]{1,10}$/.test(t))return p.error.nm;var l=parseInt(t,8);return l>=536870912?l-1073741824:l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},OCT2HEX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=null;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(!/^[0-7]{1,10}$/.test(t))return p.error.nm;var a=parseInt(t,8);if(a>=536870912)return"FF"+(a+3221225472).toString(16).toUpperCase();var o=a.toString(16).toUpperCase();return l==null?o:l<0||l<o.length?p.error.nm:new Array(l-o.length+1).join("0")+o}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},COMPLEX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l);var a="i";if(arguments.length==3&&(a=arguments[2].toString()),a!="i"&&a!="j")return p.error.v;if(t===0&&l===0)return 0;if(t===0)return l===1?a:l.toString()+a;if(l===0)return t.toString();var o=l>0?"+":"";return t.toString()+o+(l===1?a:l.toString()+a)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},IMREAL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(t=t.toString(),t.toLowerCase()=="true"||t.toLowerCase()=="false")return p.error.v;if(t=="0"||["i","+i","1i","+1i","-i","-1i","j","+j","1j","+1j","-j","-1j"].indexOf(t)>=0)return 0;var l=t.indexOf("+"),a=t.indexOf("-");l===0&&(l=t.indexOf("+",1)),a===0&&(a=t.indexOf("-",1));var o=t.substring(t.length-1,t.length),s=o==="i"||o==="j";return l>=0||a>=0?s?l>=0?isNaN(t.substring(0,l))||isNaN(t.substring(l+1,t.length-1))?p.error.nm:Number(t.substring(0,l)):isNaN(t.substring(0,a))||isNaN(t.substring(a+1,t.length-1))?p.error.nm:Number(t.substring(0,a)):p.error.nm:s?isNaN(t.substring(0,t.length-1))?p.error.nm:0:isNaN(t)?p.error.nm:t}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},IMAGINARY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(t=t.toString(),t.toLowerCase()=="true"||t.toLowerCase()=="false")return p.error.v;if(t=="0")return 0;if(["i","j"].indexOf(t)>=0)return 1;t=t.replace("+i","+1i").replace("-i","-1i").replace("+j","+1j").replace("-j","-1j");var l=t.indexOf("+"),a=t.indexOf("-");l===0&&(l=t.indexOf("+",1)),a===0&&(a=t.indexOf("-",1));var o=t.substring(t.length-1,t.length),s=o==="i"||o==="j";return l>=0||a>=0?s?l>=0?isNaN(t.substring(0,l))||isNaN(t.substring(l+1,t.length-1))?p.error.nm:Number(t.substring(l+1,t.length-1)):isNaN(t.substring(0,a))||isNaN(t.substring(a+1,t.length-1))?p.error.nm:-Number(t.substring(a+1,t.length-1)):p.error.nm:s?isNaN(t.substring(0,t.length-1))?p.error.nm:t.substring(0,t.length-1):isNaN(t)?p.error.nm:0}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},IMCONJUGATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;t=t.toString();var l=window.luckysheet_function.IMREAL.f(t);if(H(l))return l;var a=window.luckysheet_function.IMAGINARY.f(t);if(H(a))return a;var o=t.substring(t.length-1);return o=o==="i"||o==="j"?o:"i",a!==0?window.luckysheet_function.COMPLEX.f(l,-a,o):t}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},IMABS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheet_function.IMREAL.f(arguments[0]);if(H(t))return t;var l=window.luckysheet_function.IMAGINARY.f(arguments[0]);return H(l)?l:Math.sqrt(Math.pow(t,2)+Math.pow(l,2))}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},DELTA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=0;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseFloat(l)}return t===l?1:0}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},IMSUM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheet_function.IMREAL.f(arguments[0]);if(H(t))return t;var l=window.luckysheet_function.IMAGINARY.f(arguments[0]);if(H(l))return l;for(var a=arguments[0],e=1;e<arguments.length;e++){var o=window.luckysheet_function.IMREAL.f(a);if(H(o))return o;var s=window.luckysheet_function.IMAGINARY.f(a);if(H(s))return s;var u=window.luckysheet_function.IMREAL.f(arguments[e]);if(H(u))return u;var f=window.luckysheet_function.IMAGINARY.f(arguments[e]);if(H(f))return f;a=window.luckysheet_function.COMPLEX.f(o+u,s+f)}return a}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},IMSUB:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(t=t.toString(),t.toLowerCase()=="true"||t.toLowerCase()=="false")return p.error.v;var l=window.luckysheet_function.IMREAL.f(t);if(H(l))return l;var a=window.luckysheet_function.IMAGINARY.f(t);if(H(a))return a;var o=D.getFirstValue(arguments[1]);if(H(o))return o;if(o=o.toString(),o.toLowerCase()=="true"||o.toLowerCase()=="false")return p.error.v;var s=window.luckysheet_function.IMREAL.f(o);if(H(s))return s;var u=window.luckysheet_function.IMAGINARY.f(o);if(H(u))return u;var f=t.substring(t.length-1),d=o.substring(o.length-1),m="i";return(f==="j"||d==="j")&&(m="j"),window.luckysheet_function.COMPLEX.f(l-s,a-u,m)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},IMPRODUCT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheet_function.IMREAL.f(arguments[0]);if(H(t))return t;var l=window.luckysheet_function.IMAGINARY.f(arguments[0]);if(H(l))return l;for(var a=arguments[0],e=1;e<arguments.length;e++){var o=window.luckysheet_function.IMREAL.f(a);if(H(o))return o;var s=window.luckysheet_function.IMAGINARY.f(a);if(H(s))return s;var u=window.luckysheet_function.IMREAL.f(arguments[e]);if(H(u))return u;var f=window.luckysheet_function.IMAGINARY.f(arguments[e]);if(H(f))return f;a=window.luckysheet_function.COMPLEX.f(o*u-s*f,o*f+s*u)}return a}catch(m){var d=m;return d=p.errorInfo(d),[p.error.v,d]}},IMDIV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(t=t.toString(),t.toLowerCase()=="true"||t.toLowerCase()=="false")return p.error.v;var l=window.luckysheet_function.IMREAL.f(t);if(H(l))return l;var a=window.luckysheet_function.IMAGINARY.f(t);if(H(a))return a;var o=D.getFirstValue(arguments[1]);if(H(o))return o;if(o=o.toString(),o.toLowerCase()=="true"||o.toLowerCase()=="false")return p.error.v;var s=window.luckysheet_function.IMREAL.f(o);if(H(s))return s;var u=window.luckysheet_function.IMAGINARY.f(o);if(H(u))return u;var f=t.substring(t.length-1),d=o.substring(o.length-1),m="i";if((f==="j"||d==="j")&&(m="j"),s===0&&u===0)return p.error.nm;var g=s*s+u*u;return window.luckysheet_function.COMPLEX.f((l*s+a*u)/g,(a*s-l*u)/g,m)}catch(v){var y=v;return y=p.errorInfo(y),[p.error.v,y]}},NOT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellBoolen(arguments[0]);return H(t)?t:!t}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},TRUE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return!0}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},FALSE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return!1}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},AND:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=!0,e=0;e<arguments.length;e++){var l=D.getCellBoolen(arguments[e]);if(H(l))return l;if(!l){t=!1;break}}return t}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},IFERROR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[1],"text"),l=D.getFirstValue(arguments[0],"text");return H(l)||P(l)==="string"&&$.trim(l)===""?t:l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},IF:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getCellBoolen(arguments[0]);if(H(t))return t;var l=D.getFirstValue(arguments[1],"text");if(H(l)&&a!=Me.d)return l;var a="";return arguments.length==3&&(a=D.getFirstValue(arguments[2],"text"),H(a)&&a!=Me.d)?a:t?l:a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},OR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t=!1,e=0;e<arguments.length;e++){var l=D.getCellBoolen(arguments[e]);if(H(l))return l;if(l){t=!0;break}}return t}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},NE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=D.getFirstValue(arguments[1]);return H(l)?l:t!=l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},EQ:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;var l=D.getFirstValue(arguments[1]);return H(l)?l:t==l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},GT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t>l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},GTE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t>=l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},LT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t<l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},LTE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t<=l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ADD:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t+l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},MINUS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t-l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},MULTIPLY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),t*l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},DIVIDE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseFloat(l),l==0?p.error.d:t/l):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},CONCAT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;var l=D.getFirstValue(arguments[1],"text");return H(l)?l:t+""+l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},UNARY_PERCENT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=t/100;return Math.round(l*100)/100}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},CONCATENATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{for(var t="",e=0;e<arguments.length;e++){var l=D.getFirstValue(arguments[e],"text");if(H(l))return l;t=t+""+l}return t}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},CODE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:t==""?p.error.v:t.charCodeAt(0)}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},CHAR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseInt(t),t<1||t>255?p.error.v:String.fromCharCode(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},ARABIC:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;if(t=t.toString().toUpperCase(),!/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/.test(t))return p.error.v;var l=0;return t.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g,function(o){l+={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}[o]}),l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ROMAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let a=function(o){var s=[["","I","II","III","IV","V","VI","VII","VIII","IX"],["","X","XX","XXX","XL","L","LX","LXX","LXXX","XC"],["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM"],["","M","MM","MMM"]],u=s[3][Math.floor(o/1e3)],f=s[2][Math.floor(o%1e3/100)],d=s[1][Math.floor(o%100/10)],m=s[0][o%10];return u+f+d+m};var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseInt(t),t==0?"":t<1||t>3999?p.error.v:a(t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},REGEXEXTRACT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;var a=t.match(new RegExp(l));return a?a[a.length>1?a.length-1:0]:null}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},REGEXMATCH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;var a=t.match(new RegExp(l));return!!a}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},REGEXREPLACE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;var a=D.getFirstValue(arguments[2],"text");return H(a)?a:t.replace(new RegExp(l),a)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},T:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)||P(t)=="string"?t:""}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},FIXED:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=2;if(arguments.length>=2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}var a=!1;if(arguments.length==3&&(a=D.getCellBoolen(arguments[2]),H(a)))return a;if(l>127)return p.error.v;var o=a?"0":"#,##0";return l<=0?t=Math.round(t*Math.pow(10,l))/Math.pow(10,l):l>0&&(o+="."+new Array(l+1).join("0")),mt(o,t)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},FIND:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;l=l.toString();var a=1;if(arguments.length==3){if(a=D.getFirstValue(arguments[2]),H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a)}if(a<0||a>l.length)return p.error.v;if(t=="")return a;if(l.indexOf(t)==-1)return p.error.v;var o=l.indexOf(t,a-1)+1;return o}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},FINDB:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;l=l.toString();var a=1;if(arguments.length==3){if(a=D.getFirstValue(arguments[2]),H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a)}if(a<0||a>l.length)return p.error.v;if(t=="")return a;if(l.indexOf(t)==-1)return p.error.v;for(var o=l.split(""),s=l.indexOf(t,a-1),u=0,e=0;e<s;e++)/[^\x00-\xff]/g.test(o[e])?u+=2:u+=1;return u}catch(d){var f=d;return f=p.errorInfo(f),[p.error.v,f]}},JOIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;for(var l=[],e=1;e<arguments.length;e++){var a=arguments[e];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;l=l.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?l=l.concat(D.getCellDataArr(a,"text",!1)):l.push(a)}return l.join(t)}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},LEFT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=1;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}return l<0?p.error.v:l>=t.length?t:l==0?"":t.substr(0,l)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},RIGHT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=1;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}return l<0?p.error.v:l>=t.length?t:l==0?"":t.substr(-l,l)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},MID:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);return H(a)?a:B(a)?(a=parseInt(a),l<1||a<0?p.error.v:l>t.length?"":l+a>t.length?t.substr(l-1,t.length-l+1):t.substr(l-1,a)):p.error.v}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},LEN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(t=t.toString(),t.length)}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},LENB:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(t=t.toString(),t.replace(/[^\x00-\xff]/g,"aa").length)}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},LOWER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(t=t.toString(),t&&t.toLowerCase())}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},UPPER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(t=t.toString(),t&&t.toUpperCase())}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},EXACT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1],"text");return H(l)?l:(l=l.toString(),t===l)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},REPLACE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1]);if(H(l))return l;if(!B(l))return p.error.v;l=parseInt(l);var a=D.getFirstValue(arguments[2]);if(H(a))return a;if(!B(a))return p.error.v;a=parseInt(a);var o=D.getFirstValue(arguments[3],"text");return H(o)?o:(o=o.toString(),t.substr(0,l-1)+o+t.substr(l-1+a))}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},REPT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1]);return H(l)?l:B(l)?(l=parseInt(l),l<0?p.error.v:(l>100&&(l=100),new Array(l+1).join(t))):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},SEARCH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;l=l.toString();var a=1;if(arguments.length==3){if(a=D.getFirstValue(arguments[2]),H(a))return a;if(!B(a))return p.error.v;a=parseInt(a)}if(a<=0||a>l.length)return p.error.v;var o=l.toLowerCase().indexOf(t.toLowerCase(),a-1)+1;return o===0?p.error.v:o}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},SUBSTITUTE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;l=l.toString();var a=D.getFirstValue(arguments[2],"text");if(H(a))return a;a=a.toString();var o=null;if(arguments.length==4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseInt(o)}var s=new RegExp(l,"g"),u;if(o==null)u=t.replace(s,a);else{if(o<=0)return p.error.v;var f=t.match(s);if(f==null||o>f.length)return t;for(var d=l.length,m=0,e=1;e<=o;e++)m=t.indexOf(l,m)+1;u=t.substring(0,m-1)+a+t.substring(m-1+d)}return u}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},CLEAN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");if(H(t))return t;t=t.toString();for(var l=[],e=0;e<t.length;e++){var a=t.charCodeAt(e);(/[\u4e00-\u9fa5]/g.test(t.charAt(e))||a>31&&a<127)&&l.push(t.charAt(e))}return l.join("")}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},TEXT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1],"text");return H(l)?l:(l=l.toString(),mt(l,t))}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},TRIM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(t=t.toString(),t.replace(/ +/g," ").trim())}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},VALUE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(t=t.toString(),at(t)[2])}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},PROPER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(t=t.toString().toLowerCase(),t.replace(/[a-zA-Z]+/g,function(a){return a.substring(0,1).toUpperCase()+a.substring(1)}))}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},CONVERT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseFloat(t);var l=D.getFirstValue(arguments[1],"text");if(H(l))return l;l=l.toString();var a=D.getFirstValue(arguments[2],"text");if(H(a))return a;a=a.toString();for(var o=[["a.u. of action","?",null,"action",!1,!1,105457168181818e-48],["a.u. of charge","e",null,"electric_charge",!1,!1,160217653141414e-33],["a.u. of energy","Eh",null,"energy",!1,!1,435974417757576e-32],["a.u. of length","a?",null,"length",!1,!1,529177210818182e-25],["a.u. of mass","m?",null,"mass",!1,!1,910938261616162e-45],["a.u. of time","?/Eh",null,"time",!1,!1,241888432650516e-31],["admiralty knot","admkn",null,"speed",!1,!0,.514773333],["ampere","A",null,"electric_current",!0,!1,1],["ampere per meter","A/m",null,"magnetic_field_intensity",!0,!1,1],["\xE5ngstr\xF6m","\xC5",["ang"],"length",!1,!0,1e-10],["are","ar",null,"area",!1,!0,100],["astronomical unit","ua",null,"length",!1,!1,149597870691667e-25],["bar","bar",null,"pressure",!1,!1,1e5],["barn","b",null,"area",!1,!1,1e-28],["becquerel","Bq",null,"radioactivity",!0,!1,1],["bit","bit",["b"],"information",!1,!0,1],["btu","BTU",["btu"],"energy",!1,!0,1055.05585262],["byte","byte",null,"information",!1,!0,8],["candela","cd",null,"luminous_intensity",!0,!1,1],["candela per square metre","cd/m?",null,"luminance",!0,!1,1],["coulomb","C",null,"electric_charge",!0,!1,1],["cubic \xE5ngstr\xF6m","ang3",["ang^3"],"volume",!1,!0,1e-30],["cubic foot","ft3",["ft^3"],"volume",!1,!0,.028316846592],["cubic inch","in3",["in^3"],"volume",!1,!0,16387064e-12],["cubic light-year","ly3",["ly^3"],"volume",!1,!0,846786664623715e-61],["cubic metre","m?",null,"volume",!0,!0,1],["cubic mile","mi3",["mi^3"],"volume",!1,!0,416818182544058e-5],["cubic nautical mile","Nmi3",["Nmi^3"],"volume",!1,!0,6352182208],["cubic Pica","Pica3",["Picapt3","Pica^3","Picapt^3"],"volume",!1,!0,758660370370369e-22],["cubic yard","yd3",["yd^3"],"volume",!1,!0,.764554857984],["cup","cup",null,"volume",!1,!0,.0002365882365],["dalton","Da",["u"],"mass",!1,!1,166053886282828e-41],["day","d",["day"],"time",!1,!0,86400],["degree","\xB0",null,"angle",!1,!1,.0174532925199433],["degrees Rankine","Rank",null,"temperature",!1,!0,.555555555555556],["dyne","dyn",["dy"],"force",!1,!0,1e-5],["electronvolt","eV",["ev"],"energy",!1,!0,1.60217656514141],["ell","ell",null,"length",!1,!0,1.143],["erg","erg",["e"],"energy",!1,!0,1e-7],["farad","F",null,"electric_capacitance",!0,!1,1],["fluid ounce","oz",null,"volume",!1,!0,295735295625e-16],["foot","ft",null,"length",!1,!0,.3048],["foot-pound","flb",null,"energy",!1,!0,1.3558179483314],["gal","Gal",null,"acceleration",!1,!1,.01],["gallon","gal",null,"volume",!1,!0,.003785411784],["gauss","G",["ga"],"magnetic_flux_density",!1,!0,1],["grain","grain",null,"mass",!1,!0,647989e-10],["gram","g",null,"mass",!1,!0,.001],["gray","Gy",null,"absorbed_dose",!0,!1,1],["gross registered ton","GRT",["regton"],"volume",!1,!0,2.8316846592],["hectare","ha",null,"area",!1,!0,1e4],["henry","H",null,"inductance",!0,!1,1],["hertz","Hz",null,"frequency",!0,!1,1],["horsepower","HP",["h"],"power",!1,!0,745.69987158227],["horsepower-hour","HPh",["hh","hph"],"energy",!1,!0,2684519538e-3],["hour","h",["hr"],"time",!1,!0,3600],["imperial gallon (U.K.)","uk_gal",null,"volume",!1,!0,.00454609],["imperial hundredweight","lcwt",["uk_cwt","hweight"],"mass",!1,!0,50.802345],["imperial quart (U.K)","uk_qt",null,"volume",!1,!0,.0011365225],["imperial ton","brton",["uk_ton","LTON"],"mass",!1,!0,1016.046909],["inch","in",null,"length",!1,!0,.0254],["international acre","uk_acre",null,"area",!1,!0,4046.8564224],["IT calorie","cal",null,"energy",!1,!0,4.1868],["joule","J",null,"energy",!0,!0,1],["katal","kat",null,"catalytic_activity",!0,!1,1],["kelvin","K",["kel"],"temperature",!0,!0,1],["kilogram","kg",null,"mass",!0,!0,1],["knot","kn",null,"speed",!1,!0,.514444444444444],["light-year","ly",null,"length",!1,!0,9460730472580800],["litre","L",["l","lt"],"volume",!1,!0,.001],["lumen","lm",null,"luminous_flux",!0,!1,1],["lux","lx",null,"illuminance",!0,!1,1],["maxwell","Mx",null,"magnetic_flux",!1,!1,1e-18],["measurement ton","MTON",null,"volume",!1,!0,1.13267386368],["meter per hour","m/h",["m/hr"],"speed",!1,!0,.00027777777777778],["meter per second","m/s",["m/sec"],"speed",!0,!0,1],["meter per second squared","m?s??",null,"acceleration",!0,!1,1],["parsec","pc",["parsec"],"length",!1,!0,30856775814671900],["meter squared per second","m?/s",null,"kinematic_viscosity",!0,!1,1],["metre","m",null,"length",!0,!0,1],["miles per hour","mph",null,"speed",!1,!0,.44704],["millimetre of mercury","mmHg",null,"pressure",!1,!1,133.322],["minute","?",null,"angle",!1,!1,.000290888208665722],["minute","min",["mn"],"time",!1,!0,60],["modern teaspoon","tspm",null,"volume",!1,!0,5e-6],["mole","mol",null,"amount_of_substance",!0,!1,1],["morgen","Morgen",null,"area",!1,!0,2500],["n.u. of action","?",null,"action",!1,!1,105457168181818e-48],["n.u. of mass","m?",null,"mass",!1,!1,910938261616162e-45],["n.u. of speed","c?",null,"speed",!1,!1,299792458],["n.u. of time","?/(me?c??)",null,"time",!1,!1,128808866778687e-35],["nautical mile","M",["Nmi"],"length",!1,!0,1852],["newton","N",null,"force",!0,!0,1],["\u0153rsted","Oe ",null,"magnetic_field_intensity",!1,!1,79.5774715459477],["ohm","\u03A9",null,"electric_resistance",!0,!1,1],["ounce mass","ozm",null,"mass",!1,!0,.028349523125],["pascal","Pa",null,"pressure",!0,!1,1],["pascal second","Pa?s",null,"dynamic_viscosity",!0,!1,1],["pferdest\xE4rke","PS",null,"power",!1,!0,735.49875],["phot","ph",null,"illuminance",!1,!1,1e-4],["pica (1/6 inch)","pica",null,"length",!1,!0,.00035277777777778],["pica (1/72 inch)","Pica",["Picapt"],"length",!1,!0,.00423333333333333],["poise","P",null,"dynamic_viscosity",!1,!1,.1],["pond","pond",null,"force",!1,!0,.00980665],["pound force","lbf",null,"force",!1,!0,4.4482216152605],["pound mass","lbm",null,"mass",!1,!0,.45359237],["quart","qt",null,"volume",!1,!0,.000946352946],["radian","rad",null,"angle",!0,!1,1],["second","?",null,"angle",!1,!1,484813681109536e-20],["second","s",["sec"],"time",!0,!0,1],["short hundredweight","cwt",["shweight"],"mass",!1,!0,45.359237],["siemens","S",null,"electrical_conductance",!0,!1,1],["sievert","Sv",null,"equivalent_dose",!0,!1,1],["slug","sg",null,"mass",!1,!0,14.59390294],["square \xE5ngstr\xF6m","ang2",["ang^2"],"area",!1,!0,1e-20],["square foot","ft2",["ft^2"],"area",!1,!0,.09290304],["square inch","in2",["in^2"],"area",!1,!0,64516e-8],["square light-year","ly2",["ly^2"],"area",!1,!0,895054210748189e17],["square meter","m?",null,"area",!0,!0,1],["square mile","mi2",["mi^2"],"area",!1,!0,2589988110336e-6],["square nautical mile","Nmi2",["Nmi^2"],"area",!1,!0,3429904],["square Pica","Pica2",["Picapt2","Pica^2","Picapt^2"],"area",!1,!0,1792111111111e-17],["square yard","yd2",["yd^2"],"area",!1,!0,.83612736],["statute mile","mi",null,"length",!1,!0,1609.344],["steradian","sr",null,"solid_angle",!0,!1,1],["stilb","sb",null,"luminance",!1,!1,1e-4],["stokes","St",null,"kinematic_viscosity",!1,!1,1e-4],["stone","stone",null,"mass",!1,!0,6.35029318],["tablespoon","tbs",null,"volume",!1,!0,147868e-10],["teaspoon","tsp",null,"volume",!1,!0,492892e-11],["tesla","T",null,"magnetic_flux_density",!0,!0,1],["thermodynamic calorie","c",null,"energy",!1,!0,4.184],["ton","ton",null,"mass",!1,!0,907.18474],["tonne","t",null,"mass",!1,!1,1e3],["U.K. pint","uk_pt",null,"volume",!1,!0,.00056826125],["U.S. bushel","bushel",null,"volume",!1,!0,.03523907],["U.S. oil barrel","barrel",null,"volume",!1,!0,.158987295],["U.S. pint","pt",["us_pt"],"volume",!1,!0,.000473176473],["U.S. survey mile","survey_mi",null,"length",!1,!0,1609.347219],["U.S. survey/statute acre","us_acre",null,"area",!1,!0,4046.87261],["volt","V",null,"voltage",!0,!1,1],["watt","W",null,"power",!0,!0,1],["watt-hour","Wh",["wh"],"energy",!1,!0,3600],["weber","Wb",null,"magnetic_flux",!0,!1,1],["yard","yd",null,"length",!1,!0,.9144],["year","yr",null,"time",!1,!0,31557600]],s={Yi:["yobi",80,12089258196146292e8,"Yi","yotta"],Zi:["zebi",70,11805916207174113e5,"Zi","zetta"],Ei:["exbi",60,1152921504606847e3,"Ei","exa"],Pi:["pebi",50,1125899906842624,"Pi","peta"],Ti:["tebi",40,1099511627776,"Ti","tera"],Gi:["gibi",30,1073741824,"Gi","giga"],Mi:["mebi",20,1048576,"Mi","mega"],ki:["kibi",10,1024,"ki","kilo"]},u={Y:["yotta",1e24,"Y"],Z:["zetta",1e21,"Z"],E:["exa",1e18,"E"],P:["peta",1e15,"P"],T:["tera",1e12,"T"],G:["giga",1e9,"G"],M:["mega",1e6,"M"],k:["kilo",1e3,"k"],h:["hecto",100,"h"],e:["dekao",10,"e"],d:["deci",.1,"d"],c:["centi",.01,"c"],m:["milli",.001,"m"],u:["micro",1e-6,"u"],n:["nano",1e-9,"n"],p:["pico",1e-12,"p"],f:["femto",1e-15,"f"],a:["atto",1e-18,"a"],z:["zepto",1e-21,"z"],y:["yocto",1e-24,"y"]},f=null,d=null,m=l,g=a,y=1,v=1,b,e=0;e<o.length;e++)b=o[e][2]===null?[]:o[e][2],(o[e][1]===m||b.indexOf(m)>=0)&&(f=o[e]),(o[e][1]===g||b.indexOf(g)>=0)&&(d=o[e]);if(f===null){var k=s[l.substring(0,2)],w=u[l.substring(0,1)];l.substring(0,2)==="da"&&(w=["dekao",10,"da"]),k?(y=k[2],m=l.substring(2)):w&&(y=w[1],m=l.substring(w[2].length));for(var x=0;x<o.length;x++)b=o[x][2]===null?[]:o[x][2],(o[x][1]===m||b.indexOf(m)>=0)&&(f=o[x])}if(d===null){var C=s[a.substring(0,2)],S=u[a.substring(0,1)];a.substring(0,2)==="da"&&(S=["dekao",10,"da"]),C?(v=C[2],g=a.substring(2)):S&&(v=S[1],g=a.substring(S[2].length));for(var _=0;_<o.length;_++)b=o[_][2]===null?[]:o[_][2],(o[_][1]===g||b.indexOf(g)>=0)&&(d=o[_])}return f===null||d===null?p.error.na:f[3]!==d[3]?p.error.na:t*f[6]*y/(d[6]*v)}catch(A){var T=A;return T=p.errorInfo(T),[p.error.v,T]}},SUMX2MY2:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"text",!1)):l.push(t);var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?o=o.concat(D.getCellDataArr(a,"text",!1)):o.push(a);if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var f=l[e],d=o[e];B(f)&&B(d)&&(s.push(parseFloat(f)),u.push(parseFloat(d)))}for(var m=0,e=0;e<s.length;e++)m+=Math.pow(s[e],2)-Math.pow(u[e],2);return m}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},SUMX2PY2:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"text",!1)):l.push(t);var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?o=o.concat(D.getCellDataArr(a,"text",!1)):o.push(a);if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var f=l[e],d=o[e];B(f)&&B(d)&&(s.push(parseFloat(f)),u.push(parseFloat(d)))}for(var m=0,e=0;e<s.length;e++)m+=Math.pow(s[e],2)+Math.pow(u[e],2);return m}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},SUMXMY2:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!1))}else P(t)=="object"&&t.startCell!=null?l=l.concat(D.getCellDataArr(t,"text",!1)):l.push(t);var a=arguments[1],o=[];if(P(a)=="array"){if(P(a[0])=="array"&&!D.isDyadicArr(a))return p.error.v;o=o.concat(D.getDataArr(a,!1))}else P(a)=="object"&&a.startCell!=null?o=o.concat(D.getCellDataArr(a,"text",!1)):o.push(a);if(l.length!=o.length)return p.error.na;for(var s=[],u=[],e=0;e<l.length;e++){var f=l[e],d=o[e];B(f)&&B(d)&&(s.push(parseFloat(f)),u.push(parseFloat(d)))}for(var m=0,e=0;e<s.length;e++)m+=Math.pow(s[e]-u[e],2);return m}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},TRANSPOSE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else P(t)=="object"&&t.startCell!=null&&(l=D.getCellDataDyadicArr(t,"number"));return l=l[0].map(function(o,s){return l.map(function(u){return u[s]})}),l}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},TREND:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let R=function(I,F){for(var z=0,M=0,E=0,N=0,L=0;L<I.length;L++)for(var O=0;O<I[L].length;O++)z+=I[L][O],M+=F[L][O],E+=I[L][O]*F[L][O],N+=I[L][O]*I[L][O];var V=I.length*I[0].length,q=z/V,W=M/V,X=E/V,te=N/V,le=(X-q*W)/(te-q*q),oe=W-le*q;return[le,oe]};var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"text");else{if(!B(t))return p.error.v;var a=[];a.push(parseFloat(t)),l.push(a)}for(var o=l.length,s=l[0].length,e=0;e<o;e++)for(var u=0;u<s;u++){if(!B(l[e][u]))return p.error.v;l[e][u]=parseFloat(l[e][u])}for(var f=[],e=1;e<=o;e++)for(var u=1;u<=s;u++){var d=(e-1)*s+u;f.push(d)}if(arguments.length>=2){var m=arguments[1];if(f=[],P(m)=="array"){if(P(m[0])=="array"&&!D.isDyadicArr(m))return p.error.v;f=D.getDataDyadicArr(m)}else if(P(m)=="object"&&m.startCell!=null)f=D.getCellDataDyadicArr(m,"text");else{if(!B(m))return p.error.v;var a=[];a.push(parseFloat(m)),f.push(a)}for(var e=0;e<f.length;e++)for(var u=0;u<f[0].length;u++){if(!B(f[e][u]))return p.error.v;f[e][u]=parseFloat(f[e][u])}}var g=f.length,y=f[0].length,v=f;if(arguments.length>=3){var b=arguments[2];if(v=[],P(b)=="array"){if(P(b[0])=="array"&&!D.isDyadicArr(b))return p.error.v;v=D.getDataDyadicArr(b)}else if(P(b)=="object"&&b.startCell!=null)v=D.getCellDataDyadicArr(b,"text");else{if(!B(b))return p.error.v;var a=[];a.push(parseFloat(b)),v.push(a)}for(var e=0;e<v.length;e++)for(var u=0;u<v[0].length;u++){if(!B(v[e][u]))return p.error.v;v[e][u]=parseFloat(v[e][u])}}var k=!0;if(arguments.length==4&&(k=D.getCellBoolen(arguments[3]),H(k)))return k;if(o!=g||s!=y)return p.error.r;var w=R(f,l),x=w[0];if(k)var C=w[1];else var C=0;for(var S=[],e=0;e<v.length;e++)for(var u=0;u<v[e].length;u++){var _=v[e][u],T=x*_+C;S.push(Math.round(T*1e9)/1e9)}return S}catch(R){var A=R;return A=p.errorInfo(A),[p.error.v,A]}},FREQUENCY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=l.concat(D.getDataArr(t,!0))}else if(P(t)=="object"&&t.startCell!=null)l=l.concat(D.getCellDataArr(t,"number",!0));else{if(!B(t))return p.error.v;l.push(t)}for(var a=[],e=0;e<l.length;e++)B(l[e])&&a.push(parseFloat(l[e]));var o=arguments[1],s=[];if(P(o)=="array"){if(P(o[0])=="array"&&!D.isDyadicArr(o))return p.error.v;s=s.concat(D.getDataArr(o,!0))}else if(P(o)=="object"&&o.startCell!=null)s=s.concat(D.getCellDataArr(o,"number",!0));else{if(!B(o))return p.error.v;s.push(o)}for(var u=[],e=0;e<s.length;e++)B(s[e])&&u.push(parseFloat(s[e]));if(a.length==0&&u.length==0)return[[0],[0]];if(a.length==0){for(var f=[[0]],e=0;e<u.length;e++)f.push([0]);return f}else{if(u.length==0)return[[0],[a.length]];u.sort(function(k,w){return k-w});for(var f=[],e=0;e<u.length;e++)if(e==0){for(var d=0,m=0;m<a.length;m++)a[m]<=u[0]&&d++;f.push([d])}else if(e==u.length-1){for(var g=0,y=0,m=0;m<a.length;m++)a[m]<=u[e]&&a[m]>u[e-1]&&g++,a[m]>u[e]&&y++;f.push([g]),f.push([y])}else{for(var d=0,m=0;m<a.length;m++)a[m]<=u[e]&&a[m]>u[e-1]&&d++;f.push([d])}return f}}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},GROWTH:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let R=function(I,F){for(var z=0,M=0,E=0,N=0,L=0;L<I.length;L++)for(var O=0;O<I[L].length;O++)z+=I[L][O],M+=Math.log(F[L][O]),E+=I[L][O]*Math.log(F[L][O]),N+=I[L][O]*I[L][O];var V=I.length*I[0].length,q=z/V,W=M/V,X=E/V,te=N/V,le=(X-q*W)/(te-q*q),oe=W-le*q;return[Math.exp(le),Math.exp(oe)]};var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"text");else{if(!B(t))return p.error.v;var a=[];a.push(parseFloat(t)),l.push(a)}for(var o=l.length,s=l[0].length,e=0;e<o;e++)for(var u=0;u<s;u++){if(!B(l[e][u]))return p.error.v;l[e][u]=parseFloat(l[e][u])}for(var f=[],e=1;e<=o;e++)for(var u=1;u<=s;u++){var d=(e-1)*s+u;f.push(d)}if(arguments.length>=2){var m=arguments[1];if(f=[],P(m)=="array"){if(P(m[0])=="array"&&!D.isDyadicArr(m))return p.error.v;f=D.getDataDyadicArr(m)}else if(P(m)=="object"&&m.startCell!=null)f=D.getCellDataDyadicArr(m,"text");else{if(!B(m))return p.error.v;var a=[];a.push(parseFloat(m)),f.push(a)}for(var e=0;e<f.length;e++)for(var u=0;u<f[0].length;u++){if(!B(f[e][u]))return p.error.v;f[e][u]=parseFloat(f[e][u])}}var g=f.length,y=f[0].length,v=f;if(arguments.length>=3){var b=arguments[2];if(v=[],P(b)=="array"){if(P(b[0])=="array"&&!D.isDyadicArr(b))return p.error.v;v=D.getDataDyadicArr(b)}else if(P(b)=="object"&&b.startCell!=null)v=D.getCellDataDyadicArr(b,"text");else{if(!B(b))return p.error.v;var a=[];a.push(parseFloat(b)),v.push(a)}for(var e=0;e<v.length;e++)for(var u=0;u<v[0].length;u++){if(!B(v[e][u]))return p.error.v;v[e][u]=parseFloat(v[e][u])}}var k=!0;if(arguments.length==4&&(k=D.getCellBoolen(arguments[3]),H(k)))return k;if(o!=g||s!=y)return p.error.r;var w=R(f,l),x=w[0];if(k)var C=w[1];else var C=1;for(var S=[],e=0;e<v.length;e++)for(var u=0;u<v[e].length;u++){var _=v[e][u],T=C*Math.pow(x,_);S.push(Math.round(T*1e9)/1e9)}return S}catch(R){var A=R;return A=p.errorInfo(A),[p.error.v,A]}},LINEST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return p.error.v}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},LOGEST:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return p.error.v}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},MDETERM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{let u=function(f,d){var m,g=new Array;if(d==1)return m=f[0][0],m;if(d==2)return m=f[0][0]*f[1][1]-f[0][1]*f[1][0],m;if(d==3)return m=f[0][0]*f[1][1]*f[2][2]+f[1][0]*f[2][1]*f[0][2]+f[2][0]*f[0][1]*f[1][2]-f[2][0]*f[1][1]*f[0][2]-f[0][0]*f[2][1]*f[1][2]-f[1][0]*f[0][1]*f[2][2],m;m=0;for(var y=new Array,v=new Array,b=0;b<d;b++)g[b]=f[b][0]*Math.pow(-1,b+1+1);for(var b=0;b<d;b++){v[b]=new Array;for(var k=0;k<d-1;k++)v[b][k]=f[b][k+1]}for(var b=0;b<d;b++){for(var k=0;k<d;k++){y[k]=new Array;for(var w=0;w<d-1;w++)b>k?y[k][w]=v[k][w]:b<k&&(y[k-1][w]=v[k][w])}m+=g[b]*arguments.callee(y,d-1)}return m};var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"text");else{var a=[];a.push(t),l.push(a)}for(var e=0;e<l.length;e++)for(var o=0;o<l[e].length;o++){if(!B(l[e][o]))return p.error.v;l[e][o]=parseFloat(l[e][o])}return l.length!=l[0].length?p.error.v:u(l,l.length)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},MINVERSE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"text");else{var a=[];a.push(t),l.push(a)}for(var e=0;e<l.length;e++)for(var o=0;o<l[e].length;o++){if(!B(l[e][o]))return p.error.v;l[e][o]=parseFloat(l[e][o])}return l.length!=l[0].length?p.error.v:So(l)}catch(u){var s=u;return s=p.errorInfo(s),[p.error.v,s]}},MMULT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"text");else{var a=[];a.push(t),l.push(a)}for(var e=0;e<l.length;e++)for(var o=0;o<l[e].length;o++){if(!B(l[e][o]))return p.error.v;l[e][o]=parseFloat(l[e][o])}var s=arguments[1],u=[];if(P(s)=="array"){if(P(s[0])=="array"&&!D.isDyadicArr(s))return p.error.v;u=D.getDataDyadicArr(s)}else if(P(s)=="object"&&s.startCell!=null)u=D.getCellDataDyadicArr(s,"text");else{var a=[];a.push(s),u.push(a)}for(var e=0;e<u.length;e++)for(var o=0;o<u[e].length;o++){if(!B(u[e][o]))return p.error.v;u[e][o]=parseFloat(u[e][o])}if(l[0].length!=u.length)return p.error.v;for(var f=l.length,d=u[0].length,m=[],g=0;g<f;g++){for(var a=[],y=0;y<d;y++){for(var v=0,n=0;n<l[0].length;n++)v+=l[g][n]*u[n][y];a.push(v)}m.push(a)}return m}catch(k){var b=k;return b=p.errorInfo(b),[p.error.v,b]}},SUMPRODUCT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"text");else{var a=[];a.push(t),l.push(a)}for(var e=0;e<l.length;e++)for(var o=0;o<l[e].length;o++)B(l[e][o])?l[e][o]=parseFloat(l[e][o]):l[e][o]=0;var s=l.length,u=l[0].length;if(arguments.length>=2)for(var e=1;e<arguments.length;e++){var f=arguments[e],d=[];if(P(f)=="array"){if(P(f[0])=="array"&&!D.isDyadicArr(f))return p.error.v;d=D.getDataDyadicArr(f)}else if(P(f)=="object"&&f.startCell!=null)d=D.getCellDataDyadicArr(f,"text");else{var a=[];a.push(f),d.push(a)}if(d.length!=s||d[0].length!=u)return p.error.v;for(var m=0;m<s;m++)for(var g=0;g<u;g++)B(d[m][g])?l[m][g]=l[m][g]*parseFloat(d[m][g]):l[m][g]=0}for(var y=0,m=0;m<s;m++)for(var g=0;g<u;g++)y+=l[m][g];return y}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},ISFORMULA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;return P(t)=="object"&&t.startCell!=null?t.data==null?!1:(P(t.data)=="array"?l=t.data[0][0]:l=t.data,l!=null&&l.f!=null):p.error.v}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},CELL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;if(P(t.data)=="array")return p.error.v;if(l=t.data.v,me(l))return p.error.v}else l=t;var a=arguments[1],o;if(P(a)=="object"&&a.startCell!=null)o=a.startCell;else return p.error.v;if(["address","col","color","contents","filename","format","parentheses","prefix","protect","row","type","width"].indexOf(l)==-1)return p.error.v;var s=Et()[Z(h.currentSheetIndex)],u=p.getcellrange(o),f=u.row[0],d=u.column[0];let y=Et(),v=Z(h.calculateSheetIndex),b=y[v].data,k;switch(p.execFunctionGlobalData!=null&&p.execFunctionGlobalData[f+"_"+d+"_"+h.calculateSheetIndex]!=null?k=p.execFunctionGlobalData[f+"_"+d+"_"+h.calculateSheetIndex].v:b[f][d]!=null&&b[f][d].v!=null&&b[f][d].v!=""?(k=b[f][d],k instanceof Object&&(k=k.v)):k=0,l){case"address":return o;case"col":return d+1;case"color":return 0;case"contents":return k;case"filename":return s.name;case"format":return b[f][d]==null||b[f][d].ct==null?"G":b[f][d].ct.fa;case"parentheses":return b[f][d]==null||b[f][d].v==null||b[f][d].v==""?0:b[f][d].v>0?1:0;case"prefix":return k==0?"":b[f][d].ht==0?"^":b[f][d].ht==1?"'":b[f][d].ht==2?'"':"";case"protect":return 0;case"row":return f+1;case"type":return k==0?"b":"l";case"width":var m=s.config;return m.columnlen!=null&&d in m.columnlen?m.columnlen[d]:h.defaultcollen}}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},NA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return p.error.na}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},ERROR_TYPE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.na;if(P(t.data)=="array"){if(l=t.data[0][0],l==null||me(l.v))return p.error.na;l=l.v}else{if(me(t.data.v))return p.error.na;l=t.data.v}}else l=t;var a={"#NULL!":1,"#DIV/0!":2,"#VALUE!":3,"#REF!":4,"#NAME?":5,"#NUM!":6,"#N/A":7,"#GETTING_DATA":8};return l in a?a[l]:p.error.na}catch(s){var o=s;return o=p.errorInfo(o),[p.error.v,o]}},ISBLANK:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;return P(t)=="object"&&t.startCell!=null?t.data==null:!1}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ISERR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array")return!0;if(t.data==null||me(t.data.v))return!1;l=t.data.v}else l=t;return["#VALUE!","#REF!","#DIV/0!","#NUM!","#NAME?","#NULL!"].indexOf(l)>-1}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ISERROR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array")return!0;if(t.data==null||me(t.data.v))return!1;l=t.data.v}else l=t;return["#N/A","#VALUE!","#REF!","#DIV/0!","#NUM!","#NAME?","#NULL!"].indexOf(l)>-1}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ISLOGICAL:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array"||t.data==null||me(t.data.v))return!1;l=t.data.v}else l=t;return l.toString().toLowerCase()=="true"||l.toString().toLowerCase()=="false"}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ISNA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array"||t.data==null||me(t.data.v))return!1;l=t.data.v}else l=t;return l.toString()=="#N/A"}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ISNONTEXT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array"||t.data==null||me(t.data.v))return!0;l=t.data.v}else l=t;return["#N/A","#VALUE!","#REF!","#DIV/0!","#NUM!","#NAME?","#NULL!"].indexOf(l)>-1||l.toString().toLowerCase()=="true"||l.toString().toLowerCase()=="false"?!0:!!B(l)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ISNUMBER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array"||t.data==null||me(t.data.v))return!1;l=t.data.v}else l=t;return!!B(l)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},ISREF:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{return P(arguments[0])=="object"&&arguments[0].startCell!=null}catch(l){var t=l;return t=p.errorInfo(t),[p.error.v,t]}},ISTEXT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array"||t.data==null||me(t.data.v))return!1;l=t.data.v}else l=t;return["#N/A","#VALUE!","#REF!","#DIV/0!","#NUM!","#NAME?","#NULL!"].indexOf(l)>-1||l.toString().toLowerCase()=="true"||l.toString().toLowerCase()=="false"?!1:!B(l)}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},TYPE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")return 64;if(P(t)=="object"&&t.startCell!=null){if(P(t.data)=="array")return 16;if(t.data==null||me(t.data.v))return 1;l=t.data.v}else l=t;return["#N/A","#VALUE!","#REF!","#DIV/0!","#NUM!","#NAME?","#NULL!"].indexOf(l)>-1?16:l.toString().toLowerCase()=="true"||l.toString().toLowerCase()=="false"?4:B(l)?1:2}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},N:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;l=t[0][0]}else l=t[0];else if(P(t)=="object"&&t.startCell!=null)if(P(t.data)=="array"){if(l=t.data[0][0],l==null||me(l.v))return 0;l=l.v}else{if(t.data==null||me(t.data.v))return 0;l=t.data.v}else l=t;return["#N/A","#VALUE!","#REF!","#DIV/0!","#NUM!","#NAME?","#NULL!"].indexOf(l)>-1?l:l.toString().toLowerCase()=="true"||l.toString().toLowerCase()=="false"?l.toString().toLowerCase()=="true"?1:0:B(l)?parseFloat(l):0}catch(o){var a=o;return a=p.errorInfo(a),[p.error.v,a]}},TO_DATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),mt("yyyy-mm-dd",t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},TO_PURE_NUMBER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:(0,j.default)(t).isValid()?at(t)[2]:(0,Ui.default)(t).value()==null?t:(0,Ui.default)(t).value()}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},TO_TEXT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0],"text");return H(t)?t:mt("@",t)}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},TO_DOLLARS:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),mt("$ 0.00",t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},TO_PERCENT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);return H(t)?t:B(t)?(t=parseFloat(t),mt("0%",t)):p.error.v}catch(a){var l=a;return l=p.errorInfo(l),[p.error.v,l]}},DGET:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),f=[];if(P(a)==="string"){var d=D.findField(l,a);f=D.rest(l[d])}else f=D.rest(l[a]);return u.length===0?p.error.v:u.length>1?p.error.nm:f[u[0]]}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},DMAX:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),f=[];if(P(a)==="string"){var d=D.findField(l,a);f=D.rest(l[d])}else f=D.rest(l[a]);for(var m=f[u[0]],e=1;e<u.length;e++)m<f[u[e]]&&(m=f[u[e]]);return m}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DMIN:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=findResultIndex(l,s),f=[];if(P(a)==="string"){var d=findField(l,a);f=rest(l[d])}else f=rest(l[a]);for(var m=f[u[0]],e=1;e<u.length;e++)m>f[u[e]]&&(m=f[u[e]]);return m}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DAVERAGE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),f=[];if(P(a)==="string"){var d=D.findField(l,a);f=D.rest(l[d])}else f=D.rest(l[a]);for(var m=0,e=0;e<u.length;e++)m+=f[u[e]];return u.length===0?p.error.d:m/u.length}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DCOUNT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),f=[];if(P(a)==="string"){var d=D.findField(l,a);f=D.rest(l[d])}else f=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=f[u[e]];return window.luckysheet_function.COUNT.f.apply(window.luckysheet_function.COUNT,m)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DCOUNTA:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),f=[];if(P(a)==="string"){var d=D.findField(l,a);f=D.rest(l[d])}else f=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=f[u[e]];return window.luckysheet_function.COUNTA.f.apply(window.luckysheet_function.COUNTA,m)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DPRODUCT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),f=[];if(P(a)==="string"){var d=D.findField(l,a);f=D.rest(l[d])}else f=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=f[u[e]];m=D.compact(m);var g=1;for(e=0;e<m.length;e++)g*=m[e];return g}catch(v){var y=v;return y=p.errorInfo(y),[p.error.v,y]}},DSTDEV:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),f=[];if(P(a)==="string"){var d=D.findField(l,a);f=D.rest(l[d])}else f=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=f[u[e]];return m=D.compact(m),window.luckysheet_function.STDEVA.f.apply(window.luckysheet_function.STDEVA,m)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DSTDEVP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),f=[];if(P(a)==="string"){var d=D.findField(l,a);f=D.rest(l[d])}else f=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=f[u[e]];return m=D.compact(m),window.luckysheet_function.STDEVP.f.apply(window.luckysheet_function.STDEVP,m)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DSUM:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),f=[];if(P(a)==="string"){var d=D.findField(l,a);f=D.rest(l[d])}else f=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=f[u[e]];m=D.compact(m);var g=0;for(e=0;e<m.length;e++)g+=m[e];return g}catch(v){var y=v;return y=p.errorInfo(y),[p.error.v,y]}},DVAR:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),f=[];if(P(a)==="string"){var d=D.findField(l,a);f=D.rest(l[d])}else f=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=f[u[e]];return m=D.compact(m),window.luckysheet_function.VAR_S.f.apply(window.luckysheet_function.VAR_S,m)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},DVARP:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="object"&&t.startCell!=null){if(t.data==null)return p.error.v;l=D.getCellDataDyadicArr(t,"text")}else return p.error.v;var a=D.getFirstValue(arguments[1],"text");if(H(a))return a;if(me(a))return p.error.v;var o=arguments[2],s=[];if(P(o)=="object"&&o.startCell!=null){if(o.data==null)return p.error.v;s=D.getCellDataDyadicArr(o,"text")}else return p.error.v;if(!B(a)&&P(a)!=="string")return p.error.v;var u=D.findResultIndex(l,s),f=[];if(P(a)==="string"){var d=D.findField(l,a);f=D.rest(l[d])}else f=D.rest(l[a]);for(var m=[],e=0;e<u.length;e++)m[e]=f[u[e]];return m=D.compact(m),window.luckysheet_function.VAR_P.f.apply(window.luckysheet_function.VAR_P,m)}catch(y){var g=y;return g=p.errorInfo(g),[p.error.v,g]}},LINESPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=arguments[1],f=arguments[2],d=arguments[3],m=arguments[4],g=arguments[5],y=arguments[6],v=arguments[7];let R=Et(),I=Z(h.calculateSheetIndex),F=R[I].data;var b=p.readCellDataToOneArray(s),k=ke.getCellRealSize(F,t,l),w=k[0],x=k[1],C={};f==null&&(f=1),C.lineWidth=f,C.offsetY=f+1,C.height=x-(f+1),C.width=w;var S=function(z,M){M&&(typeof M=="number"&&(M>19&&(M=M%20),M=o[M]),C[z]=M)};if(u==null&&(u="#2ec7c9"),S("lineColor",u),C.fillColor=0,d)if(typeof d=="string"){d=d.toLowerCase();var _=null;d=="min"?_=window.luckysheet_function.MIN.f({data:b}):d=="max"?_=window.luckysheet_function.MAX.f({data:b}):d=="avg"||d=="mean"?_=window.luckysheet_function.AVERAGE.f({data:b}):d=="median"&&(_=window.luckysheet_function.MEDIAN.f({data:b})),_&&(C.normalRangeMin=_,C.normalRangeMax=_)}else C.normalRangeMin=d,C.normalRangeMax=d;m==null&&(m="#000"),S("normalRangeColor",m),S("maxSpotColor",g),S("minSpotColor",y),v==null&&(v="1.5"),C.spotRadius=v;var T=Jl.init(b,C);return T}catch(R){var A=R;return A=p.errorInfo(A),[p.error.v,A]}},AREASPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=arguments[1],f=arguments[2],d=arguments[3],m=arguments[4],g=arguments[5],y=p.readCellDataToOneArray(s);let T=Et(),A=Z(h.calculateSheetIndex),R=T[A].data;var v=ke.getCellRealSize(R,t,l),b=v[0],k=v[1],w={};d==null&&(d=1),w.lineWidth=d,w.offsetY=d+1,w.height=k-(d+1),w.width=b;var x=function(I,F){F&&(typeof F=="number"&&(F>19&&(F=F%20),F=o[F]),w[I]=F)};if(u==null&&(u="#2ec7c9"),x("lineColor",u),x("fillColor",f),d==null&&(d="1"),w.lineWidth=d,m)if(typeof m=="string"){m=m.toLowerCase();var C=null;m=="min"?C=window.luckysheet_function.MIN.f({data:y}):m=="max"?C=window.luckysheet_function.MAX.f({data:y}):m=="avg"||m=="mean"?C=window.luckysheet_function.AVERAGE.f({data:y}):m=="median"&&(C=window.luckysheet_function.MEDIAN.f({data:y})),C&&(w.normalRangeMin=C,w.normalRangeMax=C)}else w.normalRangeMin=m,w.normalRangeMax=m;g==null&&(g="#000"),x("normalRangeColor",g);var S=Jl.init(y,w);return S}catch(T){var _=T;return _=p.errorInfo(_),[p.error.v,_]}},COLUMNSPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=p.readCellDataToOneArray(s);let _=Et(),T=Z(h.calculateSheetIndex),A=_[T].data;var f=ke.getCellRealSize(A,t,l),d=f[0],m=f[1],g={};g.height=m,g.width=d;var y=function(R,I){I&&(typeof I=="number"&&(I>19&&(I=I%20),I=o[I]),g[R]=I)},v=arguments[1],b=arguments[2],k=arguments[3],w=arguments[4];g.type="column",v==null&&(v="1"),g.barSpacing=v,b==null&&(b="#fc5c5c"),y("barColor",b),k==null&&(k="#97b552"),y("negBarColor",k),w==null||w===!1||typeof w!="number"?g.chartRangeMax=void 0:g.chartRangeMax=w;var x=p.sparklinesColorMap(arguments);x&&(g.colorMap=x);var C=Jl.init(u,g);return C}catch(_){var S=_;return S=p.errorInfo(S),[p.error.v,S]}},STACKCOLUMNSPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=[],f=[];if(s!=null&&s.data!=null&&(f=s.data),P(f)=="array")f=p.getPureValueByData(f);else{if(P(f)=="object")return f=f.v,[f];/\{.*?\}/.test(f)&&(f=f.replace(/\{/g,"[").replace(/\}/g,"]")),f=new Function("return "+f)()}var d=arguments[1],m=f.length;if(d==null||!!d)for(var g=0;g<f[0].length;g++){for(var y="",v=0;v<f.length;v++)y+=f[v][g]+":";y=y.substr(0,y.length-1),u.push(y)}else{for(var v=0;v<f.length;v++){for(var b="",g=0;g<f[0].length;g++)b+=f[v][g]+":";b=b.substr(0,b.length-1),u.push(b)}var m=f[0].length}let F=Et(),z=Z(h.calculateSheetIndex),M=F[z].data;var k=ke.getCellRealSize(M,t,l),w=k[0],x=k[1],C={};C.height=x,C.width=w;var S=function(E,N){N&&(typeof N=="number"&&(N>19&&(N=N%20),N=o[N]),C[E]=N)},_=arguments[2],T=arguments[3];C.type="column",_==null&&(_="1"),C.barSpacing=_,T==null||T===!1||typeof T!="number"?C.chartRangeMax=void 0:C.chartRangeMax=T;var A=p.sparklinesColorMap(arguments,4);A&&(C.colorMap=A);var R=Jl.init(u,C);return R}catch(F){var I=F;return I=p.errorInfo(I),[p.error.v,I]}},BARSPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=p.readCellDataToOneArray(s);let _=Et(),T=Z(h.calculateSheetIndex),A=_[T].data;var f=ke.getCellRealSize(A,t,l),d=f[0],m=f[1],g={};g.height=m,g.width=d;var y=function(R,I){I&&(typeof I=="number"&&(I>19&&(I=I%20),I=o[I]),g[R]=I)},v=arguments[1],b=arguments[2],k=arguments[3],w=arguments[4];g.type="bar",v==null&&(v="1"),g.barSpacing=v,b==null&&(b="#fc5c5c"),y("barColor",b),k==null&&(k="#97b552"),y("negBarColor",k),w==null||w===!1||typeof w!="number"?g.chartRangeMax=void 0:g.chartRangeMax=w;var x=p.sparklinesColorMap(arguments);x&&(g.colorMap=x);var C=Jl.init(u,g);return C}catch(_){var S=_;return S=p.errorInfo(S),[p.error.v,S]}},STACKBARSPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=[],f=[];if(s!=null&&s.data!=null&&(f=s.data),P(f)=="array")f=p.getPureValueByData(f);else{if(P(f)=="object")return f=f.v,[f];/\{.*?\}/.test(f)&&(f=f.replace(/\{/g,"[").replace(/\}/g,"]")),f=new Function("return "+f)()}var d=arguments[1],m=f.length;if(d==null||!!d)for(var g=0;g<f[0].length;g++){for(var y="",v=0;v<f.length;v++)y+=f[v][g]+":";y=y.substr(0,y.length-1),u.push(y)}else{for(var v=0;v<f.length;v++){for(var b="",g=0;g<f[0].length;g++)b+=f[v][g]+":";b=b.substr(0,b.length-1),u.push(b)}var m=f[0].length}let F=Et(),z=Z(h.calculateSheetIndex),M=F[z].data;var k=ke.getCellRealSize(M,t,l),w=k[0],x=k[1],C={};C.height=x,C.width=w;var S=function(E,N){N&&(typeof N=="number"&&(N>19&&(N=N%20),N=o[N]),C[E]=N)},_=arguments[2],T=arguments[3];C.type="bar",_==null&&(_="1"),C.barSpacing=_,T==null||T===!1||typeof T!="number"?C.chartRangeMax=void 0:C.chartRangeMax=T;var A=p.sparklinesColorMap(arguments,4);A&&(C.colorMap=A);var R=Jl.init(u,C);return R}catch(F){var I=F;return I=p.errorInfo(I),[p.error.v,I]}},DISCRETESPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=p.readCellDataToOneArray(s);let C=Et(),S=Z(h.calculateSheetIndex),_=C[S].data;var f=ke.getCellRealSize(_,t,l),d=f[0],m=f[1],g={};g.height=m,g.width=d;var y=function(T,A){A&&(typeof A=="number"&&(A>19&&(A=A%20),A=o[A]),g[T]=A)},v=arguments[1],b=arguments[2],k=arguments[3];g.type="discrete",v==null&&(v=0),g.thresholdValue=v,b==null&&(b="#2ec7c9"),y("lineColor",b),k==null&&(k="#fc5c5c"),y("thresholdColor",k);var w=Jl.init(u,g);return w}catch(C){var x=C;return x=p.errorInfo(x),[p.error.v,x]}},TRISTATESPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=p.readCellDataToOneArray(s);let _=Et(),T=Z(h.calculateSheetIndex),A=_[T].data;var f=ke.getCellRealSize(A,t,l),d=f[0],m=f[1],g={};g.height=m,g.width=d;var y=function(R,I){I&&(typeof I=="number"&&(I>19&&(I=I%20),I=o[I]),g[R]=I)},v=arguments[1],b=arguments[2],k=arguments[3],w=arguments[4];g.type="tristate",v==null&&(v="1"),g.barSpacing=v,b==null&&(b="#fc5c5c"),y("barColor",b),k==null&&(k="#97b552"),y("negBarColor",k),w==null&&(w="#999"),y("zeroBarColor",w);var x=p.sparklinesColorMap(arguments);x&&(g.colorMap=x);var C=Jl.init(u,g);return C}catch(_){var S=_;return S=p.errorInfo(S),[p.error.v,S]}},PIESPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=p.readCellDataToOneArray(s);let S=Et(),_=Z(h.calculateSheetIndex),T=S[_].data;var f=ke.getCellRealSize(T,t,l),d=f[0],m=f[1],g={};g.height=m,g.width=d;var y=function(A,R){R&&(typeof R=="number"&&(R>19&&(R=R%20),R=o[R]),g[A]=R)},v=arguments[1],b=arguments[2],k=arguments[3];g.type="pie",v==null&&(v=0),g.offset=v,b==null&&(b=0),y("borderWidth",b),k==null&&(k="#97b552"),y("borderColor",k);var w=p.sparklinesColorMap(arguments,4);w&&(g.colorMap=w);var x=Jl.init(u,g);return x}catch(S){var C=S;return C=p.errorInfo(C),[p.error.v,C]}},BOXSPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList,s=arguments[0],u=p.readCellDataToOneArray(s);let C=Et(),S=Z(h.calculateSheetIndex),_=C[S].data;var f=ke.getCellRealSize(_,t,l),d=f[0],m=f[1],g={};g.height=m,g.width=d;var y=function(T,A){A&&(typeof A=="number"&&(A>19&&(A=A%20),A=o[A]),g[T]=A)},v=arguments[1],b=arguments[2],k=arguments[3];g.type="box",v==null&&(v=1.5),g.outlierIQR=v,b==null?b=0:y("target",b),k==null&&(k=1.5),y("spotRadius",k);var w=Jl.init(u,g);return w}catch(C){var x=C;return x=p.errorInfo(x),[p.error.v,x]}},BULLETSPLINES:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentFunction,o=p.colorList;let w=Et(),x=Z(h.calculateSheetIndex),C=w[x].data;var s=ke.getCellRealSize(C,t,l),u=s[0],f=s[1],d={};d.height=f,d.width=u;var m=function(S,_){_&&(typeof _=="number"&&(_>19&&(_=_%20),_=o[_]),d[S]=_)},g=[];Wn(arguments);var y=p.getValueByFuncData(arguments[0]),v=p.getValueByFuncData(arguments[1]);g.push(y),g.push(v);for(var e=2;e<arguments.length;e++)g.push(p.getValueByFuncData(arguments[e]));d.type="bullet";var b=Jl.init(g,d);return b}catch(w){var k=w;return k=p.errorInfo(k),[p.error.v,k]}},SORT:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[],a=1,o=1;if(P(t)=="array")if(P(t[0])=="array"){if(!D.isDyadicArr(t))return p.error.v;for(var e=0;e<t.length;e++){for(var s=[],u=0;u<t[e].length;u++){var f=t[e][u];s.push(f)}l.push(s)}a=l.length,o=l[0].length}else{for(var e=0;e<t.length;e++){var f=t[e];l.push(f)}a=l.length}else if(P(t)=="object"&&t.startCell!=null)if(t.data!=null)if(P(t.data)=="array"){for(var e=0;e<t.data.length;e++){for(var s=[],u=0;u<t.data[e].length;u++)if(t.data[e][u]!=null){var f=t.data[e][u].v;me(f)&&(f=0),s.push(f)}else s.push(0);l.push(s)}a=l.length,o=l[0].length}else{var f=t.data.v;me(f)&&(f=0),l.push(f)}else l.push(0);else{var f=t;l.push(f)}var d=1;if(arguments.length>=2){if(d=D.getFirstValue(arguments[1]),H(d))return d;if(!B(d))return p.error.v;d=parseInt(d)}var m=1;if(arguments.length>=3){if(m=D.getFirstValue(arguments[2]),H(m))return m;if(!B(m))return p.error.v;m=Math.floor(parseFloat(m))}var g=!1;if(arguments.length==4&&(g=D.getCellBoolen(arguments[3]),H(g)))return g;if(g){if(d<1||d>a)return p.error.v}else if(d<1||d>o)return p.error.v;if(m!=1&&m!=-1)return p.error.v;var y=function(k,w){if(P(k)=="array"&&(k=k[d-1]),P(w)=="array"&&(w=w[d-1]),!isNaN(k)&&!isNaN(w))return k-w;if(isNaN(k))if(isNaN(w)){if(k>w)return 1;if(k<w)return-1}else return 1;else return-1},v=function(k,w){if(P(k)=="array"&&(k=k[d-1]),P(w)=="array"&&(w=w[d-1]),!isNaN(k)&&!isNaN(w))return w-k;if(isNaN(k))if(isNaN(w)){if(k>w)return-1;if(k<w)return 1}else return-1;else return 1};return g?(l=l[0].map(function(k,w){return l.map(function(x){return x[w]})}),m==1&&l.sort(y),m==-1&&l.sort(v),l=l[0].map(function(k,w){return l.map(function(x){return x[w]})})):(m==1&&l.sort(y),m==-1&&l.sort(v)),l}catch(k){var b=k;return b=p.errorInfo(b),[p.error.v,b]}},FILTER:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"number");else{var a=[];a.push(parseFloat(t)),l.push(a)}var o=l.length,s=l[0].length,u=arguments[1],f=[],d="row";if(P(u)=="array")if(P(u[0])=="array"){if(!D.isDyadicArr(u))return p.error.v;if(u.length>1&&u[0].length>1)return p.error.v;if(u.length>1){if(u.length!=l.length)return p.error.v;d="row";for(var e=0;e<u.length;e++){var m=u[e][0];if(P(m)!="boolean")if(P(m)=="string"&&(m.toLowerCase()=="true"||m.toLowerCase()=="false"))m.toLowerCase()=="true"?m=!0:m.toLowerCase()=="false"&&(m=!1);else if(B(m))m=parseFloat(m),m=m!=0;else return p.error.v;f.push(m)}}if(u[0].length>1){if(u[0].length!=l[0].length)return p.error.v;d="col";for(var e=0;e<u[0].length;e++){var m=u[0][e];if(P(m)!="boolean")if(P(m)=="string"&&(m.toLowerCase()=="true"||m.toLowerCase()=="false"))m.toLowerCase()=="true"?m=!0:m.toLowerCase()=="false"&&(m=!1);else if(B(m))m=parseFloat(m),m=m!=0;else return p.error.v;f.push(m)}}}else{if(u.length!=l[0].length)return p.error.v;d="col";for(var e=0;e<u.length;e++){var m=u[e];if(P(m)!="boolean")if(P(m)=="string"&&(m.toLowerCase()=="true"||m.toLowerCase()=="false"))m.toLowerCase()=="true"?m=!0:m.toLowerCase()=="false"&&(m=!1);else if(B(m))m=parseFloat(m),m=m!=0;else return p.error.v;f.push(m)}}else if(P(u)=="object"&&u.data!=null&&P(u.data)=="array"){if(u.data.length>1&&u.data[0].length>1)return p.error.v;if(u.data.length>1){if(u.data.length!=l.length)return p.error.v;d="row";for(var e=0;e<u.data.length;e++){var m=u.data[e][0].v;if(me(m)&&(m=0),P(m)!="boolean")if(P(m)=="string"&&(m.toLowerCase()=="true"||m.toLowerCase()=="false"))m.toLowerCase()=="true"?m=!0:m.toLowerCase()=="false"&&(m=!1);else if(B(m))m=parseFloat(m),m=m!=0;else return p.error.v;f.push(m)}}if(u.data[0].length>1){if(u.data[0].length!=l[0].length)return p.error.v;d="col";for(var e=0;e<u.data[0].length;e++){var m=u.data[0][e].v;if(me(m)&&(m=0),P(m)!="boolean")if(P(m)=="string"&&(m.toLowerCase()=="true"||m.toLowerCase()=="false"))m.toLowerCase()=="true"?m=!0:m.toLowerCase()=="false"&&(m=!1);else if(B(m))m=parseFloat(m),m=m!=0;else return p.error.v;f.push(m)}}}else return p.error.v;var g="";if(arguments.length==3&&(g=D.getFirstValue(arguments[2],"text"),H(g)))return g;var y=[];if(d=="row")for(var e=0;e<l.length;e++)f[e]&&y.push(l[e]);else for(var e=0;e<l.length;e++){for(var a=[],v=0;v<l[0].length;v++)f[v]&&a.push(l[e][v]);a.length>0&&y.push(a)}return y.length==0?g:y}catch(k){var b=k;return b=p.errorInfo(b),[p.error.v,b]}},UNIQUE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=arguments[0],l=[];if(P(t)=="array"){if(P(t[0])=="array"&&!D.isDyadicArr(t))return p.error.v;l=D.getDataDyadicArr(t)}else if(P(t)=="object"&&t.startCell!=null)l=D.getCellDataDyadicArr(t,"number");else{var a=[];a.push(parseFloat(t)),l.push(a)}var o=!1;if(arguments.length>=2&&(o=D.getCellBoolen(arguments[1]),H(o)))return o;var s=!1;if(arguments.length==3&&(s=D.getCellBoolen(arguments[2]),H(s)))return s;if(o){l=l[0].map(function(b,k){return l.map(function(w){return w[k]})});for(var u={},f=[],d=[],e=0;e<l.length;e++){for(var m="",g=0;g<l[e].length;g++)m+=l[e][g].toString()+"|||";f.push(m),m in u||(u[m]=0,d.push(l[e]))}if(s){for(var y=[],e=0;e<f.length;e++)f.indexOf(f[e])==f.lastIndexOf(f[e])&&y.push(l[e]);return y=y[0].map(function(b,k){return y.map(function(w){return w[k]})}),y}else return d=d[0].map(function(b,k){return d.map(function(w){return w[k]})}),d}else{for(var u={},f=[],d=[],e=0;e<l.length;e++){for(var m="",g=0;g<l[e].length;g++)m+=l[e][g].toString()+"|||";f.push(m),m in u||(u[m]=0,d.push(l[e]))}if(s){for(var y=[],e=0;e<f.length;e++)f.indexOf(f[e])==f.lastIndexOf(f[e])&&y.push(l[e]);return y}else return d}}catch(b){var v=b;return v=p.errorInfo(v),[p.error.v,v]}},RANDARRAY:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=1;if(arguments.length>=1){if(t=D.getFirstValue(arguments[0]),H(t))return t;if(!B(t))return p.error.v;t=parseInt(t)}var l=1;if(arguments.length==2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}if(t<=0||l<=0)return p.error.v;for(var a=[],e=0;e<t;e++){for(var o=[],s=0;s<l;s++)o.push(Math.random().toFixed(9));a.push(o)}return a}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},SEQUENCE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=D.getFirstValue(arguments[0]);if(H(t))return t;if(!B(t))return p.error.v;t=parseInt(t);var l=1;if(arguments.length>=2){if(l=D.getFirstValue(arguments[1]),H(l))return l;if(!B(l))return p.error.v;l=parseInt(l)}var a=1;if(arguments.length>=3){if(a=D.getFirstValue(arguments[2]),H(a))return a;if(!B(a))return p.error.v;a=parseFloat(a)}var o=1;if(arguments.length==4){if(o=D.getFirstValue(arguments[3]),H(o))return o;if(!B(o))return p.error.v;o=parseFloat(o)}if(t<=0||l<=0)return p.error.v;for(var s=[],e=0;e<t;e++){for(var u=[],f=0;f<l;f++){var d=a+o*(f+l*e);u.push(d)}s.push(u)}return s}catch(g){var m=g;return m=p.errorInfo(m),[p.error.v,m]}},EVALUATE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;for(var e=0;e<arguments.length;e++){var n=p.errorParamCheck(this.p,arguments[e],e);if(!n[0])return p.error.v}try{var t=window.luckysheetCurrentRow,l=window.luckysheetCurrentColumn,a=window.luckysheetCurrentIndex,o=D.getFirstValue(arguments[0]).toString();if(H(o))return o;o.trim().indexOf("=")!=0&&(o="="+o);var s=p.execstringformula(o,t,l,a);return s[1]}catch(f){var u=f;return u=p.errorInfo(u),[p.error.v,u]}},REMOTE:function(){if(arguments.length<this.m[0]||arguments.length>this.m[1])return p.error.na;try{let n=window.luckysheetCurrentRow,t=window.luckysheetCurrentColumn,l=window.luckysheetCurrentFunction,a=D.getFirstValue(arguments[0]);return H(a)?a:(de.remoteFunction(a,o=>{let s=xe.deepCopyFlowData(h.flowdata);p.execFunctionGroup(n,t,o),s[n][t]={v:o,f:l},Ze(s,[{row:[n,n],column:[t,t]}])}),"Loading...")}catch(n){console.log(n);var e=n;return e=p.errorInfo(e),[p.error.v,e]}}},zm=Ab});var tu,Bm=Ie(()=>{tu=[{n:"SUMIF",t:0,m:[2,3],p:[{example:"A1:A10",require:"m",repeat:"n",type:"range"},{example:'">20"',require:"m",repeat:"n",type:"rangeall"},{example:"B1:B10",require:"o",repeat:"n",type:"range"}]},{n:"TAN",t:0,m:[1,1],p:[{example:"45*PI()/180",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TANH",t:0,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"CEILING",t:0,m:[2,2],p:[{example:"23.25",require:"m",repeat:"n",type:"rangenumber"},{example:"0.1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ATAN",t:0,m:[1,1],p:[{example:"0",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ASINH",t:0,m:[1,1],p:[{example:"0.9",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ABS",t:0,m:[1,1],p:[{example:"-2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ACOS",t:0,m:[1,1],p:[{example:"0",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ACOSH",t:0,m:[1,1],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MULTINOMIAL",t:0,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"y",type:"rangeall"}]},{n:"ATANH",t:0,m:[1,1],p:[{example:"0.9",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ATAN2",t:0,m:[2,2],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COUNTBLANK",t:1,m:[1,1],p:[{example:"A2:C100",require:"m",repeat:"n",type:"range"}]},{n:"COSH",t:0,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"INT",t:0,m:[1,1],p:[{example:"99.44",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ISEVEN",t:0,m:[1,1],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ISODD",t:0,m:[1,1],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"LCM",t:0,m:[1,255],p:[{example:"A2:A5",require:"m",repeat:"n",type:"rangeall"},{example:"3",require:"o",repeat:"y",type:"rangeall"}]},{n:"LN",t:0,m:[1,1],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"LOG",t:0,m:[1,2],p:[{example:"128",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"n",type:"rangenumber"}]},{n:"LOG10",t:0,m:[1,1],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MOD",t:0,m:[2,2],p:[{example:"10",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MROUND",t:0,m:[2,2],p:[{example:"21",require:"m",repeat:"n",type:"rangenumber"},{example:"14",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ODD",t:0,m:[1,1],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SUMSQ",t:0,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"y",type:"rangeall"}]},{n:"COMBIN",t:0,m:[2,2],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SUM",t:0,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"y",type:"rangeall"}]},{n:"SUBTOTAL",t:0,m:[2,256],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A5",require:"m",repeat:"n",type:"range"},{example:"B2:B8",require:"o",repeat:"y",type:"range"}]},{n:"ASIN",t:0,m:[1,1],p:[{example:"0",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COUNTIF",t:1,m:[2,2],p:[{example:"A1:A10",require:"m",repeat:"n",type:"range"},{example:'">20"',require:"m",repeat:"n",type:"rangeall"}]},{n:"RADIANS",t:0,m:[1,1],p:[{example:"180",require:"m",repeat:"n",type:"rangenumber"}]},{n:"RAND",t:0,m:[0,0],p:[]},{n:"COUNTUNIQUE",t:0,m:[1,255],p:[{example:"A1:C100",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"}]},{n:"DEGREES",t:0,m:[1,1],p:[{example:"PI()",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ERFC",t:9,m:[1,1],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"EVEN",t:0,m:[1,1],p:[{example:"3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"EXP",t:0,m:[1,1],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"FACT",t:0,m:[1,1],p:[{example:"3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"FACTDOUBLE",t:0,m:[1,1],p:[{example:"6",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PI",t:0,m:[0,0],p:[]},{n:"FLOOR",t:0,m:[2,2],p:[{example:"23.25",require:"m",repeat:"n",type:"rangenumber"},{example:"0.1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"GCD",t:0,m:[1,255],p:[{example:"A2:A5",require:"m",repeat:"n",type:"rangeall"},{example:"96",require:"o",repeat:"y",type:"rangeall"}]},{n:"RANDBETWEEN",t:0,m:[2,2],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"10",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ROUND",t:0,m:[2,2],p:[{example:"99.44",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ROUNDDOWN",t:0,m:[2,2],p:[{example:"99.44",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ROUNDUP",t:0,m:[2,2],p:[{example:"99.44",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SERIESSUM",t:0,m:[4,4],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"{FACT(0)",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SIGN",t:0,m:[1,1],p:[{example:"-42",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SIN",t:0,m:[1,1],p:[{example:"PI()",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SINH",t:0,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SQRT",t:0,m:[1,1],p:[{example:"9",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SQRTPI",t:0,m:[1,1],p:[{example:"9",require:"m",repeat:"n",type:"rangenumber"}]},{n:"GAMMALN",t:1,m:[1,1],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COS",t:0,m:[1,1],p:[{example:"PI()",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TRUNC",t:0,m:[1,2],p:[{example:"3.141592654",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"n",type:"rangenumber"}]},{n:"QUOTIENT",t:0,m:[2,2],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"POWER",t:0,m:[2,2],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"0.5",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SUMIFS",t:0,m:[3,257],p:[{example:"A1:A10",require:"m",repeat:"n",type:"range"},{example:" B1:B10",require:"m",repeat:"n",type:"range"},{example:' ">20"',require:"m",repeat:"n",type:"rangeall"},{example:" C1:C10",require:"o",repeat:"y",type:"rangeall"}]},{n:"COUNTIFS",t:1,m:[2,256],p:[{example:"A1:A10",require:"m",repeat:"n",type:"range"},{example:' ">20"',require:"m",repeat:"n",type:"rangeall"},{example:" B1:B10",require:"o",repeat:"y",type:"rangeall"}]},{n:"PRODUCT",t:0,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"HARMEAN",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"HYPGEOMDIST",t:1,m:[5,5],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:"20",require:"m",repeat:"n",type:"rangenumber"},{example:"40",require:"m",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"INTERCEPT",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"KURT",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"LARGE",t:1,m:[2,2],p:[{example:"A2:B100",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"STDEVA",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"STDEVP",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"GEOMEAN",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"y",type:"rangeall"}]},{n:"RANK_EQ",t:1,m:[2,3],p:[{example:"A10",require:"m",repeat:"n",type:"rangenumber"},{example:"A1:A100",require:"m",repeat:"n",type:"range"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"RANK_AVG",t:1,m:[2,3],p:[{example:"A10",require:"m",repeat:"n",type:"rangenumber"},{example:"A1:A100",require:"m",repeat:"n",type:"range"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"PERCENTRANK_EXC",t:1,m:[2,3],p:[{example:"A1:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"o",repeat:"n",type:"rangenumber"}]},{n:"PERCENTRANK_INC",t:1,m:[2,3],p:[{example:"A1:A100",require:"m",repeat:"n",type:"rangenumber"},{example:" A2",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"o",repeat:"n",type:"rangenumber"}]},{n:"FORECAST",t:1,m:[3,3],p:[{example:"A1",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"FISHERINV",t:1,m:[1,1],p:[{example:"0.962",require:"m",repeat:"n",type:"rangenumber"}]},{n:"FISHER",t:1,m:[1,1],p:[{example:"0.962",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MODE_SNGL",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"o",repeat:"y",type:"rangenumber"}]},{n:"WEIBULL_DIST",t:1,m:[4,4],p:[{example:"2.4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"3",require:"m",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"COUNT",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangeall"},{example:"B2:B100",require:"o",repeat:"y",type:"rangeall"}]},{n:"COUNTA",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangeall"},{example:"B2:B100",require:"o",repeat:"y",type:"rangeall"}]},{n:"AVEDEV",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"AVERAGE",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangeall"},{example:"B2:B100",require:"o",repeat:"y",type:"rangeall"}]},{n:"AVERAGEA",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangeall"},{example:"B2:B100",require:"o",repeat:"y",type:"rangeall"}]},{n:"BINOM_DIST",t:1,m:[4,4],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"0.005",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"BINOM_INV",t:1,m:[3,3],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"0.005",require:"m",repeat:"n",type:"rangenumber"},{example:"0.8",require:"m",repeat:"n",type:"rangenumber"}]},{n:"CONFIDENCE_NORM",t:1,m:[3,3],p:[{example:"0.05",require:"m",repeat:"n",type:"rangenumber"},{example:"1.6",require:"m",repeat:"n",type:"rangenumber"},{example:"250",require:"m",repeat:"n",type:"rangenumber"}]},{n:"CORREL",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COVARIANCE_P",t:1,m:[2,2],p:[{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COVARIANCE_S",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DEVSQ",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"EXPON_DIST",t:1,m:[3,3],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"0.5",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"AVERAGEIF",t:1,m:[2,3],p:[{example:"A1:A10",require:"m",repeat:"n",type:"rangeall"},{example:'">20"',require:"m",repeat:"n",type:"rangeall"},{example:"B1:B10",require:"o",repeat:"n",type:"rangeall"}]},{n:"AVERAGEIFS",t:1,m:[2,255],p:[{example:"A1:A10",require:"m",repeat:"n",type:"rangeall"},{example:" B1:B10",require:"m",repeat:"n",type:"rangeall"},{example:' ">20"',require:"m",repeat:"n",type:"rangeall"},{example:" C1:C10",require:"m",repeat:"n",type:"rangeall"}]},{n:"PERMUT",t:1,m:[2,2],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TRIMMEAN",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"range"},{example:"0.1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PERCENTILE_EXC",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"0.25",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PERCENTILE_INC",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"0.25",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PEARSON",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"NORM_S_INV",t:1,m:[1,1],p:[{example:"0.75",require:"m",repeat:"n",type:"rangenumber"}]},{n:"NORM_S_DIST",t:1,m:[2,2],p:[{example:"2.4",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"NORM_INV",t:1,m:[3,3],p:[{example:"0.75",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"NORM_DIST",t:1,m:[4,4],p:[{example:"2.4",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"NEGBINOM_DIST",t:1,m:[4,4],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"0.1",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"MINA",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"o",repeat:"y",type:"rangenumber"}]},{n:"MIN",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"o",repeat:"y",type:"rangenumber"}]},{n:"MEDIAN",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"o",repeat:"y",type:"rangenumber"}]},{n:"MAXA",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"o",repeat:"y",type:"rangenumber"}]},{n:"MAX",t:1,m:[1,255],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"o",repeat:"y",type:"rangenumber"}]},{n:"LOGNORM_INV",t:1,m:[3,3],p:[{example:"0.4",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"6",require:"m",repeat:"n",type:"rangenumber"}]},{n:"LOGNORM_DIST",t:1,m:[4,4],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"6",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"Z_TEST",t:1,m:[2,3],p:[{example:"A2:A100",require:"m",repeat:"n",type:"range"},{example:"B2",require:"m",repeat:"n",type:"rangenumber"},{example:"3",require:"o",repeat:"n",type:"rangenumber"}]},{n:"PROB",t:1,m:[3,4],p:[{example:"A3:A6",require:"m",repeat:"n",type:"range"},{example:"2",require:"m",repeat:"n",type:"range"},{example:"3",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"o",repeat:"n",type:"rangenumber"}]},{n:"QUARTILE_EXC",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"QUARTILE_INC",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"POISSON_DIST",t:1,m:[3,3],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"RSQ",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"T_DIST",t:1,m:[3,3],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"30",require:"m",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"T_DIST_2T",t:1,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"30",require:"m",repeat:"n",type:"rangenumber"}]},{n:"T_DIST_RT",t:1,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"30",require:"m",repeat:"n",type:"rangenumber"}]},{n:"T_INV",t:1,m:[2,2],p:[{example:"0.35",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"T_INV_2T",t:1,m:[2,2],p:[{example:"0.35",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"T_TEST",t:1,m:[4,4],p:[{example:"A1:A4",require:"m",repeat:"n",type:"rangenumber"},{example:"B1:B4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"F_DIST",t:1,m:[4,4],p:[{example:"15.35",require:"m",repeat:"n",type:"rangenumber"},{example:"7",require:"m",repeat:"n",type:"rangenumber"},{example:"6",require:"m",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"m",repeat:"n",type:"rangeall"}]},{n:"F_DIST_RT",t:1,m:[3,3],p:[{example:"15.35",require:"m",repeat:"n",type:"rangenumber"},{example:"7",require:"m",repeat:"n",type:"rangenumber"},{example:"6",require:"m",repeat:"n",type:"rangenumber"}]},{n:"VAR_P",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"VAR_S",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"VARA",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"VARPA",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"y",type:"rangenumber"}]},{n:"STEYX",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"STANDARDIZE",t:1,m:[3,3],p:[{example:"96",require:"m",repeat:"n",type:"rangenumber"},{example:"80",require:"m",repeat:"n",type:"rangenumber"},{example:"6.7",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SMALL",t:1,m:[2,2],p:[{example:"A2:B100",require:"m",repeat:"n",type:"range"},{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SLOPE",t:1,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SKEW",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"y",type:"rangeall"}]},{n:"SKEW_P",t:1,m:[1,255],p:[{example:"1",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"y",type:"rangeall"}]},{n:"VLOOKUP",t:2,m:[3,4],p:[{example:"10003",require:"m",repeat:"n",type:"rangeall"},{example:"A2:B26",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"HLOOKUP",t:2,m:[3,4],p:[{example:"10003",require:"m",repeat:"n",type:"rangeall"},{example:"A2:Z6",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"LOOKUP",t:2,m:[2,3],p:[{example:"10003",require:"m",repeat:"n",type:"rangeall"},{example:"A1:A100",require:"m",repeat:"n",type:"rangeall"},{example:"B1:B100",require:"o",repeat:"n",type:"rangeall"}]},{n:"ADDRESS",t:2,m:[2,5],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"o",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"o",repeat:"n",type:"rangeall"},{example:'"Sheet2"',require:"o",repeat:"n",type:"rangeall"}]},{n:"INDIRECT",t:2,m:[1,2],p:[{example:'"Sheet2!"&B10',require:"m",repeat:"n",type:"rangeall"},{example:"FALSE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"ROW",t:2,m:[0,1],p:[{example:"A9",require:"o",repeat:"n",type:"rangeall"}]},{n:"ROWS",t:2,m:[1,1],p:[{example:"A9:A62",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COLUMN",t:2,m:[0,1],p:[{example:"A9",require:"o",repeat:"n",type:"rangeall"}]},{n:"COLUMNS",t:2,m:[1,1],p:[{example:"A9:W62",require:"m",repeat:"n",type:"rangenumber"}]},{n:"OFFSET",t:2,m:[3,5],p:[{example:"A2",require:"m",repeat:"n",type:"range"},{example:"3",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"n",type:"rangenumber"}]},{n:"MATCH",t:2,m:[2,3],p:[{example:'"Sunday"',require:"m",repeat:"n",type:"rangeall"},{example:"A2:A9",require:"m",repeat:"n",type:"range"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"INDEX",t:2,m:[2,3],p:[{example:"A1:C20",require:"m",repeat:"n",type:"range"},{example:"5",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"GETPIVOTDATA",t:2,m:[2,254],p:[{example:'"SUM of number of units"',require:"m",repeat:"n",type:"rangeall"},{example:"'Pivot table'!A1",require:"m",repeat:"n",type:"rangeall"},{example:'"division"',require:"o",repeat:"y",type:"rangeall"},{example:'"east"',require:"o",repeat:"y",type:"rangeall"}]},{n:"CHOOSE",t:2,m:[2,255],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:'"A"',require:"m",repeat:"n",type:"rangeall"},{example:'"B"',require:"o",repeat:"y",type:"rangeall"}]},{n:"HYPERLINK",t:2,p:[{example:'"http://www.luckysheet.com/"',require:"m",repeat:"n",type:"rangeall"},{example:'"luckysheet"',require:"m",repeat:"n",type:"rangeall"}]},{n:"TIME",t:6,m:[3,3],p:[{example:"11",require:"m",repeat:"n",type:"rangenumber"},{example:"40",require:"m",repeat:"n",type:"rangenumber"},{example:"59",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TIMEVALUE",t:6,m:[1,1],p:[{example:'"2:15 PM"',require:"m",repeat:"n",type:"rangeall"}]},{n:"EOMONTH",t:6,m:[2,2],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangenumber"}]},{n:"EDATE",t:6,m:[2,2],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SECOND",t:6,m:[1,1],p:[{example:"TIME(11",require:"m",repeat:"n",type:"rangeall"}]},{n:"MINUTE",t:6,m:[1,1],p:[{example:"TIME(11",require:"m",repeat:"n",type:"rangeall"}]},{n:"HOUR",t:6,m:[1,1],p:[{example:"TIME(11",require:"m",repeat:"n",type:"rangeall"}]},{n:"NOW",t:6,m:[0,0],p:[]},{n:"NETWORKDAYS",t:6,m:[2,3],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangeall"},{example:"16)",require:"o",repeat:"n",type:"rangeall"}]},{n:"NETWORKDAYS_INTL",t:6,m:[2,4],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangeall"},{example:"16)",require:"o",repeat:"n",type:"rangeall"},{example:"DATE(1969",require:"o",repeat:"n",type:"rangeall"}]},{n:"ISOWEEKNUM",t:6,m:[1,1],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"}]},{n:"WEEKNUM",t:6,m:[1,2],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"o",repeat:"n",type:"rangenumber"}]},{n:"WEEKDAY",t:6,m:[1,2],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DAY",t:6,m:[1,1],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"}]},{n:"DAYS",t:6,m:[2,2],p:[{example:"2011-3-15",require:"m",repeat:"n",type:"rangeall"},{example:"2011-2-1",require:"m",repeat:"n",type:"rangeall"}]},{n:"DAYS360",t:6,m:[2,3],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangeall"},{example:"FALSE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"DATE",t:6,m:[3,3],p:[{example:"1969",require:"m",repeat:"n",type:"rangenumber"},{example:"7",require:"m",repeat:"n",type:"rangenumber"},{example:"20",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DATEVALUE",t:6,m:[1,1],p:[{example:'"1969-7-20"',require:"m",repeat:"n",type:"rangeall"}]},{n:"DATEDIF",t:6,m:[3,3],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangeall"},{example:"16)",require:"m",repeat:"n",type:"rangeall"}]},{n:"WORKDAY",t:6,m:[2,3],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangenumber"},{example:"16)",require:"o",repeat:"n",type:"rangeall"}]},{n:"WORKDAY_INTL",t:6,m:[2,4],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangenumber"},{example:"16)",require:"o",repeat:"n",type:"rangeall"},{example:"DATE(1969",require:"o",repeat:"n",type:"rangeall"}]},{n:"YEAR",t:6,m:[1,1],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"}]},{n:"YEARFRAC",t:6,m:[2,3],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"7",require:"m",repeat:"n",type:"rangeall"},{example:"16)",require:"o",repeat:"n",type:"rangenumber"}]},{n:"TODAY",t:6,m:[0,0],p:[]},{n:"MONTH",t:6,m:[1,1],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"}]},{n:"EFFECT",t:8,m:[2,2],p:[{example:"0.99",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DOLLAR",t:12,m:[1,2],p:[{example:"1.2351",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DOLLARDE",t:8,m:[2,2],p:[{example:"100.10",require:"m",repeat:"n",type:"rangenumber"},{example:"32",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DOLLARFR",t:8,m:[2,2],p:[{example:"100.125",require:"m",repeat:"n",type:"rangenumber"},{example:"32",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DB",t:8,m:[4,5],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"50",require:"m",repeat:"n",type:"rangenumber"},{example:"10",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"10",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DDB",t:8,m:[4,5],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"50",require:"m",repeat:"n",type:"rangenumber"},{example:"10",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"2.25",require:"m",repeat:"n",type:"rangenumber"}]},{n:"RATE",t:8,m:[3,6],p:[{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:"-100",require:"m",repeat:"n",type:"rangenumber"},{example:"400",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"},{example:"0.1",require:"o",repeat:"n",type:"rangenumber"}]},{n:"CUMPRINC",t:8,m:[6,6],p:[{example:"0.12",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"5",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COUPNUM",t:8,m:[3,4],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"02",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"SYD",t:8,m:[4,4],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"50",require:"m",repeat:"n",type:"rangenumber"},{example:"10",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TBILLEQ",t:8,m:[3,3],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"m",repeat:"n",type:"rangeall"},{example:"2)",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TBILLYIELD",t:8,m:[3,3],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"95",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TBILLPRICE",t:8,m:[3,3],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.09",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PV",t:8,m:[3,5],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"D2",require:"o",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"}]},{n:"ACCRINT",t:8,m:[6,8],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.1",require:"m",repeat:"n",type:"rangenumber"},{example:"10000",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"ACCRINTM",t:8,m:[4,5],p:[{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(1969",require:"m",repeat:"n",type:"rangeall"},{example:"0.1",require:"m",repeat:"n",type:"rangenumber"},{example:"1000",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"}]},{n:"COUPDAYBS",t:8,m:[3,4],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"COUPDAYS",t:8,m:[3,4],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"COUPDAYSNC",t:8,m:[3,4],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"COUPNCD",t:8,m:[3,4],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"01)",require:"m",repeat:"n",type:"rangenumber"},{example:"DATE(2019",require:"o",repeat:"n",type:"rangenumber"}]},{n:"COUPPCD",t:8,m:[3,4],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"01)",require:"m",repeat:"n",type:"rangenumber"},{example:"DATE(2019",require:"o",repeat:"n",type:"rangenumber"}]},{n:"FV",t:8,m:[3,5],p:[{example:"0.12",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"400",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"FVSCHEDULE",t:8,m:[2,2],p:[{example:"10000",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A100",require:"m",repeat:"n",type:"range"}]},{n:"YIELD",t:8,m:[6,7],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.057",require:"m",repeat:"n",type:"rangenumber"},{example:"95",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"m",repeat:"n",type:"rangenumber"}]},{n:"YIELDDISC",t:8,m:[4,5],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"95",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"m",repeat:"n",type:"rangenumber"}]},{n:"NOMINAL",t:8,m:[2,2],p:[{example:"0.85",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"}]},{n:"XIRR",t:8,m:[2,3],p:[{example:"B2:B25",require:"m",repeat:"n",type:"range"},{example:"C2:C25",require:"m",repeat:"n",type:"range"},{example:"250",require:"o",repeat:"n",type:"rangenumber"}]},{n:"MIRR",t:8,m:[3,3],p:[{example:"A2:A25",require:"m",repeat:"n",type:"range"},{example:"0.1",require:"m",repeat:"n",type:"rangenumber"},{example:"0.12",require:"m",repeat:"n",type:"rangenumber"}]},{n:"IRR",t:8,m:[1,2],p:[{example:"A2:A25",require:"m",repeat:"n",type:"range"},{example:"200",require:"o",repeat:"n",type:"rangenumber"}]},{n:"NPV",t:8,m:[2,255],p:[{example:"0.1",require:"m",repeat:"n",type:"rangenumber"},{example:"200",require:"m",repeat:"n",type:"rangeall"},{example:"250",require:"o",repeat:"y",type:"rangeall"}]},{n:"XNPV",t:8,m:[3,3],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B25",require:"m",repeat:"n",type:"range"},{example:"C2:C25",require:"m",repeat:"n",type:"range"}]},{n:"CUMIPMT",t:8,m:[6,6],p:[{example:"0.12",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"5",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PMT",t:8,m:[3,5],p:[{example:"0.08",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:" 100000",require:"m",repeat:"n",type:"rangenumber"},{example:"D2",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"IPMT",t:8,m:[4,6],p:[{example:"0.1",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"},{example:"80000",require:"m",repeat:"n",type:"rangenumber"},{example:"E2",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PPMT",t:8,m:[4,6],p:[{example:"0.1",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"3*12",require:"m",repeat:"n",type:"rangenumber"},{example:"100000",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"INTRATE",t:8,m:[4,5],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"100000",require:"m",repeat:"n",type:"rangenumber"},{example:"101200",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"m",repeat:"n",type:"rangenumber"}]},{n:"PRICE",t:8,m:[6,7],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.057",require:"m",repeat:"n",type:"rangenumber"},{example:"0.065",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"PRICEDISC",t:8,m:[4,5],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.0525",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"PRICEMAT",t:8,m:[5,6],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.061",require:"m",repeat:"n",type:"rangenumber"},{example:"0.061",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"RECEIVED",t:8,m:[4,5],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"10000000",require:"m",repeat:"n",type:"rangenumber"},{example:"0.0575",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DISC",t:8,m:[4,5],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"97.975",require:"m",repeat:"n",type:"rangenumber"},{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"12",require:"o",repeat:"n",type:"rangenumber"}]},{n:"NPER",t:8,m:[3,5],p:[{example:"0.12",require:"m",repeat:"n",type:"rangenumber"},{example:"500",require:"m",repeat:"n",type:"rangenumber"},{example:"40000",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"SLN",t:8,m:[3,3],p:[{example:"300000",require:"m",repeat:"n",type:"rangenumber"},{example:"75000",require:"m",repeat:"n",type:"rangenumber"},{example:"10",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DURATION",t:8,m:[5,6],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.08",require:"m",repeat:"n",type:"rangenumber"},{example:"0.09",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"MDURATION",t:8,m:[5,6],p:[{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"DATE(2010",require:"m",repeat:"n",type:"rangeall"},{example:"0.08",require:"m",repeat:"n",type:"rangenumber"},{example:"0.09",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"BIN2DEC",t:9,m:[1,1],p:[{example:"101",require:"m",repeat:"n",type:"rangeall"}]},{n:"BIN2HEX",t:9,m:[1,2],p:[{example:"101",require:"m",repeat:"n",type:"rangeall"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"BIN2OCT",t:9,m:[1,2],p:[{example:"101",require:"m",repeat:"n",type:"rangeall"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DEC2BIN",t:9,m:[1,2],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DEC2HEX",t:9,m:[1,2],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DEC2OCT",t:9,m:[1,2],p:[{example:"100",require:"m",repeat:"n",type:"rangenumber"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"HEX2BIN",t:9,m:[1,2],p:[{example:'"f3"',require:"m",repeat:"n",type:"rangeall"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"HEX2DEC",t:9,m:[1,1],p:[{example:'"f3"',require:"m",repeat:"n",type:"rangeall"}]},{n:"HEX2OCT",t:9,m:[1,2],p:[{example:'"f3"',require:"m",repeat:"n",type:"rangeall"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"OCT2BIN",t:9,m:[1,2],p:[{example:"37",require:"m",repeat:"n",type:"rangeall"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"OCT2DEC",t:9,m:[1,1],p:[{example:"37",require:"m",repeat:"n",type:"rangeall"}]},{n:"OCT2HEX",t:9,m:[1,2],p:[{example:"37",require:"m",repeat:"n",type:"rangeall"},{example:"8",require:"o",repeat:"n",type:"rangenumber"}]},{n:"COMPLEX",t:9,m:[2,3],p:[{example:"3",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:'"j"',require:"o",repeat:"n",type:"rangestring"}]},{n:"IMREAL",t:9,m:[1,1],p:[{example:'"4+5i"',require:"m",repeat:"n",type:"rangeall"}]},{n:"IMAGINARY",t:9,m:[1,1],p:[{example:'"4+5i"',require:"m",repeat:"n",type:"rangeall"}]},{n:"IMCONJUGATE",t:9,m:[1,1],p:[{example:'"3+4i"',require:"m",repeat:"n",type:"rangeall"}]},{n:"IMABS",t:9,m:[1,1],p:[{example:'"3+4i"',require:"m",repeat:"n",type:"rangeall"}]},{n:"DELTA",t:9,m:[1,2],p:[{example:"2",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"}]},{n:"IMSUM",t:9,m:[1,255],p:[{example:'"3+4i"',require:"m",repeat:"n",type:"rangeall"},{example:'"5-3i"',require:"o",repeat:"y",type:"rangeall"}]},{n:"IMSUB",t:9,m:[2,2],p:[{example:'"6+5i"',require:"m",repeat:"n",type:"rangeall"},{example:'"2+3i"',require:"m",repeat:"n",type:"rangeall"}]},{n:"IMPRODUCT",t:9,m:[1,255],p:[{example:'"3+4i"',require:"m",repeat:"n",type:"rangeall"},{example:'"5-3i"',require:"o",repeat:"y",type:"rangeall"}]},{n:"IMDIV",t:9,m:[2,2],p:[{example:'"11+16i"',require:"m",repeat:"n",type:"rangeall"},{example:'"3+2i"',require:"m",repeat:"n",type:"rangeall"}]},{n:"NOT",t:10,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"TRUE",t:10,m:[0,0],p:[]},{n:"FALSE",t:10,m:[0,0],p:[]},{n:"AND",t:10,m:[1,255],p:[{example:'A2 = "foo"',require:"m",repeat:"n",type:"rangeall"},{example:'A3 = "bar"',require:"o",repeat:"y",type:"rangeall"}]},{n:"IFERROR",t:10,m:[2,2],p:[{example:"A1",require:"m",repeat:"n",type:"rangeall"},{example:'"Error in cell A1"',require:"m",repeat:"n",type:"rangeall"}]},{n:"IF",t:10,m:[2,3],p:[{example:'A2 = "foo"',require:"m",repeat:"n",type:"rangeall"},{example:'"A2 is foo"',require:"m",repeat:"n",type:"rangeall"},{example:'"A2 was false"',require:"o",repeat:"n",type:"rangeall"}]},{n:"OR",t:10,m:[1,255],p:[{example:'A2 = "foo"',require:"m",repeat:"n",type:"rangeall"},{example:' A3 = "bar"',require:"m",repeat:"n",type:"rangeall"}]},{n:"NE",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"A3",require:"m",repeat:"n",type:"rangeall"}]},{n:"EQ",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"A3",require:"m",repeat:"n",type:"rangeall"}]},{n:"GT",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"A3",require:"m",repeat:"n",type:"rangeall"}]},{n:"GTE",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"A3",require:"m",repeat:"n",type:"rangeall"}]},{n:"LT",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"A3",require:"m",repeat:"n",type:"rangeall"}]},{n:"LTE",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"A3",require:"m",repeat:"n",type:"rangeall"}]},{n:"ADD",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"A3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MINUS",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"A3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MULTIPLY",t:11,m:[2,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"},{example:"B2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DIVIDE",t:11,m:[2,2],p:[{example:"4",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"CONCAT",t:11,m:[2,2],p:[{example:'"de"',require:"m",repeat:"n",type:"rangeall"},{example:'"mystify"',require:"m",repeat:"n",type:"rangeall"}]},{n:"UNARY_PERCENT",t:11,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"CONCATENATE",t:12,m:[1,255],p:[{example:'"Super"',require:"m",repeat:"n",type:"rangeall"},{example:'"calla"',require:"o",repeat:"y",type:"rangeall"}]},{n:"CODE",t:12,m:[1,1],p:[{example:'"a"',require:"m",repeat:"n",type:"rangeall"}]},{n:"CHAR",t:12,m:[1,1],p:[{example:"97",require:"m",repeat:"n",type:"rangenumber"}]},{n:"ARABIC",t:12,m:[1,1],p:[{example:'"XIV"',require:"m",repeat:"n",type:"rangeall"}]},{n:"ROMAN",t:12,m:[1,1],p:[{example:"499",require:"m",repeat:"n",type:"rangenumber"}]},{n:"REGEXEXTRACT",t:12,m:[2,2],p:[{example:'"Needle in a haystack"',require:"m",repeat:"n",type:"rangeall"},{example:'".e{2}dle"',require:"m",repeat:"n",type:"rangeall"}]},{n:"REGEXMATCH",t:12,m:[2,2],p:[{example:'"Spreadsheets"',require:"m",repeat:"n",type:"rangeall"},{example:'"S.r"',require:"m",repeat:"n",type:"rangeall"}]},{n:"REGEXREPLACE",t:12,m:[3,3],p:[{example:'"Spreadsheets"',require:"m",repeat:"n",type:"rangeall"},{example:'"S.*d"',require:"m",repeat:"n",type:"rangeall"},{example:'"Bed"',require:"m",repeat:"n",type:"rangeall"}]},{n:"T",t:12,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"FIXED",t:12,m:[1,3],p:[{example:"3.141592653",require:"m",repeat:"n",type:"rangenumber"},{example:"2",require:"o",repeat:"n",type:"rangenumber"},{example:"FALSE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"FIND",t:12,m:[2,3],p:[{example:'"n"',require:"m",repeat:"n",type:"rangeall"},{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"14",require:"o",repeat:"n",type:"rangenumber"}]},{n:"FINDB",t:12,m:[2,3],p:[{example:'"new"',require:"m",repeat:"n",type:"rangeall"},{example:'"new year"',require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"n",type:"rangenumber"}]},{n:"JOIN",t:12,m:[2,255],p:[{example:'" and-a "',require:"m",repeat:"n",type:"rangeall"},{example:"{1",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"o",repeat:"y",type:"rangeall"}]},{n:"LEFT",t:12,m:[1,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"RIGHT",t:12,m:[1,2],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MID",t:12,m:[3,3],p:[{example:'"get this"',require:"m",repeat:"n",type:"rangeall"},{example:"5",require:"m",repeat:"n",type:"rangenumber"},{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"LEN",t:12,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"LENB",t:12,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"LOWER",t:12,m:[1,1],p:[{example:'"LOREM IPSUM"',require:"m",repeat:"n",type:"rangeall"}]},{n:"UPPER",t:12,m:[1,1],p:[{example:'"lorem ipsum"',require:"m",repeat:"n",type:"rangeall"}]},{n:"EXACT",t:12,m:[2,2],p:[{example:"A1",require:"m",repeat:"n",type:"rangeall"},{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"REPLACE",t:12,m:[4,4],p:[{example:'"Spreadsheets"',require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"6",require:"m",repeat:"n",type:"rangenumber"},{example:'"Bed"',require:"m",repeat:"n",type:"rangeall"}]},{n:"REPT",t:12,m:[2,2],p:[{example:'"ha"',require:"m",repeat:"n",type:"rangeall"},{example:"4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SEARCH",t:12,m:[2,3],p:[{example:'"n"',require:"m",repeat:"n",type:"rangeall"},{example:"A2",require:"m",repeat:"n",type:"rangeall"},{example:"14",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SUBSTITUTE",t:12,m:[3,4],p:[{example:'"search for it"',require:"m",repeat:"n",type:"rangeall"},{example:'"search for"',require:"m",repeat:"n",type:"rangeall"},{example:'"Google"',require:"m",repeat:"n",type:"rangeall"},{example:"3",require:"m",repeat:"n",type:"rangenumber"}]},{n:"CLEAN",t:12,m:[1,1],p:[{example:'"AF"&CHAR(31)',require:"m",repeat:"n",type:"rangeall"}]},{n:"TEXT",t:12,m:[2,2],p:[{example:"1.23",require:"m",repeat:"n",type:"rangenumber"},{example:'"$0.00"',require:"m",repeat:"n",type:"rangeall"}]},{n:"TRIM",t:12,m:[1,1],p:[{example:'" lorem ipsum"',require:"m",repeat:"n",type:"rangeall"}]},{n:"VALUE",t:12,m:[1,1],p:[{example:'"123"',require:"m",repeat:"n",type:"rangeall"}]},{n:"PROPER",t:12,m:[1,1],p:[{example:'"united states"',require:"m",repeat:"n",type:"rangeall"}]},{n:"CONVERT",t:13,m:[3,3],p:[{example:"5.1",require:"m",repeat:"n",type:"rangenumber"},{example:'"g"',require:"m",repeat:"n",type:"rangeall"},{example:'"kg"',require:"m",repeat:"n",type:"rangeall"}]},{n:"SUMX2MY2",t:14,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SUMX2PY2",t:14,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SUMXMY2",t:14,m:[2,2],p:[{example:"A2:A100",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B100",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TRANSPOSE",t:14,m:[1,1],p:[{example:"{1,2}",require:"m",repeat:"n",type:"range"}]},{n:"TREND",t:14,m:[1,4],p:[{example:"B2:B10",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A10",require:"o",repeat:"n",type:"rangenumber"},{example:"A11:A13",require:"o",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"FREQUENCY",t:14,m:[2,2],p:[{example:"A2:A40",require:"m",repeat:"n",type:"rangenumber"},{example:"B2:B5",require:"m",repeat:"n",type:"rangenumber"}]},{n:"GROWTH",t:14,m:[1,4],p:[{example:"B2:B10",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A10",require:"o",repeat:"n",type:"rangenumber"},{example:"A11:A13",require:"o",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"LINEST",t:14,m:[1,4],p:[{example:"B2:B10",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A10",require:"o",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"LOGEST",t:14,m:[1,4],p:[{example:"B2:B10",require:"m",repeat:"n",type:"rangenumber"},{example:"A2:A10",require:"o",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"MDETERM",t:14,m:[1,1],p:[{example:"A1:D4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MINVERSE",t:14,m:[1,1],p:[{example:"A1:D4",require:"m",repeat:"n",type:"rangenumber"}]},{n:"MMULT",t:14,m:[2,2],p:[{example:"A1:B3",require:"m",repeat:"n",type:"rangenumber"},{example:"C1:F2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"SUMPRODUCT",t:14,m:[1,255],p:[{example:"A2:C5",require:"m",repeat:"n",type:"rangenumber"},{example:"D2:F5",require:"o",repeat:"y",type:"rangenumber"}]},{n:"ISFORMULA",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"range"}]},{n:"CELL",t:15,m:[2,2],p:[{example:'"type"',require:"m",repeat:"n",type:"rangeall"},{example:"C2",require:"m",repeat:"n",type:"range"}]},{n:"NA",t:15,m:[0,0],p:[]},{n:"ERROR_TYPE",t:15,m:[1,1],p:[{example:"A3",require:"m",repeat:"n",type:"rangeall"}]},{n:"ISBLANK",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"range"}]},{n:"ISERR",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"ISERROR",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"ISLOGICAL",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"ISNA",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"ISNONTEXT",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"ISNUMBER",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"ISREF",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"range"}]},{n:"ISTEXT",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"TYPE",t:15,m:[1,1],p:[{example:"C4",require:"m",repeat:"n",type:"rangeall"}]},{n:"N",t:15,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangeall"}]},{n:"TO_DATE",t:16,m:[1,1],p:[{example:"25405",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TO_PURE_NUMBER",t:16,m:[1,1],p:[{example:"50%",require:"m",repeat:"n",type:"rangeall"}]},{n:"TO_TEXT",t:16,m:[1,1],p:[{example:"24",require:"m",repeat:"n",type:"rangeall"}]},{n:"TO_DOLLARS",t:16,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"TO_PERCENT",t:16,m:[1,1],p:[{example:"A2",require:"m",repeat:"n",type:"rangenumber"}]},{n:"DGET",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DMAX",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DMIN",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DAVERAGE",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DCOUNT",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DCOUNTA",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DPRODUCT",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DSTDEV",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DSTDEVP",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DSUM",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DVAR",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"DVARP",t:17,m:[3,3],p:[{example:"A2:F20",require:"m",repeat:"n",type:"range"},{example:"G2",require:"m",repeat:"n",type:"rangeall"},{example:"A22:D23",require:"m",repeat:"n",type:"range"}]},{n:"AGE_BY_IDCARD",t:"3",m:[1,2],p:[{example:"A1",require:"m",repeat:"n",type:"rangeall"},{example:'"2017-10-01"',require:"o",repeat:"n",type:"rangedatetime"}]},{n:"SEX_BY_IDCARD",t:"3",m:[1,1],p:[{example:'"31033519900101XXXX"',require:"m",repeat:"n",type:"rangeall"}]},{n:"BIRTHDAY_BY_IDCARD",t:"3",m:[1,2],p:[{example:'"31033519900101XXXX"',require:"m",repeat:"n",type:"rangeall"},{example:"0",require:"o",repeat:"n",type:"rangeall"}]},{n:"PROVINCE_BY_IDCARD",t:"3",m:[1,1],p:[{example:'"31033519900101XXXX"',require:"m",repeat:"n",type:"rangeall"}]},{n:"CITY_BY_IDCARD",t:"3",m:[1,1],p:[{example:'"31033519900101XXXX"',require:"m",repeat:"n",type:"rangeall"}]},{n:"STAR_BY_IDCARD",t:"3",m:[1,1],p:[{example:'"31033519900101XXXX"',require:"m",repeat:"n",type:"rangeall"}]},{n:"ANIMAL_BY_IDCARD",t:"3",m:[1,1],p:[{example:'"31033519900101XXXX"',require:"m",repeat:"n",type:"rangeall"}]},{n:"ISIDCARD",t:"3",m:[1,1],p:[{example:'"31033519900101XXXX"',require:"m",repeat:"n",type:"rangeall"}]},{n:"DM_TEXT_CUTWORD",t:"4",m:[1,2],p:[{example:'"I came to Beijing Tsinghua University"',require:"m",repeat:"n",type:"rangeall"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DM_TEXT_TFIDF",t:"4",m:[1,3],p:[{example:'"I came to Beijing Tsinghua University"',require:"m",repeat:"n",type:"rangeall"},{example:"20",require:"o",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DM_TEXT_TEXTRANK",t:"4",m:[1,3],p:[{example:'"I came to Beijing Tsinghua University"',require:"m",repeat:"n",type:"rangeall"},{example:"20",require:"o",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DATA_CN_STOCK_CLOSE",t:"5",m:[1,3],p:[{example:'"000001"',require:"m",repeat:"n",type:"rangeall"},{example:"2015-01-08",require:"o",repeat:"n",type:"rangedate"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DATA_CN_STOCK_OPEN",t:"5",m:[1,3],p:[{example:'"000001"',require:"m",repeat:"n",type:"rangeall"},{example:"2015-01-08",require:"o",repeat:"n",type:"rangedate"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DATA_CN_STOCK_MAX",t:"5",m:[1,3],p:[{example:'"000001"',require:"m",repeat:"n",type:"rangeall"},{example:"2015-01-08",require:"o",repeat:"n",type:"rangedate"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DATA_CN_STOCK_MIN",t:"5",m:[1,3],p:[{example:'"000001"',require:"m",repeat:"n",type:"rangeall"},{example:"2015-01-08",require:"o",repeat:"n",type:"rangedate"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DATA_CN_STOCK_VOLUMN",t:"5",m:[1,3],p:[{example:'"000001"',require:"m",repeat:"n",type:"rangeall"},{example:"2015-01-08",require:"o",repeat:"n",type:"rangedate"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"DATA_CN_STOCK_AMOUNT",t:"5",m:[1,3],p:[{example:'"000001"',require:"m",repeat:"n",type:"rangeall"},{example:"2015-01-08",require:"o",repeat:"n",type:"rangedate"},{example:"0",require:"o",repeat:"n",type:"rangenumber"}]},{n:"ISDATE",t:"6",m:[1,1],p:[{example:'"1990-01-01"',require:"m",repeat:"n",type:"rangeall"}]},{n:"LINESPLINES",t:"3",m:[1,8],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"#2ec7c9",require:"o",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"avg",require:"o",repeat:"n",type:"rangeall"},{example:"#000",require:"o",repeat:"n",type:"rangeall"},{example:"#fc5c5c",require:"o",repeat:"n",type:"rangeall"},{example:"#fc5c5c",require:"o",repeat:"n",type:"rangeall"},{example:"1.5",require:"o",repeat:"n",type:"rangeall"}]},{n:"AREASPLINES",t:"3",m:[1,5],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"#2ec7c9",require:"o",repeat:"n",type:"rangeall"},{example:"#CCF3F4",require:"o",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"avg",require:"o",repeat:"n",type:"rangeall"},{example:"#000",require:"o",repeat:"n",type:"rangeall"}]},{n:"COLUMNSPLINES",t:"3",m:[1,6],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"#fc5c5c",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"n",type:"rangeall"},{example:"100",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"y",type:"rangeall"}]},{n:"STACKCOLUMNSPLINES",t:"3",m:[1,5],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"100",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"y",type:"rangeall"}]},{n:"BARSPLINES",t:"3",m:[1,6],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"#fc5c5c",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"n",type:"rangeall"},{example:"100",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"y",type:"rangeall"}]},{n:"STACKBARSPLINES",t:"3",m:[1,5],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"100",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"y",type:"rangeall"}]},{n:"DISCRETESPLINES",t:"3",m:[1,4],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"#2ec7c9",require:"o",repeat:"n",type:"rangeall"},{example:"#fc5c5c",require:"o",repeat:"n",type:"rangeall"}]},{n:"TRISTATESPLINES",t:"3",m:[1,6],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"1",require:"o",repeat:"n",type:"rangeall"},{example:"#fc5c5c",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"n",type:"rangeall"},{example:"#999",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"y",type:"rangeall"}]},{n:"PIESPLINES",t:"3",m:[1,5],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"0",require:"o",repeat:"n",type:"rangeall"},{example:"0",require:"o",repeat:"n",type:"rangeall"},{example:"#000",require:"o",repeat:"n",type:"rangeall"},{example:"#97b552",require:"o",repeat:"y",type:"rangeall"}]},{n:"BOXSPLINES",t:"3",m:[1,4],p:[{example:"A1:A20",require:"m",repeat:"n",type:"rangeall"},{example:"1.5",require:"o",repeat:"n",type:"rangeall"},{example:"10",require:"o",repeat:"n",type:"rangeall"},{example:"1.5",require:"o",repeat:"n",type:"rangeall"}]},{n:"BULLETSPLINES",t:"3",m:[2,3],p:[{example:"10",require:"m",repeat:"n",type:"rangeall"},{example:"8",require:"m",repeat:"n",type:"rangeall"},{example:"12",require:"o",repeat:"y",type:"rangeall"}]},{n:"COMPOSESPLINES",t:"3",m:[1,1],p:[{example:"PIESPLINES(A1:A20)",require:"m",repeat:"y",type:"rangeall"}]},{n:"SORT",t:"14",m:[1,4],p:[{example:"A2:A17",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"},{example:"-1",require:"o",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"FILTER",t:"14",m:[2,3],p:[{example:"A5:D20",require:"m",repeat:"n",type:"range"},{example:"1",require:"m",repeat:"n",type:"range"},{example:'""',require:"o",repeat:"n",type:"rangeall"}]},{n:"UNIQUE",t:"14",m:[1,3],p:[{example:"A2:B26",require:"m",repeat:"n",type:"rangenumber"},{example:"TRUE()",require:"o",repeat:"n",type:"rangeall"},{example:"FALSE()",require:"o",repeat:"n",type:"rangeall"}]},{n:"RANDARRAY",t:"14",m:[0,2],p:[{example:"1",require:"o",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"}]},{n:"SEQUENCE",t:"14",m:[1,4],p:[{example:"1",require:"m",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"},{example:"1",require:"o",repeat:"n",type:"rangenumber"}]},{n:"EVALUATE",t:"3",m:[1,1],p:[{example:'"A1+5*2^2"',require:"m",repeat:"n",type:"rangeall"}]},{n:"REMOTE",t:"5",m:[1,1],p:[{example:"SUM(A1:A10000000)",require:"m",repeat:"n",type:"string"}]}]});var Hm,Vm=Ie(()=>{Bm();Hm=e=>(tu.forEach(n=>{let t=e[n.n];n.d=t.d,n.a=t.a,n.p.forEach((l,a)=>{Object.assign(l,t.p[a])})}),tu)});var Db,qm,jm=Ie(()=>{Om();Xe();bt();Vm();Db=function(e){let n=Q(),t=[...Hm(n.functionlist)];for(let a=0;a<t.length;a++){let o=t[a];o.f=zm[o.n]}e&&t.push(...e),h.functionlist=t;let l={};for(let a=0;a<t.length;a++){let o=t[a];l[o.n]=o}window.luckysheet_function=l,h.luckysheet_function=l},qm=Db});function Mb(e,n){let t=ve.getSheetByIndex();t.config==null&&(t.config={}),t.config.sheetViewZoom==null&&(t.config.sheetViewZoom={});let l=1,a="zoomScaleNormal";Fb(t),e=="viewNormal"?a="viewNormalZoomScale":e=="viewLayout"?a="viewLayoutZoomScale":e=="viewPage"&&(a="viewPageZoomScale",l=.6,Eb(t));let o=t.config.sheetViewZoom[a];o==null&&(o=l),t.config.curentsheetView=e,h.clearjfundo&&h.jfredo.push({type:"viewChange",curType:e,preType:n,sheetIndex:h.currentSheetIndex}),ne.saveParam("cg",h.currentSheetIndex,e,{k:"curentsheetView"}),h.currentSheetView=e,Cn(o)}function Fb(e){}function Eb(e){}function Nb(e){let n=e.parent(),t=n.find("luckysheet-print-viewBtn-active").attr("type");if(e.attr("type")==t)return;let l=e.attr("type");if(l!=null)Mb(l,t);else return;e.parent().find(".luckysheet-print-viewBtn").removeClass("luckysheet-print-viewBtn-active"),e.addClass("luckysheet-print-viewBtn-active")}function Um(){let e=de.container,n=this;$("#"+e).find(".luckysheet-print-viewBtn").click(function(){Nb($(this))})}var Gm=Ie(()=>{xl();Ja();dl();Qt();Ol();Xe()});var Ym=vl((Jo,Wm)=>{(function(e,n){typeof Jo=="object"&&typeof Wm!="undefined"?n(Jo):typeof define=="function"&&define.amd?define(["exports"],n):(e=typeof globalThis!="undefined"?globalThis:e||self,n(e.zh={}))})(Jo,function(e){"use strict";var n=typeof window!="undefined"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},t={weekdays:{shorthand:["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"],longhand:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"]},months:{shorthand:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],longhand:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"]},rangeSeparator:" \u81F3 ",weekAbbreviation:"\u5468",scrollTitle:"\u6EDA\u52A8\u5207\u6362",toggleTitle:"\u70B9\u51FB\u5207\u6362 12/24 \u5C0F\u65F6\u65F6\u5236"};n.l10ns.zh=t;var l=n.l10ns;e.Mandarin=t,e.default=l,Object.defineProperty(e,"__esModule",{value:!0})})});function Pb(e){clearTimeout(Xm),Xm=setTimeout(()=>{$("#luckysheet-icon-undo")[e?"removeClass":"addClass"]("disabled")},10)}function Lb(e){clearTimeout(Km),Km=setTimeout(()=>{$("#luckysheet-icon-redo")[e?"removeClass":"addClass"]("disabled")},10)}var Xm,Km,Zm,Jm=Ie(()=>{ft();Xe();Ll();Nt();va();Zm=function(){Xo(h,"jfredo",(e,n,t,l)=>{n!=="length"&&Je.createHookFunction("updated",t),Pb(h.jfredo.length)}),Xo(h,"jfundo",(e,n,t,l)=>{Lb(h.jfundo.length)}),Xo(h,"asyncLoad",(e,n,t,l)=>{n==="length"&&t===0&&Je.createHookFunction("workbookCreateAfter",Uo())})}});function ep(){Qc(),Xf(),ym(),_m(),Tm(),$m(),Am(),Mm(),Nd(),Um(),Zm()}var Qm,gl,tp=Ie(()=>{cu();ft();Xe();bt();Qt();xl();dl();pr();gm();kn();vm();Cm();Sm();Im();Dm();Fm();Lm();Nt();An();Yt();jm();Gt();Kt();$r();Zt();Ja();Gm();Ll();va();Ec();Qm=Fl(Ym());Jm();zs();fa();gl={};gl=Xc(jc,gl);gl.create=function(e){Je.destroy(),h.toJsonOptions={};for(let f in e)f!=="data"&&(h.toJsonOptions[f]=e[f]);let n=Xc(su,e),t=n.loadUrl,l=n.menu,a=n.title,o=n.container;h.container=o,h.luckysheetfile=n.data,h.defaultcolumnNum=n.column,h.defaultrowNum=n.row,h.defaultFontSize=n.defaultFontSize,h.fullscreenmode=n.fullscreenmode,h.lang=n.lang,h.allowEdit=n.allowEdit,h.limitSheetNameLength=n.limitSheetNameLength,h.defaultSheetNameMaxLength=n.defaultSheetNameMaxLength,h.fontList=n.fontList,ne.gridKey=n.gridKey,ne.loadUrl=n.loadUrl,ne.updateUrl=n.updateUrl,ne.updateImageUrl=n.updateImageUrl,ne.title=n.title,ne.loadSheetUrl=n.loadSheetUrl,ne.allowUpdate=n.allowUpdate,de.autoFormatw=n.autoFormatw,de.accuracy=n.accuracy,de.total=n.data[0].total,de.loading=n.loading,de.allowCopy=n.allowCopy,de.showtoolbar=n.showtoolbar,de.showtoolbarConfig=n.showtoolbarConfig,de.showinfobar=n.showinfobar,de.showsheetbar=n.showsheetbar,de.showsheetbarConfig=n.showsheetbarConfig,de.showstatisticBar=n.showstatisticBar,de.showstatisticBarConfig=n.showstatisticBarConfig,de.sheetFormulaBar=n.sheetFormulaBar,de.cellRightClickConfig=n.cellRightClickConfig,de.sheetRightClickConfig=n.sheetRightClickConfig,de.pointEdit=n.pointEdit,de.pointEditUpdate=n.pointEditUpdate,de.pointEditZoom=n.pointEditZoom,de.userInfo=n.userInfo,de.userMenuItem=n.userMenuItem,de.myFolderUrl=n.myFolderUrl,de.functionButton=n.functionButton,de.showConfigWindowResize=n.showConfigWindowResize,de.enableAddRow=n.enableAddRow,de.enableAddBackTop=n.enableAddBackTop,de.addRowCount=n.addRowCount,de.enablePage=n.enablePage,de.pageInfo=n.pageInfo,de.editMode=n.editMode,de.beforeCreateDom=n.beforeCreateDom,de.workbookCreateBefore=n.workbookCreateBefore,de.workbookCreateAfter=n.workbookCreateAfter,de.remoteFunction=n.remoteFunction,de.customFunctions=n.customFunctions,de.fireMousedown=n.fireMousedown,de.forceCalculation=n.forceCalculation,de.plugins=n.plugins,de.rowHeaderWidth=n.rowHeaderWidth,de.columnHeaderHeight=n.columnHeaderHeight,de.defaultColWidth=n.defaultColWidth,de.defaultRowHeight=n.defaultRowHeight,de.title=n.title,de.container=n.container,de.hook=n.hook,de.pager=n.pager,de.initShowsheetbarConfig=!1,de.imageUpdateMethodConfig=n.imageUpdateMethodConfig,h.lang==="zh"&&Bo.localize(Qm.default.zh),h.asyncLoad.push(...de.plugins),Pm(n.plugins,n.data),qm(n.customFunctions);let s=n.devicePixelRatio;s==null&&(s=1),h.devicePixelRatio=Math.ceil(s);let u=Er("#"+o);h.loadingObj=u,t==""?(ve.initialjfFile(l,a),ep()):$.post(t,{gridKey:ne.gridKey},function(f){let d=new Function("return "+f)();h.luckysheetfile=d,ve.initialjfFile(l,a),ep(),ne.allowUpdate&&ne.openWebSocket()})};gl.getluckysheetfile=Et;gl.getluckysheet_select_save=Pu;gl.setluckysheet_select_save=zu;gl.getconfig=Lu;gl.getGridData=ve.getGridData;gl.buildGridData=ve.buildGridData;gl.luckysheetrefreshgrid=Be;gl.jfrefreshgrid=Ze;gl.getcellvalue=ze;gl.setcellvalue=Ht;gl.getdatabyselection=Pt;gl.sheetmanage=ve;gl.flowdata=function(){return h.flowdata};gl.selectHightlightShow=lt;gl.destroy=Je.destroy;gl.showLoadingProgress=Fa;gl.hideLoadingProgress=_i;gl.luckysheetextendData=ko;gl.locales=ts});function zb(){HTMLElement.prototype.__defineGetter__("runtimeStyle",Ob),window.constructor.prototype.__defineGetter__("event",Bb),Event.prototype.__defineGetter__("srcElement",Hb)}function Ob(){return this.style}function Bb(){return lp()}function Hb(){return this.target}function lp(){if(document.all)return window.event;for(var e=lp.caller;e!=null;){var n=e.arguments[0];if(n){var t=n.constructor;if(t.toString().indexOf("Event")!=-1)return n}e=e.caller}return null}var rp,np=Ie(()=>{rp=zb});var Vb=vl(($L,ap)=>{ou();tp();np();window.addEventListener&&navigator.userAgent.indexOf("Firefox")>0&&rp();ap.exports=gl});return Vb();})(); |
| | | /*! |
| | | * escape-html |
| | | * Copyright(c) 2012-2013 TJ Holowaychuk |