Skip to content

Instantly share code, notes, and snippets.

@aninde
Created January 13, 2022 10:13
Show Gist options
  • Save aninde/626a72e1427fae3afdfff0396d7b7d05 to your computer and use it in GitHub Desktop.
Save aninde/626a72e1427fae3afdfff0396d7b7d05 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
/*!
* Copyright (c) HANDSONCODE sp. z o. o.
*
* HANDSONTABLE is a software distributed by HANDSONCODE sp. z o. o., a Polish corporation based in
* Gdynia, Poland, at Aleja Zwycięstwa 96-98, registered by the District Court in Gdansk under number
* 538651, EU tax ID number: PL5862294002, share capital: PLN 62,800.00.
*
* This software is protected by applicable copyright laws, including international treaties, and dual-
* licensed – depending on whether your use for commercial purposes, meaning intended for or
* resulting in commercial advantage or monetary compensation, or not.
*
* If your use is strictly personal or solely for evaluation purposes, meaning for the purposes of testing
* the suitability, performance, and usefulness of this software outside the production environment,
* you agree to be bound by the terms included in the "handsontable-non-commercial-license.pdf" file.
*
* Your use of this software for commercial purposes is subject to the terms included in an applicable
* license agreement.
*
* In any case, you must not make any such use of this software as to develop software which may be
* considered competitive with this software.
*
* UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN "AS IS"
* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO
* LEGAL THEORY, SHALL HANDSONCODE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
* USE OR INABILITY TO USE THIS SOFTWARE.
*
* Version: 11.1.0
* Release date: 12/01/2022 (built at 12/01/2022 16:55:48)
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Handsontable",[],t):"object"==typeof exports?exports.Handsontable=t():e.Handsontable=t()}("undefined"!=typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=633)}([function(e,t,n){var r=n(243),o=n(104),i=n(636);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(248).charAt,o=n(74),i=n(114),a=n(249),s=i.set,u=i.getterFor("String Iterator");a(String,"String",(function(e){s(this,{type:"String Iterator",string:o(e),index:0})}),(function(){var e,t=u(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(94),o=n(174),i=n(173),a=n(114),s=n(82).f,u=n(249),l=n(132),c=n(72),f=a.set,d=a.getterFor("Array Iterator");e.exports=u(Array,"Array",(function(e,t){f(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=d(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");var h=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!l&&c&&"values"!==h.name)try{s(h,"name",{value:"values"})}catch(e){}},function(e,t,n){var r=n(28),o=n(337),i=n(338),a=n(3),s=n(123),u=n(59),l=u("iterator"),c=u("toStringTag"),f=a.values,d=function(e,t){if(e){if(e[l]!==f)try{s(e,l,f)}catch(t){e[l]=f}if(e[c]||s(e,c,t),o[t])for(var n in a)if(e[n]!==a[n])try{s(e,n,a[n])}catch(t){e[n]=a[n]}}};for(var h in o)d(r[h]&&r[h].prototype,h);d(i,"DOMTokenList")},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(29),o=n(121),i=n(134),a=n(635),s=n(326),u=n(64),l=n(63),c=n(135),f=n(41),d=o("Reflect","construct"),h=Object.prototype,p=[].push,m=f((function(){function e(){}return!(d((function(){}),[],e)instanceof e)})),y=!f((function(){d((function(){}))})),v=m||y;r({target:"Reflect",stat:!0,forced:v,sham:v},{construct:function(e,t){s(e),u(t);var n=arguments.length<3?e:s(arguments[2]);if(y&&!m)return d(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return i(p,r,t),new(i(a,e,r))}var o=n.prototype,f=c(l(o)?o:h),v=i(e,f,t);return l(v)?v:f}})},function(e,t,n){"use strict";var r=n(29),o=n(28),i=n(121),a=n(134),s=n(78),u=n(35),l=n(132),c=n(72),f=n(233),d=n(41),h=n(73),p=n(170),m=n(61),y=n(63),v=n(122),g=n(197),E=n(64),T=n(91),C=n(94),b=n(196),w=n(74),R=n(163),O=n(135),S=n(169),A=n(148),N=n(241),M=n(239),k=n(113),_=n(82),I=n(327),P=n(195),x=n(168),D=n(104),L=n(199),F=n(202),j=n(166),U=n(200),H=n(59),V=n(335),B=n(336),W=n(207),Y=n(114),G=n(136).forEach,z=F("hidden"),K=H("toPrimitive"),X=Y.set,q=Y.getterFor("Symbol"),Q=Object.prototype,$=o.Symbol,Z=$&&$.prototype,J=o.TypeError,ee=o.QObject,te=i("JSON","stringify"),ne=k.f,re=_.f,oe=N.f,ie=P.f,ae=u([].push),se=L("symbols"),ue=L("op-symbols"),le=L("string-to-symbol-registry"),ce=L("symbol-to-string-registry"),fe=L("wks"),de=!ee||!ee.prototype||!ee.prototype.findChild,he=c&&d((function(){return 7!=O(re({},"a",{get:function(){return re(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=ne(Q,t);r&&delete Q[t],re(e,t,n),r&&e!==Q&&re(Q,t,r)}:re,pe=function(e,t){var n=se[e]=O(Z);return X(n,{type:"Symbol",tag:e,description:t}),c||(n.description=t),n},me=function(e,t,n){e===Q&&me(ue,t,n),E(e);var r=b(t);return E(n),h(se,r)?(n.enumerable?(h(e,z)&&e[z][r]&&(e[z][r]=!1),n=O(n,{enumerable:R(0,!1)})):(h(e,z)||re(e,z,R(1,{})),e[z][r]=!0),he(e,r,n)):re(e,r,n)},ye=function(e,t){E(e);var n=C(t),r=S(n).concat(Te(n));return G(r,(function(t){c&&!s(ve,n,t)||me(e,t,n[t])})),e},ve=function(e){var t=b(e),n=s(ie,this,t);return!(this===Q&&h(se,t)&&!h(ue,t))&&(!(n||!h(this,t)||!h(se,t)||h(this,z)&&this[z][t])||n)},ge=function(e,t){var n=C(e),r=b(t);if(n!==Q||!h(se,r)||h(ue,r)){var o=ne(n,r);return!o||!h(se,r)||h(n,z)&&n[z][r]||(o.enumerable=!0),o}},Ee=function(e){var t=oe(C(e)),n=[];return G(t,(function(e){h(se,e)||h(j,e)||ae(n,e)})),n},Te=function(e){var t=e===Q,n=oe(t?ue:C(e)),r=[];return G(n,(function(e){!h(se,e)||t&&!h(Q,e)||ae(r,se[e])})),r};(f||(D(Z=($=function(){if(v(Z,this))throw J("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?w(arguments[0]):void 0,t=U(e),n=function(e){this===Q&&s(n,ue,e),h(this,z)&&h(this[z],t)&&(this[z][t]=!1),he(this,t,R(1,e))};return c&&de&&he(Q,t,{configurable:!0,set:n}),pe(t,e)}).prototype,"toString",(function(){return q(this).tag})),D($,"withoutSetter",(function(e){return pe(U(e),e)})),P.f=ve,_.f=me,I.f=ye,k.f=ge,A.f=N.f=Ee,M.f=Te,V.f=function(e){return pe(H(e),e)},c&&(re(Z,"description",{configurable:!0,get:function(){return q(this).description}}),l||D(Q,"propertyIsEnumerable",ve,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!f,sham:!f},{Symbol:$}),G(S(fe),(function(e){B(e)})),r({target:"Symbol",stat:!0,forced:!f},{for:function(e){var t=w(e);if(h(le,t))return le[t];var n=$(t);return le[t]=n,ce[n]=t,n},keyFor:function(e){if(!g(e))throw J(e+" is not a symbol");if(h(ce,e))return ce[e]},useSetter:function(){de=!0},useSimple:function(){de=!1}}),r({target:"Object",stat:!0,forced:!f,sham:!c},{create:function(e,t){return void 0===t?O(e):ye(O(e),t)},defineProperty:me,defineProperties:ye,getOwnPropertyDescriptor:ge}),r({target:"Object",stat:!0,forced:!f},{getOwnPropertyNames:Ee,getOwnPropertySymbols:Te}),r({target:"Object",stat:!0,forced:d((function(){M.f(1)}))},{getOwnPropertySymbols:function(e){return M.f(T(e))}}),te)&&r({target:"JSON",stat:!0,forced:!f||d((function(){var e=$();return"[null]"!=te([e])||"{}"!=te({a:e})||"{}"!=te(Object(e))}))},{stringify:function(e,t,n){var r=x(arguments),o=t;if((y(t)||void 0!==e)&&!g(e))return p(t)||(t=function(e,t){if(m(o)&&(t=s(o,this,e,t)),!g(t))return t}),r[1]=t,a(te,null,r)}});if(!Z[K]){var Ce=Z.valueOf;D(Z,K,(function(e){return s(Ce,this)}))}W($,"Symbol"),j[z]=!0},function(e,t,n){"use strict";var r=n(29),o=n(72),i=n(28),a=n(35),s=n(73),u=n(61),l=n(122),c=n(74),f=n(82).f,d=n(322),h=i.Symbol,p=h&&h.prototype;if(o&&u(h)&&(!("description"in p)||void 0!==h().description)){var m={},y=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:c(arguments[0]),t=l(p,this)?new h(e):void 0===e?h():h(e);return""===e&&(m[t]=!0),t};d(y,h),y.prototype=p,p.constructor=y;var v="Symbol(test)"==String(h("test")),g=a(p.toString),E=a(p.valueOf),T=/^Symbol\((.*)\)[^)]+$/,C=a("".replace),b=a("".slice);f(p,"description",{configurable:!0,get:function(){var e=E(this),t=g(e);if(s(m,e))return"";var n=v?b(t,7,-1):C(t,T,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:y})}},function(e,t,n){n(336)("iterator")},function(e,t,n){"use strict";var r,o=n(28),i=n(35),a=n(254),s=n(175),u=n(208),l=n(368),c=n(63),f=n(340),d=n(114).enforce,h=n(321),p=!o.ActiveXObject&&"ActiveXObject"in o,m=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},y=u("WeakMap",m,l);if(h&&p){r=l.getConstructor(m,"WeakMap",!0),s.enable();var v=y.prototype,g=i(v.delete),E=i(v.has),T=i(v.get),C=i(v.set);a(v,{delete:function(e){if(c(e)&&!f(e)){var t=d(this);return t.frozen||(t.frozen=new r),g(this,e)||t.frozen.delete(e)}return g(this,e)},has:function(e){if(c(e)&&!f(e)){var t=d(this);return t.frozen||(t.frozen=new r),E(this,e)||t.frozen.has(e)}return E(this,e)},get:function(e){if(c(e)&&!f(e)){var t=d(this);return t.frozen||(t.frozen=new r),E(this,e)?T(this,e):t.frozen.get(e)}return T(this,e)},set:function(e,t){if(c(e)&&!f(e)){var n=d(this);n.frozen||(n.frozen=new r),E(this,e)?C(this,e,t):n.frozen.set(e,t)}else C(this,e,t);return this}})}},function(e,t,n){"use strict";var r=n(29),o=n(28),i=n(170),a=n(206),s=n(63),u=n(149),l=n(98),c=n(94),f=n(150),d=n(59),h=n(171),p=n(168),m=h("slice"),y=d("species"),v=o.Array,g=Math.max;r({target:"Array",proto:!0,forced:!m},{slice:function(e,t){var n,r,o,d=c(this),h=l(d),m=u(e,h),E=u(void 0===t?h:t,h);if(i(d)&&(n=d.constructor,(a(n)&&(n===v||i(n.prototype))||s(n)&&null===(n=n[y]))&&(n=void 0),n===v||void 0===n))return p(d,m,E);for(r=new(void 0===n?v:n)(g(E-m,0)),o=0;m<E;m++,o++)m in d&&f(r,o,d[m]);return r.length=o,r}})},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.clone=function(e){var t={};return l(e,(function(e,n){t[n]=e})),t},t.createObjectPropListener=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r="_".concat(n),i=(t={_touched:!1},(0,o.default)(t,r,e),(0,o.default)(t,"isTouched",(function(){return this._touched})),t);return Object.defineProperty(i,n,{get:function(){return this[r]},set:function(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),i},t.deepClone=s,t.deepExtend=function e(t,n){l(n,(function(r,o){n[o]&&"object"===(0,i.default)(n[o])?(t[o]||(Array.isArray(n[o])?t[o]=[]:"[object Date]"===Object.prototype.toString.call(n[o])?t[o]=n[o]:t[o]={}),e(t[o],n[o])):t[o]=n[o]}))},t.deepObjectSize=function(e){if(!u(e))return 0;return function e(t){var n=0;return u(t)?l(t,(function(t,r){"__children"!==r&&(n+=e(t))})):n+=1,n}(e)},t.defineGetter=function(e,t,n,r){r.value=n,r.writable=!1!==r.writable,r.enumerable=!1!==r.enumerable,r.configurable=!1!==r.configurable,Object.defineProperty(e,t,r)},t.duckSchema=function e(t){var n;Array.isArray(t)?n=[]:(n={},l(t,(function(t,r){"__children"!==r&&(t&&"object"===(0,i.default)(t)&&!Array.isArray(t)?n[r]=e(t):Array.isArray(t)?t.length&&"object"===(0,i.default)(t[0])&&!Array.isArray(t[0])?n[r]=[e(t[0])]:n[r]=[]:n[r]=null)})));return n},t.extend=function(e,t,n){var r=Array.isArray(n);return l(t,(function(t,o){(!1===r||n.includes(o))&&(e[o]=t)})),e},t.getProperty=function(e,t){var n=t.split("."),r=e;return l(n,(function(e){if(void 0===(r=r[e]))return r=void 0,!1})),r},t.hasOwnProperty=c,t.inherit=function(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e},t.isObject=u,t.isObjectEqual=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},t.mixin=function(e){e.MIXINS||(e.MIXINS=[]);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return(0,a.arrayEach)(n,(function(t){e.MIXINS.push(t.MIXIN_NAME),l(t,(function(t,n){if(void 0!==e.prototype[n])throw new Error("Mixin conflict. Property '".concat(n,"' already exist and cannot be overwritten."));if("function"==typeof t)e.prototype[n]=t;else{Object.defineProperty(e.prototype,n,{get:(r=n,o=t,i="_".concat(r),function(){var e;return void 0===this[i]&&(this[i]=(e=o,(Array.isArray(e)||u(e))&&(e=s(e)),e)),this[i]}),set:function(e){var t="_".concat(e);return function(e){this[t]=e}}(n),configurable:!0})}var r,o,i}))})),e},t.objectEach=l,t.setProperty=function(e,t,n){var r=t.split("."),o=e;r.forEach((function(e,t){t!==r.length-1?(c(o,e)||(o[e]={}),o=o[e]):o[e]=n}))},n(42),n(50),n(0),n(33),n(66),n(26);var o=r(n(54)),i=r(n(18)),a=n(19);function s(e){return"object"===(0,i.default)(e)?JSON.parse(JSON.stringify(e)):e}function u(e){return"[object Object]"===Object.prototype.toString.call(e)}function l(e,t){for(var n in e)if((!e.hasOwnProperty||e.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e,n))&&!1===t(e[n],n,e))break;return e}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},function(e,t,n){var r=n(562);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(18).default,o=n(49);e.exports=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(29),o=n(41),i=n(94),a=n(113).f,s=n(72),u=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||u,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(i(e),t)}})},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";function r(e,t,n,r){var o=-1,i=e,a=n;Array.isArray(e)||(i=Array.from(e));var s=i.length;for(r&&s&&(a=i[o+=1]),o+=1;o<s;)a=t(a,i[o],o,i),o+=1;return a}function o(e,t){var n=0,r=e;Array.isArray(e)||(r=Array.from(e));for(var o=r.length;n<o&&!1!==t(r[n],n,r);)n+=1;return e}function i(e){return r(e,(function(e,t){return e+t}),0)}t.__esModule=!0,t.arrayAvg=function(e){if(!e.length)return 0;return i(e)/e.length},t.arrayEach=o,t.arrayFilter=function(e,t){var n=0,r=e;Array.isArray(e)||(r=Array.from(e));var o=r.length,i=[],a=-1;for(;n<o;){var s=r[n];t(s,n,r)&&(i[a+=1]=s),n+=1}return i},t.arrayFlatten=function e(t){return r(t,(function(t,n){return t.concat(Array.isArray(n)?e(n):n)}),[])},t.arrayMap=function(e,t){var n=0,r=e;Array.isArray(e)||(r=Array.from(e));var o=r.length,i=[],a=-1;for(;n<o;){var s=r[n];i[a+=1]=t(s,n,r),n+=1}return i},t.arrayMax=function(e){return r(e,(function(e,t){return e>t?e:t}),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return r(e,(function(e,t){return e<t?e:t}),Array.isArray(e)?e[0]:void 0)},t.arrayReduce=r,t.arraySum=i,t.arrayUnique=function(e){var t=[];return o(e,(function(e){-1===t.indexOf(e)&&t.push(e)})),t},t.extendArray=function(e,t){var n=t.length,r=0;for(;r<n;)e.push(t[r]),r+=1},t.getDifferenceOfArrays=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=[].concat(t),i=r[0],a=r.slice(1),s=i;return o(a,(function(e){s=s.filter((function(t){return!e.includes(t)}))})),s},t.getIntersectionOfArrays=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=[].concat(t),i=r[0],a=r.slice(1),s=i;return o(a,(function(e){s=s.filter((function(t){return e.includes(t)}))})),s},t.getUnionOfArrays=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=[].concat(t),i=r[0],a=r.slice(1),s=new Set(i);return o(a,(function(e){o(e,(function(e){s.has(e)||s.add(e)}))})),Array.from(s)},t.pivot=function(e){var t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;for(var n=e.length,r=e[0].length,o=0;o<n;o++)for(var i=0;i<r;i++)t[i]||(t[i]=[]),t[i][o]=e[o][i];return t},t.stringToArray=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)},t.to2dArray=function(e){var t=e.length,n=0;for(;n<t;)e[n]=[e[n]],n+=1},n(21),n(2),n(20),n(31),n(12),n(40),n(0),n(42),n(50),n(3),n(58),n(4),n(33),n(66)},function(e,t,n){"use strict";var r=n(29),o=n(28),i=n(41),a=n(170),s=n(63),u=n(91),l=n(98),c=n(150),f=n(250),d=n(171),h=n(59),p=n(165),m=h("isConcatSpreadable"),y=o.TypeError,v=p>=51||!i((function(){var e=[];return e[m]=!1,e.concat()[0]!==e})),g=d("concat"),E=function(e){if(!s(e))return!1;var t=e[m];return void 0!==t?!!t:a(e)};r({target:"Array",proto:!0,forced:!v||!g},{concat:function(e){var t,n,r,o,i,a=u(this),s=f(a,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(i=-1===t?a:arguments[t],E(i)){if(d+(o=l(i))>9007199254740991)throw y("Maximum allowed index exceeded");for(n=0;n<o;n++,d++)n in i&&c(s,d,i[n])}else{if(d>=9007199254740991)throw y("Maximum allowed index exceeded");c(s,d++,i)}return s.length=d,s}})},function(e,t,n){var r=n(29),o=n(637);r({target:"Array",stat:!0,forced:!n(332)((function(e){Array.from(e)}))},{from:o})},function(e,t,n){"use strict";n.r(t),n.d(t,"ErrorType",(function(){return r})),n.d(t,"CellType",(function(){return o})),n.d(t,"getCellType",(function(){return h})),n.d(t,"CellValueNoNumber",(function(){return f})),n.d(t,"CellValueJustNumber",(function(){return d})),n.d(t,"CellValueType",(function(){return p})),n.d(t,"CellValueDetailedType",(function(){return m})),n.d(t,"CellValueTypeOrd",(function(){return y})),n.d(t,"getCellValueType",(function(){return v})),n.d(t,"getCellValueDetailedType",(function(){return g})),n.d(t,"getCellValueFormat",(function(){return E})),n.d(t,"CellError",(function(){return T})),n.d(t,"simpleRowAddress",(function(){return C})),n.d(t,"invalidSimpleRowAddress",(function(){return b})),n.d(t,"simpleColumnAddress",(function(){return w})),n.d(t,"invalidSimpleColumnAddress",(function(){return R})),n.d(t,"simpleCellAddress",(function(){return O})),n.d(t,"invalidSimpleCellAddress",(function(){return S})),n.d(t,"movedSimpleCellAddress",(function(){return A})),n.d(t,"addressKey",(function(){return N})),n.d(t,"isSimpleCellAddress",(function(){return M})),n.d(t,"absoluteSheetReference",(function(){return k})),n.d(t,"equalSimpleCellAddress",(function(){return _}));n(88),n(20),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r,o,i=n(125),a=n(43),s=n(48),u=n(80);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e.DIV_BY_ZERO="DIV_BY_ZERO",e.NAME="NAME",e.VALUE="VALUE",e.NUM="NUM",e.NA="NA",e.CYCLE="CYCLE",e.REF="REF",e.SPILL="SPILL",e.LIC="LIC",e.ERROR="ERROR"}(r||(r={})),function(e){e.FORMULA="FORMULA",e.VALUE="VALUE",e.ARRAY="ARRAY",e.EMPTY="EMPTY",e.ARRAYFORMULA="ARRAYFORMULA"}(o||(o={}));var f,d,h=function(e,t){return e instanceof i.ArrayVertex?e.isLeftCorner(t)?o.ARRAYFORMULA:o.ARRAY:e instanceof i.FormulaCellVertex||e instanceof i.ParsingErrorVertex?o.FORMULA:e instanceof i.ValueCellVertex?o.VALUE:o.EMPTY};!function(e){e.EMPTY="EMPTY",e.NUMBER="NUMBER",e.STRING="STRING",e.BOOLEAN="BOOLEAN",e.ERROR="ERROR"}(f||(f={})),function(e){e.NUMBER="NUMBER"}(d||(d={}));var p=Object.assign(Object.assign({},f),d),m=Object.assign(Object.assign({},f),s.NumberType),y=function(e){switch(e){case p.EMPTY:return 0;case p.NUMBER:return 1;case p.STRING:return 2;case p.BOOLEAN:return 3;case p.ERROR:return 4}throw new Error("Cell value not computed")},v=function(e){if(e===s.EmptyValue)return p.EMPTY;if(e instanceof T||e instanceof u.SimpleRangeValue)return p.ERROR;if("string"==typeof e)return p.STRING;if(Object(s.isExtendedNumber)(e))return p.NUMBER;if("boolean"==typeof e)return p.BOOLEAN;throw new Error("Cell value not computed")},g=function(e){return Object(s.isExtendedNumber)(e)?Object(s.getTypeOfExtendedNumber)(e):v(e)},E=function(e){return Object(s.isExtendedNumber)(e)?Object(s.getFormatOfExtendedNumber)(e):void 0},T=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=t,this.message=n,this.root=r}var t,n,o;
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/return t=e,o=[{key:"parsingError",value:function(){return new e(r.ERROR,a.ErrorMessage.ParseError)}}],(n=[{key:"attachRootVertex",value:function(t){return void 0===this.root?new e(this.type,this.message,t):this}}])&&c(t.prototype,n),o&&c(t,o),e}(),C=function(e,t){return{sheet:e,row:t}},b=function(e){return e.row<0},w=function(e,t){return{sheet:e,col:t}},R=function(e){return e.col<0},O=function(e,t,n){return{sheet:e,col:t,row:n}},S=function(e){return e.col<0||e.row<0},A=function(e,t,n,r){return O(t,e.col+n,e.row+r)},N=function(e){return"".concat(e.sheet,",").concat(e.row,",").concat(e.col)};function M(e){return!(!e||"object"!==l(e)&&"function"!=typeof e)&&("col"in e&&"number"==typeof e.col&&"row"in e&&"number"==typeof e.row&&"sheet"in e&&"number"==typeof e.sheet)}var k=function(e,t){var n;return null!==(n=e.sheet)&&void 0!==n?n:t.sheet},_=function(e,t){return e.sheet===t.sheet&&e.col===t.col&&e.row===t.row}},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.HTML_CHARACTERS=void 0,t.addClass=function(e,t){a(e,t)},t.addEvent=function(e,t,n){e.addEventListener(t,n,!1)},t.clearTextSelection=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.document;e.getSelection?e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges():t.selection&&t.selection.empty()},t.closest=d,t.closestDown=function(e,t,n){var r=[],o=e;for(;o&&(o=d(o,t,n))&&(!n||n.contains(o));)r.push(o),o=o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.host:o.parentNode;var i=r.length;return i?r[i-1]:null},t.empty=y,t.fastInnerHTML=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];g.test(t)?e.innerHTML=n?(0,c.sanitize)(t):t:E(e,t)},t.fastInnerText=E,t.getCaretPosition=function(e){var t=e.ownerDocument;if(e.selectionStart)return e.selectionStart;if(t.selection){e.focus();var n=t.selection.createRange();if(null===n)return 0;var r=e.createTextRange(),o=r.duplicate();return r.moveToBookmark(n.getBookmark()),o.setEndPoint("EndToStart",r),o.text.length}return 0},t.getComputedStyle=b,t.getCssTransform=function(e){var t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];if(e.style["-webkit-transform"]&&""!==(t=e.style["-webkit-transform"]))return["-webkit-transform",t];return-1},t.getFrameElement=f,t.getParent=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=null,o=e;for(;null!==o;){if(n===t){r=o;break}o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o=o.host:(n+=1,o=o.parentNode)}return r},t.getParentWindow=function(e){return f(e)&&e.parent},t.getScrollLeft=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return C(t);return e.scrollLeft},t.getScrollTop=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return T(t);return e.scrollTop},t.getScrollableElement=function(e){var t=e.ownerDocument,n=t?t.defaultView:void 0;t||(t=e.document?e.document:e,n=t.defaultView);var r=["auto","scroll"],o=(0,u.isGetComputedStyleSupported)(),i=e.parentNode;for(;i&&i.style&&t.body!==i;){var a=i.style,s=a.overflow,l=a.overflowX,c=a.overflowY;if([s,l,c].includes("scroll"))return i;if(o){var f=n.getComputedStyle(i);if(s=f.overflow,l=f.overflowX,c=f.overflowY,r.includes(s)||r.includes(l)||r.includes(c))return i}if(i.clientHeight<=i.scrollHeight+1&&(r.includes(c)||r.includes(s)))return i;if(i.clientWidth<=i.scrollWidth+1&&(r.includes(l)||r.includes(s)))return i;i=i.parentNode}return n},t.getScrollbarWidth=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;void 0===v&&(v=w(e));return v},t.getSelectionEndPosition=function(e){var t=e.ownerDocument;if(e.selectionEnd)return e.selectionEnd;if(t.selection){var n=t.selection.createRange();return null===n?0:e.createTextRange().text.indexOf(n.text)+n.text.length}return 0},t.getSelectionText=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.document,n="";e.getSelection?n=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(n=t.selection.createRange().text);return n},t.getStyle=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===n)return"width"===t?"".concat(n.innerWidth,"px"):"height"===t?"".concat(n.innerHeight,"px"):void 0;var r=e.style[t];if(""!==r&&void 0!==r)return r;var o=b(e,n);if(""!==o[t]&&void 0!==o[t])return o[t]},t.getTrimmingContainer=function(e){var t=e.ownerDocument,n=t.defaultView,r=e.parentNode;for(;r&&r.style&&t.body!==r;){if("visible"!==r.style.overflow&&""!==r.style.overflow)return r;var o=b(r,n),i=["scroll","hidden","auto"],a=o.getPropertyValue("overflow"),s=o.getPropertyValue("overflow-y"),u=o.getPropertyValue("overflow-x");if(i.includes(a)||i.includes(s)||i.includes(u))return r;r=r.parentNode}return n},t.getWindowScrollLeft=C,t.getWindowScrollTop=T,t.hasAccessToParentWindow=function(e){return!!Object.getPrototypeOf(e.parent)},t.hasClass=function(e,t){return i(e,t)},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.index=function(e){var t=0,n=e;if(n.previousSibling)for(;n=n.previousSibling;)t+=1;return t},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.isChildOf=function(e,t){var n=e.parentNode,r=[];"string"==typeof t?r=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):r.push(t);for(;null!==n;){if(r.indexOf(n)>-1)return!0;n=n.parentNode}return!1},t.isDetached=function(e){return!e.parentNode},t.isInput=R,t.isOutsideInput=O,t.isVisible=function e(t){var n=t.ownerDocument.documentElement,r=t;for(;r!==n;){if(null===r)return!1;if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(r.host){if(r.host.impl)return e(r.host.impl);if(r.host)return e(r.host);throw new Error("Lost in Web Components world")}return!1}if(r.style&&"none"===r.style.display)return!1;r=r.parentNode}return!0},t.matchesCSSRules=function(e,t){var n=t.selectorText,r=!1;t.type===CSSRule.STYLE_RULE&&n&&(e.msMatchesSelector?r=e.msMatchesSelector(n):e.matches&&(r=e.matches(n)));return r},t.offset=function(e){var t,n,r,o,i=e.ownerDocument,a=i.defaultView,s=i.documentElement,l=e;if((0,u.hasCaptionProblem)()&&l.firstChild&&"CAPTION"===l.firstChild.nodeName)return{top:(o=l.getBoundingClientRect()).top+(a.pageYOffset||s.scrollTop)-(s.clientTop||0),left:o.left+(a.pageXOffset||s.scrollLeft)-(s.clientLeft||0)};t=l.offsetLeft,n=l.offsetTop,r=l;for(;(l=l.offsetParent)&&l!==i.body;)t+=l.offsetLeft,n+=l.offsetTop,r=l;r&&"fixed"===r.style.position&&(t+=a.pageXOffset||s.scrollLeft,n+=a.pageYOffset||s.scrollTop);return{left:t,top:n}},t.outerHeight=function(e){if((0,u.hasCaptionProblem)()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName)return e.offsetHeight+e.firstChild.offsetHeight;return e.offsetHeight},t.outerWidth=function(e){return e.offsetWidth},t.overlayContainsElement=function(e,t,n){var r=n.parentElement.querySelector(".ht_clone_".concat(e));return r?r.contains(t):null},t.removeClass=function(e,t){s(e,t)},t.removeEvent=function(e,t,n){e.removeEventListener(t,n,!1)},t.removeTextNodes=function e(t){if(3===t.nodeType)t.parentNode.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1)for(var n=t.childNodes,r=n.length-1;r>=0;r--)e(n[r])},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform?e.style.transform="":e.style["-webkit-transform"]&&""!==e.style["-webkit-transform"]&&(e.style["-webkit-transform"]="")},t.selectElementIfAllowed=function(e){O(e.ownerDocument.activeElement)||e.select()},t.setCaretPosition=function(e,t,n){void 0===n&&(n=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(i){var r=e.parentNode,o=r.style.display;r.style.display="block",e.setSelectionRange(t,n),r.style.display=o}}},t.setOverlayPosition=function(e,t,n){(0,l.isIE9)()?(e.style.top=n,e.style.left=t):(0,l.isSafari)()?e.style["-webkit-transform"]="translate3d(".concat(t,",").concat(n,",0)"):e.style.transform="translate3d(".concat(t,",").concat(n,",0)")};var o=r(n(44));n(25),n(42),n(50),n(12),n(31),n(40),n(0),n(33),n(66),n(95),n(65),n(76),n(108),n(62),n(20);var i,a,s,u=n(128),l=n(106),c=n(97);function f(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function d(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=Node,o=r.ELEMENT_NODE,i=r.DOCUMENT_FRAGMENT_NODE,a=e;null!=a&&a!==n;){var s=a,u=s.nodeType,l=s.nodeName;if(u===o&&(t.includes(l)||t.includes(a)))return a;var c=a,f=c.host;a=f&&u===i?f:a.parentNode}return null}function h(e){return e&&e.length?e.filter((function(e){return!!e})):[]}if((0,u.isClassListSupported)()){var p=function(e){var t=e.createElement("div");return t.classList.add("test","test2"),t.classList.contains("test2")};i=function(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)},a=function(e,t){var n,r=e.ownerDocument,i=t;if("string"==typeof i&&(i=i.split(" ")),(i=h(i)).length>0)if(p(r))(n=e.classList).add.apply(n,(0,o.default)(i));else for(var a=0;i[a];)e.classList.add(i[a]),a+=1},s=function(e,t){var n,r=e.ownerDocument,i=t;if("string"==typeof i&&(i=i.split(" ")),(i=h(i)).length>0)if(p(r))(n=e.classList).remove.apply(n,(0,o.default)(i));else for(var a=0;i[a];)e.classList.remove(i[a]),a+=1}}else{var m=function(e){return new RegExp("(\\s|^)".concat(e,"(\\s|$)"))};i=function(e,t){return void 0!==e.className&&m(t).test(e.className)},a=function(e,t){var n=e.className,r=t;if("string"==typeof r&&(r=r.split(" ")),r=h(r),""===n)n=r.join(" ");else for(var o=0;o<r.length;o++)r[o]&&!m(r[o]).test(n)&&(n+=" ".concat(r[o]));e.className=n},s=function(e,t){var n=0,r=e.className,o=t;for("string"==typeof o&&(o=o.split(" ")),o=h(o);o[n];)r=r.replace(m(o[n])," ").trim(),n+=1;e.className!==r&&(e.className=r)}}function y(e){for(var t;t=e.lastChild;)e.removeChild(t)}var v,g=/(<(.*)>|&(.*);)/;function E(e,t){var n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?u.isTextContentSupported?n.textContent=t:n.data=t:(y(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.scrollY;return void 0===t&&(t=e.document.documentElement.scrollTop),t}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.scrollX;return void 0===t&&(t=e.document.documentElement.scrollLeft),t}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=e.createElement("div");t.style.height="200px",t.style.width="100%";var n=e.createElement("div");n.style.boxSizing="content-box",n.style.height="150px",n.style.left="0px",n.style.overflow="hidden",n.style.position="absolute",n.style.top="0px",n.style.width="200px",n.style.visibility="hidden",n.appendChild(t),(e.body||e.documentElement).appendChild(n);var r=t.offsetWidth;n.style.overflow="scroll";var o=t.offsetWidth;return r===o&&(o=n.clientWidth),(e.body||e.documentElement).removeChild(n),r-o}function R(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function O(e){return R(e)&&!1===e.hasAttribute("data-hot-input")}t.HTML_CHARACTERS=g},function(e,t,n){var r=n(72),o=n(167).EXISTS,i=n(35),a=n(82).f,s=Function.prototype,u=i(s.toString),l=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,c=i(l.exec);r&&!o&&a(s,"name",{configurable:!0,get:function(){try{return c(l,u(this))[1]}catch(e){return""}}})},function(e,t,n){var r=n(29),o=n(41),i=n(91),a=n(204),s=n(325);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!s},{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){var r=n(28),o=n(337),i=n(338),a=n(645),s=n(123),u=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var l in o)o[l]&&u(r[l]&&r[l].prototype);u(i)},function(e,t,n){"use strict";t.__esModule=!0,t.FILTERS_VALUES_BLANK_CELLS=t.FILTERS_NAMESPACE=t.FILTERS_LABELS_DISJUNCTION=t.FILTERS_LABELS_CONJUNCTION=t.FILTERS_DIVS_FILTER_BY_VALUE=t.FILTERS_DIVS_FILTER_BY_CONDITION=t.FILTERS_CONDITIONS_YESTERDAY=t.FILTERS_CONDITIONS_TOMORROW=t.FILTERS_CONDITIONS_TODAY=t.FILTERS_CONDITIONS_NOT_EQUAL=t.FILTERS_CONDITIONS_NOT_EMPTY=t.FILTERS_CONDITIONS_NOT_CONTAIN=t.FILTERS_CONDITIONS_NOT_BETWEEN=t.FILTERS_CONDITIONS_NONE=t.FILTERS_CONDITIONS_NAMESPACE=t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=t.FILTERS_CONDITIONS_LESS_THAN=t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=t.FILTERS_CONDITIONS_GREATER_THAN=t.FILTERS_CONDITIONS_EQUAL=t.FILTERS_CONDITIONS_ENDS_WITH=t.FILTERS_CONDITIONS_EMPTY=t.FILTERS_CONDITIONS_CONTAINS=t.FILTERS_CONDITIONS_BY_VALUE=t.FILTERS_CONDITIONS_BETWEEN=t.FILTERS_CONDITIONS_BEGINS_WITH=t.FILTERS_CONDITIONS_BEFORE=t.FILTERS_CONDITIONS_AFTER=t.FILTERS_BUTTONS_SELECT_ALL=t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=t.FILTERS_BUTTONS_OK=t.FILTERS_BUTTONS_CLEAR=t.FILTERS_BUTTONS_CANCEL=t.CONTEXT_MENU_ITEMS_NAMESPACE=t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=t.CONTEXTMENU_ITEMS_UNDO=t.CONTEXTMENU_ITEMS_SHOW_ROW=t.CONTEXTMENU_ITEMS_SHOW_COLUMN=t.CONTEXTMENU_ITEMS_ROW_BELOW=t.CONTEXTMENU_ITEMS_ROW_ABOVE=t.CONTEXTMENU_ITEMS_REMOVE_ROW=t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=t.CONTEXTMENU_ITEMS_REDO=t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=t.CONTEXTMENU_ITEMS_READ_ONLY=t.CONTEXTMENU_ITEMS_NO_ITEMS=t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=t.CONTEXTMENU_ITEMS_MERGE_CELLS=t.CONTEXTMENU_ITEMS_INSERT_RIGHT=t.CONTEXTMENU_ITEMS_INSERT_LEFT=t.CONTEXTMENU_ITEMS_HIDE_ROW=t.CONTEXTMENU_ITEMS_HIDE_COLUMN=t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=t.CONTEXTMENU_ITEMS_EDIT_COMMENT=t.CONTEXTMENU_ITEMS_CUT=t.CONTEXTMENU_ITEMS_COPY=t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=t.CONTEXTMENU_ITEMS_BORDERS_TOP=t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=t.CONTEXTMENU_ITEMS_BORDERS_LEFT=t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=t.CONTEXTMENU_ITEMS_BORDERS=t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=t.CONTEXTMENU_ITEMS_ALIGNMENT=t.CONTEXTMENU_ITEMS_ADD_COMMENT=void 0;t.CONTEXT_MENU_ITEMS_NAMESPACE="ContextMenu:items";var r="".concat("ContextMenu:items",".noItems");t.CONTEXTMENU_ITEMS_NO_ITEMS=r;var o="".concat("ContextMenu:items",".insertRowAbove");t.CONTEXTMENU_ITEMS_ROW_ABOVE=o;var i="".concat("ContextMenu:items",".insertRowBelow");t.CONTEXTMENU_ITEMS_ROW_BELOW=i;var a="".concat("ContextMenu:items",".insertColumnOnTheLeft");t.CONTEXTMENU_ITEMS_INSERT_LEFT=a;var s="".concat("ContextMenu:items",".insertColumnOnTheRight");t.CONTEXTMENU_ITEMS_INSERT_RIGHT=s;var u="".concat("ContextMenu:items",".removeRow");t.CONTEXTMENU_ITEMS_REMOVE_ROW=u;var l="".concat("ContextMenu:items",".removeColumn");t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=l;var c="".concat("ContextMenu:items",".undo");t.CONTEXTMENU_ITEMS_UNDO=c;var f="".concat("ContextMenu:items",".redo");t.CONTEXTMENU_ITEMS_REDO=f;var d="".concat("ContextMenu:items",".readOnly");t.CONTEXTMENU_ITEMS_READ_ONLY=d;var h="".concat("ContextMenu:items",".clearColumn");t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=h;var p="".concat("ContextMenu:items",".copy");t.CONTEXTMENU_ITEMS_COPY=p;var m="".concat("ContextMenu:items",".cut");t.CONTEXTMENU_ITEMS_CUT=m;var y="".concat("ContextMenu:items",".freezeColumn");t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=y;var v="".concat("ContextMenu:items",".unfreezeColumn");t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=v;var g="".concat("ContextMenu:items",".mergeCells");t.CONTEXTMENU_ITEMS_MERGE_CELLS=g;var E="".concat("ContextMenu:items",".unmergeCells");t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=E;var T="".concat("ContextMenu:items",".addComment");t.CONTEXTMENU_ITEMS_ADD_COMMENT=T;var C="".concat("ContextMenu:items",".editComment");t.CONTEXTMENU_ITEMS_EDIT_COMMENT=C;var b="".concat("ContextMenu:items",".removeComment");t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=b;var w="".concat("ContextMenu:items",".readOnlyComment");t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=w;var R="".concat("ContextMenu:items",".align");t.CONTEXTMENU_ITEMS_ALIGNMENT=R;var O="".concat("ContextMenu:items",".align.left");t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=O;var S="".concat("ContextMenu:items",".align.center");t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=S;var A="".concat("ContextMenu:items",".align.right");t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=A;var N="".concat("ContextMenu:items",".align.justify");t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=N;var M="".concat("ContextMenu:items",".align.top");t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=M;var k="".concat("ContextMenu:items",".align.middle");t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=k;var _="".concat("ContextMenu:items",".align.bottom");t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=_;var I="".concat("ContextMenu:items",".borders");t.CONTEXTMENU_ITEMS_BORDERS=I;var P="".concat("ContextMenu:items",".borders.top");t.CONTEXTMENU_ITEMS_BORDERS_TOP=P;var x="".concat("ContextMenu:items",".borders.right");t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=x;var D="".concat("ContextMenu:items",".borders.bottom");t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=D;var L="".concat("ContextMenu:items",".borders.left");t.CONTEXTMENU_ITEMS_BORDERS_LEFT=L;var F="".concat("ContextMenu:items",".borders.remove");t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=F;var j="".concat("ContextMenu:items",".nestedHeaders.insertChildRow");t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=j;var U="".concat("ContextMenu:items",".nestedHeaders.detachFromParent");t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=U;var H="".concat("ContextMenu:items",".hideColumn");t.CONTEXTMENU_ITEMS_HIDE_COLUMN=H;var V="".concat("ContextMenu:items",".showColumn");t.CONTEXTMENU_ITEMS_SHOW_COLUMN=V;var B="".concat("ContextMenu:items",".hideRow");t.CONTEXTMENU_ITEMS_HIDE_ROW=B;var W="".concat("ContextMenu:items",".showRow");t.CONTEXTMENU_ITEMS_SHOW_ROW=W;t.FILTERS_NAMESPACE="Filters:";var Y="".concat("Filters:","conditions");t.FILTERS_CONDITIONS_NAMESPACE=Y;var G="".concat(Y,".none");t.FILTERS_CONDITIONS_NONE=G;var z="".concat(Y,".isEmpty");t.FILTERS_CONDITIONS_EMPTY=z;var K="".concat(Y,".isNotEmpty");t.FILTERS_CONDITIONS_NOT_EMPTY=K;var X="".concat(Y,".isEqualTo");t.FILTERS_CONDITIONS_EQUAL=X;var q="".concat(Y,".isNotEqualTo");t.FILTERS_CONDITIONS_NOT_EQUAL=q;var Q="".concat(Y,".beginsWith");t.FILTERS_CONDITIONS_BEGINS_WITH=Q;var $="".concat(Y,".endsWith");t.FILTERS_CONDITIONS_ENDS_WITH=$;var Z="".concat(Y,".contains");t.FILTERS_CONDITIONS_CONTAINS=Z;var J="".concat(Y,".doesNotContain");t.FILTERS_CONDITIONS_NOT_CONTAIN=J;var ee="".concat(Y,".byValue");t.FILTERS_CONDITIONS_BY_VALUE=ee;var te="".concat(Y,".greaterThan");t.FILTERS_CONDITIONS_GREATER_THAN=te;var ne="".concat(Y,".greaterThanOrEqualTo");t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=ne;var re="".concat(Y,".lessThan");t.FILTERS_CONDITIONS_LESS_THAN=re;var oe="".concat(Y,".lessThanOrEqualTo");t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=oe;var ie="".concat(Y,".isBetween");t.FILTERS_CONDITIONS_BETWEEN=ie;var ae="".concat(Y,".isNotBetween");t.FILTERS_CONDITIONS_NOT_BETWEEN=ae;var se="".concat(Y,".after");t.FILTERS_CONDITIONS_AFTER=se;var ue="".concat(Y,".before");t.FILTERS_CONDITIONS_BEFORE=ue;var le="".concat(Y,".today");t.FILTERS_CONDITIONS_TODAY=le;var ce="".concat(Y,".tomorrow");t.FILTERS_CONDITIONS_TOMORROW=ce;var fe="".concat(Y,".yesterday");t.FILTERS_CONDITIONS_YESTERDAY=fe;var de="".concat("Filters:","labels.filterByCondition");t.FILTERS_DIVS_FILTER_BY_CONDITION=de;var he="".concat("Filters:","labels.filterByValue");t.FILTERS_DIVS_FILTER_BY_VALUE=he;var pe="".concat("Filters:","labels.conjunction");t.FILTERS_LABELS_CONJUNCTION=pe;var me="".concat("Filters:","labels.disjunction");t.FILTERS_LABELS_DISJUNCTION=me;var ye="".concat("Filters:","values.blankCells");t.FILTERS_VALUES_BLANK_CELLS=ye;var ve="".concat("Filters:","buttons.selectAll");t.FILTERS_BUTTONS_SELECT_ALL=ve;var ge="".concat("Filters:","buttons.clear");t.FILTERS_BUTTONS_CLEAR=ge;var Ee="".concat("Filters:","buttons.ok");t.FILTERS_BUTTONS_OK=Ee;var Te="".concat("Filters:","buttons.cancel");t.FILTERS_BUTTONS_CANCEL=Te;var Ce="".concat("Filters:","buttons.placeholder.search");t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=Ce;var be="".concat("Filters:","buttons.placeholder.value");t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=be;var we="".concat("Filters:","buttons.placeholder.secondValue");t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=we},function(e,t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof global&&global)||function(){return this}()||Function("return this")()},function(e,t,n){var r=n(28),o=n(113).f,i=n(123),a=n(104),s=n(235),u=n(322),l=n(203);e.exports=function(e,t){var n,c,f,d,h,p=e.target,m=e.global,y=e.stat;if(n=m?r:y?r[p]||s(p,{}):(r[p]||{}).prototype)for(c in t){if(d=t[c],f=e.noTargetGet?(h=o(n,c))&&h.value:n[c],!l(m?c:p+(y?".":"#")+c,e.forced)&&void 0!==f){if(typeof d==typeof f)continue;u(d,f)}(e.sham||f&&f.sham)&&i(d,"sham",!0),a(n,c,d,e)}}},function(e,t,n){var r=n(769);function o(){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=o=Reflect.get,e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=o=function(e,t,n){var o=r(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},e.exports.__esModule=!0,e.exports.default=e.exports),o.apply(this,arguments)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(29),o=n(35),i=n(237).indexOf,a=n(151),s=o([].indexOf),u=!!s&&1/s([1],1,-0)<0,l=a("indexOf");r({target:"Array",proto:!0,forced:u||!l},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return u?s(this,e,t)||0:i(this,e,t)}})},function(e,t,n){var r=n(424),o=n(726),i=n(293),a=n(426);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(29),o=n(209);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t._injectProductInfo=function(e,t){var n,r=!m(e),o="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),i="invalid",a="invalid",s=function(e){var t=[][y],n=t;if(e[y]!==T("Z"))return!1;for(var r="",o="B<H4P+".split(""),i=T(o.shift());i;i=T(o.shift()||"A"))--i<""[y]?n|=(g("".concat(g(v(r)+(v(E(e,Math.abs(i),2))+[]).padStart(2,"0"))))%97||2)>>1:r=E(e,i,i?1===o[y]?9:8:6);return n===t}(e=C(e||""));if(r||o||s)if(s){var u=(0,d.default)("12/01/2022","DD/MM/YYYY"),l=Math.floor(u.toDate().getTime()/864e5),c=v(E(C(h=e),v("12"),T("F")))/(v(E(C(h),T("B"),~~![][y]))||9);if(n=(0,d.default)(864e5*(c+1),"x").format("MMMM DD, YYYY"),l>c){var f=(0,d.default)().diff(u,"days");i=f<=1?"valid":"expired",a=f<=15?"valid":"expired"}else i="valid",a="valid"}else o?(i="non_commercial",a="valid"):(i="invalid",a="invalid");else i="missing",a="missing";var h;"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host)&&(i="valid",a="valid");if(!b&&"valid"!==i){w[i]({keyValidityDate:n,hotVersion:"11.1.0"})&&console["non_commercial"===i?"info":"warn"](w[i]({keyValidityDate:n,hotVersion:"11.1.0"})),b=!0}if("valid"!==a&&t.parentNode){if(R[a]({keyValidityDate:n,hotVersion:"11.1.0"})){var p=document.createElement("div");p.id="hot-display-license-info",p.innerHTML=R[a]({keyValidityDate:n,hotVersion:"11.1.0"}),t.parentNode.insertBefore(p,t.nextSibling)}}},t.isDefined=function(e){return void 0!==e},t.isEmpty=m,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isUndefined=p,t.stringify=function(e){var t;switch((0,f.default)(e)){case"string":case"number":t="".concat(e);break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t};var o=r(n(85));n(0),n(65),n(286),n(33),n(62),n(66),n(287);var i,a,s,u,l,c,f=r(n(18)),d=r(n(102)),h=n(86);function p(e){return void 0===e}function m(e){return null===e||""===e||p(e)}var y="length",v=function(e){return parseInt(e,16)},g=function(e){return parseInt(e,10)},E=function(e,t,n){return e.substr(t,n)},T=function(e){return e.codePointAt(0)-65},C=function(e){return"".concat(e).replace(/\-/g,"")},b=!1,w={invalid:function(){return(0,h.toSingleLine)(i||(i=(0,o.default)(["\n The license key for Handsontable is invalid. \n If you need any help, contact us at [email protected]."],["\n The license key for Handsontable is invalid.\\x20\n If you need any help, contact us at [email protected]."])))},expired:function(e){var t=e.keyValidityDate,n=e.hotVersion;return(0,h.toSingleLine)(a||(a=(0,o.default)(["\n The license key for Handsontable expired on ",", and is not valid for the installed \n version ",". Renew your license key at handsontable.com or downgrade to a version released prior \n to ",". If you need any help, contact us at [email protected]."],["\n The license key for Handsontable expired on ",", and is not valid for the installed\\x20\n version ",". Renew your license key at handsontable.com or downgrade to a version released prior\\x20\n to ",". If you need any help, contact us at [email protected]."])),t,n,t)},missing:function(){return(0,h.toSingleLine)(s||(s=(0,o.default)(["\n The license key for Handsontable is missing. Use your purchased key to activate the product. \n Alternatively, you can activate Handsontable to use for non-commercial purposes by \n passing the key: 'non-commercial-and-evaluation'. If you need any help, contact \n us at [email protected]."],["\n The license key for Handsontable is missing. Use your purchased key to activate the product.\\x20\n Alternatively, you can activate Handsontable to use for non-commercial purposes by\\x20\n passing the key: 'non-commercial-and-evaluation'. If you need any help, contact\\x20\n us at [email protected]."])))},non_commercial:function(){return""}},R={invalid:function(){return(0,h.toSingleLine)(u||(u=(0,o.default)(['\n The license key for Handsontable is invalid. \n <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to \n install it properly or contact us at <a href="mailto:[email protected]">[email protected]</a>.'],['\n The license key for Handsontable is invalid.\\x20\n <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to\\x20\n install it properly or contact us at <a href="mailto:[email protected]">[email protected]</a>.'])))},expired:function(e){var t=e.keyValidityDate,n=e.hotVersion;return(0,h.toSingleLine)(l||(l=(0,o.default)(["\n The license key for Handsontable expired on ",", and is not valid for the installed \n version ",'. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your \n license key or downgrade to a version released prior to ','. If you need any \n help, contact us at <a href="mailto:[email protected]">[email protected]</a>.'],["\n The license key for Handsontable expired on ",", and is not valid for the installed\\x20\n version ",'. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your\\x20\n license key or downgrade to a version released prior to ','. If you need any\\x20\n help, contact us at <a href="mailto:[email protected]">[email protected]</a>.'])),t,n,t)},missing:function(){return(0,h.toSingleLine)(c||(c=(0,o.default)(['\n The license key for Handsontable is missing. Use your purchased key to activate the product. \n Alternatively, you can activate Handsontable to use for non-commercial purposes by \n passing the key: \'non-commercial-and-evaluation\'. \n <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in \n the documentation or contact us at <a href="mailto:[email protected]">[email protected]</a>.'],['\n The license key for Handsontable is missing. Use your purchased key to activate the product.\\x20\n Alternatively, you can activate Handsontable to use for non-commercial purposes by\\x20\n passing the key: \'non-commercial-and-evaluation\'.\\x20\n <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in\\x20\n the documentation or contact us at <a href="mailto:[email protected]">[email protected]</a>.'])))},non_commercial:function(){return""}}},function(e,t){var n=Function.prototype,r=n.bind,o=n.call,i=r&&r.bind(o,o);e.exports=r?function(e){return e&&i(e)}:function(e){return e&&function(){return o.apply(e,arguments)}}},function(e,t,n){"use strict";n(208)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(342))},function(e,t,n){"use strict";var r=n(29),o=n(136).map;r({target:"Array",proto:!0,forced:!n(171)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";n.r(t),n.d(t,"ArgumentTypes",(function(){return r})),n.d(t,"FunctionPlugin",(function(){return v}));n(37),n(12),n(67),n(51),n(8),n(9),n(0),n(10),n(3),n(2),n(4),n(21),n(24);var r,o=n(84),i=n(22),a=n(43),s=n(70),u=n(105),l=n(48),c=n(80);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e.STRING="STRING",e.NUMBER="NUMBER",e.BOOLEAN="BOOLEAN",e.SCALAR="SCALAR",e.NOERROR="NOERROR",e.RANGE="RANGE",e.INTEGER="INTEGER",e.COMPLEX="COMPLEX",e.ANY="ANY"}(r||(r={}));var v=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.coerceScalarToNumberOrError=function(e){return n.arithmeticHelper.coerceScalarToNumberOrError(e)},this.runFunction=function(e,t,o,s){var u,l,f,p,m,y,v=o.parameters;if(y=o.expandRanges?n.listOfScalarValues(e,t):e.map((function(e){return[n.evaluateAst(e,t),!1]})),void 0===o.repeatLastArgs&&v.length<y.length)return new i.CellError(i.ErrorType.NA,a.ErrorMessage.WrongArgNumber);if(void 0!==o.repeatLastArgs&&v.length<y.length&&(y.length-v.length)%o.repeatLastArgs!=0)return new i.CellError(i.ErrorType.NA,a.ErrorMessage.WrongArgNumber);for(v=h(v);v.length<y.length;){var g;(g=v).push.apply(g,h(v.slice(v.length-o.repeatLastArgs)))}var E=1,T=1;if(!o.vectorizationForbidden&&t.arraysFlag)for(var C=0;C<y.length;C++){var b=d(y[C],1)[0];b instanceof c.SimpleRangeValue&&v[C].argumentType!==r.RANGE&&v[C].argumentType!==r.ANY&&(T=Math.max(T,b.height()),E=Math.max(E,b.width()))}for(var w=y.length;w<v.length;w++)if(void 0===(null===(u=v[w])||void 0===u?void 0:u.defaultValue)&&!(null===(l=v[w])||void 0===l?void 0:l.optionalArg))return new i.CellError(i.ErrorType.NA,a.ErrorMessage.WrongArgNumber);for(var R=[],O=0;O<T;O++){for(var S=[],A=0;A<E;A++){for(var N=void 0,M=[],k=0;k<v.length;k++){var _=d(null!==(f=y[k])&&void 0!==f?f:[void 0,void 0],2),I=_[0],P=_[1];I instanceof c.SimpleRangeValue&&v[k].argumentType!==r.RANGE&&v[k].argumentType!==r.ANY&&!o.vectorizationForbidden&&t.arraysFlag&&(I=null===(p=I.data[1!==I.height()?O:0])||void 0===p?void 0:p[1!==I.width()?A:0]);var x=null!=I?I:null===(m=v[k])||void 0===m?void 0:m.defaultValue;if(void 0===x)M.push(void 0);else{var D=void 0!==I?n.coerceToType(x,v[k],t):x;void 0!==D?(D instanceof i.CellError&&v[k].argumentType!==r.SCALAR&&(N=null!=N?N:D),M.push(D)):P||(N=null!=N?N:new i.CellError(i.ErrorType.VALUE,a.ErrorMessage.WrongType))}}var L=null!=N?N:n.returnNumberWrapper(s.apply(void 0,M),o.returnNumberType);if(1===T&&1===E)return L;if(L instanceof c.SimpleRangeValue)throw"Function returning array cannot be vectorized.";S.push(L)}R.push(S)}return c.SimpleRangeValue.onlyValues(R)},this.runFunctionWithReferenceArgument=function(e,t,r,u,l){var c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){return new i.CellError(i.ErrorType.NA,a.ErrorMessage.CellRefExpected)};if(0===e.length)return n.returnNumberWrapper(u(),r.returnNumberType);if(e.length>1)return new i.CellError(i.ErrorType.NA,a.ErrorMessage.WrongArgNumber);for(var f,d=e[0];d.type===s.AstNodeType.PARENTHESIS;)d=d.expression;if(d.type===s.AstNodeType.CELL_REFERENCE)f=d.reference.toSimpleCellAddress(t.formulaAddress);else if(d.type===s.AstNodeType.CELL_RANGE||d.type===s.AstNodeType.COLUMN_RANGE||d.type===s.AstNodeType.ROW_RANGE)try{f=o.AbsoluteCellRange.fromAst(d,t.formulaAddress).start}catch(e){return new i.CellError(i.ErrorType.REF,a.ErrorMessage.CellRefExpected)}return void 0!==f?n.returnNumberWrapper(l(f),r.returnNumberType):n.runFunction(e,t,r,c)},this.interpreter=t,this.dependencyGraph=t.dependencyGraph,this.columnSearch=t.columnSearch,this.config=t.config,this.serialization=t.serialization,this.arraySizePredictor=t.arraySizePredictor,this.dateTimeHelper=t.dateTimeHelper,this.arithmeticHelper=t.arithmeticHelper}var t,n,p;
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/return t=e,(n=[{key:"evaluateAst",value:function(e,t){return this.interpreter.evaluateAst(e,t)}},{key:"arraySizeForAst",value:function(e,t){return this.arraySizePredictor.checkArraySizeForAst(e,t)}},{key:"listOfScalarValues",value:function(e,t){var n,r=[],o=f(e);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=this.evaluateAst(i,t);if(a instanceof c.SimpleRangeValue){var s,u=f(a.valuesFromTopLeftCorner());try{for(u.s();!(s=u.n()).done;){var l=s.value;r.push([l,!0])}}catch(e){u.e(e)}finally{u.f()}}else r.push([a,!1])}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"coerceToType",value:function(e,t,n){var o;if(e instanceof c.SimpleRangeValue)switch(t.argumentType){case r.RANGE:case r.ANY:o=e;break;default:var s=Object(u.coerceRangeToScalar)(e,n);if(void 0===s)return;e=s}if(!(e instanceof c.SimpleRangeValue))switch(t.argumentType){case r.INTEGER:case r.NUMBER:var f=this.coerceScalarToNumberOrError(e);if(!Object(l.isExtendedNumber)(f)){o=f;break}var d=Object(l.getRawValue)(f);if(void 0!==t.maxValue&&d>t.maxValue)return new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ValueLarge);if(void 0!==t.minValue&&d<t.minValue)return new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ValueSmall);if(void 0!==t.lessThan&&d>=t.lessThan)return new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ValueLarge);if(void 0!==t.greaterThan&&d<=t.greaterThan)return new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ValueSmall);if(t.argumentType===r.INTEGER&&!Number.isInteger(d))return new i.CellError(i.ErrorType.NUM,a.ErrorMessage.IntegerExpected);o=f;break;case r.STRING:o=Object(u.coerceScalarToString)(e);break;case r.BOOLEAN:o=Object(u.coerceScalarToBoolean)(e);break;case r.SCALAR:case r.NOERROR:case r.ANY:o=e;break;case r.RANGE:if(e instanceof i.CellError)return e;o=Object(u.coerceToRange)(e);break;case r.COMPLEX:return this.arithmeticHelper.coerceScalarToComplex(Object(l.getRawValue)(e))}return t.passSubtype||void 0===o?o:Object(l.getRawValue)(o)}},{key:"metadata",value:function(e){var t=this.constructor.implementedFunctions[e];if(void 0!==t)return t;throw new Error("No metadata for function ".concat(e,"."))}},{key:"returnNumberWrapper",value:function(e,t,n){return void 0!==t&&Object(l.isExtendedNumber)(e)?this.arithmeticHelper.ExtendedNumberFactory(Object(l.getRawValue)(e),{type:t,format:n}):e}}])&&y(t.prototype,n),p&&y(t,p),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"NoSheetWithIdError",(function(){return m})),n.d(t,"NoSheetWithNameError",(function(){return y})),n.d(t,"SheetNameAlreadyTakenError",(function(){return v})),n.d(t,"SheetSizeLimitExceededError",(function(){return g})),n.d(t,"NotAFormulaError",(function(){return E})),n.d(t,"InvalidAddressError",(function(){return T})),n.d(t,"InvalidArgumentsError",(function(){return C})),n.d(t,"SheetsNotEqual",(function(){return b})),n.d(t,"NamedExpressionNameIsAlreadyTakenError",(function(){return w})),n.d(t,"NamedExpressionNameIsInvalidError",(function(){return R})),n.d(t,"NamedExpressionDoesNotExistError",(function(){return O})),n.d(t,"NoOperationToUndoError",(function(){return S})),n.d(t,"NoOperationToRedoError",(function(){return A})),n.d(t,"NothingToPasteError",(function(){return N})),n.d(t,"UnableToParseError",(function(){return k})),n.d(t,"ExpectedValueOfTypeError",(function(){return _})),n.d(t,"ConfigValueEmpty",(function(){return I})),n.d(t,"ConfigValueTooSmallError",(function(){return P})),n.d(t,"ConfigValueTooBigError",(function(){return x})),n.d(t,"ExpectedOneOfValuesError",(function(){return D})),n.d(t,"EvaluationSuspendedError",(function(){return L})),n.d(t,"MissingTranslationError",(function(){return F})),n.d(t,"ProtectedFunctionTranslationError",(function(){return j})),n.d(t,"LanguageNotRegisteredError",(function(){return U})),n.d(t,"LanguageAlreadyRegisteredError",(function(){return H})),n.d(t,"FunctionPluginValidationError",(function(){return V})),n.d(t,"ProtectedFunctionError",(function(){return B})),n.d(t,"SourceLocationHasArrayError",(function(){return W})),n.d(t,"TargetLocationHasArrayError",(function(){return Y})),n.d(t,"NoRelativeAddressesAllowedError",(function(){return G})),n.d(t,"AliasAlreadyExisting",(function(){return z}));n(20),n(0),n(65),n(95),n(33),n(25),n(7),n(3),n(36),n(2),n(4),n(8),n(9),n(10);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function u(e){var t=d();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return f(e,arguments,p(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,e)})(e)}function f(e,t,n){return(f=d()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&h(o,n.prototype),o}).apply(null,arguments)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var m=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"There's no sheet with id = ".concat(e))}return n}(c(Error)),y=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"There's no sheet with name '".concat(e,"'"))}return n}(c(Error)),v=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Sheet with name ".concat(e," already exists"))}return n}(c(Error)),g=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Sheet size limit exceeded")}return n}(c(Error)),E=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"This is not a formula")}return n}(c(Error)),T=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Address (row = ".concat(e.row,", col = ").concat(e.col,") is invalid"))}return n}(c(Error)),C=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Invalid arguments, expected ".concat(e))}return n}(c(Error)),b=function(e){s(n,e);var t=u(n);function n(e,r){return a(this,n),t.call(this,"Sheets ".concat(e," and ").concat(r," are not equal."))}return n}(c(Error)),w=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Name of Named Expression '".concat(e,"' is already present"))}return n}(c(Error)),R=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Name of Named Expression '".concat(e,"' is invalid"))}return n}(c(Error)),O=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Named Expression '".concat(e,"' does not exist"))}return n}(c(Error)),S=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"There is no operation to undo")}return n}(c(Error)),A=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"There is no operation to redo")}return n}(c(Error)),N=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"There is nothing to paste")}return n}(c(Error));function M(e,t){switch(i(t)){case"function":case"symbol":return t.toString();case"bigint":return"BigInt("+t.toString()+")";default:return t instanceof RegExp?"RegExp("+t.toString()+")":t}}var k=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Unable to parse value: ".concat(JSON.stringify(e,M,4)))}return n}(c(Error)),_=function(e){s(n,e);var t=u(n);function n(e,r){return a(this,n),t.call(this,"Expected value of type: ".concat(e," for config parameter: ").concat(r))}return n}(c(Error)),I=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Config parameter ".concat(e," cannot be empty."))}return n}(c(Error)),P=function(e){s(n,e);var t=u(n);function n(e,r){return a(this,n),t.call(this,"Config parameter ".concat(e," should be at least ").concat(r))}return n}(c(Error)),x=function(e){s(n,e);var t=u(n);function n(e,r){return a(this,n),t.call(this,"Config parameter ".concat(e," should be at most ").concat(r))}return n}(c(Error)),D=function(e){s(n,e);var t=u(n);function n(e,r){return a(this,n),t.call(this,"Expected one of ".concat(e," for config parameter: ").concat(r))}return n}(c(Error)),L=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Computations are suspended")}return n}(c(Error)),F=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Translation for ".concat(e," is missing in the translation package you're using."))}return n}(c(Error)),j=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Cannot register translation for function with id: ".concat(e))}return n}(c(Error)),U=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Language not registered.")}return n}(c(Error)),H=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Language already registered.")}return n}(c(Error)),V=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.apply(this,arguments)}return o(n,null,[{key:"functionNotDeclaredInPlugin",value:function(e,t){return new n("Function with id ".concat(e," not declared in plugin ").concat(t))}},{key:"functionMethodNotFound",value:function(e,t){return new n("Function method ".concat(e," not found in plugin ").concat(t))}}]),n}(c(Error)),B=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.apply(this,arguments)}return o(n,null,[{key:"cannotRegisterFunctionWithId",value:function(e){return new n("Cannot register function with id ".concat(e))}},{key:"cannotUnregisterFunctionWithId",value:function(e){return new n("Cannot unregister function with id ".concat(e))}},{key:"cannotUnregisterProtectedPlugin",value:function(){return new n("Cannot unregister protected plugin")}}]),n}(c(Error)),W=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Cannot perform this operation, source location has an array inside.")}return n}(c(Error)),Y=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Cannot perform this operation, target location has an array inside.")}return n}(c(Error)),G=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Relative addresses not allowed in named expressions.")}return n}(c(Error)),z=function(e){s(n,e);var t=u(n);function n(e,r){return a(this,n),t.call(this,"Alias id ".concat(e," in plugin ").concat(r," already defined as a function or alias."))}return n}(c(Error))},function(e,t,n){"use strict";var r=n(29),o=n(136).filter;r({target:"Array",proto:!0,forced:!n(171)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var r=n(29),o=n(237).includes,i=n(174);r({target:"Array",proto:!0},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(e,t,n){"use strict";n.r(t),n.d(t,"ErrorMessage",(function(){return r}));
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var r=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};r.DistinctSigns="Distinct signs.",r.WrongArgNumber="Wrong number of arguments.",r.EmptyArg="Empty function argument.",r.EmptyArray="Empty array not allowed.",r.ArrayDimensions="Array dimensions are not compatible.",r.NoSpaceForArrayResult="No space for array result.",r.ValueSmall="Value too small.",r.ValueLarge="Value too large.",r.BadCriterion="Incorrect criterion.",r.RangeManySheets="Range spans more than one sheet.",r.CellRangeExpected="Cell range expected.",r.WrongDimension="Wrong range dimension.",r.ScalarExpected="Cell range not allowed.",r.NumberCoercion="Value cannot be coerced to number.",r.NumberExpected="Number argument expected.",r.IntegerExpected="Value needs to be an integer.",r.BadMode="Mode not recognized.",r.DateBounds="Date outside of bounds.",r.OutOfSheet="Resulting reference is out of the sheet.",r.WrongType="Wrong type of argument.",r.NaN="NaN or infinite value encountered.",r.EqualLength="Ranges need to be of equal length.",r.Negative="Value cannot be negative.",r.NotBinary="String does not represent a binary number.",r.NotOctal="String does not represent an octal number.",r.NotHex="String does not represent a hexadecimal number.",r.EndStartPeriod="End period needs to be at least start period.",r.CellRefExpected="Cell reference expected.",r.EmptyRange="Empty range not allowed.",r.BadRef="Address is not correct.",r.NumberRange="Number-only range expected.",r.ValueNotFound="Value not found.",r.ValueBaseLarge="Value in base too large.",r.ValueBaseSmall="Value in base too small.",r.ValueBaseLong="Value in base too long.",r.NegativeLength="Length cannot be negative.",r.PatternNotFound="Pattern not found.",r.OneValue="Needs at least one value.",r.TwoValues="Range needs to contain at least two elements.",r.ThreeValues="Range needs to contain at least three elements.",r.IndexBounds="Index out of bounds.",r.IndexLarge="Index too large.",r.Formula="Expected formula.",r.NegativeCount="Count cannot be negative.",r.ParseError="Parsing error.",r.SheetRef="Sheet does not exist.",r.PeriodLong="Period number cannot exceed life length.",r.InvalidDate="Invalid date.",r.BitshiftLong="Result of bitshift is too long.",r.EmptyString="Empty-string argument not allowed.",r.LengthBounds="Length out of bounds.",r.NegativeTime="Time cannot be negative.",r.NoDefault="No default option.",r.Selector="Selector cannot exceed the number of arguments.",r.StartEndDate="Start date needs to be earlier than end date.",r.IncorrectDateTime="String does not represent correct DateTime.",r.CharacterCodeBounds="Character code out of bounds.",r.NonZero="Argument cannot be 0.",r.LessThanOne="Argument cannot be less than 1.",r.WeekendString="Incorrect weekend bitmask string.",r.InvalidRoman="Invalid roman numeral.",r.WrongOrder="Wrong order of values.",r.ComplexNumberExpected="Complex number expected.",r.ShouldBeIorJ="Should be 'i' or 'j'.",r.SizeMismatch="Array dimensions mismatched.",r.FunctionName=function(e){return"Function name ".concat(e," not recognized.")},r.NamedExpressionName=function(e){return"Named expression ".concat(e," not recognized.")},r.LicenseKey=function(e){return"License key is ".concat(e,".")}},function(e,t,n){var r=n(727),o=n(427),i=n(293),a=n(728);e.exports=function(e){return r(e)||o(e)||i(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.isNumeric=a,t.isNumericLike=function(e){return a(e,[","])},t.rangeEach=function(e,t,n){var r=-1;"function"==typeof t?(n=t,t=e):r=e-1;for(;++r<=t&&!1!==n(r););},t.rangeEachReverse=function(e,t,n){var r=e+1;"function"==typeof t&&(n=t,t=0);for(;--r>=t&&!1!==n(r););},t.valueAccordingPercent=function(e,t){return t=parseInt(t.toString().replace("%",""),10),t=isNaN(t)?0:t,parseInt(e*t/100,10)},n(33),n(76),n(37),n(21),n(2),n(3),n(0),n(58),n(4),n(20),n(95),n(65),n(108),n(62);var o=r(n(44)),i=r(n(18));function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=(0,i.default)(e);if("number"===n)return!isNaN(e)&&isFinite(e);if("string"===n){if(0===e.length)return!1;if(1===e.length)return/\d/.test(e);var r=Array.from(new Set(["."].concat((0,o.default)(t)))).map((function(e){return"\\".concat(e)})).join("|");return new RegExp("^[+-]?\\s*(((".concat(r,")?\\d+((").concat(r,")\\d+)?(e[+-]?\\d+)?)|(0x[a-f\\d]+))$"),"i").test(e.trim())}return"object"===n&&!(!e||"number"!=typeof e.valueOf()||e instanceof Date)}},function(e,t,n){"use strict";function r(e){return e&&0===e.length}function o(e){return null==e?[]:Object.keys(e)}function i(e){for(var t=[],n=Object.keys(e),r=0;r<n.length;r++)t.push(e[n[r]]);return t}function a(e,t){for(var n=[],r=o(e),i=0;i<r.length;i++){var a=r[i];n.push(t.call(null,e[a],a))}return n}function s(e,t){for(var n=[],r=0;r<e.length;r++)n.push(t.call(null,e[r],r));return n}function u(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];Array.isArray(r)?t=t.concat(u(r)):t.push(r)}return t}function l(e){return r(e)?void 0:e[0]}function c(e){var t=e&&e.length;return t?e[t-1]:void 0}function f(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t.call(null,e[n],n);else{if(!I(e))throw Error("non exhaustive match");var r=o(e);for(n=0;n<r.length;n++){var i=r[n],a=e[i];t.call(null,a,i)}}}function d(e){return"string"==typeof e}function h(e){return void 0===e}function p(e){return e instanceof Function}function m(e,t){return void 0===t&&(t=1),e.slice(t,e.length)}function y(e,t){return void 0===t&&(t=1),e.slice(0,e.length-t)}function v(e,t){var n=[];if(Array.isArray(e))for(var r=0;r<e.length;r++){var o=e[r];t.call(null,o)&&n.push(o)}return n}function g(e,t){return v(e,(function(e){return!t(e)}))}function E(e,t){for(var n=Object.keys(e),r={},o=0;o<n.length;o++){var i=n[o],a=e[i];t(a)&&(r[i]=a)}return r}function T(e,t){return!!I(e)&&e.hasOwnProperty(t)}function C(e,t){return void 0!==R(e,(function(e){return e===t}))}function b(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}function w(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function R(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(t.call(null,r))return r}}function O(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r];t.call(null,o)&&n.push(o)}return n}function S(e,t,n){for(var r=Array.isArray(e),a=r?e:i(e),s=r?[]:o(e),u=n,l=0;l<a.length;l++)u=t.call(null,u,a[l],r?l:s[l]);return u}function A(e){return g(e,(function(e){return null==e}))}function N(e,t){void 0===t&&(t=function(e){return e});var n=[];return S(e,(function(e,r){var o=t(r);return C(n,o)?e:(n.push(o),e.concat(r))}),[])}function M(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=[null],o=r.concat(t);return Function.bind.apply(e,o)}function k(e){return Array.isArray(e)}function _(e){return e instanceof RegExp}function I(e){return e instanceof Object}function P(e,t){for(var n=0;n<e.length;n++)if(!t(e[n],n))return!1;return!0}function x(e,t){return g(e,(function(e){return C(t,e)}))}function D(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return!0;return!1}function L(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}function F(e,t){var n=b(e);return n.sort((function(e,n){return t(e)-t(n)})),n}function j(e,t){if(e.length!==t.length)throw Error("can't zipObject with different number of keys and values!");for(var n={},r=0;r<e.length;r++)n[e[r]]=t[r];return n}function U(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++)for(var i=t[r],a=o(i),s=0;s<a.length;s++){var u=a[s];e[u]=i[u]}return e}function H(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var i=t[r];if(!h(i))for(var a=o(i),s=0;s<a.length;s++){var u=a[s];T(e,u)||(e[u]=i[u])}}return e}function V(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return H.apply(null,[{}].concat(e))}function B(e,t){var n={};return f(e,(function(e){var r=t(e),o=n[r];o?o.push(e):n[r]=[e]})),n}function W(e,t){for(var n=w(e),r=o(t),i=0;i<r.length;i++){var a=r[i],s=t[a];n[a]=s}return n}function Y(){}function G(e){return e}function z(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(void 0!==r?r:void 0)}return t}function K(e){console&&console.error&&console.error("Error: "+e)}function X(e){console&&console.warn&&console.warn("Warning: "+e)}function q(){return"function"==typeof Map}function Q(e,t){t.forEach((function(t){var n=t.prototype;Object.getOwnPropertyNames(n).forEach((function(r){if("constructor"!==r){var o=Object.getOwnPropertyDescriptor(n,r);o&&(o.get||o.set)?Object.defineProperty(e.prototype,r,o):e.prototype[r]=t.prototype[r]}}))}))}function $(e){function t(){}t.prototype=e;var n=new t;function r(){return typeof n.bar}return r(),r(),e}function Z(e){return e[e.length-1]}function J(e){var t=(new Date).getTime(),n=e();return{time:(new Date).getTime()-t,value:n}}n.r(t),n.d(t,"isEmpty",(function(){return r})),n.d(t,"keys",(function(){return o})),n.d(t,"values",(function(){return i})),n.d(t,"mapValues",(function(){return a})),n.d(t,"map",(function(){return s})),n.d(t,"flatten",(function(){return u})),n.d(t,"first",(function(){return l})),n.d(t,"last",(function(){return c})),n.d(t,"forEach",(function(){return f})),n.d(t,"isString",(function(){return d})),n.d(t,"isUndefined",(function(){return h})),n.d(t,"isFunction",(function(){return p})),n.d(t,"drop",(function(){return m})),n.d(t,"dropRight",(function(){return y})),n.d(t,"filter",(function(){return v})),n.d(t,"reject",(function(){return g})),n.d(t,"pick",(function(){return E})),n.d(t,"has",(function(){return T})),n.d(t,"contains",(function(){return C})),n.d(t,"cloneArr",(function(){return b})),n.d(t,"cloneObj",(function(){return w})),n.d(t,"find",(function(){return R})),n.d(t,"findAll",(function(){return O})),n.d(t,"reduce",(function(){return S})),n.d(t,"compact",(function(){return A})),n.d(t,"uniq",(function(){return N})),n.d(t,"partial",(function(){return M})),n.d(t,"isArray",(function(){return k})),n.d(t,"isRegExp",(function(){return _})),n.d(t,"isObject",(function(){return I})),n.d(t,"every",(function(){return P})),n.d(t,"difference",(function(){return x})),n.d(t,"some",(function(){return D})),n.d(t,"indexOf",(function(){return L})),n.d(t,"sortBy",(function(){return F})),n.d(t,"zipObject",(function(){return j})),n.d(t,"assign",(function(){return U})),n.d(t,"assignNoOverwrite",(function(){return H})),n.d(t,"defaults",(function(){return V})),n.d(t,"groupBy",(function(){return B})),n.d(t,"merge",(function(){return W})),n.d(t,"NOOP",(function(){return Y})),n.d(t,"IDENTITY",(function(){return G})),n.d(t,"packArray",(function(){return z})),n.d(t,"PRINT_ERROR",(function(){return K})),n.d(t,"PRINT_WARNING",(function(){return X})),n.d(t,"isES2015MapSupported",(function(){return q})),n.d(t,"applyMixins",(function(){return Q})),n.d(t,"toFastProperties",(function(){return $})),n.d(t,"peek",(function(){return Z})),n.d(t,"timer",(function(){return J}))},function(e,t,n){"use strict";t.__esModule=!0,t.PLUGIN_KEY=t.BasePlugin=void 0;var r=n(855);t.PLUGIN_KEY=r.PLUGIN_KEY,t.BasePlugin=r.BasePlugin},function(e,t,n){"use strict";n.r(t),n.d(t,"EmptyValue",(function(){return d})),n.d(t,"getRawValue",(function(){return h})),n.d(t,"RichNumber",(function(){return p})),n.d(t,"cloneNumber",(function(){return m})),n.d(t,"DateNumber",(function(){return v})),n.d(t,"CurrencyNumber",(function(){return g})),n.d(t,"TimeNumber",(function(){return E})),n.d(t,"DateTimeNumber",(function(){return T})),n.d(t,"PercentNumber",(function(){return C})),n.d(t,"isExtendedNumber",(function(){return b})),n.d(t,"NumberType",(function(){return y})),n.d(t,"getTypeOfExtendedNumber",(function(){return w})),n.d(t,"getFormatOfExtendedNumber",(function(){return R})),n.d(t,"getTypeFormatOfExtendedNumber",(function(){return O}));n(8),n(9),n(0),n(25),n(7),n(10),n(3),n(2),n(4);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=Symbol("Empty value");function h(e){return e instanceof p?e.val:e}var p=function(){function e(t,n){l(this,e),this.val=t,this.format=n}return f(e,[{key:"fromNumber",value:function(e){return new this.constructor(e)}}]),e}();function m(e,t){if("number"==typeof e)return t;var n=e.fromNumber(t);return n.format=e.format,n}var y,v=function(e){o(n,e);var t=a(n);function n(){return l(this,n),t.apply(this,arguments)}return f(n,[{key:"getDetailedType",value:function(){return y.NUMBER_DATE}}]),n}(p),g=function(e){o(n,e);var t=a(n);function n(){return l(this,n),t.apply(this,arguments)}return f(n,[{key:"getDetailedType",value:function(){return y.NUMBER_CURRENCY}}]),n}(p),E=function(e){o(n,e);var t=a(n);function n(){return l(this,n),t.apply(this,arguments)}return f(n,[{key:"getDetailedType",value:function(){return y.NUMBER_TIME}}]),n}(p),T=function(e){o(n,e);var t=a(n);function n(){return l(this,n),t.apply(this,arguments)}return f(n,[{key:"getDetailedType",value:function(){return y.NUMBER_DATETIME}}]),n}(p),C=function(e){o(n,e);var t=a(n);function n(){return l(this,n),t.apply(this,arguments)}return f(n,[{key:"getDetailedType",value:function(){return y.NUMBER_PERCENT}}]),n}(p);function b(e){return"number"==typeof e||e instanceof p}function w(e){return e instanceof p?e.getDetailedType():y.NUMBER_RAW}function R(e){return e instanceof p?e.format:void 0}function O(e){return e instanceof p?{type:e.getDetailedType(),format:e.format}:{type:y.NUMBER_RAW}}!function(e){e.NUMBER_RAW="NUMBER_RAW",e.NUMBER_DATE="NUMBER_DATE",e.NUMBER_TIME="NUMBER_TIME",e.NUMBER_DATETIME="NUMBER_DATETIME",e.NUMBER_CURRENCY="NUMBER_CURRENCY",e.NUMBER_PERCENT="NUMBER_PERCENT"}(y||(y={}))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(29),o=n(35),i=n(244),a=n(90),s=n(74),u=n(246),l=o("".indexOf);r({target:"String",proto:!0,forced:!u("includes")},{includes:function(e){return!!~l(s(a(this)),s(i(e)),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(72),o=n(28),i=n(35),a=n(203),s=n(104),u=n(73),l=n(253),c=n(122),f=n(197),d=n(317),h=n(41),p=n(148).f,m=n(113).f,y=n(82).f,v=n(344),g=n(345).trim,E=o.Number,T=E.prototype,C=o.TypeError,b=i("".slice),w=i("".charCodeAt),R=function(e){var t=d(e,"number");return"bigint"==typeof t?t:O(t)},O=function(e){var t,n,r,o,i,a,s,u,l=d(e,"number");if(f(l))throw C("Cannot convert a Symbol value to a number");if("string"==typeof l&&l.length>2)if(l=g(l),43===(t=w(l,0))||45===t){if(88===(n=w(l,2))||120===n)return NaN}else if(48===t){switch(w(l,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+l}for(a=(i=b(l,2)).length,s=0;s<a;s++)if((u=w(i,s))<48||u>o)return NaN;return parseInt(i,r)}return+l};if(a("Number",!E(" 0o1")||!E("0b1")||E("+0x1"))){for(var S,A=function(e){var t=arguments.length<1?0:E(R(e)),n=this;return c(T,n)&&h((function(){v(n)}))?l(Object(t),n,A):t},N=r?p(E):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),M=0;N.length>M;M++)u(E,S=N[M])&&!u(A,S)&&y(A,S,m(E,S));A.prototype=T,T.constructor=A,s(o,"Number",A)}},function(e,t,n){var r=n(29),o=n(91),i=n(169);r({target:"Object",stat:!0,forced:n(41)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.default=void 0,t.getListenersCounter=function(){return u},n(56);var o=r(n(5)),i=r(n(6)),a=n(128),s=n(69),u=0;function l(e){var t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),(0,s.stopImmediatePropagation)(this)},e}var c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,o.default)(this,e),this.context=t||this,this.context.eventListeners||(this.context.eventListeners=[])}return(0,i.default)(e,[{key:"addEventListener",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function i(e){n.call(this,l(e))}return"boolean"==typeof o||(0,a.isPassiveEventSupported)()||(o=!1),this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:i,options:o,eventManager:this}),e.addEventListener(t,i,o),u+=1,function(){r.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){for(var r,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.context.eventListeners.length;i;)if(i-=1,(r=this.context.eventListeners[i]).event===t&&r.element===e){if(n&&n!==r.callback)continue;if(o&&r.eventManager!==this)continue;this.context.eventListeners.splice(i,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),u-=1}}},{key:"clearEvents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.context)for(var t=this.context.eventListeners.length;t;){t-=1;var n=this.context.eventListeners[t];e&&n.eventManager!==this||(this.context.eventListeners.splice(t,1),n.element.removeEventListener(n.event,n.callbackProxy,n.options),u-=1)}}},{key:"clear",value:function(){this.clearEvents()}},{key:"destroy",value:function(){this.clearEvents(),this.context=null}},{key:"destroyWithOwnEventsOnly",value:function(){this.clearEvents(!0),this.context=null}},{key:"fireEvent",value:function(e,t){var n=e.document,r=e;n||(r=(n=e.ownerDocument?e.ownerDocument:e).defaultView);var o,i={bubbles:!0,cancelable:"mousemove"!==t,view:r,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};n.createEvent?(o=n.createEvent("MouseEvents")).initMouseEvent(t,i.bubbles,i.cancelable,i.view,i.detail,i.screenX,i.screenY,i.clientX,i.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,i.relatedTarget||n.body.parentNode):o=n.createEventObject(),e.dispatchEvent?e.dispatchEvent(o):e.fireEvent("on".concat(t),o)}}]),e}();t.default=c},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.r(t),n.d(t,"AbstractProduction",(function(){return s})),n.d(t,"NonTerminal",(function(){return u})),n.d(t,"Rule",(function(){return l})),n.d(t,"Flat",(function(){return c})),n.d(t,"Option",(function(){return f})),n.d(t,"RepetitionMandatory",(function(){return d})),n.d(t,"RepetitionMandatoryWithSeparator",(function(){return h})),n.d(t,"Repetition",(function(){return p})),n.d(t,"RepetitionWithSeparator",(function(){return m})),n.d(t,"Alternation",(function(){return y})),n.d(t,"Terminal",(function(){return v})),n.d(t,"serializeGrammar",(function(){return g})),n.d(t,"serializeProduction",(function(){return E}));var r,o=n(46),i=n(96),a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(){function e(e){this.definition=e}return e.prototype.accept=function(e){e.visit(this),Object(o.forEach)(this.definition,(function(t){t.accept(e)}))},e}(),u=function(e){function t(t){var n=e.call(this,[])||this;return n.idx=1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),Object.defineProperty(t.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(e){},enumerable:!0,configurable:!0}),t.prototype.accept=function(e){e.visit(this)},t}(s),l=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.orgText="",Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),c=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.ignoreAmbiguities=!1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),f=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),d=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),h=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),p=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),m=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),y=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,n.ignoreAmbiguities=!1,n.hasPredicates=!1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),v=function(){function e(e){this.idx=1,Object(o.assign)(this,Object(o.pick)(e,(function(e){return void 0!==e})))}return e.prototype.accept=function(e){e.visit(this)},e}();function g(e){return Object(o.map)(e,E)}function E(e){function t(e){return Object(o.map)(e,E)}if(e instanceof u)return{type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(e instanceof c)return{type:"Flat",definition:t(e.definition)};if(e instanceof f)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof d)return{type:"RepetitionMandatory",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof h)return{type:"RepetitionMandatoryWithSeparator",name:e.name,idx:e.idx,separator:E(new v({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof m)return{type:"RepetitionWithSeparator",name:e.name,idx:e.idx,separator:E(new v({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof p)return{type:"Repetition",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof y)return{type:"Alternation",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof v){var n={type:"Terminal",name:e.terminalType.name,label:Object(i.tokenLabel)(e.terminalType),idx:e.idx},r=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(n.pattern=Object(o.isRegExp)(r)?r.source:r),n}if(e instanceof l)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}},function(e,t,n){"use strict";var r=n(29),o=n(28),i=n(149),a=n(124),s=n(98),u=n(91),l=n(250),c=n(150),f=n(171)("splice"),d=o.TypeError,h=Math.max,p=Math.min;r({target:"Array",proto:!0,forced:!f},{splice:function(e,t){var n,r,o,f,m,y,v=u(this),g=s(v),E=i(e,g),T=arguments.length;if(0===T?n=r=0:1===T?(n=0,r=g-E):(n=T-2,r=p(h(a(t),0),g-E)),g+n-r>9007199254740991)throw d("Maximum allowed length exceeded");for(o=l(v,r),f=0;f<r;f++)(m=E+f)in v&&c(o,f,v[m]);if(o.length=r,n<r){for(f=E;f<g-r;f++)y=f+n,(m=f+r)in v?v[y]=v[m]:delete v[y];for(f=g;f>g-r+n;f--)delete v[f-1]}else if(n>r)for(f=g-r;f>E;f--)y=f+n-1,(m=f+r-1)in v?v[y]=v[m]:delete v[y];for(f=0;f<n;f++)v[f+E]=arguments[f+2];return v.length=g-r+n,o}})},function(e,t,n){"use strict";t.__esModule=!0,t.conditions=void 0,t.getCondition=function(e,t){if(!r[e])throw Error('Filter condition "'.concat(e,'" does not exist.'));var n=r[e],o=n.condition,i=n.descriptor,a=t;i.inputValuesDecorator&&(a=i.inputValuesDecorator(a));return function(e){return o.apply(e.meta.instance,[].concat([e],[a]))}},t.getConditionDescriptor=function(e){if(!r[e])throw Error('Filter condition "'.concat(e,'" does not exist.'));return r[e].descriptor},t.registerCondition=function(e,t,n){n.key=e,r[e]={condition:t,descriptor:n}},n(20);var r={};t.conditions=r},function(e,t,n){"use strict";n(208)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(342))},function(e,t,n){var r=n(28),o=n(199),i=n(73),a=n(200),s=n(233),u=n(318),l=o("wks"),c=r.Symbol,f=c&&c.for,d=u?c:c&&c.withoutSetter||a;e.exports=function(e){if(!i(l,e)||!s&&"string"!=typeof l[e]){var t="Symbol."+e;s&&i(c,e)?l[e]=c[e]:l[e]=u&&f?f(t):d(t)}return l[e]}},function(e,t,n){"use strict";n(3),n(0),n(2),n(11),n(4),n(17);var r=n(1),o=n(18);t.__esModule=!0,t.Renderer=void 0;var i=r(n(556));t.ViewportColumnsCalculator=i.default;var a=r(n(557));t.ViewportRowsCalculator=a.default;var s=r(n(186));t.CellCoords=s.default;var u=r(n(558));t.CellRange=u.default;var l=r(n(559));t.ColumnFilter=l.default;var c=r(n(560));t.RowFilter=c.default;var f=r(n(561));t.MasterTable=f.default;var d=n(568);t.LeftOverlay=d.LeftOverlay,t.TopOverlay=d.TopOverlay,t.TopLeftCornerOverlay=d.TopLeftCornerOverlay,t.BottomOverlay=d.BottomOverlay,t.BottomLeftCornerOverlay=d.BottomLeftCornerOverlay;var h=r(n(571));t.Border=h.default;var p=r(n(755));t.default=p.default,t.Core=p.default;var m=r(n(572));t.Event=m.default;var y=r(n(573));t.Overlays=y.default;var v=r(n(574));t.Scroll=v.default;var g=r(n(757));t.Selection=g.default;var E=r(n(575));t.Settings=E.default;var T=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=R(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(563));t.Renderer=T;var C=n(224);t.OrderView=C.OrderView,t.SharedOrderView=C.SharedOrderView;var b=r(n(576));t.Viewport=b.default;var w=n(53);function R(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(R=function(e){return e?n:t})(e)}t.getListenersCounter=w.getListenersCounter},function(e,t){e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";var r=n(134),o=n(78),i=n(35),a=n(210),s=n(41),u=n(64),l=n(61),c=n(124),f=n(133),d=n(74),h=n(90),p=n(258),m=n(131),y=n(649),v=n(211),g=n(59)("replace"),E=Math.max,T=Math.min,C=i([].concat),b=i([].push),w=i("".indexOf),R=i("".slice),O="$0"==="a".replace(/./,"$0"),S=!!/./[g]&&""===/./[g]("a","$0");a("replace",(function(e,t,n){var i=S?"$":"$0";return[function(e,n){var r=h(this),i=null==e?void 0:m(e,g);return i?o(i,e,r,n):o(t,d(r),e,n)},function(e,o){var a=u(this),s=d(e);if("string"==typeof o&&-1===w(o,i)&&-1===w(o,"$<")){var h=n(t,a,s,o);if(h.done)return h.value}var m=l(o);m||(o=d(o));var g=a.global;if(g){var O=a.unicode;a.lastIndex=0}for(var S=[];;){var A=v(a,s);if(null===A)break;if(b(S,A),!g)break;""===d(A[0])&&(a.lastIndex=p(s,f(a.lastIndex),O))}for(var N,M="",k=0,_=0;_<S.length;_++){for(var I=d((A=S[_])[0]),P=E(T(c(A.index),s.length),0),x=[],D=1;D<A.length;D++)b(x,void 0===(N=A[D])?N:String(N));var L=A.groups;if(m){var F=C([I],x,P,s);void 0!==L&&b(F,L);var j=d(r(o,void 0,F))}else j=y(I,s,P,x,L,o);P>=k&&(M+=R(s,k,P)+j,k=P+I.length)}return M+R(s,k)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!O||S)},function(e,t,n){var r=n(61);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},function(e,t,n){var r=n(28),o=n(63),i=r.String,a=r.TypeError;e.exports=function(e){if(o(e))return e;throw a(i(e)+" is not an object")}},function(e,t,n){"use strict";var r=n(35),o=n(167).PROPER,i=n(104),a=n(64),s=n(122),u=n(74),l=n(41),c=n(256),f=RegExp.prototype,d=f.toString,h=r(c),p=l((function(){return"/a/b"!=d.call({source:"a",flags:"b"})})),m=o&&"toString"!=d.name;(p||m)&&i(RegExp.prototype,"toString",(function(){var e=a(this),t=u(e.source),n=e.flags;return"/"+t+"/"+u(void 0===n&&s(f,e)&&!("flags"in f)?h(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";var r=n(134),o=n(78),i=n(35),a=n(210),s=n(245),u=n(64),l=n(90),c=n(647),f=n(258),d=n(133),h=n(74),p=n(131),m=n(242),y=n(211),v=n(209),g=n(257),E=n(41),T=g.UNSUPPORTED_Y,C=Math.min,b=[].push,w=i(/./.exec),R=i(b),O=i("".slice);a("split",(function(e,t,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var i=h(l(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[i];if(!s(e))return o(t,i,e,a);for(var u,c,f,d=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),y=0,g=new RegExp(e.source,p+"g");(u=o(v,g,i))&&!((c=g.lastIndex)>y&&(R(d,O(i,y,u.index)),u.length>1&&u.index<i.length&&r(b,d,m(u,1)),f=u[0].length,y=c,d.length>=a));)g.lastIndex===u.index&&g.lastIndex++;return y===i.length?!f&&w(g,"")||R(d,""):R(d,O(i,y)),d.length>a?m(d,0,a):d}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:o(t,this,e,n)}:t,[function(t,n){var r=l(this),a=null==t?void 0:p(t,e);return a?o(a,t,r,n):o(i,h(r),t,n)},function(e,r){var o=u(this),a=h(e),s=n(i,o,a,r,i!==t);if(s.done)return s.value;var l=c(o,RegExp),p=o.unicode,m=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(T?"g":"y"),v=new l(T?"^(?:"+o.source+")":o,m),g=void 0===r?4294967295:r>>>0;if(0===g)return[];if(0===a.length)return null===y(v,a)?[a]:[];for(var E=0,b=0,w=[];b<a.length;){v.lastIndex=T?0:b;var S,A=y(v,T?O(a,b):a);if(null===A||(S=C(d(v.lastIndex+(T?b:0)),a.length))===E)b=f(a,b,p);else{if(R(w,O(a,E,b)),w.length===g)return w;for(var N=1;N<=A.length-1;N++)if(R(w,A[N]),w.length===g)return w;b=E=S}}return R(w,O(a,E)),w}]}),!!E((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),T)},function(e,t,n){n(29)({target:"Number",stat:!0},{isInteger:n(665)})},function(e,t,n){"use strict";t.__esModule=!0,t.curry=function(e){var t=e.length;return function n(r){return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=r.concat(i);return s.length>=t?e.apply(this,s):n(s)}}([])},t.curryRight=function(e){var t=e.length;return function n(r){return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=r.concat(i.reverse());return s.length>=t?e.apply(this,s):n(s)}}([])},t.debounce=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=null;function o(){for(var o=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r&&clearTimeout(r),r=setTimeout((function(){t=e.apply(o,a)}),n),t}return o},t.fastCall=function(e,t,n,r,i,a,s,u){if((0,o.isDefined)(u))return e.call(t,n,r,i,a,s,u);if((0,o.isDefined)(s))return e.call(t,n,r,i,a,s);if((0,o.isDefined)(a))return e.call(t,n,r,i,a);if((0,o.isDefined)(i))return e.call(t,n,r,i);if((0,o.isDefined)(r))return e.call(t,n,r);if((0,o.isDefined)(n))return e.call(t,n);return e.call(t)},t.isFunction=function(e){return"function"==typeof e},t.partial=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return e.apply(this,n.concat(r))}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t[0],i=t.slice(1);return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.arrayReduce)(i,(function(e,t){return t(e)}),o.apply(this,t))}},t.throttle=i,t.throttleAfterHits=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=i(e,t),o=n;function a(){o=n}function s(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return o?(o-=1,e.apply(this,n)):r.apply(this,n)}return s.clearHits=a,s},n(75),n(12),n(20),n(140);var r=n(19),o=n(34);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=0,r={lastCallThrottled:!0},o=null;function i(){for(var i=this,a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var l=Date.now(),c=!1;r.lastCallThrottled=!0,n||(n=l,c=!0);var f=t-(l-n);return c?(r.lastCallThrottled=!1,e.apply(this,s)):(o&&clearTimeout(o),o=setTimeout((function(){r.lastCallThrottled=!1,e.apply(i,s),n=0,o=void 0}),f)),r}return i}},function(e,t,n){"use strict";t.__esModule=!0,t.isImmediatePropagationStopped=function(e){return!1===e.isImmediatePropagationEnabled},t.isLeftClick=function(e){return 0===e.button},t.isRightClick=function(e){return 2===e.button},t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}},function(e,t,n){"use strict";n.r(t);var r=n(99);n.d(t,"cellAddressFromString",(function(){return r.cellAddressFromString})),n.d(t,"simpleCellAddressFromString",(function(){return r.simpleCellAddressFromString})),n.d(t,"simpleCellAddressToString",(function(){return r.simpleCellAddressToString})),n.d(t,"simpleCellRangeFromString",(function(){return r.simpleCellRangeFromString})),n.d(t,"simpleCellRangeToString",(function(){return r.simpleCellRangeToString}));var o=n(212);n.d(t,"CellAddress",(function(){return o.CellAddress}));var i=n(358);n.d(t,"ParserWithCaching",(function(){return i.ParserWithCaching}));var a=n(361);n.d(t,"collectDependencies",(function(){return a.collectDependencies}));var s=n(176);n.d(t,"buildLexerConfig",(function(){return s.buildLexerConfig}));var u=n(266);n.d(t,"FormulaLexer",(function(){return u.FormulaLexer}));var l=n(101);n.d(t,"AstNodeType",(function(){return l.AstNodeType})),n.d(t,"ParsingErrorType",(function(){return l.ParsingErrorType})),n.d(t,"buildProcedureAst",(function(){return l.buildProcedureAst})),n.d(t,"buildCellRangeAst",(function(){return l.buildCellRangeAst})),n.d(t,"buildParsingErrorAst",(function(){return l.buildParsingErrorAst})),n.d(t,"buildCellErrorAst",(function(){return l.buildCellErrorAst}));var c=n(267);n.d(t,"Unparser",(function(){return c.Unparser}));var f=n(153);n.d(t,"AddressDependency",(function(){return f.AddressDependency})),n.d(t,"CellRangeDependency",(function(){return f.CellRangeDependency})),n.d(t,"ColumnRangeDependency",(function(){return f.ColumnRangeDependency})),n.d(t,"RowRangeDependency",(function(){return f.RowRangeDependency})),n.d(t,"NamedExpressionDependency",(function(){return f.NamedExpressionDependency}))},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.default=void 0,n(3),n(36),n(0),n(2),n(4),n(31),n(56);var o,i=r(n(5)),a=r(n(6)),s=r(n(85)),u=n(19),l=n(14),c=n(97),f=n(89),d=n(86),h=n(68),p=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","afterScrollHorizontally","afterScrollVertically","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeViewRender","afterViewRender","beforeRender","afterRender","beforeSetCellMeta","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyRowHeader","modifyRowHeight","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","persistentStateLoad","persistentStateReset","persistentStateSave","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnMove","afterColumnMove","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","beforeAutofillInsidePopulate","modifyTransformStart","modifyTransformEnd","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],m=(0,d.toSingleLine)(o||(o=(0,s.default)(['The plugin hook "[hookName]" was removed in Handsontable [removedInVersion]. \n Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to \n learn about the migration path.'],['The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\\x20\n Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\\x20\n learn about the migration path.']))),y=new Map([["modifyRow","8.0.0"],["modifyCol","8.0.0"],["unmodifyRow","8.0.0"],["unmodifyCol","8.0.0"],["skipLengthCache","8.0.0"],["hiddenColumn","8.0.0"],["hiddenRow","8.0.0"]]),v=new Map([["beforeAutofillInsidePopulate",'The plugin hook "beforeAutofillInsidePopulate" is deprecated and will be removed in the next major release.']]),g=function(){function e(){(0,i.default)(this,e),this.globalBucket=this.createEmptyBucket()}return(0,a.default)(e,[{key:"createEmptyBucket",value:function(){var e=Object.create(null);return(0,u.arrayEach)(p,(function(t){return e[t]=[]})),e}},{key:"getBucket",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}},{key:"add",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))(0,u.arrayEach)(t,(function(t){return n.add(e,t,r)}));else{y.has(e)&&(0,f.warn)((0,c.substitute)(m,{hookName:e,removedInVersion:y.get(e)})),v.has(e)&&(0,f.warn)(v.get(e));var o=this.getBucket(r);if(void 0===o[e]&&(this.register(e),o[e]=[]),t.skip=!1,-1===o[e].indexOf(t)){var i=!1;t.initialHook&&(0,u.arrayEach)(o[e],(function(n,r){if(n.initialHook)return o[e][r]=t,i=!0,!1})),i||o[e].push(t)}}return this}},{key:"once",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?(0,u.arrayEach)(t,(function(t){return n.once(e,t,r)})):(t.runOnce=!0,this.add(e,t,r))}},{key:"remove",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.getBucket(n);return void 0!==r[e]&&r[e].indexOf(t)>=0&&(t.skip=!0,!0)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getBucket(t);return!(void 0===n[e]||!n[e].length)}},{key:"run",value:function(e,t,n,r,o,i,a,s){var u=this.globalBucket[t],l=u?u.length:0,c=0;if(l)for(;c<l;)if(u[c]&&!u[c].skip){var f=(0,h.fastCall)(u[c],e,n,r,o,i,a,s);void 0!==f&&(n=f),u[c]&&u[c].runOnce&&this.remove(t,u[c]),c+=1}else c+=1;var d=this.getBucket(e)[t],p=d?d.length:0,m=0;if(p)for(;m<p;)if(d[m]&&!d[m].skip){var y=(0,h.fastCall)(d[m],e,n,r,o,i,a,s);void 0!==y&&(n=y),d[m]&&d[m].runOnce&&this.remove(t,d[m],e),m+=1}else m+=1;return n}},{key:"destroy",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,l.objectEach)(this.getBucket(e),(function(e,t,n){return n[t].length=0}))}},{key:"register",value:function(e){this.isRegistered(e)||p.push(e)}},{key:"deregister",value:function(e){this.isRegistered(e)&&p.splice(p.indexOf(e),1)}},{key:"isDeprecated",value:function(e){return v.has(e)||y.has(e)}},{key:"isRegistered",value:function(e){return p.indexOf(e)>=0}},{key:"getRegistered",value:function(){return p}}],[{key:"getSingleton",value:function(){return E}}]),e}(),E=new g;var T=g;t.default=T},function(e,t,n){var r=n(41);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(35),o=n(91),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},function(e,t,n){var r=n(28),o=n(205),i=r.String;e.exports=function(e){if("Symbol"===o(e))throw TypeError("Cannot convert a Symbol value to a string");return i(e)}},function(e,t,n){var r=n(29),o=n(28),i=n(134),a=n(61),s=n(130),u=n(168),l=/MSIE .\./.test(s),c=o.Function,f=function(e){return function(t,n){var r=arguments.length>2,o=r?u(arguments,2):void 0;return e(r?function(){i(a(t)?t:c(t),this,o)}:t,n)}};r({global:!0,bind:!0,forced:l},{setTimeout:f(o.setTimeout),setInterval:f(o.setInterval)})},function(e,t,n){"use strict";var r=n(29),o=n(35),i=n(164),a=n(94),s=n(151),u=o([].join),l=i!=Object,c=s("join",",");r({target:"Array",proto:!0,forced:l||!c},{join:function(e){return u(a(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(29),o=n(35),i=n(147),a=n(91),s=n(98),u=n(74),l=n(41),c=n(672),f=n(151),d=n(673),h=n(674),p=n(165),m=n(675),y=[],v=o(y.sort),g=o(y.push),E=l((function(){y.sort(void 0)})),T=l((function(){y.sort(null)})),C=f("sort"),b=!l((function(){if(p)return p<70;if(!(d&&d>3)){if(h)return!0;if(m)return m<603;var e,t,n,r,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)y.push({k:t+r,v:n})}for(y.sort((function(e,t){return t.v-e.v})),r=0;r<y.length;r++)t=y[r].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}}));r({target:"Array",proto:!0,forced:E||!T||!C||!b},{sort:function(e){void 0!==e&&i(e);var t=a(this);if(b)return void 0===e?v(t):v(t,e);var n,r,o=[],l=s(t);for(r=0;r<l;r++)r in t&&g(o,t[r]);for(c(o,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:u(t)>u(n)?1:-1}}(e)),n=o.length,r=0;r<n;)t[r]=o[r++];for(;r<l;)delete t[r++];return t}})},function(e,t){var n=Function.prototype.call;e.exports=n.bind?n.bind(n):function(){return n.apply(n,arguments)}},function(e,t,n){"use strict";n.r(t),n.d(t,"END_OF_FILE",(function(){return C})),n.d(t,"DEFAULT_PARSER_CONFIG",(function(){return w})),n.d(t,"DEFAULT_RULE_CONFIG",(function(){return R})),n.d(t,"ParserDefinitionErrorType",(function(){return b})),n.d(t,"EMPTY_ALT",(function(){return O})),n.d(t,"Parser",(function(){return S})),n.d(t,"CstParser",(function(){return A})),n.d(t,"EmbeddedActionsParser",(function(){return N}));var r,o=n(46),i=n(650),a=n(96),s=n(264),u=n(138),l=n(180),c=n(354),f=n(653),d=n(654),h=n(656),p=n(657),m=n(658),y=n(659),v=n(660),g=n(661),E=n(662),T=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),C=Object(a.createTokenInstance)(a.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(C);var b,w=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:u.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),R=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function O(e){return void 0===e&&(e=void 0),function(){return e}}!function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.INVALID_NESTED_RULE_NAME=10]="INVALID_NESTED_RULE_NAME",e[e.DUPLICATE_NESTED_NAME=11]="DUPLICATE_NESTED_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=12]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=13]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=14]="TOO_MANY_ALTS"}(b||(b={}));var S=function(){function e(e,t){void 0===t&&(t=w),this.ignoredIssues=w.ignoredIssues,this.definitionErrors=[],this.selfAnalysisDone=!1;this.initErrorHandler(t),this.initLexerAdapter(),this.initLooksAhead(t),this.initRecognizerEngine(e,t),this.initRecoverable(t),this.initTreeBuilder(t),this.initContentAssist(),this.initGastRecorder(t),this.initPerformanceTracer(t),Object(o.has)(t,"ignoredIssues")&&t.ignoredIssues!==w.ignoredIssues&&Object(o.PRINT_WARNING)("The <ignoredIssues> IParserConfig property is soft-deprecated and will be removed in future versions.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead."),this.ignoredIssues=Object(o.has)(t,"ignoredIssues")?t.ignoredIssues:w.ignoredIssues,this.skipValidations=Object(o.has)(t,"skipValidations")?t.skipValidations:w.skipValidations}return e.performSelfAnalysis=function(e){e.performSelfAnalysis()},e.prototype.performSelfAnalysis=function(){var t=this;this.TRACE_INIT("performSelfAnalysis",(function(){var n;t.selfAnalysisDone=!0;var r=t.className;t.TRACE_INIT("toFastProps",(function(){Object(o.toFastProperties)(t)})),t.TRACE_INIT("Grammar Recording",(function(){try{t.enableRecording(),Object(o.forEach)(t.definedRulesNames,(function(e){var n=t[e].originalGrammarAction,r=void 0;t.TRACE_INIT(e+" Rule",(function(){r=t.topLevelRuleRecord(e,n)})),t.gastProductionsCache[e]=r}))}finally{t.disableRecording()}}));var a=[];if(t.TRACE_INIT("Grammar Resolving",(function(){a=Object(l.resolveGrammar)({rules:Object(o.values)(t.gastProductionsCache)}),t.definitionErrors.push.apply(t.definitionErrors,a)})),t.TRACE_INIT("Grammar Validations",(function(){if(Object(o.isEmpty)(a)&&!1===t.skipValidations){var e=Object(l.validateGrammar)({rules:Object(o.values)(t.gastProductionsCache),maxLookahead:t.maxLookahead,tokenTypes:Object(o.values)(t.tokensMap),ignoredIssues:t.ignoredIssues,errMsgProvider:u.defaultGrammarValidatorErrorProvider,grammarName:r});t.definitionErrors.push.apply(t.definitionErrors,e)}})),Object(o.isEmpty)(t.definitionErrors)&&(t.recoveryEnabled&&t.TRACE_INIT("computeAllProdsFollows",(function(){var e=Object(i.computeAllProdsFollows)(Object(o.values)(t.gastProductionsCache));t.resyncFollows=e})),t.TRACE_INIT("ComputeLookaheadFunctions",(function(){t.preComputeLookaheadFunctions(Object(o.values)(t.gastProductionsCache))}))),t.TRACE_INIT("expandAllNestedRuleNames",(function(){var e=Object(s.expandAllNestedRuleNames)(Object(o.values)(t.gastProductionsCache),t.fullRuleNameToShort);t.allRuleNames=e.allRuleNames})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!Object(o.isEmpty)(t.definitionErrors))throw n=Object(o.map)(t.definitionErrors,(function(e){return e.message})),new Error("Parser Definition Errors detected:\n "+n.join("\n-------------------------------\n"))}))},e.DEFER_DEFINITION_ERRORS_HANDLING=!1,e}();Object(o.applyMixins)(S,[c.Recoverable,f.LooksAhead,d.TreeBuilder,h.LexerAdapter,m.RecognizerEngine,p.RecognizerApi,y.ErrorHandler,v.ContentAssist,g.GastRecorder,E.PerformanceTracer]);var A=function(e){function t(t,n){void 0===n&&(n=w);var r=Object(o.cloneObj)(n);return r.outputCst=!0,e.call(this,t,r)||this}return T(t,e),t}(S),N=function(e){function t(t,n){void 0===n&&(n=w);var r=Object(o.cloneObj)(n);return r.outputCst=!1,e.call(this,t,r)||this}return T(t,e),t}(S)},function(e,t,n){"use strict";n.r(t),n.d(t,"SimpleRangeValue",(function(){return c}));n(2),n(3),n(4),n(12),n(0),n(24),n(21),n(8),n(9),n(10),n(83);var r=n(126),o=n(22),i=n(43),a=n(48);function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var c=function(){function e(t,n,o,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._data=t,this.range=n,this.dependencyGraph=o,this._hasOnlyNumbers=i,this.size=void 0===t?new r.ArraySize(n.effectiveWidth(o),n.effectiveHeight(o)):new r.ArraySize(t[0].length,t.length)}var t,n,u;return t=e,u=[{key:"fromRange",value:function(t,n,r){return new e(t,n,r,!0)}},{key:"onlyNumbers",value:function(t){return new e(t,void 0,void 0,!0)}},{key:"onlyValues",value:function(t){return new e(t,void 0,void 0,void 0)}},{key:"onlyRange",value:function(t,n){return new e(void 0,t,n,void 0)}},{key:"fromScalar",value:function(t){return new e([[t]],void 0,void 0,void 0)}}],(n=[{key:"isAdHoc",value:function(){return void 0===this.range}},{key:"width",value:function(){return this.size.width}},{key:"height",value:function(){return this.size.height}},{key:"data",get:function(){return this.ensureThatComputed(),this._data}},{key:"ensureThatComputed",value:function(){var t=this;void 0===this._data&&(this._hasOnlyNumbers=!0,this._data=this.range.addressesArrayMap(this.dependencyGraph,(function(n){var r=t.dependencyGraph.getCellValue(n);return r instanceof e?(t._hasOnlyNumbers=!1,new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.ScalarExpected)):(Object(a.isExtendedNumber)(r)||(t._hasOnlyNumbers=!1),r)})))}},{key:"valuesFromTopLeftCorner",value:function(){this.ensureThatComputed();for(var e=[],t=0;t<this._data.length;t++)for(var n=0;n<this._data[0].length;n++)e.push(this._data[t][n]);return e}},{key:"effectiveAddressesFromData",value:regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<this.data.length)){e.next=13;break}r=this.data[n],i=0;case 4:if(!(i<r.length)){e.next=10;break}return e.next=7,Object(o.simpleCellAddress)(t.sheet,t.col+i,t.row+n);case 7:++i,e.next=4;break;case 10:++n,e.next=1;break;case 13:case"end":return e.stop()}}),e,this)}))},{key:"entriesFromTopLeftCorner",value:regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.ensureThatComputed(),n=0;case 2:if(!(n<this.size.height)){e.next=13;break}r=0;case 4:if(!(r<this.size.width)){e.next=10;break}return e.next=7,[this._data[n][r],Object(o.simpleCellAddress)(t.sheet,t.col+r,t.row+n)];case 7:++r,e.next=4;break;case 10:++n,e.next=2;break;case 13:case"end":return e.stop()}}),e,this)}))},{key:"iterateValuesFromTopLeftCorner",value:regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.valuesFromTopLeftCorner(),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"numberOfElements",value:function(){return this.size.width*this.size.height}},{key:"hasOnlyNumbers",value:function(){if(void 0===this._hasOnlyNumbers){this._hasOnlyNumbers=!0;var e,t=s(this.data);try{for(t.s();!(e=t.n()).done;){var n,r=s(e.value);try{for(r.s();!(n=r.n()).done;)if("number"!=typeof n.value)return this._hasOnlyNumbers=!1,!1}catch(e){r.e(e)}finally{r.f()}}}catch(e){t.e(e)}finally{t.f()}}return this._hasOnlyNumbers}},{key:"rawNumbers",value:function(){return this._data}},{key:"rawData",value:function(){var e;return this.ensureThatComputed(),null!==(e=this._data)&&void 0!==e?e:[]}},{key:"sameDimensionsAs",value:function(e){return this.width()===e.width()&&this.height()===e.height()}}])&&l(t.prototype,n),u&&l(t,u),e}()},function(e,t,n){"use strict";n(0),n(26),n(52),t.__esModule=!0;var r={IndexMapper:!0,getRegisteredMapsCounter:!0,getIncreasedIndexes:!0,getDecreasedIndexes:!0,alterUtilsFactory:!0};t.getRegisteredMapsCounter=t.getIncreasedIndexes=t.getDecreasedIndexes=t.alterUtilsFactory=t.IndexMapper=void 0;var o=n(767);t.IndexMapper=o.IndexMapper;var i=n(301);t.getRegisteredMapsCounter=i.getRegisteredMapsCounter;var a=n(582);t.getIncreasedIndexes=a.getIncreasedIndexes,t.getDecreasedIndexes=a.getDecreasedIndexes,t.alterUtilsFactory=a.alterUtilsFactory;var s=n(580);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===s[e]||(t[e]=s[e]))}))},function(e,t,n){var r=n(28),o=n(72),i=n(319),a=n(320),s=n(64),u=n(196),l=r.TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor;t.f=o?a?function(e,t,n){if(s(e),t=u(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var r=f(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(s(e),t=u(t),s(n),i)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n,r){var o=t&&t.prototype instanceof c?t:c,i=Object.create(o.prototype),a=new b(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return R()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var l={};function c(){}function f(){}function d(){}var h={};h[o]=function(){return this};var p=Object.getPrototypeOf,m=p&&p(p(w([])));m&&m!==t&&n.call(m,o)&&(h=m);var y=d.prototype=c.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function g(e,t){var r;this._invoke=function(o,i){function a(){return new t((function(r,a){!function r(o,i,a,s){var l=u(e[o],e,i);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function E(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function w(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:R}}function R(){return{value:void 0,done:!0}}return f.prototype=y.constructor=d,d.constructor=f,d[a]=f.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(g.prototype),g.prototype[i]=function(){return this},e.AsyncIterator=g,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new g(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v(y),y[a]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=w,b.prototype={constructor:b,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:w(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";n.r(t),n.d(t,"WRONG_RANGE_SIZE",(function(){return y})),n.d(t,"isSimpleCellRange",(function(){return v})),n.d(t,"simpleCellRange",(function(){return g})),n.d(t,"AbsoluteCellRange",(function(){return E})),n.d(t,"AbsoluteColumnRange",(function(){return T})),n.d(t,"AbsoluteRowRange",(function(){return C}));n(83),n(255),n(51),n(20),n(8),n(9),n(0),n(10),n(3),n(2),n(4),n(25),n(7);var r=n(22),o=n(39),i=n(70),a=n(181);function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),e}function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var y="AbsoluteCellRange: Wrong range size";function v(e){return!(!e||"object"!==m(e)&&"function"!=typeof e)&&("start"in e&&Object(r.isSimpleCellAddress)(e.start)&&"end"in e&&Object(r.isSimpleCellAddress)(e.end))}var g=function(e,t){return{start:e,end:t}},E=function(){function e(t,n){if(d(this,e),t.sheet!==n.sheet)throw new o.SheetsNotEqual(t.sheet,n.sheet);this.start=Object(r.simpleCellAddress)(t.sheet,t.col,t.row),this.end=Object(r.simpleCellAddress)(n.sheet,n.col,n.row)}return p(e,[{key:"sheet",get:function(){return this.start.sheet}},{key:"isFinite",value:function(){return Number.isFinite(this.size())}},{key:"doesOverlap",value:function(e){return this.start.sheet==e.start.sheet&&(!(this.end.row<e.start.row||this.start.row>e.end.row)&&!(this.end.col<e.start.col||this.start.col>e.end.col))}},{key:"addressInRange",value:function(e){return this.sheet===e.sheet&&(this.start.row<=e.row&&this.end.row>=e.row&&this.start.col<=e.col&&this.end.col>=e.col)}},{key:"columnInRange",value:function(e){return this.sheet===e.sheet&&(this.start.col<=e.col&&this.end.col>=e.col)}},{key:"rowInRange",value:function(e){return this.sheet===e.sheet&&(this.start.row<=e.row&&this.end.row>=e.row)}},{key:"containsRange",value:function(e){return this.addressInRange(e.start)&&this.addressInRange(e.end)}},{key:"intersectionWith",value:function(t){if(this.sheet===t.start.sheet){var n=Math.max(this.start.row,t.start.row),o=Math.min(this.end.row,t.end.row),i=Math.max(this.start.col,t.start.col),a=Math.min(this.end.col,t.end.col);if(!(n>o||i>a))return new e(Object(r.simpleCellAddress)(this.sheet,i,n),Object(r.simpleCellAddress)(this.sheet,a,o))}}},{key:"includesRow",value:function(e){return this.start.row<e&&this.end.row>=e}},{key:"includesColumn",value:function(e){return this.start.col<e&&this.end.col>=e}},{key:"shiftByRows",value:function(e){this.start.row+=e,this.end.row+=e}},{key:"expandByRows",value:function(e){this.end.row+=e}},{key:"shiftByColumns",value:function(e){this.start.col+=e,this.end.col+=e}},{key:"shifted",value:function(t,n){return e.spanFrom(Object(r.simpleCellAddress)(this.sheet,this.start.col+t,this.start.row+n),this.width(),this.height())}},{key:"expandByColumns",value:function(e){this.end.col+=e}},{key:"moveToSheet",value:function(e){this.start.sheet=e,this.end.sheet=e}},{key:"removeSpan",value:function(e){e instanceof a.RowsSpan?this.removeRows(e.start,e.end):this.removeColumns(e.start,e.end)}},{key:"removeRows",value:function(e,t){if(!(e>this.end.row)){if(t<this.start.row){var n=t-e+1;return this.shiftByRows(-n)}e<=this.start.row&&(this.start.row=e),this.end.row-=Math.min(t,this.end.row)-e+1}}},{key:"removeColumns",value:function(e,t){if(!(e>this.end.col)){if(t<this.start.col){var n=t-e+1;return this.shiftByColumns(-n)}e<=this.start.col&&(this.start.col=e),this.end.col-=Math.min(t,this.end.col)-e+1}}},{key:"shouldBeRemoved",value:function(){return this.width()<=0||this.height()<=0}},{key:"rangeWithSameWidth",value:function(t,n){return e.spanFrom(Object(r.simpleCellAddress)(this.sheet,this.start.col,t),this.width(),n)}},{key:"rangeWithSameHeight",value:function(t,n){return e.spanFrom(Object(r.simpleCellAddress)(this.sheet,t,this.start.row),n,this.height())}},{key:"toString",value:function(){return"".concat(this.start.sheet,",").concat(this.start.col,",").concat(this.start.row,",").concat(this.end.col,",").concat(this.end.row)}},{key:"width",value:function(){return this.end.col-this.start.col+1}},{key:"height",value:function(){return this.end.row-this.start.row+1}},{key:"size",value:function(){return this.height()*this.width()}},{key:"arrayOfAddressesInRange",value:function(){for(var e=[],t=0;t<this.height();++t){e[t]=[];for(var n=0;n<this.width();++n){var o=Object(r.simpleCellAddress)(this.sheet,this.start.col+n,this.start.row+t);e[t].push(o)}}return e}},{key:"withStart",value:function(t){return new e(t,this.end)}},{key:"sameDimensionsAs",value:function(e){return this.width()===e.width()&&this.height()===e.height()}},{key:"sameAs",value:function(e){return Object(r.equalSimpleCellAddress)(this.start,e.start)&&Object(r.equalSimpleCellAddress)(this.end,e.end)}},{key:"addressesArrayMap",value:function(e,t){for(var n=[],o=this.start.row;o<=this.effectiveEndRow(e);){for(var i=this.start.col,a=[];i<=this.effectiveEndColumn(e);)a.push(t(Object(r.simpleCellAddress)(this.start.sheet,i,o))),i++;n.push(a),o++}return n}},{key:"addresses",value:function(e){for(var t=[],n=this.start.row,o=this.effectiveEndRow(e),i=this.effectiveEndColumn(e);n<=o;){for(var a=this.start.col;a<=i;)t.push(Object(r.simpleCellAddress)(this.start.sheet,a,n)),a++;n++}return t}},{key:"addressesWithDirection",value:regeneratorRuntime.mark((function e(t,n,o){var i,a,s,u,l,c,f,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t>0)){e.next=30;break}if(!(n>0)){e.next=16;break}i=this.effectiveEndRow(o);case 3:if(!(i>=this.start.row)){e.next=14;break}a=this.effectiveEndColumn(o);case 5:if(!(a>=this.start.col)){e.next=11;break}return e.next=8,Object(r.simpleCellAddress)(this.start.sheet,a,i);case 8:a-=1,e.next=5;break;case 11:i-=1,e.next=3;break;case 14:e.next=28;break;case 16:s=this.start.row;case 17:if(!(s<=this.effectiveEndRow(o))){e.next=28;break}u=this.effectiveEndColumn(o);case 19:if(!(u>=this.start.col)){e.next=25;break}return e.next=22,Object(r.simpleCellAddress)(this.start.sheet,u,s);case 22:u-=1,e.next=19;break;case 25:s+=1,e.next=17;break;case 28:e.next=57;break;case 30:if(!(n>0)){e.next=45;break}l=this.effectiveEndRow(o);case 32:if(!(l>=this.start.row)){e.next=43;break}c=this.start.col;case 34:if(!(c<=this.effectiveEndColumn(o))){e.next=40;break}return e.next=37,Object(r.simpleCellAddress)(this.start.sheet,c,l);case 37:c+=1,e.next=34;break;case 40:l-=1,e.next=32;break;case 43:e.next=57;break;case 45:f=this.start.row;case 46:if(!(f<=this.effectiveEndRow(o))){e.next=57;break}d=this.start.col;case 48:if(!(d<=this.effectiveEndColumn(o))){e.next=54;break}return e.next=51,Object(r.simpleCellAddress)(this.start.sheet,d,f);case 51:d+=1,e.next=48;break;case 54:f+=1,e.next=46;break;case 57:case"end":return e.stop()}}),e,this)}))},{key:"getAddress",value:function(e,t){if(e<0||t<0||t>this.height()-1||e>this.width()-1)throw Error("Index out of bound");return Object(r.simpleCellAddress)(this.start.sheet,this.start.col+e,this.start.row+t)}},{key:"exceedsSheetSizeLimits",value:function(e,t){return this.end.col>=e||this.end.row>=t}},{key:"effectiveEndColumn",value:function(e){return this.end.col}},{key:"effectiveEndRow",value:function(e){return this.end.row}},{key:"effectiveWidth",value:function(e){return this.width()}},{key:"effectiveHeight",value:function(e){return this.height()}}],[{key:"fromAst",value:function(t,n){return t.type===i.AstNodeType.CELL_RANGE?e.fromCellRange(t,n):t.type===i.AstNodeType.COLUMN_RANGE?T.fromColumnRange(t,n):C.fromRowRangeAst(t,n)}},{key:"fromAstOrUndef",value:function(t,n){try{return e.fromAst(t,n)}catch(e){return}}},{key:"fromCellRange",value:function(t,n){return new e(t.start.toSimpleCellAddress(n),t.end.toSimpleCellAddress(n))}},{key:"spanFrom",value:function(t,n,r){var o=e.spanFromOrUndef(t,n,r);if(void 0===o)throw new Error(y);return o}},{key:"spanFromOrUndef",value:function(t,n,o){if(!Number.isFinite(n)&&Number.isFinite(o)){if(0!==t.col)return;return new C(t.sheet,t.row,t.row+o-1)}if(!Number.isFinite(o)&&Number.isFinite(n)){if(0!==t.row)return;return new T(t.sheet,t.col,t.col+n-1)}if(Number.isFinite(o)&&Number.isFinite(n))return new e(t,Object(r.simpleCellAddress)(t.sheet,t.col+n-1,t.row+o-1))}},{key:"fromCoordinates",value:function(t,n,o,i,a){return new e(Object(r.simpleCellAddress)(t,n,o),Object(r.simpleCellAddress)(t,i,a))}}]),e}(),T=function(e){s(n,e);var t=l(n);function n(e,o,i){return d(this,n),t.call(this,Object(r.simpleCellAddress)(e,o,0),Object(r.simpleCellAddress)(e,i,Number.POSITIVE_INFINITY))}return p(n,[{key:"shouldBeRemoved",value:function(){return this.width()<=0}},{key:"shiftByRows",value:function(e){}},{key:"expandByRows",value:function(e){}},{key:"shifted",value:function(e,t){return new n(this.sheet,this.start.col+e,this.end.col+e)}},{key:"removeRows",value:function(e,t){}},{key:"rangeWithSameHeight",value:function(e,t){return new n(this.sheet,e,e+t-1)}},{key:"exceedsSheetSizeLimits",value:function(e,t){return this.end.col>=e}},{key:"effectiveEndRow",value:function(e){return this.effectiveHeight(e)-1}},{key:"effectiveHeight",value:function(e){return e.getSheetHeight(this.sheet)}}],[{key:"fromColumnRange",value:function(e,t){var r=e.start.toSimpleColumnAddress(t),i=e.end.toSimpleColumnAddress(t);if(r.sheet!==i.sheet)throw new o.SheetsNotEqual(r.sheet,i.sheet);return new n(r.sheet,r.col,i.col)}}]),n}(E),C=function(e){s(n,e);var t=l(n);function n(e,o,i){return d(this,n),t.call(this,Object(r.simpleCellAddress)(e,0,o),Object(r.simpleCellAddress)(e,Number.POSITIVE_INFINITY,i))}return p(n,[{key:"shouldBeRemoved",value:function(){return this.height()<=0}},{key:"shiftByColumns",value:function(e){}},{key:"expandByColumns",value:function(e){}},{key:"shifted",value:function(e,t){return new n(this.sheet,this.start.row+t,this.end.row+t)}},{key:"removeColumns",value:function(e,t){}},{key:"rangeWithSameWidth",value:function(e,t){return new n(this.sheet,e,e+t-1)}},{key:"exceedsSheetSizeLimits",value:function(e,t){return this.end.row>=t}},{key:"effectiveEndColumn",value:function(e){return this.effectiveWidth(e)-1}},{key:"effectiveWidth",value:function(e){return e.getSheetWidth(this.sheet)}}],[{key:"fromRowRangeAst",value:function(e,t){var r=e.start.toSimpleRowAddress(t),i=e.end.toSimpleRowAddress(t);if(r.sheet!==i.sheet)throw new o.SheetsNotEqual(r.sheet,i.sheet);return new n(r.sheet,r.row,i.row)}}]),n}(E)},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";t.__esModule=!0,t.toSingleLine=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var i=(0,r.arrayReduce)(e,(function(e,t,r){return e+t.replace(/\r?\n\s*/g,"")+(n[r]?n[r]:"")}),"");return i.trim()},n(33),n(62),n(108);var r=n(19)},function(e,t,n){var r=n(29),o=n(72),i=n(323),a=n(94),s=n(113),u=n(150);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),o=s.f,l=i(r),c={},f=0;l.length>f;)void 0!==(n=o(r,t=l[f++]))&&u(c,t,n);return c}})},function(e,t,n){var r=n(29),o=n(643);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){"use strict";t.__esModule=!0,t.error=function(){var e;(0,r.isDefined)(console)&&(e=console).error.apply(e,arguments)},t.info=function(){var e;(0,r.isDefined)(console)&&(e=console).info.apply(e,arguments)},t.log=function(){var e;(0,r.isDefined)(console)&&(e=console).log.apply(e,arguments)},t.warn=function(){var e;(0,r.isDefined)(console)&&(e=console).warn.apply(e,arguments)};var r=n(34)},function(e,t,n){var r=n(28).TypeError;e.exports=function(e){if(null==e)throw r("Can't call method on "+e);return e}},function(e,t,n){var r=n(28),o=n(90),i=r.Object;e.exports=function(e){return i(o(e))}},function(e,t,n){"use strict";t.__esModule=!0,t.KEY_CODES=void 0,t.isCtrlKey=function(e){var t=[];(0,o.isMacOS)()?t.push(i.COMMAND_LEFT,i.COMMAND_RIGHT,i.COMMAND_FIREFOX):t.push(i.CONTROL);return t.includes(e)},t.isCtrlMetaKey=function(e){return[i.CONTROL,i.COMMAND_LEFT,i.COMMAND_RIGHT,i.COMMAND_FIREFOX].includes(e)},t.isFunctionKey=function(e){return a.includes(e)},t.isKey=function(e,t){var n=t.split("|"),o=!1;return(0,r.arrayEach)(n,(function(t){if(e===i[t])return o=!0,!1})),o},t.isPrintableChar=function(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90},n(42),n(50),n(33),n(66);var r=n(19),o=n(106),i={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:(0,o.isFirefox)()?182:174,AUDIO_MUTE:(0,o.isFirefox)()?181:173,AUDIO_UP:(0,o.isFirefox)()?183:175,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,CONTROL:17,DELETE:46,END:35,ENTER:13,ESCAPE:27,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,HOME:36,INSERT:45,MEDIA_NEXT:176,MEDIA_PLAY_PAUSE:179,MEDIA_PREV:177,MEDIA_STOP:178,NULL:0,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PERIOD:190,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,A:65,C:67,D:68,F:70,L:76,O:79,P:80,S:83,V:86,X:88,Y:89,Z:90};t.KEY_CODES=i;var a=[i.ALT,i.ARROW_DOWN,i.ARROW_LEFT,i.ARROW_RIGHT,i.ARROW_UP,i.AUDIO_DOWN,i.AUDIO_MUTE,i.AUDIO_UP,i.BACKSPACE,i.CAPS_LOCK,i.DELETE,i.END,i.ENTER,i.ESCAPE,i.F1,i.F2,i.F3,i.F4,i.F5,i.F6,i.F7,i.F8,i.F9,i.F10,i.F11,i.F12,i.F13,i.F14,i.F15,i.F16,i.F17,i.F18,i.F19,i.HOME,i.INSERT,i.MEDIA_NEXT,i.MEDIA_PLAY_PAUSE,i.MEDIA_PREV,i.MEDIA_STOP,i.NULL,i.NUM_LOCK,i.PAGE_DOWN,i.PAGE_UP,i.PAUSE,i.SCROLL_LOCK,i.SHIFT,i.TAB]},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(14),o=n(68),i={_localHooks:Object.create(null),addLocalHook:function(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks:function(e,t,n,r,i,a,s){if(this._localHooks[e])for(var u=this._localHooks[e].length,l=0;l<u;l++)(0,o.fastCall)(this._localHooks[e][l],this,t,n,r,i,a,s)},clearLocalHooks:function(){return this._localHooks={},this}};(0,r.defineGetter)(i,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});var a=i;t.default=a},function(e,t,n){var r=n(164),o=n(90);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(72),o=n(28),i=n(35),a=n(203),s=n(253),u=n(123),l=n(82).f,c=n(148).f,f=n(122),d=n(245),h=n(74),p=n(256),m=n(257),y=n(104),v=n(41),g=n(73),E=n(114).enforce,T=n(343),C=n(59),b=n(347),w=n(348),R=C("match"),O=o.RegExp,S=O.prototype,A=o.SyntaxError,N=i(p),M=i(S.exec),k=i("".charAt),_=i("".replace),I=i("".indexOf),P=i("".slice),x=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,D=/a/g,L=/a/g,F=new O(D)!==D,j=m.MISSED_STICKY,U=m.UNSUPPORTED_Y,H=r&&(!F||j||b||w||v((function(){return L[R]=!1,O(D)!=D||O(L)==L||"/a/i"!=O(D,"i")})));if(a("RegExp",H)){for(var V=function(e,t){var n,r,o,i,a,l,c=f(S,this),p=d(e),m=void 0===t,y=[],v=e;if(!c&&p&&m&&e.constructor===V)return e;if((p||f(S,e))&&(e=e.source,m&&(t="flags"in v?v.flags:N(v))),e=void 0===e?"":h(e),t=void 0===t?"":h(t),v=e,b&&"dotAll"in D&&(r=!!t&&I(t,"s")>-1)&&(t=_(t,/s/g,"")),n=t,j&&"sticky"in D&&(o=!!t&&I(t,"y")>-1)&&U&&(t=_(t,/y/g,"")),w&&(e=(i=function(e){for(var t,n=e.length,r=0,o="",i=[],a={},s=!1,u=!1,l=0,c="";r<=n;r++){if("\\"===(t=k(e,r)))t+=k(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:M(x,P(e,r+1))&&(r+=2,u=!0),o+=t,l++;continue;case">"===t&&u:if(""===c||g(a,c))throw new A("Invalid capture group name");a[c]=!0,i[i.length]=[c,l],u=!1,c="";continue}u?c+=t:o+=t}return[o,i]}(e))[0],y=i[1]),a=s(O(e,t),c?this:S,V),(r||o||y.length)&&(l=E(a),r&&(l.dotAll=!0,l.raw=V(function(e){for(var t,n=e.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(t=k(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+k(e,++r);return o}(e),n)),o&&(l.sticky=!0),y.length&&(l.groups=y)),e!==v)try{u(a,"source",""===v?"(?:)":v)}catch(e){}return a},B=function(e){e in V||l(V,e,{configurable:!0,get:function(){return O[e]},set:function(t){O[e]=t}})},W=c(O),Y=0;W.length>Y;)B(W[Y++]);S.constructor=V,V.prototype=S,y(o,"RegExp",V)}T("RegExp")},function(e,t,n){"use strict";n.r(t),n.d(t,"tokenLabel",(function(){return a})),n.d(t,"tokenName",(function(){return s})),n.d(t,"hasTokenLabel",(function(){return u})),n.d(t,"createToken",(function(){return l})),n.d(t,"EOF",(function(){return c})),n.d(t,"createTokenInstance",(function(){return f})),n.d(t,"tokenMatcher",(function(){return d}));var r=n(46),o=n(152),i=n(177);function a(e){return u(e)?e.LABEL:e.name}function s(e){return e.name}function u(e){return Object(r.isString)(e.LABEL)&&""!==e.LABEL}function l(e){return function(e){var t=e.pattern,n={};n.name=e.name,Object(r.isUndefined)(t)||(n.PATTERN=t);if(Object(r.has)(e,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";Object(r.has)(e,"categories")&&(n.CATEGORIES=e.categories);Object(i.augmentTokenTypes)([n]),Object(r.has)(e,"label")&&(n.LABEL=e.label);Object(r.has)(e,"group")&&(n.GROUP=e.group);Object(r.has)(e,"pop_mode")&&(n.POP_MODE=e.pop_mode);Object(r.has)(e,"push_mode")&&(n.PUSH_MODE=e.push_mode);Object(r.has)(e,"longer_alt")&&(n.LONGER_ALT=e.longer_alt);Object(r.has)(e,"line_breaks")&&(n.LINE_BREAKS=e.line_breaks);Object(r.has)(e,"start_chars_hint")&&(n.START_CHARS_HINT=e.start_chars_hint);return n}(e)}var c=l({name:"EOF",pattern:o.Lexer.NA});function f(e,t,n,r,o,i,a,s){return{image:t,startOffset:n,endOffset:r,startLine:o,endLine:i,startColumn:a,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function d(e,t){return Object(i.tokenStructuredMatcher)(e,t)}Object(i.augmentTokenTypes)([c])},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.equalsIgnoreCase=function(){for(var e=[],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n.length;for(;o;){o-=1;var a=(0,i.stringify)(n[o]).toLowerCase();-1===e.indexOf(a)&&e.push(a)}return 1===e.length},t.isPercentValue=function(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)},t.randomString=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()},t.sanitize=a,t.stripTags=function(e){return a("".concat(e),{ALLOWED_TAGS:[]})},t.substitute=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"".concat(e).replace(/(?:\\)?\[([^[\]]+)]/g,(function(e,n){return"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[n]?"":t[n]}))},t.toUpperCaseFirst=function(e){return e[0].toUpperCase()+e.substr(1)},n(31),n(0),n(65),n(33),n(62);var o=r(n(428)),i=n(34);function a(e,t){return o.default.sanitize(e,t)}},function(e,t,n){var r=n(133);e.exports=function(e){return r(e.length)}},function(e,t,n){"use strict";n.r(t),n.d(t,"cellAddressFromString",(function(){return m})),n.d(t,"columnAddressFromString",(function(){return y})),n.d(t,"rowAddressFromString",(function(){return v})),n.d(t,"simpleCellAddressFromString",(function(){return g})),n.d(t,"simpleCellRangeFromString",(function(){return E})),n.d(t,"simpleCellAddressToString",(function(){return T})),n.d(t,"simpleCellRangeToString",(function(){return C})),n.d(t,"columnIndexToLabel",(function(){return w})),n.d(t,"sheetIndexToString",(function(){return R}));n(95),n(33),n(65),n(20),n(51),n(66),n(100),n(62),n(8),n(9),n(0),n(10),n(3),n(2),n(4),n(12),n(24),n(21);var r=n(84),o=n(22),i=n(212),a=n(350),s=n(176),u=n(357);function l(e,t){return function(e){if(Array.isArray(e))return e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=new RegExp("^(".concat(s.sheetNameRegexp,")?(\\").concat(s.ABSOLUTE_OPERATOR,"?)([A-Za-z]+)(\\").concat(s.ABSOLUTE_OPERATOR,"?)([0-9]+)$")),d=new RegExp("^(".concat(s.sheetNameRegexp,")?(\\").concat(s.ABSOLUTE_OPERATOR,"?)([A-Za-z]+)$")),h=new RegExp("^(".concat(s.sheetNameRegexp,")?(\\").concat(s.ABSOLUTE_OPERATOR,"?)([0-9]+)$")),p=new RegExp("^".concat(s.simpleSheetName,"$")),m=function(e,t,n){var r=f.exec(t),o=b(r[6]),a=O(r,e);if(void 0!==a){null===a&&(a=void 0);var u=Number(r[8])-1;return r[5]===s.ABSOLUTE_OPERATOR&&r[7]===s.ABSOLUTE_OPERATOR?i.CellAddress.absolute(o,u,a):r[5]===s.ABSOLUTE_OPERATOR?i.CellAddress.absoluteCol(o,u-n.row,a):r[7]===s.ABSOLUTE_OPERATOR?i.CellAddress.absoluteRow(o-n.col,u,a):i.CellAddress.relative(u-n.row,o-n.col,a)}},y=function(e,t,n){var r=d.exec(t),o=O(r,e);if(void 0!==o){null===o&&(o=void 0);var i=b(r[6]);return r[5]===s.ABSOLUTE_OPERATOR?a.ColumnAddress.absolute(i,o):a.ColumnAddress.relative(i-n.col,o)}},v=function(e,t,n){var r=h.exec(t),o=O(r,e);if(void 0!==o){null===o&&(o=void 0);var i=Number(r[6])-1;return r[5]===s.ABSOLUTE_OPERATOR?u.RowAddress.absolute(i,o):u.RowAddress.relative(i-n.row,o)}},g=function(e,t,n){var r=f.exec(t),i=b(r[6]),a=O(r,e);if(void 0!==a){null===a&&(a=n);var s=Number(r[8])-1;return Object(o.simpleCellAddress)(a,i,s)}},E=function(e,t,n){var o=t.split(s.RANGE_OPERATOR);if(2===o.length){var i=l(o,2),a=i[0],u=i[1],c=g(e,a,n);if(void 0!==c){var f=g(e,u,c.sheet);if(void 0!==f&&c.sheet===f.sheet)return Object(r.simpleCellRange)(c,f)}}},T=function(e,t,n){var r=w(t.col),o=R(t.sheet,e);if(void 0!==o)return n!==t.sheet?"".concat(o,"!").concat(r).concat(t.row+1):"".concat(r).concat(t.row+1)},C=function(e,t,n){var r=T(e,t.start,n),o=T(e,t.end,t.start.sheet);return void 0===r||void 0===o?void 0:"".concat(r).concat(s.RANGE_OPERATOR).concat(o)};function b(e){return 1===e.length?e.toUpperCase().charCodeAt(0)-65:e.split("").reduce((function(e,t){return 26*e+(t.toUpperCase().charCodeAt(0)-64)}),0)-1}function w(e){for(var t="";e>=0;)t=String.fromCharCode(e%26+97)+t,e=Math.floor(e/26)-1;return t.toUpperCase()}function R(e,t){var n=t(e);if(void 0!==n)return p.test(n)?n:(n=n.replace(/'/g,"''"),"'".concat(n,"'"))}function O(e,t){var n,r=null!==(n=e[3])&&void 0!==n?n:e[2];return r?t(r=r.replace(/''/g,"'")):null}},function(e,t,n){"use strict";var r=n(29),o=n(648).left,i=n(151),a=n(165),s=n(349);r({target:"Array",proto:!0,forced:!i("reduce")||!s&&a>79&&a<83},{reduce:function(e){var t=arguments.length;return o(this,e,t,t>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";n.r(t),n.d(t,"parsingError",(function(){return s})),n.d(t,"ParsingErrorType",(function(){return r})),n.d(t,"AstNodeType",(function(){return o})),n.d(t,"RangeSheetReferenceType",(function(){return i})),n.d(t,"buildEmptyArgAst",(function(){return u})),n.d(t,"buildNumberAst",(function(){return l})),n.d(t,"buildStringAst",(function(){return c})),n.d(t,"buildCellReferenceAst",(function(){return f})),n.d(t,"buildCellRangeAst",(function(){return d})),n.d(t,"buildColumnRangeAst",(function(){return h})),n.d(t,"buildRowRangeAst",(function(){return p})),n.d(t,"buildConcatenateOpAst",(function(){return m})),n.d(t,"buildEqualsOpAst",(function(){return y})),n.d(t,"buildNotEqualOpAst",(function(){return v})),n.d(t,"buildGreaterThanOpAst",(function(){return g})),n.d(t,"buildLessThanOpAst",(function(){return E})),n.d(t,"buildGreaterThanOrEqualOpAst",(function(){return T})),n.d(t,"buildLessThanOrEqualOpAst",(function(){return C})),n.d(t,"buildPlusOpAst",(function(){return b})),n.d(t,"buildMinusOpAst",(function(){return w})),n.d(t,"buildTimesOpAst",(function(){return R})),n.d(t,"buildDivOpAst",(function(){return O})),n.d(t,"buildPowerOpAst",(function(){return S})),n.d(t,"buildMinusUnaryOpAst",(function(){return A})),n.d(t,"buildPlusUnaryOpAst",(function(){return N})),n.d(t,"buildPercentOpAst",(function(){return M})),n.d(t,"buildProcedureAst",(function(){return k})),n.d(t,"buildArrayAst",(function(){return _})),n.d(t,"buildNamedExpressionAst",(function(){return I})),n.d(t,"buildParenthesisAst",(function(){return P})),n.d(t,"buildCellErrorAst",(function(){return x})),n.d(t,"buildErrorWithRawInputAst",(function(){return D})),n.d(t,"buildParsingErrorAst",(function(){return L})),n.d(t,"imageWithWhitespace",(function(){return j}));n(12);var r,o,i,a=n(22),s=function(e,t){return{type:e,message:t}};!function(e){e.LexingError="LexingError",e.ParserError="ParsingError",e.StaticOffsetError="StaticOffsetError",e.StaticOffsetOutOfRangeError="StaticOffsetOutOfRangeError",e.RangeOffsetNotAllowed="RangeOffsetNotAllowed"}(r||(r={})),function(e){e.EMPTY="EMPTY",e.NUMBER="NUMBER",e.STRING="STRING",e.MINUS_UNARY_OP="MINUS_UNARY_OP",e.PLUS_UNARY_OP="PLUS_UNARY_OP",e.PERCENT_OP="PERCENT_OP",e.CONCATENATE_OP="CONCATENATE_OP",e.EQUALS_OP="EQUALS_OP",e.NOT_EQUAL_OP="NOT_EQUAL_OP",e.GREATER_THAN_OP="GREATER_THAN_OP",e.LESS_THAN_OP="LESS_THAN_OP",e.GREATER_THAN_OR_EQUAL_OP="GREATER_THAN_OR_EQUAL_OP",e.LESS_THAN_OR_EQUAL_OP="LESS_THAN_OR_EQUAL_OP",e.PLUS_OP="PLUS_OP",e.MINUS_OP="MINUS_OP",e.TIMES_OP="TIMES_OP",e.DIV_OP="DIV_OP",e.POWER_OP="POWER_OP",e.FUNCTION_CALL="FUNCTION_CALL",e.NAMED_EXPRESSION="NAMED_EXPRESSION",e.PARENTHESIS="PARENTHESES",e.CELL_REFERENCE="CELL_REFERENCE",e.CELL_RANGE="CELL_RANGE",e.COLUMN_RANGE="COLUMN_RANGE",e.ROW_RANGE="ROW_RANGE",e.ERROR="ERROR",e.ERROR_WITH_RAW_INPUT="ERROR_WITH_RAW_INPUT",e.ARRAY="ARRAY"}(o||(o={})),function(e){e[e.RELATIVE=0]="RELATIVE",e[e.START_ABSOLUTE=1]="START_ABSOLUTE",e[e.BOTH_ABSOLUTE=2]="BOTH_ABSOLUTE"}(i||(i={}));var u=function(e){return{type:o.EMPTY,leadingWhitespace:null==e?void 0:e.image}},l=function(e,t){return{type:o.NUMBER,value:e,leadingWhitespace:null==t?void 0:t.image}},c=function(e){var t;return{type:o.STRING,value:e.image.slice(1,-1),leadingWhitespace:null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image}},f=function(e,t){return{type:o.CELL_REFERENCE,reference:e,leadingWhitespace:null==t?void 0:t.image}},d=function(e,t,n,r){return F(e,t,n),{type:o.CELL_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:r}},h=function(e,t,n,r){return F(e,t,n),{type:o.COLUMN_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:null==r?void 0:r.image}},p=function(e,t,n,r){return F(e,t,n),{type:o.ROW_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:null==r?void 0:r.image}},m=function(e,t,n){return{type:o.CONCATENATE_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},y=function(e,t,n){return{type:o.EQUALS_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},v=function(e,t,n){return{type:o.NOT_EQUAL_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},g=function(e,t,n){return{type:o.GREATER_THAN_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},E=function(e,t,n){return{type:o.LESS_THAN_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},T=function(e,t,n){return{type:o.GREATER_THAN_OR_EQUAL_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},C=function(e,t,n){return{type:o.LESS_THAN_OR_EQUAL_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},b=function(e,t,n){return{type:o.PLUS_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},w=function(e,t,n){return{type:o.MINUS_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},R=function(e,t,n){return{type:o.TIMES_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},O=function(e,t,n){return{type:o.DIV_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},S=function(e,t,n){return{type:o.POWER_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},A=function(e,t){return{type:o.MINUS_UNARY_OP,value:e,leadingWhitespace:null==t?void 0:t.image}},N=function(e,t){return{type:o.PLUS_UNARY_OP,value:e,leadingWhitespace:null==t?void 0:t.image}},M=function(e,t){return{type:o.PERCENT_OP,value:e,leadingWhitespace:null==t?void 0:t.image}},k=function(e,t,n,r){return{type:o.FUNCTION_CALL,procedureName:e,args:t,leadingWhitespace:null==n?void 0:n.image,internalWhitespace:null==r?void 0:r.image}},_=function(e,t,n){return{type:o.ARRAY,args:e,leadingWhitespace:null==t?void 0:t.image,internalWhitespace:null==n?void 0:n.image}},I=function(e,t){return{type:o.NAMED_EXPRESSION,expressionName:e,leadingWhitespace:null==t?void 0:t.image}},P=function(e,t,n){return{type:o.PARENTHESIS,expression:e,leadingWhitespace:null==t?void 0:t.image,internalWhitespace:null==n?void 0:n.image}},x=function(e,t){return{type:o.ERROR,error:e,leadingWhitespace:null==t?void 0:t.image}},D=function(e,t,n){return{type:o.ERROR_WITH_RAW_INPUT,error:t,rawInput:e,leadingWhitespace:null==n?void 0:n.image}},L=function(){return{type:o.ERROR,error:a.CellError.parsingError()}};function F(e,t,n){if(void 0!==e.sheet&&void 0===t.sheet||void 0===e.sheet&&void 0!==t.sheet)throw new Error("Start address inconsistent with end address");if(void 0===e.sheet&&n!==i.RELATIVE||void 0!==e.sheet&&n===i.RELATIVE)throw new Error("Sheet address inconsistent with sheet reference type")}function j(e,t){return(null!=t?t:"")+e}},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function o(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function l(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function d(e,t){for(var n in t)f(t,n)&&(e[n]=t[n]);return f(t,"toString")&&(e.toString=t.toString),f(t,"valueOf")&&(e.valueOf=t.valueOf),e}function h(e,t,n,r){return Rt(e,t,n,r,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function m(e){if(null==e._isValid){var t=p(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function y(e){var t=h(NaN);return null!=e?d(p(t),e):p(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var v=o.momentProperties=[];function g(e,t){var n,r,o;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=p(t)),s(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)s(o=t[r=v[n]])||(e[r]=o);return e}var E=!1;function T(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===E&&(E=!0,o.updateOffset(this),E=!1)}function C(e){return e instanceof T||null!=e&&null!=e._isAMomentObject}function b(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function w(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=b(t)),n}function R(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&w(e[r])!==w(t[r]))&&a++;return a+i}function O(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function S(e,t){var n=!0;return d((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){for(var r,i=[],a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(var s in r+="\n["+a+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[a];i.push(r)}O(e+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var A,N={};function M(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),N[e]||(O(t),N[e]=!0)}function k(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function _(e,t){var n,r=d({},e);for(n in t)f(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},d(r[n],e[n]),d(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)f(e,n)&&!f(t,n)&&a(e[n])&&(r[n]=d({},r[n]));return r}function I(e){null!=e&&this.set(e)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,A=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)f(e,t)&&n.push(t);return n};var P={};function x(e,t){var n=e.toLowerCase();P[n]=P[n+"s"]=P[t]=e}function D(e){return"string"==typeof e?P[e]||P[e.toLowerCase()]:void 0}function L(e){var t,n,r={};for(n in e)f(e,n)&&(t=D(n))&&(r[t]=e[n]);return r}var F={};function j(e,t){F[e]=t}function U(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,V=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},W={};function Y(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(W[e]=o),t&&(W[t[0]]=function(){return U(o.apply(this,arguments),t[1],t[2])}),n&&(W[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function G(e,t){return e.isValid()?(t=z(t,e.localeData()),B[t]=B[t]||function(e){var t,n,r,o=e.match(H);for(t=0,n=o.length;t<n;t++)W[o[t]]?o[t]=W[o[t]]:o[t]=(r=o[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,i="";for(r=0;r<n;r++)i+=k(o[r])?o[r].call(t,e):o[r];return i}}(t),B[t](e)):e.localeData().invalidDate()}function z(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(V.lastIndex=0;n>=0&&V.test(e);)e=e.replace(V,r),V.lastIndex=0,n-=1;return e}var K=/\d/,X=/\d\d/,q=/\d{3}/,Q=/\d{4}/,$=/[+-]?\d{6}/,Z=/\d\d?/,J=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,oe=/\d+/,ie=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,ue=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,le={};function ce(e,t,n){le[e]=k(t)?t:function(e,r){return e&&n?n:t}}function fe(e,t){return f(le,e)?le[e](t._strict,t._locale):new RegExp(de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function pe(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),u(t)&&(r=function(e,n){n[t]=w(e)}),n=0;n<e.length;n++)he[e[n]]=r}function me(e,t){pe(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function ye(e,t,n){null!=t&&f(he,e)&&he[e](t,n._a,n,e)}function ve(e){return ge(e)?366:365}function ge(e){return e%4==0&&e%100!=0||e%400==0}Y("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),Y(0,["YY",2],0,(function(){return this.year()%100})),Y(0,["YYYY",4],0,"year"),Y(0,["YYYYY",5],0,"year"),Y(0,["YYYYYY",6,!0],0,"year"),x("year","y"),j("year",1),ce("Y",ie),ce("YY",Z,X),ce("YYYY",ne,Q),ce("YYYYY",re,$),ce("YYYYYY",re,$),pe(["YYYYY","YYYYYY"],0),pe("YYYY",(function(e,t){t[0]=2===e.length?o.parseTwoDigitYear(e):w(e)})),pe("YY",(function(e,t){t[0]=o.parseTwoDigitYear(e)})),pe("Y",(function(e,t){t[0]=parseInt(e,10)})),o.parseTwoDigitYear=function(e){return w(e)+(w(e)>68?1900:2e3)};var Ee,Te=Ce("FullYear",!0);function Ce(e,t){return function(n){return null!=n?(we(this,e,n),o.updateOffset(this,t),this):be(this,e)}}function be(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function we(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ge(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Re(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Re(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?ge(e)?29:28:31-r%7%2}Ee=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},Y("M",["MM",2],"Mo",(function(){return this.month()+1})),Y("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),Y("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),x("month","M"),j("month",8),ce("M",Z),ce("MM",Z,X),ce("MMM",(function(e,t){return t.monthsShortRegex(e)})),ce("MMMM",(function(e,t){return t.monthsRegex(e)})),pe(["M","MM"],(function(e,t){t[1]=w(e)-1})),pe(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[1]=o:p(n).invalidMonth=e}));var Oe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Se="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ae="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ne(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=h([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=Ee.call(this._shortMonthsParse,a))?o:null:-1!==(o=Ee.call(this._longMonthsParse,a))?o:null:"MMM"===t?-1!==(o=Ee.call(this._shortMonthsParse,a))||-1!==(o=Ee.call(this._longMonthsParse,a))?o:null:-1!==(o=Ee.call(this._longMonthsParse,a))||-1!==(o=Ee.call(this._shortMonthsParse,a))?o:null}function Me(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=w(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Re(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ke(e){return null!=e?(Me(this,e),o.updateOffset(this,!0),this):be(this,"Month")}var _e=ue,Ie=ue;function Pe(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],i=[];for(t=0;t<12;t++)n=h([2e3,t]),r.push(this.monthsShort(n,"")),o.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),o.sort(e),i.sort(e),t=0;t<12;t++)r[t]=de(r[t]),o[t]=de(o[t]);for(t=0;t<24;t++)i[t]=de(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function xe(e,t,n,r,o,i,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,i,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,i,a),s}function De(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Le(e,t,n){var r=7+t-n;return-(7+De(e,0,r).getUTCDay()-t)%7+r-1}function Fe(e,t,n,r,o){var i,a,s=1+7*(t-1)+(7+n-r)%7+Le(e,r,o);return s<=0?a=ve(i=e-1)+s:s>ve(e)?(i=e+1,a=s-ve(e)):(i=e,a=s),{year:i,dayOfYear:a}}function je(e,t,n){var r,o,i=Le(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?r=a+Ue(o=e.year()-1,t,n):a>Ue(e.year(),t,n)?(r=a-Ue(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function Ue(e,t,n){var r=Le(e,t,n),o=Le(e+1,t,n);return(ve(e)-r+o)/7}function He(e,t){return e.slice(t,7).concat(e.slice(0,t))}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),x("week","w"),x("isoWeek","W"),j("week",5),j("isoWeek",5),ce("w",Z),ce("ww",Z,X),ce("W",Z),ce("WW",Z,X),me(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=w(e)})),Y("d",0,"do","day"),Y("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),Y("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),Y("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),x("day","d"),x("weekday","e"),x("isoWeekday","E"),j("day",11),j("weekday",11),j("isoWeekday",11),ce("d",Z),ce("e",Z),ce("E",Z),ce("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ce("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ce("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:p(n).invalidWeekday=e})),me(["d","e","E"],(function(e,t,n,r){t[r]=w(e)}));var Ve="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Be="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),We="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Ye(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Ee.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=Ee.call(this._weekdaysParse,a))||-1!==(o=Ee.call(this._shortWeekdaysParse,a))||-1!==(o=Ee.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,a))||-1!==(o=Ee.call(this._weekdaysParse,a))||-1!==(o=Ee.call(this._minWeekdaysParse,a))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,a))||-1!==(o=Ee.call(this._weekdaysParse,a))||-1!==(o=Ee.call(this._shortWeekdaysParse,a))?o:null}var Ge=ue,ze=ue,Ke=ue;function Xe(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],u=[],l=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),i=this.weekdays(n,""),a.push(r),s.push(o),u.push(i),l.push(r),l.push(o),l.push(i);for(a.sort(e),s.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)s[t]=de(s[t]),u[t]=de(u[t]),l[t]=de(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function qe(){return this.hours()%12||12}function Qe(e,t){Y(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function $e(e,t){return t._meridiemParse}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,qe),Y("k",["kk",2],0,(function(){return this.hours()||24})),Y("hmm",0,0,(function(){return""+qe.apply(this)+U(this.minutes(),2)})),Y("hmmss",0,0,(function(){return""+qe.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)})),Y("Hmm",0,0,(function(){return""+this.hours()+U(this.minutes(),2)})),Y("Hmmss",0,0,(function(){return""+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)})),Qe("a",!0),Qe("A",!1),x("hour","h"),j("hour",13),ce("a",$e),ce("A",$e),ce("H",Z),ce("h",Z),ce("k",Z),ce("HH",Z,X),ce("hh",Z,X),ce("kk",Z,X),ce("hmm",J),ce("hmmss",ee),ce("Hmm",J),ce("Hmmss",ee),pe(["H","HH"],3),pe(["k","kk"],(function(e,t,n){var r=w(e);t[3]=24===r?0:r})),pe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),pe(["h","hh"],(function(e,t,n){t[3]=w(e),p(n).bigHour=!0})),pe("hmm",(function(e,t,n){var r=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r)),p(n).bigHour=!0})),pe("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r,2)),t[5]=w(e.substr(o)),p(n).bigHour=!0})),pe("Hmm",(function(e,t,n){var r=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r))})),pe("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r,2)),t[5]=w(e.substr(o))}));var Ze,Je=Ce("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Se,monthsShort:Ae,week:{dow:0,doy:6},weekdays:Ve,weekdaysMin:We,weekdaysShort:Be,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function ot(t){var r=null;if(!tt[t]&&void 0!==e&&e&&e.exports)try{r=Ze._abbr,n(730)("./"+t),it(r)}catch(e){}return tt[t]}function it(e,t){var n;return e&&((n=s(t)?st(e):at(e,t))?Ze=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ze._abbr}function at(e,t){if(null!==t){var n,r=et;if(t.abbr=e,null!=tt[e])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])r=tt[t.parentLocale]._config;else{if(null==(n=ot(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return tt[e]=new I(_(r,t)),nt[e]&&nt[e].forEach((function(e){at(e.name,e.config)})),it(e),tt[e]}return delete tt[e],null}function st(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ze;if(!i(e)){if(t=ot(e))return t;e=[e]}return function(e){for(var t,n,r,o,i=0;i<e.length;){for(t=(o=rt(e[i]).split("-")).length,n=(n=rt(e[i+1]))?n.split("-"):null;t>0;){if(r=ot(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&R(o,n,!0)>=t-1)break;t--}i++}return Ze}(e)}function ut(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Re(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,p(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),p(e)._overflowWeeks&&-1===t&&(t=7),p(e)._overflowWeekday&&-1===t&&(t=8),p(e).overflow=t),e}function lt(e,t,n){return null!=e?e:null!=t?t:n}function ct(e){var t,n,r,i,a,s=[];if(!e._d){for(r=function(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,o,i,a,s,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,a=4,n=lt(t.GG,e._a[0],je(Ot(),1,4).year),r=lt(t.W,1),((o=lt(t.E,1))<1||o>7)&&(u=!0);else{i=e._locale._week.dow,a=e._locale._week.doy;var l=je(Ot(),i,a);n=lt(t.gg,e._a[0],l.year),r=lt(t.w,l.week),null!=t.d?((o=t.d)<0||o>6)&&(u=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(u=!0)):o=i}r<1||r>Ue(n,i,a)?p(e)._overflowWeeks=!0:null!=u?p(e)._overflowWeekday=!0:(s=Fe(n,r,o,i,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=lt(e._a[0],r[0]),(e._dayOfYear>ve(a)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=De(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?De:xe).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(p(e).weekdayMismatch=!0)}}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],mt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],yt=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,r,o,i,a,s=e._i,u=ft.exec(s)||dt.exec(s);if(u){for(p(e).iso=!0,t=0,n=pt.length;t<n;t++)if(pt[t][1].exec(u[1])){o=pt[t][0],r=!1!==pt[t][2];break}if(null==o)return void(e._isValid=!1);if(u[3]){for(t=0,n=mt.length;t<n;t++)if(mt[t][1].exec(u[3])){i=(u[2]||" ")+mt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(u[4]){if(!ht.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=o+(i||"")+(a||""),bt(e)}else e._isValid=!1}var gt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Et(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var Tt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ct(e){var t,n,r,o,i,a,s,u=gt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){var l=(t=u[4],n=u[3],r=u[2],o=u[5],i=u[6],a=u[7],s=[Et(t),Ae.indexOf(n),parseInt(r,10),parseInt(o,10),parseInt(i,10)],a&&s.push(parseInt(a,10)),s);if(!function(e,t,n){return!e||Be.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(p(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],l,e))return;e._a=l,e._tzm=function(e,t,n){if(e)return Tt[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}(u[8],u[9],u[10]),e._d=De.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0}else e._isValid=!1}function bt(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],p(e).empty=!0;var t,n,r,i,a,s=""+e._i,u=s.length,l=0;for(r=z(e._f,e._locale).match(H)||[],t=0;t<r.length;t++)i=r[t],(n=(s.match(fe(i,e))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&p(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),l+=n.length),W[i]?(n?p(e).empty=!1:p(e).unusedTokens.push(i),ye(i,n,e)):e._strict&&!n&&p(e).unusedTokens.push(i);p(e).charsLeftOver=u-l,s.length>0&&p(e).unusedInput.push(s),e._a[3]<=12&&!0===p(e).bigHour&&e._a[3]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),ct(e),ut(e)}else Ct(e);else vt(e)}function wt(e){var t=e._i,n=e._f;return e._locale=e._locale||st(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),C(t)?new T(ut(t)):(l(t)?e._d=t:i(n)?function(e){var t,n,r,o,i;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<e._f.length;o++)i=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],bt(t),m(t)&&(i+=p(t).charsLeftOver,i+=10*p(t).unusedTokens.length,p(t).score=i,(null==r||i<r)&&(r=i,n=t));d(e,n||t)}(e):n?bt(e):function(e){var t=e._i;s(t)?e._d=new Date(o.now()):l(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=yt.exec(e._i);null===t?(vt(e),!1===e._isValid&&(delete e._isValid,Ct(e),!1===e._isValid&&(delete e._isValid,o.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=c(t.slice(0),(function(e){return parseInt(e,10)})),ct(e)):a(t)?function(e){if(!e._d){var t=L(e._i);e._a=c([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),ct(e)}}(e):u(t)?e._d=new Date(t):o.createFromInputFallback(e)}(e),m(e)||(e._d=null),e))}function Rt(e,t,n,r,o){var s,u={};return!0!==n&&!1!==n||(r=n,n=void 0),(a(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||i(e)&&0===e.length)&&(e=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=o,u._l=n,u._i=e,u._f=t,u._strict=r,(s=new T(ut(wt(u))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Ot(e,t,n,r){return Rt(e,t,n,r,!1)}o.createFromInputFallback=S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var St=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()})),At=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()}));function Nt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Ot();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Mt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function kt(e){var t=L(e),n=t.year||0,r=t.quarter||0,o=t.month||0,i=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,u=t.minute||0,l=t.second||0,c=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ee.call(Mt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<Mt.length;++r)if(e[Mt[r]]){if(n)return!1;parseFloat(e[Mt[r]])!==w(e[Mt[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*l+6e4*u+1e3*s*60*60,this._days=+a+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=st(),this._bubble()}function _t(e){return e instanceof kt}function It(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Pt(e,t){Y(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+U(~~(e/60),2)+t+U(~~e%60,2)}))}Pt("Z",":"),Pt("ZZ",""),ce("Z",se),ce("ZZ",se),pe(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Dt(se,e)}));var xt=/([\+\-]|\d\d)/gi;function Dt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(xt)||["-",0,0],o=60*r[1]+w(r[2]);return 0===o?0:"+"===r[0]?o:-o}function Lt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(C(e)||l(e)?e.valueOf():Ot(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),o.updateOffset(n,!1),n):Ot(e).local()}function Ft(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function jt(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Ut=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ht=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Vt(e,t){var n,r,o,i,a,s,l=e,c=null;return _t(e)?l={ms:e._milliseconds,d:e._days,M:e._months}:u(e)?(l={},t?l[t]=e:l.milliseconds=e):(c=Ut.exec(e))?(n="-"===c[1]?-1:1,l={y:0,d:w(c[2])*n,h:w(c[3])*n,m:w(c[4])*n,s:w(c[5])*n,ms:w(It(1e3*c[6]))*n}):(c=Ht.exec(e))?(n="-"===c[1]?-1:1,l={y:Bt(c[2],n),M:Bt(c[3],n),w:Bt(c[4],n),d:Bt(c[5],n),h:Bt(c[6],n),m:Bt(c[7],n),s:Bt(c[8],n)}):null==l?l={}:"object"==typeof l&&("from"in l||"to"in l)&&(i=Ot(l.from),a=Ot(l.to),o=i.isValid()&&a.isValid()?(a=Lt(a,i),i.isBefore(a)?s=Wt(i,a):((s=Wt(a,i)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(l={}).ms=o.milliseconds,l.M=o.months),r=new kt(l),_t(e)&&f(e,"_locale")&&(r._locale=e._locale),r}function Bt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Wt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Yt(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(M(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),Gt(this,Vt(n="string"==typeof n?+n:n,r),e),this}}function Gt(e,t,n,r){var i=t._milliseconds,a=It(t._days),s=It(t._months);e.isValid()&&(r=null==r||r,s&&Me(e,be(e,"Month")+s*n),a&&we(e,"Date",be(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&o.updateOffset(e,a||s))}Vt.fn=kt.prototype,Vt.invalid=function(){return Vt(NaN)};var zt=Yt(1,"add"),Kt=Yt(-1,"subtract");function Xt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=st(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Qt=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function $t(){return this._locale}function Zt(e,t){return(e%t+t)%t}function Jt(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function en(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function tn(e,t){Y(0,[e,e.length],0,t)}function nn(e,t,n,r,o){var i;return null==e?je(this,r,o).year:(t>(i=Ue(e,r,o))&&(t=i),rn.call(this,e,t,n,r,o))}function rn(e,t,n,r,o){var i=Fe(e,t,n,r,o),a=De(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}Y(0,["gg",2],0,(function(){return this.weekYear()%100})),Y(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),tn("gggg","weekYear"),tn("ggggg","weekYear"),tn("GGGG","isoWeekYear"),tn("GGGGG","isoWeekYear"),x("weekYear","gg"),x("isoWeekYear","GG"),j("weekYear",1),j("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",Z,X),ce("gg",Z,X),ce("GGGG",ne,Q),ce("gggg",ne,Q),ce("GGGGG",re,$),ce("ggggg",re,$),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=w(e)})),me(["gg","GG"],(function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)})),Y("Q",0,"Qo","quarter"),x("quarter","Q"),j("quarter",7),ce("Q",K),pe("Q",(function(e,t){t[1]=3*(w(e)-1)})),Y("D",["DD",2],"Do","date"),x("date","D"),j("date",9),ce("D",Z),ce("DD",Z,X),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),pe(["D","DD"],2),pe("Do",(function(e,t){t[2]=w(e.match(Z)[0])}));var on=Ce("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),x("dayOfYear","DDD"),j("dayOfYear",4),ce("DDD",te),ce("DDDD",q),pe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=w(e)})),Y("m",["mm",2],0,"minute"),x("minute","m"),j("minute",14),ce("m",Z),ce("mm",Z,X),pe(["m","mm"],4);var an=Ce("Minutes",!1);Y("s",["ss",2],0,"second"),x("second","s"),j("second",15),ce("s",Z),ce("ss",Z,X),pe(["s","ss"],5);var sn,un=Ce("Seconds",!1);for(Y("S",0,0,(function(){return~~(this.millisecond()/100)})),Y(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),Y(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),Y(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),Y(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),Y(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),Y(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),x("millisecond","ms"),j("millisecond",16),ce("S",te,K),ce("SS",te,X),ce("SSS",te,q),sn="SSSS";sn.length<=9;sn+="S")ce(sn,oe);function ln(e,t){t[6]=w(1e3*("0."+e))}for(sn="S";sn.length<=9;sn+="S")pe(sn,ln);var cn=Ce("Milliseconds",!1);Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var fn=T.prototype;function dn(e){return e}fn.add=zt,fn.calendar=function(e,t){var n=e||Ot(),r=Lt(n,this).startOf("day"),i=o.calendarFormat(this,r)||"sameElse",a=t&&(k(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,Ot(n)))},fn.clone=function(){return new T(this)},fn.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=Lt(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=D(t)){case"year":i=Xt(this,r)/12;break;case"month":i=Xt(this,r);break;case"quarter":i=Xt(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-o)/864e5;break;case"week":i=(this-r-o)/6048e5;break;default:i=this-r}return n?i:b(i)},fn.endOf=function(e){var t;if(void 0===(e=D(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Jt;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-Zt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Zt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Zt(t,1e3)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},fn.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)},fn.from=function(e,t){return this.isValid()&&(C(e)&&e.isValid()||Ot(e).isValid())?Vt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.fromNow=function(e){return this.from(Ot(),e)},fn.to=function(e,t){return this.isValid()&&(C(e)&&e.isValid()||Ot(e).isValid())?Vt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.toNow=function(e){return this.to(Ot(),e)},fn.get=function(e){return k(this[e=D(e)])?this[e]():this},fn.invalidAt=function(){return p(this).overflow},fn.isAfter=function(e,t){var n=C(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=D(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},fn.isBefore=function(e,t){var n=C(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=D(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},fn.isBetween=function(e,t,n,r){var o=C(e)?e:Ot(e),i=C(t)?t:Ot(t);return!!(this.isValid()&&o.isValid()&&i.isValid())&&("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(i,n):!this.isAfter(i,n))},fn.isSame=function(e,t){var n,r=C(e)?e:Ot(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=D(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},fn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},fn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},fn.isValid=function(){return m(this)},fn.lang=Qt,fn.locale=qt,fn.localeData=$t,fn.max=At,fn.min=St,fn.parsingFlags=function(){return d({},p(this))},fn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:F[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=L(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(k(this[e=D(e)]))return this[e](t);return this},fn.startOf=function(e){var t;if(void 0===(e=D(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Jt;switch(e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Zt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=Zt(t,6e4);break;case"second":t=this._d.valueOf(),t-=Zt(t,1e3)}return this._d.setTime(t),o.updateOffset(this,!0),this},fn.subtract=Kt,fn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},fn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},fn.toDate=function(){return new Date(this.valueOf())},fn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?G(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):k(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(n,"Z")):G(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},fn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+o)},fn.toJSON=function(){return this.isValid()?this.toISOString():null},fn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},fn.unix=function(){return Math.floor(this.valueOf()/1e3)},fn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},fn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},fn.year=Te,fn.isLeapYear=function(){return ge(this.year())},fn.weekYear=function(e){return nn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},fn.isoWeekYear=function(e){return nn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},fn.quarter=fn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},fn.month=ke,fn.daysInMonth=function(){return Re(this.year(),this.month())},fn.week=fn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},fn.isoWeek=fn.isoWeeks=function(e){var t=je(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},fn.weeksInYear=function(){var e=this.localeData()._week;return Ue(this.year(),e.dow,e.doy)},fn.isoWeeksInYear=function(){return Ue(this.year(),1,4)},fn.date=on,fn.day=fn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},fn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},fn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},fn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},fn.hour=fn.hours=Je,fn.minute=fn.minutes=an,fn.second=fn.seconds=un,fn.millisecond=fn.milliseconds=cn,fn.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Dt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Ft(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Gt(this,Vt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Ft(this)},fn.utc=function(e){return this.utcOffset(0,e)},fn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ft(this),"m")),this},fn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Dt(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},fn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ot(e).utcOffset():0,(this.utcOffset()-e)%60==0)},fn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},fn.isLocal=function(){return!!this.isValid()&&!this._isUTC},fn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},fn.isUtc=jt,fn.isUTC=jt,fn.zoneAbbr=function(){return this._isUTC?"UTC":""},fn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},fn.dates=S("dates accessor is deprecated. Use date instead.",on),fn.months=S("months accessor is deprecated. Use month instead",ke),fn.years=S("years accessor is deprecated. Use year instead",Te),fn.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),fn.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=wt(e))._a){var t=e._isUTC?h(e._a):Ot(e._a);this._isDSTShifted=this.isValid()&&R(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var hn=I.prototype;function pn(e,t,n,r){var o=st(),i=h().set(r,t);return o[n](i,e)}function mn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return pn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=pn(e,r,n,"month");return o}function yn(e,t,n,r){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var o,i=st(),a=e?i._week.dow:0;if(null!=n)return pn(t,(n+a)%7,r,"day");var s=[];for(o=0;o<7;o++)s[o]=pn(t,(o+a)%7,r,"day");return s}hn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return k(r)?r.call(t,n):r},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace("%d",e)},hn.preparse=dn,hn.postformat=dn,hn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return k(o)?o(e,t,n,r):o.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return k(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)k(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Oe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Oe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return Ne.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},hn.monthsRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||Pe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(f(this,"_monthsRegex")||(this._monthsRegex=Ie),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||Pe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(f(this,"_monthsShortRegex")||(this._monthsShortRegex=_e),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return je(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?He(n,this._week.dow):e?n[e.day()]:n},hn.weekdaysMin=function(e){return!0===e?He(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return!0===e?He(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return Ye.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=Ge),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ze),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ke),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},it("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=S("moment.lang is deprecated. Use moment.locale instead.",it),o.langData=S("moment.langData is deprecated. Use moment.localeData instead.",st);var vn=Math.abs;function gn(e,t,n,r){var o=Vt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function En(e){return e<0?Math.floor(e):Math.ceil(e)}function Tn(e){return 4800*e/146097}function Cn(e){return 146097*e/4800}function bn(e){return function(){return this.as(e)}}var wn=bn("ms"),Rn=bn("s"),On=bn("m"),Sn=bn("h"),An=bn("d"),Nn=bn("w"),Mn=bn("M"),kn=bn("Q"),_n=bn("y");function In(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=In("milliseconds"),xn=In("seconds"),Dn=In("minutes"),Ln=In("hours"),Fn=In("days"),jn=In("months"),Un=In("years"),Hn=Math.round,Vn={ss:44,s:45,m:45,h:22,d:26,M:11};function Bn(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var Wn=Math.abs;function Yn(e){return(e>0)-(e<0)||+e}function Gn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Wn(this._milliseconds)/1e3,r=Wn(this._days),o=Wn(this._months);e=b(n/60),t=b(e/60),n%=60,e%=60;var i=b(o/12),a=o%=12,s=r,u=t,l=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",f=this.asSeconds();if(!f)return"P0D";var d=f<0?"-":"",h=Yn(this._months)!==Yn(f)?"-":"",p=Yn(this._days)!==Yn(f)?"-":"",m=Yn(this._milliseconds)!==Yn(f)?"-":"";return d+"P"+(i?h+i+"Y":"")+(a?h+a+"M":"")+(s?p+s+"D":"")+(u||l||c?"T":"")+(u?m+u+"H":"")+(l?m+l+"M":"")+(c?m+c+"S":"")}var zn=kt.prototype;return zn.isValid=function(){return this._isValid},zn.abs=function(){var e=this._data;return this._milliseconds=vn(this._milliseconds),this._days=vn(this._days),this._months=vn(this._months),e.milliseconds=vn(e.milliseconds),e.seconds=vn(e.seconds),e.minutes=vn(e.minutes),e.hours=vn(e.hours),e.months=vn(e.months),e.years=vn(e.years),this},zn.add=function(e,t){return gn(this,e,t,1)},zn.subtract=function(e,t){return gn(this,e,t,-1)},zn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=D(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Tn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Cn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},zn.asMilliseconds=wn,zn.asSeconds=Rn,zn.asMinutes=On,zn.asHours=Sn,zn.asDays=An,zn.asWeeks=Nn,zn.asMonths=Mn,zn.asQuarters=kn,zn.asYears=_n,zn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},zn._bubble=function(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,u=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*En(Cn(s)+a),a=0,s=0),u.milliseconds=i%1e3,e=b(i/1e3),u.seconds=e%60,t=b(e/60),u.minutes=t%60,n=b(t/60),u.hours=n%24,a+=b(n/24),o=b(Tn(a)),s+=o,a-=En(Cn(o)),r=b(s/12),s%=12,u.days=a,u.months=s,u.years=r,this},zn.clone=function(){return Vt(this)},zn.get=function(e){return e=D(e),this.isValid()?this[e+"s"]():NaN},zn.milliseconds=Pn,zn.seconds=xn,zn.minutes=Dn,zn.hours=Ln,zn.days=Fn,zn.weeks=function(){return b(this.days()/7)},zn.months=jn,zn.years=Un,zn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Vt(e).abs(),o=Hn(r.as("s")),i=Hn(r.as("m")),a=Hn(r.as("h")),s=Hn(r.as("d")),u=Hn(r.as("M")),l=Hn(r.as("y")),c=o<=Vn.ss&&["s",o]||o<Vn.s&&["ss",o]||i<=1&&["m"]||i<Vn.m&&["mm",i]||a<=1&&["h"]||a<Vn.h&&["hh",a]||s<=1&&["d"]||s<Vn.d&&["dd",s]||u<=1&&["M"]||u<Vn.M&&["MM",u]||l<=1&&["y"]||["yy",l];return c[2]=t,c[3]=+e>0,c[4]=n,Bn.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},zn.toISOString=Gn,zn.toString=Gn,zn.toJSON=Gn,zn.locale=qt,zn.localeData=$t,zn.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gn),zn.lang=Qt,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),ce("x",ie),ce("X",/[+-]?\d+(\.\d{1,3})?/),pe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),pe("x",(function(e,t,n){n._d=new Date(w(e))})),o.version="2.24.0",t=Ot,o.fn=fn,o.min=function(){var e=[].slice.call(arguments,0);return Nt("isBefore",e)},o.max=function(){var e=[].slice.call(arguments,0);return Nt("isAfter",e)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=h,o.unix=function(e){return Ot(1e3*e)},o.months=function(e,t){return mn(e,t,"months")},o.isDate=l,o.locale=it,o.invalid=y,o.duration=Vt,o.isMoment=C,o.weekdays=function(e,t,n){return yn(e,t,n,"weekdays")},o.parseZone=function(){return Ot.apply(null,arguments).parseZone()},o.localeData=st,o.isDuration=_t,o.monthsShort=function(e,t){return mn(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return yn(e,t,n,"weekdaysMin")},o.defineLocale=at,o.updateLocale=function(e,t){if(null!=t){var n,r,o=et;null!=(r=ot(e))&&(o=r._config),t=_(o,t),(n=new I(t)).parentLocale=tt[e],tt[e]=n,it(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?tt[e]=tt[e].parentLocale:null!=tt[e]&&delete tt[e]);return tt[e]},o.locales=function(){return A(tt)},o.weekdaysShort=function(e,t,n){return yn(e,t,n,"weekdaysShort")},o.normalizeUnits=D,o.relativeTimeRounding=function(e){return void 0===e?Hn:"function"==typeof e&&(Hn=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==Vn[e]&&(void 0===t?Vn[e]:(Vn[e]=t,"s"===e&&(Vn.ss=t-1),!0))},o.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},o.prototype=fn,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o}(),window.moment=n(102)}).call(this,n(729)(e))},function(e,t,n){"use strict";t.__esModule=!0,t.align=function(e,t,n,o,i){(0,r.arrayEach)(e,(function(e){e.forAll((function(e,r){e>=0&&r>=0&&function(e,t,n,r,o,i){var u=o(e,t),l=r;u.className&&(l="vertical"===n?a(u.className,r):s(u.className,r));i(e,t,"className",l)}(e,r,t,n,o,i)}))}))},t.checkSelectionConsistency=function(e,t){var n=!1;Array.isArray(e)&&(0,r.arrayEach)(e,(function(e){return e.forAll((function(e,r){if(e>=0&&r>=0&&t(e,r))return n=!0,!1})),n}));return n},t.filterSeparators=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.KEY,n=e.slice(0);return n=c(n=l(n=u(n,t),t))},t.getAlignmentClasses=function(e,t){var n={};return(0,r.arrayEach)(e,(function(e){e.forAll((function(e,r){e>=0&&r>=0&&(n[e]||(n[e]=[]),n[e][r]=t(e,r))}))})),n},t.getValidSelection=function(e){var t=e.getSelected();if(!t)return null;if(t[0]<0)return null;return t},t.hasSubMenu=function(e){return(0,o.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,o.hasClass)(e,"htDisabled")},t.isItemHidden=function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))},t.isSelectionDisabled=function(e){return(0,o.hasClass)(e,"htSelectionDisabled")},t.isSeparator=function(e){return(0,o.hasClass)(e,"htSeparator")},t.markLabelAsSelected=function(e){return'<span class="selected">'.concat(String.fromCharCode(10003),"</span>").concat(e)},t.normalizeSelection=function(e){return(0,r.arrayMap)(e,(function(e){return{start:e.getTopLeftCorner(),end:e.getBottomRightCorner()}}))},t.prepareHorizontalAlignClass=s,t.prepareVerticalAlignClass=a,n(31),n(33),n(62),n(20),n(12),n(24),n(140);var r=n(19),o=n(23),i=n(309);function a(e,t){if(-1!==e.indexOf(t))return e;var n=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","");return"".concat(n," ").concat(t)}function s(e,t){if(-1!==e.indexOf(t))return e;var n=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","");return"".concat(n," ").concat(t)}function u(e,t){for(var n=e.slice(0);0<n.length&&n[0].name===t;)n.shift();return n}function l(e,t){var n=e.slice(0);return n.reverse(),(n=u(n,t)).reverse(),n}function c(e){var t=[];return(0,r.arrayEach)(e,(function(e,n){n>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}},function(e,t,n){var r=n(28),o=n(61),i=n(73),a=n(123),s=n(235),u=n(236),l=n(114),c=n(167).CONFIGURABLE,f=l.get,d=l.enforce,h=String(String).split("String");(e.exports=function(e,t,n,u){var l,f=!!u&&!!u.unsafe,p=!!u&&!!u.enumerable,m=!!u&&!!u.noTargetGet,y=u&&void 0!==u.name?u.name:t;o(n)&&("Symbol("===String(y).slice(0,7)&&(y="["+String(y).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(n,"name")||c&&n.name!==y)&&a(n,"name",y),(l=d(n)).source||(l.source=h.join("string"==typeof y?y:""))),e!==r?(f?!m&&e[t]&&(p=!0):delete e[t],p?e[t]=n:a(e,t,n)):p?e[t]=n:s(t,n)})(Function.prototype,"toString",(function(){return o(this)&&f(this).source||u(this)}))},function(e,t,n){"use strict";n.r(t),n.d(t,"ArithmeticHelper",(function(){return v})),n.d(t,"coerceComplexToString",(function(){return g})),n.d(t,"coerceToRange",(function(){return E})),n.d(t,"coerceToRangeNumbersOrError",(function(){return T})),n.d(t,"coerceBooleanToNumber",(function(){return C})),n.d(t,"coerceEmptyToValue",(function(){return b})),n.d(t,"coerceScalarToBoolean",(function(){return w})),n.d(t,"coerceScalarToString",(function(){return R})),n.d(t,"zeroIfEmpty",(function(){return O})),n.d(t,"numberCmp",(function(){return S})),n.d(t,"isNumberOverflow",(function(){return A})),n.d(t,"fixNegativeZero",(function(){return N})),n.d(t,"forceNormalizeString",(function(){return F})),n.d(t,"coerceRangeToScalar",(function(){return j})),n.d(t,"normalizeString",(function(){return U}));n(20),n(33),n(95),n(65),n(62),n(108),n(51),n(0),n(42),n(12),n(24),n(21),n(2),n(8),n(9),n(10),n(3),n(4);var r=n(668),o=n.n(r),i=n(22),a=n(43),s=n(669),u=n(48),l=n(80);function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=h(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function h(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var y=/^\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij]))\s*(([+-])\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij])))?$/,v=function(){function e(t,n,r){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.dateTimeHelper=n,this.numberLiteralsHelper=r,this.lt=function(e,t){return o.compare(e,t)<0},this.leq=function(e,t){return o.compare(e,t)<=0},this.gt=function(e,t){return o.compare(e,t)>0},this.geq=function(e,t){return o.compare(e,t)>=0},this.eq=function(e,t){return 0===o.compare(e,t)},this.neq=function(e,t){return 0!==o.compare(e,t)},this.pow=function(e,t){return Math.pow(Object(u.getRawValue)(e),Object(u.getRawValue)(t))},this.addWithEpsilonRaw=function(e,t){var n=e+t;return Math.abs(n)<o.actualEps*Math.abs(e)?0:n},this.addWithEpsilon=function(e,t){var n=D(e,t);return o.ExtendedNumberFactory(o.addWithEpsilonRaw(Object(u.getRawValue)(e),Object(u.getRawValue)(t)),n)},this.unaryMinus=function(e){return Object(u.cloneNumber)(e,-Object(u.getRawValue)(e))},this.unaryPlus=function(e){return e},this.unaryPercent=function(e){return new u.PercentNumber(Object(u.getRawValue)(e)/100)},this.concat=function(e,t){return e.concat(t)},this.nonstrictadd=function(e,t){return e instanceof i.CellError?e:t instanceof i.CellError?t:"number"==typeof e?"number"==typeof t?o.addWithEpsilonRaw(e,t):e:"number"==typeof t?t:0},this.subtract=function(e,t){var n=D(e,t),r=Object(u.getRawValue)(e),i=r-Object(u.getRawValue)(t);return Math.abs(i)<o.actualEps*Math.abs(r)&&(i=0),o.ExtendedNumberFactory(i,n)},this.divide=function(e,t){var n=Object(u.getRawValue)(e),r=Object(u.getRawValue)(t);if(0===r)return new i.CellError(i.ErrorType.DIV_BY_ZERO);var a=L(e,t);return o.ExtendedNumberFactory(n/r,a)},this.multiply=function(e,t){var n=L(e,t);return o.ExtendedNumberFactory(Object(u.getRawValue)(e)*Object(u.getRawValue)(t),n)},this.manyToExactComplex=function(e){var t,n=[],r=d(e);try{for(r.s();!(t=r.n()).done;){var a=t.value;if(a instanceof i.CellError)return a;if(Object(u.isExtendedNumber)(a)||"string"==typeof a){var s=o.coerceScalarToComplex(a);s instanceof i.CellError||n.push(s)}}}catch(e){r.e(e)}finally{r.f()}return n},this.coerceNumbersExactRanges=function(e){return o.manyToNumbers(e,o.manyToExactNumbers)},this.coerceNumbersCoerceRangesDropNulls=function(e){return o.manyToNumbers(e,o.manyToCoercedNumbersDropNulls)},this.manyToExactNumbers=function(e){var t,n=[],r=d(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(o instanceof i.CellError)return o;Object(u.isExtendedNumber)(o)&&n.push(Object(u.getRawValue)(o))}}catch(e){r.e(e)}finally{r.f()}return n},this.manyToOnlyNumbersDropNulls=function(e){var t,n=[],r=d(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(o instanceof i.CellError)return o;if(o!==u.EmptyValue){if(!Object(u.isExtendedNumber)(o))return new i.CellError(i.ErrorType.VALUE,a.ErrorMessage.NumberExpected);n.push(Object(u.getRawValue)(o))}}}catch(e){r.e(e)}finally{r.f()}return n},this.manyToCoercedNumbersDropNulls=function(e){var t,n=[],r=d(e);try{for(r.s();!(t=r.n()).done;){var a=t.value;if(a instanceof i.CellError)return a;if(a!==u.EmptyValue){var s=o.coerceScalarToNumberOrError(a);Object(u.isExtendedNumber)(s)&&n.push(Object(u.getRawValue)(s))}}}catch(e){r.e(e)}finally{r.f()}return n},this.collator=Object(s.collatorFromConfig)(t),this.actualEps=t.smartRounding?t.precisionEpsilon:0}var t,n,r;return t=e,(n=[{key:"eqMatcherFunction",value:function(e){var t=this,n=this.buildRegex(e);return function(e){return"string"==typeof e&&n.test(t.normalizeString(e))}}},{key:"neqMatcherFunction",value:function(e){var t=this,n=this.buildRegex(e);return function(e){return!("string"==typeof e&&n.test(t.normalizeString(e)))}}},{key:"searchString",value:function(e,t){var n,r=this.buildRegex(e,!1).exec(t);return null!==(n=null==r?void 0:r.index)&&void 0!==n?n:-1}},{key:"requiresRegex",value:function(e){if(!this.config.useRegularExpressions&&!this.config.useWildcards)return!this.config.matchWholeCell;for(var t=0;t<e.length;t++){var n=e.charAt(t);if(M(n)||this.config.useRegularExpressions&&_(n))return!0}return!1}},{key:"buildRegex",value:function(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e=this.normalizeString(e);var r=this.config.useWildcards,o=this.config.useRegularExpressions;if(o)try{RegExp(e)}catch(e){o=!1,r=!1}return t=o?x(e,this.config.caseSensitive):r?I(e,this.config.caseSensitive):P(e,this.config.caseSensitive),this.config.matchWholeCell&&n?RegExp("^("+t+")$"):RegExp(t)}},{key:"normalizeString",value:function(e){return this.config.caseSensitive||(e=e.toLowerCase()),this.config.accentSensitive||(e=U(e,"nfd").replace(/[\u0300-\u036f]/g,"")),e}},{key:"compare",value:function(e,t){if("string"==typeof e||"string"==typeof t){var n="string"==typeof e?this.dateTimeHelper.dateStringToDateNumber(e):e,r="string"==typeof t?this.dateTimeHelper.dateStringToDateNumber(t):t;if(Object(u.isExtendedNumber)(n)&&Object(u.isExtendedNumber)(r))return this.floatCmp(n,r)}return e===u.EmptyValue?e=b(t):t===u.EmptyValue&&(t=b(e)),"string"==typeof e&&"string"==typeof t?this.stringCmp(e,t):"boolean"==typeof e&&"boolean"==typeof t?S(C(e),C(t)):Object(u.isExtendedNumber)(e)&&Object(u.isExtendedNumber)(t)?this.floatCmp(e,t):e===u.EmptyValue&&t===u.EmptyValue?0:S(Object(i.CellValueTypeOrd)(Object(i.getCellValueType)(e)),Object(i.CellValueTypeOrd)(Object(i.getCellValueType)(t)))}},{key:"floatCmp",value:function(e,t){var n=Object(u.getRawValue)(e),r=Object(u.getRawValue)(t),o=1+this.actualEps;return r>=0&&n*o>=r&&n<=r*o||r<=0&&n*o<=r&&n>=r*o?0:n>r?1:-1}},{key:"stringCmp",value:function(e,t){return this.collator.compare(e,t)}},{key:"coerceScalarToNumberOrError",value:function(e){var t;return e instanceof i.CellError?e:null!==(t=this.coerceToMaybeNumber(e))&&void 0!==t?t:new i.CellError(i.ErrorType.VALUE,a.ErrorMessage.NumberCoercion)}},{key:"coerceToMaybeNumber",value:function(e){var t;return null!==(t=this.coerceNonDateScalarToMaybeNumber(e))&&void 0!==t?t:"string"==typeof e?this.dateTimeHelper.dateStringToDateNumber(e):void 0}},{key:"coerceNonDateScalarToMaybeNumber",value:function(e){return e===u.EmptyValue?0:"string"==typeof e?""===e?0:this.numberLiteralsHelper.numericStringToMaybeNumber(e.trim()):Object(u.isExtendedNumber)(e)?e:"boolean"==typeof e?Number(e):void 0}},{key:"coerceComplexExactRanges",value:function(e){var t,n=[],r=d(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(o instanceof l.SimpleRangeValue)n.push(o);else if(o!==u.EmptyValue){var a=this.coerceScalarToComplex(o);if(a instanceof i.CellError)return a;n.push(a)}}}catch(e){r.e(e)}finally{r.f()}for(var s=[],c=0,h=n;c<h.length;c++){var p=h[c];if(p instanceof l.SimpleRangeValue){var m=this.manyToExactComplex(p.valuesFromTopLeftCorner());if(m instanceof i.CellError)return m;s.push.apply(s,f(m))}else s.push(p)}return s}},{key:"manyToNumbers",value:function(e,t){var n,r=[],o=d(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a instanceof l.SimpleRangeValue)r.push(a);else{var s=Object(u.getRawValue)(this.coerceScalarToNumberOrError(a));if(s instanceof i.CellError)return s;r.push(s)}}}catch(e){o.e(e)}finally{o.f()}for(var c=[],h=0,p=r;h<p.length;h++){var m=p[h];if(m instanceof l.SimpleRangeValue){var y=t(m.valuesFromTopLeftCorner());if(y instanceof i.CellError)return y;c.push.apply(c,f(y))}else c.push(m)}return c}},{key:"coerceScalarToComplex",value:function(e){return e instanceof i.CellError?e:e===u.EmptyValue?[0,0]:Object(u.isExtendedNumber)(e)?[Object(u.getRawValue)(e),0]:"string"==typeof e?this.coerceStringToComplex(e):new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ComplexNumberExpected)}},{key:"coerceStringToComplex",value:function(e){var t,n,r=y.exec(e);return null===r?new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ComplexNumberExpected):(t=void 0!==r[6]?"-"===r[1]?[0,-1]:[0,1]:this.parseComplexToken(r[1]+r[3],r[5]))instanceof i.CellError||void 0===r[8]?t:(n=void 0!==r[14]?"-"===r[9]?[0,-1]:[0,1]:this.parseComplexToken(r[9]+r[11],r[13]))instanceof i.CellError?n:""!==r[5]||""===r[13]?new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ComplexNumberExpected):"+"===r[8]?[t[0]+n[0],t[1]+n[1]]:[t[0]-n[0],t[1]-n[1]]}},{key:"parseComplexToken",value:function(e,t){var n=Object(u.getRawValue)(this.coerceNonDateScalarToMaybeNumber(e));return void 0===n?new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ComplexNumberExpected):""===t?[n,0]:[0,n]}},{key:"ExtendedNumberFactory",value:function(e,t){var n=t.type,r=t.format;switch(n){case u.NumberType.NUMBER_RAW:return e;case u.NumberType.NUMBER_CURRENCY:return new u.CurrencyNumber(e,null!=r?r:this.config.currencySymbol[0]);case u.NumberType.NUMBER_DATE:return new u.DateNumber(e,r);case u.NumberType.NUMBER_DATETIME:return new u.DateTimeNumber(e,r);case u.NumberType.NUMBER_TIME:return new u.TimeNumber(e,r);case u.NumberType.NUMBER_PERCENT:return new u.PercentNumber(e,r)}}}])&&m(t.prototype,n),r&&m(t,r),e}();function g(e,t){var n=c(e,2),r=n[0],o=n[1];if(!isFinite(r)||!isFinite(o))return new i.CellError(i.ErrorType.NUM,a.ErrorMessage.NaN);if(t=null!=t?t:"i",0===o)return"".concat(r);var s="".concat(-1===o||1===o?"":Math.abs(o)).concat(t);return 0===r?"".concat(o<0?"-":"").concat(s):"".concat(r).concat(o<0?"-":"+").concat(s)}function E(e){return e instanceof l.SimpleRangeValue?e:l.SimpleRangeValue.fromScalar(e)}function T(e){return e instanceof l.SimpleRangeValue&&e.hasOnlyNumbers()||e instanceof i.CellError?e:Object(u.isExtendedNumber)(e)?l.SimpleRangeValue.fromScalar(e):null}function C(e){return Number(e)}function b(e){return"string"==typeof e?"":Object(u.isExtendedNumber)(e)?0:"boolean"!=typeof e&&u.EmptyValue}function w(e){if(e instanceof i.CellError||"boolean"==typeof e)return e;if(e===u.EmptyValue)return!1;if(Object(u.isExtendedNumber)(e))return 0!==Object(u.getRawValue)(e);var t=e.toUpperCase();return"TRUE"===t||"FALSE"!==t&&(""!==t&&void 0)}function R(e){return e instanceof i.CellError||"string"==typeof e?e:e===u.EmptyValue?"":Object(u.isExtendedNumber)(e)?Object(u.getRawValue)(e).toString():e?"TRUE":"FALSE"}function O(e){return e===u.EmptyValue?0:e}function S(e,t){var n=Object(u.getRawValue)(e),r=Object(u.getRawValue)(t);return n>r?1:n<r?-1:0}function A(e){return isNaN(e)||e===1/0||e===-1/0}function N(e){return 0===e?0:e}function M(e){return["*","?"].includes(e)}var k=["{","}","[","]","(",")","<",">","=",".","+","-",",","\\","$","^","!"];function _(e){return k.includes(e)}function I(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);if("~"===o){if(r==e.length-1){n+="~";continue}var i=e.charAt(r+1);M(i)||_(i)?(n+="\\"+i,r++):(n+=i,r++)}else M(o)?n+="."+o:_(o)?n+="\\"+o:n+=t?o:o.toLowerCase()}return n}function P(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);M(o)||_(o)?n+="\\"+o:n+=t?o:o.toLowerCase()}return n}function x(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);M(o)||_(o)?n+=o:n+=t?o:o.toLowerCase()}return n}function D(e,t){var n=Object(u.getTypeFormatOfExtendedNumber)(e),r=n.type,o=n.format,i=Object(u.getTypeFormatOfExtendedNumber)(t),a=i.type,s=i.format;if(r===u.NumberType.NUMBER_RAW)return{type:a,format:s};if(a===u.NumberType.NUMBER_RAW)return{type:r,format:o};if(!(r!==u.NumberType.NUMBER_DATETIME&&r!==u.NumberType.NUMBER_DATE||a!==u.NumberType.NUMBER_DATETIME&&a!==u.NumberType.NUMBER_DATE))return{type:u.NumberType.NUMBER_RAW};if(r===u.NumberType.NUMBER_TIME){if(a===u.NumberType.NUMBER_DATE)return{type:u.NumberType.NUMBER_DATETIME,format:s+" "+o};if(a===u.NumberType.NUMBER_DATETIME)return{type:u.NumberType.NUMBER_DATETIME,format:s}}if(a===u.NumberType.NUMBER_TIME){if(r===u.NumberType.NUMBER_DATE)return{type:u.NumberType.NUMBER_DATETIME,format:o+" "+s};if(r===u.NumberType.NUMBER_DATETIME)return{type:u.NumberType.NUMBER_DATETIME,format:o}}return{type:r,format:o}}function L(e,t){var n=Object(u.getTypeFormatOfExtendedNumber)(e),r=n.type,o=n.format,i=Object(u.getTypeFormatOfExtendedNumber)(t),a=i.type,s=i.format;return r===u.NumberType.NUMBER_PERCENT&&(r=u.NumberType.NUMBER_RAW,o=void 0),a===u.NumberType.NUMBER_PERCENT&&(a=u.NumberType.NUMBER_RAW,s=void 0),r===u.NumberType.NUMBER_RAW?{type:a,format:s}:a===u.NumberType.NUMBER_RAW?{type:r,format:o}:{type:u.NumberType.NUMBER_RAW}}function F(e){return U(e.toLowerCase(),"nfd").replace(/[\u0300-\u036f]/g,"")}function j(e,t){var n;if(e.isAdHoc())return null===(n=e.data[0])||void 0===n?void 0:n[0];var r=e.range;if(t.formulaAddress.sheet===r.sheet)if(1===r.width()){var o=t.formulaAddress.row-r.start.row;if(o>=0&&o<r.height())return e.data[o][0]}else if(1===r.height()){var i=t.formulaAddress.col-r.start.col;if(i>=0&&i<r.width())return e.data[0][i]}}function U(e,t){return"function"==typeof e.normalize?e.normalize(t.toUpperCase()):o.a[t](e)}},function(e,t,n){"use strict";t.__esModule=!0,t.isChrome=function(){return i.chrome.value},t.isChromeWebKit=function(){return i.chromeWebKit.value},t.isEdge=function(){return i.edge.value},t.isEdgeWebKit=function(){return i.edgeWebKit.value},t.isFirefox=function(){return i.firefox.value},t.isFirefoxWebKit=function(){return i.firefoxWebKit.value},t.isIE=function(){return i.ie.value},t.isIE9=function(){return i.ie9.value},t.isIOS=function(){return a.ios.value},t.isIpadOS=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator,t=e.maxTouchPoints;return t>2&&a.mac.value},t.isLinuxOS=function(){return a.linux.value},t.isMSBrowser=function(){return i.ie.value||i.edge.value},t.isMacOS=function(){return a.mac.value},t.isMobileBrowser=function(){return i.mobile.value},t.isSafari=function(){return i.safari.value},t.isWindowsOS=function(){return a.win.value},t.setBrowserMeta=s,t.setPlatformMeta=u,n(33);var r=n(14),o=function(e){var t={value:!1,test:function(n,r){t.value=e(n,r)}};return t},i={chrome:o((function(e,t){return/Chrome/.test(e)&&/Google/.test(t)})),chromeWebKit:o((function(e){return/CriOS/.test(e)})),edge:o((function(e){return/Edge/.test(e)})),edgeWebKit:o((function(e){return/EdgiOS/.test(e)})),firefox:o((function(e){return/Firefox/.test(e)})),firefoxWebKit:o((function(e){return/FxiOS/.test(e)})),ie:o((function(e){return/Trident/.test(e)})),ie9:o((function(){return!!document.documentMode})),mobile:o((function(e){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)})),safari:o((function(e,t){return/Safari/.test(e)&&/Apple Computer/.test(t)}))},a={mac:o((function(e){return/^Mac/.test(e)})),win:o((function(e){return/^Win/.test(e)})),linux:o((function(e){return/^Linux/.test(e)})),ios:o((function(e){return/iPhone|iPad|iPod/i.test(e)}))};function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.userAgent,n=void 0===t?navigator.userAgent:t,o=e.vendor,a=void 0===o?navigator.vendor:o;(0,r.objectEach)(i,(function(e){(0,e.test)(n,a)}))}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.platform,n=void 0===t?navigator.platform:t;(0,r.objectEach)(a,(function(e){(0,e.test)(n)}))}s(),u()},function(e,t,n){"use strict";n.r(t),n.d(t,"isRecognitionException",(function(){return i})),n.d(t,"MismatchedTokenException",(function(){return a})),n.d(t,"NoViableAltException",(function(){return s})),n.d(t,"NotAllInputParsedException",(function(){return u})),n.d(t,"EarlyExitException",(function(){return l}));var r=n(46),o=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"];function i(e){return Object(r.contains)(o,e.name)}function a(e,t,n){this.name="MismatchedTokenException",this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}function s(e,t,n){this.name="NoViableAltException",this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}function u(e,t){this.name="NotAllInputParsedException",this.message=e,this.token=t,this.resyncedTokens=[]}function l(e,t,n){this.name="EarlyExitException",this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}Object.freeze(o),a.prototype=Error.prototype,s.prototype=Error.prototype,u.prototype=Error.prototype,l.prototype=Error.prototype},function(e,t,n){"use strict";var r=n(29),o=n(345).trim;r({target:"String",proto:!0,forced:n(667)("trim")},{trim:function(){return o(this)}})},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.collection=void 0,t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";i.has(e)||i.set(e,new Map);var t=i.get(e);function n(e,n){t.set(e,n)}function r(e){return t.get(e)}function a(e){return t.has(e)}function s(){return(0,o.default)(t.keys())}function u(){return(0,o.default)(t.values())}return{register:n,getItem:r,hasItem:a,getNames:s,getValues:u}};var o=r(n(44));n(3),n(36),n(0),n(2),n(4);var i=new Map;t.collection=i},function(e,t,n){var r=n(776),o=n(583);e.exports=function(e,t){var n=o(e,t,"get");return r(e,n)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(777),o=n(583);e.exports=function(e,t,n){var i=o(e,t,"set");return r(e,i,n),n},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";t.__esModule=!0,t.HEADER_TYPE=t.FILL_TYPE=t.CUSTOM_SELECTION_TYPE=t.CELL_TYPE=t.AREA_TYPE=t.ACTIVE_HEADER_TYPE=void 0;t.ACTIVE_HEADER_TYPE="active-header";t.AREA_TYPE="area";t.CELL_TYPE="cell";t.FILL_TYPE="fill";t.HEADER_TYPE="header";t.CUSTOM_SELECTION_TYPE="custom-selection"},function(e,t,n){var r=n(72),o=n(78),i=n(195),a=n(163),s=n(94),u=n(196),l=n(73),c=n(319),f=Object.getOwnPropertyDescriptor;t.f=r?f:function(e,t){if(e=s(e),t=u(t),c)try{return f(e,t)}catch(e){}if(l(e,t))return a(!o(i.f,e,t),e[t])}},function(e,t,n){var r,o,i,a=n(321),s=n(28),u=n(35),l=n(63),c=n(123),f=n(73),d=n(234),h=n(202),p=n(166),m=s.TypeError,y=s.WeakMap;if(a||d.state){var v=d.state||(d.state=new y),g=u(v.get),E=u(v.has),T=u(v.set);r=function(e,t){if(E(v,e))throw new m("Object already initialized");return t.facade=e,T(v,e,t),t},o=function(e){return g(v,e)||{}},i=function(e){return E(v,e)}}else{var C=h("state");p[C]=!0,r=function(e,t){if(f(e,C))throw new m("Object already initialized");return t.facade=e,c(e,C,t),t},o=function(e){return f(e,C)?e[C]:{}},i=function(e){return f(e,C)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw m("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";var r,o=n(29),i=n(35),a=n(113).f,s=n(133),u=n(74),l=n(244),c=n(90),f=n(246),d=n(132),h=i("".startsWith),p=i("".slice),m=Math.min,y=f("startsWith");o({target:"String",proto:!0,forced:!!(d||y||(r=a(String.prototype,"startsWith"),!r||r.writable))&&!y},{startsWith:function(e){var t=u(c(this));l(e);var n=s(m(arguments.length>1?arguments[1]:void 0,t.length)),r=u(e);return h?h(t,r,n):p(t,n,n+r.length)===r}})},function(e,t,n){"use strict";n.r(t),n.d(t,"FormulaVertex",(function(){return C})),n.d(t,"ArrayVertex",(function(){return b})),n.d(t,"FormulaCellVertex",(function(){return w}));n(8),n(9),n(0),n(10),n(3),n(2),n(4),n(12),n(24),n(21),n(25),n(7);var r=n(84),o=n(126),i=n(363),a=n(22),s=n(43),u=n(48),l=n(181);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function T(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var C=function(){function e(t,n,r){g(this,e),this.formula=t,this.cellAddress=n,this.version=r}return T(e,[{key:"width",get:function(){return 1}},{key:"height",get:function(){return 1}},{key:"getFormula",value:function(e){return this.ensureRecentData(e),this.formula}},{key:"ensureRecentData",value:function(e){if(this.version!=e.version()){var t=y(e.applyTransformations(this.formula,this.cellAddress,this.version),3),n=t[0],r=t[1],o=t[2];this.formula=n,this.cellAddress=r,this.version=o}}},{key:"getAddress",value:function(e){return this.ensureRecentData(e),this.cellAddress}}],[{key:"fromAst",value:function(e,t,n,r){return n.isScalar()?new w(e,t,r):new b(e,t,n,r)}}]),e}(),b=function(e){f(n,e);var t=h(n);function n(e,r,u){var l,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return g(this,n),l=t.call(this,e,r,c),u.isRef?l.array=new i.ErroredArray(new a.CellError(a.ErrorType.REF,s.ErrorMessage.NoSpaceForArrayResult),o.ArraySize.error()):l.array=new i.NotComputedArray(u),l}return T(n,[{key:"width",get:function(){return this.array.width()}},{key:"height",get:function(){return this.array.height()}},{key:"sheet",get:function(){return this.cellAddress.sheet}},{key:"leftCorner",get:function(){return this.cellAddress}},{key:"setCellValue",value:function(e){if(e instanceof a.CellError)return this.setErrorValue(e),e;var t=i.ArrayValue.fromInterpreterValue(e);return t.resize(this.array.size),this.array=t,e}},{key:"getCellValue",value:function(){if(this.array instanceof i.NotComputedArray)throw Error("Array not computed yet.");return this.array.simpleRangeValue()}},{key:"valueOrUndef",value:function(){if(!(this.array instanceof i.NotComputedArray))return this.array.simpleRangeValue()}},{key:"getArrayCellValue",value:function(e){var t=e.col-this.cellAddress.col,n=e.row-this.cellAddress.row;try{return this.array.get(t,n)}catch(e){return new a.CellError(a.ErrorType.REF)}}},{key:"getArrayCellRawValue",value:function(e){var t=this.getArrayCellValue(e);return t instanceof a.CellError||t===u.EmptyValue?void 0:Object(u.getRawValue)(t)}},{key:"setArrayCellValue",value:function(e,t){var n=e.col-this.cellAddress.col,r=e.row-this.cellAddress.row;this.array instanceof i.ArrayValue&&this.array.set(n,r,t)}},{key:"setNoSpace",value:function(){return this.array=new i.ErroredArray(new a.CellError(a.ErrorType.SPILL,s.ErrorMessage.NoSpaceForArrayResult),o.ArraySize.error()),this.getCellValue()}},{key:"getRange",value:function(){return r.AbsoluteCellRange.spanFrom(this.cellAddress,this.width,this.height)}},{key:"getRangeOrUndef",value:function(){return r.AbsoluteCellRange.spanFromOrUndef(this.cellAddress,this.width,this.height)}},{key:"setAddress",value:function(e){this.cellAddress=e}},{key:"setFormula",value:function(e){this.formula=e}},{key:"spansThroughSheetRows",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;return this.cellAddress.sheet===e&&this.cellAddress.row<=n&&t<this.cellAddress.row+this.height}},{key:"spansThroughSheetColumn",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;return this.cellAddress.sheet===e&&this.cellAddress.col<=n&&t<this.cellAddress.col+this.width}},{key:"isComputed",value:function(){return!(this.array instanceof i.NotComputedArray)}},{key:"columnsFromArray",value:function(){return l.ColumnsSpan.fromNumberOfColumns(this.cellAddress.sheet,this.cellAddress.col,this.width)}},{key:"rowsFromArray",value:function(){return l.RowsSpan.fromNumberOfRows(this.cellAddress.sheet,this.cellAddress.row,this.height)}},{key:"ensureRecentData",value:function(e){}},{key:"isLeftCorner",value:function(e){return Object(a.equalSimpleCellAddress)(this.cellAddress,e)}},{key:"setErrorValue",value:function(e){this.array=new i.ErroredArray(e,this.array.size)}}]),n}(C),w=function(e){f(n,e);var t=h(n);function n(e,r,o){return g(this,n),t.call(this,e,r,o)}return T(n,[{key:"valueOrUndef",value:function(){return this.cachedCellValue}},{key:"setCellValue",value:function(e){return this.cachedCellValue=e,this.cachedCellValue}},{key:"getCellValue",value:function(){if(void 0!==this.cachedCellValue)return this.cachedCellValue;throw Error("Value of the formula cell is not computed.")}},{key:"isComputed",value:function(){return void 0!==this.cachedCellValue}}]),n}(C)},function(e,t,n){"use strict";t.__esModule=!0,t.CLONE_TYPES=t.CLONE_TOP_LEFT_CORNER=t.CLONE_TOP=t.CLONE_LEFT=t.CLONE_BOTTOM_LEFT_CORNER=t.CLONE_BOTTOM=void 0;t.CLONE_TOP="top";t.CLONE_BOTTOM="bottom";t.CLONE_LEFT="left";t.CLONE_TOP_LEFT_CORNER="top_left_corner";t.CLONE_BOTTOM_LEFT_CORNER="bottom_left_corner";var r=["top","bottom","left","top_left_corner","bottom_left_corner"];t.CLONE_TYPES=r},function(e,t,n){var r=n(785);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n(3),n(0),n(2),n(11),n(4),n(17);var r=n(1),o=n(18);t.__esModule=!0,t.UNDO=t.SEPARATOR=t.ROW_BELOW=t.ROW_ABOVE=t.REMOVE_ROW=t.REMOVE_COLUMN=t.REDO=t.READ_ONLY=t.NO_ITEMS=t.ITEMS=t.COLUMN_RIGHT=t.COLUMN_LEFT=t.CLEAR_COLUMN=t.ALIGNMENT=void 0,t.addItem=function(e,t){-1===w.indexOf(e)&&(R[e]=t)},t.predefinedItems=function(){var e={};return(0,a.objectEach)(R,(function(t,n){e[n]=t()})),e},n(31);var i=r(n(54)),a=n(14),s=b(n(887));t.ALIGNMENT=s.KEY;var u=b(n(888));t.CLEAR_COLUMN=u.KEY;var l=b(n(889));t.COLUMN_LEFT=l.KEY;var c=b(n(890));t.COLUMN_RIGHT=c.KEY;var f=b(n(891));t.READ_ONLY=f.KEY;var d=b(n(892));t.REDO=d.KEY;var h=b(n(893));t.REMOVE_COLUMN=h.KEY;var p=b(n(894));t.REMOVE_ROW=p.KEY;var m=b(n(895));t.ROW_ABOVE=m.KEY;var y=b(n(896));t.ROW_BELOW=y.KEY;var v=b(n(309));t.SEPARATOR=v.KEY;var g=b(n(897));t.NO_ITEMS=g.KEY;var E,T=b(n(898));function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(C=function(e){return e?n:t})(e)}function b(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=C(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}t.UNDO=T.KEY;var w=[m.KEY,y.KEY,l.KEY,c.KEY,u.KEY,p.KEY,h.KEY,T.KEY,d.KEY,f.KEY,s.KEY,v.KEY,g.KEY];t.ITEMS=w;var R=(E={},(0,i.default)(E,v.KEY,v.default),(0,i.default)(E,g.KEY,g.default),(0,i.default)(E,m.KEY,m.default),(0,i.default)(E,y.KEY,y.default),(0,i.default)(E,l.KEY,l.default),(0,i.default)(E,c.KEY,c.default),(0,i.default)(E,u.KEY,u.default),(0,i.default)(E,p.KEY,p.default),(0,i.default)(E,h.KEY,h.default),(0,i.default)(E,T.KEY,T.default),(0,i.default)(E,d.KEY,d.default),(0,i.default)(E,f.KEY,f.default),(0,i.default)(E,s.KEY,s.default),E)},function(e,t,n){var r=n(35),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},function(e,t,n){var r=n(28),o=n(61),i=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e]):r[e]&&r[e][t]}},function(e,t,n){var r=n(35);e.exports=r({}.isPrototypeOf)},function(e,t,n){var r=n(72),o=n(82),i=n(163);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){var t=+e;return t!=t||0===t?0:(t>0?r:n)(t)}},function(e,t,n){"use strict";n.r(t);var r=n(339);n.d(t,"DependencyGraph",(function(){return r.DependencyGraph}));var o=n(271);n.d(t,"AddressMapping",(function(){return o.AddressMapping}));var i=n(274);n.d(t,"Graph",(function(){return i.Graph}));var a=n(275);n.d(t,"RangeMapping",(function(){return a.RangeMapping}));var s=n(276);n.d(t,"SheetMapping",(function(){return s.SheetMapping}));var u=n(272);n.d(t,"ArrayMapping",(function(){return u.ArrayMapping}));var l=n(116);n.d(t,"FormulaCellVertex",(function(){return l.FormulaCellVertex}));var c=n(365);n.d(t,"EmptyCellVertex",(function(){return c.EmptyCellVertex}));var f=n(366);n.d(t,"ValueCellVertex",(function(){return f.ValueCellVertex}));var d=n(367);n.d(t,"ParsingErrorVertex",(function(){return d.ParsingErrorVertex}));var h=n(273);n.d(t,"RangeVertex",(function(){return h.RangeVertex}));var p=n(279);n.d(t,"SparseStrategy",(function(){return p.SparseStrategy}));var m=n(280);n.d(t,"DenseStrategy",(function(){return m.DenseStrategy})),n.d(t,"ArrayVertex",(function(){return l.ArrayVertex}))},function(e,t,n){"use strict";n.r(t),n.d(t,"ArraySize",(function(){return h})),n.d(t,"ArraySizePredictor",(function(){return p}));n(37),n(12),n(100),n(8),n(9),n(0),n(10),n(3),n(2),n(4),n(21),n(24);var r=n(84),o=n(182),i=n(38),a=n(70);function s(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var h=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(c(this,e),this.width=t,this.height=n,this.isRef=r,t<=0||n<=0)throw Error("Incorrect array size")}return d(e,[{key:"isScalar",value:function(){return this.width<=1&&this.height<=1||this.isRef}}],[{key:"fromArray",value:function(t){return new e(t.length>0?t[0].length:0,t.length)}},{key:"error",value:function(){return new e(1,1,!0)}},{key:"scalar",value:function(){return new e(1,1,!1)}}]),e}();var p=function(){function e(t,n){c(this,e),this.config=t,this.functionRegistry=n}return d(e,[{key:"checkArraySize",value:function(e,t){return this.checkArraySizeForAst(e,{formulaAddress:t,arraysFlag:this.config.useArrayArithmetic})}},{key:"checkArraySizeForFunction",value:function(e,t){var n=this,r=this.functionRegistry.getMetadata(e.procedureName),a=this.functionRegistry.getArraySizeFunction(e.procedureName);if(void 0!==a)return a(e,t);var u=e.args.map((function(e){var i;return n.checkArraySizeForAst(e,new o.InterpreterState(t.formulaAddress,t.arraysFlag||null!==(i=null==r?void 0:r.arrayFunction)&&void 0!==i&&i))}));if(void 0===r||r.expandRanges||!t.arraysFlag||r.vectorizationForbidden||void 0===r.parameters)return new h(1,1);var l=s(r.parameters);if(void 0===r.repeatLastArgs&&l.length<u.length)return h.error();if(void 0!==r.repeatLastArgs&&l.length<u.length&&(u.length-l.length)%r.repeatLastArgs!=0)return h.error();for(;l.length<u.length;)l.push.apply(l,s(l.slice(l.length-r.repeatLastArgs)));for(var c=1,f=1,d=0;d<u.length;d++)l[d].argumentType!==i.ArgumentTypes.RANGE&&l[d].argumentType!==i.ArgumentTypes.ANY&&(f=Math.max(f,u[d].height),c=Math.max(c,u[d].width));return new h(c,f)}},{key:"checkArraySizeForAst",value:function(e,t){var n,o,i,l=this;switch(e.type){case a.AstNodeType.FUNCTION_CALL:return this.checkArraySizeForFunction(e,t);case a.AstNodeType.COLUMN_RANGE:case a.AstNodeType.ROW_RANGE:case a.AstNodeType.CELL_RANGE:var c=r.AbsoluteCellRange.fromAstOrUndef(e,t.formulaAddress);return void 0===c?h.error():new h(c.width(),c.height(),!0);case a.AstNodeType.ARRAY:var f,d=[],p=[],m=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=u(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(e.args);try{for(m.s();!(f=m.n()).done;){var y=f.value.map((function(e){return l.checkArraySizeForAst(e,t)})),v=Math.min.apply(Math,s(y.map((function(e){return e.height})))),g=y.reduce((function(e,t){return e+t.width}),0);d.push(v),p.push(g)}}catch(e){m.e(e)}finally{m.f()}var E=d.reduce((function(e,t){return e+t}),0),T=Math.min.apply(Math,p);return new h(T,E);case a.AstNodeType.STRING:case a.AstNodeType.NUMBER:return h.scalar();case a.AstNodeType.CELL_REFERENCE:return new h(1,1,!0);case a.AstNodeType.DIV_OP:case a.AstNodeType.CONCATENATE_OP:case a.AstNodeType.EQUALS_OP:case a.AstNodeType.GREATER_THAN_OP:case a.AstNodeType.GREATER_THAN_OR_EQUAL_OP:case a.AstNodeType.LESS_THAN_OP:case a.AstNodeType.LESS_THAN_OR_EQUAL_OP:case a.AstNodeType.MINUS_OP:case a.AstNodeType.NOT_EQUAL_OP:case a.AstNodeType.PLUS_OP:case a.AstNodeType.POWER_OP:case a.AstNodeType.TIMES_OP:var C=this.checkArraySizeForAst(e.left,t),b=this.checkArraySizeForAst(e.right,t);return!t.arraysFlag&&(C.height>1||C.width>1||b.height>1||b.width>1)?h.error():(o=C,i=b,new h(Math.max(o.width,i.width),Math.max(o.height,i.height)));case a.AstNodeType.MINUS_UNARY_OP:case a.AstNodeType.PLUS_UNARY_OP:case a.AstNodeType.PERCENT_OP:var w=this.checkArraySizeForAst(e.value,t);return!t.arraysFlag&&(w.height>1||w.width>1)?h.error():new h((n=w).width,n.height);case a.AstNodeType.PARENTHESIS:return this.checkArraySizeForAst(e.expression,t);case a.AstNodeType.EMPTY:default:return h.error()}}}]),e}()},function(e,t,n){"use strict";n.r(t);var r=n(362);n.d(t,"EmptyStatistics",(function(){return r.EmptyStatistics}));var o=n(269);n.d(t,"Statistics",(function(){return o.Statistics}));var i=n(270);n.d(t,"StatType",(function(){return i.StatType}))},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.cancelAnimationFrame=function(e){f.call(window,e)},t.getComparisonFunction=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(a)return a;a="object"===("undefined"==typeof Intl?"undefined":(0,o.default)(Intl))?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?function(e,t){return"".concat(e).localeCompare(t)}:function(e,t){return e===t?0:e>t?-1:1};return a},t.hasCaptionProblem=function(){void 0===i&&function(){var e=document.createElement("TABLE");e.style.borderSpacing="0",e.style.borderWidth="0",e.style.padding="0";var t=document.createElement("TBODY");e.appendChild(t),t.appendChild(document.createElement("TR")),t.firstChild.appendChild(document.createElement("TD")),t.firstChild.firstChild.innerHTML="<tr><td>t<br>t</td></tr>";var n=document.createElement("CAPTION");n.innerHTML="c<br>c<br>c<br>c",n.style.padding="0",n.style.margin="0",e.insertBefore(n,t),document.body.appendChild(e),i=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}();return i},t.isClassListSupported=function(){return!!document.documentElement.classList},t.isGetComputedStyleSupported=function(){return!!window.getComputedStyle},t.isPassiveEventSupported=function(){if(void 0!==s)return s;try{var e={get passive(){s=!0}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){s=!1}return s},t.isTextContentSupported=function(){return!!document.createTextNode("test").textContent},t.isTouchSupported=function(){return"ontouchstart"in window},t.requestAnimationFrame=function(e){return c.call(window,e)};var o=r(n(18));n(75);for(var i,a,s,u=0,l=["ms","moz","webkit","o"],c=window.requestAnimationFrame,f=window.cancelAnimationFrame,d=0;d<l.length&&!c;++d)c=window["".concat(l[d],"RequestAnimationFrame")],f=window["".concat(l[d],"CancelAnimationFrame")]||window["".concat(l[d],"CancelRequestAnimationFrame")];c||(c=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-u)),r=window.setTimeout((function(){e(t+n)}),n);return u=t+n,r}),f||(f=function(e){clearTimeout(e)})},function(e,t,n){"use strict";n(77),t.__esModule=!0;var r=n(610);t.registerRootComparator=r.registerRootComparator,t.getRootComparator=r.getRootComparator,t.getCompareFunctionFactory=r.getCompareFunctionFactory;var o=n(874);t.FIRST_AFTER_SECOND=o.FIRST_AFTER_SECOND,t.FIRST_BEFORE_SECOND=o.FIRST_BEFORE_SECOND,t.DO_NOT_SWAP=o.DO_NOT_SWAP,t.sort=o.sort},function(e,t,n){var r=n(121);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(147);e.exports=function(e,t){var n=e[t];return null==n?void 0:r(n)}},function(e,t){e.exports=!1},function(e,t,n){var r=n(124),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=Function.prototype,r=n.apply,o=n.bind,i=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(o?i.bind(r):function(){return i.apply(r,arguments)})},function(e,t,n){var r,o=n(64),i=n(327),a=n(238),s=n(166),u=n(328),l=n(201),c=n(202),f=c("IE_PROTO"),d=function(){},h=function(e){return"<script>"+e+"<\/script>"},p=function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t;m="undefined"!=typeof document?document.domain&&r?p(r):((t=l("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F):p(r);for(var n=a.length;n--;)delete m.prototype[a[n]];return m()};s[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=o(e),n=new d,d.prototype=null,n[f]=e):n=m(),void 0===t?n:i.f(n,t)}},function(e,t,n){var r=n(172),o=n(35),i=n(164),a=n(91),s=n(98),u=n(250),l=o([].push),c=function(e){var t=1==e,n=2==e,o=3==e,c=4==e,f=6==e,d=7==e,h=5==e||f;return function(p,m,y,v){for(var g,E,T=a(p),C=i(T),b=r(m,y),w=s(C),R=0,O=v||u,S=t?O(p,w):n||d?O(p,0):void 0;w>R;R++)if((h||R in C)&&(E=b(g=C[R],R,T),e))if(t)S[R]=E;else if(E)switch(e){case 3:return!0;case 5:return g;case 6:return R;case 2:l(S,g)}else switch(e){case 4:return!1;case 7:l(S,g)}return f?-1:o||c?c:S}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},function(e,t,n){"use strict";n.r(t),n.d(t,"GAstVisitor",(function(){return o}));var r=n(55),o=function(){function e(){}return e.prototype.visit=function(e){var t=e;switch(t.constructor){case r.NonTerminal:return this.visitNonTerminal(t);case r.Flat:return this.visitFlat(t);case r.Option:return this.visitOption(t);case r.RepetitionMandatory:return this.visitRepetitionMandatory(t);case r.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(t);case r.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(t);case r.Repetition:return this.visitRepetition(t);case r.Alternation:return this.visitAlternation(t);case r.Terminal:return this.visitTerminal(t);case r.Rule:return this.visitRule(t);default:throw Error("non exhaustive match")}},e.prototype.visitNonTerminal=function(e){},e.prototype.visitFlat=function(e){},e.prototype.visitOption=function(e){},e.prototype.visitRepetition=function(e){},e.prototype.visitRepetitionMandatory=function(e){},e.prototype.visitRepetitionMandatoryWithSeparator=function(e){},e.prototype.visitRepetitionWithSeparator=function(e){},e.prototype.visitAlternation=function(e){},e.prototype.visitTerminal=function(e){},e.prototype.visitRule=function(e){},e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"defaultParserErrorProvider",(function(){return u})),n.d(t,"defaultGrammarResolverErrorProvider",(function(){return l})),n.d(t,"defaultGrammarValidatorErrorProvider",(function(){return c}));var r=n(96),o=n(46),i=n(55),a=n(178),s=n(214),u={buildMismatchTokenMessage:function(e){var t=e.expected,n=e.actual;e.previous,e.ruleName;return"Expecting "+(Object(r.hasTokenLabel)(t)?"--\x3e "+Object(r.tokenLabel)(t)+" <--":"token of type --\x3e "+t.name+" <--")+" but found --\x3e '"+n.image+"' <--"},buildNotAllInputParsedMessage:function(e){var t=e.firstRedundant;e.ruleName;return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage:function(e){var t=e.expectedPathsPerAlt,n=e.actual,i=(e.previous,e.customUserDescription),a=(e.ruleName,"\nbut found: '"+Object(o.first)(n).image+"'");if(i)return"Expecting: "+i+a;var s=Object(o.reduce)(t,(function(e,t){return e.concat(t)}),[]),u=Object(o.map)(s,(function(e){return"["+Object(o.map)(e,(function(e){return Object(r.tokenLabel)(e)})).join(", ")+"]"}));return"Expecting: "+("one of these possible Token sequences:\n"+Object(o.map)(u,(function(e,t){return" "+(t+1)+". "+e})).join("\n"))+a},buildEarlyExitMessage:function(e){var t=e.expectedIterationPaths,n=e.actual,i=e.customUserDescription,a=(e.ruleName,"\nbut found: '"+Object(o.first)(n).image+"'");return i?"Expecting: "+i+a:"Expecting: "+("expecting at least one iteration which starts with one of these possible Token sequences::\n <"+Object(o.map)(t,(function(e){return"["+Object(o.map)(e,(function(e){return Object(r.tokenLabel)(e)})).join(",")+"]"})).join(" ,")+">")+a}};Object.freeze(u);var l={buildRuleNotFoundError:function(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"}},c={buildDuplicateFoundError:function(e,t){var n,r=e.name,s=Object(o.first)(t),u=s.idx,l=Object(a.getProductionDslName)(s),c=(n=s)instanceof i.Terminal?n.terminalType.name:n instanceof i.NonTerminal?n.nonTerminalName:"",f="->"+l+(u>0?u:"")+"<- "+(c?"with argument: ->"+c+"<-":"")+"\n appears more than once ("+t.length+" times) in the top level rule: ->"+r+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return f=(f=f.replace(/[ \t]+/g," ")).replace(/\s\s+/g,"\n")},buildInvalidNestedRuleNameError:function(e,t){return"Invalid nested rule name: ->"+t.name+"<- inside rule: ->"+e.name+"<-\nit must match the pattern: ->"+s.validNestedRuleName.toString()+"<-.\nNote that this means a nested rule name must start with the '$'(dollar) sign."},buildDuplicateNestedRuleNameError:function(e,t){return"Duplicate nested rule name: ->"+Object(o.first)(t).name+"<- inside rule: ->"+e.name+"<-\nA nested name must be unique in the scope of a top level grammar rule."},buildNamespaceConflictError:function(e){return"Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+e.name+">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter."},buildAlternationPrefixAmbiguityError:function(e){var t=Object(o.map)(e.prefixPath,(function(e){return Object(r.tokenLabel)(e)})).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;return"Ambiguous alternatives: <"+e.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\nin <OR"+n+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\nSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details."},buildAlternationAmbiguityError:function(e){var t=Object(o.map)(e.prefixPath,(function(e){return Object(r.tokenLabel)(e)})).join(", "),n=0===e.alternation.idx?"":e.alternation.idx,i="Ambiguous Alternatives Detected: <"+e.ambiguityIndices.join(" ,")+"> in <OR"+n+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\n";return i+="See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details."},buildEmptyRepetitionError:function(e){var t=Object(a.getProductionDslName)(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),"The repetition <"+t+"> within Rule <"+e.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop."},buildTokenNameError:function(e){return"Invalid Grammar Token name: ->"+e.tokenType.name+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-"},buildEmptyAlternationError:function(e){return"Ambiguous empty alternative: <"+(e.emptyChoiceIdx+1)+"> in <OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative."},buildTooManyAlternativesError:function(e){return"An Alternation cannot have more than 256 alternatives:\n<OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\n has "+(e.alternation.definition.length+1)+" alternatives."},buildLeftRecursionError:function(e){var t=e.topLevelRule.name;return"Left Recursion found in grammar.\nrule: <"+t+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+(t+" --\x3e "+o.map(e.leftRecursionPath,(function(e){return e.name})).concat([t]).join(" --\x3e "))+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring."},buildInvalidRuleNameError:function(e){return"Invalid grammar rule name: ->"+e.topLevelRule.name+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-"},buildDuplicateRuleNameError:function(e){return"Duplicate definition, rule: ->"+(e.topLevelRule instanceof i.Rule?e.topLevelRule.name:e.topLevelRule)+"<- is already defined in the grammar: ->"+e.grammarName+"<-"}}},function(e,t,n){var r=n(29),o=n(670),i=n(174);r({target:"Array",proto:!0},{fill:o}),i("fill")},function(e,t,n){"use strict";var r=n(29),o=n(35),i=n(170),a=o([].reverse),s=[1,2];r({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a(this)}})},function(e,t,n){"use strict";n.r(t),n.d(t,"Transformer",(function(){return l}));n(88),n(37),n(12),n(0),n(24),n(21),n(2),n(8),n(9),n(10),n(3),n(4);var r=n(22),o=n(70);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,s;return t=e,(n=[{key:"performEagerTransformations",value:function(e,t){var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}(e.arrayFormulaNodes());try{for(r.s();!(n=r.n()).done;){var o=n.value,s=i(this.transformSingleAst(o.getFormula(e.lazilyTransformingAstService),o.getAddress(e.lazilyTransformingAstService)),2),u=s[0],l=s[1],c=t.rememberNewAst(u);o.setFormula(c),o.setAddress(l)}}catch(e){r.e(e)}finally{r.f()}}},{key:"transformSingleAst",value:function(e,t){return[this.transformAst(e,t),this.fixNodeAddress(t)]}},{key:"transformAst",value:function(e,t){var n=this;switch(e.type){case o.AstNodeType.CELL_REFERENCE:return this.transformCellReferenceAst(e,t);case o.AstNodeType.CELL_RANGE:return this.transformCellRangeAst(e,t);case o.AstNodeType.COLUMN_RANGE:return this.transformColumnRangeAst(e,t);case o.AstNodeType.ROW_RANGE:return this.transformRowRangeAst(e,t);case o.AstNodeType.EMPTY:case o.AstNodeType.ERROR:case o.AstNodeType.NUMBER:case o.AstNodeType.NAMED_EXPRESSION:case o.AstNodeType.ERROR_WITH_RAW_INPUT:case o.AstNodeType.STRING:return e;case o.AstNodeType.PERCENT_OP:case o.AstNodeType.MINUS_UNARY_OP:case o.AstNodeType.PLUS_UNARY_OP:return Object.assign(Object.assign({},e),{value:this.transformAst(e.value,t)});case o.AstNodeType.FUNCTION_CALL:return Object.assign(Object.assign({},e),{procedureName:e.procedureName,args:e.args.map((function(e){return n.transformAst(e,t)}))});case o.AstNodeType.PARENTHESIS:return Object.assign(Object.assign({},e),{expression:this.transformAst(e.expression,t)});case o.AstNodeType.ARRAY:return Object.assign(Object.assign({},e),{args:e.args.map((function(e){return e.map((function(e){return n.transformAst(e,t)}))}))});default:return Object.assign(Object.assign({},e),{left:this.transformAst(e.left,t),right:this.transformAst(e.right,t)})}}},{key:"transformCellReferenceAst",value:function(e,t){var n=this.transformCellAddress(e.reference,t);return n instanceof o.CellAddress?Object.assign(Object.assign({},e),{reference:n}):n===r.ErrorType.REF?Object(o.buildCellErrorAst)(new r.CellError(r.ErrorType.REF)):e}},{key:"transformCellRangeAst",value:function(e,t){var n=this.transformCellRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===r.ErrorType.REF?Object(o.buildCellErrorAst)(new r.CellError(r.ErrorType.REF)):e}},{key:"transformColumnRangeAst",value:function(e,t){var n=this.transformColumnRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===r.ErrorType.REF?Object(o.buildCellErrorAst)(new r.CellError(r.ErrorType.REF)):e}},{key:"transformRowRangeAst",value:function(e,t){var n=this.transformRowRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===r.ErrorType.REF?Object(o.buildCellErrorAst)(new r.CellError(r.ErrorType.REF)):e}}])&&u(t.prototype,n),s&&u(t,s),e}()},function(e,t,n){"use strict";var r=n(29),o=n(136).find,i=n(174),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("find")},function(e,t,n){var r=n(29),o=Math.ceil,i=Math.floor;r({target:"Math",stat:!0},{trunc:function(e){return(e>0?i:o)(e)}})},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.cellMethodLookupFactory=function(e,t){var n=void 0===t||t;return function(t,r){return function t(r){if(r){if((0,a.hasOwnProperty)(r,e)&&void 0!==r[e])return r[e];if((0,a.hasOwnProperty)(r,"type")&&r.type){if("string"!=typeof r.type)throw new Error('Cell "type" must be a string');var o=(0,i.getCellType)(r.type);if((0,a.hasOwnProperty)(o,e))return o[e];if(n)return}return t(Object.getPrototypeOf(r))}}("number"==typeof t?this.getCellMeta(t,r):t)}},t.countFirstRowKeys=function(e){var t=0;Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&(0,a.isObject)(e[0])&&(t=(0,a.deepObjectSize)(e[0])));return t},t.createEmptySpreadsheetData=function(e,t){for(var n,r=[],o=0;o<e;o++){n=[];for(var i=0;i<t;i++)n.push("");r.push(n)}return r},t.createSpreadsheetData=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,o=[];for(e=0;e<n;e++){var i=[];for(t=0;t<r;t++)i.push(u(t)+(e+1));o.push(i)}return o},t.createSpreadsheetObjectData=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,o=[];for(e=0;e<n;e++){var i={};for(t=0;t<r;t++)i["prop".concat(t)]=u(t)+(e+1);o.push(i)}return o},t.dataRowToChangesArray=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e,r=[];Array.isArray(e)&&Array.isArray(e[0])||(n=[e]);return n.forEach((function(e,n){Array.isArray(e)?e.forEach((function(e,o){r.push([n+t,o,e])})):Object.keys(e).forEach((function(o){r.push([n+t,o,e[o]])}))})),r},t.isArrayOfArrays=function(e){return!!(Array.isArray(e)&&e.length&&e.every((function(e){return Array.isArray(e)})))},t.isArrayOfObjects=function(e){return!!(Array.isArray(e)&&e.length&&e.every((function(e){return"object"===(0,o.default)(e)&&!Array.isArray(e)&&null!==e})))},t.spreadsheetColumnIndex=function(e){var t=0;if(e)for(var n=0,r=e.length-1;n<e.length;n+=1,r-=1)t+=Math.pow(s,r)*("ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(e[n])+1);return t-=1},t.spreadsheetColumnLabel=u;var o=r(n(18));n(25),n(0),n(26),n(52);var i=n(160),a=n(14),s="ABCDEFGHIJKLMNOPQRSTUVWXYZ".length;function u(e){for(var t,n=e+1,r="";n>0;)t=(n-1)%s,r=String.fromCharCode(65+t)+r,n=parseInt((n-t)/s,10);return r}},function(e,t,n){"use strict";t.__esModule=!0,t.TextEditor=t.EDITOR_TYPE=void 0;var r=n(803);t.EDITOR_TYPE=r.EDITOR_TYPE,t.TextEditor=r.TextEditor},function(e,t,n){"use strict";t.__esModule=!0,t.textRenderer=t.RENDERER_TYPE=void 0;var r=n(806);t.RENDERER_TYPE=r.RENDERER_TYPE,t.textRenderer=r.textRenderer},function(e,t,n){var r=n(28),o=n(61),i=n(198),a=r.TypeError;e.exports=function(e){if(o(e))return e;throw a(i(e)+" is not a function")}},function(e,t,n){var r=n(324),o=n(238).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(124),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},function(e,t,n){"use strict";var r=n(196),o=n(82),i=n(163);e.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},function(e,t,n){"use strict";var r=n(41);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"LexerDefinitionErrorType",(function(){return r})),n.d(t,"Lexer",(function(){return c}));var r,o=n(351),i=n(46),a=n(177),s=n(263),u=n(262);!function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"}(r||(r={}));var l={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:s.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(l);var c=function(){function e(e,t){var n=this;if(void 0===t&&(t=l),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=Object(i.merge)(l,t);var r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(function(){var r,s=!0;n.TRACE_INIT("Lexer Config handling",(function(){if(n.config.lineTerminatorsPattern===l.lineTerminatorsPattern)n.config.lineTerminatorsPattern=o.LineTerminatorOptimizedTester;else if(n.config.lineTerminatorCharacters===l.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');n.trackStartLines=/full|onlyStart/i.test(n.config.positionTracking),n.trackEndLines=/full/i.test(n.config.positionTracking),Object(i.isArray)(e)?((r={modes:{}}).modes[o.DEFAULT_MODE]=Object(i.cloneArr)(e),r[o.DEFAULT_MODE]=o.DEFAULT_MODE):(s=!1,r=Object(i.cloneObj)(e))})),!1===n.config.skipValidations&&(n.TRACE_INIT("performRuntimeChecks",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(Object(o.performRuntimeChecks)(r,n.trackStartLines,n.config.lineTerminatorCharacters))})),n.TRACE_INIT("performWarningRuntimeChecks",(function(){n.lexerDefinitionWarning=n.lexerDefinitionWarning.concat(Object(o.performWarningRuntimeChecks)(r,n.trackStartLines,n.config.lineTerminatorCharacters))}))),r.modes=r.modes?r.modes:{},Object(i.forEach)(r.modes,(function(e,t){r.modes[t]=Object(i.reject)(e,(function(e){return Object(i.isUndefined)(e)}))}));var c=Object(i.keys)(r.modes);if(Object(i.forEach)(r.modes,(function(e,r){n.TRACE_INIT("Mode: <"+r+"> processing",(function(){var s;(n.modes.push(r),!1===n.config.skipValidations&&n.TRACE_INIT("validatePatterns",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(Object(o.validatePatterns)(e,c))})),Object(i.isEmpty)(n.lexerDefinitionErrors))&&(Object(a.augmentTokenTypes)(e),n.TRACE_INIT("analyzeTokenTypes",(function(){s=Object(o.analyzeTokenTypes)(e,{lineTerminatorCharacters:n.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:n.TRACE_INIT.bind(n)})})),n.patternIdxToConfig[r]=s.patternIdxToConfig,n.charCodeToPatternIdxToConfig[r]=s.charCodeToPatternIdxToConfig,n.emptyGroups=Object(i.merge)(n.emptyGroups,s.emptyGroups),n.hasCustom=s.hasCustom||n.hasCustom,n.canModeBeOptimized[r]=s.canBeOptimized)}))})),n.defaultMode=r.defaultMode,!Object(i.isEmpty)(n.lexerDefinitionErrors)&&!n.config.deferDefinitionErrorsHandling){var f=Object(i.map)(n.lexerDefinitionErrors,(function(e){return e.message})).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+f)}Object(i.forEach)(n.lexerDefinitionWarning,(function(e){Object(i.PRINT_WARNING)(e.message)})),n.TRACE_INIT("Choosing sub-methods implementations",(function(){if(o.SUPPORT_STICKY?(n.chopInput=i.IDENTITY,n.match=n.matchWithTest):(n.updateLastIndex=i.NOOP,n.match=n.matchWithExec),s&&(n.handleModes=i.NOOP),!1===n.trackStartLines&&(n.computeNewColumn=i.IDENTITY),!1===n.trackEndLines&&(n.updateTokenEndLineColumnLocation=i.NOOP),/full/i.test(n.config.positionTracking))n.createTokenInstance=n.createFullToken;else if(/onlyStart/i.test(n.config.positionTracking))n.createTokenInstance=n.createStartOnlyToken;else{if(!/onlyOffset/i.test(n.config.positionTracking))throw Error('Invalid <positionTracking> config option: "'+n.config.positionTracking+'"');n.createTokenInstance=n.createOffsetOnlyToken}n.hasCustom?(n.addToken=n.addTokenUsingPush,n.handlePayload=n.handlePayloadWithCustom):(n.addToken=n.addTokenUsingMemberAccess,n.handlePayload=n.handlePayloadNoCustom)})),n.TRACE_INIT("Failed Optimization Warnings",(function(){var e=Object(i.reduce)(n.canModeBeOptimized,(function(e,t,n){return!1===t&&e.push(n),e}),[]);if(t.ensureOptimizations&&!Object(i.isEmpty)(e))throw Error("Lexer Modes: < "+e.join(", ")+' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.')})),n.TRACE_INIT("clearRegExpParserCache",(function(){Object(u.clearRegExpParserCache)()})),n.TRACE_INIT("toFastProperties",(function(){Object(i.toFastProperties)(n)}))}))}return e.prototype.tokenize=function(e,t){if(void 0===t&&(t=this.defaultMode),!Object(i.isEmpty)(this.lexerDefinitionErrors)){var n=Object(i.map)(this.lexerDefinitionErrors,(function(e){return e.message})).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+n)}return this.tokenizeInternal(e,t)},e.prototype.tokenizeInternal=function(e,t){var n,r,a,s,u,l,c,f,d,h,p,m,y,v,g=this,E=e,T=E.length,C=0,b=0,w=this.hasCustom?0:Math.floor(e.length/10),R=new Array(w),O=[],S=this.trackStartLines?1:void 0,A=this.trackStartLines?1:void 0,N=Object(o.cloneEmptyGroups)(this.emptyGroups),M=this.trackStartLines,k=this.config.lineTerminatorsPattern,_=0,I=[],P=[],x=[],D=[];Object.freeze(D);var L=void 0;function F(){return I}function j(e){var t=Object(o.charCodeToOptimizedIndex)(e),n=P[t];return void 0===n?D:n}var U,H=function(e){if(1===x.length&&void 0===e.tokenType.PUSH_MODE){var t=g.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);O.push({offset:e.startOffset,line:void 0!==e.startLine?e.startLine:void 0,column:void 0!==e.startColumn?e.startColumn:void 0,length:e.image.length,message:t})}else{x.pop();var n=Object(i.last)(x);I=g.patternIdxToConfig[n],P=g.charCodeToPatternIdxToConfig[n],_=I.length;var r=g.canModeBeOptimized[n]&&!1===g.config.safeMode;L=P&&r?j:F}};function V(e){x.push(e),P=this.charCodeToPatternIdxToConfig[e],I=this.patternIdxToConfig[e],_=I.length,_=I.length;var t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;L=P&&t?j:F}for(V.call(this,t);C<T;){u=null;var B=E.charCodeAt(C),W=L(B),Y=W.length;for(n=0;n<Y;n++){var G=(U=W[n]).pattern;if(l=null,!1!==(te=U.short)?B===te&&(u=G):!0===U.isCustom?null!==(v=G.exec(E,C,R,N))?(u=v[0],void 0!==v.payload&&(l=v.payload)):u=null:(this.updateLastIndex(G,C),u=this.match(G,e,C)),null!==u){if(void 0!==(s=U.longerAlt)){var z=I[s],K=z.pattern;c=null,!0===z.isCustom?null!==(v=K.exec(E,C,R,N))?(a=v[0],void 0!==v.payload&&(c=v.payload)):a=null:(this.updateLastIndex(K,C),a=this.match(K,e,C)),a&&a.length>u.length&&(u=a,l=c,U=z)}break}}if(null!==u){if(f=u.length,void 0!==(d=U.group)&&(h=U.tokenTypeIdx,p=this.createTokenInstance(u,C,h,U.tokenType,S,A,f),this.handlePayload(p,l),!1===d?b=this.addToken(R,b,p):N[d].push(p)),e=this.chopInput(e,f),C+=f,A=this.computeNewColumn(A,f),!0===M&&!0===U.canLineTerminator){var X=0,q=void 0,Q=void 0;k.lastIndex=0;do{!0===(q=k.test(u))&&(Q=k.lastIndex-1,X++)}while(!0===q);0!==X&&(S+=X,A=f-Q,this.updateTokenEndLineColumnLocation(p,d,Q,X,S,A,f))}this.handleModes(U,H,V,p)}else{for(var $=C,Z=S,J=A,ee=!1;!ee&&C<T;)for(E.charCodeAt(C),e=this.chopInput(e,1),C++,r=0;r<_;r++){var te,ne=I[r];G=ne.pattern;if(!1!==(te=ne.short)?E.charCodeAt(C)===te&&(ee=!0):!0===ne.isCustom?ee=null!==G.exec(E,C,R,N):(this.updateLastIndex(G,C),ee=null!==G.exec(e)),!0===ee)break}m=C-$,y=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(E,$,m,Z,J),O.push({offset:$,line:Z,column:J,length:m,message:y})}}return this.hasCustom||(R.length=b),{tokens:R,groups:N,errors:O}},e.prototype.handleModes=function(e,t,n,r){if(!0===e.pop){var o=e.push;t(r),void 0!==o&&n.call(this,o)}else void 0!==e.push&&n.call(this,e.push)},e.prototype.chopInput=function(e,t){return e.substring(t)},e.prototype.updateLastIndex=function(e,t){e.lastIndex=t},e.prototype.updateTokenEndLineColumnLocation=function(e,t,n,r,o,i,a){var s,u;void 0!==t&&(u=(s=n===a-1)?-1:0,1===r&&!0===s||(e.endLine=o+u,e.endColumn=i-1-u))},e.prototype.computeNewColumn=function(e,t){return e+t},e.prototype.createTokenInstance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return null},e.prototype.createOffsetOnlyToken=function(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}},e.prototype.createStartOnlyToken=function(e,t,n,r,o,i){return{image:e,startOffset:t,startLine:o,startColumn:i,tokenTypeIdx:n,tokenType:r}},e.prototype.createFullToken=function(e,t,n,r,o,i,a){return{image:e,startOffset:t,endOffset:t+a-1,startLine:o,endLine:o,startColumn:i,endColumn:i+a-1,tokenTypeIdx:n,tokenType:r}},e.prototype.addToken=function(e,t,n){return 666},e.prototype.addTokenUsingPush=function(e,t,n){return e.push(n),t},e.prototype.addTokenUsingMemberAccess=function(e,t,n){return e[t]=n,++t},e.prototype.handlePayload=function(e,t){},e.prototype.handlePayloadNoCustom=function(e,t){},e.prototype.handlePayloadWithCustom=function(e,t){null!==t&&(e.payload=t)},e.prototype.match=function(e,t,n){return null},e.prototype.matchWithTest=function(e,t,n){return!0===e.test(t)?t.substring(n,e.lastIndex):null},e.prototype.matchWithExec=function(e,t){var n=e.exec(t);return null!==n?n[0]:n},e.prototype.TRACE_INIT=function(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(n+"--\x3e <"+e+">");var r=Object(i.timer)(t),o=r.time,a=r.value,s=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(n+"<-- <"+e+"> time: "+o+"ms"),this.traceInitIndent--,a}return t()},e.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",e.NA=/NOT_APPLICABLE/,e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"AddressDependency",(function(){return s})),n.d(t,"CellRangeDependency",(function(){return u})),n.d(t,"ColumnRangeDependency",(function(){return l})),n.d(t,"RowRangeDependency",(function(){return c})),n.d(t,"NamedExpressionDependency",(function(){return f}));n(24);var r=n(84);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var s=function(){function e(t){o(this,e),this.dependency=t}return a(e,[{key:"absolutize",value:function(e){return this.dependency.toSimpleCellAddress(e)}}]),e}(),u=function(){function e(t,n){o(this,e),this.start=t,this.end=n}return a(e,[{key:"absolutize",value:function(e){return new r.AbsoluteCellRange(this.start.toSimpleCellAddress(e),this.end.toSimpleCellAddress(e))}}]),e}(),l=function(){function e(t,n){o(this,e),this.start=t,this.end=n}return a(e,[{key:"absolutize",value:function(e){var t=this.start.toSimpleColumnAddress(e),n=this.end.toSimpleColumnAddress(e);return new r.AbsoluteColumnRange(t.sheet,t.col,n.col)}}]),e}(),c=function(){function e(t,n){o(this,e),this.start=t,this.end=n}return a(e,[{key:"absolutize",value:function(e){var t=this.start.toSimpleRowAddress(e),n=this.end.toSimpleRowAddress(e);return new r.AbsoluteRowRange(t.sheet,t.row,n.row)}}]),e}(),f=function(){function e(t){o(this,e),this.name=t}return a(e,[{key:"absolutize",value:function(e){return this}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"instanceOfSimpleDate",(function(){return c})),n.d(t,"instanceOfSimpleTime",(function(){return f})),n.d(t,"maxDate",(function(){return d})),n.d(t,"DateTimeHelper",(function(){return h})),n.d(t,"offsetMonth",(function(){return p})),n.d(t,"truncateDayInMonth",(function(){return m})),n.d(t,"roundToNearestSecond",(function(){return y})),n.d(t,"numberToSimpleTime",(function(){return v})),n.d(t,"timeToNumber",(function(){return g})),n.d(t,"toBasisEU",(function(){return E}));n(88),n(8),n(9),n(0),n(10),n(3),n(2),n(4),n(12),n(24),n(21);var r=n(48);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var u=[31,28,31,30,31,30,31,31,30,31,30,31],l=[0,31,59,90,120,151,181,212,243,273,304,334];function c(e){return!(!e||"object"!==s(e)&&"function"!=typeof e)&&("year"in e&&"number"==typeof e.year&&"month"in e&&"number"==typeof e.month&&"day"in e&&"number"==typeof e.day)}function f(e){return!(!e||"object"!==s(e)&&"function"!=typeof e)&&("hours"in e&&"number"==typeof e.hours&&"minutes"in e&&"number"==typeof e.minutes&&"seconds"in e&&"number"==typeof e.seconds)}var d={year:9999,month:12,day:31},h=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.minDateAboluteValue=this.dateToNumberFromZero(t.nullDate),this.maxDateValue=this.dateToNumber(d),this.leapYear1900=t.leapYear1900,!this.leapYear1900&&0<=this.dateToNumber({year:1900,month:2,day:28})?this.epochYearZero=this.numberToSimpleDate(2).year:this.epochYearZero=this.numberToSimpleDate(1).year,this.parseDateTime=t.parseDateTime}var t,n,i;return t=e,(n=[{key:"getWithinBounds",value:function(e){return e<=this.maxDateValue&&e>=0?e:void 0}},{key:"dateStringToDateNumber",value:function(e){var t=this.parseDateTimeFromConfigFormats(e),n=t.dateTime,o=t.dateFormat,i=void 0===o?"":o,a=t.timeFormat,s=void 0===a?"":a;if(void 0!==n)return f(n)?c(n)?new r.DateTimeNumber(g(n)+this.dateToNumber(n),i+" "+s):new r.TimeNumber(g(n),s):c(n)?new r.DateNumber(this.dateToNumber(n),i):0}},{key:"parseSingleFormat",value:function(e,t,n){var r=this.parseDateTime(e,t,n);if(!c(r)||(r.year>=0&&r.year<100&&(r.year<this.getNullYear()?r.year+=2e3:r.year+=1900),this.isValidDate(r)))return r}},{key:"parseDateTimeFromConfigFormats",value:function(e){return this.parseDateTimeFromFormats(e,this.config.dateFormats,this.config.timeFormats)}},{key:"parseDateTimeFromFormats",value:function(e,t,n){var r,i=0===t.length?[void 0]:t,a=0===n.length?[void 0]:n,s=o(i);try{for(s.s();!(r=s.n()).done;){var u,l=r.value,c=o(a);try{for(c.s();!(u=c.n()).done;){var f=u.value,d=this.parseSingleFormat(e,l,f);if(void 0!==d)return{dateTime:d,timeFormat:f,dateFormat:l}}}catch(e){c.e(e)}finally{c.f()}}}catch(e){s.e(e)}finally{s.f()}return{}}},{key:"getNullYear",value:function(){return this.config.nullYear}},{key:"getEpochYearZero",value:function(){return this.epochYearZero}},{key:"isValidDate",value:function(e){return!(isNaN(e.year)||isNaN(e.month)||isNaN(e.day)||e.day!==Math.round(e.day)||e.month!==Math.round(e.month)||e.year!==Math.round(e.year)||e.year<1582||e.month<1||e.month>12||e.day<1||!(this.isLeapYear(e.year)&&2===e.month?e.day<=29:e.day<=u[e.month-1]))}},{key:"dateToNumber",value:function(e){return this.dateToNumberFromZero(e)-this.minDateAboluteValue}},{key:"relativeNumberToAbsoluteNumber",value:function(e){return e+this.minDateAboluteValue-(this.leapYear1900?1:0)}},{key:"numberToSimpleDate",value:function(e){var t=Math.floor(e)+this.minDateAboluteValue,n=Math.floor(t/365.2425);this.dateToNumberFromZero({year:n+1,month:1,day:1})<=t?n++:this.dateToNumberFromZero({year:n-1,month:1,day:1})>t&&n--;var r=t-this.dateToNumberFromZero({year:n,month:1,day:1}),o=function(e){var t=0;return l[t+6]<=e&&(t+=6),l[t+3]<=e&&(t+=3),l[t+2]<=e?t+=2:l[t+1]<=e&&(t+=1),t}(r-(this.isLeapYear(n)&&r>=59?1:0));return{year:n,month:o+1,day:r-l[o]-(this.isLeapYear(n)&&o>1?1:0)+1}}},{key:"numberToSimpleDateTime",value:function(e){return Object.assign(Object.assign({},this.numberToSimpleDate(Math.floor(e))),v(e%1))}},{key:"leapYearsCount",value:function(e){return Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400)+(this.config.leapYear1900&&e>=1900?1:0)}},{key:"countLeapDays",value:function(e){return e.month>2||2===e.month&&e.day>=29?this.leapYearsCount(e.year):this.leapYearsCount(e.year-1)}},{key:"dateToNumberFromZero",value:function(e){return 365*e.year+l[e.month-1]+e.day-1+(e.month<=2?this.leapYearsCount(e.year-1):this.leapYearsCount(e.year))}},{key:"isLeapYear",value:function(e){return!(e%4)&&(!!(e%100)||!(e%400)||1900===e&&this.config.leapYear1900)}},{key:"daysInMonth",value:function(e,t){return this.isLeapYear(e)&&2===t?29:u[t-1]}},{key:"endOfMonth",value:function(e){return{year:e.year,month:e.month,day:this.daysInMonth(e.year,e.month)}}},{key:"toBasisUS",value:function(e,t){return 31===e.day&&(e.day=30),30===e.day&&31===t.day&&(t.day=30),2===e.month&&e.day===this.daysInMonth(e.year,e.month)&&(e.day=30,2===t.month&&t.day===this.daysInMonth(t.year,t.month)&&(t.day=30)),[e,t]}},{key:"yearLengthForBasis",value:function(e,t){return e.year!==t.year?e.year+1!==t.year||e.month<t.month||e.month===t.month&&e.day<t.day?(this.leapYearsCount(t.year)-this.leapYearsCount(e.year-1))/(t.year-e.year+1)+365:this.countLeapDays(t)!==this.countLeapDays({year:e.year,month:e.month,day:e.day-1})?366:365:this.isLeapYear(e.year)?366:365}}])&&a(t.prototype,n),i&&a(t,i),e}();function p(e,t){var n=12*e.year+e.month-1+t;return{year:Math.floor(n/12),month:n%12+1,day:e.day}}function m(e){return{year:e.year,month:e.month,day:Math.min(e.day,u[e.month-1])}}function y(e){return Math.round(3600*e*24)/86400}function v(e){e=Math.round(24*e*60*60*1e5)/864e7,e*=24;var t=Math.floor(e);e-=t,e*=60;var n=Math.floor(e);return e-=n,e*=60,{hours:t,minutes:n,seconds:Math.round(1e5*e)/1e5}}function g(e){return((e.seconds/60+e.minutes)/60+e.hours)/24}function E(e){return{year:e.year,month:e.month,day:Math.min(30,e.day)}}},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.default=void 0,n(21),n(2),n(42),n(0),n(26);var o=r(n(44)),i=r(n(32)),a=r(n(5)),s=r(n(6)),u=n(23),l=n(68),c=r(n(186)),f=r(n(559)),d=r(n(560)),h=n(563),p=r(n(742)),m=r(n(743)),y=n(566),v=n(117),g=function(){function e(t,n){var r=this;(0,a.default)(this,e),this.isMaster=!t.cloneOverlay,this.wot=t,this.instance=this.wot,this.TABLE=n,this.TBODY=null,this.THEAD=null,this.COLGROUP=null,this.tableOffset=0,this.holderOffset=0,this.hasTableHeight=!0,this.hasTableWidth=!0,this.isTableVisible=!1,(0,u.removeTextNodes)(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;var o=this.wot.wtSettings.settings.rowHeaderWidth;this.wot.wtSettings.settings.rowHeaderWidth=function(){return r._modifyRowHeaderWidth(o)},this.rowUtils=new m.default(this.wot),this.columnUtils=new p.default(this.wot),this.tableRenderer=new h.Renderer({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wot.wtSettings.settings.cellRenderer})}return(0,s.default)(e,[{key:"is",value:function(e){return(0,y.isOverlayTypeOf)(this.wot.cloneOverlay,e)}},{key:"fixTableDomTree",value:function(){var e=this.wot.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD)),this.wot.getSetting("columnHeaders").length&&!this.THEAD.childNodes.length&&this.THEAD.appendChild(e.createElement("TR"))}},{key:"createSpreader",value:function(e){var t,n=e.parentNode;return n&&n.nodeType===Node.ELEMENT_NODE&&(0,u.hasClass)(n,"wtHolder")||((t=this.wot.rootDocument.createElement("div")).className="wtSpreader",n&&n.insertBefore(t,e),t.appendChild(e)),t.style.position="relative",t}},{key:"createHider",value:function(e){var t,n=e.parentNode;return n&&n.nodeType===Node.ELEMENT_NODE&&(0,u.hasClass)(n,"wtHolder")||((t=this.wot.rootDocument.createElement("div")).className="wtHider",n&&n.insertBefore(t,e),t.appendChild(e)),t}},{key:"createHolder",value:function(e){var t,n=e.parentNode;return n&&n.nodeType===Node.ELEMENT_NODE&&(0,u.hasClass)(n,"wtHolder")||((t=this.wot.rootDocument.createElement("div")).style.position="relative",t.className="wtHolder",n&&n.insertBefore(t,e),this.isMaster&&(t.parentNode.className+="ht_master handsontable"),t.appendChild(e)),t}},{key:"draw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.wot,n=t.wtOverlays,r=t.wtViewport,o=t.getSetting("totalRows"),i=t.getSetting("totalColumns"),a=t.getSetting("rowHeaders"),s=a.length,l=t.getSetting("columnHeaders"),c=l.length,h=!1,p=e;if(this.isMaster&&(this.holderOffset=(0,u.offset)(this.holder),p=r.createRenderCalculators(p),s&&!t.getSetting("fixedColumnsLeft"))){var m=n.leftOverlay.getScrollPosition(),y=this.correctHeaderWidth;this.correctHeaderWidth=m>0,y!==this.correctHeaderWidth&&(p=!1)}if(this.isMaster&&(h=n.prepareOverlays()),p)this.isMaster&&r.createVisibleCalculators(),n&&n.refresh(!0);else{this.isMaster?this.tableOffset=(0,u.offset)(this.TABLE):this.tableOffset=this.wot.cloneSource.wtTable.tableOffset;var g=o>0?this.getFirstRenderedRow():0,E=i>0?this.getFirstRenderedColumn():0;this.rowFilter=new d.default(g,o,c),this.columnFilter=new f.default(E,i,s);var T,C=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();var b={};this.wot.getSetting("beforeDraw",!0,b),C=!0!==b.skipRender}if(C)if(this.tableRenderer.setHeaderContentRenderers(a,l),(this.is(v.CLONE_BOTTOM)||this.is(v.CLONE_BOTTOM_LEFT_CORNER))&&this.tableRenderer.setHeaderContentRenderers(a,[]),this.resetOversizedRows(),this.tableRenderer.setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(T=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(v.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM();var w=(0,u.outerWidth)(this.hider),R=(0,u.outerWidth)(this.TABLE);0!==w&&R!==w&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),T!==this.wot.wtViewport.getWorkspaceWidth()&&(this.wot.wtViewport.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wot.getSetting("onDraw",!0)}else this.is(v.CLONE_BOTTOM)&&this.wot.cloneSource.wtOverlays.adjustElementsSize()}if(this.isMaster){var O=n.topOverlay.resetFixedPosition();n.bottomOverlay.clone&&(O=n.bottomOverlay.resetFixedPosition()||O),O=n.leftOverlay.resetFixedPosition()||O,n.topLeftCornerOverlay&&n.topLeftCornerOverlay.resetFixedPosition(),n.bottomLeftCornerOverlay&&n.bottomLeftCornerOverlay.clone&&n.bottomLeftCornerOverlay.resetFixedPosition(),O&&(n.refreshAll(),n.adjustElementsSize())}return this.refreshSelections(p),h&&n.syncScrollWithMaster(),t.drawn=!0,this}},{key:"markIfOversizedColumnHeader",value:function(e){for(var t,n,r,o=this.wot.wtTable.columnFilter.renderedToSource(e),i=this.wot.getSetting("columnHeaders").length,a=this.wot.wtSettings.settings.defaultRowHeight,s=this.wot.getSetting("columnHeaderHeight")||[];i;)i-=1,t=this.wot.wtTable.getColumnHeaderHeight(i),(n=this.wot.wtTable.getColumnHeader(o,i))&&(r=(0,u.innerHeight)(n),(!t&&a<r||t<r)&&(this.wot.wtViewport.oversizedColumnHeaders[i]=r),Array.isArray(s)?null!==s[i]&&void 0!==s[i]&&(this.wot.wtViewport.oversizedColumnHeaders[i]=s[i]):isNaN(s)||(this.wot.wtViewport.oversizedColumnHeaders[i]=s),this.wot.wtViewport.oversizedColumnHeaders[i]<(s[i]||s)&&(this.wot.wtViewport.oversizedColumnHeaders[i]=s[i]||s))}},{key:"adjustColumnHeaderHeights",value:function(){for(var e=this.wot,t=e.wtTable.THEAD.childNodes,n=e.wtViewport.oversizedColumnHeaders,r=0,o=e.getSetting("columnHeaders").length;r<o;r++)if(n[r]){if(!t[r]||0===t[r].childNodes.length)return;t[r].childNodes[0].style.height="".concat(n[r],"px")}}},{key:"resetOversizedRows",value:function(){var e=this.wot;if((this.isMaster||this.is(v.CLONE_BOTTOM))&&!e.getSetting("externalRowCalculator"))for(var t=this.getRenderedRowsCount(),n=0;n<t;n++){var r=this.rowFilter.renderedToSource(n);e.wtViewport.oversizedRows&&e.wtViewport.oversizedRows[r]&&(e.wtViewport.oversizedRows[r]=void 0)}}},{key:"removeClassFromCells",value:function(e){for(var t=this.TABLE.querySelectorAll(".".concat(e)),n=0,r=t.length;n<r;n++)(0,u.removeClass)(t[n],e)}},{key:"refreshSelections",value:function(e){var t=this.wot;if(t.selections){var n=Array.from(t.selections),r=n.length;if(e){for(var o=[],i=0;i<r;i++){for(var a=n[i].settings,s=a.highlightHeaderClassName,u=a.highlightRowClassName,l=a.highlightColumnClassName,c=n[i].classNames,f=c.length,d=0;d<f;d++)o.includes(c[d])||o.push(c[d]);s&&!o.includes(s)&&o.push(s),u&&!o.includes(u)&&o.push(u),l&&!o.includes(l)&&o.push(l)}var h=t.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(h))for(var p=0;p<h.length;p++)o.push(h[p]);for(var m=o.length,y=0;y<m;y++)this.removeClassFromCells(o[y])}for(var v=0;v<r;v++)n[v].draw(t,e)}}},{key:"getCell",value:function(e){var t,n=e.row,r=e.col,o=this.wot.getSetting("onModifyGetCellCoords",n,r);if(o&&Array.isArray(o)){var a=(0,i.default)(o,2);n=a[0],r=a[1]}if(this.isRowBeforeRenderedRows(n))return-1;if(this.isRowAfterRenderedRows(n))return-2;if(this.isColumnBeforeRenderedColumns(r))return-3;if(this.isColumnAfterRenderedColumns(r))return-4;if(!(t=n<0?this.THEAD.childNodes[this.rowFilter.sourceRowToVisibleColHeadedRow(n)]:this.TBODY.childNodes[this.rowFilter.sourceToRendered(n)])&&n>=0)throw new Error("TR was expected to be rendered but is not");var s=t.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(r)];if(!s&&r>=0)throw new Error("TD or TH was expected to be rendered but is not");return s}},{key:"getColumnHeader",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.THEAD.childNodes[t];return null==n?void 0:n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}},{key:"getColumnHeaders",value:function(e){var t=[],n=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach((function(e){var r=e.childNodes[n];r&&t.push(r)})),t}},{key:"getRowHeader",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0!==this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0)){var n=this.wot.getSetting("rowHeaders").length;if(!(t>=n)){var r=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)];return null==r?void 0:r.childNodes[t]}}}},{key:"getRowHeaders",value:function(e){if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return[];for(var t=[],n=this.wot.getSetting("rowHeaders").length,r=0;r<n;r++){var o=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],i=null==o?void 0:o.childNodes[r];i&&t.push(i)}return t}},{key:"getCoords",value:function(e){var t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,u.closest)(t,["TD","TH"])),null===t)return null;var n=t.parentNode,r=n.parentNode,o=(0,u.index)(n),i=t.cellIndex;if((0,u.overlayContainsElement)(v.CLONE_TOP_LEFT_CORNER,t,this.wtRootElement)||(0,u.overlayContainsElement)(v.CLONE_TOP,t,this.wtRootElement))"THEAD"===r.nodeName&&(o-=r.childNodes.length);else if((0,u.overlayContainsElement)(v.CLONE_BOTTOM_LEFT_CORNER,t,this.wtRootElement)||(0,u.overlayContainsElement)(v.CLONE_BOTTOM,t,this.wtRootElement)){o=this.wot.getSetting("totalRows")-r.childNodes.length+o}else o=r===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(o):this.rowFilter.renderedToSource(o);return i=(0,u.overlayContainsElement)(v.CLONE_TOP_LEFT_CORNER,t,this.wtRootElement)||(0,u.overlayContainsElement)(v.CLONE_LEFT,t,this.wtRootElement)||(0,u.overlayContainsElement)(v.CLONE_BOTTOM_LEFT_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(i):this.columnFilter.visibleRowHeadedColumnToSourceColumn(i),new c.default(o,i)}},{key:"markOversizedRows",value:function(){if(!this.wot.getSetting("externalRowCalculator")){var e,t,n,r,o,i=this.TBODY.childNodes.length;if(i*this.wot.wtSettings.settings.defaultRowHeight!==(0,u.innerHeight)(this.TBODY)-1||this.wot.getSetting("fixedRowsBottom"))for(;i;)i-=1,n=this.rowFilter.renderedToSource(i),e=this.getRowHeight(n),t=(o=(r=this.getTrForRow(n)).querySelector("th"))?(0,u.innerHeight)(o):(0,u.innerHeight)(r)-1,(!e&&this.wot.wtSettings.settings.defaultRowHeight<t||e<t)&&(t+=1,this.wot.wtViewport.oversizedRows[n]=t)}}},{key:"getTrForRow",value:function(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}},{key:"isColumnHeaderRendered",value:function(e){if(e>=0)return!1;var t=this.wot.getSetting("rowHeaders").length;return Math.abs(e)<=t}},{key:"isRowHeaderRendered",value:function(e){if(e>=0)return!1;var t=this.wot.getSetting("columnHeaders").length;return Math.abs(e)<=t}},{key:"isRowBeforeRenderedRows",value:function(e){var t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}},{key:"isRowAfterRenderedRows",value:function(e){return e>this.getLastRenderedRow()}},{key:"isColumnBeforeRenderedColumns",value:function(e){var t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}},{key:"isColumnAfterRenderedColumns",value:function(e){return this.columnFilter&&e>this.getLastRenderedColumn()}},{key:"isColumnAfterViewport",value:function(e){return this.columnFilter&&e>this.getLastVisibleColumn()}},{key:"isRowAfterViewport",value:function(e){return this.rowFilter&&e>this.getLastVisibleRow()}},{key:"isColumnBeforeViewport",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}},{key:"isLastRowFullyVisible",value:function(){return this.getLastVisibleRow()===this.getLastRenderedRow()}},{key:"isLastColumnFullyVisible",value:function(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}},{key:"allRowsInViewport",value:function(){return this.wot.getSetting("totalRows")===this.getVisibleRowsCount()}},{key:"allColumnsInViewport",value:function(){return this.wot.getSetting("totalColumns")===this.getVisibleColumnsCount()}},{key:"getRowHeight",value:function(e){return this.rowUtils.getHeight(e)}},{key:"getColumnHeaderHeight",value:function(e){return this.columnUtils.getHeaderHeight(e)}},{key:"getColumnWidth",value:function(e){return this.columnUtils.getWidth(e)}},{key:"getStretchedColumnWidth",value:function(e){return this.columnUtils.getStretchedColumnWidth(e)}},{key:"hasDefinedSize",value:function(){return this.hasTableHeight&&this.hasTableWidth}},{key:"isVisible",value:function(){return(0,u.isVisible)(this.TABLE)}},{key:"_modifyRowHeaderWidth",value:function(e){var t=(0,l.isFunction)(e)?e():null;return Array.isArray(t)?(t=(0,o.default)(t))[t.length-1]=this._correctRowHeaderWidth(t[t.length-1]):t=this._correctRowHeaderWidth(t),t}},{key:"_correctRowHeaderWidth",value:function(e){var t=e;return"number"!=typeof e&&(t=this.wot.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}}]),e}();t.default=g},function(e,t,n){var r=n(562),o=n(745);function i(t,n,a){return o()?(e.exports=i=Reflect.construct,e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=i=function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},e.exports.__esModule=!0,e.exports.default=e.exports),i.apply(null,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.Overlay=void 0,n(31);var o=r(n(5)),i=r(n(6)),a=n(23),s=n(14),u=n(19),l=n(89),c=r(n(53)),f=n(117),d=function(){function e(t){(0,o.default)(this,e),(0,s.defineGetter)(this,"wot",t,{writable:!1});var n=this.wot.wtTable,r=n.TABLE,i=n.hider,u=n.spreader,l=n.holder,c=n.wtRootElement;this.instance=this.wot,this.type="",this.mainTableScrollableElement=null,this.TABLE=r,this.hider=i,this.spreader=u,this.holder=l,this.wtRootElement=c,this.trimmingContainer=(0,a.getTrimmingContainer)(this.hider.parentNode.parentNode),this.updateStateOfRendering()}return(0,i.default)(e,[{key:"updateStateOfRendering",value:function(){var e=this.needFullRender;this.needFullRender=this.shouldBeRendered();var t=e!==this.needFullRender;return t&&!this.needFullRender&&this.reset(),t}},{key:"shouldBeRendered",value:function(){return!0}},{key:"updateTrimmingContainer",value:function(){this.trimmingContainer=(0,a.getTrimmingContainer)(this.hider.parentNode.parentNode)}},{key:"updateMainScrollableElement",value:function(){var e=this.wot,t=e.wtTable;"hidden"===e.rootWindow.getComputedStyle(t.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=(0,a.getScrollableElement)(t.TABLE)}},{key:"getRelativeCellPosition",value:function(e,t,n){if(!1!==this.clone.wtTable.holder.contains(e)){var r=this.mainTableScrollableElement===this.wot.rootWindow,o=n<this.wot.getSetting("fixedColumnsLeft"),i=t<this.wot.getSetting("fixedRowsTop"),a=t>=this.wot.getSetting("totalRows")-this.wot.getSetting("fixedRowsBottom"),s={left:this.clone.wtTable.spreader.offsetLeft,top:this.clone.wtTable.spreader.offsetTop},u={left:e.offsetLeft,top:e.offsetTop};return r?this.getRelativeCellPositionWithinWindow(i,o,u,s):this.getRelativeCellPositionWithinHolder(i,a,o,u,s)}(0,l.warn)("The provided element is not a child of the ".concat(this.type," overlay"))}},{key:"getRelativeCellPositionWithinWindow",value:function(e,t,n,r){var o=this.wot.wtTable.wtRootElement.getBoundingClientRect(),i=0,a=0;(i=t?o.left<=0?-1*o.left:0:r.left,e)?a=this.clone.wtTable.TABLE.getBoundingClientRect().top-o.top:a=r.top;return{left:n.left+i,top:n.top+a}}},{key:"getRelativeCellPositionWithinHolder",value:function(e,t,n,r,o){var i=this.clone.cloneSource.wtOverlays.leftOverlay.getScrollPosition(),a=this.clone.cloneSource.wtOverlays.topOverlay.getScrollPosition(),s=0,u=0;if(n||(s=i-o.left),t){var l=this.wot.wtTable.wtRootElement.getBoundingClientRect();u=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+l.top}else e||(u=a-o.top);return{left:r.left-s,top:r.top-u}}},{key:"makeClone",value:function(e){if(-1===f.CLONE_TYPES.indexOf(e))throw new Error('Clone type "'.concat(e,'" is not supported.'));var t=this.wot,n=t.wtTable,r=t.rootDocument,o=t.rootWindow,i=r.createElement("DIV"),s=r.createElement("TABLE"),u=n.wtRootElement.parentNode;i.className="ht_clone_".concat(e," handsontable"),i.style.position="absolute",i.style.top=0,i.style.left=0,i.style.overflow="visible",s.className=n.TABLE.className,i.appendChild(s),this.type=e,u.appendChild(i);var l=this.wot.getSetting("preventOverflow");return!0===l||"horizontal"===l&&this.type===f.CLONE_TOP||"vertical"===l&&this.type===f.CLONE_LEFT?this.mainTableScrollableElement=o:"hidden"===o.getComputedStyle(u).getPropertyValue("overflow")?this.mainTableScrollableElement=n.holder:this.mainTableScrollableElement=(0,a.getScrollableElement)(n.TABLE),new this.wot.constructor({cloneSource:this.wot,cloneOverlay:this,table:s})}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}},{key:"reset",value:function(){if(this.clone){var e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,n=e.style,r=t.style,o=e.parentNode.style;(0,u.arrayEach)([n,r,o],(function(e){e.width="",e.height=""}))}}},{key:"destroy",value:function(){new c.default(this.clone).destroy()}}]),e}();t.Overlay=d},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.RegisteredEditor=h,t.getEditorInstance=t._getEditorInstance=function(e,t){var n;if("function"==typeof e)a.get(e)||p(null,e),n=a.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');n=l(e)}if(!n)throw Error('No editor registered under name "'.concat(e,'"'));return n.getInstance(t)},t.getEditor=function(e){if(!c(e))throw Error('No registered editor found under "'.concat(e,'" name'));return l(e).getConstructor()},t.hasEditor=t.getRegisteredEditors=t.getRegisteredEditorNames=void 0,t.registerEditor=p,n(3),n(0),n(2),n(11),n(4);var o=r(n(71)),i=r(n(109)),a=new WeakMap,s=(0,i.default)("editors"),u=s.register,l=s.getItem,c=s.hasItem,f=s.getNames,d=s.getValues;function h(e){var t={},n=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new n(e)),t[e.guid]},o.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function p(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);var n=new h(t);"string"==typeof e&&u(e,n),a.set(t,n)}t.getRegisteredEditors=d,t.getRegisteredEditorNames=f,t.hasEditor=c},function(e,t,n){"use strict";t.__esModule=!0,t.EDITOR_TYPE=t.EDITOR_STATE=t.BaseEditor=void 0;var r=n(758);t.EDITOR_STATE=r.EDITOR_STATE,t.EDITOR_TYPE=r.EDITOR_TYPE,t.BaseEditor=r.BaseEditor},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.getCellType=function(e){if(!f(e))throw Error('You declared cell type "'.concat(e,'" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method'));return c(e)},t.hasCellType=t.getRegisteredCellTypes=t.getRegisteredCellTypeNames=void 0,t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);var n=t,r=n.editor,o=n.renderer,u=n.validator;r&&(0,i.registerEditor)(e,r);o&&(0,a.registerRenderer)(e,o);u&&(0,s.registerValidator)(e,u);l(e,t)};var o=r(n(109)),i=n(158),a=n(188),s=n(189),u=(0,o.default)("cellTypes"),l=u.register,c=u.getItem,f=u.hasItem,d=u.getNames,h=u.getValues;t.getRegisteredCellTypes=h,t.getRegisteredCellTypeNames=d,t.hasCellType=f},function(e,t,n){"use strict";n(0),n(7);var r=n(1);t.__esModule=!0,t.default=void 0;var o=r(n(32)),i=r(n(5)),a=r(n(6)),s=r(n(30)),u=r(n(15)),l=r(n(16)),c=r(n(13)),f=n(60);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,c.default)(e);if(t){var o=(0,c.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}var h=function(e){(0,u.default)(n,e);var t=d(n);function n(e,r){var o;return(0,i.default)(this,n),(o=t.call(this,e,null)).visualCellRange=r||null,o.commit(),o}return(0,a.default)(n,[{key:"add",value:function(e){return null===this.visualCellRange?this.visualCellRange=new f.CellRange(e):this.visualCellRange.expand(e),this}},{key:"clear",value:function(){return this.visualCellRange=null,(0,s.default)((0,c.default)(n.prototype),"clear",this).call(this)}},{key:"findVisibleCoordsInRange",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n,o=this.findVisibleCoordsInRowsRange(e.row,t.row,n);if(null===o)return null;var i=this.findVisibleCoordsInColumnsRange(e.col,t.col,r);return null===i?null:new f.CellCoords(o,i)}},{key:"findVisibleCoordsInRowsRange",value:function(e,t,n){var r=this.settings.visualToRenderableCoords({row:e,col:-1}).row;return t===e&&null===r?null:null===r?this.findVisibleCoordsInRowsRange(e+n,t,n):e}},{key:"findVisibleCoordsInColumnsRange",value:function(e,t,n){var r=this.settings.visualToRenderableCoords({row:-1,col:e}).col;return t===e&&null===r?null:null===r?this.findVisibleCoordsInColumnsRange(e+n,t,n):e}},{key:"findVisibleHeaderRange",value:function(e,t,n,r){var o=this.findVisibleCoordsInRowsRange(e.row,t.row,n),i=this.findVisibleCoordsInRowsRange(t.row,e.row,-n),a=this.findVisibleCoordsInColumnsRange(e.col,t.col,r),s=this.findVisibleCoordsInColumnsRange(t.col,e.col,-r);return null===o&&null===i&&null===a&&null===s?null:[new f.CellCoords(o,a),new f.CellCoords(i,s)]}},{key:"commit",value:function(){if(null===this.visualCellRange)return this;var e=this.visualCellRange,t=e.from,n=e.to,r=this.getRowSearchDirection(this.visualCellRange),i=this.getColumnSearchDirection(this.visualCellRange),a=this.findVisibleCoordsInRange(t,n,r,i),s=this.findVisibleCoordsInRange(n,t,-r,-i);if(null===a||null===s){var u=null;if("header"===this.settings.type){var l=this.findVisibleHeaderRange(t,n,r,i),c=(0,o.default)(l,2),f=c[0],d=c[1];u=this.createRenderableCellRange(f,d)}this.cellRange=u}else this.cellRange=this.createRenderableCellRange(a,s);return this}},{key:"adjustCoordinates",value:function(e){var t=this.getRowSearchDirection(e),n=this.getColumnSearchDirection(e),r=e.from.clone().normalize(),o=e.to.clone().normalize(),i=this.findVisibleCoordsInRange(r,o,t,n);if(null!==i){if(null===this.cellRange){var a=this.settings.visualToRenderableCoords(i);this.cellRange=new f.CellRange(a)}return e.setHighlight(i),this}return e.setHighlight(e.from),this}},{key:"getCorners",value:function(){var e=this.cellRange,t=e.from,n=e.to,r=null===t.row||null===n.row,o=null===t.col||null===n.col,i=new f.CellCoords(r?null:Math.min(t.row,n.row),o?null:Math.min(t.col,n.col)),a=new f.CellCoords(r?null:Math.max(t.row,n.row),o?null:Math.max(t.col,n.col));return[i.row,i.col,a.row,a.col]}},{key:"getVisualCorners",value:function(){var e=this.settings.renderableToVisualCoords(this.cellRange.getTopLeftCorner()),t=this.settings.renderableToVisualCoords(this.cellRange.getBottomRightCorner());return[e.row,e.col,t.row,t.col]}},{key:"createRenderableCellRange",value:function(e,t){var n=this.settings.visualToRenderableCoords(e),r=this.settings.visualToRenderableCoords(t);return new f.CellRange(n,n,r)}},{key:"getRowSearchDirection",value:function(e){return e.from.row<e.to.row?1:-1}},{key:"getColumnSearchDirection",value:function(e){return e.from.col<e.to.col?1:-1}}]),n}(f.Selection);t.default=h},function(e,t,n){"use strict";t.__esModule=!0,t.checkSelectionBorders=function(e,t){var n=!1;return(0,o.arrayEach)(e.getSelectedRange(),(function(o){o.forAll((function(o,i){if(!(o<0||i<0)){var a=e.getCellMeta(o,i).borders;if(a){if(!t)return n=!0,!1;if(!(0,r.hasOwnProperty)(a[t],"hide")||!1===a[t].hide)return n=!0,!1}}}))})),n},t.createDefaultCustomBorder=a,t.createDefaultHtBorder=u,t.createEmptyBorders=function(e,t){return{id:i(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},right:{hide:!0},bottom:{hide:!0},left:{hide:!0}}},t.createId=i,t.createSingleEmptyBorder=s,t.extendDefaultBorder=function(e,t){(0,r.hasOwnProperty)(t,"border")&&(e.border=t.border);(0,r.hasOwnProperty)(t,"top")&&(t.top?((0,r.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top));(0,r.hasOwnProperty)(t,"right")&&(t.right?((0,r.isObject)(t.right)||(t.right={width:1,color:"#000"}),e.right=t.right):(t.right={hide:!0},e.right=t.right));(0,r.hasOwnProperty)(t,"bottom")&&(t.bottom?((0,r.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom));(0,r.hasOwnProperty)(t,"left")&&(t.left?((0,r.isObject)(t.left)||(t.left={width:1,color:"#000"}),e.left=t.left):(t.left={hide:!0},e.left=t.left));return e},t.markSelected=function(e){return'<span class="selected">'.concat(String.fromCharCode(10003),"</span>").concat(e)},n(20);var r=n(14),o=n(19);function i(e,t){return"border_row".concat(e,"col").concat(t)}function a(){return{width:1,color:"#000"}}function s(){return{hide:!0}}function u(){return{width:1,color:"#000",cornerVisible:!1}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(28),o=n(35),i=n(41),a=n(120),s=r.Object,u=o("".split);e.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?u(e,""):s(e)}:s},function(e,t,n){var r,o,i=n(28),a=n(130),s=i.process,u=i.Deno,l=s&&s.versions||u&&u.version,c=l&&l.v8;c&&(o=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},function(e,t){e.exports={}},function(e,t,n){var r=n(72),o=n(73),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),u=s&&"something"===function(){}.name,l=s&&(!r||r&&a(i,"name").configurable);e.exports={EXISTS:s,PROPER:u,CONFIGURABLE:l}},function(e,t,n){var r=n(35);e.exports=r([].slice)},function(e,t,n){var r=n(324),o=n(238);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(120);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(41),o=n(59),i=n(165),a=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){var r=n(35),o=n(147),i=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?i(e,t):function(){return e.apply(t,arguments)}}},function(e,t){e.exports={}},function(e,t,n){var r=n(59),o=n(135),i=n(82),a=r("unscopables"),s=Array.prototype;null==s[a]&&i.f(s,a,{configurable:!0,value:o(null)}),e.exports=function(e){s[a][e]=!0}},function(e,t,n){var r=n(29),o=n(35),i=n(166),a=n(63),s=n(73),u=n(82).f,l=n(148),c=n(241),f=n(340),d=n(200),h=n(341),p=!1,m=d("meta"),y=0,v=function(e){u(e,m,{value:{objectID:"O"+y++,weakData:{}}})},g=e.exports={enable:function(){g.enable=function(){},p=!0;var e=l.f,t=o([].splice),n={};n[m]=1,e(n).length&&(l.f=function(n){for(var r=e(n),o=0,i=r.length;o<i;o++)if(r[o]===m){t(r,o,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:c.f}))},fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,m)){if(!f(e))return"F";if(!t)return"E";v(e)}return e[m].objectID},getWeakData:function(e,t){if(!s(e,m)){if(!f(e))return!0;if(!t)return!1;v(e)}return e[m].weakData},onFreeze:function(e){return h&&p&&f(e)&&!s(e,m)&&v(e),e}};i[m]=!0},function(e,t,n){"use strict";n.r(t),n.d(t,"RANGE_OPERATOR",(function(){return a})),n.d(t,"ABSOLUTE_OPERATOR",(function(){return s})),n.d(t,"AdditionOp",(function(){return u})),n.d(t,"PlusOp",(function(){return l})),n.d(t,"MinusOp",(function(){return c})),n.d(t,"MultiplicationOp",(function(){return f})),n.d(t,"TimesOp",(function(){return d})),n.d(t,"DivOp",(function(){return h})),n.d(t,"PowerOp",(function(){return p})),n.d(t,"PercentOp",(function(){return m})),n.d(t,"BooleanOp",(function(){return y})),n.d(t,"EqualsOp",(function(){return v})),n.d(t,"NotEqualOp",(function(){return g})),n.d(t,"GreaterThanOp",(function(){return E})),n.d(t,"LessThanOp",(function(){return T})),n.d(t,"GreaterThanOrEqualOp",(function(){return C})),n.d(t,"LessThanOrEqualOp",(function(){return b})),n.d(t,"ConcatenateOp",(function(){return w})),n.d(t,"simpleSheetName",(function(){return R})),n.d(t,"quotedSheetName",(function(){return O})),n.d(t,"sheetNameRegexp",(function(){return S})),n.d(t,"CellReference",(function(){return A})),n.d(t,"ColumnRange",(function(){return N})),n.d(t,"RowRange",(function(){return M})),n.d(t,"RangeSeparator",(function(){return k})),n.d(t,"LParen",(function(){return _})),n.d(t,"RParen",(function(){return I})),n.d(t,"ArrayLParen",(function(){return P})),n.d(t,"ArrayRParen",(function(){return x})),n.d(t,"ProcedureName",(function(){return D})),n.d(t,"NamedExpression",(function(){return L})),n.d(t,"StringLiteral",(function(){return F})),n.d(t,"ErrorLiteral",(function(){return j})),n.d(t,"WhiteSpace",(function(){return U})),n.d(t,"buildLexerConfig",(function(){return H}));n(95),n(33),n(65),n(20),n(8),n(9),n(0),n(10),n(3),n(2),n(4),n(21),n(12),n(24);var r=n(213);function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var a=":",s="$",u=Object(r.createToken)({name:"AdditionOp",pattern:r.Lexer.NA}),l=Object(r.createToken)({name:"PlusOp",pattern:/\+/,categories:u}),c=Object(r.createToken)({name:"MinusOp",pattern:/-/,categories:u}),f=Object(r.createToken)({name:"MultiplicationOp",pattern:r.Lexer.NA}),d=Object(r.createToken)({name:"TimesOp",pattern:/\*/,categories:f}),h=Object(r.createToken)({name:"DivOp",pattern:/\//,categories:f}),p=Object(r.createToken)({name:"PowerOp",pattern:/\^/}),m=Object(r.createToken)({name:"PercentOp",pattern:/%/}),y=Object(r.createToken)({name:"BooleanOp",pattern:r.Lexer.NA}),v=Object(r.createToken)({name:"EqualsOp",pattern:/=/,categories:y}),g=Object(r.createToken)({name:"NotEqualOp",pattern:/<>/,categories:y}),E=Object(r.createToken)({name:"GreaterThanOp",pattern:/>/,categories:y}),T=Object(r.createToken)({name:"LessThanOp",pattern:/</,categories:y}),C=Object(r.createToken)({name:"GreaterThanOrEqualOp",pattern:/>=/,categories:y}),b=Object(r.createToken)({name:"LessThanOrEqualOp",pattern:/<=/,categories:y}),w=Object(r.createToken)({name:"ConcatenateOp",pattern:/&/}),R="[A-Za-z0-9_À-ʯ]+",O="'(((?!').|'')*)'",S="(".concat(R,"|").concat(O,")!"),A=Object(r.createToken)({name:"CellReference",pattern:new RegExp("(".concat(S,")?\\").concat(s,"?[A-Za-z]+\\").concat(s,"?[0-9]+"))}),N=Object(r.createToken)({name:"ColumnRange",pattern:new RegExp("(".concat(S,")?\\").concat(s,"?[A-Za-z]+").concat(a,"(").concat(S,")?\\").concat(s,"?[A-Za-z]+"))}),M=Object(r.createToken)({name:"RowRange",pattern:new RegExp("(".concat(S,")?\\").concat(s,"?[0-9]+").concat(a,"(").concat(S,")?\\").concat(s,"?[0-9]+"))}),k=Object(r.createToken)({name:"RangeSeparator",pattern:"".concat(a)}),_=Object(r.createToken)({name:"LParen",pattern:/\(/}),I=Object(r.createToken)({name:"RParen",pattern:/\)/}),P=Object(r.createToken)({name:"ArrayLParen",pattern:/{/}),x=Object(r.createToken)({name:"ArrayRParen",pattern:/}/}),D=Object(r.createToken)({name:"ProcedureName",pattern:/([A-Za-z\u00C0-\u02AF][A-Za-z0-9\u00C0-\u02AF._]*)\(/}),L=Object(r.createToken)({name:"NamedExpression",pattern:/[A-Za-z\u00C0-\u02AF_][A-Za-z0-9\u00C0-\u02AF._]*/}),F=Object(r.createToken)({name:"StringLiteral",pattern:/"([^"\\]*(\\.[^"\\]*)*)"/}),j=Object(r.createToken)({name:"ErrorLiteral",pattern:/#[A-Za-z0-9\/]+[?!]?/}),U=Object(r.createToken)({name:"WhiteSpace",pattern:/[ \t\n\r]+/}),H=function(e){var t,n,i=e.translationPackage.getFunctionTranslation("OFFSET"),a=e.errorMapping,s=e.translationPackage.buildFunctionMapping(),R=Object(r.createToken)({name:"ArrayRowSep",pattern:e.arrayRowSeparator}),O=Object(r.createToken)({name:"ArrayColSep",pattern:e.arrayColumnSeparator});e.functionArgSeparator===e.arrayColumnSeparator?(t=O,n=[]):e.functionArgSeparator===e.arrayRowSeparator?(t=R,n=[]):n=[t=Object(r.createToken)({name:"ArgSeparator",pattern:e.functionArgSeparator})];var S=Object(r.createToken)({name:"NumberLiteral",pattern:new RegExp("(([".concat(e.decimalSeparator,"]\\d+)|(\\d+([").concat(e.decimalSeparator,"]\\d*)?))(e[+-]?\\d+)?"))}),H=Object(r.createToken)({name:"OffsetProcedureName",pattern:new RegExp(i,"i")}),V=[U,l,c,d,h,p,v,g,m,C,b,E,T,_,I,P,x,H,D,k].concat(o(n),[N,M,S,F,j,w,y,u,f,A,L,R,O]);return{ArgSeparator:t,NumberLiteral:S,OffsetProcedureName:H,ArrayRowSeparator:R,ArrayColSeparator:O,allTokens:V,errorMapping:a,functionMapping:s,decimalSeparator:e.decimalSeparator,maxColumns:e.maxColumns,maxRows:e.maxRows}}},function(e,t,n){"use strict";n.r(t),n.d(t,"tokenStructuredMatcher",(function(){return o})),n.d(t,"tokenStructuredMatcherNoCategories",(function(){return i})),n.d(t,"tokenShortNameIdx",(function(){return a})),n.d(t,"tokenIdxToClass",(function(){return s})),n.d(t,"augmentTokenTypes",(function(){return u})),n.d(t,"expandCategories",(function(){return l})),n.d(t,"assignTokenDefaultProps",(function(){return c})),n.d(t,"assignCategoriesTokensProp",(function(){return f})),n.d(t,"assignCategoriesMapProp",(function(){return d})),n.d(t,"singleAssignCategoriesToksMap",(function(){return h})),n.d(t,"hasShortKeyProperty",(function(){return p})),n.d(t,"hasCategoriesProperty",(function(){return m})),n.d(t,"hasExtendingTokensTypesProperty",(function(){return y})),n.d(t,"hasExtendingTokensTypesMapProperty",(function(){return v})),n.d(t,"isTokenType",(function(){return g}));var r=n(46);function o(e,t){var n=e.tokenTypeIdx;return n===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[n]}function i(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var a=1,s={};function u(e){var t=l(e);c(t),d(t),f(t),Object(r.forEach)(t,(function(e){e.isParent=e.categoryMatches.length>0}))}function l(e){for(var t=Object(r.cloneArr)(e),n=e,o=!0;o;){n=Object(r.compact)(Object(r.flatten)(Object(r.map)(n,(function(e){return e.CATEGORIES}))));var i=Object(r.difference)(n,t);t=t.concat(i),Object(r.isEmpty)(i)?o=!1:n=i}return t}function c(e){Object(r.forEach)(e,(function(e){p(e)||(s[a]=e,e.tokenTypeIdx=a++),m(e)&&!Object(r.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),m(e)||(e.CATEGORIES=[]),y(e)||(e.categoryMatches=[]),v(e)||(e.categoryMatchesMap={})}))}function f(e){Object(r.forEach)(e,(function(e){e.categoryMatches=[],Object(r.forEach)(e.categoryMatchesMap,(function(t,n){e.categoryMatches.push(s[n].tokenTypeIdx)}))}))}function d(e){Object(r.forEach)(e,(function(e){h([],e)}))}function h(e,t){Object(r.forEach)(e,(function(e){t.categoryMatchesMap[e.tokenTypeIdx]=!0})),Object(r.forEach)(t.CATEGORIES,(function(n){var o=e.concat(t);Object(r.contains)(o,n)||h(o,n)}))}function p(e){return Object(r.has)(e,"tokenTypeIdx")}function m(e){return Object(r.has)(e,"CATEGORIES")}function y(e){return Object(r.has)(e,"categoryMatches")}function v(e){return Object(r.has)(e,"categoryMatchesMap")}function g(e){return Object(r.has)(e,"tokenTypeIdx")}},function(e,t,n){"use strict";n.r(t),n.d(t,"isSequenceProd",(function(){return u})),n.d(t,"isOptionalProd",(function(){return l})),n.d(t,"isBranchingProd",(function(){return c})),n.d(t,"getProductionDslName",(function(){return f})),n.d(t,"DslMethodsCollectorVisitor",(function(){return d})),n.d(t,"collectMethods",(function(){return p}));var r,o=n(46),i=n(55),a=n(137),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function u(e){return e instanceof i.Flat||e instanceof i.Option||e instanceof i.Repetition||e instanceof i.RepetitionMandatory||e instanceof i.RepetitionMandatoryWithSeparator||e instanceof i.RepetitionWithSeparator||e instanceof i.Terminal||e instanceof i.Rule}function l(e,t){return void 0===t&&(t=[]),!!(e instanceof i.Option||e instanceof i.Repetition||e instanceof i.RepetitionWithSeparator)||(e instanceof i.Alternation?Object(o.some)(e.definition,(function(e){return l(e,t)})):!(e instanceof i.NonTerminal&&Object(o.contains)(t,e))&&(e instanceof i.AbstractProduction&&(e instanceof i.NonTerminal&&t.push(e),Object(o.every)(e.definition,(function(e){return l(e,t)})))))}function c(e){return e instanceof i.Alternation}function f(e){if(e instanceof i.NonTerminal)return"SUBRULE";if(e instanceof i.Option)return"OPTION";if(e instanceof i.Alternation)return"OR";if(e instanceof i.RepetitionMandatory)return"AT_LEAST_ONE";if(e instanceof i.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(e instanceof i.RepetitionWithSeparator)return"MANY_SEP";if(e instanceof i.Repetition)return"MANY";if(e instanceof i.Terminal)return"CONSUME";throw Error("non exhaustive match")}var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return s(t,e),t.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},t.prototype.visitTerminal=function(e){var t=e.terminalType.name+this.separator+"Terminal";Object(o.has)(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitNonTerminal=function(e){var t=e.nonTerminalName+this.separator+"Terminal";Object(o.has)(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitOption=function(e){this.dslMethods.option.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.dslMethods.repetitionWithSeparator.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.dslMethods.repetitionMandatory.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)},t.prototype.visitRepetition=function(e){this.dslMethods.repetition.push(e)},t.prototype.visitAlternation=function(e){this.dslMethods.alternation.push(e)},t}(a.GAstVisitor),h=new d;function p(e){h.reset(),e.accept(h);var t=h.dslMethods;return h.reset(),t}},function(e,t,n){"use strict";n.r(t),n.d(t,"BITS_FOR_METHOD_TYPE",(function(){return r})),n.d(t,"BITS_FOR_OCCURRENCE_IDX",(function(){return o})),n.d(t,"BITS_FOR_RULE_IDX",(function(){return i})),n.d(t,"BITS_FOR_ALT_IDX",(function(){return a})),n.d(t,"OR_IDX",(function(){return s})),n.d(t,"OPTION_IDX",(function(){return u})),n.d(t,"MANY_IDX",(function(){return l})),n.d(t,"AT_LEAST_ONE_IDX",(function(){return c})),n.d(t,"MANY_SEP_IDX",(function(){return f})),n.d(t,"AT_LEAST_ONE_SEP_IDX",(function(){return d})),n.d(t,"getKeyForAutomaticLookahead",(function(){return h})),n.d(t,"getKeyForAltIndex",(function(){return m}));var r=4,o=8,i=12,a=8,s=1<<o,u=2<<o,l=3<<o,c=4<<o,f=5<<o,d=6<<o;function h(e,t,n){return n|t|e}var p=32-a;function m(e,t,n,r){var o=r+1<<p;return h(e,t,n)|o}},function(e,t,n){"use strict";n.r(t),n.d(t,"resolveGrammar",(function(){return u})),n.d(t,"validateGrammar",(function(){return l})),n.d(t,"assignOccurrenceIndices",(function(){return c}));var r=n(46),o=n(652),i=n(214),a=n(138),s=n(178);function u(e){e=Object(r.defaults)(e,{errMsgProvider:a.defaultGrammarResolverErrorProvider});var t={};return Object(r.forEach)(e.rules,(function(e){t[e.name]=e})),Object(o.resolveGrammar)(t,e.errMsgProvider)}function l(e){return e=Object(r.defaults)(e,{errMsgProvider:a.defaultGrammarValidatorErrorProvider,ignoredIssues:{}}),Object(i.validateGrammar)(e.rules,e.maxLookahead,e.tokenTypes,e.ignoredIssues,e.errMsgProvider,e.grammarName)}function c(e){Object(r.forEach)(e.rules,(function(e){var t=new s.DslMethodsCollectorVisitor;e.accept(t),Object(r.forEach)(t.dslMethods,(function(e){Object(r.forEach)(e,(function(e,t){e.idx=t+1}))}))}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"RowsSpan",(function(){return a})),n.d(t,"ColumnsSpan",(function(){return s}));n(83);function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var a=function(){function e(t,n,o){if(r(this,e),this.sheet=t,this.rowStart=n,this.rowEnd=o,n<0)throw Error("Starting row cant be less than 0");if(o<n)throw Error("Row span cant end before start")}return i(e,[{key:"numberOfRows",get:function(){return this.rowEnd-this.rowStart+1}},{key:"rows",value:regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.rowStart;case 1:if(!(t<=this.rowEnd)){e.next=7;break}return e.next=4,t;case 4:++t,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))},{key:"intersect",value:function(t){if(this.sheet!==t.sheet)throw Error("Can't intersect spans from different sheets");var n=Math.max(this.rowStart,t.rowStart),r=Math.min(this.rowEnd,t.rowEnd);return n>r?null:new e(this.sheet,n,r)}},{key:"firstRow",value:function(){return new e(this.sheet,this.rowStart,this.rowStart)}},{key:"start",get:function(){return this.rowStart}},{key:"end",get:function(){return this.rowEnd}}],[{key:"fromNumberOfRows",value:function(t,n,r){return new e(t,n,n+r-1)}},{key:"fromRowStartAndEnd",value:function(t,n,r){return new e(t,n,r)}}]),e}(),s=function(){function e(t,n,o){if(r(this,e),this.sheet=t,this.columnStart=n,this.columnEnd=o,n<0)throw Error("Starting column cant be less than 0");if(o<n)throw Error("Column span cant end before start")}return i(e,[{key:"numberOfColumns",get:function(){return this.columnEnd-this.columnStart+1}},{key:"columns",value:regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.columnStart;case 1:if(!(t<=this.columnEnd)){e.next=7;break}return e.next=4,t;case 4:++t,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))},{key:"intersect",value:function(t){if(this.sheet!==t.sheet)throw Error("Can't intersect spans from different sheets");var n=Math.max(this.columnStart,t.columnStart),r=Math.min(this.columnEnd,t.columnEnd);return n>r?null:new e(this.sheet,n,r)}},{key:"firstColumn",value:function(){return new e(this.sheet,this.columnStart,this.columnStart)}},{key:"start",get:function(){return this.columnStart}},{key:"end",get:function(){return this.columnEnd}}],[{key:"fromNumberOfColumns",value:function(t,n,r){return new e(t,n,n+r-1)}},{key:"fromColumnStartAndEnd",value:function(t,n,r){return new e(t,n,r)}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"InterpreterState",(function(){return r}));
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var r=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.formulaAddress=t,this.arraysFlag=n,this.formulaVertex=r}},function(e,t,n){"use strict";n.r(t),n.d(t,"DenseSparseChooseBasedOnThreshold",(function(){return u})),n.d(t,"AlwaysSparse",(function(){return l})),n.d(t,"AlwaysDense",(function(){return c}));var r=n(280),o=n(279);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var u=function(){function e(t){i(this,e),this.threshold=t}return s(e,[{key:"call",value:function(e){return e>this.threshold?r.DenseStrategy:o.SparseStrategy}}]),e}(),l=function(){function e(){i(this,e)}return s(e,[{key:"call",value:function(){return o.SparseStrategy}}]),e}(),c=function(){function e(){i(this,e)}return s(e,[{key:"call",value:function(){return r.DenseStrategy}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"HyperFormula",(function(){return C}));n(20),n(37),n(21),n(2),n(3),n(0),n(4),n(36),n(12),n(24),n(8),n(9),n(10);var r=n(84),o=n(369),i=n(681),a=n(22),s=n(185),u=n(219),l=n(154),c=n(700),f=n(702),d=n(39),h=n(218),p=n(289),m=n(221),y=n(70);function v(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||g(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var C=function(){function e(t,n,r,o,i,a,s,u,l,c,d,h,p,m){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=t,this._stats=n,this._dependencyGraph=r,this._columnSearch=o,this._parser=i,this._unparser=a,this._cellContentParser=s,this._evaluator=u,this._lazilyTransformingAstService=l,this._crudOperations=c,this._exporter=d,this._namedExpressions=h,this._serialization=p,this._functionRegistry=m,this._emitter=new f.Emitter,this._evaluationSuspended=!1}var t,n,E;return t=e,E=[{key:"buildFromEngineState",value:function(t){return new e(t.config,t.stats,t.dependencyGraph,t.columnSearch,t.parser,t.unparser,t.cellContentParser,t.evaluator,t.lazilyTransformingAstService,t.crudOperations,t.exporter,t.namedExpressions,t.serialization,t.functionRegistry)}},{key:"buildFromArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return this.buildFromEngineState(i.BuildEngineFactory.buildFromSheet(e,t,n))}},{key:"buildFromSheets",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return this.buildFromEngineState(i.BuildEngineFactory.buildFromSheets(e,t,n))}},{key:"buildEmpty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.buildFromEngineState(i.BuildEngineFactory.buildEmpty(e,t))}},{key:"defaultConfig",get:function(){return Object(u.getDefaultConfig)()}},{key:"getLanguage",value:function(e){Object(o.validateArgToType)(e,"string","languageCode");var t=this.registeredLanguages.get(e);if(void 0===t)throw new d.LanguageNotRegisteredError;return t}},{key:"registerLanguage",value:function(e,t){if(Object(o.validateArgToType)(e,"string","languageCode"),this.registeredLanguages.has(e))throw new d.LanguageAlreadyRegisteredError;this.registeredLanguages.set(e,Object(h.buildTranslationPackage)(t))}},{key:"unregisterLanguage",value:function(e){if(Object(o.validateArgToType)(e,"string","languageCode"),!this.registeredLanguages.has(e))throw new d.LanguageNotRegisteredError;this.registeredLanguages.delete(e)}},{key:"getRegisteredLanguagesCodes",value:function(){return Array.from(this.registeredLanguages.keys())}},{key:"registerFunctionPlugin",value:function(e,t){p.FunctionRegistry.registerFunctionPlugin(e,t)}},{key:"unregisterFunctionPlugin",value:function(e){p.FunctionRegistry.unregisterFunctionPlugin(e)}},{key:"registerFunction",value:function(e,t,n){Object(o.validateArgToType)(e,"string","functionId"),p.FunctionRegistry.registerFunction(e,t,n)}},{key:"unregisterFunction",value:function(e){Object(o.validateArgToType)(e,"string","functionId"),p.FunctionRegistry.unregisterFunction(e)}},{key:"unregisterAllFunctions",value:function(){p.FunctionRegistry.unregisterAll()}},{key:"getRegisteredFunctionNames",value:function(e){Object(o.validateArgToType)(e,"string","code");var t=p.FunctionRegistry.getRegisteredFunctionIds();return this.getLanguage(e).getFunctionTranslations(t)}},{key:"getFunctionPlugin",value:function(e){return Object(o.validateArgToType)(e,"string","functionId"),p.FunctionRegistry.getFunctionPlugin(e)}},{key:"getAllFunctionPlugins",value:function(){return p.FunctionRegistry.getPlugins()}}],(n=[{key:"graph",get:function(){return this.dependencyGraph.graph}},{key:"rangeMapping",get:function(){return this.dependencyGraph.rangeMapping}},{key:"arrayMapping",get:function(){return this.dependencyGraph.arrayMapping}},{key:"sheetMapping",get:function(){return this.dependencyGraph.sheetMapping}},{key:"addressMapping",get:function(){return this.dependencyGraph.addressMapping}},{key:"dependencyGraph",get:function(){return this._dependencyGraph}},{key:"evaluator",get:function(){return this._evaluator}},{key:"columnSearch",get:function(){return this._columnSearch}},{key:"lazilyTransformingAstService",get:function(){return this._lazilyTransformingAstService}},{key:"licenseKeyValidityState",get:function(){return this._config.licenseKeyValidityState}},{key:"getCellValue",value:function(e){if(!Object(a.isSimpleCellAddress)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellValue(e)}},{key:"ensureEvaluationIsNotSuspended",value:function(){if(this._evaluationSuspended)throw new d.EvaluationSuspendedError}},{key:"getCellFormula",value:function(e){if(!Object(a.isSimpleCellAddress)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","cellAddress");return this._serialization.getCellFormula(e)}},{key:"getCellSerialized",value:function(e){if(!Object(a.isSimpleCellAddress)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellSerialized(e)}},{key:"getSheetValues",value:function(e){return Object(o.validateArgToType)(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetValues(e)}},{key:"getSheetFormulas",value:function(e){return Object(o.validateArgToType)(e,"number","sheetId"),this._serialization.getSheetFormulas(e)}},{key:"getSheetSerialized",value:function(e){return Object(o.validateArgToType)(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetSerialized(e)}},{key:"getAllSheetsDimensions",value:function(){var e=this;return this._serialization.genericAllSheetsGetter((function(t){return e.getSheetDimensions(t)}))}},{key:"getSheetDimensions",value:function(e){return Object(o.validateArgToType)(e,"number","sheetId"),{width:this.dependencyGraph.getSheetWidth(e),height:this.dependencyGraph.getSheetHeight(e)}}},{key:"getAllSheetsValues",value:function(){return this.ensureEvaluationIsNotSuspended(),this._serialization.getAllSheetsValues()}},{key:"getAllSheetsFormulas",value:function(){return this._serialization.getAllSheetsFormulas()}},{key:"getAllSheetsSerialized",value:function(){return this.ensureEvaluationIsNotSuspended(),this._serialization.getAllSheetsSerialized()}},{key:"updateConfig",value:function(e){var t=this._config.mergeConfig(e),n=this._config.mergeConfig({language:e.language}),r=this._serialization.withNewConfig(n,this._namedExpressions).getAllSheetsSerialized(),o=this._serialization.getAllNamedExpressionsSerialized(),a=i.BuildEngineFactory.rebuildWithConfig(t,r,o,this._stats);this._config=a.config,this._stats=a.stats,this._dependencyGraph=a.dependencyGraph,this._columnSearch=a.columnSearch,this._parser=a.parser,this._unparser=a.unparser,this._cellContentParser=a.cellContentParser,this._evaluator=a.evaluator,this._lazilyTransformingAstService=a.lazilyTransformingAstService,this._crudOperations=a.crudOperations,this._exporter=a.exporter,this._namedExpressions=a.namedExpressions,this._serialization=a.serialization,this._functionRegistry=a.functionRegistry}},{key:"getConfig",value:function(){return this._config.getConfig()}},{key:"rebuildAndRecalculate",value:function(){this.updateConfig({})}},{key:"getStats",value:function(){return this._stats.snapshot()}},{key:"undo",value:function(){return this._crudOperations.undo(),this.recomputeIfDependencyGraphNeedsIt()}},{key:"redo",value:function(){return this._crudOperations.redo(),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isThereSomethingToUndo",value:function(){return this._crudOperations.isThereSomethingToUndo()}},{key:"isThereSomethingToRedo",value:function(){return this._crudOperations.isThereSomethingToRedo()}},{key:"isItPossibleToSetCellContents",value:function(e){var t;if(Object(a.isSimpleCellAddress)(e))t=new r.AbsoluteCellRange(e,e);else{if(!Object(r.isSimpleCellRange)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress | SimpleCellRange","address");t=new r.AbsoluteCellRange(e.start,e.end)}try{this._crudOperations.ensureRangeInSizeLimits(t);var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=g(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(t.addresses(this._dependencyGraph));try{for(o.s();!(n=o.n()).done;){var i=n.value;this._crudOperations.ensureItIsPossibleToChangeContent(i)}}catch(e){o.e(e)}finally{o.f()}}catch(e){return!1}return!0}},{key:"setCellContents",value:function(e,t){return this._crudOperations.setCellContents(e,t),this.recomputeIfDependencyGraphNeedsIt()}},{key:"swapRowIndexes",value:function(e,t){return Object(o.validateArgToType)(e,"number","sheetId"),this._crudOperations.setRowOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToSwapRowIndexes",value:function(e,t){Object(o.validateArgToType)(e,"number","sheetId");try{return this._crudOperations.validateSwapRowIndexes(e,t),this._crudOperations.testRowOrderForArrays(e,t),!0}catch(e){return!1}}},{key:"setRowOrder",value:function(e,t){Object(o.validateArgToType)(e,"number","sheetId");var n=this._crudOperations.mappingFromOrder(e,t,"row");return this.swapRowIndexes(e,n)}},{key:"isItPossibleToSetRowOrder",value:function(e,t){Object(o.validateArgToType)(e,"number","sheetId");try{var n=this._crudOperations.mappingFromOrder(e,t,"row");return this._crudOperations.validateSwapRowIndexes(e,n),this._crudOperations.testRowOrderForArrays(e,n),!0}catch(e){return!1}}},{key:"swapColumnIndexes",value:function(e,t){return Object(o.validateArgToType)(e,"number","sheetId"),this._crudOperations.setColumnOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToSwapColumnIndexes",value:function(e,t){Object(o.validateArgToType)(e,"number","sheetId");try{return this._crudOperations.validateSwapColumnIndexes(e,t),this._crudOperations.testColumnOrderForArrays(e,t),!0}catch(e){return!1}}},{key:"setColumnOrder",value:function(e,t){Object(o.validateArgToType)(e,"number","sheetId");var n=this._crudOperations.mappingFromOrder(e,t,"column");return this.swapColumnIndexes(e,n)}},{key:"isItPossibleToSetColumnOrder",value:function(e,t){Object(o.validateArgToType)(e,"number","sheetId");try{var n=this._crudOperations.mappingFromOrder(e,t,"column");return this._crudOperations.validateSwapColumnIndexes(e,n),this._crudOperations.testColumnOrderForArrays(e,n),!0}catch(e){return!1}}},{key:"isItPossibleToAddRows",value:function(e){Object(o.validateArgToType)(e,"number","sheetId");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=Object(m.normalizeAddedIndexes)(n);try{var a;return(a=this._crudOperations).ensureItIsPossibleToAddRows.apply(a,[e].concat(v(i))),!0}catch(e){return!1}}},{key:"addRows",value:function(e){var t;Object(o.validateArgToType)(e,"number","sheetId");for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this._crudOperations).addRows.apply(t,[e].concat(r)),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToRemoveRows",value:function(e){Object(o.validateArgToType)(e,"number","sheetId");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=Object(m.normalizeRemovedIndexes)(n);try{var a;return(a=this._crudOperations).ensureItIsPossibleToRemoveRows.apply(a,[e].concat(v(i))),!0}catch(e){return!1}}},{key:"removeRows",value:function(e){var t;Object(o.validateArgToType)(e,"number","sheetId");for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this._crudOperations).removeRows.apply(t,[e].concat(r)),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToAddColumns",value:function(e){Object(o.validateArgToType)(e,"number","sheetId");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=Object(m.normalizeAddedIndexes)(n);try{var a;return(a=this._crudOperations).ensureItIsPossibleToAddColumns.apply(a,[e].concat(v(i))),!0}catch(e){return!1}}},{key:"addColumns",value:function(e){var t;Object(o.validateArgToType)(e,"number","sheetId");for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this._crudOperations).addColumns.apply(t,[e].concat(r)),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToRemoveColumns",value:function(e){Object(o.validateArgToType)(e,"number","sheetId");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=Object(m.normalizeRemovedIndexes)(n);try{var a;return(a=this._crudOperations).ensureItIsPossibleToRemoveColumns.apply(a,[e].concat(v(i))),!0}catch(e){return!1}}},{key:"removeColumns",value:function(e){var t;Object(o.validateArgToType)(e,"number","sheetId");for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this._crudOperations).removeColumns.apply(t,[e].concat(r)),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToMoveCells",value:function(e,t){if(!Object(a.isSimpleCellAddress)(t))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","destinationLeftCorner");if(!Object(r.isSimpleCellRange)(e))throw new d.ExpectedValueOfTypeError("SimpleCellRange","source");try{var n=new r.AbsoluteCellRange(e.start,e.end);return this._crudOperations.operations.ensureItIsPossibleToMoveCells(n.start,n.width(),n.height(),t),!0}catch(e){return!1}}},{key:"moveCells",value:function(e,t){if(!Object(a.isSimpleCellAddress)(t))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","destinationLeftCorner");if(!Object(r.isSimpleCellRange)(e))throw new d.ExpectedValueOfTypeError("SimpleCellRange","source");var n=new r.AbsoluteCellRange(e.start,e.end);return this._crudOperations.moveCells(n.start,n.width(),n.height(),t),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToMoveRows",value:function(e,t,n,r){Object(o.validateArgToType)(e,"number","sheetId"),Object(o.validateArgToType)(t,"number","startRow"),Object(o.validateArgToType)(n,"number","numberOfRows"),Object(o.validateArgToType)(r,"number","targetRow");try{return this._crudOperations.ensureItIsPossibleToMoveRows(e,t,n,r),!0}catch(e){return!1}}},{key:"moveRows",value:function(e,t,n,r){return Object(o.validateArgToType)(e,"number","sheetId"),Object(o.validateArgToType)(t,"number","startRow"),Object(o.validateArgToType)(n,"number","numberOfRows"),Object(o.validateArgToType)(r,"number","targetRow"),this._crudOperations.moveRows(e,t,n,r),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToMoveColumns",value:function(e,t,n,r){Object(o.validateArgToType)(e,"number","sheetId"),Object(o.validateArgToType)(t,"number","startColumn"),Object(o.validateArgToType)(n,"number","numberOfColumns"),Object(o.validateArgToType)(r,"number","targetColumn");try{return this._crudOperations.ensureItIsPossibleToMoveColumns(e,t,n,r),!0}catch(e){return!1}}},{key:"moveColumns",value:function(e,t,n,r){return Object(o.validateArgToType)(e,"number","sheetId"),Object(o.validateArgToType)(t,"number","startColumn"),Object(o.validateArgToType)(n,"number","numberOfColumns"),Object(o.validateArgToType)(r,"number","targetColumn"),this._crudOperations.moveColumns(e,t,n,r),this.recomputeIfDependencyGraphNeedsIt()}},{key:"copy",value:function(e){if(!Object(r.isSimpleCellRange)(e))throw new d.ExpectedValueOfTypeError("SimpleCellRange","source");var t=new r.AbsoluteCellRange(e.start,e.end);return this._crudOperations.copy(t.start,t.width(),t.height()),this.getRangeValues(e)}},{key:"cut",value:function(e){if(!Object(r.isSimpleCellRange)(e))throw new d.ExpectedValueOfTypeError("SimpleCellRange","source");var t=new r.AbsoluteCellRange(e.start,e.end);return this._crudOperations.cut(t.start,t.width(),t.height()),this.getRangeValues(e)}},{key:"paste",value:function(e){if(!Object(a.isSimpleCellAddress)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","targetLeftCorner");return this.ensureEvaluationIsNotSuspended(),this._crudOperations.paste(e),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isClipboardEmpty",value:function(){return this._crudOperations.isClipboardEmpty()}},{key:"clearClipboard",value:function(){this._crudOperations.clearClipboard()}},{key:"clearRedoStack",value:function(){this._crudOperations.undoRedo.clearRedoStack()}},{key:"clearUndoStack",value:function(){this._crudOperations.undoRedo.clearUndoStack()}},{key:"getRangeValues",value:function(e){var t=this;if(!Object(r.isSimpleCellRange)(e))throw new d.ExpectedValueOfTypeError("SimpleCellRange","source");return new r.AbsoluteCellRange(e.start,e.end).arrayOfAddressesInRange().map((function(e){return e.map((function(e){return t.getCellValue(e)}))}))}},{key:"getRangeFormulas",value:function(e){var t=this;if(!Object(r.isSimpleCellRange)(e))throw new d.ExpectedValueOfTypeError("SimpleCellRange","source");return new r.AbsoluteCellRange(e.start,e.end).arrayOfAddressesInRange().map((function(e){return e.map((function(e){return t.getCellFormula(e)}))}))}},{key:"getRangeSerialized",value:function(e){var t=this;if(!Object(r.isSimpleCellRange)(e))throw new d.ExpectedValueOfTypeError("SimpleCellRange","source");return new r.AbsoluteCellRange(e.start,e.end).arrayOfAddressesInRange().map((function(e){return e.map((function(e){return t.getCellSerialized(e)}))}))}},{key:"getFillRangeData",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!Object(r.isSimpleCellRange)(e))throw new d.ExpectedValueOfTypeError("SimpleCellRange","source");if(!Object(r.isSimpleCellRange)(t))throw new d.ExpectedValueOfTypeError("SimpleCellRange","target");var i=new r.AbsoluteCellRange(e.start,e.end),a=new r.AbsoluteCellRange(t.start,t.end);return this.ensureEvaluationIsNotSuspended(),a.arrayOfAddressesInRange().map((function(r){return r.map((function(r){var a=((r.row-(o?t:e).start.row)%i.height()+i.height())%i.height()+e.start.row,s=((r.col-(o?t:e).start.col)%i.width()+i.width())%i.width()+e.start.col;return n._serialization.getCellSerialized({row:a,col:s,sheet:i.sheet},r)}))}))}},{key:"isItPossibleToAddSheet",value:function(e){Object(o.validateArgToType)(e,"string","sheetName");try{return this._crudOperations.ensureItIsPossibleToAddSheet(e),!0}catch(e){return!1}}},{key:"addSheet",value:function(e){void 0!==e&&Object(o.validateArgToType)(e,"string","sheetName");var t=this._crudOperations.addSheet(e);return this._emitter.emit(f.Events.SheetAdded,t),t}},{key:"isItPossibleToRemoveSheet",value:function(e){Object(o.validateArgToType)(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(e){return!1}}},{key:"removeSheet",value:function(e){Object(o.validateArgToType)(e,"number","sheetId");var t=this.sheetMapping.getDisplayName(e);this._crudOperations.removeSheet(e);var n=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(f.Events.SheetRemoved,t,n),n}},{key:"isItPossibleToClearSheet",value:function(e){Object(o.validateArgToType)(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(e){return!1}}},{key:"clearSheet",value:function(e){return Object(o.validateArgToType)(e,"number","sheetId"),this._crudOperations.clearSheet(e),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToReplaceSheetContent",value:function(e,t){Object(o.validateArgToType)(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),this._crudOperations.ensureItIsPossibleToChangeSheetContents(e,t),!0}catch(e){return!1}}},{key:"setSheetContent",value:function(e,t){return Object(o.validateArgToType)(e,"number","sheetId"),this._crudOperations.setSheetContent(e,t),this.recomputeIfDependencyGraphNeedsIt()}},{key:"simpleCellAddressFromString",value:function(e,t){return Object(o.validateArgToType)(e,"string","cellAddress"),Object(o.validateArgToType)(t,"number","sheetId"),Object(y.simpleCellAddressFromString)(this.sheetMapping.get,e,t)}},{key:"simpleCellRangeFromString",value:function(e,t){return Object(o.validateArgToType)(e,"string","cellRange"),Object(o.validateArgToType)(t,"number","sheetId"),Object(y.simpleCellRangeFromString)(this.sheetMapping.get,e,t)}},{key:"simpleCellAddressToString",value:function(e,t){if(!Object(a.isSimpleCellAddress)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","cellAddress");return Object(o.validateArgToType)(t,"number","sheetId"),Object(y.simpleCellAddressToString)(this.sheetMapping.fetchDisplayName,e,t)}},{key:"simpleCellRangeToString",value:function(e,t){if(!Object(r.isSimpleCellRange)(e))throw new d.ExpectedValueOfTypeError("SimpleCellRange","cellRange");return Object(o.validateArgToType)(t,"number","sheetId"),Object(y.simpleCellRangeToString)(this.sheetMapping.fetchDisplayName,e,t)}},{key:"getCellDependents",value:function(e){var t;if(Object(a.isSimpleCellAddress)(e))t=this._dependencyGraph.addressMapping.getCell(e);else{if(!Object(r.isSimpleCellRange)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress | SimpleCellRange",e);t=this._dependencyGraph.rangeMapping.getRange(e.start,e.end)}return void 0===t?[]:this._dependencyGraph.getAdjacentNodesAddresses(t)}},{key:"getCellPrecedents",value:function(e){var t;if(Object(a.isSimpleCellAddress)(e))t=this._dependencyGraph.addressMapping.getCell(e);else{if(!Object(r.isSimpleCellRange)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress | SimpleCellRange",e);t=this._dependencyGraph.rangeMapping.getRange(e.start,e.end)}return void 0===t?[]:this._dependencyGraph.dependencyQueryAddresses(t)}},{key:"getSheetName",value:function(e){return Object(o.validateArgToType)(e,"number","sheetId"),this.sheetMapping.getDisplayName(e)}},{key:"getSheetNames",value:function(){return this.sheetMapping.sheetNames()}},{key:"getSheetId",value:function(e){return Object(o.validateArgToType)(e,"string","sheetName"),this.sheetMapping.get(e)}},{key:"doesSheetExist",value:function(e){return Object(o.validateArgToType)(e,"string","sheetName"),this.sheetMapping.hasSheetWithName(e)}},{key:"getCellType",value:function(e){if(!Object(a.isSimpleCellAddress)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","cellAddress");var t=this.dependencyGraph.getCell(e);return Object(a.getCellType)(t,e)}},{key:"doesCellHaveSimpleValue",value:function(e){if(!Object(a.isSimpleCellAddress)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","cellAddress");return this.getCellType(e)===a.CellType.VALUE}},{key:"doesCellHaveFormula",value:function(e){if(!Object(a.isSimpleCellAddress)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","cellAddress");var t=this.getCellType(e);return t===a.CellType.FORMULA||t===a.CellType.ARRAYFORMULA}},{key:"isCellEmpty",value:function(e){if(!Object(a.isSimpleCellAddress)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","cellAddress");return this.getCellType(e)===a.CellType.EMPTY}},{key:"isCellPartOfArray",value:function(e){if(!Object(a.isSimpleCellAddress)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","cellAddress");var t=this.getCellType(e);return t===a.CellType.ARRAY||t===a.CellType.ARRAYFORMULA}},{key:"getCellValueType",value:function(e){if(!Object(a.isSimpleCellAddress)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();var t=this.dependencyGraph.getCellValue(e);return Object(a.getCellValueType)(t)}},{key:"getCellValueDetailedType",value:function(e){if(!Object(a.isSimpleCellAddress)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();var t=this.dependencyGraph.getCellValue(e);return Object(a.getCellValueDetailedType)(t)}},{key:"getCellValueFormat",value:function(e){if(!Object(a.isSimpleCellAddress)(e))throw new d.ExpectedValueOfTypeError("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();var t=this.dependencyGraph.getCellValue(e);return Object(a.getCellValueFormat)(t)}},{key:"countSheets",value:function(){return this.sheetMapping.numberOfSheets()}},{key:"isItPossibleToRenameSheet",value:function(e,t){Object(o.validateArgToType)(e,"number","sheetId"),Object(o.validateArgToType)(t,"string","newName");try{return this._crudOperations.ensureItIsPossibleToRenameSheet(e,t),!0}catch(e){return!1}}},{key:"renameSheet",value:function(e,t){Object(o.validateArgToType)(e,"number","sheetId"),Object(o.validateArgToType)(t,"string","newName");var n=this._crudOperations.renameSheet(e,t);void 0!==n&&this._emitter.emit(f.Events.SheetRenamed,n,t)}},{key:"batch",value:function(e){this.suspendEvaluation(),this._crudOperations.beginUndoRedoBatchMode();try{e()}catch(e){throw this._crudOperations.commitUndoRedoBatchMode(),this.resumeEvaluation(),e}return this._crudOperations.commitUndoRedoBatchMode(),this.resumeEvaluation()}},{key:"suspendEvaluation",value:function(){this._evaluationSuspended=!0,this._emitter.emit(f.Events.EvaluationSuspended)}},{key:"resumeEvaluation",value:function(){this._evaluationSuspended=!1;var e=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(f.Events.EvaluationResumed,e),e}},{key:"isEvaluationSuspended",value:function(){return this._evaluationSuspended}},{key:"isItPossibleToAddNamedExpression",value:function(e,t,n){Object(o.validateArgToType)(e,"string","expressionName"),void 0!==n&&Object(o.validateArgToType)(n,"number","scope");try{return this._crudOperations.ensureItIsPossibleToAddNamedExpression(e,t,n),!0}catch(e){return!1}}},{key:"addNamedExpression",value:function(e,t,n,r){Object(o.validateArgToType)(e,"string","expressionName"),void 0!==n&&Object(o.validateArgToType)(n,"number","scope"),this._crudOperations.addNamedExpression(e,t,n,r);var i=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(f.Events.NamedExpressionAdded,e,i),i}},{key:"getNamedExpressionValue",value:function(e,t){Object(o.validateArgToType)(e,"string","expressionName"),void 0!==t&&Object(o.validateArgToType)(t,"number","scope"),this.ensureEvaluationIsNotSuspended(),this._crudOperations.ensureScopeIdIsValid(t);var n=this._namedExpressions.namedExpressionForScope(e,t);return n?this._serialization.getCellValue(n.address):void 0}},{key:"getNamedExpressionFormula",value:function(e,t){Object(o.validateArgToType)(e,"string","expressionName"),void 0!==t&&Object(o.validateArgToType)(t,"number","scope"),this._crudOperations.ensureScopeIdIsValid(t);var n=this._namedExpressions.namedExpressionForScope(e,t);return void 0===n?void 0:this._serialization.getCellFormula(n.address)}},{key:"getNamedExpression",value:function(e,t){Object(o.validateArgToType)(e,"string","expressionName"),void 0!==t&&Object(o.validateArgToType)(t,"number","scope");var n=this._namedExpressions.namedExpressionForScope(e,t);if(void 0!==n)return{name:e,scope:t,expression:this._serialization.getCellFormula(n.address),options:n.options}}},{key:"isItPossibleToChangeNamedExpression",value:function(e,t,n){Object(o.validateArgToType)(e,"string","expressionName"),void 0!==n&&Object(o.validateArgToType)(n,"number","scope");try{return this._crudOperations.ensureItIsPossibleToChangeNamedExpression(e,t,n),!0}catch(e){return!1}}},{key:"changeNamedExpression",value:function(e,t,n,r){return Object(o.validateArgToType)(e,"string","expressionName"),void 0!==n&&Object(o.validateArgToType)(n,"number","scope"),this._crudOperations.changeNamedExpressionExpression(e,n,t,r),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToRemoveNamedExpression",value:function(e,t){Object(o.validateArgToType)(e,"string","expressionName"),void 0!==t&&Object(o.validateArgToType)(t,"number","scope");try{return this._crudOperations.isItPossibleToRemoveNamedExpression(e,t),!0}catch(e){return!1}}},{key:"removeNamedExpression",value:function(e,t){Object(o.validateArgToType)(e,"string","expressionName"),void 0!==t&&Object(o.validateArgToType)(t,"number","scope");var n=this._crudOperations.removeNamedExpression(e,t);if(n){var r=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(f.Events.NamedExpressionRemoved,n.displayName,r),r}return[]}},{key:"listNamedExpressions",value:function(e){return void 0!==e&&Object(o.validateArgToType)(e,"number","scope"),this._crudOperations.ensureScopeIdIsValid(e),this._namedExpressions.getAllNamedExpressionsNamesInScope(e)}},{key:"getAllNamedExpressionsSerialized",value:function(){return this._serialization.getAllNamedExpressionsSerialized()}},{key:"normalizeFormula",value:function(e){Object(o.validateArgToType)(e,"string","formulaString");var t=this.extractTemporaryFormula(e),n=t.ast,r=t.address;if(void 0===n)throw new d.NotAFormulaError;return this._unparser.unparse(n,r)}},{key:"calculateFormula",value:function(e,t){Object(o.validateArgToType)(e,"string","formulaString"),Object(o.validateArgToType)(t,"number","sheetId"),this._crudOperations.ensureScopeIdIsValid(t);var n=this.extractTemporaryFormula(e,t),r=n.ast,i=n.address,a=n.dependencies;if(void 0===r)throw new d.NotAFormulaError;var s=this.evaluator.runAndForget(r,i,a);return this._exporter.exportScalarOrRange(s)}},{key:"validateFormula",value:function(e){Object(o.validateArgToType)(e,"string","formulaString");var t=this.extractTemporaryFormula(e).ast;return void 0!==t&&!(t.type===y.AstNodeType.ERROR&&!t.error)}},{key:"getRegisteredFunctionNames",value:function(){return e.getLanguage(this._config.language).getFunctionTranslations(this._functionRegistry.getRegisteredFunctionIds())}},{key:"getFunctionPlugin",value:function(e){return Object(o.validateArgToType)(e,"string","functionId"),this._functionRegistry.getFunctionPlugin(e)}},{key:"getAllFunctionPlugins",value:function(){return this._functionRegistry.getPlugins()}},{key:"numberToDateTime",value:function(e){return Object(o.validateArgToType)(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDateTime(e)}},{key:"numberToDate",value:function(e){return Object(o.validateArgToType)(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDate(e)}},{key:"numberToTime",value:function(e){return Object(o.validateArgToType)(e,"number","val"),Object(l.numberToSimpleTime)(e)}},{key:"extractTemporaryFormula",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this._cellContentParser.parse(e),r={sheet:t,col:0,row:0};if(!(n instanceof s.CellContent.Formula))return{address:r,dependencies:[]};var o=this._parser.parse(n.formula,r),i=o.ast,a=o.errors,u=o.dependencies;return a.length>0?{address:r,dependencies:[]}:{ast:i,address:r,dependencies:u}}},{key:"on",value:function(e,t){this._emitter.on(e,t)}},{key:"once",value:function(e,t){this._emitter.once(e,t)}},{key:"off",value:function(e,t){this._emitter.off(e,t)}},{key:"destroy",value:function(){this._evaluator.interpreter.destroyGpu(),Object(c.objectDestroy)(this)}},{key:"recomputeIfDependencyGraphNeedsIt",value:function(){if(this._evaluationSuspended)return[];var e=this._crudOperations.getAndClearContentChanges(),t=Array.from(this.dependencyGraph.verticesToRecompute());this.dependencyGraph.clearRecentlyChangedVertices(),t.length>0&&e.addAll(this.evaluator.partialRun(t));var n=e.exportChanges(this._exporter);return e.isEmpty()||this._emitter.emit(f.Events.ValuesUpdated,n),n}}])&&T(t.prototype,n),E&&T(t,E),e}();C.version="1.3.0",C.buildDate="20/10/2021 11:25:14",C.releaseDate="20/10/2021",C.languages={},C.registeredLanguages=new Map},function(e,t,n){"use strict";n.r(t),n.d(t,"CellContent",(function(){return r})),n.d(t,"isFormula",(function(){return y})),n.d(t,"isBoolean",(function(){return v})),n.d(t,"isError",(function(){return g})),n.d(t,"CellContentParser",(function(){return E}));n(115),n(12),n(282),n(108),n(0),n(24),n(21),n(2),n(8),n(9),n(10),n(3),n(4);var r,o=n(22),i=n(154),a=n(43),s=n(39),u=n(105),l=n(48);function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),e}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function y(e){return e.startsWith("=")}function v(e){var t=e.toLowerCase();return"true"===t||"false"===t}function g(e,t){var n=e.toUpperCase();return/#[A-Za-z0-9\/]+[?!]?/.test(n)&&Object.prototype.hasOwnProperty.call(t,n)}!function(e){e.Number=function e(t){m(this,e),this.value=t,this.value=Object(l.cloneNumber)(this.value,Object(u.fixNegativeZero)(Object(l.getRawValue)(this.value)))};e.String=function e(t){m(this,e),this.value=t};e.Boolean=function e(t){m(this,e),this.value=t};var t=function(){function e(){m(this,e)}return p(e,null,[{key:"getSingletonInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}]),e}();e.Empty=t;e.Formula=function e(t){m(this,e),this.formula=t};e.Error=function e(t,n){m(this,e),this.value=new o.CellError(t,n)}}(r||(r={}));var E=function(){function e(t,n,r){m(this,e),this.config=t,this.dateHelper=n,this.numberLiteralsHelper=r}return p(e,[{key:"currencyMatcher",value:function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=f(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(this.config.currencySymbol);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(e.startsWith(r))return[r,e.slice(r.length)];if(e.endsWith(r))return[r,e.slice(0,e.length-r.length)]}}catch(e){n.e(e)}finally{n.f()}}},{key:"parse",value:function(e){if(null==e)return r.Empty.getSingletonInstance();if("number"==typeof e)return Object(u.isNumberOverflow)(e)?new r.Error(o.ErrorType.NUM,a.ErrorMessage.ValueLarge):new r.Number(e);if("boolean"==typeof e)return new r.Boolean(e);if(e instanceof Date){var t=this.dateHelper.dateToNumber({day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()})+Object(i.timeToNumber)({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()+e.getMilliseconds()/1e3});return t<0?new r.Error(o.ErrorType.NUM,a.ErrorMessage.DateBounds):t%1==0?new r.Number(new l.DateNumber(t,"Date()")):t<1?new r.Number(new l.TimeNumber(t,"Date()")):new r.Number(new l.DateTimeNumber(t,"Date()"))}if("string"==typeof e){if(v(e))return new r.Boolean("true"===e.toLowerCase());if(y(e))return new r.Formula(e);if(g(e,this.config.errorMapping))return new r.Error(this.config.errorMapping[e.toUpperCase()]);var n,f=e.trim(),d=0;if(f.endsWith("%"))d=1,f=f.slice(0,f.length-1);else{var h=this.currencyMatcher(f);if(void 0!==h){d=2;var p=c(h,2);n=p[0],f=p[1]}}var m,E=this.numberLiteralsHelper.numericStringToMaybeNumber(f);if(void 0!==E)return m=1===d?new l.PercentNumber(E/100):2===d?new l.CurrencyNumber(E,n):E,new r.Number(m);var T=this.dateHelper.dateStringToDateNumber(f);return void 0!==T?new r.Number(T):new r.String(e.startsWith("'")?e.slice(1):e)}throw new s.UnableToParseError(e)}}]),e}()},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.default=void 0;var o=r(n(5)),i=r(n(6)),a=function(){function e(t,n){(0,o.default)(this,e),this.row=null,this.col=null,void 0!==t&&void 0!==n&&(this.row=t,this.col=n)}return(0,i.default)(e,[{key:"isValid",value:function(e){return!(this.row<0||this.col<0)&&!(this.row>=e.getSetting("totalRows")||this.col>=e.getSetting("totalColumns"))}},{key:"isEqual",value:function(e){return e===this||this.row===e.row&&this.col===e.col}},{key:"isSouthEastOf",value:function(e){return this.row>=e.row&&this.col>=e.col}},{key:"isNorthWestOf",value:function(e){return this.row<=e.row&&this.col<=e.col}},{key:"isSouthWestOf",value:function(e){return this.row>=e.row&&this.col<=e.col}},{key:"isNorthEastOf",value:function(e){return this.row<=e.row&&this.col>=e.col}},{key:"normalize",value:function(){return this.row=null===this.row?this.row:Math.max(this.row,0),this.col=null===this.col?this.col:Math.max(this.col,0),this}},{key:"clone",value:function(){return new e(this.row,this.col)}},{key:"toObject",value:function(){return{row:this.row,col:this.col}}}]),e}();t.default=a},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.default=void 0;var o=r(n(5)),i=r(n(6)),a=r(n(736)),s=function(){function e(t,n){(0,o.default)(this,e),this.nodesPool="string"==typeof t?new a.default(t):null,this.nodeType=t,this.rootNode=n,this.table=null,this.renderedNodes=0}return(0,i.default)(e,[{key:"setTable",value:function(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}},{key:"adjust",value:function(){}},{key:"render",value:function(){}}]),e}();t.default=s},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.getRegisteredRenderers=t.getRegisteredRendererNames=void 0,t.getRenderer=function(e){if("function"==typeof e)return e;if(!s(e))throw Error('No registered renderer found under "'.concat(e,'" name'));return a(e)},t.hasRenderer=void 0,t.registerRenderer=function(e,t){"string"!=typeof e&&(e=(t=e).RENDERER_TYPE);i(e,t)};var o=(0,r(n(109)).default)("renderers"),i=o.register,a=o.getItem,s=o.hasItem,u=o.getNames,l=o.getValues;t.getRegisteredRenderers=l,t.getRegisteredRendererNames=u,t.hasRenderer=s},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.getRegisteredValidators=t.getRegisteredValidatorNames=void 0,t.getValidator=function(e){if("function"==typeof e)return e;if(!s(e))throw Error('No registered validator found under "'.concat(e,'" name'));return a(e)},t.hasValidator=void 0,t.registerValidator=function(e,t){"string"!=typeof e&&(e=(t=e).VALIDATOR_TYPE);i(e,t)};var o=(0,r(n(109)).default)("validators"),i=o.register,a=o.getItem,s=o.hasItem,u=o.getNames,l=o.getValues;t.getRegisteredValidators=l,t.getRegisteredValidatorNames=u,t.hasValidator=s},function(e,t,n){"use strict";t.__esModule=!0,t.assert=function(e,t){if(!e())throw new Error("Assertion failed: ".concat(t))},t.columnFactory=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function n(){}(0,r.inherit)(n,e);for(var o=0;o<t.length;o++)n.prototype[t[o]]=void 0;return n},t.expandMetaType=function(e,t){var n="string"==typeof e?(0,o.getCellType)(e):e;if(!(0,r.isObject)(n))return;var i=(0,r.isObject)(t),a={};return(0,r.objectEach)(n,(function(e,n){"CELL_TYPE"===n||i&&(!i||(0,r.hasOwnProperty)(t,n))||(a[n]=e)})),a},t.isNullish=function(e){return null==e},t.isUnsignedNumber=function(e){return Number.isInteger(e)&&e>=0},n(67),n(51);var r=n(14),o=n(160)},function(e,t,n){"use strict";t.__esModule=!0,t.autocompleteRenderer=t.RENDERER_TYPE=void 0;var r=n(822);t.RENDERER_TYPE=r.RENDERER_TYPE,t.autocompleteRenderer=r.autocompleteRenderer},function(e,t,n){"use strict";t.__esModule=!0,t.createArrayAssertion=l,t.intersectValues=function(e,t,n,r){var i,s=[],u=e===t;u||(i=l(t));return(0,o.arrayEach)(e,(function(e){var t=!1;(u||i(e))&&(t=!0);var o={checked:t,value:e,visualValue:a(e,n)};r&&r(o),s.push(o)})),s},t.sortComparison=function(e,t){if("number"==typeof e&&"number"==typeof t)return e-t;return i(e,t)},t.toEmptyString=function(e){return null==e?"":e},t.toVisualValue=a,t.unifyColumnValues=function(e){var t=e;t=u?Array.from(new Set(t)):(0,o.arrayUnique)(t);return t=t.sort((function(e,t){return"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1}))},n(3),n(0),n(58),n(2),n(4),n(21),n(31),n(77);var r=n(128),o=n(19),i=(0,r.getComparisonFunction)();function a(e,t){var n=e;return""===n&&(n="(".concat(t,")")),n}var s=new Set([1]).has(1),u=s&&"function"==typeof Array.from;function l(e){var t=e;return s&&(t=new Set(t)),function(e){return s?t.has(e):!!~t.indexOf(e)}}},function(e,t,n){"use strict";t.__esModule=!0,t.getOperationFunc=function(e){if(!r[e])throw Error('Operation with id "'.concat(e,'" does not exist.'));var t=r[e].func;return function(e,n){return t(e,n)}},t.getOperationName=function(e){return r[e].name},t.operations=void 0,t.registerOperation=function(e,t,n){r[e]={name:t,func:n}},n(24);var r={};t.operations=r},function(e,t,n){"use strict";n(3),n(0),n(2),n(11),n(4),n(17);var r=n(1),o=n(18);t.__esModule=!0,t.default=void 0,n(115);var i=r(n(5)),a=r(n(6)),s=n(14),u=r(n(93)),l=r(n(53)),c=n(23),f=n(19),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(27));function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}var p=["click","input","keydown","keypress","keyup","focus","blur","change"],m=function(){function e(t,n){(0,i.default)(this,e),this.hot=t,this.eventManager=new l.default(this),this.options=(0,s.extend)(e.DEFAULTS,n),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName),this.buildState=null}return(0,a.default)(e,[{key:"setValue",value:function(e){this.options.value=e,this.update()}},{key:"getValue",value:function(){return this.options.value}},{key:"element",get:function(){return"building"===this.buildState?this._element:"built"===this.buildState?(this.update(),this._element):(this.buildState="building",this.build(),this.buildState="built",this._element)}},{key:"isBuilt",value:function(){return"built"===this.buildState}},{key:"translateIfPossible",value:function(e){return"string"==typeof e&&e.startsWith(d.FILTERS_NAMESPACE)?this.hot.getTranslatedPhrase(e):e}},{key:"build",value:function(){var e=this,t=function(t,n){e.eventManager.addEventListener(t,n,(function(t){return e.runLocalHooks(n,t,e)}))};if(this.buildState||(this.buildState="building"),this.options.className&&(0,c.addClass)(this._element,this.options.className),this.options.children.length)(0,f.arrayEach)(this.options.children,(function(t){return e._element.appendChild(t.element)}));else if(this.options.wrapIt){var n=this.hot.rootDocument.createElement(this.options.tagName);(0,s.objectEach)(this.options,(function(t,r){void 0!==n[r]&&"className"!==r&&"tagName"!==r&&"children"!==r&&(n[r]=e.translateIfPossible(t))})),this._element.appendChild(n),(0,f.arrayEach)(p,(function(e){return t(n,e)}))}else(0,f.arrayEach)(p,(function(n){return t(e._element,n)}))}},{key:"update",value:function(){}},{key:"reset",value:function(){this.options.value="",this.update()}},{key:"show",value:function(){this.element.style.display=""}},{key:"hide",value:function(){this.element.style.display="none"}},{key:"focus",value:function(){}},{key:"destroy",value:function(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}}],[{key:"DEFAULTS",get:function(){return(0,s.clone)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}}]),e}();(0,s.mixin)(m,u.default);var y=m;t.default=y},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(317),o=n(197);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},function(e,t,n){var r=n(28),o=n(121),i=n(61),a=n(122),s=n(318),u=r.Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=o("Symbol");return i(t)&&a(t.prototype,u(e))}},function(e,t,n){var r=n(28).String;e.exports=function(e){try{return r(e)}catch(e){return"Object"}}},function(e,t,n){var r=n(132),o=n(234);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.20.2",mode:r?"pure":"global",copyright:"© 2022 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(35),o=0,i=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},function(e,t,n){var r=n(28),o=n(63),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(199),o=n(200),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t,n){var r=n(41),o=n(61),i=/#|\.prototype\./,a=function(e,t){var n=u[s(e)];return n==c||n!=l&&(o(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},u=a.data={},l=a.NATIVE="N",c=a.POLYFILL="P";e.exports=a},function(e,t,n){var r=n(28),o=n(73),i=n(61),a=n(91),s=n(202),u=n(325),l=s("IE_PROTO"),c=r.Object,f=c.prototype;e.exports=u?c.getPrototypeOf:function(e){var t=a(e);if(o(t,l))return t[l];var n=t.constructor;return i(n)&&t instanceof n?n.prototype:t instanceof c?f:null}},function(e,t,n){var r=n(28),o=n(243),i=n(61),a=n(120),s=n(59)("toStringTag"),u=r.Object,l="Arguments"==a(function(){return arguments}());e.exports=o?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=u(e),s))?n:l?a(t):"Object"==(r=a(t))&&i(t.callee)?"Arguments":r}},function(e,t,n){var r=n(35),o=n(41),i=n(61),a=n(205),s=n(121),u=n(236),l=function(){},c=[],f=s("Reflect","construct"),d=/^\s*(?:class|function)\b/,h=r(d.exec),p=!d.exec(l),m=function(e){if(!i(e))return!1;try{return f(l,c,e),!0}catch(e){return!1}},y=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!h(d,u(e))}catch(e){return!0}};y.sham=!0,e.exports=!f||o((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?y:m},function(e,t,n){var r=n(82).f,o=n(73),i=n(59)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!o(e,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(29),o=n(28),i=n(35),a=n(203),s=n(104),u=n(175),l=n(251),c=n(252),f=n(61),d=n(63),h=n(41),p=n(332),m=n(207),y=n(253);e.exports=function(e,t,n){var v=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),E=v?"set":"add",T=o[e],C=T&&T.prototype,b=T,w={},R=function(e){var t=i(C[e]);s(C,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!d(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return g&&!d(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!d(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(a(e,!f(T)||!(g||C.forEach&&!h((function(){(new T).entries().next()})))))b=n.getConstructor(t,e,v,E),u.enable();else if(a(e,!0)){var O=new b,S=O[E](g?{}:-0,1)!=O,A=h((function(){O.has(1)})),N=p((function(e){new T(e)})),M=!g&&h((function(){for(var e=new T,t=5;t--;)e[E](t,t);return!e.has(-0)}));N||((b=t((function(e,t){c(e,C);var n=y(new T,e,b);return null!=t&&l(t,n[E],{that:n,AS_ENTRIES:v}),n}))).prototype=C,C.constructor=b),(A||M)&&(R("delete"),R("has"),v&&R("get")),(M||S)&&R(E),g&&C.clear&&delete C.clear}return w[e]=b,r({global:!0,forced:b!=T},w),m(b,e),g||n.setStrong(b,e,v),b}},function(e,t,n){"use strict";var r,o,i=n(78),a=n(35),s=n(74),u=n(256),l=n(257),c=n(199),f=n(135),d=n(114).get,h=n(347),p=n(348),m=c("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,v=y,g=a("".charAt),E=a("".indexOf),T=a("".replace),C=a("".slice),b=(o=/b*/g,i(y,r=/a/,"a"),i(y,o,"a"),0!==r.lastIndex||0!==o.lastIndex),w=l.BROKEN_CARET,R=void 0!==/()??/.exec("")[1];(b||R||w||h||p)&&(v=function(e){var t,n,r,o,a,l,c,h=this,p=d(h),O=s(e),S=p.raw;if(S)return S.lastIndex=h.lastIndex,t=i(v,S,O),h.lastIndex=S.lastIndex,t;var A=p.groups,N=w&&h.sticky,M=i(u,h),k=h.source,_=0,I=O;if(N&&(M=T(M,"y",""),-1===E(M,"g")&&(M+="g"),I=C(O,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==g(O,h.lastIndex-1))&&(k="(?: "+k+")",I=" "+I,_++),n=new RegExp("^(?:"+k+")",M)),R&&(n=new RegExp("^"+k+"$(?!\\s)",M)),b&&(r=h.lastIndex),o=i(y,N?n:h,I),N?o?(o.input=C(o.input,_),o[0]=C(o[0],_),o.index=h.lastIndex,h.lastIndex+=o[0].length):h.lastIndex=0:b&&o&&(h.lastIndex=h.global?o.index+o[0].length:r),R&&o&&o.length>1&&i(m,o[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&A)for(o.groups=l=f(null),a=0;a<A.length;a++)l[(c=A[a])[0]]=o[c[1]];return o}),e.exports=v},function(e,t,n){"use strict";n(33);var r=n(35),o=n(104),i=n(209),a=n(41),s=n(59),u=n(123),l=s("species"),c=RegExp.prototype;e.exports=function(e,t,n,f){var d=s(e),h=!a((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),p=h&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return t=!0,null},n[d](""),!t}));if(!h||!p||n){var m=r(/./[d]),y=t(d,""[e],(function(e,t,n,o,a){var s=r(e),u=t.exec;return u===i||u===c.exec?h&&!a?{done:!0,value:m(t,n,o)}:{done:!0,value:s(n,t,o)}:{done:!1}}));o(String.prototype,e,y[0]),o(c,d,y[1])}f&&u(c[d],"sham",!0)}},function(e,t,n){var r=n(28),o=n(78),i=n(64),a=n(61),s=n(120),u=n(209),l=r.TypeError;e.exports=function(e,t){var n=e.exec;if(a(n)){var r=o(n,e,t);return null!==r&&i(r),r}if("RegExp"===s(e))return o(u,e,t);throw l("RegExp#exec called on incompatible receiver")}},function(e,t,n){"use strict";n.r(t),n.d(t,"CellReferenceType",(function(){return r})),n.d(t,"CellAddress",(function(){return s}));n(20);var r,o=n(22),i=n(99);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e.CELL_REFERENCE_RELATIVE="CELL_REFERENCE",e.CELL_REFERENCE_ABSOLUTE="CELL_REFERENCE_ABSOLUTE",e.CELL_REFERENCE_ABSOLUTE_COL="CELL_REFERENCE_ABSOLUTE_COL",e.CELL_REFERENCE_ABSOLUTE_ROW="CELL_REFERENCE_ABSOLUTE_ROW"}(r||(r={}));var s=function(){function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.col=t,this.row=n,this.type=r,this.sheet=o}var t,n,s;
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/return t=e,s=[{key:"relative",value:function(t,n,o){return new e(n,t,r.CELL_REFERENCE_RELATIVE,o)}},{key:"absolute",value:function(t,n,o){return new e(t,n,r.CELL_REFERENCE_ABSOLUTE,o)}},{key:"absoluteCol",value:function(t,n,o){return new e(t,n,r.CELL_REFERENCE_ABSOLUTE_COL,o)}},{key:"absoluteRow",value:function(t,n,o){return new e(t,n,r.CELL_REFERENCE_ABSOLUTE_ROW,o)}}],(n=[{key:"toSimpleCellAddress",value:function(e){var t=Object(o.absoluteSheetReference)(this,e);return this.type===r.CELL_REFERENCE_ABSOLUTE?Object(o.simpleCellAddress)(t,this.col,this.row):this.type===r.CELL_REFERENCE_ABSOLUTE_ROW?Object(o.simpleCellAddress)(t,e.col+this.col,this.row):this.type===r.CELL_REFERENCE_ABSOLUTE_COL?Object(o.simpleCellAddress)(t,this.col,e.row+this.row):Object(o.simpleCellAddress)(t,e.col+this.col,e.row+this.row)}},{key:"toSimpleColumnAddress",value:function(e){var t=Object(o.absoluteSheetReference)(this,e),n=this.col;return this.isColumnRelative()&&(n+=e.col),Object(o.simpleColumnAddress)(t,n)}},{key:"toSimpleRowAddress",value:function(e){var t=Object(o.absoluteSheetReference)(this,e),n=this.row;return this.isRowRelative()&&(n+=e.row),Object(o.simpleRowAddress)(t,n)}},{key:"isRowAbsolute",value:function(){return this.type===r.CELL_REFERENCE_ABSOLUTE||this.type===r.CELL_REFERENCE_ABSOLUTE_ROW}},{key:"isColumnAbsolute",value:function(){return this.type===r.CELL_REFERENCE_ABSOLUTE||this.type===r.CELL_REFERENCE_ABSOLUTE_COL}},{key:"isColumnRelative",value:function(){return this.type===r.CELL_REFERENCE_RELATIVE||this.type===r.CELL_REFERENCE_ABSOLUTE_ROW}},{key:"isRowRelative",value:function(){return this.type===r.CELL_REFERENCE_RELATIVE||this.type===r.CELL_REFERENCE_ABSOLUTE_COL}},{key:"isAbsolute",value:function(){return this.type===r.CELL_REFERENCE_ABSOLUTE&&void 0!==this.sheet}},{key:"shiftedByRows",value:function(t){return new e(this.col,this.row+t,this.type,this.sheet)}},{key:"shiftedByColumns",value:function(t){return new e(this.col+t,this.row,this.type,this.sheet)}},{key:"moved",value:function(t,n,r){var o=void 0===this.sheet?void 0:t;return new e(this.col+n,this.row+r,this.type,o)}},{key:"withAbsoluteSheet",value:function(t){return new e(this.col,this.row,this.type,t)}},{key:"isInvalid",value:function(e){return Object(o.invalidSimpleCellAddress)(this.toSimpleCellAddress(e))}},{key:"shiftRelativeDimensions",value:function(t,n){return new e(this.isColumnAbsolute()?this.col:this.col+t,this.isRowAbsolute()?this.row:this.row+n,this.type,this.sheet)}},{key:"shiftAbsoluteDimensions",value:function(t,n){return new e(this.isColumnRelative()?this.col:this.col+t,this.isRowRelative()?this.row:this.row+n,this.type,this.sheet)}},{key:"hash",value:function(e){var t=e&&void 0!==this.sheet?"#".concat(this.sheet):"";switch(this.type){case r.CELL_REFERENCE_RELATIVE:return"".concat(t,"#").concat(this.row,"R").concat(this.col);case r.CELL_REFERENCE_ABSOLUTE:return"".concat(t,"#").concat(this.row,"A").concat(this.col);case r.CELL_REFERENCE_ABSOLUTE_COL:return"".concat(t,"#").concat(this.row,"AC").concat(this.col);case r.CELL_REFERENCE_ABSOLUTE_ROW:return"".concat(t,"#").concat(this.row,"AR").concat(this.col)}}},{key:"unparse",value:function(e){var t=this.toSimpleCellAddress(e);if(!Object(o.invalidSimpleCellAddress)(t)){var n=Object(i.columnIndexToLabel)(t.col),a=this.type===r.CELL_REFERENCE_ABSOLUTE||this.type===r.CELL_REFERENCE_ABSOLUTE_ROW?"$":"",s=this.type===r.CELL_REFERENCE_ABSOLUTE||this.type===r.CELL_REFERENCE_ABSOLUTE_COL?"$":"";return"".concat(s).concat(n).concat(a).concat(t.row+1)}}},{key:"exceedsSheetSizeLimits",value:function(e,t){return this.row>=t||this.col>=e}}])&&a(t.prototype,n),s&&a(t,s),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"clearCache",(function(){return m}));var r=n(259);n.d(t,"VERSION",(function(){return r.VERSION}));var o=n(79);n.d(t,"Parser",(function(){return o.Parser})),n.d(t,"CstParser",(function(){return o.CstParser})),n.d(t,"EmbeddedActionsParser",(function(){return o.EmbeddedActionsParser})),n.d(t,"ParserDefinitionErrorType",(function(){return o.ParserDefinitionErrorType})),n.d(t,"EMPTY_ALT",(function(){return o.EMPTY_ALT}));var i=n(152);n.d(t,"Lexer",(function(){return i.Lexer})),n.d(t,"LexerDefinitionErrorType",(function(){return i.LexerDefinitionErrorType}));var a=n(96);n.d(t,"createToken",(function(){return a.createToken})),n.d(t,"createTokenInstance",(function(){return a.createTokenInstance})),n.d(t,"EOF",(function(){return a.EOF})),n.d(t,"tokenLabel",(function(){return a.tokenLabel})),n.d(t,"tokenMatcher",(function(){return a.tokenMatcher})),n.d(t,"tokenName",(function(){return a.tokenName}));var s=n(138);n.d(t,"defaultGrammarResolverErrorProvider",(function(){return s.defaultGrammarResolverErrorProvider})),n.d(t,"defaultGrammarValidatorErrorProvider",(function(){return s.defaultGrammarValidatorErrorProvider})),n.d(t,"defaultParserErrorProvider",(function(){return s.defaultParserErrorProvider}));var u=n(107);n.d(t,"EarlyExitException",(function(){return u.EarlyExitException})),n.d(t,"isRecognitionException",(function(){return u.isRecognitionException})),n.d(t,"MismatchedTokenException",(function(){return u.MismatchedTokenException})),n.d(t,"NotAllInputParsedException",(function(){return u.NotAllInputParsedException})),n.d(t,"NoViableAltException",(function(){return u.NoViableAltException}));var l=n(263);n.d(t,"defaultLexerErrorProvider",(function(){return l.defaultLexerErrorProvider}));var c=n(55);n.d(t,"Alternation",(function(){return c.Alternation})),n.d(t,"Flat",(function(){return c.Flat})),n.d(t,"NonTerminal",(function(){return c.NonTerminal})),n.d(t,"Option",(function(){return c.Option})),n.d(t,"Repetition",(function(){return c.Repetition})),n.d(t,"RepetitionMandatory",(function(){return c.RepetitionMandatory})),n.d(t,"RepetitionMandatoryWithSeparator",(function(){return c.RepetitionMandatoryWithSeparator})),n.d(t,"RepetitionWithSeparator",(function(){return c.RepetitionWithSeparator})),n.d(t,"Rule",(function(){return c.Rule})),n.d(t,"Terminal",(function(){return c.Terminal})),n.d(t,"serializeGrammar",(function(){return c.serializeGrammar})),n.d(t,"serializeProduction",(function(){return c.serializeProduction}));var f=n(137);n.d(t,"GAstVisitor",(function(){return f.GAstVisitor}));var d=n(180);n.d(t,"assignOccurrenceIndices",(function(){return d.assignOccurrenceIndices})),n.d(t,"resolveGrammar",(function(){return d.resolveGrammar})),n.d(t,"validateGrammar",(function(){return d.validateGrammar}));var h=n(356);n.d(t,"createSyntaxDiagramsCode",(function(){return h.createSyntaxDiagramsCode}));var p=n(265);function m(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API.\n\t It performs no action other than printing this message.\n\t Please avoid using it as it will be completely removed in the future")}n.d(t,"generateParserFactory",(function(){return p.generateParserFactory})),n.d(t,"generateParserModule",(function(){return p.generateParserModule}))},function(e,t,n){"use strict";n.r(t),n.d(t,"validateGrammar",(function(){return h})),n.d(t,"identifyProductionForDuplicates",(function(){return p})),n.d(t,"OccurrenceValidationCollector",(function(){return y})),n.d(t,"validTermsPattern",(function(){return v})),n.d(t,"validNestedRuleName",(function(){return g})),n.d(t,"validateRuleName",(function(){return E})),n.d(t,"validateNestedRuleName",(function(){return T})),n.d(t,"validateTokenName",(function(){return C})),n.d(t,"validateRuleDoesNotAlreadyExist",(function(){return b})),n.d(t,"validateRuleIsOverridden",(function(){return w})),n.d(t,"validateNoLeftRecursion",(function(){return R})),n.d(t,"getFirstNoneTerminal",(function(){return O})),n.d(t,"validateEmptyOrAlternative",(function(){return A})),n.d(t,"validateAmbiguousAlternationAlternatives",(function(){return N})),n.d(t,"RepetionCollector",(function(){return M})),n.d(t,"validateTooManyAlts",(function(){return k})),n.d(t,"validateSomeNonEmptyLookaheadPath",(function(){return _})),n.d(t,"checkPrefixAlternativesAmbiguities",(function(){return I}));var r,o=n(46),i=n(79),a=n(178),s=n(215),u=n(264),l=n(216),c=n(55),f=n(137),d=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function h(e,t,n,r,s,l){var c=o.map(e,(function(e){return function(e,t){var n=new y;e.accept(n);var r=n.allProductions,s=o.groupBy(r,p),u=o.pick(s,(function(e){return e.length>1}));return o.map(o.values(u),(function(n){var r=o.first(n),s=t.buildDuplicateFoundError(e,n),u=Object(a.getProductionDslName)(r),l={message:s,type:i.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:u,occurrence:r.idx},c=m(r);return c&&(l.parameter=c),l}))}(e,s)})),f=o.map(e,(function(e){return R(e,e,s)})),d=[],h=[],v=[];Object(o.every)(f,o.isEmpty)&&(d=Object(o.map)(e,(function(e){return A(e,s)})),h=Object(o.map)(e,(function(e){return N(e,t,r,s)})),v=_(e,t,s));var g=function(e,t,n){var r=[],a=Object(o.map)(t,(function(e){return e.name}));return Object(o.forEach)(e,(function(e){var t=e.name;if(Object(o.contains)(a,t)){var s=n.buildNamespaceConflictError(e);r.push({message:s,type:i.ParserDefinitionErrorType.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}})),r}(e,n,s),w=o.map(n,(function(e){return C(e,s)})),O=function(e,t){var n=[];return Object(o.forEach)(e,(function(e){var r=new u.NamedDSLMethodsCollectorVisitor("");e.accept(r);var i=Object(o.map)(r.result,(function(e){return e.orgProd}));n.push(Object(o.map)(i,(function(n){return T(e,n,t)})))})),Object(o.flatten)(n)}(e,s),S=function(e,t){var n=[];return Object(o.forEach)(e,(function(e){var r=new u.NamedDSLMethodsCollectorVisitor("");e.accept(r);var a=Object(o.groupBy)(r.result,(function(e){return e.name})),s=Object(o.pick)(a,(function(e){return e.length>1}));Object(o.forEach)(Object(o.values)(s),(function(r){var a=Object(o.map)(r,(function(e){return e.orgProd})),s=t.buildDuplicateNestedRuleNameError(e,a);n.push({message:s,type:i.ParserDefinitionErrorType.DUPLICATE_NESTED_NAME,ruleName:e.name})}))})),n}(e,s),M=Object(o.map)(e,(function(e){return k(e,s)})),I=Object(o.map)(e,(function(e){return E(e,s)})),P=Object(o.map)(e,(function(t){return b(t,e,l,s)}));return o.flatten(c.concat(w,O,S,v,f,d,h,g,M,I,P))}function p(e){return Object(a.getProductionDslName)(e)+"_#_"+e.idx+"_#_"+m(e)}function m(e){return e instanceof c.Terminal?e.terminalType.name:e instanceof c.NonTerminal?e.nonTerminalName:""}var y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return d(t,e),t.prototype.visitNonTerminal=function(e){this.allProductions.push(e)},t.prototype.visitOption=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t.prototype.visitAlternation=function(e){this.allProductions.push(e)},t.prototype.visitTerminal=function(e){this.allProductions.push(e)},t}(f.GAstVisitor),v=/^[a-zA-Z_]\w*$/,g=new RegExp(v.source.replace("^","^\\$"));function E(e,t){var n=[],r=e.name;return r.match(v)||n.push({message:t.buildInvalidRuleNameError({topLevelRule:e,expectedPattern:v}),type:i.ParserDefinitionErrorType.INVALID_RULE_NAME,ruleName:r}),n}function T(e,t,n){var r,o=[];return t.name.match(g)||(r=n.buildInvalidNestedRuleNameError(e,t),o.push({message:r,type:i.ParserDefinitionErrorType.INVALID_NESTED_RULE_NAME,ruleName:e.name})),o}function C(e,t){var n=[];return e.name.match(v)||n.push({message:t.buildTokenNameError({tokenType:e,expectedPattern:v}),type:i.ParserDefinitionErrorType.INVALID_TOKEN_NAME}),n}function b(e,t,n,r){var a=[];if(Object(o.reduce)(t,(function(t,n){return n.name===e.name?t+1:t}),0)>1){var s=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});a.push({message:s,type:i.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e.name})}return a}function w(e,t,n){var r,a=[];return o.contains(t,e)||(r="Invalid rule override, rule: ->"+e+"<- cannot be overridden in the grammar: ->"+n+"<-as it is not defined in any of the super grammars ",a.push({message:r,type:i.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:e})),a}function R(e,t,n,r){void 0===r&&(r=[]);var a=[],s=O(t.definition);if(o.isEmpty(s))return[];var u=e.name;o.contains(s,e)&&a.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:i.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:u});var l=o.difference(s,r.concat([e])),c=o.map(l,(function(t){var i=o.cloneArr(r);return i.push(t),R(e,t,n,i)}));return a.concat(o.flatten(c))}function O(e){var t=[];if(o.isEmpty(e))return t;var n=o.first(e);if(n instanceof c.NonTerminal)t.push(n.referencedRule);else if(n instanceof c.Flat||n instanceof c.Option||n instanceof c.RepetitionMandatory||n instanceof c.RepetitionMandatoryWithSeparator||n instanceof c.RepetitionWithSeparator||n instanceof c.Repetition)t=t.concat(O(n.definition));else if(n instanceof c.Alternation)t=o.flatten(o.map(n.definition,(function(e){return O(e.definition)})));else if(!(n instanceof c.Terminal))throw Error("non exhaustive match");var r=Object(a.isOptionalProd)(n),i=e.length>1;if(r&&i){var s=o.drop(e);return t.concat(O(s))}return t}var S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.alternations=[],t}return d(t,e),t.prototype.visitAlternation=function(e){this.alternations.push(e)},t}(f.GAstVisitor);function A(e,t){var n=new S;e.accept(n);var r=n.alternations;return o.reduce(r,(function(n,r){var a=o.dropRight(r.definition),s=o.map(a,(function(n,a){var s=Object(l.nextPossibleTokensAfter)([n],[],null,1);return o.isEmpty(s)?{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:r,emptyChoiceIdx:a}),type:i.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:r.idx,alternative:a+1}:null}));return n.concat(o.compact(s))}),[])}function N(e,t,n,r){var u=new S;e.accept(u);var l=u.alternations,c=n[e.name];return c&&(l=Object(o.reject)(l,(function(e){return c[Object(a.getProductionDslName)(e)+(0===e.idx?"":e.idx)]}))),l=Object(o.reject)(l,(function(e){return!0===e.ignoreAmbiguities})),o.reduce(l,(function(n,a){var u=a.idx,l=a.maxLookahead||t,c=Object(s.getLookaheadPathsForOr)(u,e,l,a),f=function(e,t,n,r){var a=[],u=Object(o.reduce)(e,(function(n,r,i){return!0===t.definition[i].ignoreAmbiguities||Object(o.forEach)(r,(function(r){var u=[i];Object(o.forEach)(e,(function(e,n){i!==n&&Object(s.containsPath)(e,r)&&!0!==t.definition[n].ignoreAmbiguities&&u.push(n)})),u.length>1&&!Object(s.containsPath)(a,r)&&(a.push(r),n.push({alts:u,path:r}))})),n}),[]);return o.map(u,(function(e){var a=Object(o.map)(e.alts,(function(e){return e+1}));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:a,prefixPath:e.path}),type:i.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:[e.alts]}}))}(c,a,e,r),d=I(c,a,e,r);return n.concat(f,d)}),[])}var M=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return d(t,e),t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t}(f.GAstVisitor);function k(e,t){var n=new S;e.accept(n);var r=n.alternations;return o.reduce(r,(function(n,r){return r.definition.length>255&&n.push({message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:r}),type:i.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:e.name,occurrence:r.idx}),n}),[])}function _(e,t,n){var r=[];return Object(o.forEach)(e,(function(e){var a=new M;e.accept(a);var u=a.allProductions;Object(o.forEach)(u,(function(a){var u=Object(s.getProdType)(a),l=a.maxLookahead||t,c=a.idx,f=Object(s.getLookaheadPathsForOptionalProd)(c,e,u,l)[0];if(Object(o.isEmpty)(Object(o.flatten)(f))){var d=n.buildEmptyRepetitionError({topLevelRule:e,repetition:a});r.push({message:d,type:i.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))})),r}function I(e,t,n,r){var a=[],u=Object(o.reduce)(e,(function(e,t,n){var r=Object(o.map)(t,(function(e){return{idx:n,path:e}}));return e.concat(r)}),[]);return Object(o.forEach)(u,(function(e){if(!0!==t.definition[e.idx].ignoreAmbiguities){var l=e.idx,c=e.path,f=Object(o.findAll)(u,(function(e){return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<l&&Object(s.isStrictPrefixOfPath)(e.path,c)})),d=Object(o.map)(f,(function(e){var o=[e.idx+1,l+1],a=0===t.idx?"":t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:o,prefixPath:e.path}),type:i.ParserDefinitionErrorType.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:a,alternatives:o}}));a=a.concat(d)}})),a}},function(e,t,n){"use strict";n.r(t),n.d(t,"PROD_TYPE",(function(){return o})),n.d(t,"getProdType",(function(){return d})),n.d(t,"buildLookaheadFuncForOr",(function(){return h})),n.d(t,"buildLookaheadFuncForOptionalProd",(function(){return p})),n.d(t,"buildAlternativesLookAheadFunc",(function(){return m})),n.d(t,"buildSingleAlternativeLookaheadFunction",(function(){return y})),n.d(t,"lookAheadSequenceFromAlternatives",(function(){return b})),n.d(t,"getLookaheadPathsForOr",(function(){return w})),n.d(t,"getLookaheadPathsForOptionalProd",(function(){return R})),n.d(t,"containsPath",(function(){return O})),n.d(t,"isStrictPrefixOfPath",(function(){return S})),n.d(t,"areTokenCategoriesNotUsed",(function(){return A}));var r,o,i=n(46),a=n(216),s=n(260),u=n(177),l=n(55),c=n(137),f=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function d(e){if(e instanceof l.Option)return o.OPTION;if(e instanceof l.Repetition)return o.REPETITION;if(e instanceof l.RepetitionMandatory)return o.REPETITION_MANDATORY;if(e instanceof l.RepetitionMandatoryWithSeparator)return o.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof l.RepetitionWithSeparator)return o.REPETITION_WITH_SEPARATOR;if(e instanceof l.Alternation)return o.ALTERNATION;throw Error("non exhaustive match")}function h(e,t,n,r,o,i){var a=w(e,t,n);return i(a,r,A(a)?u.tokenStructuredMatcherNoCategories:u.tokenStructuredMatcher,o)}function p(e,t,n,r,o,i){var a=R(e,t,o,n),s=A(a)?u.tokenStructuredMatcherNoCategories:u.tokenStructuredMatcher;return i(a[0],s,r)}function m(e,t,n,r){var o=e.length,a=Object(i.every)(e,(function(e){return Object(i.every)(e,(function(e){return 1===e.length}))}));if(t)return function(t){for(var r=Object(i.map)(t,(function(e){return e.GATE})),a=0;a<o;a++){var s=e[a],u=s.length,l=r[a];if(void 0===l||!1!==l.call(this))e:for(var c=0;c<u;c++){for(var f=s[c],d=f.length,h=0;h<d;h++){var p=this.LA(h+1);if(!1===n(p,f[h]))continue e}return a}}};if(a&&!r){var s=Object(i.map)(e,(function(e){return Object(i.flatten)(e)})),u=Object(i.reduce)(s,(function(e,t,n){return Object(i.forEach)(t,(function(t){Object(i.has)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),Object(i.forEach)(t.categoryMatches,(function(t){Object(i.has)(e,t)||(e[t]=n)}))})),e}),[]);return function(){var e=this.LA(1);return u[e.tokenTypeIdx]}}return function(){for(var t=0;t<o;t++){var r=e[t],i=r.length;e:for(var a=0;a<i;a++){for(var s=r[a],u=s.length,l=0;l<u;l++){var c=this.LA(l+1);if(!1===n(c,s[l]))continue e}return t}}}}function y(e,t,n){var r=Object(i.every)(e,(function(e){return 1===e.length})),o=e.length;if(r&&!n){var a=Object(i.flatten)(e);if(1===a.length&&Object(i.isEmpty)(a[0].categoryMatches)){var s=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}var u=Object(i.reduce)(a,(function(e,t,n){return e[t.tokenTypeIdx]=!0,Object(i.forEach)(t.categoryMatches,(function(t){e[t]=!0})),e}),[]);return function(){var e=this.LA(1);return!0===u[e.tokenTypeIdx]}}return function(){e:for(var n=0;n<o;n++){for(var r=e[n],i=r.length,a=0;a<i;a++){var s=this.LA(a+1);if(!1===t(s,r[a]))continue e}return!0}return!1}}!function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"}(o||(o={}));var v=function(e){function t(t,n,r){var o=e.call(this)||this;return o.topProd=t,o.targetOccurrence=n,o.targetProdType=r,o}return f(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},t.prototype.checkIsTarget=function(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=n.concat(r),!0)},t.prototype.walkOption=function(t,n,r){this.checkIsTarget(t,o.OPTION,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkAtLeastOne=function(t,n,r){this.checkIsTarget(t,o.REPETITION_MANDATORY,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkAtLeastOneSep=function(t,n,r){this.checkIsTarget(t,o.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkMany=function(t,n,r){this.checkIsTarget(t,o.REPETITION,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkManySep=function(t,n,r){this.checkIsTarget(t,o.REPETITION_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},t}(s.RestWalker),g=function(e){function t(t,n,r){var o=e.call(this)||this;return o.targetOccurrence=t,o.targetProdType=n,o.targetRef=r,o.result=[],o}return f(t,e),t.prototype.checkIsTarget=function(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)},t.prototype.visitOption=function(e){this.checkIsTarget(e,o.OPTION)},t.prototype.visitRepetition=function(e){this.checkIsTarget(e,o.REPETITION)},t.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,o.REPETITION_MANDATORY)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,o.REPETITION_MANDATORY_WITH_SEPARATOR)},t.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,o.REPETITION_WITH_SEPARATOR)},t.prototype.visitAlternation=function(e){this.checkIsTarget(e,o.ALTERNATION)},t}(c.GAstVisitor);function E(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=[];return t}function T(e){for(var t=[""],n=0;n<e.length;n++){for(var r=e[n],o=[],i=0;i<t.length;i++){var a=t[i];o.push(a+"_"+r.tokenTypeIdx);for(var s=0;s<r.categoryMatches.length;s++){var u="_"+r.categoryMatches[s];o.push(a+u)}}t=o}return t}function C(e,t,n){for(var r=0;r<e.length;r++)if(r!==n)for(var o=e[r],i=0;i<t.length;i++){if(!0===o[t[i]])return!1}return!0}function b(e,t){for(var n=Object(i.map)(e,(function(e){return Object(a.possiblePathsFrom)([e],1)})),r=E(n.length),o=Object(i.map)(n,(function(e){var t={};return Object(i.forEach)(e,(function(e){var n=T(e.partialPath);Object(i.forEach)(n,(function(e){t[e]=!0}))})),t})),s=n,u=1;u<=t;u++){var l=s;s=E(l.length);for(var c=function(e){for(var n=l[e],c=0;c<n.length;c++){var f=n[c].partialPath,d=n[c].suffixDef,h=T(f);if(C(o,h,e)||Object(i.isEmpty)(d)||f.length===t){var p=r[e];if(!1===O(p,f)){p.push(f);for(var m=0;m<h.length;m++){var y=h[m];o[e][y]=!0}}}else{var v=Object(a.possiblePathsFrom)(d,u+1,f);s[e]=s[e].concat(v),Object(i.forEach)(v,(function(t){var n=T(t.partialPath);Object(i.forEach)(n,(function(t){o[e][t]=!0}))}))}}},f=0;f<l.length;f++)c(f)}return r}function w(e,t,n,r){var i=new g(e,o.ALTERNATION,r);return t.accept(i),b(i.result,n)}function R(e,t,n,r){var o=new g(e,n);t.accept(o);var i=o.result,a=new v(t,e,n).startWalking();return b([new l.Flat({definition:i}),new l.Flat({definition:a})],r)}function O(e,t){e:for(var n=0;n<e.length;n++){var r=e[n];if(r.length===t.length){for(var o=0;o<r.length;o++){var i=t[o],a=r[o];if(!1===(i===a||void 0!==a.categoryMatchesMap[i.tokenTypeIdx]))continue e}return!0}}return!1}function S(e,t){return e.length<t.length&&Object(i.every)(e,(function(e,n){var r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]}))}function A(e){return Object(i.every)(e,(function(e){return Object(i.every)(e,(function(e){return Object(i.every)(e,(function(e){return Object(i.isEmpty)(e.categoryMatches)}))}))}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"AbstractNextPossibleTokensWalker",(function(){return l})),n.d(t,"NextAfterTokenWalker",(function(){return c})),n.d(t,"AbstractNextTerminalAfterProductionWalker",(function(){return f})),n.d(t,"NextTerminalAfterManyWalker",(function(){return d})),n.d(t,"NextTerminalAfterManySepWalker",(function(){return h})),n.d(t,"NextTerminalAfterAtLeastOneWalker",(function(){return p})),n.d(t,"NextTerminalAfterAtLeastOneSepWalker",(function(){return m})),n.d(t,"possiblePathsFrom",(function(){return y})),n.d(t,"nextPossibleTokensAfter",(function(){return v}));var r,o=n(260),i=n(46),a=n(352),s=n(55),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t,n){var r=e.call(this)||this;return r.topProd=t,r.path=n,r.possibleTokTypes=[],r.nextProductionName="",r.nextProductionOccurrence=0,r.found=!1,r.isAtEndOfPath=!1,r}return u(t,e),t.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Object(i.cloneArr)(this.path.ruleStack).reverse(),this.occurrenceStack=Object(i.cloneArr)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},t.prototype.walk=function(t,n){void 0===n&&(n=[]),this.found||e.prototype.walk.call(this,t,n)},t.prototype.walkProdRef=function(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){var r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}},t.prototype.updateExpectedNext=function(){Object(i.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},t}(o.RestWalker),c=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.path=n,r.nextTerminalName="",r.nextTerminalOccurrence=0,r.nextTerminalName=r.path.lastTok.name,r.nextTerminalOccurrence=r.path.lastTokOccurrence,r}return u(t,e),t.prototype.walkTerminal=function(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){var r=t.concat(n),o=new s.Flat({definition:r});this.possibleTokTypes=Object(a.first)(o),this.found=!0}},t}(l),f=function(e){function t(t,n){var r=e.call(this)||this;return r.topRule=t,r.occurrence=n,r.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},r}return u(t,e),t.prototype.startWalking=function(){return this.walk(this.topRule),this.result},t}(o.RestWalker),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.walkMany=function(t,n,r){if(t.idx===this.occurrence){var o=Object(i.first)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof s.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkMany.call(this,t,n,r)},t}(f),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.walkManySep=function(t,n,r){if(t.idx===this.occurrence){var o=Object(i.first)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof s.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkManySep.call(this,t,n,r)},t}(f),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.walkAtLeastOne=function(t,n,r){if(t.idx===this.occurrence){var o=Object(i.first)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof s.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOne.call(this,t,n,r)},t}(f),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.walkAtLeastOneSep=function(t,n,r){if(t.idx===this.occurrence){var o=Object(i.first)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof s.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,n,r)},t}(f);function y(e,t,n){void 0===n&&(n=[]),n=Object(i.cloneArr)(n);var r=[],o=0;function a(a){var s=y(a.concat(Object(i.drop)(e,o+1)),t,n);return r.concat(s)}for(;n.length<t&&o<e.length;){var u=e[o];if(u instanceof s.Flat)return a(u.definition);if(u instanceof s.NonTerminal)return a(u.definition);if(u instanceof s.Option)r=a(u.definition);else{if(u instanceof s.RepetitionMandatory)return a(l=u.definition.concat([new s.Repetition({definition:u.definition})]));if(u instanceof s.RepetitionMandatoryWithSeparator)return a(l=[new s.Flat({definition:u.definition}),new s.Repetition({definition:[new s.Terminal({terminalType:u.separator})].concat(u.definition)})]);if(u instanceof s.RepetitionWithSeparator){var l=u.definition.concat([new s.Repetition({definition:[new s.Terminal({terminalType:u.separator})].concat(u.definition)})]);r=a(l)}else if(u instanceof s.Repetition){l=u.definition.concat([new s.Repetition({definition:u.definition})]);r=a(l)}else{if(u instanceof s.Alternation)return Object(i.forEach)(u.definition,(function(e){r=a(e.definition)})),r;if(!(u instanceof s.Terminal))throw Error("non exhaustive match");n.push(u.terminalType)}}o++}return r.push({partialPath:n,suffixDef:Object(i.drop)(e,o)}),r}function v(e,t,n,r){var o=["EXIT_NONE_TERMINAL"],a=!1,u=t.length,l=u-r-1,c=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!Object(i.isEmpty)(f);){var d=f.pop();if("EXIT_ALTERNATIVE"!==d){var h=d.def,p=d.idx,m=d.ruleStack,y=d.occurrenceStack;if(!Object(i.isEmpty)(h)){var v=h[0];if("EXIT_NONE_TERMINAL"===v){var E={idx:p,def:Object(i.drop)(h),ruleStack:Object(i.dropRight)(m),occurrenceStack:Object(i.dropRight)(y)};f.push(E)}else if(v instanceof s.Terminal)if(p<u-1){var T=p+1;if(n(t[T],v.terminalType)){E={idx:T,def:Object(i.drop)(h),ruleStack:m,occurrenceStack:y};f.push(E)}}else{if(p!==u-1)throw Error("non exhaustive match");c.push({nextTokenType:v.terminalType,nextTokenOccurrence:v.idx,ruleStack:m,occurrenceStack:y}),a=!0}else if(v instanceof s.NonTerminal){var C=Object(i.cloneArr)(m);C.push(v.nonTerminalName);var b=Object(i.cloneArr)(y);b.push(v.idx);E={idx:p,def:v.definition.concat(o,Object(i.drop)(h)),ruleStack:C,occurrenceStack:b};f.push(E)}else if(v instanceof s.Option){var w={idx:p,def:Object(i.drop)(h),ruleStack:m,occurrenceStack:y};f.push(w),f.push("EXIT_ALTERNATIVE");var R={idx:p,def:v.definition.concat(Object(i.drop)(h)),ruleStack:m,occurrenceStack:y};f.push(R)}else if(v instanceof s.RepetitionMandatory){var O=new s.Repetition({definition:v.definition,idx:v.idx});E={idx:p,def:v.definition.concat([O],Object(i.drop)(h)),ruleStack:m,occurrenceStack:y};f.push(E)}else if(v instanceof s.RepetitionMandatoryWithSeparator){var S=new s.Terminal({terminalType:v.separator});O=new s.Repetition({definition:[S].concat(v.definition),idx:v.idx}),E={idx:p,def:v.definition.concat([O],Object(i.drop)(h)),ruleStack:m,occurrenceStack:y};f.push(E)}else if(v instanceof s.RepetitionWithSeparator){w={idx:p,def:Object(i.drop)(h),ruleStack:m,occurrenceStack:y};f.push(w),f.push("EXIT_ALTERNATIVE");S=new s.Terminal({terminalType:v.separator});var A=new s.Repetition({definition:[S].concat(v.definition),idx:v.idx});R={idx:p,def:v.definition.concat([A],Object(i.drop)(h)),ruleStack:m,occurrenceStack:y};f.push(R)}else if(v instanceof s.Repetition){w={idx:p,def:Object(i.drop)(h),ruleStack:m,occurrenceStack:y};f.push(w),f.push("EXIT_ALTERNATIVE");A=new s.Repetition({definition:v.definition,idx:v.idx}),R={idx:p,def:v.definition.concat([A],Object(i.drop)(h)),ruleStack:m,occurrenceStack:y};f.push(R)}else if(v instanceof s.Alternation)for(var N=v.definition.length-1;N>=0;N--){var M={idx:p,def:v.definition[N].definition.concat(Object(i.drop)(h)),ruleStack:m,occurrenceStack:y};f.push(M),f.push("EXIT_ALTERNATIVE")}else if(v instanceof s.Flat)f.push({idx:p,def:v.definition.concat(Object(i.drop)(h)),ruleStack:m,occurrenceStack:y});else{if(!(v instanceof s.Rule))throw Error("non exhaustive match");f.push(g(v,p,m,y))}}}else a&&Object(i.last)(f).idx<=l&&f.pop()}return c}function g(e,t,n,r){var o=Object(i.cloneArr)(n);o.push(e.name);var a=Object(i.cloneArr)(r);return a.push(1),{idx:t,def:e.definition,ruleStack:o,occurrenceStack:a}}},function(e,t,n){"use strict";n.r(t),n.d(t,"absolutizeDependencies",(function(){return a})),n.d(t,"filterDependenciesOutOfScope",(function(){return s}));n(37),n(40);var r=n(84),o=n(22),i=n(70),a=function(e,t){return e.map((function(e){return e.absolutize(t)}))},s=function(e){return e.filter((function(e){return e instanceof i.NamedExpressionDependency||(e instanceof r.AbsoluteCellRange?!(Object(o.invalidSimpleCellAddress)(e.start)||Object(o.invalidSimpleCellAddress)(e.end)):!Object(o.invalidSimpleCellAddress)(e))}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"UIElement",(function(){return r}));var r,o=n(277);n.d(t,"TranslationPackage",(function(){return o.TranslationPackage})),n.d(t,"buildTranslationPackage",(function(){return o.buildTranslationPackage})),function(e){e.NEW_SHEET_PREFIX="NEW_SHEET_PREFIX"}(r||(r={}))},function(e,t,n){"use strict";n.r(t),n.d(t,"Config",(function(){return v})),n.d(t,"getDefaultConfig",(function(){return E}));n(3),n(0),n(2),n(11),n(4),n(26),n(88),n(20),n(8),n(9),n(10),n(21),n(12),n(24);var r=n(369),o=n(370),i=n(154),a=n(183),s=n(39),u=n(283),l=n(677),c=n(184);function f(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var m=["gpu","cpu","dev"],y=new WeakMap,v=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.accentSensitive,o=t.binarySearchThreshold,a=t.caseSensitive,u=t.caseFirst,d=t.chooseAddressMappingPolicy,p=t.currencySymbol,v=t.dateFormats,g=t.decimalSeparator,E=t.evaluateNullToZero,T=t.functionArgSeparator,C=t.functionPlugins,b=t.gpujs,w=t.gpuMode,R=t.ignorePunctuation,O=t.leapYear1900,S=t.localeLang,A=t.language,N=t.licenseKey,M=t.matchWholeCell,k=t.arrayColumnSeparator,_=t.arrayRowSeparator,I=t.maxRows,P=t.maxColumns,x=t.nullYear,D=t.nullDate,L=t.parseDateTime,F=t.precisionEpsilon,j=t.precisionRounding,U=t.stringifyDateTime,H=t.stringifyDuration,V=t.smartRounding,B=t.timeFormats,W=t.thousandSeparator,Y=t.useArrayArithmetic,G=t.useStats,z=t.undoLimit,K=t.useColumnIndex,X=t.useRegularExpressions,q=t.useWildcards;h(this,e),this.useArrayArithmetic=Object(r.configValueFromParam)(Y,"boolean","useArrayArithmetic"),this.accentSensitive=Object(r.configValueFromParam)(n,"boolean","accentSensitive"),this.caseSensitive=Object(r.configValueFromParam)(a,"boolean","caseSensitive"),this.caseFirst=Object(r.configValueFromParam)(u,["upper","lower","false"],"caseFirst"),this.ignorePunctuation=Object(r.configValueFromParam)(R,"boolean","ignorePunctuation"),this.chooseAddressMappingPolicy=null!=d?d:e.defaultConfig.chooseAddressMappingPolicy,this.dateFormats=f(Object(r.configValueFromParamCheck)(v,Array.isArray,"array","dateFormats")),this.timeFormats=f(Object(r.configValueFromParamCheck)(B,Array.isArray,"array","timeFormats")),this.functionArgSeparator=Object(r.configValueFromParam)(T,"string","functionArgSeparator"),this.decimalSeparator=Object(r.configValueFromParam)(g,[".",","],"decimalSeparator"),this.language=Object(r.configValueFromParam)(A,"string","language"),this.licenseKey=Object(r.configValueFromParam)(N,"string","licenseKey"),this.thousandSeparator=Object(r.configValueFromParam)(W,["",","," ","."],"thousandSeparator"),this.arrayColumnSeparator=Object(r.configValueFromParam)(k,[",",";"],"arrayColumnSeparator"),this.arrayRowSeparator=Object(r.configValueFromParam)(_,[";","|"],"arrayRowSeparator"),this.localeLang=Object(r.configValueFromParam)(S,"string","localeLang"),this.functionPlugins=f(null!=C?C:e.defaultConfig.functionPlugins),this.gpujs=null!=b?b:e.defaultConfig.gpujs,this.gpuMode=Object(r.configValueFromParam)(w,m,"gpuMode"),this.smartRounding=Object(r.configValueFromParam)(V,"boolean","smartRounding"),this.evaluateNullToZero=Object(r.configValueFromParam)(E,"boolean","evaluateNullToZero"),this.nullYear=Object(r.configValueFromParam)(x,"number","nullYear"),Object(r.validateNumberToBeAtLeast)(this.nullYear,"nullYear",0),Object(r.validateNumberToBeAtMost)(this.nullYear,"nullYear",100),this.precisionRounding=Object(r.configValueFromParam)(j,"number","precisionRounding"),Object(r.validateNumberToBeAtLeast)(this.precisionRounding,"precisionRounding",0),this.precisionEpsilon=Object(r.configValueFromParam)(F,"number","precisionEpsilon"),Object(r.validateNumberToBeAtLeast)(this.precisionEpsilon,"precisionEpsilon",0),this.useColumnIndex=Object(r.configValueFromParam)(K,"boolean","useColumnIndex"),this.useStats=Object(r.configValueFromParam)(G,"boolean","useStats"),this.binarySearchThreshold=void 0,this.parseDateTime=Object(r.configValueFromParam)(L,"function","parseDateTime"),this.stringifyDateTime=Object(r.configValueFromParam)(U,"function","stringifyDateTime"),this.stringifyDuration=Object(r.configValueFromParam)(H,"function","stringifyDuration"),this.translationPackage=c.HyperFormula.getLanguage(this.language),this.errorMapping=this.translationPackage.buildErrorMapping(),this.nullDate=Object(r.configValueFromParamCheck)(D,i.instanceOfSimpleDate,"IDate","nullDate"),this.leapYear1900=Object(r.configValueFromParam)(O,"boolean","leapYear1900"),this.undoLimit=Object(r.configValueFromParam)(z,"number","undoLimit"),this.useRegularExpressions=Object(r.configValueFromParam)(X,"boolean","useRegularExpressions"),this.useWildcards=Object(r.configValueFromParam)(q,"boolean","useWildcards"),this.matchWholeCell=Object(r.configValueFromParam)(M,"boolean","matchWholeCell"),Object(r.validateNumberToBeAtLeast)(this.undoLimit,"undoLimit",0),this.maxRows=Object(r.configValueFromParam)(I,"number","maxRows"),Object(r.validateNumberToBeAtLeast)(this.maxRows,"maxRows",1),this.maxColumns=Object(r.configValueFromParam)(P,"number","maxColumns"),this.currencySymbol=f(Object(r.configValueFromParamCheck)(p,Array.isArray,"array","currencySymbol")),this.currencySymbol.forEach((function(e){if("string"!=typeof e)throw new s.ExpectedValueOfTypeError("string[]","currencySymbol");if(""===e)throw new s.ConfigValueEmpty("currencySymbol")})),Object(r.validateNumberToBeAtLeast)(this.maxColumns,"maxColumns",1),this.warnDeprecatedIfUsed(o,"binarySearchThreshold","1.1"),this.warnDeprecatedIfUsed(b,"gpujs","1.2"),w!==e.defaultConfig.gpuMode&&this.warnDeprecatedIfUsed(w,"gpuMode","1.2"),y.set(this,{licenseKeyValidityState:Object(l.checkLicenseKeyValidity)(this.licenseKey)}),Object(r.configCheckIfParametersNotInConflict)({value:this.decimalSeparator,name:"decimalSeparator"},{value:this.functionArgSeparator,name:"functionArgSeparator"},{value:this.thousandSeparator,name:"thousandSeparator"}),Object(r.configCheckIfParametersNotInConflict)({value:this.arrayRowSeparator,name:"arrayRowSeparator"},{value:this.arrayColumnSeparator,name:"arrayColumnSeparator"})}var t,n,o;return t=e,(n=[{key:"licenseKeyValidityState",get:function(){return y.get(this).licenseKeyValidityState}},{key:"getConfig",value:function(){return g(this)}},{key:"mergeConfig",value:function(t){return new e(Object.assign({},this.getConfig(),t))}},{key:"warnDeprecatedIfUsed",value:function(e,t,n,r){void 0!==e&&(void 0===r?console.warn("".concat(t," option is deprecated since ").concat(n)):console.warn("".concat(t," option is deprecated since ").concat(n,", please use ").concat(r)))}}])&&p(t.prototype,n),o&&p(t,o),e}();function g(e){var t,n={};for(var r in v.defaultConfig){var o=null!==(t=e[r])&&void 0!==t?t:v.defaultConfig[r];Array.isArray(o)?n[r]=f(o):n[r]=o}return n}function E(){return g({})}v.defaultConfig={accentSensitive:!1,binarySearchThreshold:20,currencySymbol:["$"],caseSensitive:!1,caseFirst:"lower",chooseAddressMappingPolicy:new a.AlwaysDense,dateFormats:["DD/MM/YYYY","DD/MM/YY"],decimalSeparator:".",evaluateNullToZero:!1,functionArgSeparator:",",functionPlugins:[],gpujs:void 0,gpuMode:"gpu",ignorePunctuation:!1,language:"enGB",licenseKey:"",leapYear1900:!1,localeLang:"en",matchWholeCell:!0,arrayColumnSeparator:",",arrayRowSeparator:";",maxRows:4e4,maxColumns:18278,nullYear:30,nullDate:{year:1899,month:12,day:30},parseDateTime:o.defaultParseToDateTime,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,stringifyDateTime:u.defaultStringifyDateTime,stringifyDuration:u.defaultStringifyDuration,timeFormats:["hh:mm","hh:mm:ss.sss"],thousandSeparator:"",undoLimit:20,useRegularExpressions:!1,useWildcards:!0,useColumnIndex:!1,useStats:!1,useArrayArithmetic:!1}},function(e,t,n){"use strict";n.r(t),n.d(t,"InternalNamedExpression",(function(){return u})),n.d(t,"NamedExpressions",(function(){return f})),n.d(t,"doesContainRelativeReferences",(function(){return d}));n(3),n(36),n(0),n(2),n(4),n(40),n(21),n(37),n(26);var r=n(22),o=n(70);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var u=function(){function e(t,n,r,o){i(this,e),this.displayName=t,this.address=n,this.added=r,this.options=o}return s(e,[{key:"normalizeExpressionName",value:function(){return this.displayName.toLowerCase()}},{key:"copy",value:function(){return new e(this.displayName,this.address,this.added,this.options)}}]),e}(),l=function(){function e(){i(this,e),this.mapping=new Map}return s(e,[{key:"has",value:function(e){return this.mapping.has(this.normalizeExpressionName(e))}},{key:"isNameAvailable",value:function(e){var t=this.normalizeExpressionName(e),n=this.mapping.get(t);return!(n&&n.added)}},{key:"add",value:function(e){this.mapping.set(e.normalizeExpressionName(),e)}},{key:"get",value:function(e){return this.mapping.get(this.normalizeExpressionName(e))}},{key:"getExisting",value:function(e){var t=this.mapping.get(this.normalizeExpressionName(e));return t&&t.added?t:void 0}},{key:"remove",value:function(e){var t=this.normalizeExpressionName(e),n=this.mapping.get(t);n&&(n.added=!1)}},{key:"getAllNamedExpressions",value:function(){return Array.from(this.mapping.values()).filter((function(e){return e.added}))}},{key:"normalizeExpressionName",value:function(e){return e.toLowerCase()}}]),e}(),c=function(){function e(){i(this,e),this.mapping=new Map}return s(e,[{key:"add",value:function(e){this.mapping.set(this.normalizeExpressionName(e.displayName),e)}},{key:"get",value:function(e){return this.mapping.get(this.normalizeExpressionName(e))}},{key:"has",value:function(e){return this.mapping.has(this.normalizeExpressionName(e))}},{key:"getAllNamedExpressions",value:function(){return Array.from(this.mapping.values()).filter((function(e){return e.added}))}},{key:"normalizeExpressionName",value:function(e){return e.toLowerCase()}},{key:"isNameAvailable",value:function(e){var t=this.normalizeExpressionName(e);return!this.mapping.has(t)}},{key:"remove",value:function(e){var t=this.normalizeExpressionName(e);this.mapping.get(t)&&this.mapping.delete(t)}}]),e}(),f=function(){function e(){i(this,e),this.nextNamedExpressionRow=0,this.workbookStore=new l,this.worksheetStores=new Map,this.addressCache=new Map}return s(e,[{key:"isNameAvailable",value:function(e,t){var n,r;return void 0===t?this.workbookStore.isNameAvailable(e):null===(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.isNameAvailable(e))||void 0===r||r}},{key:"namedExpressionInAddress",value:function(e){var t=this.addressCache.get(e);return t&&t.added?t:void 0}},{key:"namedExpressionForScope",value:function(e,t){var n;return void 0===t?this.workbookStore.getExisting(e):null===(n=this.worksheetStore(t))||void 0===n?void 0:n.get(e)}},{key:"nearestNamedExpression",value:function(e,t){var n,r;return null!==(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.get(e))&&void 0!==r?r:this.workbookStore.getExisting(e)}},{key:"isExpressionInScope",value:function(e,t){var n,r;return null!==(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.has(e))&&void 0!==r&&r}},{key:"isNameValid",value:function(e){return!/^[A-Za-z]+[0-9]+$/.test(e)&&/^[A-Za-z\u00C0-\u02AF_][A-Za-z0-9\u00C0-\u02AF._]*$/.test(e)}},{key:"addNamedExpression",value:function(e,t,n){var r=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t),o=r.get(e);return void 0!==o?(o.added=!0,o.displayName=e,o.options=n):(o=new u(e,this.nextAddress(),!0,n),r.add(o)),this.addressCache.set(o.address.row,o),o}},{key:"restoreNamedExpression",value:function(e,t){var n=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t);return e.added=!0,n.add(e),this.addressCache.set(e.address.row,e),e}},{key:"worksheetStoreOrCreate",value:function(e){var t=this.worksheetStores.get(e);return t||(t=new c,this.worksheetStores.set(e,t)),t}},{key:"worksheetStore",value:function(e){return this.worksheetStores.get(e)}},{key:"namedExpressionOrPlaceholder",value:function(e,t){var n;return null!==(n=this.worksheetStoreOrCreate(t).get(e))&&void 0!==n?n:this.workbookNamedExpressionOrPlaceholder(e)}},{key:"workbookNamedExpressionOrPlaceholder",value:function(e){var t=this.workbookStore.get(e);return void 0===t&&(t=new u(e,this.nextAddress(),!1),this.workbookStore.add(t)),t}},{key:"remove",value:function(e,t){var n,r=null==(n=void 0===t?this.workbookStore:this.worksheetStore(t))?void 0:n.get(e);if(void 0===n||void 0===r||!r.added)throw"Named expression does not exist";n.remove(e),n instanceof c&&0===n.mapping.size&&this.worksheetStores.delete(t),this.addressCache.delete(r.address.row)}},{key:"getAllNamedExpressionsNamesInScope",value:function(e){return this.getAllNamedExpressions().filter((function(t){return t.scope===e})).map((function(e){return e.expression.displayName}))}},{key:"getAllNamedExpressionsNames",value:function(){return this.getAllNamedExpressions().map((function(e){return e.expression.displayName}))}},{key:"getAllNamedExpressions",value:function(){var e=[];return this.workbookStore.getAllNamedExpressions().forEach((function(t){e.push({expression:t,scope:void 0})})),this.worksheetStores.forEach((function(t,n){t.getAllNamedExpressions().forEach((function(t){e.push({expression:t,scope:n})}))})),e}},{key:"getAllNamedExpressionsForScope",value:function(e){var t,n;return void 0===e?this.workbookStore.getAllNamedExpressions():null!==(n=null===(t=this.worksheetStores.get(e))||void 0===t?void 0:t.getAllNamedExpressions())&&void 0!==n?n:[]}},{key:"nextAddress",value:function(){return Object(r.simpleCellAddress)(e.SHEET_FOR_WORKBOOK_EXPRESSIONS,0,this.nextNamedExpressionRow++)}}]),e}();f.SHEET_FOR_WORKBOOK_EXPRESSIONS=-1;var d=function e(t){switch(t.type){case o.AstNodeType.EMPTY:case o.AstNodeType.NUMBER:case o.AstNodeType.STRING:case o.AstNodeType.ERROR:case o.AstNodeType.ERROR_WITH_RAW_INPUT:return!1;case o.AstNodeType.CELL_REFERENCE:return!t.reference.isAbsolute();case o.AstNodeType.CELL_RANGE:case o.AstNodeType.COLUMN_RANGE:case o.AstNodeType.ROW_RANGE:return!t.start.isAbsolute();case o.AstNodeType.NAMED_EXPRESSION:return!1;case o.AstNodeType.PERCENT_OP:case o.AstNodeType.PLUS_UNARY_OP:case o.AstNodeType.MINUS_UNARY_OP:return e(t.value);case o.AstNodeType.CONCATENATE_OP:case o.AstNodeType.EQUALS_OP:case o.AstNodeType.NOT_EQUAL_OP:case o.AstNodeType.LESS_THAN_OP:case o.AstNodeType.GREATER_THAN_OP:case o.AstNodeType.LESS_THAN_OR_EQUAL_OP:case o.AstNodeType.GREATER_THAN_OR_EQUAL_OP:case o.AstNodeType.MINUS_OP:case o.AstNodeType.PLUS_OP:case o.AstNodeType.TIMES_OP:case o.AstNodeType.DIV_OP:case o.AstNodeType.POWER_OP:return e(t.left)||e(t.right);case o.AstNodeType.PARENTHESIS:return e(t.expression);case o.AstNodeType.FUNCTION_CALL:return t.args.some((function(t){return e(t)}));case o.AstNodeType.ARRAY:return t.args.some((function(t){return t.some((function(t){return e(t)}))}))}}},function(e,t,n){"use strict";n.r(t),n.d(t,"RemoveRowsCommand",(function(){return x})),n.d(t,"AddRowsCommand",(function(){return D})),n.d(t,"AddColumnsCommand",(function(){return L})),n.d(t,"RemoveColumnsCommand",(function(){return F})),n.d(t,"Operations",(function(){return j})),n.d(t,"normalizeRemovedIndexes",(function(){return U})),n.d(t,"normalizeAddedIndexes",(function(){return H}));n(37),n(51),n(3),n(0),n(4),n(20),n(88),n(40),n(24),n(77),n(100),n(67),n(12),n(21),n(2),n(8),n(9),n(10);var r=n(84),o=n(217),i=n(126),a=n(22),s=n(185),u=n(371),l=n(268),c=n(125),f=n(116),d=n(683),h=n(372),p=n(684),m=n(685),y=n(686),v=n(373),g=n(687),E=n(39),T=n(48),C=n(220),b=n(70),w=n(288),R=n(181),O=n(127);function S(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||M(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=M(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function M(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function P(e,t,n){return t&&I(e.prototype,t),n&&I(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var x=function(){function e(t,n){_(this,e),this.sheet=t,this.indexes=n}return P(e,[{key:"normalizedIndexes",value:function(){return U(this.indexes)}},{key:"rowsSpans",value:function(){var e=this;return this.normalizedIndexes().map((function(t){return R.RowsSpan.fromNumberOfRows(e.sheet,t[0],t[1])}))}}]),e}(),D=function(){function e(t,n){_(this,e),this.sheet=t,this.indexes=n}return P(e,[{key:"normalizedIndexes",value:function(){return H(this.indexes)}},{key:"rowsSpans",value:function(){var e=this;return this.normalizedIndexes().map((function(t){return R.RowsSpan.fromNumberOfRows(e.sheet,t[0],t[1])}))}}]),e}(),L=function(){function e(t,n){_(this,e),this.sheet=t,this.indexes=n}return P(e,[{key:"normalizedIndexes",value:function(){return H(this.indexes)}},{key:"columnsSpans",value:function(){var e=this;return this.normalizedIndexes().map((function(t){return R.ColumnsSpan.fromNumberOfColumns(e.sheet,t[0],t[1])}))}}]),e}(),F=function(){function e(t,n){_(this,e),this.sheet=t,this.indexes=n}return P(e,[{key:"normalizedIndexes",value:function(){return U(this.indexes)}},{key:"columnsSpans",value:function(){var e=this;return this.normalizedIndexes().map((function(t){return R.ColumnsSpan.fromNumberOfColumns(e.sheet,t[0],t[1])}))}}]),e}(),j=function(){function e(t,n,r,o,i,a,s,u,c){_(this,e),this.dependencyGraph=n,this.columnSearch=r,this.cellContentParser=o,this.parser=i,this.stats=a,this.lazilyTransformingAstService=s,this.namedExpressions=u,this.arraySizePredictor=c,this.changes=l.ContentChanges.empty(),this.allocateNamedExpressionAddressSpace(),this.maxColumns=t.maxColumns,this.maxRows=t.maxRows}return P(e,[{key:"removeRows",value:function(e){var t,n=[],r=N(e.rowsSpans());try{for(r.s();!(t=r.n()).done;){var o=t.value,i=this.doRemoveRows(o);i&&n.push(i)}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"addRows",value:function(e){var t,n=N(e.rowsSpans());try{for(n.s();!(t=n.n()).done;){var r=t.value;this.doAddRows(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"addColumns",value:function(e){var t,n=N(e.columnsSpans());try{for(n.s();!(t=n.n()).done;){var r=t.value;this.doAddColumns(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"removeColumns",value:function(e){var t,n=[],r=N(e.columnsSpans());try{for(r.s();!(t=r.n()).done;){var o=t.value,i=this.doRemoveColumns(o);i&&n.push(i)}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"removeSheet",value:function(e){var t,n=this;this.dependencyGraph.removeSheet(e),this.stats.measure(O.StatType.TRANSFORM_ASTS,(function(){var r=new g.RemoveSheetTransformer(e);r.performEagerTransformations(n.dependencyGraph,n.parser),t=n.lazilyTransformingAstService.addTransformation(r)})),this.sheetMapping.removeSheet(e),this.columnSearch.removeSheet(e);var r=this.namedExpressions.getAllNamedExpressionsForScope(e).map((function(t){return n.removeNamedExpression(t.normalizeExpressionName(),e)}));return{version:t,scopedNamedExpressions:r}}},{key:"removeSheetByName",value:function(e){var t=this.sheetMapping.fetch(e);return this.removeSheet(t)}},{key:"clearSheet",value:function(e){this.dependencyGraph.clearSheet(e),this.columnSearch.removeSheet(e)}},{key:"addSheet",value:function(e){var t=this.sheetMapping.addSheet(e),n=[];return this.dependencyGraph.addressMapping.autoAddSheet(t,n,Object(w.findBoundaries)(n)),this.sheetMapping.fetchDisplayName(t)}},{key:"renameSheet",value:function(e,t){return this.sheetMapping.renameSheet(e,t)}},{key:"moveRows",value:function(e,t,n,r){var o=R.RowsSpan.fromNumberOfRows(e,r,n);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddRows(o),r<t&&(t+=n);var i=Object(a.simpleCellAddress)(e,0,t),s=Object(a.simpleCellAddress)(e,0,r);this.moveCells(i,Number.POSITIVE_INFINITY,n,s);var u=R.RowsSpan.fromNumberOfRows(e,t,n);return this.doRemoveRows(u),this.lazilyTransformingAstService.commitCombinedMode()}},{key:"moveColumns",value:function(e,t,n,r){var o=R.ColumnsSpan.fromNumberOfColumns(e,r,n);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddColumns(o),r<t&&(t+=n);var i=Object(a.simpleCellAddress)(e,t,0),s=Object(a.simpleCellAddress)(e,r,0);this.moveCells(i,n,Number.POSITIVE_INFINITY,s);var u=R.ColumnsSpan.fromNumberOfColumns(e,t,n);return this.doRemoveColumns(u),this.lazilyTransformingAstService.commitCombinedMode()}},{key:"moveCells",value:function(e,t,n,o){var i=this;this.ensureItIsPossibleToMoveCells(e,t,n,o);var a=r.AbsoluteCellRange.spanFrom(e,t,n),s=r.AbsoluteCellRange.spanFrom(o,t,n),u=o.col-e.col,l=o.row-e.row,c=o.sheet,f=this.getRangeClipboardCells(s),d=this.dependencyGraph.rawValuesFromRange(s);this.columnSearch.removeValues(d);var h,p=this.dependencyGraph.rawValuesFromRange(a);this.columnSearch.moveValues(p,u,l,c),this.stats.measure(O.StatType.TRANSFORM_ASTS,(function(){var e=new m.MoveCellsTransformer(a,u,l,c);e.performEagerTransformations(i.dependencyGraph,i.parser),h=i.lazilyTransformingAstService.addTransformation(e)})),this.dependencyGraph.moveCells(a,u,l,c);var y=this.updateNamedExpressionsForMovedCells(e,t,n,o);return{version:h,overwrittenCellsData:f,addedGlobalNamedExpressions:y}}},{key:"setRowOrder",value:function(e,t){var n,o=this,i=[],a=[],s=N(t);try{var u=function(){var t=A(n.value,2),s=t[0],u=t[1];if(s!==u){var l=r.AbsoluteCellRange.spanFrom({sheet:e,col:0,row:s},1/0,1),c=o.getRangeClipboardCells(l);a=a.concat(c),i.push(c.map((function(e){var t=A(e,2),n=t[0],r=n.sheet,o=n.col,i=t[1];return[{sheet:r,col:o,row:u},i]})))}};for(s.s();!(n=s.n()).done;)u()}catch(e){s.e(e)}finally{s.f()}return i.forEach((function(t){return o.restoreClipboardCells(e,t.values())})),a}},{key:"setColumnOrder",value:function(e,t){var n,o=this,i=[],a=[],s=N(t);try{var u=function(){var t=A(n.value,2),s=t[0],u=t[1];if(s!==u){var l=r.AbsoluteCellRange.spanFrom({sheet:e,col:s,row:0},1,1/0),c=o.getRangeClipboardCells(l);a=a.concat(c),i.push(c.map((function(e){var t=A(e,2),n=t[0],r=n.sheet,o=(n.col,n.row),i=t[1];return[{sheet:r,col:u,row:o},i]})))}};for(s.s();!(n=s.n()).done;)u()}catch(e){s.e(e)}finally{s.f()}return i.forEach((function(t){return o.restoreClipboardCells(e,t.values())})),a}},{key:"addNamedExpression",value:function(e,t,n,r){var o=this.namedExpressions.addNamedExpression(e,n,r);this.storeNamedExpressionInCell(o.address,t),this.adjustNamedExpressionEdges(o,e,n)}},{key:"restoreNamedExpression",value:function(e,t,n){var r=e.displayName;this.restoreCell(e.address,t);var o=this.namedExpressions.restoreNamedExpression(e,n);this.adjustNamedExpressionEdges(o,r,n)}},{key:"changeNamedExpressionExpression",value:function(e,t,n,r){var o=this.namedExpressions.namedExpressionForScope(e,n);if(!o)throw new E.NamedExpressionDoesNotExistError(e);var i=o.copy();o.options=r;var a=this.getClipboardCell(o.address);return this.storeNamedExpressionInCell(o.address,t),[i,a]}},{key:"removeNamedExpression",value:function(e,t){var n=this.namedExpressions.namedExpressionForScope(e,t);if(!n)throw new E.NamedExpressionDoesNotExistError(e);this.namedExpressions.remove(n.displayName,t);var r=this.getClipboardCell(n.address);if(void 0!==t){var o=this.namedExpressions.workbookNamedExpressionOrPlaceholder(e);this.dependencyGraph.exchangeNode(n.address,o.address)}else this.dependencyGraph.setCellEmpty(n.address);return[n,r]}},{key:"ensureItIsPossibleToMoveCells",value:function(e,t,n,o){if(Object(a.invalidSimpleCellAddress)(e)||!(V(t)&&V(n)||function(e,t,n){return 0===e.row&&V(t)&&n===Number.POSITIVE_INFINITY||0===e.col&&V(n)&&t===Number.POSITIVE_INFINITY}(e,t,n))||Object(a.invalidSimpleCellAddress)(o)||!this.sheetMapping.hasSheetWithId(e.sheet)||!this.sheetMapping.hasSheetWithId(o.sheet))throw new E.InvalidArgumentsError("a valid range of cells to move.");var i=r.AbsoluteCellRange.spanFrom(e,t,n),s=r.AbsoluteCellRange.spanFrom(o,t,n);if(s.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new E.SheetSizeLimitExceededError;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(i))throw new E.SourceLocationHasArrayError;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(s))throw new E.TargetLocationHasArrayError}},{key:"restoreClipboardCells",value:function(e,t){var n,r=[],o=N(t);try{for(o.s();!(n=o.n()).done;){var i=A(n.value,2),a=i[0],s=i[1];if(this.restoreCell(a,s),s.type===u.ClipboardCellType.FORMULA){var l=this.parser.fetchCachedResult(s.hash).dependencies;r.push.apply(r,S(this.updateNamedExpressionsForTargetAddress(e,a,l)))}}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"restoreCell",value:function(e,t){switch(t.type){case u.ClipboardCellType.VALUE:this.setValueToCell(t,e);break;case u.ClipboardCellType.FORMULA:this.setFormulaToCellFromCache(t.hash,e);break;case u.ClipboardCellType.EMPTY:this.setCellEmpty(e);break;case u.ClipboardCellType.PARSING_ERROR:this.setParsingErrorToCell(t.rawInput,t.errors,e)}}},{key:"doRemoveRows",value:function(e){var t=this;if(!this.rowEffectivelyNotInSheet(e.rowStart,e.sheet)){var n,r=[],o=N(this.dependencyGraph.entriesFromRowsSpan(e));try{for(o.s();!(n=o.n()).done;){var i=A(n.value,1)[0];r.push({address:i,cellType:this.getClipboardCell(i)})}}catch(e){o.e(e)}finally{o.f()}var a,s=this.dependencyGraph.removeRows(e),u=s.affectedArrays,l=s.contentChanges;return this.columnSearch.applyChanges(l.getChanges()),this.stats.measure(O.StatType.TRANSFORM_ASTS,(function(){var n=new v.RemoveRowsTransformer(e);n.performEagerTransformations(t.dependencyGraph,t.parser),a=t.lazilyTransformingAstService.addTransformation(n)})),this.rewriteAffectedArrays(u),{version:a,removedCells:r,rowFrom:e.rowStart,rowCount:e.numberOfRows}}}},{key:"doRemoveColumns",value:function(e){var t=this;if(!this.columnEffectivelyNotInSheet(e.columnStart,e.sheet)){var n,r=[],o=N(this.dependencyGraph.entriesFromColumnsSpan(e));try{for(o.s();!(n=o.n()).done;){var i=A(n.value,1)[0];r.push({address:i,cellType:this.getClipboardCell(i)})}}catch(e){o.e(e)}finally{o.f()}var a,s=this.dependencyGraph.removeColumns(e),u=s.affectedArrays,l=s.contentChanges;return this.columnSearch.applyChanges(l.getChanges()),this.columnSearch.removeColumns(e),this.stats.measure(O.StatType.TRANSFORM_ASTS,(function(){var n=new y.RemoveColumnsTransformer(e);n.performEagerTransformations(t.dependencyGraph,t.parser),a=t.lazilyTransformingAstService.addTransformation(n)})),this.rewriteAffectedArrays(u),{version:a,removedCells:r,columnFrom:e.columnStart,columnCount:e.numberOfColumns}}}},{key:"doAddRows",value:function(e){var t=this;if(!this.rowEffectivelyNotInSheet(e.rowStart,e.sheet)){var n=this.dependencyGraph.addRows(e).affectedArrays;this.stats.measure(O.StatType.TRANSFORM_ASTS,(function(){var n=new h.AddRowsTransformer(e);n.performEagerTransformations(t.dependencyGraph,t.parser),t.lazilyTransformingAstService.addTransformation(n)})),this.rewriteAffectedArrays(n)}}},{key:"rewriteAffectedArrays",value:function(e){var t,n=N(e.values());try{for(n.s();!(t=n.n()).done;){var r=t.value;if(!r.array.size.isRef){var o=r.getFormula(this.lazilyTransformingAstService),i=r.getAddress(this.lazilyTransformingAstService),a=this.parser.computeHashFromAst(o);this.setFormulaToCellFromCache(a,i)}}}catch(e){n.e(e)}finally{n.f()}}},{key:"doAddColumns",value:function(e){var t=this;if(!this.columnEffectivelyNotInSheet(e.columnStart,e.sheet)){var n=this.dependencyGraph.addColumns(e),r=n.affectedArrays,o=n.contentChanges;this.columnSearch.addColumns(e),this.columnSearch.applyChanges(o.getChanges()),this.stats.measure(O.StatType.TRANSFORM_ASTS,(function(){var n=new d.AddColumnsTransformer(e);n.performEagerTransformations(t.dependencyGraph,t.parser),t.lazilyTransformingAstService.addTransformation(n)})),this.rewriteAffectedArrays(r)}}},{key:"getOldContent",value:function(e){var t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof c.EmptyCellVertex)return[e,{type:u.ClipboardCellType.EMPTY}];if(t instanceof c.ValueCellVertex)return[e,Object.assign({type:u.ClipboardCellType.VALUE},t.getValues())];if(t instanceof f.FormulaVertex)return[t.getAddress(this.lazilyTransformingAstService),{type:u.ClipboardCellType.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))}];if(t instanceof c.ParsingErrorVertex)return[e,{type:u.ClipboardCellType.PARSING_ERROR,rawInput:t.rawInput,errors:t.errors}];throw Error("Trying to copy unsupported type")}},{key:"getClipboardCell",value:function(e){var t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof c.EmptyCellVertex)return{type:u.ClipboardCellType.EMPTY};if(t instanceof c.ValueCellVertex)return Object.assign({type:u.ClipboardCellType.VALUE},t.getValues());if(t instanceof c.ArrayVertex){var n=t.getArrayCellValue(e);return n===T.EmptyValue?{type:u.ClipboardCellType.EMPTY}:{type:u.ClipboardCellType.VALUE,parsedValue:n,rawValue:t.getArrayCellRawValue(e)}}if(t instanceof c.FormulaCellVertex)return{type:u.ClipboardCellType.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))};if(t instanceof c.ParsingErrorVertex)return{type:u.ClipboardCellType.PARSING_ERROR,rawInput:t.rawInput,errors:t.errors};throw Error("Trying to copy unsupported type")}},{key:"getSheetClipboardCells",value:function(e){for(var t=this.dependencyGraph.getSheetHeight(e),n=this.dependencyGraph.getSheetWidth(e),r=new Array(t),o=0;o<t;o++){r[o]=new Array(n);for(var i=0;i<n;i++){var s=Object(a.simpleCellAddress)(e,i,o);r[o][i]=this.getClipboardCell(s)}}return r}},{key:"getRangeClipboardCells",value:function(e){var t,n=[],r=N(e.addresses(this.dependencyGraph));try{for(r.s();!(t=r.n()).done;){var o=t.value;n.push([o,this.getClipboardCell(o)])}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"setCellContent",value:function(e,t){var n=this.cellContentParser.parse(t),r=this.getOldContent(e);if(n instanceof s.CellContent.Formula){var o=this.parser.parse(n.formula,e),i=o.ast,a=o.errors;if(a.length>0)this.setParsingErrorToCell(n.formula,a,e);else{var u=this.arraySizePredictor.checkArraySize(i,e);this.setFormulaToCell(e,u,o)}}else n instanceof s.CellContent.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:n.value,rawValue:t},e);return r}},{key:"setSheetContent",value:function(e,t){this.clearSheet(e);for(var n=0;n<t.length;n++)for(var r=0;r<t[n].length;r++){var o=Object(a.simpleCellAddress)(e,r,n);this.setCellContent(o,t[n][r])}}},{key:"setParsingErrorToCell",value:function(e,t,n){var r=this.dependencyGraph.getCellValue(n),o=new c.ParsingErrorVertex(t,e),i=this.dependencyGraph.setParsingErrorToCell(n,o);this.columnSearch.remove(Object(T.getRawValue)(r),n),this.columnSearch.applyChanges(i.getChanges()),this.changes.addAll(i),this.changes.addChange(o.getCellValue(),n)}},{key:"setFormulaToCell",value:function(e,t,n){var r=n.ast,i=n.hasVolatileFunction,a=n.hasStructuralChangeFunction,s=n.dependencies,u=this.dependencyGraph.getCellValue(e),l=this.dependencyGraph.setFormulaToCell(e,r,Object(o.absolutizeDependencies)(s,e),t,i,a);this.columnSearch.remove(Object(T.getRawValue)(u),e),this.columnSearch.applyChanges(l.getChanges()),this.changes.addAll(l)}},{key:"setValueToCell",value:function(e,t){var n=this.dependencyGraph.getCellValue(t),r=this.dependencyGraph.setValueToCell(t,e);this.columnSearch.change(Object(T.getRawValue)(n),Object(T.getRawValue)(e.parsedValue),t),this.columnSearch.applyChanges(r.getChanges().filter((function(e){return!Object(a.equalSimpleCellAddress)(e.address,t)}))),this.changes.addAll(r),this.changes.addChange(e.parsedValue,t)}},{key:"setCellEmpty",value:function(e){if(!this.dependencyGraph.isArrayInternalCell(e)){var t=this.dependencyGraph.getCellValue(e),n=this.dependencyGraph.setCellEmpty(e);this.columnSearch.remove(Object(T.getRawValue)(t),e),this.columnSearch.applyChanges(n.getChanges()),this.changes.addAll(n),this.changes.addChange(T.EmptyValue,e)}}},{key:"setFormulaToCellFromCache",value:function(e,t){var n=this.parser.fetchCachedResult(e),r=n.ast,i=n.hasVolatileFunction,a=n.hasStructuralChangeFunction,s=n.dependencies,u=Object(o.absolutizeDependencies)(s,t),l=A(new p.CleanOutOfScopeDependenciesTransformer(t.sheet).transformSingleAst(r,t),1)[0];this.parser.rememberNewAst(l);var c=Object(o.filterDependenciesOutOfScope)(u),f=this.arraySizePredictor.checkArraySize(r,t);this.dependencyGraph.setFormulaToCell(t,l,c,f,i,a)}},{key:"rowEffectivelyNotInSheet",value:function(e,t){return e>=this.dependencyGraph.addressMapping.getHeight(t)}},{key:"getAndClearContentChanges",value:function(){var e=this.changes;return this.changes=l.ContentChanges.empty(),e}},{key:"forceApplyPostponedTransformations",value:function(){this.dependencyGraph.forceApplyPostponedTransformations()}},{key:"sheetMapping",get:function(){return this.dependencyGraph.sheetMapping}},{key:"columnEffectivelyNotInSheet",value:function(e,t){return e>=this.dependencyGraph.addressMapping.getWidth(t)}},{key:"adjustNamedExpressionEdges",value:function(e,t,n){if(void 0!==n){var r,i=this.dependencyGraph.fetchCellOrCreateEmpty(e.address),a=this.namedExpressions.workbookNamedExpressionOrPlaceholder(t),s=this.dependencyGraph.fetchCellOrCreateEmpty(a.address),u=N(this.dependencyGraph.graph.adjacentNodes(s));try{for(u.s();!(r=u.n()).done;){var l=r.value;if(l instanceof c.FormulaCellVertex&&l.getAddress(this.lazilyTransformingAstService).sheet===n){var f,d=l.getFormula(this.lazilyTransformingAstService),h=l.getAddress(this.lazilyTransformingAstService),p=this.parser.fetchCachedResultForAst(d).dependencies,m=N(Object(o.absolutizeDependencies)(p,h));try{for(m.s();!(f=m.n()).done;){var y=f.value;y instanceof b.NamedExpressionDependency&&y.name.toLowerCase()===e.displayName.toLowerCase()&&(this.dependencyGraph.graph.removeEdge(s,l),this.dependencyGraph.graph.addEdge(i,l))}}catch(e){m.e(e)}finally{m.f()}}}}catch(e){u.e(e)}finally{u.f()}}}},{key:"storeNamedExpressionInCell",value:function(e,t){var n=this.cellContentParser.parse(t);if(n instanceof s.CellContent.Formula){var r=this.parser.parse(n.formula,Object(a.simpleCellAddress)(-1,0,0));if(Object(C.doesContainRelativeReferences)(r.ast))throw new E.NoRelativeAddressesAllowedError;var u=r.ast,l=r.hasVolatileFunction,c=r.hasStructuralChangeFunction,f=r.dependencies;this.dependencyGraph.setFormulaToCell(e,u,Object(o.absolutizeDependencies)(f,e),i.ArraySize.scalar(),l,c)}else n instanceof s.CellContent.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:n.value,rawValue:t},e)}},{key:"updateNamedExpressionsForMovedCells",value:function(e,t,n,o){if(e.sheet===o.sheet)return[];var i,a=[],s=N(r.AbsoluteCellRange.spanFrom(o,t,n).addresses(this.dependencyGraph));try{for(s.s();!(i=s.n()).done;){var u=i.value,l=this.addressMapping.fetchCell(u);if(l instanceof c.FormulaCellVertex&&u.sheet!==e.sheet){var f=l.getFormula(this.lazilyTransformingAstService),d=this.parser.fetchCachedResultForAst(f).dependencies;a.push.apply(a,S(this.updateNamedExpressionsForTargetAddress(e.sheet,u,d)))}}}catch(e){s.e(e)}finally{s.f()}return a}},{key:"updateNamedExpressionsForTargetAddress",value:function(e,t,n){if(e===t.sheet)return[];var r,i=[],a=this.addressMapping.fetchCell(t),s=N(Object(o.absolutizeDependencies)(n,t));try{for(s.s();!(r=s.n()).done;){var u=r.value;if(u instanceof b.NamedExpressionDependency){var l=u.name,c=this.dependencyGraph.fetchNamedExpressionVertex(l,e),f=this.namedExpressions.isExpressionInScope(l,t.sheet)?this.dependencyGraph.fetchNamedExpressionVertex(l,t.sheet):this.copyOrFetchGlobalNamedExpressionVertex(l,c,i);f!==c&&(this.dependencyGraph.graph.softRemoveEdge(c,a),this.dependencyGraph.graph.addEdge(f,a))}}}catch(e){s.e(e)}finally{s.f()}return i}},{key:"allocateNamedExpressionAddressSpace",value:function(){this.dependencyGraph.addressMapping.addSheet(-1,new c.SparseStrategy(0,0))}},{key:"copyOrFetchGlobalNamedExpressionVertex",value:function(e,t,n){var r=this.namedExpressions.namedExpressionForScope(e);if(void 0===r)if(r=this.namedExpressions.addNamedExpression(e),n.push(r.normalizeExpressionName()),t instanceof c.FormulaCellVertex){var a=this.parser.fetchCachedResultForAst(t.getFormula(this.lazilyTransformingAstService)),s=a.ast,u=a.hasVolatileFunction,l=a.hasStructuralChangeFunction,f=a.dependencies;this.dependencyGraph.setFormulaToCell(r.address,s,Object(o.absolutizeDependencies)(f,r.address),i.ArraySize.scalar(),u,l)}else t instanceof c.EmptyCellVertex?this.setCellEmpty(r.address):t instanceof c.ValueCellVertex&&this.setValueToCell(t.getValues(),r.address);return this.dependencyGraph.fetchCellOrCreateEmpty(r.address)}},{key:"addressMapping",get:function(){return this.dependencyGraph.addressMapping}}]),e}();function U(e){if(e.length<=1)return e;for(var t=S(e).sort((function(e,t){return A(e,1)[0]-A(t,1)[0]})),n=t.reduce((function(e,t){var n=A(t,2),r=n[0],o=n[1],i=e[e.length-1],a=i[0]+i[1];return r<=a?i[1]+=Math.max(0,o-(a-r)):e.push([r,o]),e}),[t[0]]),r=0,o=0;o<n.length;++o)n[o][0]-=r,r+=n[o][1];return n}function H(e){if(e.length<=1)return e;for(var t=S(e).sort((function(e,t){return A(e,1)[0]-A(t,1)[0]})),n=t.reduce((function(e,t){var n=A(t,2),r=n[0],o=n[1],i=e[e.length-1];return r===i[0]?i[1]=Math.max(i[1],o):e.push([r,o]),e}),[t[0]]),r=0,o=0;o<n.length;++o)n[o][0]+=r,r+=n[o][1];return n}function V(e){return Number.isInteger(e)&&e>0}},function(e,t,n){"use strict";n.r(t),n.d(t,"ExportedCellChange",(function(){return y})),n.d(t,"ExportedNamedExpressionChange",(function(){return v})),n.d(t,"Exporter",(function(){return g}));n(24),n(37),n(375),n(12),n(0),n(21),n(2),n(8),n(9),n(10),n(3),n(4);var r=n(22),o=n(281),i=n(43),a=n(48),s=n(80),u=n(220),l=n(99);function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var y=function(){function e(t,n){h(this,e),this.address=t,this.newValue=n}return m(e,[{key:"col",get:function(){return this.address.col}},{key:"row",get:function(){return this.address.row}},{key:"sheet",get:function(){return this.address.sheet}},{key:"value",get:function(){return this.newValue}}]),e}(),v=function e(t,n){h(this,e),this.name=t,this.newValue=n},g=function(){function e(t,n,r,o){h(this,e),this.config=t,this.namedExpressions=n,this.sheetIndexMapping=r,this.lazilyTransformingService=o}return m(e,[{key:"exportChange",value:function(e){var t=e.value,n=e.address;if(n.sheet===u.NamedExpressions.SHEET_FOR_WORKBOOK_EXPRESSIONS){var r=this.namedExpressions.namedExpressionInAddress(n.row);if(!r)throw new Error("Missing named expression");return new v(r.displayName,this.exportScalarOrRange(t))}if(t instanceof s.SimpleRangeValue){var o,i=[],a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=f(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(t.entriesFromTopLeftCorner(n));try{for(a.s();!(o=a.n()).done;){var l=c(o.value,2),d=l[0],h=l[1];i.push(new y(h,this.exportValue(d)))}}catch(e){a.e(e)}finally{a.f()}return i}return new y(n,this.exportValue(t))}},{key:"exportValue",value:function(e){return e instanceof s.SimpleRangeValue?this.detailedError(new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.ScalarExpected)):this.config.smartRounding&&Object(a.isExtendedNumber)(e)?this.cellValueRounding(Object(a.getRawValue)(e)):e instanceof r.CellError?this.detailedError(e):e===a.EmptyValue?null:Object(a.getRawValue)(e)}},{key:"exportScalarOrRange",value:function(e){var t=this;return e instanceof s.SimpleRangeValue?e.rawData().map((function(e){return e.map((function(e){return t.exportValue(e)}))})):this.exportValue(e)}},{key:"detailedError",value:function(e){var t,n,r=void 0,i=null===(t=e.root)||void 0===t?void 0:t.getAddress(this.lazilyTransformingService);return void 0!==i&&(r=i.sheet===u.NamedExpressions.SHEET_FOR_WORKBOOK_EXPRESSIONS?null===(n=this.namedExpressions.namedExpressionInAddress(i.row))||void 0===n?void 0:n.displayName:Object(l.simpleCellAddressToString)(this.sheetIndexMapping,i,-1)),new o.DetailedCellError(e,this.config.translationPackage.getErrorTranslation(e.type),r)}},{key:"cellValueRounding",value:function(e){if(0===e)return e;var t=Math.floor(Math.log10(Math.abs(e))),n=Math.pow(10,this.config.precisionRounding-t);return e<0?-Math.round(-e*n)/n:Math.round(e*n)/n}}]),e}()},function(e,t,n){"use strict";var r=n(29),o=n(136).findIndex,i=n(174),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("findIndex")},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0;var o=r(n(564));t.OrderView=o.default;var i=r(n(735));t.SharedOrderView=i.default},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.getPlugin=p,t.getPluginsNames=function(){return[].concat((0,i.default)(f.getItems()),(0,i.default)(d.getItems()))},t.hasPlugin=function(e){return!!p(e)},t.registerPlugin=function(e,t,n){var r=function(e,t,n){"function"==typeof e&&(e=(t=e).PLUGIN_KEY,n=t.PLUGIN_PRIORITY);return[e,t,n]}(e,t,n),i=(0,o.default)(r,3);e=i[0],t=i[1],n=i[2],void 0===p(e)&&function(e,t,n){var r=(0,a.toUpperCaseFirst)(e);if(h.hasItem(r))throw new Error(c(r));void 0===n?d.addItem(r):f.addItem(n,r);h.addItem(r,t)}(e,t,n)},n(20);var o=r(n(32)),i=r(n(44)),a=n(97),s=n(763),u=n(578),l=n(764),c=function(e){return'There is already registered "'.concat(e,'" plugin.')},f=(0,s.createPriorityMap)({errorPriorityExists:function(e){return'There is already registered plugin on priority "'.concat(e,'".')},errorPriorityNaN:function(e){return'The priority "'.concat(e,'" is not a number.')}}),d=(0,l.createUniqueSet)({errorItemExists:c}),h=(0,u.createUniqueMap)({errorIdExists:c});function p(e){var t=(0,a.toUpperCaseFirst)(e);return h.getItem(t)}},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.IndexMap=void 0,n(12);var o=r(n(5)),i=r(n(6)),a=n(45),s=n(14),u=n(68),l=r(n(93)),c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,o.default)(this,e),this.indexedValues=[],this.initValueOrFn=t}return(0,i.default)(e,[{key:"getValues",value:function(){return this.indexedValues}},{key:"getValueAtIndex",value:function(e){var t=this.indexedValues;if(e<t.length)return t[e]}},{key:"setValues",value:function(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}},{key:"setValueAtIndex",value:function(e,t){return e<this.indexedValues.length&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}},{key:"clear",value:function(){this.setDefaultValues()}},{key:"getLength",value:function(){return this.getValues().length}},{key:"setDefaultValues",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,(0,u.isFunction)(this.initValueOrFn)?(0,a.rangeEach)(t-1,(function(t){return e.indexedValues.push(e.initValueOrFn(t))})):(0,a.rangeEach)(t-1,(function(){return e.indexedValues.push(e.initValueOrFn)})),this.runLocalHooks("change")}},{key:"init",value:function(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}},{key:"insert",value:function(){this.runLocalHooks("change")}},{key:"remove",value:function(){this.runLocalHooks("change")}},{key:"destroy",value:function(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}]),e}();t.IndexMap=c,(0,s.mixin)(c,l.default)},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.getListWithInsertedItems=function(e,t,n){return[].concat((0,o.default)(e.slice(0,t)),(0,o.default)(n),(0,o.default)(e.slice(t)))},t.getListWithRemovedItems=function(e,t){return(0,i.arrayFilter)(e,(function(e){return!1===t.includes(e)}))},n(20),n(12),n(42),n(50);var o=r(n(44)),i=n(19)},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t._getRefCount=function(){return u},t._resetState=l,t.isPressed=function(e){return Array.from(s.values()).some((function(t){return(0,i.isKey)(t,e)}))},t.isPressedCtrlKey=function(){return Array.from(s.values()).some((function(e){return(0,i.isCtrlMetaKey)(e)}))},t.startObserving=function(e){0===u&&(a.addEventListener(e,"keydown",(function(e){s.has(e.keyCode)||s.add(e.keyCode)})),a.addEventListener(e,"keyup",(function(e){s.has(e.keyCode)&&s.delete(e.keyCode)})),a.addEventListener(e,"visibilitychange",(function(){e.hidden&&s.clear()})),a.addEventListener(e.defaultView,"blur",(function(){s.clear()})));u+=1},t.stopObserving=function(){u>0&&(u-=1);0===u&&l()},n(3),n(0),n(58),n(2),n(4),n(21);var o=r(n(53)),i=n(92),a=new o.default,s=new Set,u=0;function l(){a.clearEvents(),s.clear(),u=0}},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.SELECTION_TYPE_UNRECOGNIZED=t.SELECTION_TYPE_OBJECT=t.SELECTION_TYPE_EMPTY=t.SELECTION_TYPE_ARRAY=t.SELECTION_TYPES=void 0,t.detectSelectionType=h,t.isValidCoord=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;return"number"==typeof e&&e>=0&&e<t},t.normalizeSelectionFactory=p,t.transformSelectionToColumnDistance=function(e){var t=h(e);if(0===t||1===t)return[];var n=p(t),r=new Set;(0,s.arrayEach)(e,(function(e){var t=n(e),i=(0,o.default)(t,4),a=i[1],u=i[3],l=Math.max(a,0),c=u-l+1;(0,s.arrayEach)(Array.from(new Array(c),(function(e,t){return l+t})),(function(e){r.has(e)||r.add(e)}))}));var i=Array.from(r).sort((function(e,t){return e-t}));return(0,s.arrayReduce)(i,(function(e,t,n,r){return 0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e}),[])},t.transformSelectionToRowDistance=function(e){var t=h(e);if(0===t||1===t)return[];var n=p(t),r=new Set;(0,s.arrayEach)(e,(function(e){var t=n(e),i=(0,o.default)(t,3),a=i[0],u=i[2],l=Math.max(a,0),c=u-l+1;(0,s.arrayEach)(Array.from(new Array(c),(function(e,t){return l+t})),(function(e){r.has(e)||r.add(e)}))}));var i=Array.from(r).sort((function(e,t){return e-t}));return(0,s.arrayReduce)(i,(function(e,t,n,r){return 0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e}),[])};var o=r(n(32)),i=r(n(18));n(8),n(9),n(0),n(42),n(50),n(3),n(58),n(2),n(4),n(21),n(77);var a=n(60),s=n(19),u=n(34);t.SELECTION_TYPE_UNRECOGNIZED=0;t.SELECTION_TYPE_EMPTY=1;t.SELECTION_TYPE_ARRAY=2;t.SELECTION_TYPE_OBJECT=3;var l=[3,2];t.SELECTION_TYPES=l;var c=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],f=Symbol("root"),d=Symbol("child");function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;if(t!==f&&t!==d)throw new Error("The second argument is used internally only and cannot be overwritten.");var n=Array.isArray(e),r=t===f,o=0;if(n){var s=e[0];if(0===e.length)o=1;else if(r&&s instanceof a.CellRange)o=3;else if(r&&Array.isArray(s))o=h(s,d);else if(e.length>=2&&e.length<=4){var u=!e.some((function(e,t){return!c[t].includes((0,i.default)(e))}));u&&(o=2)}}return o}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.keepDirection,r=void 0!==n&&n,o=t.propToCol;if(!l.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(t){var n=3===e,i=n?t.from.row:t[0],a=n?t.from.col:t[1],s=n?t.to.row:t[2],l=n?t.to.col:t[3];if("function"==typeof o&&("string"==typeof a&&(a=o(a)),"string"==typeof l&&(l=o(l))),(0,u.isUndefined)(s)&&(s=i),(0,u.isUndefined)(l)&&(l=a),!r){var c=i,f=a,d=s,h=l;i=Math.min(c,d),a=Math.min(f,h),s=Math.max(c,d),l=Math.max(f,h)}return[i,a,s,l]}}},function(e,t,n){"use strict";t.__esModule=!0,t.baseRenderer=t.RENDERER_TYPE=void 0;var r=n(807);t.RENDERER_TYPE=r.RENDERER_TYPE,t.baseRenderer=r.baseRenderer},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.default=void 0;var o=r(n(5)),i=r(n(6)),a=n(19),s=n(14),u=r(n(93)),l=n(81),c=function(){function e(t,n){var r=n.id,i=n.stateless,a=void 0===i||i;(0,o.default)(this,e),this.hot=t,this.id=r,this.elements=[],this.hidden=!1,this.stateId="Filters.component.".concat(this.id),this.state=a?null:this.hot.columnIndexMapper.registerMap(this.stateId,new l.LinkedPhysicalIndexToValueMap)}return(0,i.default)(e,[{key:"reset",value:function(){(0,a.arrayEach)(this.elements,(function(e){return e.reset()}))}},{key:"hide",value:function(){this.hidden=!0}},{key:"show",value:function(){this.hidden=!1}},{key:"isHidden",value:function(){return null===this.hot||this.hidden}},{key:"restoreState",value:function(e){this.state&&this.setState(this.state.getValueAtIndex(e))}},{key:"setState",value:function(){throw new Error("The state setting logic is not implemented")}},{key:"saveState",value:function(e){this.state&&this.state.setValueAtIndex(e,this.getState())}},{key:"getState",value:function(){throw new Error("The state gathering logic is not implemented")}},{key:"destroy",value:function(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),(0,a.arrayEach)(this.elements,(function(e){return e.destroy()})),this.state=null,this.elements=null,this.hot=null}}]),e}();(0,s.mixin)(c,u.default);var f=c;t.default=f},function(e,t,n){"use strict";n.r(t);n(25),n(240),n(115),n(7),n(12),n(0),n(24),n(21),n(2),n(8),n(9),n(10),n(3),n(4);var r=n(22);n.d(t,"CellType",(function(){return r.CellType})),n.d(t,"CellValueType",(function(){return r.CellValueType})),n.d(t,"CellValueDetailedType",(function(){return r.CellValueDetailedType})),n.d(t,"ErrorType",(function(){return r.ErrorType})),n.d(t,"CellError",(function(){return r.CellError}));var o=n(281);n.d(t,"DetailedCellError",(function(){return o.DetailedCellError}));var i=n(219),a=n(183);n.d(t,"AlwaysDense",(function(){return a.AlwaysDense})),n.d(t,"AlwaysSparse",(function(){return a.AlwaysSparse})),n.d(t,"DenseSparseChooseBasedOnThreshold",(function(){return a.DenseSparseChooseBasedOnThreshold}));var s=n(39);n.d(t,"ConfigValueTooBigError",(function(){return s.ConfigValueTooBigError})),n.d(t,"ConfigValueTooSmallError",(function(){return s.ConfigValueTooSmallError})),n.d(t,"EvaluationSuspendedError",(function(){return s.EvaluationSuspendedError})),n.d(t,"ExpectedOneOfValuesError",(function(){return s.ExpectedOneOfValuesError})),n.d(t,"ExpectedValueOfTypeError",(function(){return s.ExpectedValueOfTypeError})),n.d(t,"FunctionPluginValidationError",(function(){return s.FunctionPluginValidationError})),n.d(t,"InvalidAddressError",(function(){return s.InvalidAddressError})),n.d(t,"InvalidArgumentsError",(function(){return s.InvalidArgumentsError})),n.d(t,"LanguageAlreadyRegisteredError",(function(){return s.LanguageAlreadyRegisteredError})),n.d(t,"LanguageNotRegisteredError",(function(){return s.LanguageNotRegisteredError})),n.d(t,"MissingTranslationError",(function(){return s.MissingTranslationError})),n.d(t,"NamedExpressionDoesNotExistError",(function(){return s.NamedExpressionDoesNotExistError})),n.d(t,"NamedExpressionNameIsAlreadyTakenError",(function(){return s.NamedExpressionNameIsAlreadyTakenError})),n.d(t,"NamedExpressionNameIsInvalidError",(function(){return s.NamedExpressionNameIsInvalidError})),n.d(t,"NoOperationToRedoError",(function(){return s.NoOperationToRedoError})),n.d(t,"NoOperationToUndoError",(function(){return s.NoOperationToUndoError})),n.d(t,"NoRelativeAddressesAllowedError",(function(){return s.NoRelativeAddressesAllowedError})),n.d(t,"NoSheetWithIdError",(function(){return s.NoSheetWithIdError})),n.d(t,"NoSheetWithNameError",(function(){return s.NoSheetWithNameError})),n.d(t,"NotAFormulaError",(function(){return s.NotAFormulaError})),n.d(t,"NothingToPasteError",(function(){return s.NothingToPasteError})),n.d(t,"ProtectedFunctionTranslationError",(function(){return s.ProtectedFunctionTranslationError})),n.d(t,"SheetNameAlreadyTakenError",(function(){return s.SheetNameAlreadyTakenError})),n.d(t,"SheetSizeLimitExceededError",(function(){return s.SheetSizeLimitExceededError})),n.d(t,"SourceLocationHasArrayError",(function(){return s.SourceLocationHasArrayError})),n.d(t,"TargetLocationHasArrayError",(function(){return s.TargetLocationHasArrayError})),n.d(t,"UnableToParseError",(function(){return s.UnableToParseError}));var u=n(222);n.d(t,"ExportedCellChange",(function(){return u.ExportedCellChange})),n.d(t,"ExportedNamedExpressionChange",(function(){return u.ExportedNamedExpressionChange}));var l=n(184);n.d(t,"HyperFormula",(function(){return l.HyperFormula}));var c=n(704),f=n(290);n.d(t,"FunctionPlugin",(function(){return f.FunctionPlugin}));var d=n(705),h=n(80);function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}function E(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/n.d(t,"SimpleRangeValue",(function(){return h.SimpleRangeValue}));var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(n,e);var t=g(n);function n(){return y(this,n),t.apply(this,arguments)}return n}(l.HyperFormula);C.HyperFormula=l.HyperFormula,C.ErrorType=r.ErrorType,C.CellType=r.CellType,C.CellValueType=r.CellValueType,C.CellValueDetailedType=r.CellValueDetailedType,C.DetailedCellError=o.DetailedCellError,C.ExportedCellChange=u.ExportedCellChange,C.ExportedNamedExpressionChange=u.ExportedNamedExpressionChange,C.ConfigValueTooBigError=s.ConfigValueTooBigError,C.ConfigValueTooSmallError=s.ConfigValueTooSmallError,C.EvaluationSuspendedError=s.EvaluationSuspendedError,C.ExpectedOneOfValuesError=s.ExpectedOneOfValuesError,C.ExpectedValueOfTypeError=s.ExpectedValueOfTypeError,C.FunctionPlugin=f.FunctionPlugin,C.FunctionPluginValidationError=s.FunctionPluginValidationError,C.InvalidAddressError=s.InvalidAddressError,C.InvalidArgumentsError=s.InvalidArgumentsError,C.LanguageNotRegisteredError=s.LanguageNotRegisteredError,C.LanguageAlreadyRegisteredError=s.LanguageAlreadyRegisteredError,C.MissingTranslationError=s.MissingTranslationError,C.NamedExpressionDoesNotExistError=s.NamedExpressionDoesNotExistError,C.NamedExpressionNameIsAlreadyTakenError=s.NamedExpressionNameIsAlreadyTakenError,C.NamedExpressionNameIsInvalidError=s.NamedExpressionNameIsInvalidError,C.NoOperationToRedoError=s.NoOperationToRedoError,C.NoOperationToUndoError=s.NoOperationToUndoError,C.NoRelativeAddressesAllowedError=s.NoRelativeAddressesAllowedError,C.NoSheetWithIdError=s.NoSheetWithIdError,C.NoSheetWithNameError=s.NoSheetWithNameError,C.NotAFormulaError=s.NotAFormulaError,C.NothingToPasteError=s.NothingToPasteError,C.ProtectedFunctionTranslationError=s.ProtectedFunctionTranslationError,C.SheetNameAlreadyTakenError=s.SheetNameAlreadyTakenError,C.SheetSizeLimitExceededError=s.SheetSizeLimitExceededError,C.SourceLocationHasArrayError=s.SourceLocationHasArrayError,C.TargetLocationHasArrayError=s.TargetLocationHasArrayError,C.UnableToParseError=s.UnableToParseError;var b=i.Config.defaultConfig.language;l.HyperFormula.registerLanguage(b,c.default),l.HyperFormula.languages[c.default.langCode]=c.default;var w,R=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(Object.getOwnPropertyNames(d));try{for(R.s();!(w=R.n()).done;){var O=w.value;O.startsWith("_")||l.HyperFormula.registerFunctionPlugin(d[O])}}catch(e){R.e(e)}finally{R.f()}t.default=C,window.HyperFormula=n(232).default},function(e,t,n){var r=n(165),o=n(41);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(e,t,n){var r=n(28),o=n(235),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,n){var r=n(28),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(35),o=n(61),i=n(234),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},function(e,t,n){var r=n(94),o=n(149),i=n(98),a=function(e){return function(t,n,a){var s,u=r(t),l=i(u),c=o(a,l);if(e&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(29),o=n(41),i=n(241).f;r({target:"Object",stat:!0,forced:o((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},function(e,t,n){var r=n(120),o=n(94),i=n(148).f,a=n(242),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"==r(e)?function(e){try{return i(e)}catch(e){return a(s)}}(e):i(o(e))}},function(e,t,n){var r=n(28),o=n(149),i=n(98),a=n(150),s=r.Array,u=Math.max;e.exports=function(e,t,n){for(var r=i(e),l=o(t,r),c=o(void 0===n?r:n,r),f=s(u(c-l,0)),d=0;l<c;l++,d++)a(f,d,e[l]);return f.length=d,f}},function(e,t,n){var r={};r[n(59)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(28),o=n(245),i=r.TypeError;e.exports=function(e){if(o(e))throw i("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(63),o=n(120),i=n(59)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(59)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,n){var r=n(205),o=n(131),i=n(173),a=n(59)("iterator");e.exports=function(e){if(null!=e)return o(e,a)||o(e,"@@iterator")||i[r(e)]}},function(e,t,n){var r=n(35),o=n(124),i=n(74),a=n(90),s=r("".charAt),u=r("".charCodeAt),l=r("".slice),c=function(e){return function(t,n){var r,c,f=i(a(t)),d=o(n),h=f.length;return d<0||d>=h?e?"":void 0:(r=u(f,d))<55296||r>56319||d+1===h||(c=u(f,d+1))<56320||c>57343?e?s(f,d):r:e?l(f,d,d+2):c-56320+(r-55296<<10)+65536}};e.exports={codeAt:c(!1),charAt:c(!0)}},function(e,t,n){"use strict";var r=n(29),o=n(78),i=n(132),a=n(167),s=n(61),u=n(639),l=n(204),c=n(334),f=n(207),d=n(123),h=n(104),p=n(59),m=n(173),y=n(333),v=a.PROPER,g=a.CONFIGURABLE,E=y.IteratorPrototype,T=y.BUGGY_SAFARI_ITERATORS,C=p("iterator"),b=function(){return this};e.exports=function(e,t,n,a,p,y,w){u(n,t,a);var R,O,S,A=function(e){if(e===p&&I)return I;if(!T&&e in k)return k[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},N=t+" Iterator",M=!1,k=e.prototype,_=k[C]||k["@@iterator"]||p&&k[p],I=!T&&_||A(p),P="Array"==t&&k.entries||_;if(P&&(R=l(P.call(new e)))!==Object.prototype&&R.next&&(i||l(R)===E||(c?c(R,E):s(R[C])||h(R,C,b)),f(R,N,!0,!0),i&&(m[N]=b)),v&&"values"==p&&_&&"values"!==_.name&&(!i&&g?d(k,"name","values"):(M=!0,I=function(){return o(_,this)})),p)if(O={values:A("values"),keys:y?I:A("keys"),entries:A("entries")},w)for(S in O)(T||M||!(S in k))&&h(k,S,O[S]);else r({target:t,proto:!0,forced:T||M},O);return i&&!w||k[C]===I||h(k,C,I,{name:p}),m[t]=I,O}},function(e,t,n){var r=n(642);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},function(e,t,n){var r=n(28),o=n(172),i=n(78),a=n(64),s=n(198),u=n(330),l=n(98),c=n(122),f=n(331),d=n(247),h=n(329),p=r.TypeError,m=function(e,t){this.stopped=e,this.result=t},y=m.prototype;e.exports=function(e,t,n){var r,v,g,E,T,C,b,w=n&&n.that,R=!(!n||!n.AS_ENTRIES),O=!(!n||!n.IS_ITERATOR),S=!(!n||!n.INTERRUPTED),A=o(t,w),N=function(e){return r&&h(r,"normal",e),new m(!0,e)},M=function(e){return R?(a(e),S?A(e[0],e[1],N):A(e[0],e[1])):S?A(e,N):A(e)};if(O)r=e;else{if(!(v=d(e)))throw p(s(e)+" is not iterable");if(u(v)){for(g=0,E=l(e);E>g;g++)if((T=M(e[g]))&&c(y,T))return T;return new m(!1)}r=f(e,v)}for(C=r.next;!(b=i(C,r)).done;){try{T=M(b.value)}catch(e){h(r,"throw",e)}if("object"==typeof T&&T&&c(y,T))return T}return new m(!1)}},function(e,t,n){var r=n(28),o=n(122),i=r.TypeError;e.exports=function(e,t){if(o(t,e))return e;throw i("Incorrect invocation")}},function(e,t,n){var r=n(61),o=n(63),i=n(334);e.exports=function(e,t,n){var a,s;return i&&r(a=t.constructor)&&a!==n&&o(s=a.prototype)&&s!==n.prototype&&i(e,s),e}},function(e,t,n){var r=n(104);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){n(29)({target:"Number",stat:!0},{isFinite:n(646)})},function(e,t,n){"use strict";var r=n(64);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(41),o=n(28).RegExp,i=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=i||r((function(){return!o("a","y").sticky})),s=i||r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:i}},function(e,t,n){"use strict";var r=n(248).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";n.r(t),n.d(t,"VERSION",(function(){return r}));var r="6.5.0"},function(e,t,n){"use strict";n.r(t),n.d(t,"RestWalker",(function(){return i}));var r=n(46),o=n(55),i=function(){function e(){}return e.prototype.walk=function(e,t){var n=this;void 0===t&&(t=[]),Object(r.forEach)(e.definition,(function(i,a){var s=Object(r.drop)(e.definition,a+1);if(i instanceof o.NonTerminal)n.walkProdRef(i,s,t);else if(i instanceof o.Terminal)n.walkTerminal(i,s,t);else if(i instanceof o.Flat)n.walkFlat(i,s,t);else if(i instanceof o.Option)n.walkOption(i,s,t);else if(i instanceof o.RepetitionMandatory)n.walkAtLeastOne(i,s,t);else if(i instanceof o.RepetitionMandatoryWithSeparator)n.walkAtLeastOneSep(i,s,t);else if(i instanceof o.RepetitionWithSeparator)n.walkManySep(i,s,t);else if(i instanceof o.Repetition)n.walkMany(i,s,t);else{if(!(i instanceof o.Alternation))throw Error("non exhaustive match");n.walkOr(i,s,t)}}))},e.prototype.walkTerminal=function(e,t,n){},e.prototype.walkProdRef=function(e,t,n){},e.prototype.walkFlat=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkOption=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkAtLeastOne=function(e,t,n){var r=[new o.Option({definition:e.definition})].concat(t,n);this.walk(e,r)},e.prototype.walkAtLeastOneSep=function(e,t,n){var r=a(e,t,n);this.walk(e,r)},e.prototype.walkMany=function(e,t,n){var r=[new o.Option({definition:e.definition})].concat(t,n);this.walk(e,r)},e.prototype.walkManySep=function(e,t,n){var r=a(e,t,n);this.walk(e,r)},e.prototype.walkOr=function(e,t,n){var i=this,a=t.concat(n);Object(r.forEach)(e.definition,(function(e){var t=new o.Flat({definition:[e]});i.walk(t,a)}))},e}();function a(e,t,n){return[new o.Option({definition:[new o.Terminal({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}},function(e,t,n){var r,o,i;"undefined"!=typeof self&&self,o=[],void 0===(i="function"==typeof(r=function(){function e(){}e.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},e.prototype.restoreState=function(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx},e.prototype.pattern=function(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");var t=this.disjunction();this.consumeChar("/");for(var n={type:"Flags",global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":s(n,"global");break;case"i":s(n,"ignoreCase");break;case"m":s(n,"multiLine");break;case"u":s(n,"unicode");break;case"y":s(n,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t}},e.prototype.disjunction=function(){var e=[];for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e}},e.prototype.alternative=function(){for(var e=[];this.isTerm();)e.push(this.term());return{type:"Alternative",value:e}},e.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},e.prototype.assertion=function(){switch(this.popChar()){case"^":return{type:"StartAnchor"};case"$":return{type:"EndAnchor"};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary"};case"B":return{type:"NonWordBoundary"}}throw Error("Invalid Assertion Escape");case"(":var e;switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead"}u(e);var t=this.disjunction();return this.consumeChar(")"),{type:e,value:t}}!function(){throw Error("Internal Error - Should never get here!")}()},e.prototype.quantifier=function(e){var t;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":var n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":t=this.isDigit()?{atLeast:n,atMost:this.integerIncludingZero()}:{atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;u(t)}if(!0!==e||void 0!==t)return u(t),"?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t},e.prototype.atom=function(){var e;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),u(e),this.isQuantifier()&&(e.quantifier=this.quantifier()),e},e.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[i("\n"),i("\r"),i("\u2028"),i("\u2029")]}},e.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.decimalEscapeAtom=function(){return{type:"GroupBackReference",value:this.positiveInteger()}},e.prototype.characterClassEscape=function(){var e,t=!1;switch(this.popChar()){case"d":e=l;break;case"D":e=l,t=!0;break;case"s":e=f;break;case"S":e=f,t=!0;break;case"w":e=c;break;case"W":e=c,t=!0}return u(e),{type:"Set",value:e,complement:t}},e.prototype.controlEscapeAtom=function(){var e;switch(this.popChar()){case"f":e=i("\f");break;case"n":e=i("\n");break;case"r":e=i("\r");break;case"t":e=i("\t");break;case"v":e=i("\v")}return u(e),{type:"Character",value:e}},e.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}},e.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:i("\0")}},e.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},e.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},e.prototype.identityEscapeAtom=function(){return{type:"Character",value:i(this.popChar())}},e.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:i(this.popChar())}}},e.prototype.characterClass=function(){var e=[],t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){var n=this.classAtom();if("Character"===n.type&&this.isRangeDash()){this.consumeChar("-");var r=this.classAtom();if("Character"===r.type){if(r.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:r.value})}else a(n.value,e),e.push(i("-")),a(r.value,e)}else a(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}},e.prototype.classAtom=function(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}},e.prototype.classEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:i("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.group=function(){var e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++}var t=this.disjunction();this.consumeChar(")");var n={type:"Group",capturing:e,value:t};return e&&(n.idx=this.groupIdx),n},e.prototype.positiveInteger=function(){var e=this.popChar();if(!1===o.test(e))throw Error("Expecting a positive integer");for(;r.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)},e.prototype.integerIncludingZero=function(){var e=this.popChar();if(!1===r.test(e))throw Error("Expecting an integer");for(;r.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)},e.prototype.patternCharacter=function(){var e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:i(e)}}},e.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}},e.prototype.isRangeDash=function(){return"-"===this.peekChar()&&this.isClassAtom(1)},e.prototype.isDigit=function(){return r.test(this.peekChar(0))},e.prototype.isClassAtom=function(e){switch(void 0===e&&(e=0),this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.isTerm=function(){return this.isAtom()||this.isAssertion()},e.prototype.isAtom=function(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}},e.prototype.isAssertion=function(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}},e.prototype.isQuantifier=function(){var e=this.saveState();try{return void 0!==this.quantifier(!0)}catch(e){return!1}finally{this.restoreState(e)}},e.prototype.isPatternCharacter=function(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.parseHexDigits=function(e){for(var t="",r=0;r<e;r++){var o=this.popChar();if(!1===n.test(o))throw Error("Expecting a HexDecimal digits");t+=o}return{type:"Character",value:parseInt(t,16)}},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.input[this.idx+e]},e.prototype.popChar=function(){var e=this.peekChar(0);return this.consumeChar(),e},e.prototype.consumeChar=function(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++};var t,n=/[0-9a-fA-F]/,r=/[0-9]/,o=/[1-9]/;function i(e){return e.charCodeAt(0)}function a(e,t){void 0!==e.length?e.forEach((function(e){t.push(e)})):t.push(e)}function s(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function u(e){if(void 0===e)throw Error("Internal Error - Should never get here!")}var l=[];for(t=i("0");t<=i("9");t++)l.push(t);var c=[i("_")].concat(l);for(t=i("a");t<=i("z");t++)c.push(t);for(t=i("A");t<=i("Z");t++)c.push(t);var f=[i(" "),i("\f"),i("\n"),i("\r"),i("\t"),i("\v"),i("\t"),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i("\u2028"),i("\u2029"),i(" "),i(" "),i(" "),i("\ufeff")];function d(){}return d.prototype.visitChildren=function(e){for(var t in e){var n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((function(e){this.visit(e)}),this))}},d.prototype.visit=function(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)},d.prototype.visitPattern=function(e){},d.prototype.visitFlags=function(e){},d.prototype.visitDisjunction=function(e){},d.prototype.visitAlternative=function(e){},d.prototype.visitStartAnchor=function(e){},d.prototype.visitEndAnchor=function(e){},d.prototype.visitWordBoundary=function(e){},d.prototype.visitNonWordBoundary=function(e){},d.prototype.visitLookahead=function(e){},d.prototype.visitNegativeLookahead=function(e){},d.prototype.visitCharacter=function(e){},d.prototype.visitSet=function(e){},d.prototype.visitGroup=function(e){},d.prototype.visitGroupBackReference=function(e){},d.prototype.visitQuantifier=function(e){},{RegExpParser:e,BaseRegExpVisitor:d,VERSION:"0.4.0"}})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){"use strict";n.r(t),n.d(t,"getRegExpAst",(function(){return a})),n.d(t,"clearRegExpParserCache",(function(){return s}));var r=n(261),o={},i=new r.RegExpParser;function a(e){var t=e.toString();if(o.hasOwnProperty(t))return o[t];var n=i.pattern(t);return o[t]=n,n}function s(){o={}}},function(e,t,n){"use strict";n.r(t),n.d(t,"defaultLexerErrorProvider",(function(){return r}));var r={buildUnableToPopLexerModeMessage:function(e){return"Unable to pop Lexer Mode after encountering Token ->"+e.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(e,t,n,r,o){return"unexpected character: ->"+e.charAt(t)+"<- at offset: "+t+", skipped "+n+" characters."}}},function(e,t,n){"use strict";n.r(t),n.d(t,"setNodeLocationOnlyOffset",(function(){return l})),n.d(t,"setNodeLocationFull",(function(){return c})),n.d(t,"addTerminalToCst",(function(){return f})),n.d(t,"addNoneTerminalToCst",(function(){return d})),n.d(t,"NamedDSLMethodsCollectorVisitor",(function(){return h})),n.d(t,"expandAllNestedRuleNames",(function(){return p}));var r,o=n(46),i=n(179),a=n(55),s=n(137),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function l(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset)}function c(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function f(e,t,n){void 0===e.children[n]?e.children[n]=[t]:e.children[n].push(t)}function d(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}var h=function(e){function t(t){var n=e.call(this)||this;return n.result=[],n.ruleIdx=t,n}return u(t,e),t.prototype.collectNamedDSLMethod=function(e,t,n){if(!Object(o.isUndefined)(e.name)){var r=void 0;if(e instanceof a.Option||e instanceof a.Repetition||e instanceof a.RepetitionMandatory||e instanceof a.Alternation)r=new t({definition:e.definition,idx:e.idx});else{if(!(e instanceof a.RepetitionMandatoryWithSeparator||e instanceof a.RepetitionWithSeparator))throw Error("non exhaustive match");r=new t({definition:e.definition,idx:e.idx,separator:e.separator})}var s=[r],u=Object(i.getKeyForAutomaticLookahead)(this.ruleIdx,n,e.idx);this.result.push({def:s,key:u,name:e.name,orgProd:e})}},t.prototype.visitOption=function(e){this.collectNamedDSLMethod(e,a.Option,i.OPTION_IDX)},t.prototype.visitRepetition=function(e){this.collectNamedDSLMethod(e,a.Repetition,i.MANY_IDX)},t.prototype.visitRepetitionMandatory=function(e){this.collectNamedDSLMethod(e,a.RepetitionMandatory,i.AT_LEAST_ONE_IDX)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.collectNamedDSLMethod(e,a.RepetitionMandatoryWithSeparator,i.AT_LEAST_ONE_SEP_IDX)},t.prototype.visitRepetitionWithSeparator=function(e){this.collectNamedDSLMethod(e,a.RepetitionWithSeparator,i.MANY_SEP_IDX)},t.prototype.visitAlternation=function(e){var t=this;this.collectNamedDSLMethod(e,a.Alternation,i.OR_IDX);var n=e.definition.length>1;Object(o.forEach)(e.definition,(function(r,s){if(!Object(o.isUndefined)(r.name)){var u=r.definition;u=n?[new a.Option({definition:r.definition})]:r.definition;var l=Object(i.getKeyForAltIndex)(t.ruleIdx,i.OR_IDX,e.idx,s);t.result.push({def:u,key:l,name:r.name,orgProd:r})}}))},t}(s.GAstVisitor);function p(e,t){var n={allRuleNames:[]};return Object(o.forEach)(e,(function(e){var r=t[e.name];n.allRuleNames.push(e.name);var i=new h(r);e.accept(i),Object(o.forEach)(i.result,(function(t){t.def,t.key;var r=t.name;n.allRuleNames.push(e.name+r)}))})),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"generateParserFactory",(function(){return o})),n.d(t,"generateParserModule",(function(){return i}));var r=n(663);function o(e){var t=Object(r.genWrapperFunction)({name:e.name,rules:e.rules}),o=new Function("tokenVocabulary","config","chevrotain",t);return function(t){return o(e.tokenVocabulary,t,n(213))}}function i(e){return Object(r.genUmdModule)({name:e.name,rules:e.rules})}},function(e,t,n){"use strict";n.r(t),n.d(t,"FormulaParser",(function(){return C})),n.d(t,"FormulaLexer",(function(){return b}));n(12),n(33),n(66),n(20),n(62),n(51),n(37),n(67),n(25),n(7),n(360),n(17),n(8),n(9),n(0),n(10),n(3),n(2),n(4),n(24),n(21);var r=n(213),o=n(22),i=n(43),a=n(99),s=n(101),u=n(212),l=n(176);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}function y(e,t,n){return(y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=T(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}function E(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(n,e);var t=g(n);function n(e,i){var u;return h(this,n),(u=t.call(this,e.allTokens,{outputCst:!1,maxLookahead:7})).formula=u.RULE("formula",(function(){return u.CONSUME(l.EqualsOp),u.SUBRULE(u.booleanExpression)})),u.booleanExpression=u.RULE("booleanExpression",(function(){var e=u.SUBRULE(u.concatenateExpression);return u.MANY((function(){var t=u.CONSUME(l.BooleanOp),n=u.SUBRULE2(u.concatenateExpression);Object(r.tokenMatcher)(t,l.EqualsOp)?e=Object(s.buildEqualsOpAst)(e,n,t.leadingWhitespace):Object(r.tokenMatcher)(t,l.NotEqualOp)?e=Object(s.buildNotEqualOpAst)(e,n,t.leadingWhitespace):Object(r.tokenMatcher)(t,l.GreaterThanOp)?e=Object(s.buildGreaterThanOpAst)(e,n,t.leadingWhitespace):Object(r.tokenMatcher)(t,l.LessThanOp)?e=Object(s.buildLessThanOpAst)(e,n,t.leadingWhitespace):Object(r.tokenMatcher)(t,l.GreaterThanOrEqualOp)?e=Object(s.buildGreaterThanOrEqualOpAst)(e,n,t.leadingWhitespace):Object(r.tokenMatcher)(t,l.LessThanOrEqualOp)?e=Object(s.buildLessThanOrEqualOpAst)(e,n,t.leadingWhitespace):u.ACTION((function(){throw Error("Operator not supported")}))})),e})),u.booleanExpressionOrEmpty=u.RULE("booleanExpressionOrEmpty",(function(){return u.OR([{ALT:function(){return u.SUBRULE(u.booleanExpression)}},{ALT:Object(r.EMPTY_ALT)(Object(s.buildEmptyArgAst)())}])})),u.concatenateExpression=u.RULE("concatenateExpression",(function(){var e=u.SUBRULE(u.additionExpression);return u.MANY((function(){var t=u.CONSUME(l.ConcatenateOp),n=u.SUBRULE2(u.additionExpression);e=Object(s.buildConcatenateOpAst)(e,n,t.leadingWhitespace)})),e})),u.additionExpression=u.RULE("additionExpression",(function(){var e=u.SUBRULE(u.multiplicationExpression);return u.MANY((function(){var t=u.CONSUME(l.AdditionOp),n=u.SUBRULE2(u.multiplicationExpression);Object(r.tokenMatcher)(t,l.PlusOp)?e=Object(s.buildPlusOpAst)(e,n,t.leadingWhitespace):Object(r.tokenMatcher)(t,l.MinusOp)?e=Object(s.buildMinusOpAst)(e,n,t.leadingWhitespace):u.ACTION((function(){throw Error("Operator not supported")}))})),e})),u.multiplicationExpression=u.RULE("multiplicationExpression",(function(){var e=u.SUBRULE(u.powerExpression);return u.MANY((function(){var t=u.CONSUME(l.MultiplicationOp),n=u.SUBRULE2(u.powerExpression);Object(r.tokenMatcher)(t,l.TimesOp)?e=Object(s.buildTimesOpAst)(e,n,t.leadingWhitespace):Object(r.tokenMatcher)(t,l.DivOp)?e=Object(s.buildDivOpAst)(e,n,t.leadingWhitespace):u.ACTION((function(){throw Error("Operator not supported")}))})),e})),u.powerExpression=u.RULE("powerExpression",(function(){var e=u.SUBRULE(u.atomicExpression);return u.MANY((function(){var t=u.CONSUME(l.PowerOp),n=u.SUBRULE2(u.atomicExpression);Object(r.tokenMatcher)(t,l.PowerOp)?e=Object(s.buildPowerOpAst)(e,n,t.leadingWhitespace):u.ACTION((function(){throw Error("Operator not supported")}))})),e})),u.atomicExpression=u.RULE("atomicExpression",(function(){return u.OR([{ALT:function(){var e=u.CONSUME(l.AdditionOp),t=u.SUBRULE(u.atomicExpression);return Object(r.tokenMatcher)(e,l.PlusOp)?Object(s.buildPlusUnaryOpAst)(t,e.leadingWhitespace):Object(r.tokenMatcher)(e,l.MinusOp)?Object(s.buildMinusUnaryOpAst)(t,e.leadingWhitespace):(u.customParsingError=Object(s.parsingError)(s.ParsingErrorType.ParserError,"Mismatched token type"),u.customParsingError)}},{ALT:function(){return u.SUBRULE2(u.rightUnaryOpAtomicExpression)}}])})),u.rightUnaryOpAtomicExpression=u.RULE("rightUnaryOpAtomicExpression",(function(){var e=u.SUBRULE(u.positiveAtomicExpression),t=u.OPTION((function(){return u.CONSUME(l.PercentOp)}));return t?Object(s.buildPercentOpAst)(e,t.leadingWhitespace):e})),u.positiveAtomicExpression=u.RULE("positiveAtomicExpression",(function(){var e;return u.OR(null!==(e=u.atomicExpCache)&&void 0!==e?e:u.atomicExpCache=[{ALT:function(){return u.SUBRULE(u.arrayExpression)}},{ALT:function(){return u.SUBRULE(u.cellRangeExpression)}},{ALT:function(){return u.SUBRULE(u.columnRangeExpression)}},{ALT:function(){return u.SUBRULE(u.rowRangeExpression)}},{ALT:function(){return u.SUBRULE(u.offsetExpression)}},{ALT:function(){return u.SUBRULE(u.cellReference)}},{ALT:function(){return u.SUBRULE(u.procedureExpression)}},{ALT:function(){return u.SUBRULE(u.namedExpressionExpression)}},{ALT:function(){var e=u.CONSUME(u.lexerConfig.NumberLiteral);return Object(s.buildNumberAst)(u.numericStringToNumber(e.image),e.leadingWhitespace)}},{ALT:function(){var e=u.CONSUME(l.StringLiteral);return Object(s.buildStringAst)(e)}},{ALT:function(){var e=u.CONSUME(l.ErrorLiteral),t=e.image.toUpperCase(),n=u.lexerConfig.errorMapping[t];return n?Object(s.buildCellErrorAst)(new o.CellError(n),e.leadingWhitespace):u.parsingError(s.ParsingErrorType.ParserError,"Unknown error literal")}}])})),u.procedureExpression=u.RULE("procedureExpression",(function(){var e,t=u.CONSUME(l.ProcedureName),n=t.image.toUpperCase().slice(0,-1),r=null!==(e=u.lexerConfig.functionMapping[n])&&void 0!==e?e:n,o=[],i=u.SUBRULE(u.booleanExpressionOrEmpty);u.MANY((function(){var e,t=u.CONSUME(u.lexerConfig.ArgSeparator);i.type===s.AstNodeType.EMPTY&&(i.leadingWhitespace=null===(e=t.leadingWhitespace)||void 0===e?void 0:e.image),o.push(i),i=u.SUBRULE2(u.booleanExpressionOrEmpty)})),o.push(i),1===o.length&&o[0].type===s.AstNodeType.EMPTY&&(o.length=0);var a=u.CONSUME(l.RParen);return Object(s.buildProcedureAst)(r,o,t.leadingWhitespace,a.leadingWhitespace)})),u.namedExpressionExpression=u.RULE("namedExpressionExpression",(function(){var e=u.CONSUME(l.NamedExpression);return Object(s.buildNamedExpressionAst)(e.image,e.leadingWhitespace)})),u.offsetExpression=u.RULE("offsetExpression",(function(){var e,t=u.SUBRULE(u.offsetProcedureExpression);return u.OPTION((function(){u.CONSUME(l.RangeSeparator),e=t.type===s.AstNodeType.CELL_RANGE?u.parsingError(s.ParsingErrorType.RangeOffsetNotAllowed,"Range offset not allowed here"):u.SUBRULE(u.endOfRangeWithOffsetStartExpression,{ARGS:[t]})})),void 0!==e?e:t})),u.offsetProcedureExpression=u.RULE("offsetProcedureExpression",(function(){var e=[];return u.CONSUME(u.lexerConfig.OffsetProcedureName),u.CONSUME(l.LParen),u.MANY_SEP({SEP:u.lexerConfig.ArgSeparator,DEF:function(){e.push(u.SUBRULE(u.booleanExpression))}}),u.CONSUME(l.RParen),u.handleOffsetHeuristic(e)})),u.cellRangeExpression=u.RULE("cellRangeExpression",(function(){var e=u.CONSUME(l.CellReference);return u.CONSUME2(l.RangeSeparator),u.SUBRULE(u.endOfRangeExpression,{ARGS:[e]})})),u.columnRangeExpression=u.RULE("columnRangeExpression",(function(){var e=u.CONSUME(l.ColumnRange),t=f(e.image.split(":"),2),n=t[0],r=t[1],i=u.ACTION((function(){return Object(a.columnAddressFromString)(u.sheetMapping,n,u.formulaAddress)})),c=u.ACTION((function(){return Object(a.columnAddressFromString)(u.sheetMapping,r,u.formulaAddress)}));if(void 0===i||void 0===c)return Object(s.buildCellErrorAst)(new o.CellError(o.ErrorType.REF));if(i.exceedsSheetSizeLimits(u.lexerConfig.maxColumns)||c.exceedsSheetSizeLimits(u.lexerConfig.maxColumns))return Object(s.buildErrorWithRawInputAst)(e.image,new o.CellError(o.ErrorType.NAME),e.leadingWhitespace);if(void 0===i.sheet&&void 0!==c.sheet)return u.parsingError(s.ParsingErrorType.ParserError,"Malformed range expression");var d=u.rangeSheetReferenceType(i.sheet,c.sheet);return void 0!==i.sheet&&void 0===c.sheet&&(c=c.withAbsoluteSheet(i.sheet)),Object(s.buildColumnRangeAst)(i,c,d,e.leadingWhitespace)})),u.rowRangeExpression=u.RULE("rowRangeExpression",(function(){var e=u.CONSUME(l.RowRange),t=f(e.image.split(":"),2),n=t[0],r=t[1],i=u.ACTION((function(){return Object(a.rowAddressFromString)(u.sheetMapping,n,u.formulaAddress)})),c=u.ACTION((function(){return Object(a.rowAddressFromString)(u.sheetMapping,r,u.formulaAddress)}));if(void 0===i||void 0===c)return Object(s.buildCellErrorAst)(new o.CellError(o.ErrorType.REF));if(i.exceedsSheetSizeLimits(u.lexerConfig.maxRows)||c.exceedsSheetSizeLimits(u.lexerConfig.maxRows))return Object(s.buildErrorWithRawInputAst)(e.image,new o.CellError(o.ErrorType.NAME),e.leadingWhitespace);if(void 0===i.sheet&&void 0!==c.sheet)return u.parsingError(s.ParsingErrorType.ParserError,"Malformed range expression");var d=u.rangeSheetReferenceType(i.sheet,c.sheet);return void 0!==i.sheet&&void 0===c.sheet&&(c=c.withAbsoluteSheet(i.sheet)),Object(s.buildRowRangeAst)(i,c,d,e.leadingWhitespace)})),u.cellReference=u.RULE("cellReference",(function(){var e=u.CONSUME(l.CellReference),t=u.ACTION((function(){return Object(a.cellAddressFromString)(u.sheetMapping,e.image,u.formulaAddress)}));return void 0===t?Object(s.buildErrorWithRawInputAst)(e.image,new o.CellError(o.ErrorType.REF),e.leadingWhitespace):t.exceedsSheetSizeLimits(u.lexerConfig.maxColumns,u.lexerConfig.maxRows)?Object(s.buildErrorWithRawInputAst)(e.image,new o.CellError(o.ErrorType.NAME),e.leadingWhitespace):Object(s.buildCellReferenceAst)(t,e.leadingWhitespace)})),u.endOfRangeExpression=u.RULE("endOfRangeExpression",(function(e){return u.OR([{ALT:function(){return u.SUBRULE(u.endRangeReference,{ARGS:[e]})}},{ALT:function(){var t,n=u.SUBRULE(u.offsetProcedureExpression),r=u.ACTION((function(){return Object(a.cellAddressFromString)(u.sheetMapping,e.image,u.formulaAddress)}));if(void 0===r)return Object(s.buildCellErrorAst)(new o.CellError(o.ErrorType.REF));if(n.type===s.AstNodeType.CELL_REFERENCE){var i=n.reference,l=s.RangeSheetReferenceType.RELATIVE;return void 0!==r.sheet&&(l=s.RangeSheetReferenceType.START_ABSOLUTE,i=i.withAbsoluteSheet(r.sheet)),Object(s.buildCellRangeAst)(r,i,l,null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image)}return u.parsingError(s.ParsingErrorType.RangeOffsetNotAllowed,"Range offset not allowed here")}}])})),u.endOfRangeWithOffsetStartExpression=u.RULE("endOfRangeWithOffsetStartExpression",(function(e){return u.OR([{ALT:function(){return u.SUBRULE(u.endRangeWithOffsetStartReference,{ARGS:[e]})}},{ALT:function(){var t=u.SUBRULE(u.offsetProcedureExpression);if(t.type===s.AstNodeType.CELL_REFERENCE){var n=t.reference,r=s.RangeSheetReferenceType.RELATIVE;return void 0!==e.reference.sheet&&(r=s.RangeSheetReferenceType.START_ABSOLUTE,n=n.withAbsoluteSheet(e.reference.sheet)),Object(s.buildCellRangeAst)(e.reference,n,r,e.leadingWhitespace)}return u.parsingError(s.ParsingErrorType.RangeOffsetNotAllowed,"Range offset not allowed here")}}])})),u.endRangeReference=u.RULE("endRangeReference",(function(e){var t,n=u.CONSUME(l.CellReference),r=u.ACTION((function(){return Object(a.cellAddressFromString)(u.sheetMapping,e.image,u.formulaAddress)})),i=u.ACTION((function(){return Object(a.cellAddressFromString)(u.sheetMapping,n.image,u.formulaAddress)}));return void 0===r||void 0===i?u.ACTION((function(){return Object(s.buildErrorWithRawInputAst)("".concat(e.image,":").concat(n.image),new o.CellError(o.ErrorType.REF),e.leadingWhitespace)})):r.exceedsSheetSizeLimits(u.lexerConfig.maxColumns,u.lexerConfig.maxRows)||i.exceedsSheetSizeLimits(u.lexerConfig.maxColumns,u.lexerConfig.maxRows)?u.ACTION((function(){return Object(s.buildErrorWithRawInputAst)("".concat(e.image,":").concat(n.image),new o.CellError(o.ErrorType.NAME),e.leadingWhitespace)})):u.buildCellRange(r,i,null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image)})),u.endRangeWithOffsetStartReference=u.RULE("endRangeWithOffsetStartReference",(function(e){var t=u.CONSUME(l.CellReference),n=u.ACTION((function(){return Object(a.cellAddressFromString)(u.sheetMapping,t.image,u.formulaAddress)}));return void 0===n?u.ACTION((function(){return Object(s.buildCellErrorAst)(new o.CellError(o.ErrorType.REF))})):u.buildCellRange(e.reference,n,e.leadingWhitespace)})),u.arrayExpression=u.RULE("arrayExpression",(function(){return u.OR([{ALT:function(){var e=u.CONSUME(l.ArrayLParen),t=u.SUBRULE(u.insideArrayExpression),n=u.CONSUME(l.ArrayRParen);return Object(s.buildArrayAst)(t.args,e.leadingWhitespace,n.leadingWhitespace)}},{ALT:function(){return u.SUBRULE(u.parenthesisExpression)}}])})),u.insideArrayExpression=u.RULE("insideArrayExpression",(function(){var e=[[]];return e[e.length-1].push(u.SUBRULE(u.booleanExpression)),u.MANY((function(){u.OR([{ALT:function(){u.CONSUME(u.lexerConfig.ArrayColSeparator),e[e.length-1].push(u.SUBRULE2(u.booleanExpression))}},{ALT:function(){u.CONSUME(u.lexerConfig.ArrayRowSeparator),e.push([]),e[e.length-1].push(u.SUBRULE3(u.booleanExpression))}}])})),Object(s.buildArrayAst)(e)})),u.parenthesisExpression=u.RULE("parenthesisExpression",(function(){var e=u.CONSUME(l.LParen),t=u.SUBRULE(u.booleanExpression),n=u.CONSUME(l.RParen);return Object(s.buildParenthesisAst)(t,e.leadingWhitespace,n.leadingWhitespace)})),u.numericStringToNumber=function(e){var t=e.replace(u.lexerConfig.decimalSeparator,".");return Number(t)},u.lexerConfig=e,u.sheetMapping=i,u.formulaAddress=Object(o.simpleCellAddress)(0,0,0),u.performSelfAnalysis(),u}return m(n,[{key:"parseFromTokens",value:function(e,t){this.input=e;var n=this.formulaWithContext(t),r=[];return this.customParsingError&&r.push(this.customParsingError),(r=r.concat(this.errors.map((function(e){return{type:s.ParsingErrorType.ParserError,message:e.message}})))).length>0&&(n=Object(s.buildParsingErrorAst)()),{ast:n,errors:r}}},{key:"formulaWithContext",value:function(e){return this.formulaAddress=e,this.formula()}},{key:"reset",value:function(){y(T(n.prototype),"reset",this).call(this),this.customParsingError=void 0}},{key:"buildCellRange",value:function(e,t,n){if(void 0===e.sheet&&void 0!==t.sheet)return this.parsingError(s.ParsingErrorType.ParserError,"Malformed range expression");var r=this.rangeSheetReferenceType(e.sheet,t.sheet);return void 0!==e.sheet&&void 0===t.sheet&&(t=t.withAbsoluteSheet(e.sheet)),Object(s.buildCellRangeAst)(e,t,r,n)}},{key:"handleOffsetHeuristic",value:function(e){var t=e[0];if(t.type!==s.AstNodeType.CELL_REFERENCE)return this.parsingError(s.ParsingErrorType.StaticOffsetError,"First argument to OFFSET is not a reference");var n,r=e[1];if(r.type===s.AstNodeType.NUMBER&&Number.isInteger(r.value))n=r.value;else if(r.type===s.AstNodeType.PLUS_UNARY_OP&&r.value.type===s.AstNodeType.NUMBER&&Number.isInteger(r.value.value))n=r.value.value;else{if(r.type!==s.AstNodeType.MINUS_UNARY_OP||r.value.type!==s.AstNodeType.NUMBER||!Number.isInteger(r.value.value))return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Second argument to OFFSET is not a static number");n=-r.value.value}var a,l=e[2];if(l.type===s.AstNodeType.NUMBER&&Number.isInteger(l.value))a=l.value;else if(l.type===s.AstNodeType.PLUS_UNARY_OP&&l.value.type===s.AstNodeType.NUMBER&&Number.isInteger(l.value.value))a=l.value.value;else{if(l.type!==s.AstNodeType.MINUS_UNARY_OP||l.value.type!==s.AstNodeType.NUMBER||!Number.isInteger(l.value.value))return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Third argument to OFFSET is not a static number");a=-l.value.value}var c,f=e[3];if(void 0===f)c=1;else{if(f.type!==s.AstNodeType.NUMBER)return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Fourth argument to OFFSET is not a static number");if((c=f.value)<1)return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Fourth argument to OFFSET is too small number");if(!Number.isInteger(c))return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Fourth argument to OFFSET is not integer")}var d,h=e[4];if(void 0===h)d=1;else{if(h.type!==s.AstNodeType.NUMBER)return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Fifth argument to OFFSET is not a static number");if((d=h.value)<1)return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Fifth argument to OFFSET is too small number");if(!Number.isInteger(d))return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Fifth argument to OFFSET is not integer")}var p=new u.CellAddress(t.reference.col+a,t.reference.row+n,t.reference.type),m=p.col,y=p.row;if(t.reference.type!==u.CellReferenceType.CELL_REFERENCE_RELATIVE&&t.reference.type!==u.CellReferenceType.CELL_REFERENCE_ABSOLUTE_COL||(y+=this.formulaAddress.row),t.reference.type!==u.CellReferenceType.CELL_REFERENCE_RELATIVE&&t.reference.type!==u.CellReferenceType.CELL_REFERENCE_ABSOLUTE_ROW||(m+=this.formulaAddress.col),m<0||y<0)return Object(s.buildCellErrorAst)(new o.CellError(o.ErrorType.REF,i.ErrorMessage.OutOfSheet));if(1===d&&1===c)return Object(s.buildCellReferenceAst)(p);var v=new u.CellAddress(p.col+d-1,p.row+c-1,p.type);return Object(s.buildCellRangeAst)(p,v,s.RangeSheetReferenceType.RELATIVE)}},{key:"parsingError",value:function(e,t){return this.customParsingError=Object(s.parsingError)(e,t),Object(s.buildParsingErrorAst)()}},{key:"rangeSheetReferenceType",value:function(e,t){return void 0===e?s.RangeSheetReferenceType.RELATIVE:void 0===t?s.RangeSheetReferenceType.START_ABSOLUTE:s.RangeSheetReferenceType.BOTH_ABSOLUTE}}]),n}(r.EmbeddedActionsParser),b=function(){function e(t){h(this,e),this.lexerConfig=t,this.lexer=new r.Lexer(t.allTokens,{ensureOptimizations:!0})}return m(e,[{key:"tokenizeFormula",value:function(e){var t=this.lexer.tokenize(e),n=t.tokens;return n=this.trimTrailingWhitespaces(n),n=this.skipWhitespacesInsideRanges(n),n=this.skipWhitespacesBeforeArgSeparators(n),t.tokens=n,t}},{key:"skipWhitespacesInsideRanges",value:function(e){return this.filterTokensByNeighbors(e,(function(e,t,n){return(Object(r.tokenMatcher)(e,l.CellReference)||Object(r.tokenMatcher)(e,l.RangeSeparator))&&Object(r.tokenMatcher)(t,l.WhiteSpace)&&(Object(r.tokenMatcher)(n,l.CellReference)||Object(r.tokenMatcher)(n,l.RangeSeparator))}))}},{key:"skipWhitespacesBeforeArgSeparators",value:function(e){var t=this;return this.filterTokensByNeighbors(e,(function(e,n,o){return!Object(r.tokenMatcher)(e,t.lexerConfig.ArgSeparator)&&Object(r.tokenMatcher)(n,l.WhiteSpace)&&Object(r.tokenMatcher)(o,t.lexerConfig.ArgSeparator)}))}},{key:"filterTokensByNeighbors",value:function(e,t){if(e.length<3)return e;for(var n=0,r=[e[n++]];n<e.length-1;)t(e[n-1],e[n],e[n+1])||r.push(e[n]),++n;return r.push(e[n]),r}},{key:"trimTrailingWhitespaces",value:function(e){return e.length>0&&Object(r.tokenMatcher)(e[e.length-1],l.WhiteSpace)&&e.pop(),e}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"Unparser",(function(){return l})),n.d(t,"formatNumber",(function(){return c}));n(76),n(37),n(20),n(0),n(65),n(33),n(62);var r=n(22),o=n(232),i=n(99),a=n(101),s=n(359);function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var l=function(){function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.lexerConfig=n,this.sheetMappingFn=r,this.namedExpressions=o}var t,n,l;return t=e,(n=[{key:"unparse",value:function(e,t){return"="+this.unparseAst(e,t)}},{key:"unparseAst",value:function(e,t){var n,o,i=this;switch(e.type){case a.AstNodeType.EMPTY:return Object(a.imageWithWhitespace)("",e.leadingWhitespace);case a.AstNodeType.NUMBER:return Object(a.imageWithWhitespace)(c(e.value,this.config.decimalSeparator),e.leadingWhitespace);case a.AstNodeType.STRING:return Object(a.imageWithWhitespace)('"'+e.value+'"',e.leadingWhitespace);case a.AstNodeType.FUNCTION_CALL:var u=e.args.map((function(e){return void 0!==e?i.unparseAst(e,t):""})).join(this.config.functionArgSeparator),l=(this.config.translationPackage.isFunctionTranslated(e.procedureName)?this.config.translationPackage.getFunctionTranslation(e.procedureName):e.procedureName)+"("+u+Object(a.imageWithWhitespace)(")",e.internalWhitespace);return Object(a.imageWithWhitespace)(l,e.leadingWhitespace);case a.AstNodeType.NAMED_EXPRESSION:var f=null===(n=this.namedExpressions.nearestNamedExpression(e.expressionName,t.sheet))||void 0===n?void 0:n.displayName;return Object(a.imageWithWhitespace)(f||e.expressionName,e.leadingWhitespace);case a.AstNodeType.CELL_REFERENCE:var d;return d=void 0!==e.reference.sheet?this.unparseSheetName(e.reference.sheet)+"!":"",d+=null!==(o=e.reference.unparse(t))&&void 0!==o?o:this.config.translationPackage.getErrorTranslation(r.ErrorType.REF),Object(a.imageWithWhitespace)(d,e.leadingWhitespace);case a.AstNodeType.COLUMN_RANGE:case a.AstNodeType.ROW_RANGE:case a.AstNodeType.CELL_RANGE:return Object(a.imageWithWhitespace)(this.formatRange(e,t),e.leadingWhitespace);case a.AstNodeType.PLUS_UNARY_OP:var h=this.unparseAst(e.value,t);return Object(a.imageWithWhitespace)("+",e.leadingWhitespace)+h;case a.AstNodeType.MINUS_UNARY_OP:var p=this.unparseAst(e.value,t);return Object(a.imageWithWhitespace)("-",e.leadingWhitespace)+p;case a.AstNodeType.PERCENT_OP:return this.unparseAst(e.value,t)+Object(a.imageWithWhitespace)("%",e.leadingWhitespace);case a.AstNodeType.ERROR:var m=this.config.translationPackage.getErrorTranslation(e.error?e.error.type:r.ErrorType.ERROR);return Object(a.imageWithWhitespace)(m,e.leadingWhitespace);case a.AstNodeType.ERROR_WITH_RAW_INPUT:return Object(a.imageWithWhitespace)(e.rawInput,e.leadingWhitespace);case a.AstNodeType.PARENTHESIS:var y="("+this.unparseAst(e.expression,t)+Object(a.imageWithWhitespace)(")",e.internalWhitespace);return Object(a.imageWithWhitespace)(y,e.leadingWhitespace);case a.AstNodeType.ARRAY:var v="{"+e.args.map((function(e){return e.map((function(e){return i.unparseAst(e,t)})).join(i.config.arrayColumnSeparator)})).join(this.config.arrayRowSeparator)+Object(a.imageWithWhitespace)("}",e.internalWhitespace);return Object(a.imageWithWhitespace)(v,e.leadingWhitespace);default:var g=this.unparseAst(e.left,t),E=this.unparseAst(e.right,t);return g+Object(a.imageWithWhitespace)(s.binaryOpTokenMap[e.type],e.leadingWhitespace)+E}}},{key:"unparseSheetName",value:function(e){var t=Object(i.sheetIndexToString)(e,this.sheetMappingFn);if(void 0===t)throw new o.NoSheetWithIdError(e);return t}},{key:"formatRange",value:function(e,t){var n="",o="";void 0!==e.start.sheet&&e.sheetReferenceType!==a.RangeSheetReferenceType.RELATIVE&&(n=this.unparseSheetName(e.start.sheet)+"!"),void 0!==e.end.sheet&&e.sheetReferenceType===a.RangeSheetReferenceType.BOTH_ABSOLUTE&&(o=this.unparseSheetName(e.end.sheet)+"!");var i=e.start.unparse(t),s=e.end.unparse(t);return void 0===i||void 0===s?this.config.translationPackage.getErrorTranslation(r.ErrorType.REF):"".concat(n).concat(i,":").concat(o).concat(s)}}])&&u(t.prototype,n),l&&u(t,l),e}();function c(e,t){return e.toString().replace(".",t)}},function(e,t,n){"use strict";n.r(t),n.d(t,"ContentChanges",(function(){return u}));n(3),n(36),n(0),n(2),n(4),n(26),n(20),n(21),n(12),n(24),n(8),n(9),n(10);var r=n(22),o=n(80);function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.changes=new Map}var t,n,a;return t=e,a=[{key:"empty",value:function(){return new e}}],(n=[{key:"addAll",value:function(e){var t,n=i(e.changes.values());try{for(n.s();!(t=n.n()).done;){var r=t.value;this.add(r.address,r)}}catch(e){n.e(e)}finally{n.f()}return this}},{key:"addChange",value:function(e,t,n){this.addInterpreterValue(e,t,n)}},{key:"exportChanges",value:function(e){var t=[];return this.changes.forEach((function(n){var r=e.exportChange(n);Array.isArray(r)?t=t.concat(r):t.push(r)})),t}},{key:"getChanges",value:function(){return Array.from(this.changes.values())}},{key:"isEmpty",value:function(){return 0===this.changes.size}},{key:"add",value:function(e,t){var n=t.value;if(n instanceof o.SimpleRangeValue){var a,s=i(n.effectiveAddressesFromData(e));try{for(s.s();!(a=s.n()).done;){var u=a.value;this.changes.delete("".concat(u.sheet,",").concat(u.col,",").concat(u.row))}}catch(e){s.e(e)}finally{s.f()}}this.changes.set(Object(r.addressKey)(e),t)}},{key:"addInterpreterValue",value:function(e,t,n){this.add(t,{address:t,value:e,oldValue:n})}}])&&s(t.prototype,n),a&&s(t,a),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"Statistics",(function(){return i}));n(3),n(36),n(0),n(2),n(4);var r=n(270);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.stats=new Map([[r.StatType.CRITERION_FUNCTION_FULL_CACHE_USED,0],[r.StatType.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0]]),this.startTimes=new Map}var t,n,i;return t=e,(n=[{key:"incrementCriterionFunctionFullCacheUsed",value:function(){var e,t=(null!==(e=this.stats.get(r.StatType.CRITERION_FUNCTION_FULL_CACHE_USED))&&void 0!==e?e:0)+1;this.stats.set(r.StatType.CRITERION_FUNCTION_FULL_CACHE_USED,t)}},{key:"incrementCriterionFunctionPartialCacheUsed",value:function(){var e,t=(null!==(e=this.stats.get(r.StatType.CRITERION_FUNCTION_PARTIAL_CACHE_USED))&&void 0!==e?e:0)+1;this.stats.set(r.StatType.CRITERION_FUNCTION_PARTIAL_CACHE_USED,t)}},{key:"reset",value:function(){this.stats.clear(),this.startTimes.clear(),this.stats.set(r.StatType.CRITERION_FUNCTION_FULL_CACHE_USED,0),this.stats.set(r.StatType.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0)}},{key:"start",value:function(e){if(this.startTimes.get(e))throw Error("Statistics ".concat(e," already started"));this.startTimes.set(e,Date.now())}},{key:"end",value:function(e){var t,n=Date.now(),r=this.startTimes.get(e);if(!r)throw Error("Statistics ".concat(e," not started"));var o=null!==(t=this.stats.get(e))&&void 0!==t?t:0;o+=n-r,this.stats.set(e,o),this.startTimes.delete(e)}},{key:"measure",value:function(e,t){this.start(e);var n=t();return this.end(e),n}},{key:"snapshot",value:function(){return new Map(this.stats)}}])&&o(t.prototype,n),i&&o(t,i),e}()},function(e,t,n){"use strict";
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var r;n.r(t),n.d(t,"StatType",(function(){return r})),function(e){e.BUILD_ENGINE_TOTAL="BUILD_ENGINE_TOTAL",e.PARSER="PARSER",e.GRAPH_BUILD="GRAPH_BUILD",e.COLLECT_DEPENDENCIES="COLLECT_DEPENDENCIES",e.PROCESS_DEPENDENCIES="PROCESS_DEPENDENCIES",e.TOP_SORT="TOP_SORT",e.BUILD_COLUMN_INDEX="BUILD_COLUMN_INDEX",e.EVALUATION="EVALUATION",e.VLOOKUP="VLOOKUP",e.TRANSFORM_ASTS="TRANSFORM_ASTS",e.TRANSFORM_ASTS_POSTPONED="TRANSFORM_ASTS_POSTPONED",e.ADJUSTING_ADDRESS_MAPPING="ADJUSTING_ADDRESS_MAPPING",e.ADJUSTING_ARRAY_MAPPING="ADJUSTING_ARRAY_MAPPING",e.ADJUSTING_RANGES="ADJUSTING_RANGES",e.ADJUSTING_GRAPH="ADJUSTING_GRAPH",e.CRITERION_FUNCTION_FULL_CACHE_USED="CRITERION_FUNCTION_FULL_CACHE_USED",e.CRITERION_FUNCTION_PARTIAL_CACHE_USED="CRITERION_FUNCTION_PARTIAL_CACHE_USED"}(r||(r={}))},function(e,t,n){"use strict";n.r(t),n.d(t,"AddressMapping",(function(){return f}));n(83),n(3),n(36),n(0),n(2),n(4),n(139),n(12),n(24),n(21),n(8),n(9),n(10);var r=n(39),o=n(48),i=n(125);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=u(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function u(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var f=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.policy=t,this.mapping=new Map}var t,n,u;return t=e,(n=[{key:"getCell",value:function(e){var t=this.mapping.get(e.sheet);if(void 0===t)throw new r.NoSheetWithIdError(e.sheet);return t.getCell(e)}},{key:"fetchCell",value:function(e){var t=this.mapping.get(e.sheet);if(void 0===t)throw new r.NoSheetWithIdError(e.sheet);var n=t.getCell(e);if(!n)throw Error("Vertex for address missing in AddressMapping");return n}},{key:"strategyFor",value:function(e){var t=this.mapping.get(e);if(void 0===t)throw new r.NoSheetWithIdError(e);return t}},{key:"addSheet",value:function(e,t){if(this.mapping.has(e))throw Error("Sheet already added");this.mapping.set(e,t)}},{key:"autoAddSheet",value:function(e,t,n){var r=n.height,o=n.width,i=n.fill,a=this.policy.call(i);this.addSheet(e,new a(o,r))}},{key:"getCellValue",value:function(e){var t=this.getCell(e);return void 0===t?o.EmptyValue:t instanceof i.ArrayVertex?t.getArrayCellValue(e):t.getCellValue()}},{key:"getRawValue",value:function(e){var t=this.getCell(e);return t instanceof i.ValueCellVertex?t.getValues().rawValue:t instanceof i.ArrayVertex?t.getArrayCellRawValue(e):null}},{key:"setCell",value:function(e,t){var n=this.mapping.get(e.sheet);if(!n)throw Error("Sheet not initialized");n.setCell(e,t)}},{key:"moveCell",value:function(e,t){var n=this.mapping.get(e.sheet);if(!n)throw Error("Sheet not initialized.");if(e.sheet!==t.sheet)throw Error("Cannot move cells between sheets.");if(n.has(t))throw new Error("Cannot move cell. Destination already occupied.");var r=n.getCell(e);if(void 0===r)throw new Error("Cannot move cell. No cell with such address.");this.setCell(t,r),this.removeCell(e)}},{key:"removeCell",value:function(e){var t=this.mapping.get(e.sheet);if(!t)throw Error("Sheet not initialized");t.removeCell(e)}},{key:"has",value:function(e){var t=this.mapping.get(e.sheet);return void 0!==t&&t.has(e)}},{key:"getHeight",value:function(e){var t=this.mapping.get(e);if(void 0===t)throw new r.NoSheetWithIdError(e);return t.getHeight()}},{key:"getWidth",value:function(e){var t=this.mapping.get(e);if(!t)throw new r.NoSheetWithIdError(e);return t.getWidth()}},{key:"addRows",value:function(e,t,n){var o=this.mapping.get(e);if(void 0===o)throw new r.NoSheetWithIdError(e);o.addRows(t,n)}},{key:"removeRows",value:function(e){var t=this.mapping.get(e.sheet);if(void 0===t)throw new r.NoSheetWithIdError(e.sheet);t.removeRows(e)}},{key:"removeSheet",value:function(e){this.mapping.delete(e)}},{key:"addColumns",value:function(e,t,n){var o=this.mapping.get(e);if(void 0===o)throw new r.NoSheetWithIdError(e);o.addColumns(t,n)}},{key:"removeColumns",value:function(e){var t=this.mapping.get(e.sheet);if(void 0===t)throw new r.NoSheetWithIdError(e.sheet);t.removeColumns(e)}},{key:"verticesFromRowsSpan",value:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.mapping.get(t.sheet).verticesFromRowsSpan(t),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"verticesFromColumnsSpan",value:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.mapping.get(t.sheet).verticesFromColumnsSpan(t),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"entriesFromRowsSpan",value:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.mapping.get(t.sheet).entriesFromRowsSpan(t),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"entriesFromColumnsSpan",value:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.mapping.get(t.sheet).entriesFromColumnsSpan(t),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"entries",value:regeneratorRuntime.mark((function e(){var t,n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=s(this.mapping.entries()),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=8;break}return r=a(n.value,2),o=r[0],i=r[1],e.delegateYield(i.getEntries(o),"t0",6);case 6:e.next=3;break;case 8:e.next=13;break;case 10:e.prev=10,e.t1=e.catch(1),t.e(e.t1);case 13:return e.prev=13,t.f(),e.finish(13);case 16:case"end":return e.stop()}}),e,this,[[1,10,13,16]])}))},{key:"sheetEntries",value:regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===(n=this.mapping.get(t))){e.next=5;break}return e.delegateYield(n.getEntries(t),"t0",3);case 3:e.next=6;break;case 5:throw new r.NoSheetWithIdError(t);case 6:case"end":return e.stop()}}),e,this)}))}])&&c(t.prototype,n),u&&c(t,u),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"ArrayMapping",(function(){return l}));n(83),n(3),n(36),n(0),n(2),n(4),n(26),n(12),n(24),n(21),n(8),n(9),n(10);var r=n(22);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.arrayMapping=new Map}var t,n,a;return t=e,(n=[{key:"getArray",value:function(e){var t=this.getArrayByCorner(e.start);if(null==t?void 0:t.getRange().sameAs(e))return t}},{key:"getArrayByCorner",value:function(e){return this.arrayMapping.get(Object(r.addressKey)(e))}},{key:"setArray",value:function(e,t){this.arrayMapping.set(Object(r.addressKey)(e.start),t)}},{key:"removeArray",value:function(e){"string"==typeof e?this.arrayMapping.delete(e):this.arrayMapping.delete(Object(r.addressKey)(e.start))}},{key:"count",value:function(){return this.arrayMapping.size}},{key:"arraysInRows",value:regeneratorRuntime.mark((function e(t){var n,r,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i(this.arrayMapping.entries()),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=10;break}if(a=o(r.value,2),s=a[0],!(u=a[1]).spansThroughSheetRows(t.sheet,t.rowStart,t.rowEnd)){e.next=8;break}return e.next=8,[s,u];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[1,12,15,18]])}))},{key:"arraysInCols",value:regeneratorRuntime.mark((function e(t){var n,r,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i(this.arrayMapping.entries()),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=10;break}if(a=o(r.value,2),s=a[0],!(u=a[1]).spansThroughSheetColumn(t.sheet,t.columnStart,t.columnEnd)){e.next=8;break}return e.next=8,[s,u];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[1,12,15,18]])}))},{key:"isFormulaArrayInRow",value:function(e,t){var n,r=i(this.arrayMapping.values());try{for(r.s();!(n=r.n()).done;)if(n.value.spansThroughSheetRows(e,t))return!0}catch(e){r.e(e)}finally{r.f()}return!1}},{key:"isFormulaArrayInAllRows",value:function(e){var t,n=!0,r=i(e.rows());try{for(r.s();!(t=r.n()).done;){var o=t.value;this.isFormulaArrayInRow(e.sheet,o)||(n=!1)}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"isFormulaArrayInColumn",value:function(e,t){var n,r=i(this.arrayMapping.values());try{for(r.s();!(n=r.n()).done;)if(n.value.spansThroughSheetColumn(e,t))return!0}catch(e){r.e(e)}finally{r.f()}return!1}},{key:"isFormulaArrayInAllColumns",value:function(e){var t,n=!0,r=i(e.columns());try{for(r.s();!(t=r.n()).done;){var o=t.value;this.isFormulaArrayInColumn(e.sheet,o)||(n=!1)}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"isFormulaArrayInRange",value:function(e){var t,n=i(this.arrayMapping.values());try{for(n.s();!(t=n.n()).done;)if(t.value.getRange().doesOverlap(e))return!0}catch(e){n.e(e)}finally{n.f()}return!1}},{key:"isFormulaArrayAtAddress",value:function(e){var t,n=i(this.arrayMapping.values());try{for(n.s();!(t=n.n()).done;)if(t.value.getRange().addressInRange(e))return!0}catch(e){n.e(e)}finally{n.f()}return!1}},{key:"moveArrayVerticesAfterRowByRows",value:function(e,t,n){this.updateArrayVerticesInSheet(e,(function(e,r){var o=r.getRange();return t<=o.start.row?[o.shifted(0,n),r]:void 0}))}},{key:"moveArrayVerticesAfterColumnByColumns",value:function(e,t,n){this.updateArrayVerticesInSheet(e,(function(e,r){var o=r.getRange();return t<=o.start.col?[o.shifted(n,0),r]:void 0}))}},{key:"updateArrayVerticesInSheet",value:function(e,t){var n,r=this,a=Array(),s=i(this.arrayMapping.entries());try{for(s.s();!(n=s.n()).done;){var u=o(n.value,2),l=u[0],c=u[1];if(c.sheet===e){var f=t(l,c);void 0!==f&&(this.removeArray(l),a.push(f))}}}catch(e){s.e(e)}finally{s.f()}a.forEach((function(e){var t=o(e,2),n=t[0],i=t[1];r.setArray(n,i)}))}}])&&u(t.prototype,n),a&&u(t,a),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"RangeVertex",(function(){return o}));n(3),n(36),n(0),n(2),n(4),n(58),n(26);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.range=t,this.functionCache=new Map,this.criterionFunctionCache=new Map,this.dependentCacheRanges=new Set,this.bruteForce=!1}var t,n,o;return t=e,(n=[{key:"start",get:function(){return this.range.start}},{key:"end",get:function(){return this.range.end}},{key:"sheet",get:function(){return this.range.start.sheet}},{key:"getFunctionValue",value:function(e){return this.functionCache.get(e)}},{key:"setFunctionValue",value:function(e,t){this.functionCache.set(e,t)}},{key:"getCriterionFunctionValue",value:function(e,t){var n;return null===(n=this.getCriterionFunctionValues(e).get(t))||void 0===n?void 0:n[0]}},{key:"getCriterionFunctionValues",value:function(e){var t;return null!==(t=this.criterionFunctionCache.get(e))&&void 0!==t?t:new Map}},{key:"setCriterionFunctionValues",value:function(e,t){this.criterionFunctionCache.set(e,t)}},{key:"addDependentCacheRange",value:function(e){e!==this&&this.dependentCacheRanges.add(e)}},{key:"clearCache",value:function(){this.functionCache.clear(),this.criterionFunctionCache.clear(),this.dependentCacheRanges.forEach((function(e){return e.criterionFunctionCache.clear()})),this.dependentCacheRanges.clear()}},{key:"getStart",value:function(){return this.start}},{key:"getEnd",value:function(){return this.end}}])&&r(t.prototype,n),o&&r(t,o),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"Graph",(function(){return s}));var r;n(3),n(0),n(58),n(2),n(4),n(36),n(26),n(21),n(140),n(12),n(24),n(8),n(9),n(10);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e[e.ON_STACK=0]="ON_STACK",e[e.PROCESSED=1]="PROCESSED",e[e.POPPED=2]="POPPED"}(r||(r={}));var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.dependencyQuery=t,this.nodes=new Set,this.specialNodes=new Set,this.specialNodesStructuralChanges=new Set,this.specialNodesRecentlyChanged=new Set,this.infiniteRanges=new Set,this.edges=new Map}var t,n,i;
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/return t=e,(n=[{key:"addNode",value:function(e){this.nodes.add(e),this.edges.has(e)||this.edges.set(e,new Set)}},{key:"addEdge",value:function(e,t){if(!this.nodes.has(e))throw new Error("Unknown node ".concat(e));if(!this.nodes.has(t))throw new Error("Unknown node ".concat(t));this.edges.get(e).add(t)}},{key:"removeEdge",value:function(e,t){if(!this.existsEdge(e,t))throw new Error("Edge does not exist");this.edges.get(e).delete(t)}},{key:"softRemoveEdge",value:function(e,t){var n;null===(n=this.edges.get(e))||void 0===n||n.delete(t)}},{key:"removeIncomingEdges",value:function(e){this.edges.forEach((function(t){t.delete(e)}))}},{key:"adjacentNodes",value:function(e){return this.edges.get(e)}},{key:"adjacentNodesCount",value:function(e){return this.adjacentNodes(e).size}},{key:"hasNode",value:function(e){return this.nodes.has(e)}},{key:"nodesCount",value:function(){return this.nodes.size}},{key:"edgesCount",value:function(){var e=0;return this.edges.forEach((function(t){return e+=t.size})),e}},{key:"removeNode",value:function(e){var t,n=o(this.adjacentNodes(e).values());try{for(n.s();!(t=n.n()).done;){var r=t.value;this.markNodeAsSpecialRecentlyChanged(r)}}catch(e){n.e(e)}finally{n.f()}return this.edges.delete(e),this.nodes.delete(e),this.specialNodes.delete(e),this.specialNodesRecentlyChanged.delete(e),this.specialNodesStructuralChanges.delete(e),this.infiniteRanges.delete(e),this.removeDependencies(e)}},{key:"markNodeAsSpecial",value:function(e){this.specialNodes.add(e)}},{key:"markNodeAsSpecialRecentlyChanged",value:function(e){this.nodes.has(e)&&this.specialNodesRecentlyChanged.add(e)}},{key:"markNodeAsChangingWithStructure",value:function(e){this.specialNodesStructuralChanges.add(e)}},{key:"clearSpecialNodesRecentlyChanged",value:function(){this.specialNodesRecentlyChanged.clear()}},{key:"markNodeAsInfiniteRange",value:function(e){this.infiniteRanges.add(e)}},{key:"existsEdge",value:function(e,t){var n,r;return null!==(r=null===(n=this.edges.get(e))||void 0===n?void 0:n.has(t))&&void 0!==r&&r}},{key:"topSortWithScc",value:function(){return this.getTopSortedWithSccSubgraphFrom(Array.from(this.nodes),(function(){return!0}),(function(){}))}},{key:"getTopSortedWithSccSubgraphFrom",value:function(e,t,n){var o=this,i=new Map,a=new Map,s=new Map,u=new Set,l=new Map,c=[],f=0,d=new Set;e.reverse(),e.forEach((function(e){if(void 0===l.get(e)){var t=[e],n=[];l.set(e,r.ON_STACK);for(var h=function(){var e=t[t.length-1];switch(l.get(e)){case r.ON_STACK:i.set(e,f),a.set(e,f),n.push(e),f++,o.adjacentNodes(e).forEach((function(n){void 0===i.get(n)&&(t.push(n),s.set(n,e),l.set(n,r.ON_STACK))})),l.set(e,r.PROCESSED);break;case r.PROCESSED:var h;if(h=i.get(e),o.adjacentNodes(e).forEach((function(t){u.has(t)||(h=s.get(t)===e?Math.min(h,a.get(t)):Math.min(h,i.get(t)))})),a.set(e,h),h===i.get(e)){var p=[];do{p.push(n[n.length-1]),n.pop()}while(p[p.length-1]!==e);p.forEach((function(e){u.add(e)})),c.push.apply(c,p),p.length>1&&p.forEach((function(e){d.add(e)}))}t.pop(),l.set(e,r.POPPED);break;case r.POPPED:t.pop()}};t.length>0;)h()}}));var h=new Set(e),p=[],m=[];return c.reverse(),c.forEach((function(e){d.has(e)||o.adjacentNodes(e).has(e)?(m.push(e),n(e),o.adjacentNodes(e).forEach((function(e){return h.add(e)}))):(p.push(e),h.has(e)&&t(e)&&o.adjacentNodes(e).forEach((function(e){return h.add(e)})))})),{sorted:p,cycled:m}}},{key:"getDependencies",value:function(e){var t=[];return this.edges.forEach((function(n,r){n.has(e)&&t.push(r)})),t}},{key:"removeDependencies",value:function(e){var t,n=this.dependencyQuery(e),r=o(n);try{for(r.s();!(t=r.n()).done;){var i=t.value;this.softRemoveEdge(i,e)}}catch(e){r.e(e)}finally{r.f()}return n}}])&&a(t.prototype,n),i&&a(t,i),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"RangeMapping",(function(){return c}));n(83),n(3),n(36),n(0),n(2),n(4),n(77),n(10),n(8),n(9),n(255),n(51),n(26),n(37),n(40),n(20),n(12),n(24),n(21);var r=n(84),o=n(22);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function s(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.rangeMapping=new Map}var t,n,s;return t=e,(n=[{key:"getMappingSize",value:function(e){var t,n;return null!==(n=null===(t=this.rangeMapping.get(e))||void 0===t?void 0:t.size)&&void 0!==n?n:0}},{key:"setRange",value:function(e){var t=this.rangeMapping.get(e.getStart().sheet);void 0===t&&(t=new Map,this.rangeMapping.set(e.getStart().sheet,t));var n=f(e.getStart(),e.getEnd());t.set(n,e)}},{key:"removeRange",value:function(e){var t=e.getStart().sheet,n=this.rangeMapping.get(t);if(void 0!==n){var r=f(e.getStart(),e.getEnd());n.delete(r),0===n.size&&this.rangeMapping.delete(t)}}},{key:"getRange",value:function(e,t){var n=this.rangeMapping.get(e.sheet),r=f(e,t);return null==n?void 0:n.get(r)}},{key:"fetchRange",value:function(e,t){var n=this.getRange(e,t);if(!n)throw Error("Range does not exist");return n}},{key:"truncateRanges",value:function(e,t){var n,r=Array(),o=Array(),s=Array(),u=e.sheet,l=a(this.entriesFromSheet(e.sheet));try{for(l.s();!(n=l.n()).done;){var c=i(n.value,2),f=c[0],p=c[1],m=p.range;e.start<=t(p.range.end)&&(m.removeSpan(e),m.shouldBeRemoved()?(this.removeByKey(u,f),r.push(p)):o.push([f,p]),s.push(p))}}catch(e){l.e(e)}finally{l.f()}var y=[];o.sort((function(e,n){return h(e[1],n[1],t)}));for(var v=0,g=o;v<g.length;v++){var E=i(g[v],2),T=E[0],C=E[1],b=d(C.range);if(b!==T){var w=this.getByKey(u,b);this.removeByKey(u,T),void 0!==w&&C!=w?y.push([w,C]):this.setRange(C)}}return{verticesToRemove:r,verticesToMerge:y,verticesWithChangedSize:s}}},{key:"moveAllRangesInSheetAfterRowByRows",value:function(e,t,n){return this.updateVerticesFromSheet(e,(function(e,r){return t<=r.start.row?(r.range.shiftByRows(n),{changedSize:!1,vertex:r}):t>r.start.row&&t<=r.end.row?(r.range.expandByRows(n),{changedSize:!0,vertex:r}):void 0}))}},{key:"moveAllRangesInSheetAfterColumnByColumns",value:function(e,t,n){return this.updateVerticesFromSheet(e,(function(e,r){return t<=r.start.col?(r.range.shiftByColumns(n),{changedSize:!1,vertex:r}):t>r.start.col&&t<=r.end.col?(r.range.expandByColumns(n),{changedSize:!0,vertex:r}):void 0}))}},{key:"moveRangesInsideSourceRange",value:function(e,t,n,r){this.updateVerticesFromSheet(e.sheet,(function(o,i){return e.containsRange(i.range)?(i.range.shiftByColumns(t),i.range.shiftByRows(n),i.range.moveToSheet(r),{changedSize:!1,vertex:i}):void 0}))}},{key:"removeRangesInSheet",value:function(e){if(this.rangeMapping.has(e)){var t=this.rangeMapping.get(e).values();return this.rangeMapping.delete(e),t}return[][Symbol.iterator]()}},{key:"rangesInSheet",value:regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.rangeMapping.get(t)){e.next=3;break}return e.abrupt("return");case 3:return e.delegateYield(n.values(),"t0",4);case 4:case"end":return e.stop()}}),e,this)}))},{key:"rangeVerticesContainedInRange",value:regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=a(this.rangesInSheet(t.sheet)),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=10;break}if(o=r.value,!t.containsRange(o.range)){e.next=8;break}return e.next=8,o;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[1,12,15,18]])}))},{key:"findSmallerRange",value:function(e){if(e.height()>1&&Number.isFinite(e.height())){var t=Object(o.simpleCellAddress)(e.end.sheet,e.end.col,e.end.row-1),n=this.getRange(e.start,t);if(void 0!==n)return{smallerRangeVertex:n,restRange:new r.AbsoluteCellRange(Object(o.simpleCellAddress)(e.start.sheet,e.start.col,e.end.row),e.end)}}return{restRange:e}}},{key:"entriesFromSheet",value:regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.rangeMapping.get(t)){e.next=3;break}return e.abrupt("return");case 3:return e.delegateYield(n.entries(),"t0",4);case 4:case"end":return e.stop()}}),e,this)}))},{key:"removeByKey",value:function(e,t){this.rangeMapping.get(e).delete(t)}},{key:"getByKey",value:function(e,t){var n;return null===(n=this.rangeMapping.get(e))||void 0===n?void 0:n.get(t)}},{key:"updateVerticesFromSheet",value:function(e,t){var n,r=this,o=Array(),s=a(this.entriesFromSheet(e));try{for(s.s();!(n=s.n()).done;){var u=i(n.value,2),l=u[0],c=t(l,u[1]);void 0!==c&&(this.removeByKey(e,l),o.push(c))}}catch(e){s.e(e)}finally{s.f()}return o.forEach((function(e){r.setRange(e.vertex)})),{verticesWithChangedSize:o.filter((function(e){return e.changedSize})).map((function(e){return e.vertex}))}}}])&&l(t.prototype,n),s&&l(t,s),e}();function f(e,t){return"".concat(e.col,",").concat(e.row,",").concat(t.col,",").concat(t.row)}function d(e){return f(e.start,e.end)}var h=function(e,t,n){var r=n(e.range.start),o=n(e.range.start);return r===o?n(e.range.end)-n(t.range.end):r-o}},function(e,t,n){"use strict";n.r(t),n.d(t,"SheetMapping",(function(){return d}));n(83),n(3),n(36),n(0),n(2),n(4),n(20),n(37),n(21),n(12),n(24),n(8),n(9),n(10);var r=n(39),o=n(218);function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function c(e){return e.toLowerCase()}var f=function(){function e(t,n){s(this,e),this.id=t,this.displayName=n}return l(e,[{key:"canonicalName",get:function(){return c(this.displayName)}}]),e}(),d=function(){function e(t){var n=this;s(this,e),this.languages=t,this.mappingFromCanonicalName=new Map,this.mappingFromId=new Map,this.lastSheetId=-1,this.fetch=function(e){var t=n.mappingFromCanonicalName.get(c(e));if(void 0===t)throw new r.NoSheetWithNameError(e);return t.id},this.get=function(e){var t;return null===(t=n.mappingFromCanonicalName.get(c(e)))||void 0===t?void 0:t.id},this.fetchDisplayName=function(e){return n.fetchSheetById(e).displayName},this.sheetNamePrefix=t.getUITranslation(o.UIElement.NEW_SHEET_PREFIX)}return l(e,[{key:"addSheet",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"".concat(this.sheetNamePrefix).concat(this.lastSheetId+2),t=c(e);if(this.mappingFromCanonicalName.has(t))throw new r.SheetNameAlreadyTakenError(e);this.lastSheetId++;var n=new f(this.lastSheetId,e);return this.store(n),n.id}},{key:"removeSheet",value:function(e){var t=this.fetchSheetById(e);e==this.lastSheetId&&--this.lastSheetId,this.mappingFromCanonicalName.delete(t.canonicalName),this.mappingFromId.delete(t.id)}},{key:"getDisplayName",value:function(e){var t;return null===(t=this.mappingFromId.get(e))||void 0===t?void 0:t.displayName}},{key:"displayNames",value:regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=i(this.mappingFromCanonicalName.values()),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=n.value,e.next=7,r.displayName;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"numberOfSheets",value:function(){return this.mappingFromCanonicalName.size}},{key:"hasSheetWithId",value:function(e){return this.mappingFromId.has(e)}},{key:"hasSheetWithName",value:function(e){return this.mappingFromCanonicalName.has(c(e))}},{key:"renameSheet",value:function(e,t){var n=this.fetchSheetById(e),o=n.displayName;if(o!==t){var i=this.mappingFromCanonicalName.get(c(t));if(void 0!==i&&i.id!==n.id)throw new r.SheetNameAlreadyTakenError(t);var a=n.canonicalName;return this.mappingFromCanonicalName.delete(a),n.displayName=t,this.store(n),o}}},{key:"sheetNames",value:function(){return Array.from(this.mappingFromId.values()).map((function(e){return e.displayName}))}},{key:"store",value:function(e){this.mappingFromId.set(e.id,e),this.mappingFromCanonicalName.set(e.canonicalName,e)}},{key:"fetchSheetById",value:function(e){var t=this.mappingFromId.get(e);if(void 0===t)throw new r.NoSheetWithIdError(e);return t}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"TranslationPackage",(function(){return l})),n.d(t,"buildTranslationPackage",(function(){return c}));n(88),n(100),n(52),n(278),n(3),n(0),n(58),n(2),n(4),n(240),n(12),n(24),n(21),n(8),n(9),n(10);var r=n(22),o=n(39),i=n(218);function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var l=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.functions=t,this.errors=n,this.ui=r,this._protectedTranslations={VERSION:"VERSION"},this.checkUI(),this.checkErrors(),this.checkFunctionTranslations(this.functions),Object.assign(this.functions,this._protectedTranslations)}var t,n,s;return t=e,(n=[{key:"extendFunctions",value:function(e){this.checkFunctionTranslations(e),Object.assign(this.functions,e)}},{key:"buildFunctionMapping",value:function(){var e=this;return Object.keys(this.functions).reduce((function(t,n){return t[e.functions[n]]=n,t}),{})}},{key:"buildErrorMapping",value:function(){var e=this;return Object.keys(this.errors).reduce((function(t,n){return t[e.errors[n]]=n,t}),{})}},{key:"isFunctionTranslated",value:function(e){return void 0!==this.functions[e]}},{key:"getFunctionTranslations",value:function(e){var t,n=[],r=a(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;this.isFunctionTranslated(o)&&n.push(this.functions[o])}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"getFunctionTranslation",value:function(e){var t=this.functions[e];if(void 0===t)throw new o.MissingTranslationError("functions.".concat(e));return t}},{key:"getMaybeFunctionTranslation",value:function(e){return this.functions[e]}},{key:"getErrorTranslation",value:function(e){if(e===r.ErrorType.LIC)return"#".concat(r.ErrorType.LIC,"!");var t=this.errors[e];if(void 0===t)throw new o.MissingTranslationError("errors.".concat(e));return t}},{key:"getUITranslation",value:function(e){var t=this.ui[e];if(void 0===t)throw new o.MissingTranslationError("ui.".concat(e));return t}},{key:"checkUI",value:function(){for(var e=0,t=Object.values(i.UIElement);e<t.length;e++){var n=t[e];if(!(n in this.ui))throw new o.MissingTranslationError("ui.".concat(n))}}},{key:"checkErrors",value:function(){for(var e=0,t=Object.values(r.ErrorType);e<t.length;e++){var n=t[e];if(!(n in this.errors)&&n!==r.ErrorType.LIC)throw new o.MissingTranslationError("errors.".concat(n))}}},{key:"checkFunctionTranslations",value:function(e){var t,n=new Set(Object.getOwnPropertyNames(e)),r=a(Object.getOwnPropertyNames(this._protectedTranslations));try{for(r.s();!(t=r.n()).done;){var i=t.value;if(n.has(i))throw new o.ProtectedFunctionTranslationError(i)}}catch(e){r.e(e)}finally{r.f()}}}])&&u(t.prototype,n),s&&u(t,s),e}();function c(e){return new l(Object.assign({},e.functions),Object.assign({},e.errors),Object.assign({},e.ui))}},function(e,t,n){var r=n(29),o=n(364).values;r({target:"Object",stat:!0},{values:function(e){return o(e)}})},function(e,t,n){"use strict";n.r(t),n.d(t,"SparseStrategy",(function(){return l}));n(83),n(3),n(36),n(0),n(2),n(4),n(26),n(12),n(24),n(21),n(8),n(9),n(10);var r=n(22);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var l=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.width=t,this.height=n,this.mapping=new Map}var t,n,a;return t=e,(n=[{key:"getCell",value:function(e){var t;return null===(t=this.mapping.get(e.col))||void 0===t?void 0:t.get(e.row)}},{key:"setCell",value:function(e,t){this.width=Math.max(this.width,e.col+1),this.height=Math.max(this.height,e.row+1);var n=this.mapping.get(e.col);n||(n=new Map,this.mapping.set(e.col,n)),n.set(e.row,t)}},{key:"has",value:function(e){var t;return!!(null===(t=this.mapping.get(e.col))||void 0===t?void 0:t.get(e.row))}},{key:"getHeight",value:function(){return this.height}},{key:"getWidth",value:function(){return this.width}},{key:"removeCell",value:function(e){var t;null===(t=this.mapping.get(e.col))||void 0===t||t.delete(e.row)}},{key:"addRows",value:function(e,t){this.mapping.forEach((function(n){var r=new Map;n.forEach((function(o,i){i>=e&&(r.set(i+t,o),n.delete(i))})),r.forEach((function(e,t){n.set(t,e)}))})),this.height+=t}},{key:"addColumns",value:function(e,t){var n=this,r=new Map;this.mapping.forEach((function(o,i){i>=e&&(r.set(i+t,o),n.mapping.delete(i))})),r.forEach((function(e,t){n.mapping.set(t,e)})),this.width+=t}},{key:"removeRows",value:function(e){this.mapping.forEach((function(t){var n=new Map;t.forEach((function(r,o){o>=e.rowStart&&(t.delete(o),o>e.rowEnd&&n.set(o-e.numberOfRows,r))})),n.forEach((function(e,n){t.set(n,e)}))}));var t=Math.min(this.height-1,e.rowEnd),n=Math.max(0,t-e.rowStart+1);this.height=Math.max(0,this.height-n)}},{key:"removeColumns",value:function(e){var t=this,n=new Map;this.mapping.forEach((function(r,o){o>=e.columnStart&&(t.mapping.delete(o),o>e.columnEnd&&n.set(o-e.numberOfColumns,r))})),n.forEach((function(e,n){t.mapping.set(n,e)}));var r=Math.min(this.width-1,e.columnEnd),o=Math.max(0,r-e.columnStart+1);this.width=Math.max(0,this.width-o)}},{key:"getEntries",value:regeneratorRuntime.mark((function e(t){var n,a,s,u,l,c,f,d,h,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i(this.mapping),e.prev=1,n.s();case 3:if((a=n.n()).done){e.next=24;break}s=o(a.value,2),u=s[0],l=s[1],c=i(l),e.prev=6,c.s();case 8:if((f=c.n()).done){e.next=14;break}return d=o(f.value,2),h=d[0],p=d[1],e.next=12,[Object(r.simpleCellAddress)(t,u,h),p];case 12:e.next=8;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(6),c.e(e.t0);case 19:return e.prev=19,c.f(),e.finish(19);case 22:e.next=3;break;case 24:e.next=29;break;case 26:e.prev=26,e.t1=e.catch(1),n.e(e.t1);case 29:return e.prev=29,n.f(),e.finish(29);case 32:case"end":return e.stop()}}),e,this,[[1,26,29,32],[6,16,19,22]])}))},{key:"verticesFromColumn",value:regeneratorRuntime.mark((function e(t){var n,r,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==(n=this.mapping.get(t))){e.next=3;break}return e.abrupt("return");case 3:r=i(n),e.prev=4,r.s();case 6:if((a=r.n()).done){e.next=12;break}return(s=o(a.value,2))[0],u=s[1],e.next=10,u;case 10:e.next=6;break;case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),r.e(e.t0);case 17:return e.prev=17,r.f(),e.finish(17);case 20:case"end":return e.stop()}}),e,this,[[4,14,17,20]])}))},{key:"verticesFromRow",value:regeneratorRuntime.mark((function e(t){var n,r,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i(this.mapping.values()),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=11;break}if(o=r.value,void 0===(a=o.get(t))){e.next=9;break}return e.next=9,a;case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),n.e(e.t0);case 16:return e.prev=16,n.f(),e.finish(16);case 19:case"end":return e.stop()}}),e,this,[[1,13,16,19]])}))},{key:"verticesFromColumnsSpan",value:regeneratorRuntime.mark((function e(t){var n,r,a,s,u,l,c,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i(t.columns()),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=27;break}if(a=r.value,void 0!==(s=this.mapping.get(a))){e.next=8;break}return e.abrupt("continue",25);case 8:u=i(s),e.prev=9,u.s();case 11:if((l=u.n()).done){e.next=17;break}return(c=o(l.value,2))[0],f=c[1],e.next=15,f;case 15:e.next=11;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(9),u.e(e.t0);case 22:return e.prev=22,u.f(),e.finish(22);case 25:e.next=3;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(1),n.e(e.t1);case 32:return e.prev=32,n.f(),e.finish(32);case 35:case"end":return e.stop()}}),e,this,[[1,29,32,35],[9,19,22,25]])}))},{key:"verticesFromRowsSpan",value:regeneratorRuntime.mark((function e(t){var n,r,o,a,s,u,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i(this.mapping.values()),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=26;break}o=r.value,a=i(t.rows()),e.prev=6,a.s();case 8:if((s=a.n()).done){e.next=16;break}if(u=s.value,void 0===(l=o.get(u))){e.next=14;break}return e.next=14,l;case 14:e.next=8;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(6),a.e(e.t0);case 21:return e.prev=21,a.f(),e.finish(21);case 24:e.next=3;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(1),n.e(e.t1);case 31:return e.prev=31,n.f(),e.finish(31);case 34:case"end":return e.stop()}}),e,this,[[1,28,31,34],[6,18,21,24]])}))},{key:"entriesFromRowsSpan",value:regeneratorRuntime.mark((function e(t){var n,a,s,u,l,c,f,d,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i(this.mapping.entries()),e.prev=1,n.s();case 3:if((a=n.n()).done){e.next=26;break}s=o(a.value,2),u=s[0],l=s[1],c=i(t.rows()),e.prev=6,c.s();case 8:if((f=c.n()).done){e.next=16;break}if(d=f.value,void 0===(h=l.get(d))){e.next=14;break}return e.next=14,[Object(r.simpleCellAddress)(t.sheet,u,d),h];case 14:e.next=8;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(6),c.e(e.t0);case 21:return e.prev=21,c.f(),e.finish(21);case 24:e.next=3;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(1),n.e(e.t1);case 31:return e.prev=31,n.f(),e.finish(31);case 34:case"end":return e.stop()}}),e,this,[[1,28,31,34],[6,18,21,24]])}))},{key:"entriesFromColumnsSpan",value:regeneratorRuntime.mark((function e(t){var n,a,s,u,l,c,f,d,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i(t.columns()),e.prev=1,n.s();case 3:if((a=n.n()).done){e.next=26;break}if(s=a.value,void 0===(u=this.mapping.get(s))){e.next=24;break}l=i(u.entries()),e.prev=8,l.s();case 10:if((c=l.n()).done){e.next=16;break}return f=o(c.value,2),d=f[0],h=f[1],e.next=14,[Object(r.simpleCellAddress)(t.sheet,s,d),h];case 14:e.next=10;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(8),l.e(e.t0);case 21:return e.prev=21,l.f(),e.finish(21);case 24:e.next=3;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(1),n.e(e.t1);case 31:return e.prev=31,n.f(),e.finish(31);case 34:case"end":return e.stop()}}),e,this,[[1,28,31,34],[8,18,21,24]])}))},{key:"vertices",value:regeneratorRuntime.mark((function e(){var t,n,r,a,s,u,l,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=i(this.mapping),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=25;break}(r=o(n.value,2))[0],a=r[1],s=i(a),e.prev=6,s.s();case 8:if((u=s.n()).done){e.next=15;break}if((l=o(u.value,2))[0],void 0===(c=l[1])){e.next=13;break}return e.next=13,c;case 13:e.next=8;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(6),s.e(e.t0);case 20:return e.prev=20,s.f(),e.finish(20);case 23:e.next=3;break;case 25:e.next=30;break;case 27:e.prev=27,e.t1=e.catch(1),t.e(e.t1);case 30:return e.prev=30,t.f(),e.finish(30);case 33:case"end":return e.stop()}}),e,this,[[1,27,30,33],[6,17,20,23]])}))}])&&u(t.prototype,n),a&&u(t,a),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"DenseStrategy",(function(){return s}));n(83),n(56),n(20),n(8),n(9),n(0),n(10),n(3),n(2),n(4),n(21),n(12),n(24);var r=n(22);function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.width=t,this.height=n,this.mapping=new Array(n);for(var r=0;r<n;r++)this.mapping[r]=new Array(t)}var t,n,i;return t=e,(n=[{key:"getCell",value:function(e){return this.getCellVertex(e.col,e.row)}},{key:"setCell",value:function(e,t){this.width=Math.max(this.width,e.col+1),this.height=Math.max(this.height,e.row+1),this.mapping[e.row]||(this.mapping[e.row]=new Array(this.width)),this.mapping[e.row][e.col]=t}},{key:"has",value:function(e){var t=this.mapping[e.row];return!!t&&!!t[e.col]}},{key:"getHeight",value:function(){return this.height}},{key:"getWidth",value:function(){return this.width}},{key:"removeCell",value:function(e){void 0!==this.mapping[e.row]&&delete this.mapping[e.row][e.col]}},{key:"addRows",value:function(e,t){for(var n,r=[],o=0;o<t;o++)r.push(new Array(this.width));(n=this.mapping).splice.apply(n,[e,0].concat(r)),this.height+=t}},{key:"addColumns",value:function(e,t){for(var n=0;n<this.height;n++){var r;(r=this.mapping[n]).splice.apply(r,[e,0].concat(o(new Array(t))))}this.width+=t}},{key:"removeRows",value:function(e){this.mapping.splice(e.rowStart,e.numberOfRows);var t=Math.min(this.height-1,e.rowEnd),n=Math.max(0,t-e.rowStart+1);this.height=Math.max(0,this.height-n)}},{key:"removeColumns",value:function(e){for(var t=0;t<this.height;t++)this.mapping[t].splice(e.columnStart,e.numberOfColumns);var n=Math.min(this.width-1,e.columnEnd),r=Math.max(0,n-e.columnStart+1);this.width=Math.max(0,this.width-r)}},{key:"getEntries",value:regeneratorRuntime.mark((function e(t){var n,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<this.height)){e.next=14;break}o=0;case 3:if(!(o<this.width)){e.next=11;break}if(!(i=this.getCellVertex(o,n))){e.next=8;break}return e.next=8,[Object(r.simpleCellAddress)(t,o,n),i];case 8:++o,e.next=3;break;case 11:++n,e.next=1;break;case 14:case"end":return e.stop()}}),e,this)}))},{key:"verticesFromColumn",value:regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<this.height)){e.next=9;break}if(!(r=this.getCellVertex(t,n))){e.next=6;break}return e.next=6,r;case 6:++n,e.next=1;break;case 9:case"end":return e.stop()}}),e,this)}))},{key:"verticesFromRow",value:regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<this.width)){e.next=9;break}if(!(r=this.getCellVertex(n,t))){e.next=6;break}return e.next=6,r;case 6:++n,e.next=1;break;case 9:case"end":return e.stop()}}),e,this)}))},{key:"verticesFromColumnsSpan",value:regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.columnStart;case 1:if(!(n<=t.columnEnd)){e.next=14;break}r=0;case 3:if(!(r<this.height)){e.next=11;break}if(!(o=this.getCellVertex(n,r))){e.next=8;break}return e.next=8,o;case 8:++r,e.next=3;break;case 11:++n,e.next=1;break;case 14:case"end":return e.stop()}}),e,this)}))},{key:"verticesFromRowsSpan",value:regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<this.width)){e.next=14;break}r=t.rowStart;case 3:if(!(r<=t.rowEnd)){e.next=11;break}if(!(o=this.getCellVertex(n,r))){e.next=8;break}return e.next=8,o;case 8:++r,e.next=3;break;case 11:++n,e.next=1;break;case 14:case"end":return e.stop()}}),e,this)}))},{key:"entriesFromRowsSpan",value:regeneratorRuntime.mark((function e(t){var n,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<this.width)){e.next=14;break}o=t.rowStart;case 3:if(!(o<=t.rowEnd)){e.next=11;break}if(!(i=this.getCellVertex(n,o))){e.next=8;break}return e.next=8,[Object(r.simpleCellAddress)(t.sheet,n,o),i];case 8:++o,e.next=3;break;case 11:++n,e.next=1;break;case 14:case"end":return e.stop()}}),e,this)}))},{key:"entriesFromColumnsSpan",value:regeneratorRuntime.mark((function e(t){var n,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<this.height)){e.next=14;break}o=t.columnStart;case 3:if(!(o<=t.columnEnd)){e.next=11;break}if(!(i=this.getCellVertex(o,n))){e.next=8;break}return e.next=8,[Object(r.simpleCellAddress)(t.sheet,o,n),i];case 8:++o,e.next=3;break;case 11:++n,e.next=1;break;case 14:case"end":return e.stop()}}),e,this)}))},{key:"vertices",value:regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(!(t<this.height)){e.next=14;break}n=0;case 3:if(!(n<this.width)){e.next=11;break}if(!(r=this.getCellVertex(n,t))){e.next=8;break}return e.next=8,r;case 8:++n,e.next=3;break;case 11:++t,e.next=1;break;case 14:case"end":return e.stop()}}),e,this)}))},{key:"getCellVertex",value:function(e,t){var n;return null===(n=this.mapping[t])||void 0===n?void 0:n[e]}}])&&a(t.prototype,n),i&&a(t,i),e}()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.r(t),n.d(t,"DetailedCellError",(function(){return o}));
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var o=function(){function e(t,n,r){var o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.value=n,this.address=r,this.type=t.type,this.message=null!==(o=t.message)&&void 0!==o?o:""}var t,n,o;return t=e,(n=[{key:"toString",value:function(){return this.value}},{key:"valueOf",value:function(){return this.value}}])&&r(t.prototype,n),o&&r(t,o),e}()},function(e,t,n){"use strict";var r,o=n(29),i=n(35),a=n(113).f,s=n(133),u=n(74),l=n(244),c=n(90),f=n(246),d=n(132),h=i("".endsWith),p=i("".slice),m=Math.min,y=f("endsWith");o({target:"String",proto:!0,forced:!!(d||y||(r=a(String.prototype,"endsWith"),!r||r.writable))&&!y},{endsWith:function(e){var t=u(c(this));l(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=void 0===n?r:m(s(n),r),i=u(e);return h?h(t,i,o):p(t,o-i.length,o)===i}})},function(e,t,n){"use strict";n.r(t),n.d(t,"format",(function(){return l})),n.d(t,"padLeft",(function(){return c})),n.d(t,"padRight",(function(){return f})),n.d(t,"defaultStringifyDuration",(function(){return h})),n.d(t,"defaultStringifyDateTime",(function(){return p}));n(33),n(66),n(0),n(65),n(51),n(284),n(115),n(12),n(24),n(21),n(2),n(8),n(9),n(10),n(3),n(4);var r=n(370),o=n(154),i=n(676);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function l(e,t,n,r){var a=n.stringifyDateTime(r.numberToSimpleDateTime(e),t);if(void 0!==a)return a;var s=n.stringifyDuration(Object(o.numberToSimpleTime)(e),t);if(void 0!==s)return s;var u=Object(i.parseForNumberFormat)(t);return void 0!==u?function(e,t){for(var n="",r=0;r<e.length;++r){var o=e[r];if(o.type!==i.TokenType.FREE_TEXT){var a=o.value.split("."),s=a[0],u=a[1]||"",l=a[1]?".":"",h=Number(t.toFixed(u.length)).toString().split("."),p=h[0]||"",m=h[1]||"";if(s.length>p.length){var y=d(s.substr(0,s.length-p.length),"0");p=c(p,y+p.length)}var v=d(u.substr(m.length,u.length-m.length),"0");m=f(m,v+m.length),n+=p+l+m}else n+=o.value}return n}(u.tokens,e):t}function c(e,t){for(var n=e+"";n.length<t;)n="0"+n;return n}function f(e,t){for(var n=e+"";n.length<t;)n+="0";return n}function d(e,t){return e.split(t).length-1}function h(e,t){var n=Object(i.parseForDateTimeFormat)(t);if(void 0!==n){var o,a="",u=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(n.tokens);try{for(u.s();!(o=u.n()).done;){var l=o.value;if(l.type!==i.TokenType.FREE_TEXT)if(r.secondsExtendedRegexp.test(l.value)){var f=l.value.length-3;a+=(e.seconds<10?"0":"")+Math.round(e.seconds*Math.pow(10,f))/Math.pow(10,f)}else switch(l.value.toLowerCase()){case"h":case"hh":a+=c(e.hours,l.value.length),e.hours=0;break;case"[hh]":a+=c(e.hours,l.value.length-2),e.hours=0;break;case"m":case"mm":a+=c(e.minutes,l.value.length),e.minutes=0;break;case"[mm]":a+=c(e.minutes+60*e.hours,l.value.length-2),e.minutes=0,e.hours=0;break;case"s":case"ss":a+=c(e.seconds,l.value.length);break;default:return}else a+=l.value}}catch(e){u.e(e)}finally{u.f()}return a}}function p(e,t){var n=Object(i.parseForDateTimeFormat)(t);if(void 0!==n){for(var o=n.tokens,s="",u=!1,l=o.some((function(e){return e.type===i.TokenType.FORMAT&&("a/p"===e.value||"A/P"===e.value||"am/pm"===e.value||"AM/PM"===e.value)})),f=0;f<o.length;f++){var d=o[f];if(d.type!==i.TokenType.FREE_TEXT)if(r.secondsExtendedRegexp.test(d.value)){var h=d.value.length-3;s+=(e.seconds<10?"0":"")+Math.round(e.seconds*Math.pow(10,h))/Math.pow(10,h)}else switch(d.value.toLowerCase()){case"h":case"hh":u=!0,s+=c(l?(e.hours+11)%12+1:e.hours,d.value.length);break;case"d":case"dd":s+=c(e.day,d.value.length);break;case"s":case"ss":s+=c(Math.round(e.seconds),d.value.length);break;case"m":case"mm":f+1<o.length&&o[f+1].value.startsWith(":")&&(u=!0),s+=c(u?e.minutes:e.month,d.value.length),u=!0;break;case"yy":s+=c(e.year%100,d.value.length);break;case"yyyy":s+=e.year;break;case"am/pm":case"a/p":var p=a(d.value.split("/"),2),m=p[0],y=p[1];s+=e.hours<12?m:y;break;default:return}else s+=d.value}return s}}},function(e,t,n){"use strict";var r=n(29),o=n(28),i=n(35),a=n(124),s=n(344),u=n(285),l=n(41),c=o.RangeError,f=o.String,d=Math.floor,h=i(u),p=i("".slice),m=i(1..toFixed),y=function(e,t,n){return 0===t?n:t%2==1?y(e,t-1,n*e):y(e*e,t/2,n)},v=function(e,t,n){for(var r=-1,o=n;++r<6;)o+=t*e[r],e[r]=o%1e7,o=d(o/1e7)},g=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=d(r/t),r=r%t*1e7},E=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=f(e[t]);n=""===n?r:n+h("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:l((function(){return"0.000"!==m(8e-5,3)||"1"!==m(.9,0)||"1.25"!==m(1.255,2)||"1000000000000000128"!==m(0xde0b6b3a7640080,0)}))||!l((function(){m({})}))},{toFixed:function(e){var t,n,r,o,i=s(this),u=a(e),l=[0,0,0,0,0,0],d="",m="0";if(u<0||u>20)throw c("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return f(i);if(i<0&&(d="-",i=-i),i>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(i*y(2,69,1))-69)<0?i*y(2,-t,1):i/y(2,t,1),n*=4503599627370496,(t=52-t)>0){for(v(l,0,n),r=u;r>=7;)v(l,1e7,0),r-=7;for(v(l,y(10,r,1),0),r=t-1;r>=23;)g(l,1<<23),r-=23;g(l,1<<r),v(l,1,1),g(l,2),m=E(l)}else v(l,0,n),v(l,1<<-t,0),m=E(l)+h("0",u);return m=u>0?d+((o=m.length)<=u?"0."+h("0",u-o)+m:p(m,0,o-u)+"."+p(m,o-u)):d+m}})},function(e,t,n){"use strict";var r=n(28),o=n(124),i=n(74),a=n(90),s=r.RangeError;e.exports=function(e){var t=i(a(this)),n="",r=o(e);if(r<0||r==1/0)throw s("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n}},function(e,t,n){"use strict";var r=n(29),o=n(248).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return o(this,e)}})},function(e,t,n){"use strict";var r=n(29),o=n(679).start;r({target:"String",proto:!0,forced:n(680)},{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";n.r(t),n.d(t,"validateAsSheet",(function(){return o})),n.d(t,"findBoundaries",(function(){return i}));var r=n(39);
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function o(e){if(!Array.isArray(e))throw new r.InvalidArgumentsError("an array of arrays.");for(var t=0;t<e.length;t++)if(!Array.isArray(e[t]))throw new r.InvalidArgumentsError("an array of arrays.")}function i(e){for(var t=0,n=0,r=0,o=0;o<e.length;o++){for(var i=0,a=0;a<e[o].length;a++){var s=e[o][a];null!=s&&(i=a+1,++r)}t=Math.max(t,i),i>0&&(n=o+1)}var u=t*n;return{height:n,width:t,fill:0===u?0:r/u}}},function(e,t,n){"use strict";n.r(t),n.d(t,"FunctionRegistry",(function(){return h}));n(83),n(24),n(3),n(36),n(0),n(2),n(4),n(58),n(142),n(21),n(20),n(26),n(52),n(12),n(8),n(9),n(10);var r=n(39),o=n(184),i=n(691);function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
function d(e,t){var n,o=t.implementedFunctions[e],i=null===(n=t.aliases)||void 0===n?void 0:n[e];if(void 0!==i){if(void 0!==o)throw new r.AliasAlreadyExisting(e,t.name);o=t.implementedFunctions[i]}if(void 0===o)throw r.FunctionPluginValidationError.functionNotDeclaredInPlugin(e,t.name);return o}var h=function(){function e(t){var n=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.functions=new Map,this.arraySizeFunctions=new Map,this.volatileFunctions=new Set,this.arrayFunctions=new Set,this.structuralChangeFunctions=new Set,this.functionsWhichDoesNotNeedArgumentsToBeComputed=new Set,this.functionsMetadata=new Map,this.doesFunctionNeedArgumentToBeComputed=function(e){return n.functionsWhichDoesNotNeedArgumentsToBeComputed.has(e)},this.isFunctionVolatile=function(e){return n.volatileFunctions.has(e)},this.isArrayFunction=function(e){return n.arrayFunctions.has(e)},this.isFunctionDependentOnSheetStructureChange=function(e){return n.structuralChangeFunctions.has(e)},t.functionPlugins.length>0){this.instancePlugins=new Map;var r,o=u(t.functionPlugins);try{for(o.s();!(r=o.n()).done;){var i=r.value;e.loadPluginFunctions(i,this.instancePlugins)}}catch(e){o.e(e)}finally{o.f()}}else this.instancePlugins=new Map(e.plugins);var a,l=u(e.protectedFunctions());try{for(l.s();!(a=l.n()).done;){var c=s(a.value,2),f=c[0],h=c[1];e.loadFunctionUnprotected(h,f,this.instancePlugins)}}catch(e){l.e(e)}finally{l.f()}var p,m=u(this.instancePlugins.entries());try{for(m.s();!(p=m.n()).done;){var y=s(p.value,2),v=y[0],g=y[1];this.categorizeFunction(v,d(v,g))}}catch(e){m.e(e)}finally{m.f()}}var t,n,i;return t=e,n=[{key:"initializePlugins",value:function(e){var t,n=this,r=[],o=u(this.instancePlugins.entries());try{var i=function(){var o=s(t.value,2),i=o[0],a=o[1],u=r.find((function(e){return e instanceof a}));void 0===u&&(u=new a(e),r.push(u));var l=d(i,a),c=l.method;n.functions.set(i,[c,u]);var f=l.arraySizeMethod;void 0!==f&&n.arraySizeFunctions.set(i,[f,u])};for(o.s();!(t=o.n()).done;)i()}catch(e){o.e(e)}finally{o.f()}}},{key:"getFunctionPlugin",value:function(t){if(!e.functionIsProtected(t))return this.instancePlugins.get(t)}},{key:"getFunction",value:function(e){var t=this.functions.get(e);if(void 0!==t&&this.config.translationPackage.isFunctionTranslated(e)){var n=s(t,2),r=n[0],o=n[1];return function(e,t){return o[r](e,t)}}}},{key:"getArraySizeFunction",value:function(e){var t=this.arraySizeFunctions.get(e);if(void 0!==t&&this.config.translationPackage.isFunctionTranslated(e)){var n=s(t,2),r=n[0],o=n[1];return function(e,t){return o[r](e,t)}}}},{key:"getMetadata",value:function(e){return this.functionsMetadata.get(e)}},{key:"getPlugins",value:function(){var t,n=new Set,r=u(this.instancePlugins);try{for(r.s();!(t=r.n()).done;){var o=s(t.value,2),i=o[0],a=o[1];e.functionIsProtected(i)||n.add(a)}}catch(e){r.e(e)}finally{r.f()}return Array.from(n)}},{key:"getRegisteredFunctionIds",value:function(){return Array.from(this.functions.keys())}},{key:"categorizeFunction",value:function(e,t){t.isVolatile&&this.volatileFunctions.add(e),t.arrayFunction&&this.arrayFunctions.add(e),t.doesNotNeedArgumentsToBeComputed&&this.functionsWhichDoesNotNeedArgumentsToBeComputed.add(e),t.isDependentOnSheetStructureChange&&this.structuralChangeFunctions.add(e),this.functionsMetadata.set(e,t)}}],i=[{key:"registerFunctionPlugin",value:function(e,t){this.loadPluginFunctions(e,this.plugins),void 0!==t&&this.loadTranslations(t)}},{key:"registerFunction",value:function(e,t,n){this.loadPluginFunction(t,e,this.plugins),void 0!==n&&this.loadTranslations(n)}},{key:"unregisterFunction",value:function(e){if(this.functionIsProtected(e))throw r.ProtectedFunctionError.cannotUnregisterFunctionWithId(e);this.plugins.delete(e)}},{key:"unregisterFunctionPlugin",value:function(e){var t,n=u(this.protectedPlugins());try{for(n.s();!(t=n.n()).done;)if(t.value===e)throw r.ProtectedFunctionError.cannotUnregisterProtectedPlugin()}catch(e){n.e(e)}finally{n.f()}var o,i=u(this.plugins.entries());try{for(i.s();!(o=i.n()).done;){var a=s(o.value,2),l=a[0];a[1]===e&&this.plugins.delete(l)}}catch(e){i.e(e)}finally{i.f()}}},{key:"unregisterAll",value:function(){this.plugins.clear()}},{key:"getRegisteredFunctionIds",value:function(){return[].concat(a(Array.from(this.plugins.keys())),a(Array.from(this._protectedPlugins.keys())))}},{key:"getPlugins",value:function(){return Array.from(new Set(this.plugins.values()).values())}},{key:"getFunctionPlugin",value:function(e){return this.functionIsProtected(e)?void 0:this.plugins.get(e)}},{key:"loadTranslations",value:function(e){var t=new Set(o.HyperFormula.getRegisteredLanguagesCodes());Object.keys(e).forEach((function(n){t.has(n)&&o.HyperFormula.getLanguage(n).extendFunctions(e[n])}))}},{key:"loadPluginFunctions",value:function(e,t){var n=this;Object.keys(e.implementedFunctions).forEach((function(r){n.loadPluginFunction(e,r,t)})),void 0!==e.aliases&&Object.keys(e.aliases).forEach((function(r){n.loadPluginFunction(e,r,t)}))}},{key:"loadPluginFunction",value:function(e,t,n){if(this.functionIsProtected(t))throw r.ProtectedFunctionError.cannotRegisterFunctionWithId(t);this.loadFunctionUnprotected(e,t,n)}},{key:"loadFunctionUnprotected",value:function(e,t,n){var o=d(t,e).method;if(!Object.prototype.hasOwnProperty.call(e.prototype,o))throw r.FunctionPluginValidationError.functionMethodNotFound(o,e.name);n.set(t,e)}},{key:"functionIsProtected",value:function(e){return this._protectedPlugins.has(e)}},{key:"protectedFunctions",value:regeneratorRuntime.mark((function e(){var t,n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=u(this._protectedPlugins),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=10;break}if(r=s(n.value,2),o=r[0],void 0===(i=r[1])){e.next=8;break}return e.next=8,[o,i];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[1,12,15,18]])}))},{key:"protectedPlugins",value:regeneratorRuntime.mark((function e(){var t,n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=u(this._protectedPlugins),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=10;break}if(r=s(n.value,2),void 0===(o=r[1])){e.next=8;break}return e.next=8,o;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[1,12,15,18]])}))}],n&&f(t.prototype,n),i&&f(t,i),e}();h.plugins=new Map,h._protectedPlugins=new Map([["VERSION",i.VersionPlugin],["OFFSET",void 0]])},function(e,t,n){"use strict";n.r(t);var r=n(38);n.d(t,"FunctionPlugin",(function(){return r.FunctionPlugin}))},function(e,t,n){"use strict";n.r(t),n.d(t,"PI",(function(){return f})),n.d(t,"MathConstantsPlugin",(function(){return d}));n(284),n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(38);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=parseFloat(Math.PI.toFixed(14)),d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"pi",value:function(e,t){return this.runFunction(e.args,t,this.metadata("PI"),(function(){return f}))}},{key:"sqrtpi",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SQRTPI"),(function(e){return Math.sqrt(f*e)}))}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);d.implementedFunctions={PI:{method:"pi",parameters:[]},SQRTPI:{method:"sqrtpi",parameters:[{argumentType:r.ArgumentTypes.NUMBER,minValue:0}]}}},function(e,t){var n=Math.expm1,r=Math.exp;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:r(e)-1}:n},function(e,t,n){var r=n(425);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";t.__esModule=!0,t.RENDER_TYPE=t.PARTIALLY_VISIBLE_TYPE=t.FULLY_VISIBLE_TYPE=void 0;t.RENDER_TYPE=1;t.FULLY_VISIBLE_TYPE=2;t.PARTIALLY_VISIBLE_TYPE=3},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r={getFirstRenderedColumn:function(){var e=this.wot.wtViewport.columnsRenderCalculator.startColumn;return null===e?-1:e},getFirstVisibleColumn:function(){var e=this.wot.wtViewport.columnsVisibleCalculator.startColumn;return null===e?-1:e},getLastRenderedColumn:function(){var e=this.wot.wtViewport.columnsRenderCalculator.endColumn;return null===e?-1:e},getLastVisibleColumn:function(){var e=this.wot.wtViewport.columnsVisibleCalculator.endColumn;return null===e?-1:e},getRenderedColumnsCount:function(){return this.wot.wtViewport.columnsRenderCalculator.count},getVisibleColumnsCount:function(){return this.wot.wtViewport.columnsVisibleCalculator.count}};(0,n(14).defineGetter)(r,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});var o=r;t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r={getFirstRenderedColumn:function(){return 0===this.wot.getSetting("totalColumns")?-1:0},getFirstVisibleColumn:function(){return this.getFirstRenderedColumn()},getLastRenderedColumn:function(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn:function(){return this.getLastRenderedColumn()},getRenderedColumnsCount:function(){var e=this.wot.getSetting("totalColumns");return Math.min(this.wot.getSetting("fixedColumnsLeft"),e)},getVisibleColumnsCount:function(){return this.getRenderedColumnsCount()}};(0,n(14).defineGetter)(r,"MIXIN_NAME","stickyColumnsLeft",{writable:!1,enumerable:!1});var o=r;t.default=o},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t._dataToHTML=function(e){for(var t=e.length,n=["<table>"],r=0;r<t;r+=1){var o=e[r],a=o.length,s=[];0===r&&n.push("<tbody>");for(var u=0;u<a;u+=1){var l=o[u],c=(0,i.isEmpty)(l)?"":l.toString().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");s.push("<td>".concat(c,"</td>"))}n.push.apply(n,["<tr>"].concat(s,["</tr>"])),r+1===t&&n.push("</tbody>")}return n.push("</table>"),n.join("")},t.htmlToGridSettings=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n={},r=t.createDocumentFragment(),i=t.createElement("div");r.appendChild(i);var l=e;if("string"==typeof l){var c=l.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,(function(e){var t=e.match(/<td\b[^>]*?>/g)[0],n=e.substring(t.length,e.lastIndexOf("<")).replace(/(<(?!br)([^>]+)>)/gi,"");return"".concat(t).concat(n).concat("</td>")}));i.insertAdjacentHTML("afterbegin","".concat(c)),l=i.querySelector("table")}if(!l||!u(l))return;var f=i.querySelector('meta[name$="enerator"]'),d=null!==l.querySelector("tbody th"),h=l.querySelector("tr"),p=h?Array.from(h.cells).reduce((function(e,t){return e+t.colSpan}),0)-(d?1:0):0,m=l.tFoot&&Array.from(l.tFoot.rows)||[],y=[],v=!1,g=0,E=0;if(l.tHead){var T=Array.from(l.tHead.rows).filter((function(e){var t=null!==e.querySelector("td");return t&&y.push(e),!t}));g=T.length,v=g>0,g>1?n.nestedHeaders=Array.from(T).reduce((function(e,t){var n=Array.from(t.cells).reduce((function(e,t,n){if(d&&0===n)return e;var r=t.colSpan,o=t.innerHTML,i=r>1?{label:o,colspan:r}:o;return e.push(i),e}),[]);return e.push(n),e}),[]):v&&(n.colHeaders=Array.from(T[0].children).reduce((function(e,t,n){return d&&0===n||e.push(t.innerHTML),e}),[]))}y.length&&(n.fixedRowsTop=y.length);m.length&&(n.fixedRowsBottom=m.length);var C=[].concat(y,(0,o.default)(Array.from(l.tBodies).reduce((function(e,t){return e.push.apply(e,(0,o.default)(Array.from(t.rows))),e}),[])),(0,o.default)(m));E=C.length;for(var b=new Array(E),w=0;w<E;w++)b[w]=new Array(p);for(var R=[],O=[],S=0;S<E;S++)for(var A=C[S],N=Array.from(A.cells),M=N.length,k=0;k<M;k++){var _=N[k],I=_.nodeName,P=_.innerHTML,x=_.rowSpan,D=_.colSpan,L=b[S].findIndex((function(e){return void 0===e}));if("TD"===I){if(x>1||D>1){for(var F=S;F<S+x;F++)if(F<E)for(var j=L;j<L+D;j++)b[F][j]=null;var U=_.getAttribute("style"),H=U&&U.includes("mso-ignore:colspan");H||R.push({col:L,row:S,rowspan:x,colspan:D})}var V="";V=f&&/excel/gi.test(f.content)?P.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):P.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),b[S][L]=V.replace(s,(function(e){return a[e]}))}else O.push(P)}R.length&&(n.mergeCells=R);O.length&&(n.rowHeaders=O);b.length&&(n.data=b);return n},t.instanceToHTML=function(e){for(var t=e.hasColHeaders(),n=e.hasRowHeaders(),r=[t?-1:0,n?-1:0,e.countRows()-1,e.countCols()-1],o=e.getData.apply(e,r),a=o.length,s=a>0?o[0].length:0,u=["<table>","</table>"],l=t?["<thead>","</thead>"]:[],c=["<tbody>","</tbody>"],f=n?1:0,d=t?1:0,h=0;h<a;h+=1){for(var p=t&&0===h,m=[],y=0;y<s;y+=1){var v=!p&&n&&0===y,g="";if(p)g="<th>".concat(e.getColHeader(y-f),"</th>");else if(v)g="<th>".concat(e.getRowHeader(h-d),"</th>");else{var E=o[h][y],T=e.getCellMeta(h-d,y-f),C=T.hidden,b=T.rowspan,w=T.colspan;if(!C){var R=[];if(b&&R.push('rowspan="'.concat(b,'"')),w&&R.push('colspan="'.concat(w,'"')),(0,i.isEmpty)(E))g="<td ".concat(R.join(" "),"></td>");else{var O=E.toString().replace("<","&lt;").replace(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");g="<td ".concat(R.join(" "),">").concat(O,"</td>")}}}m.push(g)}var S=["<tr>"].concat(m,["</tr>"]).join("");p?l.splice(1,0,S):c.splice(-1,0,S)}return u.splice(1,0,l.join(""),c.join("")),u.join("")};var o=r(n(44));n(95),n(33),n(65),n(76),n(37),n(52),n(62),n(0),n(20),n(56),n(577),n(761),n(100),n(21),n(2),n(40),n(223),n(42),n(50);var i=n(34),a={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},s=new RegExp(Object.keys(a).map((function(e){return"(".concat(e,")")})).join("|"),"gi");function u(e){return"TABLE"===(e&&e.nodeName||"")}},function(e,t,n){"use strict";t.__esModule=!0,t.hasValidParameter=function(e){return e===o},t.holder=void 0,t.isRootInstance=function(e){return r.has(e)},t.registerAsRootInstance=function(e){r.set(e,!0)},t.rootInstanceSymbol=void 0,n(3),n(0),n(2),n(11),n(4),n(8),n(9);var r=new WeakMap;t.holder=r;var o=Symbol("rootInstance");t.rootInstanceSymbol=o},function(e,t,n){"use strict";n(0),n(7);var r=n(1);t.__esModule=!0,t.PhysicalIndexToValueMap=void 0;var o=r(n(5)),i=r(n(6)),a=r(n(30)),s=r(n(15)),u=r(n(16)),l=r(n(13)),c=n(226),f=n(300);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,l.default)(e);if(t){var o=(0,l.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,u.default)(this,n)}}var h=function(e){(0,s.default)(n,e);var t=d(n);function n(){return(0,o.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"insert",value:function(e,t){this.indexedValues=(0,f.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),(0,a.default)((0,l.default)(n.prototype),"insert",this).call(this,e,t)}},{key:"remove",value:function(e){this.indexedValues=(0,f.getListWithRemovedItems)(this.indexedValues,e),(0,a.default)((0,l.default)(n.prototype),"remove",this).call(this,e)}}]),n}(c.IndexMap);t.PhysicalIndexToValueMap=h},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.getListWithInsertedItems=function(e,t,n,r){var a=n.length?n[0]:void 0;return[].concat((0,o.default)(e.slice(0,a)),(0,o.default)(n.map((function(e,t){return(0,i.isFunction)(r)?r(e,t):r}))),(0,o.default)(void 0===a?[]:e.slice(a)))},t.getListWithRemovedItems=function(e,t){return(0,a.arrayFilter)(e,(function(e,n){return!1===t.includes(n)}))},n(20),n(12),n(37),n(42),n(50);var o=r(n(44)),i=n(68),a=n(19)},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.MapCollection=void 0,t.getRegisteredMapsCounter=function(){return l},n(3),n(36),n(0),n(2),n(4),n(26),n(21);var o=r(n(5)),i=r(n(6)),a=n(34),s=n(14),u=r(n(93)),l=0,c=function(){function e(){(0,o.default)(this,e),this.collection=new Map}return(0,i.default)(e,[{key:"register",value:function(e,t){var n=this;!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",(function(){return n.runLocalHooks("change",t)})),l+=1)}},{key:"unregister",value:function(e){var t=this.collection.get(e);(0,a.isDefined)(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),l-=1)}},{key:"unregisterAll",value:function(){var e=this;this.collection.forEach((function(t,n){return e.unregister(n)})),this.collection.clear()}},{key:"get",value:function(e){return(0,a.isUndefined)(e)?Array.from(this.collection.values()):this.collection.get(e)}},{key:"getLength",value:function(){return this.collection.size}},{key:"removeFromEvery",value:function(e){this.collection.forEach((function(t){t.remove(e)}))}},{key:"insertToEvery",value:function(e,t){this.collection.forEach((function(n){n.insert(e,t)}))}},{key:"initEvery",value:function(e){this.collection.forEach((function(t){t.init(e)}))}}]),e}();t.MapCollection=c,(0,s.mixin)(c,u.default)},function(e,t,n){"use strict";n(0),n(26),n(52);var r=n(1);t.__esModule=!0;var o={Highlight:!0,Selection:!0,handleMouseEvent:!0,detectSelectionType:!0,normalizeSelectionFactory:!0},i=r(n(586));t.Highlight=i.default;var a=r(n(791));t.Selection=a.default;var s=n(579);t.handleMouseEvent=s.handleMouseEvent;var u=n(229);t.detectSelectionType=u.detectSelectionType,t.normalizeSelectionFactory=u.normalizeSelectionFactory;var l=n(112);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},function(e,t,n){"use strict";t.__esModule=!0,t.EDITOR_TYPE=t.AutocompleteEditor=void 0;var r=n(810);t.EDITOR_TYPE=r.EDITOR_TYPE,t.AutocompleteEditor=r.AutocompleteEditor},function(e,t,n){"use strict";t.__esModule=!0,t.HandsontableEditor=t.EDITOR_TYPE=void 0;var r=n(811);t.EDITOR_TYPE=r.EDITOR_TYPE,t.HandsontableEditor=r.HandsontableEditor},function(e,t,n){"use strict";t.__esModule=!0,t.EDITOR_TYPE=t.DateEditor=void 0;var r=n(813);t.EDITOR_TYPE=r.EDITOR_TYPE,t.DateEditor=r.DateEditor},function(e,t,n){"use strict";t.__esModule=!0,t.autocompleteValidator=t.VALIDATOR_TYPE=void 0;var r=n(830);t.VALIDATOR_TYPE=r.VALIDATOR_TYPE,t.autocompleteValidator=r.autocompleteValidator},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.default=void 0,n(0),n(26),n(108);var o=r(n(32)),i=r(n(5)),a=r(n(6)),s=n(23),u=n(19),l=function(){function e(t){(0,i.default)(this,e),this.hot=t,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null,this.settings={useHeaders:!0}}return(0,a.default)(e,[{key:"addRow",value:function(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));var n={row:e};this.rows.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}},{key:"addColumnHeadersRow",value:function(e){var t=this.hot.getColHeader(0);if(null!=t){var n={row:-1};this.rows.push(n),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}}},{key:"addColumn",value:function(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));var n={col:e};this.columns.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}},{key:"getHeights",value:function(e){this.injected||this.injectTable(),(0,u.arrayEach)(this.rows,(function(t){e(t.row,(0,s.outerHeight)(t.table)-1)}))}},{key:"getWidths",value:function(e){this.injected||this.injectTable(),(0,u.arrayEach)(this.columns,(function(t){var n=t.table.getBoundingClientRect().width;e(t.col,Math.ceil(n))}))}},{key:"setSettings",value:function(e){this.settings=e}},{key:"setSetting",value:function(e,t){this.settings||(this.settings={}),this.settings[e]=t}},{key:"getSettings",value:function(){return this.settings}},{key:"getSetting",value:function(e){return this.settings?this.settings[e]:null}},{key:"createColGroupsCol",value:function(){var e=this,t=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1)),this.samples.forEach((function(n){(0,u.arrayEach)(n.strings,(function(n){t.appendChild(e.createColElement(n.col))}))})),t}},{key:"createRow",value:function(e){var t=this,n=this.hot.rootDocument,r=n.createDocumentFragment(),o=n.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,o),r.appendChild(o)),this.samples.forEach((function(o){(0,u.arrayEach)(o.strings,(function(o){var i=o.col,a=t.hot.getCellMeta(e,i);a.col=i,a.row=e;var s=t.hot.getCellRenderer(a),u=n.createElement("td");u.setAttribute("ghost-table",1),s(t.hot,u,e,i,t.hot.colToProp(i),o.value,a),r.appendChild(u)}))})),r}},{key:"appendColumnHeadersRow",value:function(){var e=this,t=this.hot.rootDocument,n=t.createDocumentFragment(),r=[];if(this.hot.hasRowHeaders()){var i=t.createElement("th");r.push([-1,i]),n.appendChild(i)}this.samples.forEach((function(e){(0,u.arrayEach)(e.strings,(function(e){var o=e.col,i=t.createElement("th");r.push([o,i]),n.appendChild(i)}))})),this.table.tHead.appendChild(n),(0,u.arrayEach)(r,(function(t){var n=(0,o.default)(t,2),r=n[0],i=n[1];e.hot.view.appendColHeader(r,i)}))}},{key:"createCol",value:function(e){var t=this,n=this.hot.rootDocument,r=n.createDocumentFragment();return this.samples.forEach((function(o){(0,u.arrayEach)(o.strings,(function(o){var i=o.row,a=t.hot.getCellMeta(i,e);a.col=e,a.row=i;var s=t.hot.getCellRenderer(a),u=n.createElement("td"),l=n.createElement("tr");u.setAttribute("ghost-table",1),s(t.hot,u,i,e,t.hot.colToProp(e),o.value,a),l.appendChild(u),r.appendChild(l)}))})),r}},{key:"clean",value:function(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}},{key:"injectTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}},{key:"removeTable",value:function(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}},{key:"createColElement",value:function(e){var t=this.hot.rootDocument.createElement("col");return t.style.width="".concat(this.hot.view.wt.wtTable.getStretchedColumnWidth(e),"px"),t}},{key:"createTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.hot.rootDocument,n=t.createDocumentFragment(),r=t.createElement("table"),o=t.createElement("thead"),i=t.createElement("tbody"),a=t.createElement("colgroup"),u=t.createElement("tr"),l=t.createElement("th");return this.isVertical()&&r.appendChild(a),this.isHorizontal()&&(u.appendChild(l),o.appendChild(u),r.style.tableLayout="auto",r.style.width="auto"),r.appendChild(o),this.isVertical()&&i.appendChild(u),r.appendChild(i),(0,s.addClass)(r,e),n.appendChild(r),{fragment:n,table:r,tHead:o,tBody:i,colGroup:a,tr:u,th:l}}},{key:"createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.hot.rootDocument,n=t.createDocumentFragment(),r=t.createElement("div"),o="htGhostTable htAutoSize ".concat(e.trim());return(0,s.addClass)(r,o),n.appendChild(r),{fragment:n,container:r}}},{key:"isVertical",value:function(){return!(!this.rows.length||this.columns.length)}},{key:"isHorizontal",value:function(){return!(!this.columns.length||this.rows.length)}}]),e}();t.default=l},function(e,t,n){"use strict";t.__esModule=!0,t.HEADER_SPAN_CLASS=t.DESC_SORT_STATE=t.ASC_SORT_STATE=void 0,t.areValidSortStates=function(e){if(e.some((function(e){return!1===function(e){if(!1===(0,r.isObject)(e))return!1;var t=e.column,n=e.sortOrder;return Number.isInteger(t)&&[i,a].includes(n)}(e)})))return!1;var t=e.map((function(e){return e.column}));return new Set(t).size===t.length},t.getHeaderSpanElement=function(e){return e.querySelector(".".concat("colHeader"))},t.getNextSortOrder=function(e){if(e===a)return;if(e===i)return a;return i},t.isFirstLevelColumnHeader=function(e,t){if(e<0||!t.parentNode)return!1;var n=t.parentNode.parentNode.childNodes;if(Array.from(n).indexOf(t.parentNode)-n.length!=-1)return!1;return!0},t.wasHeaderClickedProperly=function(e,t,n){return-1===e&&t>=0&&!1===(0,o.isRightClick)(n)},n(67),n(51),n(42),n(0),n(37),n(3),n(58),n(2),n(4),n(31),n(21);var r=n(14),o=n(69),i="asc";t.ASC_SORT_STATE=i;var a="desc";t.DESC_SORT_STATE=a;t.HEADER_SPAN_CLASS="colHeader"},function(e,t,n){"use strict";t.__esModule=!0,t.KEY=void 0,t.default=function(){return{name:"---------"}};t.KEY="---------"},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.default=void 0,n(24),n(75),n(52),n(33),n(95),n(65),n(0),n(62),n(20);var o=r(n(5)),i=r(n(6)),a=r(n(899)),s=n(119),u=n(103),l=r(n(423)),c=r(n(53)),f=n(19),d=n(106),h=n(23),p=n(69),m=n(68),y=n(34),v=n(14),g=n(92),E=r(n(93)),T=function(){function e(t,n){(0,o.default)(this,e),this.hot=t,this.options=n||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootDocument.documentElement},this.eventManager=new c.default(this),this.container=this.createContainer(this.options.name),this.hotMenu=null,this.hotSubMenus={},this.parentMenu=this.options.parent||null,this.menuItems=null,this.origOutsideClickDeselects=null,this.keyEvent=!1,this.offset={above:0,below:0,left:0,right:0},this._afterScrollCallback=null,this.registerEvents()}return(0,i.default)(e,[{key:"registerEvents",value:function(){for(var e=this,t=this.hot.rootWindow;t;)this.eventManager.addEventListener(t.document,"mousedown",(function(t){return e.onDocumentMouseDown(t)})),this.eventManager.addEventListener(t.document,"contextmenu",(function(t){return e.onDocumentContextMenu(t)})),t=(0,h.getParentWindow)(t)}},{key:"setMenuItems",value:function(e){this.menuItems=e}},{key:"getSelectedItem",value:function(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}},{key:"hasSelectedItem",value:function(){return Array.isArray(this.hotMenu.getSelectedLast())}},{key:"setOffset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.offset[e]=t}},{key:"isSubMenu",value:function(){return null!==this.parentMenu}},{key:"open",value:function(){var e=this;this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";var t=(0,m.debounce)((function(t){return e.openSubMenu(t)}),300),n=this.options.minWidth||215,r=!1,o=(0,f.arrayFilter)(this.menuItems,(function(t){return t.key===s.NO_ITEMS&&(r=!0),(0,u.isItemHidden)(t,e.hot)}));if(o.length<1&&!r)o.push((0,s.predefinedItems)()[s.NO_ITEMS]);else if(0===o.length)return;o=(0,u.filterSeparators)(o,s.SEPARATOR);var i=!1,a={data:o,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:function(e){return(0,y.isDefined)(e)&&e<n?n:e},autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,maxCols:1,columns:[{data:"name",renderer:function(t,n,r,o,i,a){return e.menuItemRenderer(t,n,r,o,i,a)}}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",beforeKeyDown:function(t){return e.onBeforeKeyDown(t)},afterOnCellMouseOver:function(n,r){e.isAllSubMenusClosed()?t(r.row):e.openSubMenu(r.row)},rowHeights:function(e){return o[e].name===s.SEPARATOR?1:23},afterOnCellContextMenu:function(t){t.preventDefault(),(0,d.isWindowsOS)()&&i&&e.hasSelectedItem()&&e.close(!0)},beforeOnCellMouseUp:function(t){e.hasSelectedItem()&&(i=!e.isCommandPassive(e.getSelectedItem()),e.executeCommand(t))},afterOnCellMouseUp:function(t){(0,d.isWindowsOS)()&&(0,p.isRightClick)(t)||!i||!e.hasSelectedItem()||((0,d.isMobileBrowser)()||(0,d.isIpadOS)()?setTimeout((function(){return e.close(!0)}),325):e.close(!0))},afterUnlisten:function(){!e.hasSelectedItem()&&e.isOpened()&&e.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new l.default(this.container,a),this.hotMenu.addHook("afterInit",(function(){return e.onAfterInit()})),this.hotMenu.addHook("afterSelection",(function(){return e.onAfterSelection.apply(e,arguments)})),this.hotMenu.init(),this.hotMenu.listen(),this.blockMainTableCallbacks(),this.runLocalHooks("afterOpen")}},{key:"close",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isOpened()&&(e&&this.parentMenu?this.parentMenu.close():(this.closeAllSubMenus(),this.container.style.display="none",this.releaseMainTableCallbacks(),this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.parentMenu&&this.parentMenu.hotMenu.listen()))}},{key:"openSubMenu",value:function(t){if(!this.hotMenu)return!1;var n=this.hotMenu.getCell(t,0);if(this.closeAllSubMenus(),!n||!(0,u.hasSubMenu)(n))return!1;var r=this.hotMenu.getSourceDataAtRow(t),o=new e(this.hot,{parent:this,name:r.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return o.setMenuItems(r.submenu.items),o.open(),o.setPosition(n.getBoundingClientRect()),this.hotSubMenus[r.key]=o,o}},{key:"closeSubMenu",value:function(e){var t=this.hotMenu.getSourceDataAtRow(e),n=this.hotSubMenus[t.key];n&&(n.destroy(),delete this.hotSubMenus[t.key])}},{key:"closeAllSubMenus",value:function(){var e=this;(0,f.arrayEach)(this.hotMenu.getData(),(function(t,n){return e.closeSubMenu(n)}))}},{key:"isAllSubMenusClosed",value:function(){return 0===Object.keys(this.hotSubMenus).length}},{key:"destroy",value:function(){var e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}},{key:"isOpened",value:function(){return null!==this.hotMenu}},{key:"executeCommand",value:function(e){if(this.isOpened()&&this.hasSelectedItem()){var t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),!this.isCommandPassive(t)){var n=this.hot.getSelectedRange(),r=n?(0,u.normalizeSelection)(n):[];this.runLocalHooks("executeCommand",t.key,r,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,r,e)}}}},{key:"isCommandPassive",value:function(e){var t=e.isCommand,n=e.name,r=e.disabled,o=e.submenu,i=!0===r||"function"==typeof r&&!0===r.call(this.hot);return!1===t||n===s.SEPARATOR||!0===i||o}},{key:"setPosition",value:function(e){var t=new a.default(e,this.container.ownerDocument.defaultView);this.options.keepInViewport?(t.fitsBelow(this.container)?this.setPositionBelowCursor(t):t.fitsAbove(this.container)?this.setPositionAboveCursor(t):this.setPositionBelowCursor(t),t.fitsOnRight(this.container)?this.setPositionOnRightOfCursor(t):this.setPositionOnLeftOfCursor(t)):(this.setPositionBelowCursor(t),this.setPositionOnRightOfCursor(t))}},{key:"setPositionAboveCursor",value:function(e){var t=this.offset.above+e.top-this.container.offsetHeight;this.isSubMenu()&&(t=e.top+e.cellHeight-this.container.offsetHeight+3),this.container.style.top="".concat(t,"px")}},{key:"setPositionBelowCursor",value:function(e){var t=this.offset.below+e.top+1;this.isSubMenu()&&(t=e.top-1),this.container.style.top="".concat(t,"px")}},{key:"setPositionOnRightOfCursor",value:function(e){var t;t=this.isSubMenu()?1+e.left+e.cellWidth:this.offset.right+1+e.left,this.container.style.left="".concat(t,"px")}},{key:"setPositionOnLeftOfCursor",value:function(e){var t=(0,h.getScrollbarWidth)(this.hot.rootDocument),n=this.offset.left+e.left-this.container.offsetWidth+t+4;this.container.style.left="".concat(n,"px")}},{key:"selectFirstCell",value:function(){var e=this.hotMenu.getCell(0,0);(0,u.isSeparator)(e)||(0,u.isDisabled)(e)||(0,u.isSelectionDisabled)(e)?this.selectNextCell(0,0):this.hotMenu.selectCell(0,0)}},{key:"selectLastCell",value:function(){var e=this.hotMenu.countRows()-1,t=this.hotMenu.getCell(e,0);(0,u.isSeparator)(t)||(0,u.isDisabled)(t)||(0,u.isSelectionDisabled)(t)?this.selectPrevCell(e,0):this.hotMenu.selectCell(e,0)}},{key:"selectNextCell",value:function(e,t){var n=e+1,r=n<this.hotMenu.countRows()?this.hotMenu.getCell(n,t):null;r&&((0,u.isSeparator)(r)||(0,u.isDisabled)(r)||(0,u.isSelectionDisabled)(r)?this.selectNextCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"selectPrevCell",value:function(e,t){var n=e-1,r=n>=0?this.hotMenu.getCell(n,t):null;r&&((0,u.isSeparator)(r)||(0,u.isDisabled)(r)||(0,u.isSelectionDisabled)(r)?this.selectPrevCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"menuItemRenderer",value:function(e,t,n,r,o,i){var a,u=this,l=e.getSourceDataAtRow(n),c=this.hot.rootDocument.createElement("div"),f=function(e){return e.disableSelection},d=i;"function"==typeof d&&(d=d.call(this.hot)),(0,h.empty)(t),(0,h.addClass)(c,"htItemWrapper"),t.appendChild(c),a=l,new RegExp(s.SEPARATOR,"i").test(a.name)?(0,h.addClass)(t,"htSeparator"):"function"==typeof l.renderer?((0,h.addClass)(t,"htCustomMenuRenderer"),t.appendChild(l.renderer(e,c,n,r,o,d))):(0,h.fastInnerHTML)(c,d),!function(e){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(u.hot)}(l)?f(l)?((0,h.addClass)(t,"htSelectionDisabled"),this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()}))):!function(e){return(0,v.hasOwnProperty)(e,"submenu")}(l)?((0,h.removeClass)(t,["htSubmenu","htDisabled"]),f(l)?this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()})):this.eventManager.addEventListener(t,"mouseenter",(function(){return e.selectCell(n,r,void 0,void 0,!1,!1)}))):((0,h.addClass)(t,"htSubmenu"),f(l)?this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()})):this.eventManager.addEventListener(t,"mouseenter",(function(){return e.selectCell(n,r,void 0,void 0,!1,!1)}))):((0,h.addClass)(t,"htDisabled"),this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()})))}},{key:"createContainer",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.options.container.ownerDocument,r=t;return r&&((0,m.isFunction)(r)&&(r=null===(r=r.call(this.hot))||(0,y.isUndefined)(r)?"":r.toString()),r=r.replace(/[^A-z0-9]/g,"_"),r="".concat(this.options.className,"Sub_").concat(r),e=n.querySelector(".".concat(this.options.className,".").concat(r))),e||(e=n.createElement("div"),(0,h.addClass)(e,"htMenu ".concat(this.options.className)),r&&(0,h.addClass)(e,r),this.options.container.appendChild(e)),e}},{key:"blockMainTableCallbacks",value:function(){this._afterScrollCallback=function(){},this.hot.addHook("afterScrollVertically",this._afterScrollCallback),this.hot.addHook("afterScrollHorizontally",this._afterScrollCallback)}},{key:"releaseMainTableCallbacks",value:function(){this._afterScrollCallback&&(this.hot.removeHook("afterScrollVertically",this._afterScrollCallback),this.hot.removeHook("afterScrollHorizontally",this._afterScrollCallback),this._afterScrollCallback=null)}},{key:"onBeforeKeyDown",value:function(e){if((0,h.isInput)(e.target)&&this.container.contains(e.target))(0,p.stopImmediatePropagation)(e);else{var t=this.hotMenu.getSelectedLast(),n=!1;switch(this.keyEvent=!0,e.keyCode){case g.KEY_CODES.ESCAPE:this.close(),n=!0;break;case g.KEY_CODES.ENTER:t&&(this.hotMenu.getSourceDataAtRow(t[0]).submenu?n=!0:(this.executeCommand(e),this.close(!0)));break;case g.KEY_CODES.ARROW_DOWN:t?this.selectNextCell(t[0],t[1]):this.selectFirstCell(),n=!0;break;case g.KEY_CODES.ARROW_UP:t?this.selectPrevCell(t[0],t[1]):this.selectLastCell(),n=!0;break;case g.KEY_CODES.ARROW_RIGHT:if(t){var r=this.openSubMenu(t[0]);r&&r.selectFirstCell()}n=!0;break;case g.KEY_CODES.ARROW_LEFT:t&&this.isSubMenu()&&(this.close(),this.parentMenu&&this.parentMenu.hotMenu.listen(),n=!0)}n&&(e.preventDefault(),(0,p.stopImmediatePropagation)(e)),this.keyEvent=!1}}},{key:"onAfterInit",value:function(){var e=this.hotMenu.view.wt.wtTable,t=this.hotMenu.getSettings().data,n=e.hider.style,r=e.holder.style,o=parseInt(n.width,10),i=(0,f.arrayReduce)(t,(function(e,t){return e+(t.name===s.SEPARATOR?1:26)}),0);r.width="".concat(o+3,"px"),r.height="".concat(i+3,"px"),n.height=r.height}},{key:"onAfterSelection",value:function(e,t,n,r,o){!1===this.keyEvent&&(o.value=!0)}},{key:"onDocumentMouseDown",value:function(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,h.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,h.isChildOf)(e.target,".htMenu")||this.close(!0))}},{key:"onDocumentContextMenu",value:function(e){this.isOpened()&&(0,h.hasClass)(e.target,"htCore")&&(0,h.isChildOf)(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}]),e}();(0,v.mixin)(T,E.default);var C=T;t.default=C},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.TYPE_TEXT=t.TYPE_NUMERIC=t.TYPE_DATE=t.TYPES=void 0,t.default=function(e){var t=[],n=e;L[n]||(n="text");return(0,a.arrayEach)(L[n],(function(e){var n;n=e===s.SEPARATOR?{name:s.SEPARATOR}:(0,i.clone)((0,u.getConditionDescriptor)(e)),t.push(n)})),t};var o=r(n(54)),i=n(14),a=n(19),s=n(119),u=n(57),l=n(932);t.CONDITION_NONE=l.CONDITION_NAME;var c=n(614);t.CONDITION_EMPTY=c.CONDITION_NAME;var f=n(933);t.CONDITION_NOT_EMPTY=f.CONDITION_NAME;var d=n(615);t.CONDITION_EQUAL=d.CONDITION_NAME;var h=n(934);t.CONDITION_NOT_EQUAL=h.CONDITION_NAME;var p=n(935);t.CONDITION_GREATER_THAN=p.CONDITION_NAME;var m=n(936);t.CONDITION_GREATER_THAN_OR_EQUAL=m.CONDITION_NAME;var y=n(937);t.CONDITION_LESS_THAN=y.CONDITION_NAME;var v=n(938);t.CONDITION_LESS_THAN_OR_EQUAL=v.CONDITION_NAME;var g=n(616);t.CONDITION_BETWEEN=g.CONDITION_NAME;var E=n(939);t.CONDITION_NOT_BETWEEN=E.CONDITION_NAME;var T=n(940);t.CONDITION_BEGINS_WITH=T.CONDITION_NAME;var C=n(941);t.CONDITION_ENDS_WITH=C.CONDITION_NAME;var b=n(619);t.CONDITION_CONTAINS=b.CONDITION_NAME;var w=n(942);t.CONDITION_NOT_CONTAINS=w.CONDITION_NAME;var R=n(618);t.CONDITION_DATE_BEFORE=R.CONDITION_NAME;var O=n(617);t.CONDITION_DATE_AFTER=O.CONDITION_NAME;var S=n(943);t.CONDITION_TOMORROW=S.CONDITION_NAME;var A=n(944);t.CONDITION_TODAY=A.CONDITION_NAME;var N=n(945);t.CONDITION_YESTERDAY=N.CONDITION_NAME;var M=n(946);t.CONDITION_BY_VALUE=M.CONDITION_NAME;var k=n(947);t.CONDITION_TRUE=k.CONDITION_NAME;var _=n(948);t.CONDITION_FALSE=_.CONDITION_NAME;var I=n(312);t.OPERATION_AND=I.OPERATION_ID;var P=n(620);t.OPERATION_OR=P.OPERATION_ID;var x,D=n(621);t.OPERATION_OR_THEN_VARIABLE=D.OPERATION_ID;t.TYPE_NUMERIC="numeric";t.TYPE_TEXT="text";t.TYPE_DATE="date";var L=(x={},(0,o.default)(x,"numeric",[l.CONDITION_NAME,s.SEPARATOR,c.CONDITION_NAME,f.CONDITION_NAME,s.SEPARATOR,d.CONDITION_NAME,h.CONDITION_NAME,s.SEPARATOR,p.CONDITION_NAME,m.CONDITION_NAME,y.CONDITION_NAME,v.CONDITION_NAME,g.CONDITION_NAME,E.CONDITION_NAME]),(0,o.default)(x,"text",[l.CONDITION_NAME,s.SEPARATOR,c.CONDITION_NAME,f.CONDITION_NAME,s.SEPARATOR,d.CONDITION_NAME,h.CONDITION_NAME,s.SEPARATOR,T.CONDITION_NAME,C.CONDITION_NAME,s.SEPARATOR,b.CONDITION_NAME,w.CONDITION_NAME]),(0,o.default)(x,"date",[l.CONDITION_NAME,s.SEPARATOR,c.CONDITION_NAME,f.CONDITION_NAME,s.SEPARATOR,d.CONDITION_NAME,h.CONDITION_NAME,s.SEPARATOR,R.CONDITION_NAME,O.CONDITION_NAME,g.CONDITION_NAME,s.SEPARATOR,S.CONDITION_NAME,A.CONDITION_NAME,N.CONDITION_NAME]),x);t.TYPES=L},function(e,t,n){"use strict";n(3),n(2),n(11),n(4),n(17);var r=n(18);t.__esModule=!0,t.SHORT_NAME_FOR_COMPONENT=t.OPERATION_ID=void 0,t.operationResult=u,n(0);var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var u=i?Object.getOwnPropertyDescriptor(e,s):null;u&&(u.get||u.set)?Object.defineProperty(o,s,u):o[s]=e[s]}o.default=e,n&&n.set(e,o);return o}(n(27)),i=n(193);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}t.OPERATION_ID="conjunction";var s=o.FILTERS_LABELS_CONJUNCTION;function u(e,t){return e.every((function(e){return e.func(t)}))}t.SHORT_NAME_FOR_COMPONENT=s,(0,i.registerOperation)("conjunction",s,u)},function(e,t,n){"use strict";n(7);var r=n(1);t.__esModule=!0,t.default=void 0;var o=r(n(5)),i=r(n(6)),a=r(n(49)),s=r(n(30)),u=r(n(15)),l=r(n(16)),c=r(n(13));n(3),n(0),n(2),n(11),n(4);var f=n(23),d=n(14),h=r(n(194));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,c.default)(e);if(t){var o=(0,c.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}var m=new WeakMap,y=function(e){(0,u.default)(n,e);var t=p(n);function n(e,r){var i;return(0,o.default)(this,n),i=t.call(this,e,(0,d.extend)(n.DEFAULTS,r)),m.set((0,a.default)(i),{}),i.registerHooks(),i}return(0,i.default)(n,[{key:"registerHooks",value:function(){var e=this;this.addLocalHook("click",(function(){return e.onClick()})),this.addLocalHook("keyup",(function(t){return e.onKeyup(t)}))}},{key:"build",value:function(){(0,s.default)((0,c.default)(n.prototype),"build",this).call(this);var e=m.get(this),t=this.hot.rootDocument.createElement("div");e.input=this._element.firstChild,(0,f.addClass)(this._element,"htUIInput"),(0,f.addClass)(t,"htUIInputIcon"),this._element.appendChild(t),this.update()}},{key:"update",value:function(){if(this.isBuilt()){var e=m.get(this).input;e.type=this.options.type,e.placeholder=this.translateIfPossible(this.options.placeholder),e.value=this.translateIfPossible(this.options.value)}}},{key:"focus",value:function(){this.isBuilt()&&m.get(this).input.focus()}},{key:"onClick",value:function(){}},{key:"onKeyup",value:function(e){this.options.value=e.target.value}}],[{key:"DEFAULTS",get:function(){return(0,d.clone)({placeholder:"",type:"text",tagName:"input"})}}]),n}(h.default);t.default=y},function(e,t,n){"use strict";n(7),n(52),n(8),n(40),n(17),n(87);var r=n(1);t.__esModule=!0,t.PLUGIN_PRIORITY=t.PLUGIN_KEY=t.Formulas=void 0,n(20),n(0),n(26),n(3),n(58),n(2),n(4),n(37),n(42),n(50),n(140),n(77),n(11);var o=r(n(44)),i=r(n(18)),a=r(n(32)),s=r(n(5)),u=r(n(6)),l=r(n(49)),c=r(n(30)),f=r(n(15)),d=r(n(16)),h=r(n(13)),p=r(n(54)),m=r(n(111)),y=r(n(110)),v=n(47),g=r(n(109)),E=n(89),T=n(45),C=n(34),b=n(962),w=n(963),R=n(624),O=n(144),S=n(97),A=r(n(71));function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){(0,p.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,h.default)(e);if(t){var o=(0,h.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,d.default)(this,n)}}function _(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}t.PLUGIN_KEY="formulas";t.PLUGIN_PRIORITY=260;A.default.getSingleton().register("afterNamedExpressionAdded"),A.default.getSingleton().register("afterNamedExpressionRemoved"),A.default.getSingleton().register("afterSheetAdded"),A.default.getSingleton().register("afterSheetRemoved"),A.default.getSingleton().register("afterSheetRenamed"),A.default.getSingleton().register("afterFormulasValuesUpdate");var I=function(e){return"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e},P=new WeakMap,x=new WeakMap,D=new WeakMap,L=function(e){(0,f.default)(n,e);var t=k(n);function n(){var e;(0,s.default)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),_((0,l.default)(e),P,{writable:!0,value:!1}),_((0,l.default)(e),x,{writable:!0,value:!1}),_((0,l.default)(e),D,{writable:!0,value:[["valuesUpdated",function(){var t;return(t=e).onEngineValuesUpdated.apply(t,arguments)}],["namedExpressionAdded",function(){var t;return(t=e).onEngineNamedExpressionsAdded.apply(t,arguments)}],["namedExpressionRemoved",function(){var t;return(t=e).onEngineNamedExpressionsRemoved.apply(t,arguments)}],["sheetAdded",function(){var t;return(t=e).onEngineSheetAdded.apply(t,arguments)}],["sheetRenamed",function(){var t;return(t=e).onEngineSheetRenamed.apply(t,arguments)}],["sheetRemoved",function(){var t;return(t=e).onEngineSheetRemoved.apply(t,arguments)}]]}),(0,p.default)((0,l.default)(e),"staticRegister",(0,g.default)("formulas")),(0,p.default)((0,l.default)(e),"engine",null),(0,p.default)((0,l.default)(e),"sheetName",null),e}return(0,u.default)(n,[{key:"sheetId",get:function(){return null===this.sheetName?null:this.engine.getSheetId(this.sheetName)}},{key:"isEnabled",value:function(){return!!this.hot.getSettings().formulas}},{key:"enablePlugin",value:function(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=(0,b.setupEngine)(this.hot))&&void 0!==e?e:this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){var r=this.addSheet(this.sheetName,this.hot.getSourceDataArray());!1!==r&&(this.sheetName=r)}this.addHook("beforeLoadData",(function(){return t.onBeforeLoadData.apply(t,arguments)})),this.addHook("afterLoadData",(function(){return t.onAfterLoadData.apply(t,arguments)})),this.addHook("modifyData",(function(){return t.onModifyData.apply(t,arguments)})),this.addHook("modifySourceData",(function(){return t.onModifySourceData.apply(t,arguments)})),this.addHook("beforeValidate",(function(){return t.onBeforeValidate.apply(t,arguments)})),this.addHook("afterSetSourceDataAtCell",(function(){return t.onAfterSetSourceDataAtCell.apply(t,arguments)})),this.addHook("afterSetDataAtCell",(function(){return t.onAfterSetDataAtCell.apply(t,arguments)})),this.addHook("afterSetDataAtRowProp",(function(){return t.onAfterSetDataAtCell.apply(t,arguments)})),this.addHook("beforeCreateRow",(function(){return t.onBeforeCreateRow.apply(t,arguments)})),this.addHook("beforeCreateCol",(function(){return t.onBeforeCreateCol.apply(t,arguments)})),this.addHook("afterCreateRow",(function(){return t.onAfterCreateRow.apply(t,arguments)})),this.addHook("afterCreateCol",(function(){return t.onAfterCreateCol.apply(t,arguments)})),this.addHook("beforeRemoveRow",(function(){return t.onBeforeRemoveRow.apply(t,arguments)})),this.addHook("beforeRemoveCol",(function(){return t.onBeforeRemoveCol.apply(t,arguments)})),this.addHook("afterRemoveRow",(function(){return t.onAfterRemoveRow.apply(t,arguments)})),this.addHook("afterRemoveCol",(function(){return t.onAfterRemoveCol.apply(t,arguments)})),this.addHook("beforeUndo",(function(e){"row_move"!==(null==e?void 0:e.actionType)&&t.engine.undo()})),this.addHook("beforeRedo",(function(e){"row_move"!==(null==e?void 0:e.actionType)&&t.engine.redo()})),this.addHook("afterDetachChild",(function(){return t.onAfterDetachChild.apply(t,arguments)})),this.addHook("beforeAutofill",(function(){return t.onBeforeAutofill.apply(t,arguments)})),(0,y.default)(this,D).forEach((function(e){var n=(0,a.default)(e,2),r=n[0],o=n[1];return t.engine.on(r,o)})),(0,c.default)((0,h.default)(n.prototype),"enablePlugin",this).call(this)}else(0,E.warn)("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}},{key:"disablePlugin",value:function(){var e=this;(0,y.default)(this,D).forEach((function(t){var n=(0,a.default)(t,2),r=n[0],o=n[1];return e.engine.off(r,o)})),(0,b.unregisterEngine)(this.engine,this.hot),this.engine=null,(0,c.default)((0,h.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(e){this.engine.updateConfig((0,R.getEngineSettingsWithOverrides)(this.hot.getSettings()));var t=this.hot.getSettings().formulas;if((0,C.isDefined)(t)&&(0,C.isDefined)(t.sheetName)&&t.sheetName!==this.sheetName&&this.switchSheet(t.sheetName),!e.data&&null===this.sheetName){var r=this.hot.getSettings().formulas.sheetName;r&&this.engine.doesSheetExist(r)?this.switchSheet(this.sheetName):this.sheetName=this.addSheet(null!=r?r:void 0,this.hot.getSourceDataArray())}(0,c.default)((0,h.default)(n.prototype),"updatePlugin",this).call(this,e)}},{key:"destroy",value:function(){var e=this;(0,y.default)(this,D).forEach((function(t){var n,r=(0,a.default)(t,2),o=r[0],i=r[1];return null===(n=e.engine)||void 0===n?void 0:n.off(o,i)})),(0,m.default)(this,D,null),(0,b.unregisterEngine)(this.engine,this.hot),this.engine=null,(0,c.default)((0,h.default)(n.prototype),"destroy",this).call(this)}},{key:"getPhysicalIndexPosition",value:function(e,t,n,r,o){return!o&&e>=n?r+(e-n):t}},{key:"toPhysicalRowPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPhysicalIndexPosition(e,this.hot.toPhysicalRow(e),this.hot.countRows(),this.hot.countSourceRows(),t)}},{key:"toPhysicalColumnPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPhysicalIndexPosition(e,this.hot.toPhysicalColumn(e),this.hot.countCols(),this.hot.countSourceCols(),t)}},{key:"addSheet",value:function(e,t){if((0,C.isDefined)(t)&&!(0,O.isArrayOfArrays)(t))return(0,E.warn)("The provided data should be an array of arrays."),!1;if(null!=e&&this.engine.doesSheetExist(e))return(0,E.warn)("Sheet with the provided name already exists."),!1;try{var n=this.engine.addSheet(null!=e?e:void 0);return t&&this.engine.setSheetContent(this.engine.getSheetId(n),t),n}catch(e){return(0,E.warn)(e.message),!1}}},{key:"switchSheet",value:function(e){if(this.engine.doesSheetExist(e)){this.sheetName=e;var t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,"".concat((0,S.toUpperCaseFirst)("formulas"),".switchSheet"))}else(0,E.error)("The sheet named `".concat(e,"` does not exist, switch aborted."))}},{key:"getCellType",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId,r=this.hot.toPhysicalRow(e),o=this.hot.toPhysicalColumn(t);return null!==r&&null!==o?this.engine.getCellType({sheet:n,row:r,col:o}):"EMPTY"}},{key:"isFormulaCellType",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId,r=this.hot.toPhysicalRow(e),o=this.hot.toPhysicalColumn(t);return null!==r&&null!==o&&this.engine.doesCellHaveFormula({sheet:n,row:r,col:o})}},{key:"renderDependentSheets",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Set;e.forEach((function(e){var t,n=null==e||null===(t=e.address)||void 0===t?void 0:t.sheet;void 0!==n&&(r.has(n)||r.add(n))})),(0,b.getRegisteredHotInstances)(this.engine).forEach((function(e,o){var i;(n||o!==t.sheetId)&&r.has(o)&&(e.render(),null===(i=e.view)||void 0===i||i.adjustElementsSize())}))}},{key:"validateDependentCells",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function(e){var t,n=null!==(t=null==e?void 0:e.address)&&void 0!==t?t:{},r=n.row,o=n.col,i=n.sheet;return(0,C.isDefined)(i)?"".concat(i,":").concat(r,"x").concat(o):""},o=new Set(n.map((function(e){return r(e)})));e.forEach((function(e){var n,i,a=null!==(n=e.address)&&void 0!==n?n:{},s=a.row,u=a.col,l=(0,C.isDefined)(s)?t.hot.toVisualRow(s):null,c=(0,C.isDefined)(u)?t.hot.toVisualColumn(u):null;if(null!==l&&null!==c){var f=null==e||null===(i=e.address)||void 0===i?void 0:i.sheet,d=r(e);if(void 0!==f&&!o.has(d)){var h=(0,b.getRegisteredHotInstances)(t.engine).get(f);h.validateCell(h.getDataAtCell(l,c),h.getCellMeta(l,c),(function(){}))}}}))}},{key:"syncChangeWithEngine",value:function(e,t,n){var r={row:this.toPhysicalRowPosition(e),col:this.toPhysicalColumnPosition(t),sheet:this.sheetId};if(this.engine.isItPossibleToSetCellContents(r))return this.engine.setCellContents(r,n);(0,E.warn)("Not possible to set cell data at ".concat(JSON.stringify(r)))}},{key:"onBeforeValidate",value:function(e,t,n){var r=this.hot.propToCol(n);if(this.isFormulaCellType(t,r)){var o={row:this.hot.toPhysicalRow(t),col:this.hot.toPhysicalColumn(r),sheet:this.sheetId},a=this.engine.getCellValue(o);return"object"===(0,i.default)(a)&&null!==a?a.value:a}return e}},{key:"onBeforeAutofill",value:function(e,t,n){var r=this,o=function(e){return M(M({},e),{},{sheet:r.sheetId})},i={start:o(t.getTopLeftCorner()),end:o(t.getBottomRightCorner())},a={start:o(n.getTopLeftCorner()),end:o(n.getBottomRightCorner())};return!1!==this.engine.isItPossibleToSetCellContents(a)&&this.engine.getFillRangeData(i,a)}},{key:"onBeforeLoadData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";n.includes((0,S.toUpperCaseFirst)("formulas"))||(0,m.default)(this,x,(0,C.isUndefined)(this.hot.getSettings().data))}},{key:"onAfterLoadData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!n.includes((0,S.toUpperCaseFirst)("formulas")))if(this.sheetName=(0,b.setupSheet)(this.engine,this.hot.getSettings().formulas.sheetName),(0,y.default)(this,x))this.switchSheet(this.sheetName);else{var r=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,r)){(0,m.default)(this,P,!0);var o=this.engine.setSheetContent(this.sheetId,this.hot.getSourceDataArray());this.renderDependentSheets(o),(0,m.default)(this,P,!1)}}}},{key:"onModifyData",value:function(e,t,n,r){if("get"===r&&!(0,y.default)(this,P)&&null!==this.sheetName&&this.engine.doesSheetExist(this.sheetName)){var o=this.hot.toVisualRow(e);if(!this.isFormulaCellType(o,t))if("ARRAY"!==this.getCellType(o,t))return void((0,w.isEscapedFormulaExpression)(n.value)&&(n.value=(0,w.unescapeFormulaExpression)(n.value)));var a={row:e,col:this.toPhysicalColumnPosition(t),sheet:this.sheetId},s=this.engine.getCellValue(a),u="object"===(0,i.default)(s)&&null!==s?s.value:s;n.value=u}}},{key:"onModifySourceData",value:function(e,t,n,r){if("get"===r&&!(0,y.default)(this,P)&&null!==this.sheetName&&this.engine.doesSheetExist(this.sheetName)){var o=this.hot.toVisualRow(e),i=this.hot.propToCol(t);if(!this.isFormulaCellType(o,i))if("ARRAY"!==this.getCellType(o,i))return;var a=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0!==a.width||0!==a.height){var s={row:e,col:this.toPhysicalColumnPosition(i),sheet:this.sheetId};n.value=this.engine.getCellSerialized(s)}}}},{key:"onAfterSetDataAtCell",value:function(e,t){var n=this;if(!I(t)){var r=[],o=[],i=this.engine.batch((function(){e.forEach((function(e){var t=(0,a.default)(e,4),i=t[0],s=t[1],u=t[3],l=n.hot.propToCol(s),c=n.hot.toPhysicalRow(i),f=n.hot.toPhysicalColumn(l),d={row:c,col:f,sheet:n.sheetId};null!==c&&null!==f?n.syncChangeWithEngine(i,l,u):r.push([i,l,u]),o.push({address:d})}))}));r.length&&this.hot.addHookOnce("afterChange",(function(){var e=n.engine.batch((function(){r.forEach((function(e){var t=(0,a.default)(e,3),r=t[0],o=t[1],i=t[2];n.syncChangeWithEngine(r,o,i)}))}));n.renderDependentSheets(e,!0)})),this.renderDependentSheets(i),this.validateDependentCells(i,o)}}},{key:"onAfterSetSourceDataAtCell",value:function(e,t){var n=this;if(!I(t)){var r=[],i=[];e.forEach((function(e){var t=(0,a.default)(e,4),s=t[0],u=t[1],l=t[3],c=n.hot.propToCol(u);if((0,T.isNumeric)(c)){var f={row:s,col:n.toPhysicalColumnPosition(c),sheet:n.sheetId};n.engine.isItPossibleToSetCellContents(f)?(i.push({address:f}),r.push.apply(r,(0,o.default)(n.engine.setCellContents(f,l)))):(0,E.warn)("Not possible to set source cell data at ".concat(JSON.stringify(f)))}})),this.renderDependentSheets(r),this.validateDependentCells(r,i)}}},{key:"onBeforeCreateRow",value:function(e,t){if(null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[this.toPhysicalRowPosition(e),t]))return!1}},{key:"onBeforeCreateCol",value:function(e,t){if(null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[this.toPhysicalColumnPosition(e),t]))return!1}},{key:"onBeforeRemoveRow",value:function(e,t,n){var r=this;return!1!==n.every((function(e){return r.engine.isItPossibleToRemoveRows(r.sheetId,[e,1])}))&&void 0}},{key:"onBeforeRemoveCol",value:function(e,t,n){var r=this;return!1!==n.every((function(e){return r.engine.isItPossibleToRemoveColumns(r.sheetId,[e,1])}))&&void 0}},{key:"onAfterCreateRow",value:function(e,t,n){if(!I(n)){var r=this.engine.addRows(this.sheetId,[this.toPhysicalRowPosition(e),t]);this.renderDependentSheets(r)}}},{key:"onAfterCreateCol",value:function(e,t,n){if(!I(n)){var r=this.engine.addColumns(this.sheetId,[this.toPhysicalColumnPosition(e),t]);this.renderDependentSheets(r)}}},{key:"onAfterRemoveRow",value:function(e,t,n,r){var o=this;if(!I(r)){var i=n.sort().reverse(),a=this.engine.batch((function(){i.forEach((function(e){o.engine.removeRows(o.sheetId,[e,1])}))}));this.renderDependentSheets(a)}}},{key:"onAfterRemoveCol",value:function(e,t,n,r){var o=this;if(!I(r)){var i=n.sort().reverse(),a=this.engine.batch((function(){i.forEach((function(e){o.engine.removeColumns(o.sheetId,[e,1])}))}));this.renderDependentSheets(a)}}},{key:"onAfterDetachChild",value:function(e,t,n){var r,o=this;(0,m.default)(this,P,!0);var i=this.hot.getSourceDataArray(n,0,n+((null===(r=t.__children)||void 0===r?void 0:r.length)||0),this.hot.countSourceCols());(0,m.default)(this,P,!1),i.forEach((function(e,t){e.forEach((function(e,r){o.engine.setCellContents({col:r,row:n+t,sheet:o.sheetId},[[e]])}))}))}},{key:"onEngineValuesUpdated",value:function(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}},{key:"onEngineNamedExpressionsAdded",value:function(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}},{key:"onEngineNamedExpressionsRemoved",value:function(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}},{key:"onEngineSheetAdded",value:function(e){this.hot.runHooks("afterSheetAdded",e)}},{key:"onEngineSheetRenamed",value:function(e,t){this.hot.runHooks("afterSheetRenamed",e,t)}},{key:"onEngineSheetRemoved",value:function(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}}],[{key:"PLUGIN_KEY",get:function(){return"formulas"}},{key:"PLUGIN_PRIORITY",get:function(){return 260}}]),n}(v.BasePlugin);t.Formulas=L},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.default=void 0;var o,i,a,s,u=r(n(85)),l=r(n(5)),c=r(n(6)),f=n(60),d=n(86),h=function(){function e(t,n,r,o){(0,l.default)(this,e),this.row=t,this.col=n,this.rowspan=r,this.colspan=o,this.removed=!1}return(0,c.default)(e,[{key:"normalize",value:function(e){var t=e.countRows(),n=e.countCols();this.row<0?this.row=0:this.row>t-1&&(this.row=t-1),this.col<0?this.col=0:this.col>n-1&&(this.col=n-1),this.row+this.rowspan>t-1&&(this.rowspan=t-this.row),this.col+this.colspan>n-1&&(this.colspan=n-this.col)}},{key:"includes",value:function(e,t){return this.row<=e&&this.col<=t&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=t}},{key:"includesHorizontally",value:function(e){return this.col<=e&&this.col+this.colspan-1>=e}},{key:"includesVertically",value:function(e){return this.row<=e&&this.row+this.rowspan-1>=e}},{key:"shift",value:function(e,t){var n=e[0]||e[1],r=t+Math.abs(e[0]||e[1])-1,o=e[0]?"colspan":"rowspan",i=e[0]?"col":"row",a=Math.min(t,r),s=Math.max(t,r),u=this[i],l=this[i]+this[o]-1;if(u>=t&&(this[i]+=n),n>0)t<=l&&t>u&&(this[o]+=n);else if(n<0){if(a<=u&&s>=l)return this.removed=!0,!1;if(u>=a&&u<=s){var c=s-u+1,f=Math.abs(n)-c;this[i]-=f+n,this[o]-=c}else if(u<=a&&l>=s)this[o]+=n;else if(u<=a&&l>=a&&l<s){var d=l-a+1;this[o]-=d}}return!0}},{key:"isFarther",value:function(e,t){return!e||("down"===t?e.row+e.rowspan-1<this.row+this.rowspan-1:"up"===t?e.row>this.row:"right"===t?e.col+e.colspan-1<this.col+this.colspan-1:"left"===t?e.col>this.col:null)}},{key:"getLastRow",value:function(){return this.row+this.rowspan-1}},{key:"getLastColumn",value:function(){return this.col+this.colspan-1}},{key:"getRange",value:function(){return new f.CellRange(new f.CellCoords(this.row,this.col),new f.CellCoords(this.row,this.col),new f.CellCoords(this.getLastRow(),this.getLastColumn()))}}],[{key:"NEGATIVE_VALUES_WARNING",value:function(e){return(0,d.toSingleLine)(o||(o=(0,u.default)(["The merged cell declared with {row: ",", col: ",", \n rowspan: ",", colspan: ","} contains negative values, which is \n not supported. It will not be added to the collection."],["The merged cell declared with {row: ",", col: ",",\\x20\n rowspan: ",", colspan: ","} contains negative values, which is\\x20\n not supported. It will not be added to the collection."])),e.row,e.col,e.rowspan,e.colspan)}},{key:"IS_OUT_OF_BOUNDS_WARNING",value:function(e){return(0,d.toSingleLine)(i||(i=(0,u.default)(["The merged cell declared at [",", ","] is positioned \n (or positioned partially) outside of the table range. It was not added to the table, please fix your setup."],["The merged cell declared at [",", ","] is positioned\\x20\n (or positioned partially) outside of the table range. It was not added to the table, please fix your setup."])),e.row,e.col)}},{key:"IS_SINGLE_CELL",value:function(e){return(0,d.toSingleLine)(a||(a=(0,u.default)(["The merged cell declared at [",", ",'] has both "rowspan" \n and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.'],["The merged cell declared at [",", ",'] has both "rowspan"\\x20\n and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.'])),e.row,e.col)}},{key:"ZERO_SPAN_WARNING",value:function(e){return(0,d.toSingleLine)(s||(s=(0,u.default)(["The merged cell declared at [",", ",'] has "rowspan" \n or "colspan" declared as "0", which is not supported. It cannot be added to the collection.'],["The merged cell declared at [",", ",'] has "rowspan"\\x20\n or "colspan" declared as "0", which is not supported. It cannot be added to the collection.'])),e.row,e.col)}},{key:"containsNegativeValues",value:function(e){return e.row<0||e.col<0||e.rowspan<0||e.colspan<0}},{key:"isSingleCell",value:function(e){return 1===e.colspan&&1===e.rowspan}},{key:"containsZeroSpan",value:function(e){return 0===e.colspan||0===e.rowspan}},{key:"isOutOfBounds",value:function(e,t,n){return e.row<0||e.col<0||e.row>=t||e.row+e.rowspan-1>=t||e.col>=n||e.col+e.colspan-1>=n}}]),e}();t.default=h},function(e,t,n){"use strict";var r=n(1);t.__esModule=!0,t.default=void 0;var o=r(n(6)),i=r(n(5)),a=(0,o.default)((function e(t,n){(0,i.default)(this,e),this.hot=n,this.plugin=t}));t.default=a},function(e,t,n){var r=n(28),o=n(78),i=n(63),a=n(197),s=n(131),u=n(634),l=n(59),c=r.TypeError,f=l("toPrimitive");e.exports=function(e,t){if(!i(e)||a(e))return e;var n,r=s(e,f);if(r){if(void 0===t&&(t="default"),n=o(r,e,t),!i(n)||a(n))return n;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),u(e,t)}},function(e,t,n){var r=n(233);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(72),o=n(41),i=n(201);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(72),o=n(41);e.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(e,t,n){var r=n(28),o=n(61),i=n(236),a=r.WeakMap;e.exports=o(a)&&/native code/.test(i(a))},function(e,t,n){var r=n(73),o=n(323),i=n(113),a=n(82);e.exports=function(e,t,n){for(var s=o(t),u=a.f,l=i.f,c=0;c<s.length;c++){var f=s[c];r(e,f)||n&&r(n,f)||u(e,f,l(t,f))}}},function(e,t,n){var r=n(121),o=n(35),i=n(148),a=n(239),s=n(64),u=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(s(e)),n=a.f;return n?u(t,n(e)):t}},function(e,t,n){var r=n(35),o=n(73),i=n(94),a=n(237).indexOf,s=n(166),u=r([].push);e.exports=function(e,t){var n,r=i(e),l=0,c=[];for(n in r)!o(s,n)&&o(r,n)&&u(c,n);for(;t.length>l;)o(r,n=t[l++])&&(~a(c,n)||u(c,n));return c}},function(e,t,n){var r=n(41);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var r=n(28),o=n(206),i=n(198),a=r.TypeError;e.exports=function(e){if(o(e))return e;throw a(i(e)+" is not a constructor")}},function(e,t,n){var r=n(72),o=n(320),i=n(82),a=n(64),s=n(94),u=n(169);t.f=r&&!o?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=u(t),l=o.length,c=0;l>c;)i.f(e,n=o[c++],r[n]);return e}},function(e,t,n){var r=n(121);e.exports=r("document","documentElement")},function(e,t,n){var r=n(78),o=n(64),i=n(131);e.exports=function(e,t,n){var a,s;o(e);try{if(!(a=i(e,"return"))){if("throw"===t)throw n;return n}a=r(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw n;if(s)throw a;return o(a),n}},function(e,t,n){var r=n(59),o=n(173),i=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},function(e,t,n){var r=n(28),o=n(78),i=n(147),a=n(64),s=n(198),u=n(247),l=r.TypeError;e.exports=function(e,t){var n=arguments.length<2?u(e):t;if(i(n))return a(o(n,e));throw l(s(e)+" is not iterable")}},function(e,t,n){var r=n(59)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},function(e,t,n){"use strict";var r,o,i,a=n(41),s=n(61),u=n(135),l=n(204),c=n(104),f=n(59),d=n(132),h=f("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(o=l(l(i)))!==Object.prototype&&(r=o):p=!0),null==r||a((function(){var e={};return r[h].call(e)!==e}))?r={}:d&&(r=u(r)),s(r[h])||c(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(e,t,n){var r=n(35),o=n(64),i=n(640);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return o(n),i(r),t?e(n,r):n.__proto__=r,n}}():void 0)},function(e,t,n){var r=n(59);t.f=r},function(e,t,n){var r=n(641),o=n(73),i=n(335),a=n(82).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){var r=n(201)("span").classList,o=r&&r.constructor&&r.constructor.prototype;e.exports=o===Object.prototype?void 0:o},function(e,t,n){"use strict";n.r(t),n.d(t,"DependencyGraph",(function(){return k}));n(83),n(37),n(24),n(3),n(0),n(58),n(2),n(4),n(20),n(26),n(40),n(21),n(8),n(9),n(10),n(12),n(7);var r=n(84),o=n(217),i=n(22),a=n(268),s=n(43),u=n(48),l=n(80),c=n(70),f=n(181),d=n(127),h=n(125),p=n(271),m=n(272),y=n(671),v=n(116),g=n(274),E=n(275),T=n(276);function C(e,t,n){return(C=b()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&w(o,n.prototype),o}).apply(null,arguments)}function b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function R(e){return function(e){if(Array.isArray(e))return N(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||A(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=A(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||A(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){if(e){if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(e,t):void 0}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var k=function(){function e(t,n,s,u,l,f,d,p){var m=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.addressMapping=t,this.rangeMapping=n,this.sheetMapping=s,this.arrayMapping=u,this.stats=l,this.lazilyTransformingAstService=f,this.functionRegistry=d,this.namedExpressions=p,this.changes=a.ContentChanges.empty(),this.dependencyQueryAddresses=function(e){if(e instanceof h.RangeVertex)return m.rangeDependencyQuery(e).map((function(e){var t=S(e,2),n=t[0];t[1];return n}));var t=m.formulaDependencyQuery(e);if(void 0!==t){var n=S(t,2),o=n[0];return n[1].map((function(e){return e instanceof c.NamedExpressionDependency?m.namedExpressions.namedExpressionOrPlaceholder(e.name,o.sheet).address:Object(i.isSimpleCellAddress)(e)?e:Object(r.simpleCellRange)(e.start,e.end)}))}return[]},this.dependencyQueryVertices=function(e){if(e instanceof h.RangeVertex)return m.rangeDependencyQuery(e).map((function(e){var t=S(e,2);t[0];return t[1]}));var t=m.formulaDependencyQuery(e);if(void 0!==t){var n=S(t,2),o=n[0];return n[1].map((function(e){if(e instanceof r.AbsoluteCellRange)return m.rangeMapping.fetchRange(e.start,e.end);if(e instanceof c.NamedExpressionDependency){var t=m.namedExpressions.namedExpressionOrPlaceholder(e.name,o.sheet);return m.addressMapping.fetchCell(t.address)}return m.addressMapping.fetchCell(e)}))}return[]},this.rangeDependencyQuery=function(e){var t,n=[],o=m.rangeMapping.findSmallerRange(e.range),i=o.smallerRangeVertex,a=o.restRange;void 0!==i&&m.graph.adjacentNodes(i).has(e)?(t=a,n.push([new r.AbsoluteCellRange(i.start,i.end),i])):t=e.range;var s,u=O(t.addresses(m));try{for(u.s();!(s=u.n()).done;){var l=s.value,c=m.addressMapping.getCell(l);c instanceof h.EmptyCellVertex&&(c.address=l),void 0!==c&&n.push([l,c])}}catch(e){u.e(e)}finally{u.f()}return n},this.formulaDependencyQuery=function(e){var t,n;if(e instanceof v.FormulaVertex){n=e.getAddress(m.lazilyTransformingAstService),t=e.getFormula(m.lazilyTransformingAstService);var r=Object(c.collectDependencies)(t,m.functionRegistry);return[n,Object(o.absolutizeDependencies)(r,n)]}},this.graph=new g.Graph(this.dependencyQueryVertices)}var t,n,b;return t=e,b=[{key:"buildEmpty",value:function(t,n,r,o,i){return new e(new p.AddressMapping(n.chooseAddressMappingPolicy),new E.RangeMapping,new T.SheetMapping(n.translationPackage),new m.ArrayMapping,i,t,r,o)}}],(n=[{key:"setFormulaToCell",value:function(e,t,n,r,o,i){var a=v.FormulaVertex.fromAst(t,e,r,this.lazilyTransformingAstService.version());return this.exchangeOrAddFormulaVertex(a),this.processCellDependencies(n,a),this.graph.markNodeAsSpecialRecentlyChanged(a),o&&this.markAsVolatile(a),i&&this.markAsDependentOnStructureChange(a),this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}},{key:"setParsingErrorToCell",value:function(e,t){var n=this.shrinkPossibleArrayAndGetCell(e);return this.exchangeOrAddGraphNode(n,t),this.addressMapping.setCell(e,t),this.graph.markNodeAsSpecialRecentlyChanged(t),this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}},{key:"setValueToCell",value:function(e,t){var n=this.shrinkPossibleArrayAndGetCell(e);if(n instanceof h.ArrayVertex&&this.arrayMapping.removeArray(n.getRange()),n instanceof h.ValueCellVertex)n.getValues().rawValue!==t.rawValue&&(n.setValues(t),this.graph.markNodeAsSpecialRecentlyChanged(n));else{var r=new h.ValueCellVertex(t.parsedValue,t.rawValue);this.exchangeOrAddGraphNode(n,r),this.addressMapping.setCell(e,r),this.graph.markNodeAsSpecialRecentlyChanged(r)}return this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}},{key:"setCellEmpty",value:function(e){var t=this.shrinkPossibleArrayAndGetCell(e);if(void 0===t)return a.ContentChanges.empty();if(this.graph.adjacentNodes(t).size>0){var n=new h.EmptyCellVertex(e);this.exchangeGraphNode(t,n),0===this.graph.adjacentNodesCount(n)?(this.removeVertex(n),this.addressMapping.removeCell(e)):(this.graph.markNodeAsSpecialRecentlyChanged(n),this.addressMapping.setCell(e,n))}else this.removeVertex(t),this.addressMapping.removeCell(e);return this.getAndClearContentChanges()}},{key:"ensureThatVertexIsNonArrayCellVertex",value:function(e){if(e instanceof h.ArrayVertex)throw new Error("Illegal operation")}},{key:"clearRecentlyChangedVertices",value:function(){this.graph.clearSpecialNodesRecentlyChanged()}},{key:"verticesToRecompute",value:function(){return new Set([].concat(R(this.graph.specialNodesRecentlyChanged),R(this.volatileVertices())))}},{key:"processCellDependencies",value:function(e,t){var n=this;e.forEach((function(e){if(e instanceof r.AbsoluteCellRange){var o=e,i=n.getRange(o.start,o.end);void 0===i&&(i=new h.RangeVertex(o),n.rangeMapping.setRange(i)),n.graph.addNode(i),o.isFinite()||n.graph.markNodeAsInfiniteRange(i);var a=n.rangeMapping.findSmallerRange(o),s=a.smallerRangeVertex,u=a.restRange;if(void 0!==s){if(n.graph.addEdge(s,i),i.bruteForce){i.bruteForce=!1;var l,f=O(o.addresses(n));try{for(f.s();!(l=f.n()).done;){var d=l.value;n.graph.removeEdge(n.fetchCell(d),i)}}catch(e){f.e(e)}finally{f.f()}}}else i.bruteForce=!0;var p=n.arrayMapping.getArray(u);if(void 0!==p)n.graph.addEdge(p,i);else{var m,y=O(u.addresses(n));try{for(y.s();!(m=y.n()).done;){var v=m.value;n.graph.addEdge(n.fetchCellOrCreateEmpty(v),i)}}catch(e){y.e(e)}finally{y.f()}}n.graph.addEdge(i,t),o.isFinite()&&n.correctInfiniteRangesDependenciesByRangeVertex(i)}else if(e instanceof c.NamedExpressionDependency){var g=t.getAddress(n.lazilyTransformingAstService).sheet,E=n.fetchNamedExpressionVertex(e.name,g);n.graph.addEdge(E,t)}else n.graph.addEdge(n.fetchCellOrCreateEmpty(e),t)}))}},{key:"fetchNamedExpressionVertex",value:function(e,t){var n=this.namedExpressions.namedExpressionOrPlaceholder(e,t);return this.fetchCellOrCreateEmpty(n.address)}},{key:"exchangeNode",value:function(e,t){var n=this.fetchCellOrCreateEmpty(e),r=this.fetchCellOrCreateEmpty(t);this.addressMapping.removeCell(e),this.exchangeGraphNode(n,r)}},{key:"correctInfiniteRangesDependency",value:function(e){var t,n=void 0,r=O(this.graph.infiniteRanges);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.range.addressInRange(e)&&(n=null!=n?n:this.fetchCellOrCreateEmpty(e),this.graph.addEdge(n,o))}}catch(e){r.e(e)}finally{r.f()}}},{key:"fetchCellOrCreateEmpty",value:function(e){var t=this.addressMapping.getCell(e);return void 0===t&&(t=new h.EmptyCellVertex(e),this.graph.addNode(t),this.addressMapping.setCell(e,t)),t}},{key:"removeRows",value:function(e){var t=this;this.stats.measure(d.StatType.ADJUSTING_GRAPH,(function(){var n,r=O(t.addressMapping.entriesFromRowsSpan(e));try{for(r.s();!(n=r.n()).done;){var o,i=S(n.value,2),a=i[0],s=i[1],u=O(t.graph.adjacentNodes(s));try{for(u.s();!(o=u.n()).done;){var l=o.value;t.graph.markNodeAsSpecialRecentlyChanged(l)}}catch(e){u.e(e)}finally{u.f()}if(s instanceof h.ArrayVertex){if(!s.isLeftCorner(a))continue;t.shrinkArrayToCorner(s),t.arrayMapping.removeArray(s.getRange())}t.removeVertex(s)}}catch(e){r.e(e)}finally{r.f()}})),this.stats.measure(d.StatType.ADJUSTING_ADDRESS_MAPPING,(function(){t.addressMapping.removeRows(e)}));var n=this.stats.measure(d.StatType.ADJUSTING_RANGES,(function(){var n=t.truncateRanges(e,(function(e){return e.row}));return t.getArrayVerticesRelatedToRanges(n)}));return this.stats.measure(d.StatType.ADJUSTING_ARRAY_MAPPING,(function(){t.fixArraysAfterRemovingRows(e.sheet,e.rowStart,e.numberOfRows)})),this.addStructuralNodesToChangeSet(),{affectedArrays:n,contentChanges:this.getAndClearContentChanges()}}},{key:"removeSheet",value:function(e){var t,n=this,r=new Set,o=O(this.addressMapping.sheetEntries(e));try{for(o.s();!(t=o.n()).done;){var i=S(t.value,2),a=i[0],s=i[1];if(s instanceof h.ArrayVertex){if(r.has(s))continue;r.add(s)}var u,l=O(this.graph.adjacentNodes(s));try{for(l.s();!(u=l.n()).done;){var c=u.value;this.graph.markNodeAsSpecialRecentlyChanged(c)}}catch(e){l.e(e)}finally{l.f()}this.removeVertex(s),this.addressMapping.removeCell(a)}}catch(e){o.e(e)}finally{o.f()}this.stats.measure(d.StatType.ADJUSTING_ARRAY_MAPPING,(function(){var e,t=O(r.values());try{for(t.s();!(e=t.n()).done;){var o=e.value;n.arrayMapping.removeArray(o.getRange())}}catch(e){t.e(e)}finally{t.f()}})),this.stats.measure(d.StatType.ADJUSTING_RANGES,(function(){var t,r=O(n.rangeMapping.removeRangesInSheet(e));try{for(r.s();!(t=r.n()).done;){var o=t.value;n.removeVertex(o)}}catch(e){r.e(e)}finally{r.f()}n.stats.measure(d.StatType.ADJUSTING_ADDRESS_MAPPING,(function(){n.addressMapping.removeSheet(e)}))})),this.addStructuralNodesToChangeSet()}},{key:"clearSheet",value:function(e){var t,n=new Set,r=O(this.addressMapping.sheetEntries(e));try{for(r.s();!(t=r.n()).done;){var o=S(t.value,2),i=o[0],a=o[1];a instanceof h.ArrayVertex?n.add(a):this.setCellEmpty(i)}}catch(e){r.e(e)}finally{r.f()}var s,u=O(n.values());try{for(u.s();!(s=u.n()).done;){var l=s.value;this.setArrayEmpty(l)}}catch(e){u.e(e)}finally{u.f()}this.addStructuralNodesToChangeSet()}},{key:"removeColumns",value:function(e){var t=this;this.stats.measure(d.StatType.ADJUSTING_GRAPH,(function(){var n,r=O(t.addressMapping.entriesFromColumnsSpan(e));try{for(r.s();!(n=r.n()).done;){var o,i=S(n.value,2),a=i[0],s=i[1],u=O(t.graph.adjacentNodes(s));try{for(u.s();!(o=u.n()).done;){var l=o.value;t.graph.markNodeAsSpecialRecentlyChanged(l)}}catch(e){u.e(e)}finally{u.f()}if(s instanceof h.ArrayVertex){if(!s.isLeftCorner(a))continue;t.shrinkArrayToCorner(s),t.arrayMapping.removeArray(s.getRange())}t.removeVertex(s)}}catch(e){r.e(e)}finally{r.f()}})),this.stats.measure(d.StatType.ADJUSTING_ADDRESS_MAPPING,(function(){t.addressMapping.removeColumns(e)}));var n=this.stats.measure(d.StatType.ADJUSTING_RANGES,(function(){var n=t.truncateRanges(e,(function(e){return e.col}));return t.getArrayVerticesRelatedToRanges(n)}));return this.stats.measure(d.StatType.ADJUSTING_ARRAY_MAPPING,(function(){return t.fixArraysAfterRemovingColumns(e.sheet,e.columnStart,e.numberOfColumns)})),this.addStructuralNodesToChangeSet(),{affectedArrays:n,contentChanges:this.getAndClearContentChanges()}}},{key:"addRows",value:function(e){var t=this;this.stats.measure(d.StatType.ADJUSTING_ADDRESS_MAPPING,(function(){t.addressMapping.addRows(e.sheet,e.rowStart,e.numberOfRows)}));var n=this.stats.measure(d.StatType.ADJUSTING_RANGES,(function(){var n=t.rangeMapping.moveAllRangesInSheetAfterRowByRows(e.sheet,e.rowStart,e.numberOfRows);return t.fixRangesWhenAddingRows(e.sheet,e.rowStart,e.numberOfRows),t.getArrayVerticesRelatedToRanges(n.verticesWithChangedSize)}));this.stats.measure(d.StatType.ADJUSTING_ARRAY_MAPPING,(function(){t.fixArraysAfterAddingRow(e.sheet,e.rowStart,e.numberOfRows)}));var r,o=O(this.addressMapping.verticesFromRowsSpan(e));try{for(o.s();!(r=o.n()).done;){var i=r.value;this.graph.markNodeAsSpecialRecentlyChanged(i)}}catch(e){o.e(e)}finally{o.f()}return this.addStructuralNodesToChangeSet(),{affectedArrays:n}}},{key:"addColumns",value:function(e){var t=this;this.stats.measure(d.StatType.ADJUSTING_ADDRESS_MAPPING,(function(){t.addressMapping.addColumns(e.sheet,e.columnStart,e.numberOfColumns)}));var n=this.stats.measure(d.StatType.ADJUSTING_RANGES,(function(){var n=t.rangeMapping.moveAllRangesInSheetAfterColumnByColumns(e.sheet,e.columnStart,e.numberOfColumns);return t.fixRangesWhenAddingColumns(e.sheet,e.columnStart,e.numberOfColumns),t.getArrayVerticesRelatedToRanges(n.verticesWithChangedSize)}));this.stats.measure(d.StatType.ADJUSTING_ARRAY_MAPPING,(function(){return t.fixArraysAfterAddingColumn(e.sheet,e.columnStart,e.numberOfColumns)}));var r,o=O(this.addressMapping.verticesFromColumnsSpan(e));try{for(o.s();!(r=o.n()).done;){var i=r.value;this.graph.markNodeAsSpecialRecentlyChanged(i)}}catch(e){o.e(e)}finally{o.f()}return this.addStructuralNodesToChangeSet(),{affectedArrays:n,contentChanges:this.getAndClearContentChanges()}}},{key:"ensureNoArrayInRange",value:function(e){if(this.arrayMapping.isFormulaArrayInRange(e))throw Error("It is not possible to move / replace cells with array")}},{key:"isThereSpaceForArray",value:function(e){var t=e.getRangeOrUndef();if(void 0===t)return!1;var n,r=O(t.addresses(this));try{for(r.s();!(n=r.n()).done;){var o=n.value,i=this.addressMapping.getCell(o);if(void 0!==i&&!(i instanceof h.EmptyCellVertex)&&i!==e)return!1}}catch(e){r.e(e)}finally{r.f()}return!0}},{key:"moveCells",value:function(e,t,n,r){var o,a=O(e.addressesWithDirection(t,n,this));try{for(a.s();!(o=a.n()).done;){var s=o.value,u=Object(i.simpleCellAddress)(r,s.col+t,s.row+n),l=this.addressMapping.getCell(s),c=this.addressMapping.getCell(u);if(this.addressMapping.removeCell(s),void 0!==l){this.graph.markNodeAsSpecialRecentlyChanged(l),this.addressMapping.setCell(u,l);var f,d=void 0,p=O(this.graph.adjacentNodes(l));try{for(p.s();!(f=p.n()).done;){var m=f.value;m instanceof h.RangeVertex&&!e.containsRange(m.range)&&(d=null!=d?d:this.fetchCellOrCreateEmpty(s),this.graph.addEdge(d,m),this.graph.removeEdge(l,m))}}catch(e){p.e(e)}finally{p.f()}d&&(this.graph.markNodeAsSpecialRecentlyChanged(d),this.addressMapping.setCell(s,d))}if(void 0!==c){void 0===l&&this.addressMapping.removeCell(u);var y,v=O(this.graph.adjacentNodes(c));try{for(v.s();!(y=v.n()).done;){var g=y.value;l=null!=l?l:this.fetchCellOrCreateEmpty(u),this.graph.addEdge(l,g),this.graph.markNodeAsSpecialRecentlyChanged(l)}}catch(e){v.e(e)}finally{v.f()}this.removeVertex(c)}}}catch(e){a.e(e)}finally{a.f()}var E,T=O(this.rangeMapping.rangeVerticesContainedInRange(e));try{for(T.s();!(E=T.n()).done;){var C,b=E.value,w=O(this.graph.adjacentNodes(b));try{for(w.s();!(C=w.n()).done;){var R=C.value;if(R instanceof h.RangeVertex&&!e.containsRange(R.range)){this.graph.removeEdge(b,R);var S,A=O(b.range.addresses(this));try{for(A.s();!(S=A.n()).done;){var N=S.value,M=this.fetchCellOrCreateEmpty(N);this.graph.addEdge(M,R),this.addressMapping.setCell(N,M),this.graph.markNodeAsSpecialRecentlyChanged(M)}}catch(e){A.e(e)}finally{A.f()}}}}catch(e){w.e(e)}finally{w.f()}}}catch(e){T.e(e)}finally{T.f()}this.rangeMapping.moveRangesInsideSourceRange(e,t,n,r)}},{key:"setArrayEmpty",value:function(e){var t,n=r.AbsoluteCellRange.spanFrom(e.getAddress(this.lazilyTransformingAstService),e.width,e.height),o=this.graph.adjacentNodes(e),i=O(n.addresses(this));try{for(i.s();!(t=i.n()).done;){var a=t.value;this.addressMapping.removeCell(a)}}catch(e){i.e(e)}finally{i.f()}var s,u=O(o.values());try{for(u.s();!(s=u.n()).done;){var l,c=s.value,f=Object(y.collectAddressesDependentToRange)(this.functionRegistry,c,e.getRange(),this.lazilyTransformingAstService,this),d=O(f);try{for(d.s();!(l=d.n()).done;){var h=l.value,p=this.fetchCellOrCreateEmpty(h);this.graph.addEdge(p,c)}}catch(e){d.e(e)}finally{d.f()}f.length>0&&this.graph.markNodeAsSpecialRecentlyChanged(c)}}catch(e){u.e(e)}finally{u.f()}this.removeVertex(e),this.arrayMapping.removeArray(e.getRange())}},{key:"addVertex",value:function(e,t){this.graph.addNode(t),this.addressMapping.setCell(e,t)}},{key:"addArrayVertex",value:function(e,t){this.graph.addNode(t),this.setAddressMappingForArrayVertex(t,e)}},{key:"arrayFormulaNodes",value:regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=O(this.graph.nodes),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=10;break}if(!((r=n.value)instanceof h.ArrayVertex)){e.next=8;break}return e.next=8,r;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[1,12,15,18]])}))},{key:"entriesFromRowsSpan",value:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.addressMapping.entriesFromRowsSpan(t),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"entriesFromColumnsSpan",value:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.addressMapping.entriesFromColumnsSpan(t),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"existsVertex",value:function(e){return this.addressMapping.has(e)}},{key:"fetchCell",value:function(e){return this.addressMapping.fetchCell(e)}},{key:"getCell",value:function(e){return this.addressMapping.getCell(e)}},{key:"getCellValue",value:function(e){return this.addressMapping.getCellValue(e)}},{key:"getRawValue",value:function(e){return this.addressMapping.getRawValue(e)}},{key:"getScalarValue",value:function(e){var t=this.addressMapping.getCellValue(e);return t instanceof l.SimpleRangeValue?new i.CellError(i.ErrorType.VALUE,s.ErrorMessage.ScalarExpected):t}},{key:"existsEdge",value:function(e,t){return this.graph.existsEdge(e,t)}},{key:"getSheetId",value:function(e){return this.sheetMapping.fetch(e)}},{key:"getSheetHeight",value:function(e){return this.addressMapping.getHeight(e)}},{key:"getSheetWidth",value:function(e){return this.addressMapping.getWidth(e)}},{key:"getArray",value:function(e){return this.arrayMapping.getArray(e)}},{key:"setArray",value:function(e,t){this.arrayMapping.setArray(e,t)}},{key:"getRange",value:function(e,t){return this.rangeMapping.getRange(e,t)}},{key:"topSortWithScc",value:function(){return this.graph.topSortWithScc()}},{key:"markAsVolatile",value:function(e){this.graph.markNodeAsSpecial(e)}},{key:"markAsDependentOnStructureChange",value:function(e){this.graph.markNodeAsChangingWithStructure(e)}},{key:"forceApplyPostponedTransformations",value:function(){var e,t=O(this.graph.nodes.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;n instanceof h.FormulaCellVertex&&n.ensureRecentData(this.lazilyTransformingAstService)}}catch(e){t.e(e)}finally{t.f()}}},{key:"volatileVertices",value:function(){return this.graph.specialNodes}},{key:"getArrayVerticesRelatedToRanges",value:function(e){var t=this,n=e.map((function(e){return t.graph.hasNode(e)?Array.from(t.graph.adjacentNodes(e)).filter((function(e){return e instanceof h.ArrayVertex})):[]}));return C(Set,R(n))}},{key:"rawValuesFromRange",value:regeneratorRuntime.mark((function e(t){var n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=O(t.addresses(this)),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=11;break}if(o=r.value,(i=this.getScalarValue(o))===u.EmptyValue){e.next=9;break}return e.next=9,[Object(u.getRawValue)(i),o];case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),n.e(e.t0);case 16:return e.prev=16,n.f(),e.finish(16);case 19:case"end":return e.stop()}}),e,this,[[1,13,16,19]])}))},{key:"entriesFromRange",value:regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=O(t.addresses(this)),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return o=r.value,e.next=7,[o,this.getCell(o)];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"exchangeGraphNode",value:function(e,t){var n=this;this.graph.addNode(t);var r=this.graph.adjacentNodes(e);this.removeVertex(e),r.forEach((function(e){n.graph.hasNode(e)&&n.graph.addEdge(t,e)}))}},{key:"exchangeOrAddGraphNode",value:function(e,t){e?this.exchangeGraphNode(e,t):this.graph.addNode(t)}},{key:"computeListOfValuesInRange",value:function(e){var t,n=[],r=O(e.addresses(this));try{for(r.s();!(t=r.n()).done;){var o=t.value,i=this.getScalarValue(o);n.push(i)}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"shrinkArrayToCorner",value:function(e){this.cleanAddressMappingUnderArray(e);var t,n=O(this.adjacentArrayVertices(e));try{for(n.s();!(t=n.n()).done;){var r=t.value,o=void 0;o=r instanceof v.FormulaVertex?this.formulaDirectDependenciesToArray(r,e):this.rangeDirectDependenciesToArray(r,e);var i,a=!1,s=O(o);try{for(s.s();!(i=s.n()).done;){var u=S(i.value,2),l=u[0],c=u[1];e.isLeftCorner(l)&&(a=!0),this.graph.addEdge(c,r),this.graph.markNodeAsSpecialRecentlyChanged(c)}}catch(e){s.e(e)}finally{s.f()}a||this.graph.removeEdge(e,r)}}catch(e){n.e(e)}finally{n.f()}this.graph.markNodeAsSpecialRecentlyChanged(e)}},{key:"isArrayInternalCell",value:function(e){var t=this.getCell(e);return t instanceof h.ArrayVertex&&!t.isLeftCorner(e)}},{key:"getAndClearContentChanges",value:function(){var e=this.changes;return this.changes=a.ContentChanges.empty(),e}},{key:"getAdjacentNodesAddresses",value:function(e){var t=this,n=this.graph.adjacentNodes(e),o=[];return n.forEach((function(e){var n=e;n instanceof h.RangeVertex?o.push(Object(r.simpleCellRange)(n.start,n.end)):o.push(n.getAddress(t.lazilyTransformingAstService))})),o}},{key:"correctInfiniteRangesDependenciesByRangeVertex",value:function(e){var t,n=O(this.graph.infiniteRanges);try{for(n.s();!(t=n.n()).done;){var r=t.value,o=r,i=e.range.intersectionWith(o.range);if(void 0!==i){var a,s=O(i.addresses(this));try{for(s.s();!(a=s.n()).done;){var u=a.value;this.graph.addEdge(this.fetchCellOrCreateEmpty(u),r)}}catch(e){s.e(e)}finally{s.f()}}}}catch(e){n.e(e)}finally{n.f()}}},{key:"cleanAddressMappingUnderArray",value:function(e){var t,n=O(e.getRange().addresses(this));try{for(n.s();!(t=n.n()).done;){var r=t.value,o=e.getArrayCellValue(r);this.getCell(r)===e?e.isLeftCorner(r)?this.changes.addChange(new i.CellError(i.ErrorType.REF),r,o):(this.addressMapping.removeCell(r),this.changes.addChange(u.EmptyValue,r,o)):this.changes.addChange(u.EmptyValue,r,o)}}catch(e){n.e(e)}finally{n.f()}}},{key:"formulaDirectDependenciesToArray",value:regeneratorRuntime.mark((function e(t,n){var o,i,a,s,u,l,f,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null!==(o=this.formulaDependencyQuery(t))&&void 0!==o?o:[],a=S(i,2),void 0!==(s=a[1])){e.next=3;break}return e.abrupt("return");case 3:u=O(s),e.prev=4,u.s();case 6:if((l=u.n()).done){e.next=16;break}if(!((f=l.value)instanceof c.NamedExpressionDependency||f instanceof r.AbsoluteCellRange)){e.next=10;break}return e.abrupt("continue",14);case 10:if(!n.getRange().addressInRange(f)){e.next=14;break}return d=this.fetchCellOrCreateEmpty(f),e.next=14,[f,d];case 14:e.next=6;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(4),u.e(e.t0);case 21:return e.prev=21,u.f(),e.finish(21);case 24:case"end":return e.stop()}}),e,this,[[4,18,21,24]])}))},{key:"rangeDirectDependenciesToArray",value:regeneratorRuntime.mark((function e(t,n){var r,o,i,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=this.rangeMapping.findSmallerRange(t.range),o=r.restRange,i=O(o.addresses(this)),e.prev=2,i.s();case 4:if((a=i.n()).done){e.next=12;break}if(s=a.value,!n.getRange().addressInRange(s)){e.next=10;break}return u=this.fetchCellOrCreateEmpty(s),e.next=10,[s,u];case 10:e.next=4;break;case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),i.e(e.t0);case 17:return e.prev=17,i.f(),e.finish(17);case 20:case"end":return e.stop()}}),e,this,[[2,14,17,20]])}))},{key:"adjacentArrayVertices",value:regeneratorRuntime.mark((function e(t){var n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.graph.adjacentNodes(t),r=O(n),e.prev=2,r.s();case 4:if((o=r.n()).done){e.next=11;break}if(!((i=o.value)instanceof v.FormulaVertex||i instanceof h.RangeVertex)){e.next=9;break}return e.next=9,i;case 9:e.next=4;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),r.e(e.t0);case 16:return e.prev=16,r.f(),e.finish(16);case 19:case"end":return e.stop()}}),e,this,[[2,13,16,19]])}))},{key:"addStructuralNodesToChangeSet",value:function(){var e,t=O(this.graph.specialNodesStructuralChanges);try{for(t.s();!(e=t.n()).done;){var n=e.value;this.graph.markNodeAsSpecialRecentlyChanged(n)}}catch(e){t.e(e)}finally{t.f()}}},{key:"fixRangesWhenAddingRows",value:function(e,t,n){for(var o=0,a=Array.from(this.rangeMapping.rangesInSheet(e));o<a.length;o++){var s=a[o];if(s.range.includesRow(t+n))if(s.bruteForce){var u,l=O(s.range.rangeWithSameWidth(t,n).addresses(this));try{for(l.s();!(u=l.n()).done;){var c=u.value;this.graph.addEdge(this.fetchCellOrCreateEmpty(c),s)}}catch(e){l.e(e)}finally{l.f()}}else{var f=s,d=this.rangeMapping.findSmallerRange(f.range);if(void 0!==d.smallerRangeVertex)continue;for(;void 0===d.smallerRangeVertex;){var p=new h.RangeVertex(r.AbsoluteCellRange.spanFrom(f.range.start,f.range.width(),f.range.height()-1));this.rangeMapping.setRange(p),this.graph.addNode(p);var m=new r.AbsoluteCellRange(Object(i.simpleCellAddress)(f.range.start.sheet,f.range.start.col,f.range.end.row),f.range.end);this.addAllFromRange(m,f),this.graph.addEdge(p,f),f=p,d=this.rangeMapping.findSmallerRange(f.range)}this.graph.addEdge(d.smallerRangeVertex,f),this.addAllFromRange(d.restRange,f),this.graph.removeEdge(d.smallerRangeVertex,s)}}}},{key:"addAllFromRange",value:function(e,t){var n,r=O(e.addresses(this));try{for(r.s();!(n=r.n()).done;){var o=n.value;this.graph.addEdge(this.fetchCellOrCreateEmpty(o),t)}}catch(e){r.e(e)}finally{r.f()}}},{key:"fixRangesWhenAddingColumns",value:function(e,t,n){var o,a=O(this.rangeMapping.rangesInSheet(e));try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.range.includesColumn(t+n)){var u,l=O((s.bruteForce?s.range.rangeWithSameHeight(t,n):r.AbsoluteCellRange.spanFrom(Object(i.simpleCellAddress)(e,t,s.range.end.row),n,1)).addresses(this));try{for(l.s();!(u=l.n()).done;){var c=u.value;this.graph.addEdge(this.fetchCellOrCreateEmpty(c),s)}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){a.e(e)}finally{a.f()}}},{key:"exchangeOrAddFormulaVertex",value:function(e){var t=e.getAddress(this.lazilyTransformingAstService),n=r.AbsoluteCellRange.spanFrom(t,e.width,e.height),o=this.shrinkPossibleArrayAndGetCell(t);if(e instanceof h.ArrayVertex&&this.setArray(n,e),this.exchangeOrAddGraphNode(o,e),this.addressMapping.setCell(t,e),e instanceof h.ArrayVertex){if(!this.isThereSpaceForArray(e))return;var i,a=O(n.addresses(this));try{for(a.s();!(i=a.n()).done;){var s=i.value;if(!e.isLeftCorner(s)){var u=this.getCell(s);this.exchangeOrAddGraphNode(u,e)}}}catch(e){a.e(e)}finally{a.f()}}var l,c=O(n.addresses(this));try{for(c.s();!(l=c.n()).done;){var f=l.value;this.addressMapping.setCell(f,e)}}catch(e){c.e(e)}finally{c.f()}}},{key:"setAddressMappingForArrayVertex",value:function(e,t){if(this.addressMapping.setCell(t,e),e instanceof h.ArrayVertex){var n=r.AbsoluteCellRange.spanFromOrUndef(t,e.width,e.height);if(void 0!==n&&(this.setArray(n,e),this.isThereSpaceForArray(e))){var o,i=O(n.addresses(this));try{for(i.s();!(o=i.n()).done;){var a=o.value;this.addressMapping.setCell(a,e)}}catch(e){i.e(e)}finally{i.f()}}}}},{key:"truncateRanges",value:function(e,t){var n,r=this.rangeMapping.truncateRanges(e,t),o=r.verticesToRemove,i=r.verticesToMerge,a=r.verticesWithChangedSize,s=O(i);try{for(s.s();!(n=s.n()).done;){var u=S(n.value,2),l=u[0],c=u[1];this.mergeRangeVertices(l,c)}}catch(e){s.e(e)}finally{s.f()}var f,d=O(o);try{for(d.s();!(f=d.n()).done;){var h=f.value;this.removeVertexAndCleanupDependencies(h)}}catch(e){d.e(e)}finally{d.f()}return a}},{key:"fixArraysAfterAddingRow",value:function(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,n),!(t<=0)){var r,o=O(this.arrayMapping.arraysInRows(f.RowsSpan.fromRowStartAndEnd(e,t-1,t-1)));try{for(o.s();!(r=o.n()).done;)for(var a=S(r.value,2)[1],s=a.getRange(),l=s.start.col;l<=s.end.col;++l)for(var c=t;c<=s.end.row;++c){var d=Object(i.simpleCellAddress)(e,l,c),h=Object(i.simpleCellAddress)(e,l,c+n),p=a.getArrayCellValue(d);this.addressMapping.moveCell(h,d),this.changes.addChange(u.EmptyValue,h,p)}}catch(e){o.e(e)}finally{o.f()}}}},{key:"fixArraysAfterRemovingRows",value:function(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,-n),!(t<=0)){var r,o=O(this.arrayMapping.arraysInRows(f.RowsSpan.fromRowStartAndEnd(e,t-1,t-1)));try{for(o.s();!(r=o.n()).done;){var i=S(r.value,2)[1];if(this.isThereSpaceForArray(i)){var a,s=O(i.getRange().addresses(this));try{for(s.s();!(a=s.n()).done;){var u=a.value;this.addressMapping.setCell(u,i)}}catch(e){s.e(e)}finally{s.f()}}else this.setNoSpaceIfArray(i)}}catch(e){o.e(e)}finally{o.f()}}}},{key:"fixArraysAfterAddingColumn",value:function(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,n),!(t<=0)){var r,o=O(this.arrayMapping.arraysInCols(f.ColumnsSpan.fromColumnStartAndEnd(e,t-1,t-1)));try{for(o.s();!(r=o.n()).done;)for(var a=S(r.value,2)[1],s=a.getRange(),l=s.start.row;l<=s.end.row;++l)for(var c=t;c<=s.end.col;++c){var d=Object(i.simpleCellAddress)(e,c,l),h=Object(i.simpleCellAddress)(e,c+n,l),p=a.getArrayCellValue(d);this.addressMapping.moveCell(h,d),this.changes.addChange(u.EmptyValue,h,p)}}catch(e){o.e(e)}finally{o.f()}}}},{key:"fixArraysAfterRemovingColumns",value:function(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,-n),!(t<=0)){var r,o=O(this.arrayMapping.arraysInCols(f.ColumnsSpan.fromColumnStartAndEnd(e,t-1,t-1)));try{for(o.s();!(r=o.n()).done;){var i=S(r.value,2)[1];if(this.isThereSpaceForArray(i)){var a,s=O(i.getRange().addresses(this));try{for(s.s();!(a=s.n()).done;){var u=a.value;this.addressMapping.setCell(u,i)}}catch(e){s.e(e)}finally{s.f()}}else this.setNoSpaceIfArray(i)}}catch(e){o.e(e)}finally{o.f()}}}},{key:"shrinkPossibleArrayAndGetCell",value:function(e){var t=this.getCell(e);return t instanceof h.ArrayVertex?(this.setNoSpaceIfArray(t),this.getCell(e)):t}},{key:"setNoSpaceIfArray",value:function(e){e instanceof h.ArrayVertex&&(this.shrinkArrayToCorner(e),e.setNoSpace())}},{key:"removeVertex",value:function(e){this.removeVertexAndCleanupDependencies(e),e instanceof h.RangeVertex&&this.rangeMapping.removeRange(e)}},{key:"mergeRangeVertices",value:function(e,t){var n=this,r=this.graph.adjacentNodes(t);this.removeVertexAndCleanupDependencies(t),this.graph.softRemoveEdge(e,t),r.forEach((function(t){n.graph.hasNode(t)&&n.graph.addEdge(e,t)}))}},{key:"removeVertexAndCleanupDependencies",value:function(e){for(var t=new Set(this.graph.removeNode(e));t.size>0;){var n=t.values().next().value;t.delete(n),this.graph.hasNode(n)&&0===this.graph.adjacentNodesCount(n)&&((n instanceof h.RangeVertex||n instanceof h.EmptyCellVertex)&&this.graph.removeNode(n).forEach((function(e){return t.add(e)})),n instanceof h.RangeVertex?this.rangeMapping.removeRange(n):n instanceof h.EmptyCellVertex&&this.addressMapping.removeCell(n.address))}}}])&&M(t.prototype,n),b&&M(t,b),e}()},function(e,t,n){var r=n(41),o=n(63),i=n(120),a=n(644),s=Object.isExtensible,u=r((function(){s(1)}));e.exports=u||a?function(e){return!!o(e)&&((!a||"ArrayBuffer"!=i(e))&&(!s||s(e)))}:s},function(e,t,n){var r=n(41);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var r=n(82).f,o=n(135),i=n(254),a=n(172),s=n(252),u=n(251),l=n(249),c=n(343),f=n(72),d=n(175).fastKey,h=n(114),p=h.set,m=h.getterFor;e.exports={getConstructor:function(e,t,n,l){var c=e((function(e,r){s(e,h),p(e,{type:t,index:o(null),first:void 0,last:void 0,size:0}),f||(e.size=0),null!=r&&u(r,e[l],{that:e,AS_ENTRIES:n})})),h=c.prototype,y=m(t),v=function(e,t,n){var r,o,i=y(e),a=g(e,t);return a?a.value=n:(i.last=a={index:o=d(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),f?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},g=function(e,t){var n,r=y(e),o=d(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return i(h,{clear:function(){for(var e=y(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,f?e.size=0:this.size=0},delete:function(e){var t=y(this),n=g(this,e);if(n){var r=n.next,o=n.previous;delete t.index[n.index],n.removed=!0,o&&(o.next=r),r&&(r.previous=o),t.first==n&&(t.first=r),t.last==n&&(t.last=o),f?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=y(this),r=a(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!g(this,e)}}),i(h,n?{get:function(e){var t=g(this,e);return t&&t.value},set:function(e,t){return v(this,0===e?0:e,t)}}:{add:function(e){return v(this,e=0===e?0:e,e)}}),f&&r(h,"size",{get:function(){return y(this).size}}),c},setStrong:function(e,t,n){var r=t+" Iterator",o=m(t),i=m(r);l(e,t,(function(e,t){p(this,{type:r,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),c(t)}}},function(e,t,n){"use strict";var r=n(121),o=n(82),i=n(59),a=n(72),s=i("species");e.exports=function(e){var t=r(e),n=o.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(35);e.exports=r(1..valueOf)},function(e,t,n){var r=n(35),o=n(90),i=n(74),a=n(346),s=r("".replace),u="["+a+"]",l=RegExp("^"+u+u+"*"),c=RegExp(u+u+"*$"),f=function(e){return function(t){var n=i(o(t));return 1&e&&(n=s(n,l,"")),2&e&&(n=s(n,c,"")),n}};e.exports={start:f(1),end:f(2),trim:f(3)}},function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(e,t,n){var r=n(41),o=n(28).RegExp;e.exports=r((function(){var e=o(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},function(e,t,n){var r=n(41),o=n(28).RegExp;e.exports=r((function(){var e=o("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},function(e,t,n){var r=n(120),o=n(28);e.exports="process"==r(o.process)},function(e,t,n){"use strict";n.r(t),n.d(t,"ReferenceType",(function(){return r})),n.d(t,"ColumnAddress",(function(){return s}));n(20);var r,o=n(22),i=n(99);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e.RELATIVE="RELATIVE",e.ABSOLUTE="ABSOLUTE"}(r||(r={}));var s=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=t,this.col=n,this.sheet=r}var t,n,s;
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/return t=e,s=[{key:"absolute",value:function(t,n){return new e(r.ABSOLUTE,t,n)}},{key:"relative",value:function(t,n){return new e(r.RELATIVE,t,n)}}],(n=[{key:"isColumnAbsolute",value:function(){return this.type===r.ABSOLUTE}},{key:"isColumnRelative",value:function(){return this.type===r.RELATIVE}},{key:"isAbsolute",value:function(){return this.type===r.ABSOLUTE&&void 0!==this.sheet}},{key:"moved",value:function(t,n,r){var o=void 0===this.sheet?void 0:t;return new e(this.type,this.col+n,o)}},{key:"shiftedByColumns",value:function(t){return new e(this.type,this.col+t,this.sheet)}},{key:"toSimpleColumnAddress",value:function(e){var t=Object(o.absoluteSheetReference)(this,e),n=this.col;return this.isColumnRelative()&&(n=e.col+this.col),Object(o.simpleColumnAddress)(t,n)}},{key:"shiftRelativeDimensions",value:function(t,n){var r=this.isColumnRelative()?this.col+t:this.col;return new e(this.type,r,this.sheet)}},{key:"shiftAbsoluteDimensions",value:function(t,n){var r=this.isColumnAbsolute()?this.col+t:this.col;return new e(this.type,r,this.sheet)}},{key:"withAbsoluteSheet",value:function(t){return new e(this.type,this.col,t)}},{key:"isInvalid",value:function(e){return this.toSimpleColumnAddress(e).col<0}},{key:"hash",value:function(e){var t=e&&void 0!==this.sheet?"#".concat(this.sheet):"";switch(this.type){case r.RELATIVE:return"".concat(t,"#COLR").concat(this.col);case r.ABSOLUTE:return"".concat(t,"#COLA").concat(this.col)}}},{key:"unparse",value:function(e){var t=this.toSimpleColumnAddress(e);if(!Object(o.invalidSimpleColumnAddress)(t)){var n=Object(i.columnIndexToLabel)(t.col),a=this.type===r.ABSOLUTE?"$":"";return"".concat(a).concat(n)}}},{key:"exceedsSheetSizeLimits",value:function(e){return this.col>=e}}])&&a(t.prototype,n),s&&a(t,s),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"DEFAULT_MODE",(function(){return f})),n.d(t,"MODES",(function(){return d})),n.d(t,"SUPPORT_STICKY",(function(){return h})),n.d(t,"disableSticky",(function(){return p})),n.d(t,"enableSticky",(function(){return m})),n.d(t,"analyzeTokenTypes",(function(){return y})),n.d(t,"validatePatterns",(function(){return v})),n.d(t,"findMissingPatterns",(function(){return g})),n.d(t,"findInvalidPatterns",(function(){return E})),n.d(t,"findEndOfInputAnchor",(function(){return C})),n.d(t,"findEmptyMatchRegExps",(function(){return b})),n.d(t,"findStartOfInputAnchor",(function(){return R})),n.d(t,"findUnsupportedFlags",(function(){return O})),n.d(t,"findDuplicatePatterns",(function(){return S})),n.d(t,"findInvalidGroupType",(function(){return A})),n.d(t,"findModesThatDoNotExist",(function(){return N})),n.d(t,"findUnreachablePatterns",(function(){return M})),n.d(t,"addStartOfInput",(function(){return k})),n.d(t,"addStickyFlag",(function(){return _})),n.d(t,"performRuntimeChecks",(function(){return I})),n.d(t,"performWarningRuntimeChecks",(function(){return P})),n.d(t,"cloneEmptyGroups",(function(){return x})),n.d(t,"isCustomPattern",(function(){return D})),n.d(t,"isShortPattern",(function(){return L})),n.d(t,"LineTerminatorOptimizedTester",(function(){return F})),n.d(t,"buildLineBreakIssueMessage",(function(){return U})),n.d(t,"minOptimizationVal",(function(){return B})),n.d(t,"charCodeToOptimizedIndex",(function(){return W}));var r,o=n(261),i=n(152),a=n(46),s=n(651),u=n(262),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c="PATTERN",f="defaultMode",d="modes",h="boolean"==typeof new RegExp("(?:)").sticky;function p(){h=!1}function m(){h=!0}function y(e,t){var n,r=(t=Object(a.defaults)(t,{useSticky:h,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(e,t){return t()}})).tracer;r("initCharCodeToOptimizedIndexMap",(function(){!function(){if(Object(a.isEmpty)(Y)){Y=new Array(65536);for(var e=0;e<65536;e++)Y[e]=e>255?255+~~(e/255):e}}()})),r("Reject Lexer.NA",(function(){n=Object(a.reject)(e,(function(e){return e[c]===i.Lexer.NA}))}));var o,u,l,f,d,p,m,y,v,g,E,T=!1;r("Transform Patterns",(function(){T=!1,o=Object(a.map)(n,(function(e){var n=e[c];if(Object(a.isRegExp)(n)){var r=n.source;return 1===r.length&&"^"!==r&&"$"!==r&&"."!==r?r:2!==r.length||"\\"!==r[0]||Object(a.contains)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?t.useSticky?_(n):k(n):r[1]}if(Object(a.isFunction)(n))return T=!0,{exec:n};if(Object(a.has)(n,"exec"))return T=!0,n;if("string"==typeof n){if(1===n.length)return n;var o=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),i=new RegExp(o);return t.useSticky?_(i):k(i)}throw Error("non exhaustive match")}))})),r("misc mapping",(function(){u=Object(a.map)(n,(function(e){return e.tokenTypeIdx})),l=Object(a.map)(n,(function(e){var t=e.GROUP;if(t!==i.Lexer.SKIPPED){if(Object(a.isString)(t))return t;if(Object(a.isUndefined)(t))return!1;throw Error("non exhaustive match")}})),f=Object(a.map)(n,(function(e){var t=e.LONGER_ALT;if(t)return Object(a.indexOf)(n,t)})),d=Object(a.map)(n,(function(e){return e.PUSH_MODE})),p=Object(a.map)(n,(function(e){return Object(a.has)(e,"POP_MODE")}))})),r("Line Terminator Handling",(function(){var e=H(t.lineTerminatorCharacters);m=Object(a.map)(n,(function(e){return!1})),"onlyOffset"!==t.positionTracking&&(m=Object(a.map)(n,(function(t){return Object(a.has)(t,"LINE_BREAKS")?t.LINE_BREAKS:!1===j(t,e)?Object(s.canMatchCharCode)(e,t.PATTERN):void 0})))})),r("Misc Mapping #2",(function(){y=Object(a.map)(n,D),v=Object(a.map)(o,L),g=Object(a.reduce)(n,(function(e,t){var n=t.GROUP;return Object(a.isString)(n)&&n!==i.Lexer.SKIPPED&&(e[n]=[]),e}),{}),E=Object(a.map)(o,(function(e,t){return{pattern:o[t],longerAlt:f[t],canLineTerminator:m[t],isCustom:y[t],short:v[t],group:l[t],push:d[t],pop:p[t],tokenTypeIdx:u[t],tokenType:n[t]}}))}));var C=!0,b=[];return t.safeMode||r("First Char Optimization",(function(){b=Object(a.reduce)(n,(function(e,n,r){if("string"==typeof n.PATTERN){var o=W(n.PATTERN.charCodeAt(0));V(e,o,E[r])}else if(Object(a.isArray)(n.START_CHARS_HINT)){var i;Object(a.forEach)(n.START_CHARS_HINT,(function(t){var n=W("string"==typeof t?t.charCodeAt(0):t);i!==n&&(i=n,V(e,n,E[r]))}))}else if(Object(a.isRegExp)(n.PATTERN))if(n.PATTERN.unicode)C=!1,t.ensureOptimizations&&Object(a.PRINT_ERROR)(s.failedOptimizationPrefixMsg+"\tUnable to analyze < "+n.PATTERN.toString()+" > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var u=Object(s.getOptimizedStartCodesIndices)(n.PATTERN,t.ensureOptimizations);Object(a.isEmpty)(u)&&(C=!1),Object(a.forEach)(u,(function(t){V(e,t,E[r])}))}else t.ensureOptimizations&&Object(a.PRINT_ERROR)(s.failedOptimizationPrefixMsg+"\tTokenType: <"+n.name+"> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),C=!1;return e}),[])})),r("ArrayPacking",(function(){b=Object(a.packArray)(b)})),{emptyGroups:g,patternIdxToConfig:E,charCodeToPatternIdxToConfig:b,hasCustom:T,canBeOptimized:C}}function v(e,t){var n=[],r=g(e);n=n.concat(r.errors);var o=E(r.valid),i=o.valid;return n=(n=(n=(n=(n=n.concat(o.errors)).concat(function(e){var t=[],n=Object(a.filter)(e,(function(e){return Object(a.isRegExp)(e[c])}));return t=(t=(t=(t=(t=t.concat(C(n))).concat(R(n))).concat(O(n))).concat(S(n))).concat(b(n))}(i))).concat(A(i))).concat(N(i,t))).concat(M(i))}function g(e){var t=Object(a.filter)(e,(function(e){return!Object(a.has)(e,c)}));return{errors:Object(a.map)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:i.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[e]}})),valid:Object(a.difference)(e,t)}}function E(e){var t=Object(a.filter)(e,(function(e){var t=e[c];return!(Object(a.isRegExp)(t)||Object(a.isFunction)(t)||Object(a.has)(t,"exec")||Object(a.isString)(t))}));return{errors:Object(a.map)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:i.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[e]}})),valid:Object(a.difference)(e,t)}}var T=/[^\\][\$]/;function C(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return l(t,e),t.prototype.visitEndAnchor=function(e){this.found=!0},t}(o.BaseRegExpVisitor),n=Object(a.filter)(e,(function(e){var n=e[c];try{var r=Object(u.getRegExpAst)(n),o=new t;return o.visit(r),o.found}catch(e){return T.test(n.source)}}));return Object(a.map)(n,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:i.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[e]}}))}function b(e){var t=Object(a.filter)(e,(function(e){return e[c].test("")}));return Object(a.map)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:i.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[e]}}))}var w=/[^\\[][\^]|^\^/;function R(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return l(t,e),t.prototype.visitStartAnchor=function(e){this.found=!0},t}(o.BaseRegExpVisitor),n=Object(a.filter)(e,(function(e){var n=e[c];try{var r=Object(u.getRegExpAst)(n),o=new t;return o.visit(r),o.found}catch(e){return w.test(n.source)}}));return Object(a.map)(n,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:i.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[e]}}))}function O(e){var t=Object(a.filter)(e,(function(e){var t=e[c];return t instanceof RegExp&&(t.multiline||t.global)}));return Object(a.map)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:i.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}}))}function S(e){var t=[],n=Object(a.map)(e,(function(n){return Object(a.reduce)(e,(function(e,r){return n.PATTERN.source!==r.PATTERN.source||Object(a.contains)(t,r)||r.PATTERN===i.Lexer.NA||(t.push(r),e.push(r)),e}),[])}));n=Object(a.compact)(n);var r=Object(a.filter)(n,(function(e){return e.length>1}));return Object(a.map)(r,(function(e){var t=Object(a.map)(e,(function(e){return e.name}));return{message:"The same RegExp pattern ->"+Object(a.first)(e).PATTERN+"<-has been used in all of the following Token Types: "+t.join(", ")+" <-",type:i.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}))}function A(e){var t=Object(a.filter)(e,(function(e){if(!Object(a.has)(e,"GROUP"))return!1;var t=e.GROUP;return t!==i.Lexer.SKIPPED&&t!==i.Lexer.NA&&!Object(a.isString)(t)}));return Object(a.map)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:i.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}}))}function N(e,t){var n=Object(a.filter)(e,(function(e){return void 0!==e.PUSH_MODE&&!Object(a.contains)(t,e.PUSH_MODE)}));return Object(a.map)(n,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+e.PUSH_MODE+"<-which does not exist",type:i.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}}))}function M(e){var t=[],n=Object(a.reduce)(e,(function(e,t,n){var r,o=t.PATTERN;return o===i.Lexer.NA||(Object(a.isString)(o)?e.push({str:o,idx:n,tokenType:t}):Object(a.isRegExp)(o)&&(r=o,void 0===Object(a.find)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(function(e){return-1!==r.source.indexOf(e)})))&&e.push({str:o.source,idx:n,tokenType:t})),e}),[]);return Object(a.forEach)(e,(function(e,r){Object(a.forEach)(n,(function(n){var o=n.str,s=n.idx,u=n.tokenType;if(r<s&&function(e,t){if(Object(a.isRegExp)(t)){var n=t.exec(e);return null!==n&&0===n.index}if(Object(a.isFunction)(t))return t(e,0,[],{});if(Object(a.has)(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}(o,e.PATTERN)){var l="Token: ->"+u.name+"<- can never be matched.\nBecause it appears AFTER the Token Type ->"+e.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";t.push({message:l,type:i.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[e,u]})}}))})),t}function k(e){var t=e.ignoreCase?"i":"";return new RegExp("^(?:"+e.source+")",t)}function _(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function I(e,t,n){var r=[];return Object(a.has)(e,f)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+f+"> property in its definition\n",type:i.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object(a.has)(e,d)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+d+"> property in its definition\n",type:i.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object(a.has)(e,d)&&Object(a.has)(e,f)&&!Object(a.has)(e.modes,e.defaultMode)&&r.push({message:"A MultiMode Lexer cannot be initialized with a "+f+": <"+e.defaultMode+">which does not exist\n",type:i.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object(a.has)(e,d)&&Object(a.forEach)(e.modes,(function(e,t){Object(a.forEach)(e,(function(e,n){Object(a.isUndefined)(e)&&r.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+t+"> at index: <"+n+">\n",type:i.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),r}function P(e,t,n){var r=[],o=!1,u=Object(a.compact)(Object(a.flatten)(Object(a.mapValues)(e.modes,(function(e){return e})))),l=Object(a.reject)(u,(function(e){return e[c]===i.Lexer.NA})),f=H(n);return t&&Object(a.forEach)(l,(function(e){var t=j(e,f);if(!1!==t){var n={message:U(e,t),type:t.issue,tokenType:e};r.push(n)}else Object(a.has)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(o=!0):Object(s.canMatchCharCode)(f,e.PATTERN)&&(o=!0)})),t&&!o&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:i.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),r}function x(e){var t={},n=Object(a.keys)(e);return Object(a.forEach)(n,(function(n){var r=e[n];if(!Object(a.isArray)(r))throw Error("non exhaustive match");t[n]=[]})),t}function D(e){var t=e.PATTERN;if(Object(a.isRegExp)(t))return!1;if(Object(a.isFunction)(t))return!0;if(Object(a.has)(t,"exec"))return!0;if(Object(a.isString)(t))return!1;throw Error("non exhaustive match")}function L(e){return!(!Object(a.isString)(e)||1!==e.length)&&e.charCodeAt(0)}var F={test:function(e){for(var t=e.length,n=this.lastIndex;n<t;n++){var r=e.charCodeAt(n);if(10===r)return this.lastIndex=n+1,!0;if(13===r)return 10===e.charCodeAt(n+1)?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function j(e,t){if(Object(a.has)(e,"LINE_BREAKS"))return!1;if(Object(a.isRegExp)(e.PATTERN)){try{Object(s.canMatchCharCode)(t,e.PATTERN)}catch(e){return{issue:i.LexerDefinitionErrorType.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(Object(a.isString)(e.PATTERN))return!1;if(D(e))return{issue:i.LexerDefinitionErrorType.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function U(e,t){if(t.issue===i.LexerDefinitionErrorType.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"+e.name+"> Token Type\n\t Root cause: "+t.errMsg+".\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(t.issue===i.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <"+e.name+"> Token Type\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}function H(e){return Object(a.map)(e,(function(e){return Object(a.isString)(e)&&e.length>0?e.charCodeAt(0):e}))}function V(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var B=256;function W(e){return e<B?e:Y[e]}var Y=[]},function(e,t,n){"use strict";n.r(t),n.d(t,"first",(function(){return a})),n.d(t,"firstForSequence",(function(){return s})),n.d(t,"firstForBranching",(function(){return u})),n.d(t,"firstForTerminal",(function(){return l}));var r=n(46),o=n(55),i=n(178);function a(e){if(e instanceof o.NonTerminal)return a(e.referencedRule);if(e instanceof o.Terminal)return l(e);if(Object(i.isSequenceProd)(e))return s(e);if(Object(i.isBranchingProd)(e))return u(e);throw Error("non exhaustive match")}function s(e){for(var t,n=[],o=e.definition,s=0,u=o.length>s,l=!0;u&&l;)t=o[s],l=Object(i.isOptionalProd)(t),n=n.concat(a(t)),s+=1,u=o.length>s;return Object(r.uniq)(n)}function u(e){var t=Object(r.map)(e.definition,(function(e){return a(e)}));return Object(r.uniq)(Object(r.flatten)(t))}function l(e){return[e.terminalType]}},function(e,t,n){"use strict";n.r(t),n.d(t,"IN",(function(){return r}));var r="_~IN~_"},function(e,t,n){"use strict";n.r(t),n.d(t,"EOF_FOLLOW_KEY",(function(){return u})),n.d(t,"IN_RULE_RECOVERY_EXCEPTION",(function(){return l})),n.d(t,"InRuleRecoveryException",(function(){return c})),n.d(t,"Recoverable",(function(){return f})),n.d(t,"attemptInRepetitionRecovery",(function(){return d}));var r=n(96),o=n(46),i=n(107),a=n(353),s=n(79),u={},l="InRuleRecoveryException";function c(e){this.name=l,this.message=e}c.prototype=Error.prototype;var f=function(){function e(){}return e.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object(o.has)(e,"recoveryEnabled")?e.recoveryEnabled:s.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=d)},e.prototype.getTokenToInsert=function(e){var t=Object(r.createTokenInstance)(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},e.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},e.prototype.tryInRepetitionRecovery=function(e,t,n,r){for(var a=this,s=this.findReSyncTokenType(),u=this.exportLexerState(),l=[],c=!1,f=this.LA(1),d=this.LA(1),h=function(){var e=a.LA(0),t=a.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:f,previous:e,ruleName:a.getCurrRuleFullName()}),n=new i.MismatchedTokenException(t,f,a.LA(0));n.resyncedTokens=Object(o.dropRight)(l),a.SAVE_ERROR(n)};!c;){if(this.tokenMatcher(d,r))return void h();if(n.call(this))return h(),void e.apply(this,t);this.tokenMatcher(d,s)?c=!0:(d=this.SKIP_TOKEN(),this.addToResyncTokens(d,l))}this.importLexerState(u)},e.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,n){return!1!==n&&(void 0!==e&&void 0!==t&&(!this.tokenMatcher(this.LA(1),e)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))))},e.prototype.getFollowsForInRuleRecovery=function(e,t){var n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)},e.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new c("sad sad panda")},e.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},e.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var n=this;if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if(Object(o.isEmpty)(t))return!1;var r=this.LA(1);return void 0!==Object(o.find)(t,(function(e){return n.tokenMatcher(r,e)}))},e.prototype.canRecoverWithSingleTokenDeletion=function(e){return this.tokenMatcher(this.LA(2),e)},e.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(t);return Object(o.contains)(n,e)},e.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),n=2;;){var r=t.tokenType;if(Object(o.contains)(e,r))return r;t=this.LA(n),n++}},e.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return u;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}},e.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return Object(o.isEmpty)(this.LAST_EXPLICIT_RULE_STACK)||(t=Object(o.map)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_STACK[t]})),n=Object(o.map)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_OCCURRENCE_STACK[t]}))),Object(o.map)(t,(function(r,o){return 0===o?u:{ruleName:e.shortRuleNameToFullName(r),idxInCallingRule:n[o],inRule:e.shortRuleNameToFullName(t[o-1])}}))},e.prototype.flattenFollowSet=function(){var e=this,t=Object(o.map)(this.buildFullFollowKeyStack(),(function(t){return e.getFollowSetFromFollowKey(t)}));return Object(o.flatten)(t)},e.prototype.getFollowSetFromFollowKey=function(e){if(e===u)return[r.EOF];var t=e.ruleName+e.idxInCallingRule+a.IN+e.inRule;return this.resyncFollows[t]},e.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,r.EOF)||t.push(e),t},e.prototype.reSyncTo=function(e){for(var t=[],n=this.LA(1);!1===this.tokenMatcher(n,e);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return Object(o.dropRight)(t)},e.prototype.attemptInRepetitionRecovery=function(e,t,n,r,o,i,a){},e.prototype.getCurrentGrammarPath=function(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Object(o.cloneArr)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}},e.prototype.getHumanReadableRuleStack=function(){var e=this;return Object(o.isEmpty)(this.LAST_EXPLICIT_RULE_STACK)?Object(o.map)(this.RULE_STACK,(function(t){return e.shortRuleNameToFullName(t)})):Object(o.map)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.shortRuleNameToFullName(e.RULE_STACK[t])}))},e}();function d(e,t,n,o,i,a,s){var u=this.getKeyForAutomaticLookahead(o,i),l=this.firstAfterRepMap[u];if(void 0===l){var c=this.getCurrRuleFullName();l=new a(this.getGAstProductions()[c],i).startWalking(),this.firstAfterRepMap[u]=l}var f=l.token,d=l.occurrence,h=l.isEndOfRule;1===this.RULE_STACK.length&&h&&void 0===f&&(f=r.EOF,d=1),this.shouldInRepetitionRecoveryBeTried(f,d,s)&&this.tryInRepetitionRecovery(e,t,n,f)}},function(e,t,n){"use strict";n.r(t),n.d(t,"classNameFromInstance",(function(){return o})),n.d(t,"functionName",(function(){return a})),n.d(t,"defineNameProp",(function(){return s}));var r=n(46);function o(e){return a(e.constructor)}var i=/^\s*function\s*(\S*)\s*\(/;function a(e){var t=e.name;return t||e.toString().match(i)[1]}function s(e,t){var n=Object.getOwnPropertyDescriptor(e,"name");return!(!Object(r.isUndefined)(n)&&!n.configurable)&&(Object.defineProperty(e,"name",{enumerable:!1,configurable:!0,writable:!1,value:t}),!0)}},function(e,t,n){"use strict";n.r(t),n.d(t,"createSyntaxDiagramsCode",(function(){return o}));var r=n(259);function o(e,t){var n=void 0===t?{}:t,o=n.resourceBase,i=void 0===o?"https://unpkg.com/chevrotain@"+r.VERSION+"/diagrams/":o,a=n.css;return'\n\x3c!-- This is a generated file --\x3e\n<!DOCTYPE html>\n<meta charset="utf-8">\n<style>\n body {\n background-color: hsl(30, 20%, 95%)\n }\n</style>\n\n'+("\n<link rel='stylesheet' href='"+(void 0===a?"https://unpkg.com/chevrotain@"+r.VERSION+"/diagrams/diagrams.css":a)+"'>\n")+("\n<script src='"+i+"vendor/railroad-diagrams.js'><\/script>\n<script src='"+i+"src/diagrams_builder.js'><\/script>\n<script src='"+i+"src/diagrams_behavior.js'><\/script>\n<script src='"+i+"src/main.js'><\/script>\n")+'\n<div id="diagrams" align="center"></div> \n'+("\n<script>\n window.serializedGrammar = "+JSON.stringify(e,null," ")+";\n<\/script>\n")+'\n<script>\n var diagramsDiv = document.getElementById("diagrams");\n main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);\n<\/script>\n'}},function(e,t,n){"use strict";n.r(t),n.d(t,"RowAddress",(function(){return a}));n(20);var r=n(22),o=n(350);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var a=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=t,this.row=n,this.sheet=r}var t,n,a;return t=e,a=[{key:"absolute",value:function(t,n){return new e(o.ReferenceType.ABSOLUTE,t,n)}},{key:"relative",value:function(t,n){return new e(o.ReferenceType.RELATIVE,t,n)}}],(n=[{key:"isRowAbsolute",value:function(){return this.type===o.ReferenceType.ABSOLUTE}},{key:"isRowRelative",value:function(){return this.type===o.ReferenceType.RELATIVE}},{key:"isAbsolute",value:function(){return this.type===o.ReferenceType.ABSOLUTE&&void 0!==this.sheet}},{key:"moved",value:function(t,n,r){var o=void 0===this.sheet?void 0:t;return new e(this.type,this.row+r,o)}},{key:"shiftedByRows",value:function(t){return new e(this.type,this.row+t,this.sheet)}},{key:"toSimpleRowAddress",value:function(e){var t=Object(r.absoluteSheetReference)(this,e),n=this.row;return this.isRowRelative()&&(n=e.row+this.row),Object(r.simpleRowAddress)(t,n)}},{key:"shiftRelativeDimensions",value:function(t,n){var r=this.isRowRelative()?this.row+n:this.row;return new e(this.type,r,this.sheet)}},{key:"shiftAbsoluteDimensions",value:function(t,n){var r=this.isRowAbsolute()?this.row+n:this.row;return new e(this.type,r,this.sheet)}},{key:"withAbsoluteSheet",value:function(t){return new e(this.type,this.row,t)}},{key:"isInvalid",value:function(e){return this.toSimpleRowAddress(e).row<0}},{key:"hash",value:function(e){var t=e&&void 0!==this.sheet?"#".concat(this.sheet):"";switch(this.type){case o.ReferenceType.RELATIVE:return"".concat(t,"#ROWR").concat(this.row);case o.ReferenceType.ABSOLUTE:return"".concat(t,"#ROWA").concat(this.row)}}},{key:"unparse",value:function(e){var t=this.toSimpleRowAddress(e);if(!Object(r.invalidSimpleRowAddress)(t)){var n=this.type===o.ReferenceType.ABSOLUTE?"$":"";return"".concat(n).concat(t.row+1)}}},{key:"exceedsSheetSizeLimits",value:function(e){return this.row>=e}}])&&i(t.prototype,n),a&&i(t,a),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"ParserWithCaching",(function(){return y})),n.d(t,"bindWhitespacesToTokens",(function(){return v}));n(37),n(88),n(20),n(12),n(33),n(66),n(76),n(8),n(9),n(0),n(10),n(3),n(2),n(4),n(24),n(21);var r=n(213),o=n(22),i=n(70),a=n(99),s=n(101),u=n(359),l=n(664),c=n(266),f=n(176),d=n(267);function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var y=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.functionRegistry=n,this.sheetMapping=r,this.statsCacheUsed=0,this.lexerConfig=Object(f.buildLexerConfig)(t),this.lexer=new c.FormulaLexer(this.lexerConfig),this.formulaParser=new c.FormulaParser(this.lexerConfig,this.sheetMapping),this.cache=new l.Cache(this.functionRegistry)}var t,n,p;return t=e,(n=[{key:"parse",value:function(e,t){var n=this.lexer.tokenizeFormula(e);if(n.errors.length>0){var r=n.errors.map((function(e){return{type:s.ParsingErrorType.LexingError,message:e.message}}));return{ast:Object(i.buildParsingErrorAst)(),errors:r,hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]}}var o=this.computeHashFromTokens(n.tokens,t),a=this.cache.get(o);if(void 0!==a)++this.statsCacheUsed;else{var u=v(n.tokens),l=this.formulaParser.parseFromTokens(u,t);if(l.errors.length>0)return Object.assign(Object.assign({},l),{hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]});a=this.cache.set(o,l.ast)}var c=a;return{ast:c.ast,errors:[],hasVolatileFunction:c.hasVolatileFunction,hasStructuralChangeFunction:c.hasStructuralChangeFunction,dependencies:c.relativeDependencies}}},{key:"fetchCachedResultForAst",value:function(e){var t=this.computeHashFromAst(e);return this.fetchCachedResult(t)}},{key:"fetchCachedResult",value:function(e){var t=this.cache.get(e);if(void 0===t)throw new Error("There is no AST with such key in the cache");return{ast:t.ast,errors:[],hasVolatileFunction:t.hasVolatileFunction,hasStructuralChangeFunction:t.hasStructuralChangeFunction,dependencies:t.relativeDependencies}}},{key:"computeHashFromTokens",value:function(e,t){for(var n,o="",i=0;i<e.length;){var s=e[i];if(Object(r.tokenMatcher)(s,f.CellReference)){var u=Object(a.cellAddressFromString)(this.sheetMapping,s.image,t);o=void 0===u?o.concat(s.image):o.concat(u.hash(!0))}else if(Object(r.tokenMatcher)(s,f.ProcedureName)){var l=s.image.toUpperCase().slice(0,-1),c=null!==(n=this.lexerConfig.functionMapping[l])&&void 0!==n?n:l;o=o.concat(c,"(")}else if(Object(r.tokenMatcher)(s,f.ColumnRange)){var d=h(s.image.split(":"),2),p=d[0],m=d[1],y=Object(a.columnAddressFromString)(this.sheetMapping,p,t),v=Object(a.columnAddressFromString)(this.sheetMapping,m,t);o=void 0===y||void 0===v?o.concat("!REF"):o.concat(y.hash(!0),":",v.hash(!0))}else if(Object(r.tokenMatcher)(s,f.RowRange)){var g=h(s.image.split(":"),2),E=g[0],T=g[1],C=Object(a.rowAddressFromString)(this.sheetMapping,E,t),b=Object(a.rowAddressFromString)(this.sheetMapping,T,t);o=void 0===C||void 0===b?o.concat("!REF"):o.concat(C.hash(!0),":",b.hash(!0))}else o=o.concat(s.image);i++}return o}},{key:"rememberNewAst",value:function(e){var t=this.computeHashFromAst(e);return this.cache.maybeSetAndThenGet(t,e)}},{key:"computeHashFromAst",value:function(e){return"="+this.computeHashOfAstNode(e)}},{key:"computeHashOfAstNode",value:function(e){var t=this;switch(e.type){case i.AstNodeType.EMPTY:return e.leadingWhitespace||"";case i.AstNodeType.NUMBER:return Object(s.imageWithWhitespace)(Object(d.formatNumber)(e.value,this.config.decimalSeparator),e.leadingWhitespace);case i.AstNodeType.STRING:return Object(s.imageWithWhitespace)('"'+e.value+'"',e.leadingWhitespace);case i.AstNodeType.NAMED_EXPRESSION:return Object(s.imageWithWhitespace)(e.expressionName,e.leadingWhitespace);case i.AstNodeType.FUNCTION_CALL:var n=e.args.map((function(e){return t.computeHashOfAstNode(e)})).join(this.config.functionArgSeparator),r=e.procedureName+"("+n+Object(s.imageWithWhitespace)(")",e.internalWhitespace);return Object(s.imageWithWhitespace)(r,e.leadingWhitespace);case i.AstNodeType.CELL_REFERENCE:return Object(s.imageWithWhitespace)(e.reference.hash(!0),e.leadingWhitespace);case i.AstNodeType.COLUMN_RANGE:case i.AstNodeType.ROW_RANGE:case i.AstNodeType.CELL_RANGE:var a=e.start.hash(e.sheetReferenceType!==s.RangeSheetReferenceType.RELATIVE),l=e.end.hash(e.sheetReferenceType===s.RangeSheetReferenceType.BOTH_ABSOLUTE);return Object(s.imageWithWhitespace)(a+":"+l,e.leadingWhitespace);case i.AstNodeType.MINUS_UNARY_OP:return Object(s.imageWithWhitespace)("-"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case i.AstNodeType.PLUS_UNARY_OP:return Object(s.imageWithWhitespace)("+"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case i.AstNodeType.PERCENT_OP:return this.computeHashOfAstNode(e.value)+Object(s.imageWithWhitespace)("%",e.leadingWhitespace);case i.AstNodeType.ERROR:var c=this.config.translationPackage.getErrorTranslation(e.error?e.error.type:o.ErrorType.ERROR);return Object(s.imageWithWhitespace)(c,e.leadingWhitespace);case i.AstNodeType.ERROR_WITH_RAW_INPUT:return Object(s.imageWithWhitespace)(e.rawInput,e.leadingWhitespace);case i.AstNodeType.ARRAY:var f=e.args.map((function(e){return e.map((function(e){return t.computeHashOfAstNode(e)})).join(",")})).join(";");return Object(s.imageWithWhitespace)("{"+f+Object(s.imageWithWhitespace)("}",e.internalWhitespace),e.leadingWhitespace);case i.AstNodeType.PARENTHESIS:var h="("+this.computeHashOfAstNode(e.expression)+Object(s.imageWithWhitespace)(")",e.internalWhitespace);return Object(s.imageWithWhitespace)(h,e.leadingWhitespace);default:return this.computeHashOfAstNode(e.left)+Object(s.imageWithWhitespace)(u.binaryOpTokenMap[e.type],e.leadingWhitespace)+this.computeHashOfAstNode(e.right)}}}])&&m(t.prototype,n),p&&m(t,p),e}();function v(e){var t=[],n=e[0];Object(r.tokenMatcher)(n,f.WhiteSpace)||t.push(n);for(var o=1;o<e.length;++o){var i=e[o];if(!Object(r.tokenMatcher)(i,f.WhiteSpace)){var a=e[o-1];Object(r.tokenMatcher)(a,f.WhiteSpace)&&(i.leadingWhitespace=a),t.push(i)}}return t}},function(e,t,n){"use strict";n.r(t),n.d(t,"binaryOpTokenMap",(function(){return a}));var r,o=n(101);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var a=(i(r={},o.AstNodeType.PLUS_OP,"+"),i(r,o.AstNodeType.MINUS_OP,"-"),i(r,o.AstNodeType.TIMES_OP,"*"),i(r,o.AstNodeType.DIV_OP,"/"),i(r,o.AstNodeType.CONCATENATE_OP,"&"),i(r,o.AstNodeType.POWER_OP,"^"),i(r,o.AstNodeType.EQUALS_OP,"="),i(r,o.AstNodeType.NOT_EQUAL_OP,"<>"),i(r,o.AstNodeType.GREATER_THAN_OP,">"),i(r,o.AstNodeType.GREATER_THAN_OR_EQUAL_OP,">="),i(r,o.AstNodeType.LESS_THAN_OP,"<"),i(r,o.AstNodeType.LESS_THAN_OR_EQUAL_OP,"<="),r)},function(e,t,n){var r=n(29),o=n(78),i=n(63),a=n(64),s=n(666),u=n(113),l=n(204);r({target:"Reflect",stat:!0},{get:function e(t,n){var r,c,f=arguments.length<3?t:arguments[2];return a(t)===f?t[n]:(r=u.f(t,n))?s(r)?r.value:void 0===r.get?void 0:o(r.get,f):i(c=l(t))?e(c,n,f):void 0}})},function(e,t,n){"use strict";n.r(t),n.d(t,"collectDependencies",(function(){return o}));n(26);var r=n(70),o=function(e,t){var n=new Array;return function e(t,n,o,i){switch(t.type){case r.AstNodeType.EMPTY:case r.AstNodeType.NUMBER:case r.AstNodeType.STRING:case r.AstNodeType.ERROR:return;case r.AstNodeType.NAMED_EXPRESSION:return void(i&&o.push(new r.NamedExpressionDependency(t.expressionName)));case r.AstNodeType.CELL_REFERENCE:return void(i&&o.push(new r.AddressDependency(t.reference)));case r.AstNodeType.CELL_RANGE:return void(i&&t.start.sheet===t.end.sheet&&o.push(new r.CellRangeDependency(t.start,t.end)));case r.AstNodeType.COLUMN_RANGE:return void(i&&t.start.sheet===t.end.sheet&&o.push(new r.ColumnRangeDependency(t.start,t.end)));case r.AstNodeType.ROW_RANGE:return void(i&&t.start.sheet===t.end.sheet&&o.push(new r.RowRangeDependency(t.start,t.end)));case r.AstNodeType.PERCENT_OP:case r.AstNodeType.PLUS_UNARY_OP:case r.AstNodeType.MINUS_UNARY_OP:return void e(t.value,n,o,!0);case r.AstNodeType.CONCATENATE_OP:case r.AstNodeType.EQUALS_OP:case r.AstNodeType.NOT_EQUAL_OP:case r.AstNodeType.LESS_THAN_OP:case r.AstNodeType.GREATER_THAN_OP:case r.AstNodeType.LESS_THAN_OR_EQUAL_OP:case r.AstNodeType.GREATER_THAN_OR_EQUAL_OP:case r.AstNodeType.MINUS_OP:case r.AstNodeType.PLUS_OP:case r.AstNodeType.TIMES_OP:case r.AstNodeType.DIV_OP:case r.AstNodeType.POWER_OP:return e(t.left,n,o,!0),void e(t.right,n,o,!0);case r.AstNodeType.PARENTHESIS:return void e(t.expression,n,o,i);case r.AstNodeType.FUNCTION_CALL:var a=!n.doesFunctionNeedArgumentToBeComputed(t.procedureName);return void t.args.forEach((function(t){return e(t,n,o,a)}))}}(e,t,n,!0),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"EmptyStatistics",(function(){return c}));n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(l,e);var t,n,r,u=s(l);function l(){return o(this,l),u.apply(this,arguments)}return t=l,(n=[{key:"incrementCriterionFunctionFullCacheUsed",value:function(){}},{key:"incrementCriterionFunctionPartialCacheUsed",value:function(){}},{key:"start",value:function(e){}},{key:"end",value:function(e){}}])&&i(t.prototype,n),r&&i(t,r),l}(n(269).Statistics)},function(e,t,n){"use strict";n.r(t),n.d(t,"NotComputedArray",(function(){return d})),n.d(t,"ArrayValue",(function(){return h})),n.d(t,"ErroredArray",(function(){return p}));n(56),n(20),n(139),n(8),n(9),n(0),n(10),n(3),n(2),n(4),n(21),n(12),n(24);var r=n(126),o=n(48),i=n(80);function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function(){function e(t){l(this,e),this.size=t}return f(e,[{key:"width",value:function(){return this.size.width}},{key:"height",value:function(){return this.size.height}},{key:"get",value:function(e,t){throw Error("Array not computed yet.")}},{key:"simpleRangeValue",value:function(){throw Error("Array not computed yet.")}}]),e}(),h=function(){function e(t){l(this,e),this.size=new r.ArraySize(t.length>0?t[0].length:0,t.length),this.array=t}return f(e,[{key:"simpleRangeValue",value:function(){return i.SimpleRangeValue.onlyValues(this.array)}},{key:"addRows",value:function(e,t){var n;(n=this.array).splice.apply(n,[e,0].concat(a(this.nullArrays(t,this.width())))),this.size.height+=t}},{key:"addColumns",value:function(e,t){for(var n=0;n<this.height();n++){var r;(r=this.array[n]).splice.apply(r,[e,0].concat(a(new Array(t).fill(o.EmptyValue))))}this.size.width+=t}},{key:"removeRows",value:function(e,t){if(this.outOfBound(0,e)||this.outOfBound(0,t))throw Error("Array index out of bound");var n=t-e+1;this.array.splice(e,n),this.size.height-=n}},{key:"removeColumns",value:function(e,t){if(this.outOfBound(e,0)||this.outOfBound(t,0))throw Error("Array index out of bound");var n,r=t-e+1,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(this.array);try{for(o.s();!(n=o.n()).done;){n.value.splice(e,r)}}catch(e){o.e(e)}finally{o.f()}this.size.width-=r}},{key:"nullArrays",value:function(e,t){for(var n=[],r=0;r<e;++r)n.push(new Array(t).fill(o.EmptyValue));return n}},{key:"get",value:function(e,t){if(this.outOfBound(e,t))throw Error("Array index out of bound");return this.array[t][e]}},{key:"set",value:function(e,t,n){if(this.outOfBound(e,t))throw Error("Array index out of bound");this.array[t][e]=n}},{key:"width",value:function(){return this.size.width}},{key:"height",value:function(){return this.size.height}},{key:"raw",value:function(){return this.array}},{key:"resize",value:function(e){if(this.height()<e.height&&isFinite(e.height)&&this.addRows(this.height(),e.height-this.height()),this.height()>e.height)throw"Resizing to smaller array";if(this.width()<e.width&&isFinite(e.width)&&this.addColumns(this.width(),e.width-this.width()),this.width()>e.width)throw"Resizing to smaller array"}},{key:"outOfBound",value:function(e,t){return e<0||t<0||t>this.size.height-1||e>this.size.width-1}}],[{key:"fromInterpreterValue",value:function(t){return t instanceof i.SimpleRangeValue?new e(t.data):new e([[t]])}}]),e}(),p=function(){function e(t,n){l(this,e),this.error=t,this.size=n}return f(e,[{key:"get",value:function(e,t){return this.error}},{key:"width",value:function(){return this.size.width}},{key:"height",value:function(){return this.size.height}},{key:"simpleRangeValue",value:function(){return this.error}}]),e}()},function(e,t,n){var r=n(72),o=n(35),i=n(169),a=n(94),s=o(n(195).f),u=o([].push),l=function(e){return function(t){for(var n,o=a(t),l=i(o),c=l.length,f=0,d=[];c>f;)n=l[f++],r&&!s(o,n)||u(d,e?[n,o[n]]:o[n]);return d}};e.exports={entries:l(!0),values:l(!1)}},function(e,t,n){"use strict";n.r(t),n.d(t,"EmptyCellVertex",(function(){return i}));var r=n(48);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.address=t}var t,n,i;return t=e,(n=[{key:"getCellValue",value:function(){return r.EmptyValue}}])&&o(t.prototype,n),i&&o(t,i),e}()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.r(t),n.d(t,"ValueCellVertex",(function(){return o}));
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.parsedValue=t,this.rawValue=n}var t,n,o;return t=e,(n=[{key:"getValues",value:function(){return{parsedValue:this.parsedValue,rawValue:this.rawValue}}},{key:"setValues",value:function(e){this.parsedValue=e.parsedValue,this.rawValue=e.rawValue}},{key:"getCellValue",value:function(){return this.parsedValue}},{key:"setCellValue",value:function(e){throw"SetCellValue is deprecated for ValueCellVertex"}}])&&r(t.prototype,n),o&&r(t,o),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"ParsingErrorVertex",(function(){return i}));var r=n(22);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.errors=t,this.rawInput=n}var t,n,i;return t=e,(n=[{key:"getCellValue",value:function(){return r.CellError.parsingError()}},{key:"getFormula",value:function(){return this.rawInput}}])&&o(t.prototype,n),i&&o(t,i),e}()},function(e,t,n){"use strict";var r=n(35),o=n(254),i=n(175).getWeakData,a=n(64),s=n(63),u=n(252),l=n(251),c=n(136),f=n(73),d=n(114),h=d.set,p=d.getterFor,m=c.find,y=c.findIndex,v=r([].splice),g=0,E=function(e){return e.frozen||(e.frozen=new T)},T=function(){this.entries=[]},C=function(e,t){return m(e.entries,(function(e){return e[0]===t}))};T.prototype={get:function(e){var t=C(this,e);if(t)return t[1]},has:function(e){return!!C(this,e)},set:function(e,t){var n=C(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=y(this.entries,(function(t){return t[0]===e}));return~t&&v(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,n,r){var c=e((function(e,o){u(e,d),h(e,{type:t,id:g++,frozen:void 0}),null!=o&&l(o,e[r],{that:e,AS_ENTRIES:n})})),d=c.prototype,m=p(t),y=function(e,t,n){var r=m(e),o=i(a(t),!0);return!0===o?E(r).set(t,n):o[r.id]=n,e};return o(d,{delete:function(e){var t=m(this);if(!s(e))return!1;var n=i(e);return!0===n?E(t).delete(e):n&&f(n,t.id)&&delete n[t.id]},has:function(e){var t=m(this);if(!s(e))return!1;var n=i(e);return!0===n?E(t).has(e):n&&f(n,t.id)}}),o(d,n?{get:function(e){var t=m(this);if(s(e)){var n=i(e);return!0===n?E(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return y(this,e,t)}}:{add:function(e){return y(this,e,!0)}}),c}}},function(e,t,n){"use strict";n.r(t),n.d(t,"configValueFromParam",(function(){return u})),n.d(t,"validateNumberToBeAtLeast",(function(){return l})),n.d(t,"validateNumberToBeAtMost",(function(){return c})),n.d(t,"configValueFromParamCheck",(function(){return f})),n.d(t,"configCheckIfParametersNotInConflict",(function(){return d})),n.d(t,"validateArgToType",(function(){return h}));n(42),n(50),n(76),n(37),n(3),n(36),n(0),n(2),n(4),n(26),n(24),n(77),n(8),n(9),n(10),n(12),n(21);var r=n(219),o=n(39);function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function u(e,t,n){if(void 0===e)return r.Config.defaultConfig[n];if("string"==typeof t){if(s(e)===t)return e;throw new o.ExpectedValueOfTypeError(t,n)}if(t.includes(e))return e;throw new o.ExpectedOneOfValuesError(t.map((function(e){return"'".concat(e,"'")})).join(" "),n)}function l(e,t,n){if(e<n)throw new o.ConfigValueTooSmallError(t,n)}function c(e,t,n){if(e>n)throw new o.ConfigValueTooBigError(t,n)}function f(e,t,n,i){if(t(e))return e;if(void 0===e)return r.Config.defaultConfig[i];throw new o.ExpectedValueOfTypeError(n,i)}function d(){for(var e=new Map,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach((function(t){var n=e.get(t.value)||[];n.push(t.name),e.set(t.value,n)}));var o,a=[],s=i(e.values());try{for(s.s();!(o=s.n()).done;){var u=o.value;u.length>1&&a.push(u)}}catch(e){s.e(e)}finally{s.f()}if(a.length>0){a.forEach((function(e){return e.sort()}));var l=a.map((function(e){return"[".concat(e,"]")})).join("; ");throw new Error("Config initialization failed. Parameters in conflict: ".concat(l))}}function h(e,t,n){if(s(e)!==t)throw new o.ExpectedValueOfTypeError(t,n)}},function(e,t,n){"use strict";n.r(t),n.d(t,"defaultParseToDateTime",(function(){return r})),n.d(t,"secondsExtendedRegexp",(function(){return o}));n(108),n(33),n(62),n(66),n(42),n(50),n(12),n(88),n(282),n(51);
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
function r(e,t,n){var r=(e=e.replace(/\s\s+/g," ").trim().toLowerCase()).substring(e.length-2);"am"===r||"pm"===r?e=e.substring(0,e.length-2).trim():"a"===(r=e.substring(e.length-1))||"p"===r?e=e.substring(0,e.length-1).trim():r=void 0;var o=e.split(/[ /.-]/g);o.length>=2&&o[o.length-2].includes(":")&&(o[o.length-2]=o[o.length-2]+"."+o[o.length-1],o.pop());var s=o[o.length-1].split(":");if(void 0!==r&&s.push(r),1===o.length)return i(s,n);if(1===s.length)return a(o,t);var u=a(o.slice(0,o.length-1),t),l=i(s,n);return void 0===u||void 0===l?void 0:Object.assign(Object.assign({},u),l)}var o=/^ss\.(s+|0+)$/;function i(e,t){if(void 0!==t){(t=t.toLowerCase()).endsWith("am/pm")?t=t.substring(0,t.length-5).trim():t.endsWith("a/p")&&(t=t.substring(0,t.length-3).trim());var n=t.split(":"),r=void 0;"am"===e[e.length-1]||"a"===e[e.length-1]?(r=!1,e.pop()):"pm"!==e[e.length-1]&&"p"!==e[e.length-1]||(r=!0,e.pop());var i=0;if(n.length>=1&&o.test(n[n.length-1])&&(i=n[n.length-1].length-3,n[n.length-1]="ss"),e.length===n.length){var a=n.indexOf("hh"),s=n.indexOf("mm"),u=n.indexOf("ss"),l=-1!==a?e[a]:"0";if(/^\d+$/.test(l)){var c=Number(l);if(void 0!==r){if(c<0||c>12)return;c%=12,r&&(c+=12)}var f=-1!==s?e[s]:"0";if(/^\d+$/.test(f)){var d=Number(f),h=-1!==u?e[u]:"0";if(/^\d+(\.\d+)?$/.test(h)){var p=Number(h);return{hours:c,minutes:d,seconds:p=Math.round(p*Math.pow(10,i))/Math.pow(10,i)}}}}}}}function a(e,t){if(void 0!==t){var n=t.toLowerCase().split(/[ /.-]/g);if(e.length===n.length){var r=n.indexOf("mm"),o=n.indexOf("dd"),i=n.indexOf("yyyy"),a=n.indexOf("yy");if(r in e&&o in e&&(i in e||a in e)&&(!(i in e)||!(a in e))){var s;if(i in e){var u=e[i];if(!/^\d+$/.test(u))return;if((s=Number(u))<1e3||s>9999)return}else{var l=e[a];if(!/^\d+$/.test(l))return;if((s=Number(l))<0||s>99)return}var c=e[r];if(/^\d+$/.test(c)){var f=Number(c),d=e[o];if(/^\d+$/.test(d))return{year:s,month:f,day:Number(d)}}}}}}},function(e,t,n){"use strict";n.r(t),n.d(t,"ClipboardCellType",(function(){return o})),n.d(t,"ClipboardOperations",(function(){return d}));n(83);var r,o,i=n(84),a=n(22),s=n(39);function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/!function(e){e[e.COPY=0]="COPY",e[e.CUT=1]="CUT"}(r||(r={})),function(e){e[e.VALUE=0]="VALUE",e[e.EMPTY=1]="EMPTY",e[e.FORMULA=2]="FORMULA",e[e.PARSING_ERROR=3]="PARSING_ERROR"}(o||(o={}));var f=function(){function e(t,n,r,o,i){u(this,e),this.sourceLeftCorner=t,this.width=n,this.height=r,this.type=o,this.content=i}return c(e,[{key:"getContent",value:regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==this.content){e.next=4;break}return e.abrupt("return");case 4:n=0;case 5:if(!(n<this.height)){e.next=16;break}r=0;case 7:if(!(r<this.width)){e.next=13;break}return e.next=10,[Object(a.simpleCellAddress)(t.sheet,t.col+r,t.row+n),this.content[n][r]];case 10:++r,e.next=7;break;case 13:++n,e.next=5;break;case 16:case"end":return e.stop()}}),e,this)}))}]),e}(),d=function(){function e(t,n,r){u(this,e),this.dependencyGraph=n,this.operations=r,this.maxRows=t.maxRows,this.maxColumns=t.maxColumns}return c(e,[{key:"cut",value:function(e,t,n){this.clipboard=new f(e,t,n,r.CUT)}},{key:"copy",value:function(e,t,n){for(var o=[],i=0;i<n;++i){o[i]=[];for(var s=0;s<t;++s){var u=this.operations.getClipboardCell(Object(a.simpleCellAddress)(e.sheet,e.col+s,e.row+i));o[i].push(u)}}this.clipboard=new f(e,t,n,r.COPY,o)}},{key:"abortCut",value:function(){this.clipboard&&this.clipboard.type===r.CUT&&this.clear()}},{key:"clear",value:function(){this.clipboard=void 0}},{key:"ensureItIsPossibleToCopyPaste",value:function(e){if(void 0!==this.clipboard){if(Object(a.invalidSimpleCellAddress)(e)||!this.dependencyGraph.sheetMapping.hasSheetWithId(e.sheet))throw new s.InvalidArgumentsError("a valid target address.");var t=i.AbsoluteCellRange.spanFrom(e,this.clipboard.width,this.clipboard.height);if(t.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new s.SheetSizeLimitExceededError;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new Error("It is not possible to paste onto an array")}}},{key:"isCutClipboard",value:function(){return void 0!==this.clipboard&&this.clipboard.type===r.CUT}},{key:"isCopyClipboard",value:function(){return void 0!==this.clipboard&&this.clipboard.type===r.COPY}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"AddRowsTransformer",(function(){return c}));n(88),n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(22);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(l,e);var t,n,o,u=s(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=u.call(this)).rowsSpan=e,t}return t=l,(n=[{key:"sheet",get:function(){return this.rowsSpan.sheet}},{key:"isIrreversible",value:function(){return!1}},{key:"transformColumnRangeAst",value:function(e,t){return e}},{key:"transformCellRange",value:function(e,t,n){return this.transformRange(e,t,n)}},{key:"transformRowRange",value:function(e,t,n){return this.transformRange(e,t,n)}},{key:"transformColumnRange",value:function(e,t,n){throw Error("Not implemented")}},{key:"transformCellAddress",value:function(e,t){var n=Object(r.absoluteSheetReference)(e,t);if(n!==this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet)return!1;var o=e.toSimpleRowAddress(t);return n===this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet?this.rowsSpan.rowStart<=o.row&&e.shiftedByRows(this.rowsSpan.numberOfRows):t.sheet===this.rowsSpan.sheet&&n!==this.rowsSpan.sheet?!e.isRowAbsolute()&&!(t.row<this.rowsSpan.rowStart)&&e.shiftedByRows(-this.rowsSpan.numberOfRows):e.isRowAbsolute()?!(e.row<this.rowsSpan.rowStart)&&e.shiftedByRows(this.rowsSpan.numberOfRows):o.row<this.rowsSpan.rowStart?!(t.row<this.rowsSpan.rowStart)&&e.shiftedByRows(-this.rowsSpan.numberOfRows):t.row<this.rowsSpan.rowStart&&e.shiftedByRows(this.rowsSpan.numberOfRows)}},{key:"fixNodeAddress",value:function(e){return this.rowsSpan.sheet===e.sheet&&this.rowsSpan.rowStart<=e.row?Object.assign(Object.assign({},e),{row:e.row+this.rowsSpan.numberOfRows}):e}},{key:"transformRange",value:function(e,t,n){var o=this.transformCellAddress(e,n),i=this.transformCellAddress(t,n);return o===r.ErrorType.REF||i===r.ErrorType.REF?r.ErrorType.REF:!(!o&&!i)&&[o||e,i||t]}}])&&i(t.prototype,n),o&&i(t,o),l}(n(141).Transformer)},function(e,t,n){"use strict";n.r(t),n.d(t,"RemoveRowsTransformer",(function(){return c}));n(88),n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(22);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(l,e);var t,n,o,u=s(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=u.call(this)).rowsSpan=e,t}return t=l,(n=[{key:"sheet",get:function(){return this.rowsSpan.sheet}},{key:"isIrreversible",value:function(){return!0}},{key:"transformColumnRangeAst",value:function(e,t){return e}},{key:"transformCellAddress",value:function(e,t){var n=Object(r.absoluteSheetReference)(e,t);if(this.rowsSpan.sheet!==t.sheet&&this.rowsSpan.sheet!==n)return!1;if(this.rowsSpan.sheet!==t.sheet&&this.rowsSpan.sheet===n){var o=e.toSimpleRowAddress(t);if(o.row<this.rowsSpan.rowStart)return!1;if(o.row>this.rowsSpan.rowEnd)return e.shiftedByRows(-this.rowsSpan.numberOfRows)}if(this.rowsSpan.sheet===t.sheet&&this.rowsSpan.sheet!==n){if(e.isRowAbsolute())return!1;if(t.row<this.rowsSpan.rowStart)return!1;if(t.row>this.rowsSpan.rowEnd)return e.shiftedByRows(this.rowsSpan.numberOfRows)}if(this.rowsSpan.sheet===t.sheet&&this.rowsSpan.sheet===n)if(e.isRowAbsolute()){if(e.row<this.rowsSpan.rowStart)return!1;if(e.row>this.rowsSpan.rowEnd)return e.shiftedByRows(-this.rowsSpan.numberOfRows)}else{var i=e.toSimpleRowAddress(t);if(i.row<this.rowsSpan.rowStart){if(t.row<this.rowsSpan.rowStart)return!1;if(t.row>this.rowsSpan.rowEnd)return e.shiftedByRows(this.rowsSpan.numberOfRows)}else if(i.row>this.rowsSpan.rowEnd){if(t.row<this.rowsSpan.rowStart)return e.shiftedByRows(-this.rowsSpan.numberOfRows);if(t.row>this.rowsSpan.rowEnd)return!1}}return r.ErrorType.REF}},{key:"transformCellRange",value:function(e,t,n){return this.transformRange(e,t,n)}},{key:"transformRowRange",value:function(e,t,n){return this.transformRange(e,t,n)}},{key:"transformColumnRange",value:function(e,t,n){throw Error("Not implemented")}},{key:"fixNodeAddress",value:function(e){return this.rowsSpan.sheet===e.sheet&&this.rowsSpan.rowStart<=e.row?Object.assign(Object.assign({},e),{row:e.row-this.rowsSpan.numberOfRows}):e}},{key:"transformRange",value:function(e,t,n){var o=Object(r.absoluteSheetReference)(e,n),i=e,a=t;if(this.rowsSpan.sheet===o){var s=e.toSimpleRowAddress(n),u=t.toSimpleRowAddress(n);if(this.rowsSpan.rowStart<=s.row&&this.rowsSpan.rowEnd>=u.row)return r.ErrorType.REF;s.row>=this.rowsSpan.rowStart&&s.row<=this.rowsSpan.rowEnd&&(i=e.shiftedByRows(this.rowsSpan.rowEnd-s.row+1)),u.row>=this.rowsSpan.rowStart&&u.row<=this.rowsSpan.rowEnd&&(a=t.shiftedByRows(-(u.row-this.rowsSpan.rowStart+1)))}var l=this.transformCellAddress(i,n),c=this.transformCellAddress(a,n);return!1===l&&!1===c?[i,a]:l===r.ErrorType.REF||c===r.ErrorType.REF?r.ErrorType.REF:[l||i,c||a]}}])&&i(t.prototype,n),o&&i(t,o),l}(n(141).Transformer)},function(e,t,n){"use strict";n.r(t),n.d(t,"BaseUndoEntry",(function(){return g})),n.d(t,"RemoveRowsUndoEntry",(function(){return E})),n.d(t,"MoveCellsUndoEntry",(function(){return T})),n.d(t,"AddRowsUndoEntry",(function(){return C})),n.d(t,"SetRowOrderUndoEntry",(function(){return b})),n.d(t,"SetColumnOrderUndoEntry",(function(){return w})),n.d(t,"SetSheetContentUndoEntry",(function(){return R})),n.d(t,"MoveRowsUndoEntry",(function(){return O})),n.d(t,"MoveColumnsUndoEntry",(function(){return S})),n.d(t,"AddColumnsUndoEntry",(function(){return A})),n.d(t,"RemoveColumnsUndoEntry",(function(){return N})),n.d(t,"AddSheetUndoEntry",(function(){return M})),n.d(t,"RemoveSheetUndoEntry",(function(){return k})),n.d(t,"RenameSheetUndoEntry",(function(){return _})),n.d(t,"ClearSheetUndoEntry",(function(){return I})),n.d(t,"SetCellContentsUndoEntry",(function(){return P})),n.d(t,"PasteUndoEntry",(function(){return x})),n.d(t,"AddNamedExpressionUndoEntry",(function(){return D})),n.d(t,"RemoveNamedExpressionUndoEntry",(function(){return L})),n.d(t,"ChangeNamedExpressionUndoEntry",(function(){return F})),n.d(t,"BatchUndoEntry",(function(){return j})),n.d(t,"UndoRedo",(function(){return U}));n(83),n(24),n(3),n(36),n(0),n(2),n(4),n(56),n(25),n(7),n(12),n(21),n(8),n(9),n(10);var r=n(22),o=n(221);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=u(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function u(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var g=function e(){v(this,e)},E=function(e){d(n,e);var t=p(n);function n(e,r){var o;return v(this,n),(o=t.call(this)).command=e,o.rowsRemovals=r,o}return f(n,[{key:"doUndo",value:function(e){e.undoRemoveRows(this)}},{key:"doRedo",value:function(e){e.redoRemoveRows(this)}}]),n}(g),T=function(e){d(n,e);var t=p(n);function n(e,r,o,i,a,s,u){var l;return v(this,n),(l=t.call(this)).sourceLeftCorner=e,l.width=r,l.height=o,l.destinationLeftCorner=i,l.overwrittenCellsData=a,l.addedGlobalNamedExpressions=s,l.version=u,l}return f(n,[{key:"doUndo",value:function(e){e.undoMoveCells(this)}},{key:"doRedo",value:function(e){e.redoMoveCells(this)}}]),n}(g),C=function(e){d(n,e);var t=p(n);function n(e){var r;return v(this,n),(r=t.call(this)).command=e,r}return f(n,[{key:"doUndo",value:function(e){e.undoAddRows(this)}},{key:"doRedo",value:function(e){e.redoAddRows(this)}}]),n}(g),b=function(e){d(n,e);var t=p(n);function n(e,r,o){var i;return v(this,n),(i=t.call(this)).sheetId=e,i.rowMapping=r,i.oldContent=o,i}return f(n,[{key:"doUndo",value:function(e){e.undoSetRowOrder(this)}},{key:"doRedo",value:function(e){e.redoSetRowOrder(this)}}]),n}(g),w=function(e){d(n,e);var t=p(n);function n(e,r,o){var i;return v(this,n),(i=t.call(this)).sheetId=e,i.columnMapping=r,i.oldContent=o,i}return f(n,[{key:"doUndo",value:function(e){e.undoSetColumnOrder(this)}},{key:"doRedo",value:function(e){e.redoSetColumnOrder(this)}}]),n}(g),R=function(e){d(n,e);var t=p(n);function n(e,r,o){var i;return v(this,n),(i=t.call(this)).sheetId=e,i.oldSheetContent=r,i.newSheetContent=o,i}return f(n,[{key:"doUndo",value:function(e){e.undoSetSheetContent(this)}},{key:"doRedo",value:function(e){e.redoSetSheetContent(this)}}]),n}(g),O=function(e){d(n,e);var t=p(n);function n(e,r,o,i,a){var s;return v(this,n),(s=t.call(this)).sheet=e,s.startRow=r,s.numberOfRows=o,s.targetRow=i,s.version=a,s.undoStart=s.startRow<s.targetRow?s.targetRow-s.numberOfRows:s.targetRow,s.undoEnd=s.startRow>s.targetRow?s.startRow+s.numberOfRows:s.startRow,s}return f(n,[{key:"doUndo",value:function(e){e.undoMoveRows(this)}},{key:"doRedo",value:function(e){e.redoMoveRows(this)}}]),n}(g),S=function(e){d(n,e);var t=p(n);function n(e,r,o,i,a){var s;return v(this,n),(s=t.call(this)).sheet=e,s.startColumn=r,s.numberOfColumns=o,s.targetColumn=i,s.version=a,s.undoStart=s.startColumn<s.targetColumn?s.targetColumn-s.numberOfColumns:s.targetColumn,s.undoEnd=s.startColumn>s.targetColumn?s.startColumn+s.numberOfColumns:s.startColumn,s}return f(n,[{key:"doUndo",value:function(e){e.undoMoveColumns(this)}},{key:"doRedo",value:function(e){e.redoMoveColumns(this)}}]),n}(g),A=function(e){d(n,e);var t=p(n);function n(e){var r;return v(this,n),(r=t.call(this)).command=e,r}return f(n,[{key:"doUndo",value:function(e){e.undoAddColumns(this)}},{key:"doRedo",value:function(e){e.redoAddColumns(this)}}]),n}(g),N=function(e){d(n,e);var t=p(n);function n(e,r){var o;return v(this,n),(o=t.call(this)).command=e,o.columnsRemovals=r,o}return f(n,[{key:"doUndo",value:function(e){e.undoRemoveColumns(this)}},{key:"doRedo",value:function(e){e.redoRemoveColumns(this)}}]),n}(g),M=function(e){d(n,e);var t=p(n);function n(e){var r;return v(this,n),(r=t.call(this)).sheetName=e,r}return f(n,[{key:"doUndo",value:function(e){e.undoAddSheet(this)}},{key:"doRedo",value:function(e){e.redoAddSheet(this)}}]),n}(g),k=function(e){d(n,e);var t=p(n);function n(e,r,o,i,a){var s;return v(this,n),(s=t.call(this)).sheetName=e,s.sheetId=r,s.oldSheetContent=o,s.scopedNamedExpressions=i,s.version=a,s}return f(n,[{key:"doUndo",value:function(e){e.undoRemoveSheet(this)}},{key:"doRedo",value:function(e){e.redoRemoveSheet(this)}}]),n}(g),_=function(e){d(n,e);var t=p(n);function n(e,r,o){var i;return v(this,n),(i=t.call(this)).sheetId=e,i.oldName=r,i.newName=o,i}return f(n,[{key:"doUndo",value:function(e){e.undoRenameSheet(this)}},{key:"doRedo",value:function(e){e.redoRenameSheet(this)}}]),n}(g),I=function(e){d(n,e);var t=p(n);function n(e,r){var o;return v(this,n),(o=t.call(this)).sheetId=e,o.oldSheetContent=r,o}return f(n,[{key:"doUndo",value:function(e){e.undoClearSheet(this)}},{key:"doRedo",value:function(e){e.redoClearSheet(this)}}]),n}(g),P=function(e){d(n,e);var t=p(n);function n(e){var r;return v(this,n),(r=t.call(this)).cellContents=e,r}return f(n,[{key:"doUndo",value:function(e){e.undoSetCellContents(this)}},{key:"doRedo",value:function(e){e.redoSetCellContents(this)}}]),n}(g),x=function(e){d(n,e);var t=p(n);function n(e,r,o,i){var a;return v(this,n),(a=t.call(this)).targetLeftCorner=e,a.oldContent=r,a.newContent=o,a.addedGlobalNamedExpressions=i,a}return f(n,[{key:"doUndo",value:function(e){e.undoPaste(this)}},{key:"doRedo",value:function(e){e.redoPaste(this)}}]),n}(g),D=function(e){d(n,e);var t=p(n);function n(e,r,o,i){var a;return v(this,n),(a=t.call(this)).name=e,a.newContent=r,a.scope=o,a.options=i,a}return f(n,[{key:"doUndo",value:function(e){e.undoAddNamedExpression(this)}},{key:"doRedo",value:function(e){e.redoAddNamedExpression(this)}}]),n}(g),L=function(e){d(n,e);var t=p(n);function n(e,r,o){var i;return v(this,n),(i=t.call(this)).namedExpression=e,i.content=r,i.scope=o,i}return f(n,[{key:"doUndo",value:function(e){e.undoRemoveNamedExpression(this)}},{key:"doRedo",value:function(e){e.redoRemoveNamedExpression(this)}}]),n}(g),F=function(e){d(n,e);var t=p(n);function n(e,r,o,i,a){var s;return v(this,n),(s=t.call(this)).namedExpression=e,s.newContent=r,s.oldContent=o,s.scope=i,s.options=a,s}return f(n,[{key:"doUndo",value:function(e){e.undoChangeNamedExpression(this)}},{key:"doRedo",value:function(e){e.redoChangeNamedExpression(this)}}]),n}(g),j=function(e){d(n,e);var t=p(n);function n(){var e;return v(this,n),(e=t.apply(this,arguments)).operations=[],e}return f(n,[{key:"add",value:function(e){this.operations.push(e)}},{key:"reversedOperations",value:regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.operations.length-1;case 1:if(!(t>=0)){e.next=7;break}return e.next=4,this.operations[t];case 4:t--,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))},{key:"doUndo",value:function(e){e.undoBatch(this)}},{key:"doRedo",value:function(e){e.redoBatch(this)}}]),n}(g),U=function(){function e(t,n){v(this,e),this.operations=n,this.undoStack=[],this.redoStack=[],this.oldData=new Map,this.undoLimit=t.undoLimit}return f(e,[{key:"saveOperation",value:function(e){void 0!==this.batchUndoEntry?this.batchUndoEntry.add(e):this.addUndoEntry(e)}},{key:"beginBatchMode",value:function(){this.batchUndoEntry=new j}},{key:"addUndoEntry",value:function(e){this.undoStack.push(e),this.undoStack.splice(0,Math.max(0,this.undoStack.length-this.undoLimit))}},{key:"commitBatchMode",value:function(){if(void 0===this.batchUndoEntry)throw"Batch mode wasn't started";this.addUndoEntry(this.batchUndoEntry),this.batchUndoEntry=void 0}},{key:"storeDataForVersion",value:function(e,t,n){this.oldData.has(e)||this.oldData.set(e,[]),this.oldData.get(e).push([t,n])}},{key:"clearRedoStack",value:function(){this.redoStack=[]}},{key:"clearUndoStack",value:function(){this.undoStack=[]}},{key:"isUndoStackEmpty",value:function(){return 0===this.undoStack.length}},{key:"isRedoStackEmpty",value:function(){return 0===this.redoStack.length}},{key:"undo",value:function(){var e=this.undoStack.pop();if(!e)throw"Attempted to undo without operation on stack";this.undoEntry(e),this.redoStack.push(e)}},{key:"undoEntry",value:function(e){e.doUndo(this)}},{key:"undoBatch",value:function(e){var t,n=s(e.reversedOperations());try{for(n.s();!(t=n.n()).done;){var r=t.value;this.undoEntry(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"undoRemoveRows",value:function(e){this.operations.forceApplyPostponedTransformations();for(var t=e.command.sheet,n=e.rowsRemovals,r=n.length-1;r>=0;--r){var i=n[r];this.operations.addRows(new o.AddRowsCommand(t,[[i.rowFrom,i.rowCount]]));var a,u=s(i.removedCells);try{for(u.s();!(a=u.n()).done;){var l=a.value,c=l.address,f=l.cellType;this.operations.restoreCell(c,f)}}catch(e){u.e(e)}finally{u.f()}this.restoreOldDataFromVersion(i.version-1)}}},{key:"undoRemoveColumns",value:function(e){this.operations.forceApplyPostponedTransformations();for(var t=e.command.sheet,n=e.columnsRemovals,r=n.length-1;r>=0;--r){var i=n[r];this.operations.addColumns(new o.AddColumnsCommand(t,[[i.columnFrom,i.columnCount]]));var a,u=s(i.removedCells);try{for(u.s();!(a=u.n()).done;){var l=a.value,c=l.address,f=l.cellType;this.operations.restoreCell(c,f)}}catch(e){u.e(e)}finally{u.f()}this.restoreOldDataFromVersion(i.version-1)}}},{key:"undoAddRows",value:function(e){for(var t=e.command.rowsSpans(),n=t.length-1;n>=0;--n){var r=t[n];this.operations.removeRows(new o.RemoveRowsCommand(e.command.sheet,[[r.rowStart,r.numberOfRows]]))}}},{key:"undoAddColumns",value:function(e){for(var t=e.command.columnsSpans(),n=t.length-1;n>=0;--n){var r=t[n];this.operations.removeColumns(new o.RemoveColumnsCommand(e.command.sheet,[[r.columnStart,r.numberOfColumns]]))}}},{key:"undoSetCellContents",value:function(e){var t,n=s(e.cellContents);try{for(n.s();!(t=n.n()).done;){var o=t.value,i=o.address,u=a(o.oldContent,2),l=u[0],c=u[1];Object(r.equalSimpleCellAddress)(i,l)||this.operations.setCellEmpty(i),this.operations.restoreCell(l,c)}}catch(e){n.e(e)}finally{n.f()}}},{key:"undoPaste",value:function(e){this.restoreOperationOldContent(e.oldContent);var t,n=s(e.addedGlobalNamedExpressions);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.operations.removeNamedExpression(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"undoMoveRows",value:function(e){var t=e.sheet;this.operations.moveRows(t,e.undoStart,e.numberOfRows,e.undoEnd),this.restoreOldDataFromVersion(e.version-1)}},{key:"undoMoveColumns",value:function(e){var t=e.sheet;this.operations.moveColumns(t,e.undoStart,e.numberOfColumns,e.undoEnd),this.restoreOldDataFromVersion(e.version-1)}},{key:"undoMoveCells",value:function(e){this.operations.forceApplyPostponedTransformations(),this.operations.moveCells(e.destinationLeftCorner,e.width,e.height,e.sourceLeftCorner),this.restoreOperationOldContent(e.overwrittenCellsData),this.restoreOldDataFromVersion(e.version-1);var t,n=s(e.addedGlobalNamedExpressions);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.operations.removeNamedExpression(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"undoAddSheet",value:function(e){var t=e.sheetName;this.operations.removeSheetByName(t)}},{key:"undoRemoveSheet",value:function(e){this.operations.forceApplyPostponedTransformations();var t=e.oldSheetContent,n=e.sheetId;this.operations.addSheet(e.sheetName);for(var o=0;o<t.length;o++)for(var i=t[o],u=0;u<i.length;u++){var l=i[u],c=Object(r.simpleCellAddress)(n,u,o);this.operations.restoreCell(c,l)}var f,d=s(e.scopedNamedExpressions);try{for(d.s();!(f=d.n()).done;){var h=a(f.value,2),p=h[0],m=h[1];this.operations.restoreNamedExpression(p,m,n)}}catch(e){d.e(e)}finally{d.f()}this.restoreOldDataFromVersion(e.version-1)}},{key:"undoRenameSheet",value:function(e){this.operations.renameSheet(e.sheetId,e.oldName)}},{key:"undoClearSheet",value:function(e){for(var t=e.oldSheetContent,n=e.sheetId,o=0;o<t.length;o++)for(var i=t[o],a=0;a<i.length;a++){var s=i[a],u=Object(r.simpleCellAddress)(n,a,o);this.operations.restoreCell(u,s)}}},{key:"undoSetSheetContent",value:function(e){var t=e.oldSheetContent,n=e.sheetId;this.operations.clearSheet(n);for(var o=0;o<t.length;o++)for(var i=t[o],a=0;a<i.length;a++){var s=i[a],u=Object(r.simpleCellAddress)(n,a,o);this.operations.restoreCell(u,s)}}},{key:"undoAddNamedExpression",value:function(e){this.operations.removeNamedExpression(e.name,e.scope)}},{key:"undoRemoveNamedExpression",value:function(e){this.operations.restoreNamedExpression(e.namedExpression,e.content,e.scope)}},{key:"undoChangeNamedExpression",value:function(e){this.operations.restoreNamedExpression(e.namedExpression,e.oldContent,e.scope)}},{key:"undoSetRowOrder",value:function(e){this.restoreOperationOldContent(e.oldContent)}},{key:"undoSetColumnOrder",value:function(e){this.restoreOperationOldContent(e.oldContent)}},{key:"restoreOperationOldContent",value:function(e){var t,n=s(e);try{for(n.s();!(t=n.n()).done;){var r=a(t.value,2),o=r[0],i=r[1];this.operations.restoreCell(o,i)}}catch(e){n.e(e)}finally{n.f()}}},{key:"redo",value:function(){var e=this.redoStack.pop();if(!e)throw"Attempted to redo without operation on stack";this.redoEntry(e),this.undoStack.push(e)}},{key:"redoEntry",value:function(e){e.doRedo(this)}},{key:"redoBatch",value:function(e){var t,n=s(e.operations);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.redoEntry(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"redoRemoveRows",value:function(e){this.operations.removeRows(e.command)}},{key:"redoMoveCells",value:function(e){this.operations.moveCells(e.sourceLeftCorner,e.width,e.height,e.destinationLeftCorner)}},{key:"redoRemoveColumns",value:function(e){this.operations.removeColumns(e.command)}},{key:"redoPaste",value:function(e){for(var t=e.targetLeftCorner,n=e.newContent,o=n.length,i=n[0].length,a=0;a<o;++a)for(var s=0;s<i;++s){var u=Object(r.simpleCellAddress)(t.sheet,t.col+s,t.row+a);this.operations.restoreCell(u,n[a][s])}}},{key:"redoSetCellContents",value:function(e){var t,n=s(e.cellContents);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.operations.setCellContent(r.address,r.newContent)}}catch(e){n.e(e)}finally{n.f()}}},{key:"redoAddRows",value:function(e){this.operations.addRows(e.command)}},{key:"redoAddColumns",value:function(e){this.operations.addColumns(e.command)}},{key:"redoRemoveSheet",value:function(e){this.operations.removeSheetByName(e.sheetName)}},{key:"redoAddSheet",value:function(e){this.operations.addSheet(e.sheetName)}},{key:"redoRenameSheet",value:function(e){this.operations.renameSheet(e.sheetId,e.newName)}},{key:"redoMoveRows",value:function(e){this.operations.moveRows(e.sheet,e.startRow,e.numberOfRows,e.targetRow)}},{key:"redoMoveColumns",value:function(e){this.operations.moveColumns(e.sheet,e.startColumn,e.numberOfColumns,e.targetColumn)}},{key:"redoClearSheet",value:function(e){this.operations.clearSheet(e.sheetId)}},{key:"redoSetSheetContent",value:function(e){var t=e.sheetId,n=e.newSheetContent;this.operations.setSheetContent(t,n)}},{key:"redoAddNamedExpression",value:function(e){this.operations.addNamedExpression(e.name,e.newContent,e.scope,e.options)}},{key:"redoRemoveNamedExpression",value:function(e){this.operations.removeNamedExpression(e.namedExpression.displayName,e.scope)}},{key:"redoChangeNamedExpression",value:function(e){this.operations.changeNamedExpressionExpression(e.namedExpression.displayName,e.newContent,e.scope,e.options)}},{key:"redoSetRowOrder",value:function(e){this.operations.setRowOrder(e.sheetId,e.rowMapping)}},{key:"redoSetColumnOrder",value:function(e){this.operations.setColumnOrder(e.sheetId,e.columnMapping)}},{key:"restoreOldDataFromVersion",value:function(e){var t,n=s(this.oldData.get(e)||[]);try{for(n.s();!(t=n.n()).done;){var r=a(t.value,2),o=r[0],i=r[1];this.operations.setFormulaToCellFromCache(i,o)}}catch(e){n.e(e)}finally{n.f()}}}]),e}()},function(e,t,n){n(29)({target:"Math",stat:!0},{log10:n(689)})},function(e,t,n){"use strict";n.r(t),n.d(t,"ColumnBinarySearch",(function(){return d}));n(37),n(223),n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(105),o=n(377),i=n(48);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(f,e);var t,n,a,c=l(f);function f(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(n=c.call(this,e)).dependencyGraph=e,n.config=t,n}return t=f,(n=[{key:"add",value:function(e,t){}},{key:"remove",value:function(e,t){}},{key:"change",value:function(e,t,n){}},{key:"applyChanges",value:function(e){}},{key:"addColumns",value:function(e){}},{key:"removeColumns",value:function(e){}},{key:"removeSheet",value:function(e){}},{key:"moveValues",value:function(e,t,n,r){}},{key:"removeValues",value:function(e){}},{key:"find",value:function(e,t,n){"string"==typeof e&&(e=Object(r.forceNormalizeString)(e));var a=t.range;return void 0===a?t.valuesFromTopLeftCorner().map(i.getRawValue).map((function(e){return"string"==typeof e?Object(r.forceNormalizeString)(e):e})).indexOf(e):n?Object(o.rangeLowerBound)(a,e,this.dependencyGraph,"row"):this.dependencyGraph.computeListOfValuesInRange(a).findIndex((function(t){return(t="string"==typeof(t=Object(i.getRawValue)(t))?Object(r.forceNormalizeString)(t):t)===e}))}}])&&s(t.prototype,n),a&&s(t,a),f}(n(378).AdvancedFind)},function(e,t,n){"use strict";n.r(t),n.d(t,"rangeLowerBound",(function(){return a})),n.d(t,"lowerBound",(function(){return s})),n.d(t,"compare",(function(){return u}));n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(22),o=n(48);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function a(e,t,n,a){var u;u="col"===a?e.effectiveEndColumn(n):e.effectiveEndRow(n);var l,c=e.start[a],f=s(l="row"===a?function(t){return Object(o.getRawValue)(n.getCellValue(Object(r.simpleCellAddress)(e.sheet,e.start.col,t)))}:function(t){return Object(o.getRawValue)(n.getCellValue(Object(r.simpleCellAddress)(e.sheet,t,e.start.row)))},t,c,u);return i(l(f))!==i(t)?-1:f-c}function s(e,t,n,r){for(;n<=r;){var o=Math.floor((n+r)/2),i=u(t,e(o));if(i>0)n=o+1;else if(i<0)r=o-1;else{if(n==o)return o;r=o}}return r}function u(e,t){return i(e)===i(t)?e===o.EmptyValue?0:e<t?-1:e>t?1:0:e===o.EmptyValue?-1:t===o.EmptyValue?1:t instanceof r.CellError||"number"==typeof e&&"string"==typeof t||"number"==typeof e&&"boolean"==typeof t?-1:"string"==typeof e&&"number"==typeof t?1:"string"==typeof e&&"boolean"==typeof t?-1:1}},function(e,t,n){"use strict";n.r(t),n.d(t,"AdvancedFind",(function(){return i}));var r=n(48);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.dependencyGraph=t}var t,n,i;return t=e,(n=[{key:"advancedFind",value:function(e,t){var n,o=t.range;n=void 0===o?t.valuesFromTopLeftCorner():this.dependencyGraph.computeListOfValuesInRange(o);for(var i=0;i<n.length;i++)if(e(Object(r.getRawValue)(n[i])))return i;return-1}}])&&o(t.prototype,n),i&&o(t,i),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"ArrayPlugin",(function(){return b}));n(37),n(12),n(67),n(51),n(25),n(7),n(0),n(24),n(21),n(2),n(8),n(9),n(10),n(3),n(4);var r=n(126),o=n(22),i=n(43),a=n(70),s=n(105),u=n(182),l=n(80),c=n(38);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function p(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C(e);if(t){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T(this,n)}}function T(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(p,e);var t,n,c,f=E(p);function p(){return y(this,p),f.apply(this,arguments)}return t=p,(n=[{key:"arrayformula",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ARRAYFORMULA"),(function(e){return e}))}},{key:"arrayformulaArraySize",value:function(e,t){var n=this;if(1!==e.args.length)return r.ArraySize.error();var o=this.metadata("ARRAYFORMULA");return e.args.map((function(e){var r;return n.arraySizeForAst(e,new u.InterpreterState(t.formulaAddress,t.arraysFlag||null!==(r=null==o?void 0:o.arrayFunction)&&void 0!==r&&r))}))[0]}},{key:"arrayconstrain",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ARRAY_CONSTRAIN"),(function(e,t,n){t=Math.min(t,e.height()),n=Math.min(n,e.width());for(var r=e.data,o=[],i=0;i<t;i++)o.push(r[i].slice(0,n));return l.SimpleRangeValue.onlyValues(o)}))}},{key:"arrayconstrainArraySize",value:function(e,t){var n=this;if(3!==e.args.length)return r.ArraySize.error();var o=this.metadata("ARRAY_CONSTRAIN"),i=e.args.map((function(e){var r;return n.arraySizeForAst(e,new u.InterpreterState(t.formulaAddress,t.arraysFlag||null!==(r=null==o?void 0:o.arrayFunction)&&void 0!==r&&r))}))[0],s=i.height,l=i.width;return e.args[1].type===a.AstNodeType.NUMBER&&(s=Math.min(s,e.args[1].value)),e.args[2].type===a.AstNodeType.NUMBER&&(l=Math.min(l,e.args[2].value)),s<1||l<1||!Number.isInteger(s)||!Number.isInteger(l)?r.ArraySize.error():new r.ArraySize(l,s)}},{key:"filter",value:function(e,t){return this.runFunction(e.args,t,this.metadata("FILTER"),(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var a=0,u=n;a<u.length;a++){var c=u[a];if(e.width()!==c.width()||e.height()!==c.height())return new o.CellError(o.ErrorType.NA,i.ErrorMessage.EqualLength)}if(e.width()>1&&e.height()>1)return new o.CellError(o.ErrorType.NA,i.ErrorMessage.WrongDimension);for(var f=e.data,d=[],p=0;p<e.height();p++){for(var m=[],y=0;y<e.width();y++){var v,g=!0,E=h(n);try{for(E.s();!(v=E.n()).done;){var T=v.value,C=Object(s.coerceScalarToBoolean)(T.data[p][y]);if(!0!==C){g=!1;break}}}catch(e){E.e(e)}finally{E.f()}g&&m.push(f[p][y])}m.length>0&&d.push(m)}return d.length>0?l.SimpleRangeValue.onlyValues(d):new o.CellError(o.ErrorType.NA,i.ErrorMessage.EmptyRange)}))}},{key:"filterArraySize",value:function(e,t){var n=this;if(e.args.length<=1)return r.ArraySize.error();var o=this.metadata("FILTER"),i=e.args.map((function(e){var r;return n.arraySizeForAst(e,new u.InterpreterState(t.formulaAddress,t.arraysFlag||null!==(r=null==o?void 0:o.arrayFunction)&&void 0!==r&&r))})),a=Math.max.apply(Math,d(i.map((function(e){return e.width})))),s=Math.max.apply(Math,d(i.map((function(e){return e.height}))));return new r.ArraySize(a,s)}}])&&v(t.prototype,n),c&&v(t,c),p}(c.FunctionPlugin);b.implementedFunctions={ARRAYFORMULA:{method:"arrayformula",arraySizeMethod:"arrayformulaArraySize",arrayFunction:!0,parameters:[{argumentType:c.ArgumentTypes.ANY}]},ARRAY_CONSTRAIN:{method:"arrayconstrain",arraySizeMethod:"arrayconstrainArraySize",parameters:[{argumentType:c.ArgumentTypes.RANGE},{argumentType:c.ArgumentTypes.INTEGER,minValue:1},{argumentType:c.ArgumentTypes.INTEGER,minValue:1}],vectorizationForbidden:!0},FILTER:{method:"filter",arraySizeMethod:"filterArraySize",arrayFunction:!0,parameters:[{argumentType:c.ArgumentTypes.RANGE},{argumentType:c.ArgumentTypes.RANGE}],repeatLastArgs:1}}},function(e,t,n){"use strict";n.r(t),n.d(t,"AbsPlugin",(function(){return f}));n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(38);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"abs",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ABS"),Math.abs)}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={ABS:{method:"abs",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"BitShiftPlugin",(function(){return h}));n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(22),o=n(43),i=n(38);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(i,e);var t,n,r,o=c(i);function i(){return s(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"bitlshift",value:function(e,t){return this.runFunction(e.args,t,this.metadata("BITLSHIFT"),p)}},{key:"bitrshift",value:function(e,t){return this.runFunction(e.args,t,this.metadata("BITRSHIFT"),m)}}])&&u(t.prototype,n),r&&u(t,r),i}(i.FunctionPlugin);function p(e,t){return t<0?m(e,-t):y(e*Math.pow(2,t))}function m(e,t){return t<0?p(e,-t):y(Math.floor(e/Math.pow(2,t)))}function y(e){return e>0xffffffffffff?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.BitshiftLong):e}h.implementedFunctions={BITLSHIFT:{method:"bitlshift",parameters:[{argumentType:i.ArgumentTypes.INTEGER,minValue:0},{argumentType:i.ArgumentTypes.INTEGER,minValue:-53,maxValue:53}]},BITRSHIFT:{method:"bitrshift",parameters:[{argumentType:i.ArgumentTypes.INTEGER,minValue:0},{argumentType:i.ArgumentTypes.INTEGER,minValue:-53,maxValue:53}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"BitwiseLogicOperationsPlugin",(function(){return f}));n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(38);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"bitand",value:function(e,t){return this.runFunction(e.args,t,this.metadata("BITAND"),(function(e,t){return e&t}))}},{key:"bitor",value:function(e,t){return this.runFunction(e.args,t,this.metadata("BITOR"),(function(e,t){return e|t}))}},{key:"bitxor",value:function(e,t){return this.runFunction(e.args,t,this.metadata("BITXOR"),(function(e,t){return e^t}))}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={BITAND:{method:"bitand",parameters:[{argumentType:r.ArgumentTypes.INTEGER,minValue:0},{argumentType:r.ArgumentTypes.INTEGER,minValue:0}]},BITOR:{method:"bitor",parameters:[{argumentType:r.ArgumentTypes.INTEGER,minValue:0},{argumentType:r.ArgumentTypes.INTEGER,minValue:0}]},BITXOR:{method:"bitxor",parameters:[{argumentType:r.ArgumentTypes.INTEGER,minValue:0},{argumentType:r.ArgumentTypes.INTEGER,minValue:0}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"BooleanPlugin",(function(){return h}));n(26),n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(22),o=n(43),i=n(38);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,i,a=c(f);function f(){return s(this,f),a.apply(this,arguments)}return t=f,(n=[{key:"literalTrue",value:function(e,t){return this.runFunction(e.args,t,this.metadata("TRUE"),(function(){return!0}))}},{key:"literalFalse",value:function(e,t){return this.runFunction(e.args,t,this.metadata("FALSE"),(function(){return!1}))}},{key:"conditionalIf",value:function(e,t){return this.runFunction(e.args,t,this.metadata("IF"),(function(e,t,n){return e?t:n}))}},{key:"and",value:function(e,t){return this.runFunction(e.args,t,this.metadata("AND"),(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!e}))}))}},{key:"or",value:function(e,t){return this.runFunction(e.args,t,this.metadata("OR"),(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.some((function(e){return e}))}))}},{key:"not",value:function(e,t){return this.runFunction(e.args,t,this.metadata("NOT"),(function(e){return!e}))}},{key:"xor",value:function(e,t){return this.runFunction(e.args,t,this.metadata("XOR"),(function(){for(var e=0,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&e++})),e%2==1}))}},{key:"switch",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("SWITCH"),(function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),a=1;a<t;a++)i[a-1]=arguments[a];for(var s=i.length,u=0;u+1<s;u+=2)if(!(i[u]instanceof r.CellError)&&n.arithmeticHelper.eq(e,i[u]))return i[u+1];return u<s?i[u]:new r.CellError(r.ErrorType.NA,o.ErrorMessage.NoDefault)}))}},{key:"iferror",value:function(e,t){return this.runFunction(e.args,t,this.metadata("IFERROR"),(function(e,t){return e instanceof r.CellError?t:e}))}},{key:"ifna",value:function(e,t){return this.runFunction(e.args,t,this.metadata("IFNA"),(function(e,t){return e instanceof r.CellError&&e.type===r.ErrorType.NA?t:e}))}},{key:"choose",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CHOOSE"),(function(e){return e>(arguments.length<=1?0:arguments.length-1)?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.Selector):e-1+1<1||arguments.length<=e-1+1?void 0:arguments[e-1+1]}))}}])&&u(t.prototype,n),i&&u(t,i),f}(i.FunctionPlugin);h.implementedFunctions={TRUE:{method:"literalTrue",parameters:[]},FALSE:{method:"literalFalse",parameters:[]},IF:{method:"conditionalIf",parameters:[{argumentType:i.ArgumentTypes.BOOLEAN},{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0},{argumentType:i.ArgumentTypes.SCALAR,defaultValue:!1,passSubtype:!0}]},AND:{method:"and",parameters:[{argumentType:i.ArgumentTypes.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},OR:{method:"or",parameters:[{argumentType:i.ArgumentTypes.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},XOR:{method:"xor",parameters:[{argumentType:i.ArgumentTypes.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},NOT:{method:"not",parameters:[{argumentType:i.ArgumentTypes.BOOLEAN}]},SWITCH:{method:"switch",parameters:[{argumentType:i.ArgumentTypes.NOERROR},{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0},{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0}],repeatLastArgs:1},IFERROR:{method:"iferror",parameters:[{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0},{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0}]},IFNA:{method:"ifna",parameters:[{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0},{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0}]},CHOOSE:{method:"choose",parameters:[{argumentType:i.ArgumentTypes.INTEGER,minValue:1},{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0}],repeatLastArgs:1}}},function(e,t,n){"use strict";n.r(t),n.d(t,"CharPlugin",(function(){return h}));n(143),n(706),n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(22),o=n(43),i=n(38);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,i,a=c(f);function f(){return s(this,f),a.apply(this,arguments)}return t=f,(n=[{key:"char",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),(function(e){return e<1||e>=256?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.CharacterCodeBounds):String.fromCharCode(Math.trunc(e))}))}},{key:"unichar",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),(function(e){return e<1||e>=1114112?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.CharacterCodeBounds):String.fromCodePoint(Math.trunc(e))}))}}])&&u(t.prototype,n),i&&u(t,i),f}(i.FunctionPlugin);h.implementedFunctions={CHAR:{method:"char",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},UNICHAR:{method:"unichar",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"CodePlugin",(function(){return h}));n(286),n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(22),o=n(43),i=n(38);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,i,a=c(f);function f(){return s(this,f),a.apply(this,arguments)}return t=f,(n=[{key:"code",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CODE"),(function(e){return 0===e.length?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.EmptyString):e.charCodeAt(0)}))}},{key:"unicode",value:function(e,t){return this.runFunction(e.args,t,this.metadata("UNICODE"),(function(e){var t;return null!==(t=e.codePointAt(0))&&void 0!==t?t:new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.EmptyString)}))}}])&&u(t.prototype,n),i&&u(t,i),f}(i.FunctionPlugin);h.implementedFunctions={CODE:{method:"code",parameters:[{argumentType:i.ArgumentTypes.STRING}]},UNICODE:{method:"unicode",parameters:[{argumentType:i.ArgumentTypes.STRING}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"CountBlankPlugin",(function(){return d}));n(26),n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(48),o=n(38);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(c,e);var t,n,o,i=l(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"countblank",value:function(e,t){return this.runFunction(e.args,t,this.metadata("COUNTBLANK"),(function(){for(var e=0,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return n.forEach((function(t){t===r.EmptyValue&&e++})),e}))}}])&&s(t.prototype,n),o&&s(t,o),c}(o.FunctionPlugin);d.implementedFunctions={COUNTBLANK:{method:"countblank",parameters:[{argumentType:o.ArgumentTypes.SCALAR}],repeatLastArgs:1,expandRanges:!0}}},function(e,t,n){"use strict";n.r(t),n.d(t,"CountUniquePlugin",(function(){return d}));n(3),n(0),n(58),n(2),n(4),n(25),n(7),n(8),n(9),n(10);var r=n(22),o=n(38);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(c,e);var t,n,o,i=l(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"countunique",value:function(e,t){return this.runFunction(e.args,t,this.metadata("COUNTUNIQUE"),(function(){for(var e=new Set,t=new Set,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];for(var a=0,s=o;a<s.length;a++){var u=s[a];u instanceof r.CellError?t.add(u.type):""!==u&&e.add(u)}return e.size+t.size}))}}])&&s(t.prototype,n),o&&s(t,o),c}(o.FunctionPlugin);d.implementedFunctions={COUNTUNIQUE:{method:"countunique",parameters:[{argumentType:o.ArgumentTypes.SCALAR}],repeatLastArgs:1,expandRanges:!0}}},function(e,t,n){"use strict";n.r(t),n.d(t,"DateTimePlugin",(function(){return C}));n(143),n(40),n(77),n(3),n(0),n(58),n(2),n(4),n(36),n(25),n(7),n(8),n(9),n(10),n(12),n(24),n(21);var r=n(22),o=n(154),i=n(43),a=n(283),s=n(48),u=n(38);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=h(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}function E(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(h,e);var t,n,u,l=g(h);function h(){var e;return m(this,h),(e=l.apply(this,arguments)).isoweeknumCore=function(t){var n=Math.floor(e.dateTimeHelper.relativeNumberToAbsoluteNumber(t)),r=e.dateTimeHelper.numberToSimpleDate(t),o=e.dateTimeHelper.dateToNumber({year:r.year,month:1,day:1}),i=e.dateTimeHelper.relativeNumberToAbsoluteNumber(o),a=i+((4-i)%7+7)%7,s=Math.floor((n-1)/7)-Math.floor((a-1)/7)+1;return 0===s?e.isoweeknumCore(t-7)+1:s},e.days360Core=function(t,n,r){var i,a,s=e.dateTimeHelper.numberToSimpleDate(t),u=e.dateTimeHelper.numberToSimpleDate(n);if(r)i=Object(o.toBasisEU)(s),a=Object(o.toBasisEU)(u);else{var l=d(e.dateTimeHelper.toBasisUS(s,u),2);i=l[0],a=l[1]}return 360*(a.year-i.year)+30*(a.month-i.month)+a.day-i.day},e}return t=h,(n=[{key:"date",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("DATE"),(function(e,t,o){var a=Math.trunc(o),s=Math.trunc(t),u=Math.trunc(e);u<n.dateTimeHelper.getEpochYearZero()&&(u+=n.dateTimeHelper.getEpochYearZero());var l=Math.floor((s-1)/12),c={year:u+=l,month:s-=12*l,day:1};if(n.dateTimeHelper.isValidDate(c)){var f=n.dateTimeHelper.dateToNumber(c)+(a-1);return void 0===(f=n.dateTimeHelper.getWithinBounds(f))?new r.CellError(r.ErrorType.NUM,i.ErrorMessage.DateBounds):f}return new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.InvalidDate)}))}},{key:"time",value:function(e,t){return this.runFunction(e.args,t,this.metadata("TIME"),(function(e,t,n){var a=Object(o.timeToNumber)({hours:Math.trunc(e),minutes:Math.trunc(t),seconds:Math.trunc(n)});return a<0?new r.CellError(r.ErrorType.NUM,i.ErrorMessage.NegativeTime):a%1}))}},{key:"eomonth",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("EOMONTH"),(function(e,t){var a=n.dateTimeHelper.numberToSimpleDate(e),s=n.dateTimeHelper.dateToNumber(n.dateTimeHelper.endOfMonth(Object(o.offsetMonth)(a,t)));return void 0===(s=n.dateTimeHelper.getWithinBounds(s))?new r.CellError(r.ErrorType.NUM,i.ErrorMessage.DateBounds):s}))}},{key:"day",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("DAY"),(function(e){return n.dateTimeHelper.numberToSimpleDate(e).day}))}},{key:"days",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DAYS"),(function(e,t){return Math.trunc(e)-Math.trunc(t)}))}},{key:"month",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("MONTH"),(function(e){return n.dateTimeHelper.numberToSimpleDate(e).month}))}},{key:"year",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("YEAR"),(function(e){return n.dateTimeHelper.numberToSimpleDate(e).year}))}},{key:"hour",value:function(e,t){return this.runFunction(e.args,t,this.metadata("HOUR"),(function(e){return Object(o.numberToSimpleTime)(Object(o.roundToNearestSecond)(e)%1).hours}))}},{key:"minute",value:function(e,t){return this.runFunction(e.args,t,this.metadata("MINUTE"),(function(e){return Object(o.numberToSimpleTime)(Object(o.roundToNearestSecond)(e)%1).minutes}))}},{key:"second",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SECOND"),(function(e){return Object(o.numberToSimpleTime)(Object(o.roundToNearestSecond)(e)%1).seconds}))}},{key:"text",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("TEXT"),(function(e,t){return Object(a.format)(e,t,n.config,n.dateTimeHelper)}))}},{key:"weekday",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("WEEKDAY"),(function(e,t){var o=Math.floor(n.dateTimeHelper.relativeNumberToAbsoluteNumber(e));if(3===t)return(o-1)%7;var a=R.get(t);return void 0===a?new r.CellError(r.ErrorType.NUM,i.ErrorMessage.BadMode):(o-a)%7+1}))}},{key:"weeknum",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("WEEKNUM"),(function(e,t){var o=Math.floor(n.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),a=n.dateTimeHelper.numberToSimpleDate(e),s=n.dateTimeHelper.dateToNumber({year:a.year,month:1,day:1}),u=n.dateTimeHelper.relativeNumberToAbsoluteNumber(s);if(21===t)return n.isoweeknumCore(e);var l=R.get(t);return void 0===l?new r.CellError(r.ErrorType.NUM,i.ErrorMessage.BadMode):Math.floor((o-l)/7)-Math.floor((u-l)/7)+1}))}},{key:"isoweeknum",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISOWEEKNUM"),this.isoweeknumCore)}},{key:"datevalue",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("DATEVALUE"),(function(e){var t=n.dateTimeHelper.parseDateTimeFromConfigFormats(e).dateTime;return void 0===t?new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.IncorrectDateTime):Object(o.instanceOfSimpleDate)(t)?(Object(o.instanceOfSimpleTime)(t)?Math.trunc(Object(o.timeToNumber)(t)):0)+n.dateTimeHelper.dateToNumber(t):0}))}},{key:"timevalue",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("TIMEVALUE"),(function(e){var t=n.dateTimeHelper.dateStringToDateNumber(e);return void 0===t?new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.IncorrectDateTime):Object(s.getRawValue)(t)%1}))}},{key:"now",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("NOW"),(function(){var e=new Date(Date.now());return Object(o.timeToNumber)({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()})+n.dateTimeHelper.dateToNumber({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()})}))}},{key:"today",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("TODAY"),(function(){var e=new Date(Date.now());return n.dateTimeHelper.dateToNumber({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()})}))}},{key:"edate",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("EDATE"),(function(e,t){var a=n.dateTimeHelper.numberToSimpleDate(e),s=Object(o.truncateDayInMonth)(Object(o.offsetMonth)(a,t)),u=n.dateTimeHelper.dateToNumber(s);return void 0===(u=n.dateTimeHelper.getWithinBounds(u))?new r.CellError(r.ErrorType.NUM,i.ErrorMessage.DateBounds):u}))}},{key:"datedif",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("DATEDIF"),(function(e,t,o){if(e>t)return new r.CellError(r.ErrorType.NUM,i.ErrorMessage.StartEndDate);if("D"===o)return Math.floor(t)-Math.floor(e);var a=n.dateTimeHelper.numberToSimpleDate(e),s=n.dateTimeHelper.numberToSimpleDate(t);switch(o){case"M":return 12*(s.year-a.year)+(s.month-a.month)-(s.day<a.day?1:0);case"YM":return(s.month-a.month+12-(s.day<a.day?1:0))%12;case"Y":return s.month>a.month||s.month===a.month&&s.day>=a.day?s.year-a.year:s.year-a.year-1;case"MD":if(s.day>=a.day)return s.day-a.day;var u=1===s.month?12:s.month-1,l=1===s.month?s.year-1:s.year;return n.dateTimeHelper.daysInMonth(l,u)+s.day-a.day;case"YD":return s.month>a.month||s.month===a.month&&s.day>=a.day?Math.floor(t)-n.dateTimeHelper.dateToNumber({year:s.year,month:a.month,day:a.day}):Math.floor(t)-Math.floor(e)-365*(s.year-a.year-1)-n.dateTimeHelper.leapYearsCount(s.year-1)+n.dateTimeHelper.leapYearsCount(a.year);default:return new r.CellError(r.ErrorType.NUM,i.ErrorMessage.BadMode)}}))}},{key:"days360",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DAYS360"),this.days360Core)}},{key:"yearfrac",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("YEARFRAC"),(function(e,t,r){if((e=Math.trunc(e))>(t=Math.trunc(t))){var o=[t,e];e=o[0],t=o[1]}switch(r){case 0:return n.days360Core(e,t,!1)/360;case 1:return(t-e)/n.dateTimeHelper.yearLengthForBasis(n.dateTimeHelper.numberToSimpleDate(e),n.dateTimeHelper.numberToSimpleDate(t));case 2:return(t-e)/360;case 3:return(t-e)/365;case 4:return n.days360Core(e,t,!0)/360}throw new Error("Should not be reachable.")}))}},{key:"interval",value:function(e,t){return this.runFunction(e.args,t,this.metadata("INTERVAL"),(function(e){var t=(e=Math.trunc(e))%60,n=(e=Math.trunc(e/60))%60,r=(e=Math.trunc(e/60))%24,o=(e=Math.trunc(e/24))%30,i=(e=Math.trunc(e/30))%12,a=Math.trunc(e/12);return"P"+(a>0?a+"Y":"")+(i>0?i+"M":"")+(o>0?o+"D":"")+"T"+(r>0?r+"H":"")+(n>0?n+"M":"")+(t>0?t+"S":"")}))}},{key:"networkdays",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("NETWORKDAYS"),(function(e,t,r){return n.networkdayscore(e,t,1,r)}))}},{key:"networkdaysintl",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("NETWORKDAYS.INTL"),(function(e,t,r,o){return n.networkdayscore(e,t,r,o)}))}},{key:"workday",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("WORKDAY"),(function(e,t,r){return n.workdaycore(e,t,1,r)}))}},{key:"workdayintl",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("WORKDAY.INTL"),(function(e,t,r,o){return n.workdaycore(e,t,r,o)}))}},{key:"networkdayscore",value:function(e,t,n,o){var i=1;if((e=Math.trunc(e))>(t=Math.trunc(t))){var a=[t,e];e=a[0],t=a[1],i=-1}var s=w(n);if(s instanceof r.CellError)return s;var u=this.simpleRangeToFilteredHolidays(s,o);return u instanceof r.CellError?u:i*this.countWorkdays(e,t,s,u)}},{key:"workdaycore",value:function(e,t,n,o){e=Math.trunc(e),t=Math.trunc(t);var i=w(n);if(i instanceof r.CellError)return i;var a=this.simpleRangeToFilteredHolidays(i,o);if(a instanceof r.CellError)return a;if(t>0){for(var s=1;this.countWorkdays(e+1,e+s,i,a)<t;)s*=2;for(var u=1;u+1<s;){var l=Math.trunc((u+s)/2);this.countWorkdays(e+1,e+l,i,a)<t?u=l:s=l}return e+s}if(t<0){t*=-1;for(var c=1;this.countWorkdays(e-c,e-1,i,a)<t;)c*=2;for(var f=1;f+1<c;){var d=Math.trunc((f+c)/2);this.countWorkdays(e-d,e-1,i,a)<t?f=d:c=d}return e-c}return e}},{key:"countWorkdays",value:function(e,t,n,r){for(var o=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(t)),i=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),a=0,s=0;s<7;s++)"0"===n.charAt(s)&&(a+=Math.floor((o+6-s)/7),a-=Math.floor((i-1+6-s)/7));return a-=b(t+1,r)-b(e,r)}},{key:"simpleRangeToFilteredHolidays",value:function(e,t){var n,o,a=this,u=null!==(n=null==t?void 0:t.valuesFromTopLeftCorner())&&void 0!==n?n:[],l=f(u);try{for(l.s();!(o=l.n()).done;){var d=o.value;if(d instanceof r.CellError)return d}}catch(e){l.e(e)}finally{l.f()}var h,p=[],m=f(u);try{for(m.s();!(h=m.n()).done;){var y=h.value;if(y!==s.EmptyValue){if(!Object(s.isExtendedNumber)(y))return new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.WrongType);p.push(Math.trunc(Object(s.getRawValue)(y)))}}}catch(e){m.e(e)}finally{m.f()}return c(new Set(p)).sort((function(e,t){return e-t})).filter((function(t){var n=(a.dateTimeHelper.relativeNumberToAbsoluteNumber(t)-1)%7;return"0"===e.charAt(n)}))}}])&&y(t.prototype,n),u&&y(t,u),h}(u.FunctionPlugin);function b(e,t){if(0===t.length)return 0;if(e<=t[0])return 0;if(t[t.length-1]<e)return t.length;for(var n=0,r=t.length-1;n+1<r;){var o=Math.floor((r+n)/2);t[o]>=e?r=o:n=o}return r}function w(e){var t;return"number"!=typeof e&&"string"!=typeof e?new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.WrongType):"string"==typeof e?7===e.length&&/^(0|1)*$/.test(e)&&"1111111"!==e?e:new r.CellError(r.ErrorType.NUM,i.ErrorMessage.WeekendString):null!==(t=O.get(e))&&void 0!==t?t:new r.CellError(r.ErrorType.NUM,i.ErrorMessage.BadMode)}C.implementedFunctions={DATE:{method:"date",parameters:[{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.NUMBER}],returnNumberType:s.NumberType.NUMBER_DATE},TIME:{method:"time",parameters:[{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.NUMBER}],returnNumberType:s.NumberType.NUMBER_TIME},MONTH:{method:"month",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},YEAR:{method:"year",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},HOUR:{method:"hour",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},MINUTE:{method:"minute",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},SECOND:{method:"second",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},TEXT:{method:"text",parameters:[{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.STRING}]},EOMONTH:{method:"eomonth",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER}],returnNumberType:s.NumberType.NUMBER_DATE},DAY:{method:"day",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},DAYS:{method:"days",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},WEEKDAY:{method:"weekday",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,defaultValue:1}]},WEEKNUM:{method:"weeknum",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,defaultValue:1}]},ISOWEEKNUM:{method:"isoweeknum",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},DATEVALUE:{method:"datevalue",parameters:[{argumentType:u.ArgumentTypes.STRING}],returnNumberType:s.NumberType.NUMBER_DATE},TIMEVALUE:{method:"timevalue",parameters:[{argumentType:u.ArgumentTypes.STRING}],returnNumberType:s.NumberType.NUMBER_TIME},NOW:{method:"now",parameters:[],isVolatile:!0,returnNumberType:s.NumberType.NUMBER_DATETIME},TODAY:{method:"today",parameters:[],isVolatile:!0,returnNumberType:s.NumberType.NUMBER_DATE},EDATE:{method:"edate",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER}],returnNumberType:s.NumberType.NUMBER_DATE},DAYS360:{method:"days360",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.BOOLEAN,defaultValue:!1}]},DATEDIF:{method:"datedif",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.STRING}]},YEARFRAC:{method:"yearfrac",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.INTEGER,defaultValue:0,minValue:0,maxValue:4}]},INTERVAL:{method:"interval",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},NETWORKDAYS:{method:"networkdays",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.RANGE,optionalArg:!0}]},"NETWORKDAYS.INTL":{method:"networkdaysintl",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NOERROR,defaultValue:1},{argumentType:u.ArgumentTypes.RANGE,optionalArg:!0}]},WORKDAY:{method:"workday",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.RANGE,optionalArg:!0}]},"WORKDAY.INTL":{method:"workdayintl",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.NOERROR,defaultValue:1},{argumentType:u.ArgumentTypes.RANGE,optionalArg:!0}]}};var R=new Map([[1,0],[2,1],[11,1],[12,2],[13,3],[14,4],[15,5],[16,6],[17,0]]),O=new Map([[1,"0000011"],[2,"1000001"],[3,"1100000"],[4,"0110000"],[5,"0011000"],[6,"0001100"],[7,"0000110"],[11,"0000001"],[12,"1000000"],[13,"0100000"],[14,"0010000"],[15,"0001000"],[16,"0000100"],[17,"0000010"]])},function(e,t,n){"use strict";n.r(t),n.d(t,"DegreesPlugin",(function(){return f}));n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(38);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"degrees",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DEGREES"),(function(e){return e*(180/Math.PI)}))}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={DEGREES:{method:"degrees",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"DeltaPlugin",(function(){return f}));n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(38);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"delta",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DELTA"),(function(e,t){return e===t?1:0}))}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={DELTA:{method:"delta",parameters:[{argumentType:r.ArgumentTypes.NUMBER},{argumentType:r.ArgumentTypes.NUMBER,defaultValue:0}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"ExpPlugin",(function(){return f}));n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(38);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"exp",value:function(e,t){return this.runFunction(e.args,t,this.metadata("EXP"),Math.exp)}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={EXP:{method:"exp",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"FinancialPlugin",(function(){return y}));n(143),n(25),n(7),n(12),n(0),n(24),n(21),n(2),n(8),n(9),n(10),n(3),n(4);var r=n(22),o=n(43),i=n(48),a=n(38);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(l,e);var t,n,a,s=h(l);function l(){return c(this,l),s.apply(this,arguments)}return t=l,(n=[{key:"pmt",value:function(e,t){return this.runFunction(e.args,t,this.metadata("PMT"),v)}},{key:"ipmt",value:function(e,t){return this.runFunction(e.args,t,this.metadata("IPMT"),g)}},{key:"ppmt",value:function(e,t){return this.runFunction(e.args,t,this.metadata("PPMT"),T)}},{key:"fv",value:function(e,t){return this.runFunction(e.args,t,this.metadata("FV"),E)}},{key:"cumipmt",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CUMIPMT"),(function(e,t,n,i,a,s){if(i>a)return new r.CellError(r.ErrorType.NUM,o.ErrorMessage.EndStartPeriod);for(var u=0,l=i;l<=a;l++)u+=g(e,l,t,n,0,s);return u}))}},{key:"cumprinc",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CUMPRINC"),(function(e,t,n,i,a,s){if(i>a)return new r.CellError(r.ErrorType.NUM,o.ErrorMessage.EndStartPeriod);for(var u=0,l=i;l<=a;l++)u+=T(e,l,t,n,0,s);return u}))}},{key:"db",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DB"),(function(e,t,n,i,a){if(12===a&&i>n||i>n+1)return new r.CellError(r.ErrorType.NUM,o.ErrorMessage.PeriodLong);if(t>=e)return 0;var s=Math.round(1e3*(1-Math.pow(t/e,1/n)))/1e3,u=e*s*a/12;if(1===i)return u;for(var l=u,c=0;c<i-2;c++)l+=(e-l)*s;return i===n+1?(e-l)*s*(12-a)/12:(e-l)*s}))}},{key:"ddb",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DDB"),(function(e,t,n,o,i){if(o>n)return new r.CellError(r.ErrorType.NUM);var a,s=i/n;s>=1?(s=1,a=1===o?e:0):a=e*Math.pow(1-s,o-1);var u=e*Math.pow(1-s,o);return Math.max(a-Math.max(t,u),0)}))}},{key:"dollarde",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARDE"),(function(e,t){if(t<1)return new r.CellError(r.ErrorType.DIV_BY_ZERO);for(t=Math.trunc(t);t>10;)t/=10;return Math.trunc(e)+10*(e-Math.trunc(e))/t}))}},{key:"dollarfr",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARFR"),(function(e,t){if(t<1)return new r.CellError(r.ErrorType.DIV_BY_ZERO);for(t=Math.trunc(t);t>10;)t/=10;return Math.trunc(e)+(e-Math.trunc(e))*t/10}))}},{key:"effect",value:function(e,t){return this.runFunction(e.args,t,this.metadata("EFFECT"),(function(e,t){return t=Math.trunc(t),Math.pow(1+e/t,t)-1}))}},{key:"ispmt",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISPMT"),(function(e,t,n,o){return 0===n?new r.CellError(r.ErrorType.DIV_BY_ZERO):o*e*(t/n-1)}))}},{key:"nominal",value:function(e,t){return this.runFunction(e.args,t,this.metadata("NOMINAL"),(function(e,t){return t=Math.trunc(t),(Math.pow(e+1,1/t)-1)*t}))}},{key:"nper",value:function(e,t){return this.runFunction(e.args,t,this.metadata("NPER"),(function(e,t,n,o,i){return 0===e?0===t?new r.CellError(r.ErrorType.DIV_BY_ZERO):(-n-o)/t:(i&&(t*=1+e),Math.log((t-o*e)/(n*e+t))/Math.log(1+e))}))}},{key:"rate",value:function(e,t){return this.runFunction(e.args,t,this.metadata("RATE"),(function(e,t,n,o,i,a){if(a<=-1)return new r.CellError(r.ErrorType.VALUE);var s=a;i=i?1:0;for(var u=0;u<20;u++){if(s<=-1)return new r.CellError(r.ErrorType.NUM);var l=void 0;if(Math.abs(s)<1e-10)l=n*(1+e*s)+t*(1+s*i)*e+o;else{var c=Math.pow(1+s,e);l=n*c+t*(1/s+i)*(c-1)+o}if(Math.abs(l)<1e-10)return s;var f=void 0;if(Math.abs(s)<1e-10)f=n*e+t*i*e;else{var d=Math.pow(1+s,e),h=e*Math.pow(1+s,e-1);f=n*h+t*(1/s+i)*h+t*(-1/(s*s))*(d-1)}s-=l/f}return new r.CellError(r.ErrorType.NUM)}))}},{key:"pv",value:function(e,t){return this.runFunction(e.args,t,this.metadata("PV"),(function(e,t,n,o,i){return i=i?1:0,-1===e?0===t?new r.CellError(r.ErrorType.NUM):new r.CellError(r.ErrorType.DIV_BY_ZERO):0===e?-n*t-o:((1-Math.pow(1+e,t))*n*(1+e*i)/e-o)/Math.pow(1+e,t)}))}},{key:"rri",value:function(e,t){return this.runFunction(e.args,t,this.metadata("RRI"),(function(e,t,n){return 0===t||n<0&&t>0||n>0&&t<0?new r.CellError(r.ErrorType.NUM):Math.pow(n/t,1/e)-1}))}},{key:"sln",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SLN"),(function(e,t,n){return 0===n?new r.CellError(r.ErrorType.DIV_BY_ZERO):(e-t)/n}))}},{key:"syd",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SYD"),(function(e,t,n,o){return o>n?new r.CellError(r.ErrorType.NUM):(e-t)*(n-o+1)*2/(n*(n+1))}))}},{key:"tbilleq",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("TBILLEQ"),(function(e,t,o){if((e=Math.round(e))>=(t=Math.round(t)))return new r.CellError(r.ErrorType.NUM);var i=n.dateTimeHelper.numberToSimpleDate(e),a=n.dateTimeHelper.numberToSimpleDate(t);if(a.year>i.year+1||a.year===i.year+1&&(a.month>i.month||a.month===i.month&&a.day>i.day))return new r.CellError(r.ErrorType.NUM);var s=360-o*(t-e);return 0===s?0:s<0?new r.CellError(r.ErrorType.NUM):365*o/s}))}},{key:"tbillprice",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("TBILLPRICE"),(function(e,t,o){if((e=Math.round(e))>=(t=Math.round(t)))return new r.CellError(r.ErrorType.NUM);var i=n.dateTimeHelper.numberToSimpleDate(e),a=n.dateTimeHelper.numberToSimpleDate(t);if(a.year>i.year+1||a.year===i.year+1&&(a.month>i.month||a.month===i.month&&a.day>i.day))return new r.CellError(r.ErrorType.NUM);var s=360-o*(t-e);return 0===s?0:s<0?new r.CellError(r.ErrorType.NUM):100*(1-o*(t-e)/360)}))}},{key:"tbillyield",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("TBILLYIELD"),(function(e,t,o){if((e=Math.round(e))>=(t=Math.round(t)))return new r.CellError(r.ErrorType.NUM);var i=n.dateTimeHelper.numberToSimpleDate(e),a=n.dateTimeHelper.numberToSimpleDate(t);return a.year>i.year+1||a.year===i.year+1&&(a.month>i.month||a.month===i.month&&a.day>i.day)?new r.CellError(r.ErrorType.NUM):360*(100-o)/(o*(t-e))}))}},{key:"fvschedule",value:function(e,t){return this.runFunction(e.args,t,this.metadata("FVSCHEDULE"),(function(e,t){var n,a=t.valuesFromTopLeftCorner(),s=u(a);try{for(s.s();!(n=s.n()).done;){var l=n.value;if(l instanceof r.CellError)return l}}catch(e){s.e(e)}finally{s.f()}var c,f=u(a);try{for(f.s();!(c=f.n()).done;){var d=c.value;if(Object(i.isExtendedNumber)(d))e*=1+Object(i.getRawValue)(d);else if(d!==i.EmptyValue)return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NumberExpected)}}catch(e){f.e(e)}finally{f.f()}return e}))}},{key:"npv",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("NPV"),(function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];var a=n.arithmeticHelper.coerceNumbersExactRanges(o);return a instanceof r.CellError?a:C(e,a)}))}},{key:"mirr",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("MIRR"),(function(e,t,o){var i=n.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(i instanceof r.CellError)return i;var a,s=!1,l=!1,c=[],f=[],d=u(i);try{for(d.s();!(a=d.n()).done;){var h=a.value;h>0?(s=!0,c.push(h),f.push(0)):h<0?(l=!0,f.push(h),c.push(0)):(f.push(0),c.push(0))}}catch(e){d.e(e)}finally{d.f()}if(!s||!l)return new r.CellError(r.ErrorType.DIV_BY_ZERO);var p=i.length,m=C(o,c);if(m instanceof r.CellError)return m;var y=C(t,f);return y instanceof r.CellError?y:Math.pow(-m*Math.pow(1+o,p)/y/(1+t),1/(p-1))-1}))}},{key:"pduration",value:function(e,t){return this.runFunction(e.args,t,this.metadata("PDURATION"),(function(e,t,n){return(Math.log(n)-Math.log(t))/Math.log(1+e)}))}},{key:"xnpv",value:function(e,t){return this.runFunction(e.args,t,this.metadata("XNPV"),(function(e,t,n){var i,a=t.valuesFromTopLeftCorner(),s=u(a);try{for(s.s();!(i=s.n()).done;)if("number"!=typeof i.value)return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NumberExpected)}catch(e){s.e(e)}finally{s.f()}var l,c=a,f=n.valuesFromTopLeftCorner(),d=u(f);try{for(d.s();!(l=d.n()).done;)if("number"!=typeof l.value)return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NumberExpected)}catch(e){d.e(e)}finally{d.f()}var h=f;if(h.length!==c.length)return new r.CellError(r.ErrorType.NUM,o.ErrorMessage.EqualLength);var p=h.length,m=0;if(h[0]<0)return new r.CellError(r.ErrorType.NUM,o.ErrorMessage.ValueSmall);for(var y=0;y<p;y++){if(h[y]=Math.floor(h[y]),h[y]<h[0])return new r.CellError(r.ErrorType.NUM,o.ErrorMessage.ValueSmall);m+=c[y]/Math.pow(1+e,(h[y]-h[0])/365)}return m}))}}])&&f(t.prototype,n),a&&f(t,a),l}(a.FunctionPlugin);function v(e,t,n,r,o){if(0===e)return(-n-r)/t;var i=Math.pow(1+e,t);return(r*e+n*e*i)*(o?1/(1+e):1)/(1-i)}function g(e,t,n,r,o,i){var a=v(e,n,r,o,i);return 1===t?e*(i?0:-r):e*(i?E(e,t-2,a,r,i)-a:E(e,t-1,a,r,i))}function E(e,t,n,r,o){if(0===e)return-r-n*t;var i=Math.pow(1+e,t);return n*(o?1+e:1)*(1-i)/e-r*i}function T(e,t,n,r,o,i){return v(e,n,r,o,i)-g(e,t,n,r,o,i)}function C(e,t){for(var n=0,o=t.length-1;o>=0;o--){if(n+=t[o],-1===e){if(0===n)continue;return new r.CellError(r.ErrorType.DIV_BY_ZERO)}n/=1+e}return n}y.implementedFunctions={PMT:{method:"pmt",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0}],returnNumberType:i.NumberType.NUMBER_CURRENCY},IPMT:{method:"ipmt",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0}],returnNumberType:i.NumberType.NUMBER_CURRENCY},PPMT:{method:"ppmt",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0}],returnNumberType:i.NumberType.NUMBER_CURRENCY},FV:{method:"fv",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0}],returnNumberType:i.NumberType.NUMBER_CURRENCY},CUMIPMT:{method:"cumipmt",parameters:[{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.INTEGER,minValue:1},{argumentType:a.ArgumentTypes.INTEGER,minValue:1},{argumentType:a.ArgumentTypes.INTEGER,minValue:0,maxValue:1}],returnNumberType:i.NumberType.NUMBER_CURRENCY},CUMPRINC:{method:"cumprinc",parameters:[{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.INTEGER,minValue:1},{argumentType:a.ArgumentTypes.INTEGER,minValue:1},{argumentType:a.ArgumentTypes.INTEGER,minValue:0,maxValue:1}],returnNumberType:i.NumberType.NUMBER_CURRENCY},DB:{method:"db",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.INTEGER,minValue:0},{argumentType:a.ArgumentTypes.INTEGER,minValue:0},{argumentType:a.ArgumentTypes.INTEGER,minValue:1,maxValue:12,defaultValue:12}],returnNumberType:i.NumberType.NUMBER_CURRENCY},DDB:{method:"ddb",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.INTEGER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0,defaultValue:2}],returnNumberType:i.NumberType.NUMBER_CURRENCY},DOLLARDE:{method:"dollarde",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,minValue:0}]},DOLLARFR:{method:"dollarfr",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,minValue:0}]},EFFECT:{method:"effect",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:1}],returnNumberType:i.NumberType.NUMBER_PERCENT},ISPMT:{method:"ispmt",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER}]},NOMINAL:{method:"nominal",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:1}],returnNumberType:i.NumberType.NUMBER_PERCENT},NPER:{method:"nper",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0}]},PV:{method:"pv",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0}],returnNumberType:i.NumberType.NUMBER_CURRENCY},RATE:{method:"rate",parameters:[{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:.1}],returnNumberType:i.NumberType.NUMBER_PERCENT},RRI:{method:"rri",parameters:[{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER}],returnNumberType:i.NumberType.NUMBER_PERCENT},SLN:{method:"sln",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER}],returnNumberType:i.NumberType.NUMBER_CURRENCY},SYD:{method:"syd",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0}],returnNumberType:i.NumberType.NUMBER_CURRENCY},TBILLEQ:{method:"tbilleq",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0}],returnNumberType:i.NumberType.NUMBER_PERCENT},TBILLPRICE:{method:"tbillprice",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0}],returnNumberType:i.NumberType.NUMBER_CURRENCY},TBILLYIELD:{method:"tbillyield",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0}],returnNumberType:i.NumberType.NUMBER_PERCENT},FVSCHEDULE:{method:"fvschedule",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.RANGE}],returnNumberType:i.NumberType.NUMBER_CURRENCY},NPV:{method:"npv",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.ANY}],repeatLastArgs:1,returnNumberType:i.NumberType.NUMBER_CURRENCY},MIRR:{method:"mirr",parameters:[{argumentType:a.ArgumentTypes.RANGE},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER}],returnNumberType:i.NumberType.NUMBER_PERCENT},PDURATION:{method:"pduration",parameters:[{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0}]},XNPV:{method:"xnpv",parameters:[{argumentType:a.ArgumentTypes.NUMBER,greaterThan:-1},{argumentType:a.ArgumentTypes.RANGE},{argumentType:a.ArgumentTypes.RANGE}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"FormulaTextPlugin",(function(){return p}));n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(22),o=n(43),i=n(290),a=n(38);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(s,e);var t,n,i,a=f(s);function s(){return u(this,s),a.apply(this,arguments)}return t=s,(n=[{key:"formulatext",value:function(e,t){var n=this;return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("FORMULATEXT"),(function(){return new r.CellError(r.ErrorType.NA,o.ErrorMessage.WrongArgNumber)}),(function(e){var t;return null!==(t=n.serialization.getCellFormula(e))&&void 0!==t?t:new r.CellError(r.ErrorType.NA,o.ErrorMessage.Formula)}))}}])&&l(t.prototype,n),i&&l(t,i),s}(i.FunctionPlugin);p.implementedFunctions={FORMULATEXT:{method:"formulatext",parameters:[{argumentType:a.ArgumentTypes.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,isDependentOnSheetStructureChange:!0,vectorizationForbidden:!0}}},function(e,t,n){"use strict";n.r(t),n.d(t,"InformationPlugin",(function(){return v}));n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(22),o=n(116),i=n(43),a=n(70),s=n(48),u=n(80),l=n(38);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(m,e);var t,n,l,c=p(m);function m(){return f(this,m),c.apply(this,arguments)}return t=m,(n=[{key:"isbinary",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISBINARY"),(function(e){return/^[01]{1,10}$/.test(e)}))}},{key:"iserr",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISERR"),(function(e){return e instanceof r.CellError&&e.type!==r.ErrorType.NA}))}},{key:"iserror",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISERROR"),(function(e){return e instanceof r.CellError}))}},{key:"isformula",value:function(e,t){var n=this;return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ISFORMULA"),(function(){return new r.CellError(r.ErrorType.NA,i.ErrorMessage.WrongArgNumber)}),(function(e){return n.dependencyGraph.addressMapping.getCell(e)instanceof o.FormulaVertex}))}},{key:"isblank",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISBLANK"),(function(e){return e===s.EmptyValue}))}},{key:"isna",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISNA"),(function(e){return e instanceof r.CellError&&e.type==r.ErrorType.NA}))}},{key:"isnumber",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISNUMBER"),s.isExtendedNumber)}},{key:"islogical",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISLOGICAL"),(function(e){return"boolean"==typeof e}))}},{key:"isref",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISREF"),(function(e){return e instanceof r.CellError&&(e.type==r.ErrorType.REF||e.type==r.ErrorType.CYCLE)}))}},{key:"istext",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISTEXT"),(function(e){return"string"==typeof e}))}},{key:"isnontext",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISNONTEXT"),(function(e){return!("string"==typeof e)}))}},{key:"column",value:function(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("COLUMN"),(function(){return t.formulaAddress.col+1}),(function(e){return e.col+1}))}},{key:"columns",value:function(e,t){if(1!==e.args.length)return new r.CellError(r.ErrorType.NA,i.ErrorMessage.WrongArgNumber);if(e.args.some((function(e){return e.type===a.AstNodeType.EMPTY})))return new r.CellError(r.ErrorType.NUM,i.ErrorMessage.EmptyArg);for(var n=e.args[0];n.type===a.AstNodeType.PARENTHESIS;)n=n.expression;if(n.type===a.AstNodeType.CELL_RANGE||n.type===a.AstNodeType.COLUMN_RANGE)return n.end.col-n.start.col+1;if(n.type===a.AstNodeType.CELL_REFERENCE)return 1;if(n.type===a.AstNodeType.ROW_RANGE)return this.config.maxColumns;var o=this.evaluateAst(n,t);return o instanceof u.SimpleRangeValue?o.width():o instanceof r.CellError?o:1}},{key:"row",value:function(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ROW"),(function(){return t.formulaAddress.row+1}),(function(e){return e.row+1}))}},{key:"rows",value:function(e,t){if(1!==e.args.length)return new r.CellError(r.ErrorType.NA,i.ErrorMessage.WrongArgNumber);if(e.args.some((function(e){return e.type===a.AstNodeType.EMPTY})))return new r.CellError(r.ErrorType.NUM,i.ErrorMessage.EmptyArg);for(var n=e.args[0];n.type===a.AstNodeType.PARENTHESIS;)n=n.expression;if(n.type===a.AstNodeType.CELL_RANGE||n.type===a.AstNodeType.ROW_RANGE)return n.end.row-n.start.row+1;if(n.type===a.AstNodeType.CELL_REFERENCE)return 1;if(n.type===a.AstNodeType.COLUMN_RANGE)return this.config.maxRows;var o=this.evaluateAst(n,t);return o instanceof u.SimpleRangeValue?o.height():o instanceof r.CellError?o:1}},{key:"index",value:function(e,t){return this.runFunction(e.args,t,this.metadata("INDEX"),(function(e,t,n){var o,a,s,u,l,c;return n<1||t<1?new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.LessThanOne):n>e.width()||t>e.height()?new r.CellError(r.ErrorType.NUM,i.ErrorMessage.ValueLarge):null!==(c=null!==(s=null===(a=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o[t-1])||void 0===a?void 0:a[n-1])&&void 0!==s?s:null===(l=null===(u=null==e?void 0:e.data)||void 0===u?void 0:u[0])||void 0===l?void 0:l[0])&&void 0!==c?c:new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.CellRangeExpected)}))}},{key:"na",value:function(e,t){return new r.CellError(r.ErrorType.NA)}},{key:"sheet",value:function(e,t){var n=this;return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEET"),(function(){return t.formulaAddress.sheet+1}),(function(e){return e.sheet+1}),(function(e){var t=n.dependencyGraph.sheetMapping.get(e);return void 0!==t?t+1:new r.CellError(r.ErrorType.NA,i.ErrorMessage.SheetRef)}))}},{key:"sheets",value:function(e,t){var n=this;return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEETS"),(function(){return n.dependencyGraph.sheetMapping.numberOfSheets()}),(function(){return 1}),(function(){return new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.CellRefExpected)}))}}])&&d(t.prototype,n),l&&d(t,l),m}(l.FunctionPlugin);v.implementedFunctions={COLUMN:{method:"column",parameters:[{argumentType:l.ArgumentTypes.NOERROR,optional:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},COLUMNS:{method:"columns",parameters:[{argumentType:l.ArgumentTypes.RANGE}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ISBINARY:{method:"isbinary",parameters:[{argumentType:l.ArgumentTypes.STRING}]},ISERR:{method:"iserr",parameters:[{argumentType:l.ArgumentTypes.SCALAR}]},ISFORMULA:{method:"isformula",parameters:[{argumentType:l.ArgumentTypes.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ISNA:{method:"isna",parameters:[{argumentType:l.ArgumentTypes.SCALAR}]},ISREF:{method:"isref",parameters:[{argumentType:l.ArgumentTypes.SCALAR}],vectorizationForbidden:!0},ISERROR:{method:"iserror",parameters:[{argumentType:l.ArgumentTypes.SCALAR}]},ISBLANK:{method:"isblank",parameters:[{argumentType:l.ArgumentTypes.SCALAR}]},ISNUMBER:{method:"isnumber",parameters:[{argumentType:l.ArgumentTypes.SCALAR}]},ISLOGICAL:{method:"islogical",parameters:[{argumentType:l.ArgumentTypes.SCALAR}]},ISTEXT:{method:"istext",parameters:[{argumentType:l.ArgumentTypes.SCALAR}]},ISNONTEXT:{method:"isnontext",parameters:[{argumentType:l.ArgumentTypes.SCALAR}]},INDEX:{method:"index",parameters:[{argumentType:l.ArgumentTypes.RANGE},{argumentType:l.ArgumentTypes.NUMBER},{argumentType:l.ArgumentTypes.NUMBER,defaultValue:1}]},NA:{method:"na",parameters:[]},ROW:{method:"row",parameters:[{argumentType:l.ArgumentTypes.NOERROR,optional:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ROWS:{method:"rows",parameters:[{argumentType:l.ArgumentTypes.RANGE}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},SHEET:{method:"sheet",parameters:[{argumentType:l.ArgumentTypes.STRING}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},SHEETS:{method:"sheets",parameters:[{argumentType:l.ArgumentTypes.STRING}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0}}},function(e,t,n){"use strict";n.r(t),n.d(t,"IsEvenPlugin",(function(){return f}));n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(38);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"iseven",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISEVEN"),(function(e){return e%2==0}))}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={ISEVEN:{method:"iseven",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"IsOddPlugin",(function(){return f}));n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(38);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"isodd",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISODD"),(function(e){return e%2==1}))}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={ISODD:{method:"isodd",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"LogarithmPlugin",(function(){return f}));n(375),n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(38);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"log10",value:function(e,t){return this.runFunction(e.args,t,this.metadata("LOG10"),Math.log10)}},{key:"log",value:function(e,t){return this.runFunction(e.args,t,this.metadata("LOG"),(function(e,t){return Math.log(e)/Math.log(t)}))}},{key:"ln",value:function(e,t){return this.runFunction(e.args,t,this.metadata("LN"),Math.log)}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={LOG10:{method:"log10",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]},LOG:{method:"log",parameters:[{argumentType:r.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:r.ArgumentTypes.NUMBER,defaultValue:10,greaterThan:0}]},LN:{method:"ln",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"MatrixPlugin",(function(){return T}));n(37),n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4),n(12),n(24),n(21);var r=n(126),o=n(22),i=n(43),a=n(70),s=n(182),u=n(80),l=n(38);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function g(e,t){return new r.ArraySize(t.width,e.height)}function E(e,t,n){return new r.ArraySize(1+(e.width-t)/n,1+(e.height-t)/n)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(d,e);var t,n,l,c=m(d);function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),(t=c.call(this,e)).createCpuKernel=function(e,t){return function(){for(var n=[],r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];for(var a=0;a<t.height;++a){n.push([]);for(var s=0;s<t.width;++s)n[a][s]=e.apply({thread:{x:s,y:a}},o)}return n}},t.createGpuJsKernel=function(e,n){return t.interpreter.getGpuInstance().createKernel(e).setPrecision("unsigned").setOutput([n.width,n.height])},void 0===t.config.gpujs?t.createKernel=t.createCpuKernel:t.createKernel=t.createGpuJsKernel,t}return t=d,(n=[{key:"mmult",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("MMULT"),(function(e,t){if(!e.hasOnlyNumbers()||!t.hasOnlyNumbers())return new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.NumberRange);if(t.height()!==e.width())return new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.ArrayDimensions);var r=g(e.size,t.size),a=n.createKernel((function(e,t,n){for(var r=0,o=0;o<n;++o)r+=e[this.thread.y][o]*t[o][this.thread.x];return r}),r)(e.rawNumbers(),t.rawNumbers(),e.width());return u.SimpleRangeValue.onlyNumbers(a)}))}},{key:"mmultArraySize",value:function(e,t){var n=this;if(2!==e.args.length)return r.ArraySize.error();var o=this.metadata("MMULT"),i=f(e.args.map((function(e){var r;return n.arraySizeForAst(e,new s.InterpreterState(t.formulaAddress,t.arraysFlag||null!==(r=null==o?void 0:o.arrayFunction)&&void 0!==r&&r))})),2);return g(i[0],i[1])}},{key:"maxpool",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("MAXPOOL"),(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(!e.hasOnlyNumbers())return new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.NumberRange);var a=E(e.size,t,r),s=n.createKernel((function(e,t,n){for(var r=this.thread.x*n,o=this.thread.y*n,i=e[o][r],a=0;a<t;a++)for(var s=0;s<t;s++)i=Math.max(i,e[o+a][r+s]);return i}),a)(e.rawNumbers(),t,r);return u.SimpleRangeValue.onlyNumbers(s)}))}},{key:"medianpool",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("MEDIANPOOL"),(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(!e.hasOnlyNumbers())return new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.NumberRange);var a=E(e.size,t,r),s=n.createKernel((function(e,t,n){for(var r=this.thread.x*n,o=this.thread.y*n,i=e[o][r],a=0;a<t;a++)for(var s=0;s<t;s++)i=Math.max(i,e[o+a][r+s]);for(var u=e[o][r],l=0;l<t;l++)for(var c=0;c<t;c++)u=Math.min(u,e[o+l][r+c]);for(var f=t*t,d=u,h=i,p=42,m=0;m<32;m++){for(var y=(d+h)/2,v=0,g=0;g<t;g++)for(var E=0;E<t;E++)e[o+g][r+E]>y&&v++;if(t%2==0){if(v===f/2){p=y;break}v>f/2?d=y:h=y}else{if(v===(f-1)/2){p=y;break}v>(f-1)/2?d=y:h=y}}return p}),a)(e.rawNumbers(),t,r);return u.SimpleRangeValue.onlyNumbers(s)}))}},{key:"maxpoolArraySize",value:function(e,t){var n=this;if(e.args.length<2||e.args.length>3)return r.ArraySize.error();var o,i=this.metadata("MAXPOOL"),u=e.args.map((function(e){var r;return n.arraySizeForAst(e,new s.InterpreterState(t.formulaAddress,t.arraysFlag||null!==(r=null==i?void 0:i.arrayFunction)&&void 0!==r&&r))}))[0],l=e.args[1],c=o=l.type===a.AstNodeType.NUMBER?l.value:1;if(3===e.args.length){var f=e.args[2];c=f.type===a.AstNodeType.NUMBER?f.value:1}return o>u.width||o>u.height||c>o||(u.width-o)%c!=0||(u.height-o)%c!=0?r.ArraySize.error():E(u,o,c)}},{key:"medianpoolArraySize",value:function(e,t){return this.maxpoolArraySize(e,t)}},{key:"transpose",value:function(e,t){return this.runFunction(e.args,t,this.metadata("TRANSPOSE"),(function(e){for(var t=e.rawData(),n=e.size,r=[],o=0;o<n.width;++o){r[o]=[];for(var i=0;i<n.height;++i)r[o][i]=t[i][o]}return u.SimpleRangeValue.onlyValues(r)}))}},{key:"transposeArraySize",value:function(e,t){var n=this;if(1!==e.args.length)return r.ArraySize.error();var o=this.metadata("MMULT"),i=f(e.args.map((function(e){var r;return n.arraySizeForAst(e,new s.InterpreterState(t.formulaAddress,t.arraysFlag||null!==(r=null==o?void 0:o.arrayFunction)&&void 0!==r&&r))})),1)[0];return new r.ArraySize(i.height,i.width)}}])&&h(t.prototype,n),l&&h(t,l),d}(l.FunctionPlugin);T.implementedFunctions={MMULT:{method:"mmult",arraySizeMethod:"mmultArraySize",parameters:[{argumentType:l.ArgumentTypes.RANGE},{argumentType:l.ArgumentTypes.RANGE}],vectorizationForbidden:!0},TRANSPOSE:{method:"transpose",arraySizeMethod:"transposeArraySize",parameters:[{argumentType:l.ArgumentTypes.RANGE}],vectorizationForbidden:!0},MAXPOOL:{method:"maxpool",arraySizeMethod:"maxpoolArraySize",parameters:[{argumentType:l.ArgumentTypes.RANGE},{argumentType:l.ArgumentTypes.NUMBER},{argumentType:l.ArgumentTypes.NUMBER,optionalArg:!0}],vectorizationForbidden:!0},MEDIANPOOL:{method:"medianpool",arraySizeMethod:"medianpoolArraySize",parameters:[{argumentType:l.ArgumentTypes.RANGE},{argumentType:l.ArgumentTypes.NUMBER},{argumentType:l.ArgumentTypes.NUMBER,optionalArg:!0}],vectorizationForbidden:!0}}},function(e,t,n){"use strict";n.r(t),n.d(t,"MedianPlugin",(function(){return h}));n(77),n(143),n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(22),o=n(43),i=n(38);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,i,a=c(f);function f(){return s(this,f),a.apply(this,arguments)}return t=f,(n=[{key:"median",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("MEDIAN"),(function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var a=n.arithmeticHelper.coerceNumbersExactRanges(t);return a instanceof r.CellError?a:0===a.length?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.OneValue):(a.sort((function(e,t){return e-t})),a.length%2==0?(a[a.length/2-1]+a[a.length/2])/2:a[Math.floor(a.length/2)])}))}},{key:"large",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("LARGE"),(function(e,t){var i=n.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return i instanceof r.CellError?i:(i.sort((function(e,t){return e-t})),(t=Math.trunc(t))>i.length?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.ValueLarge):i[i.length-t])}))}},{key:"small",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("SMALL"),(function(e,t){var i=n.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return i instanceof r.CellError?i:(i.sort((function(e,t){return e-t})),(t=Math.trunc(t))>i.length?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.ValueLarge):i[t-1])}))}}])&&u(t.prototype,n),i&&u(t,i),f}(i.FunctionPlugin);h.implementedFunctions={MEDIAN:{method:"median",parameters:[{argumentType:i.ArgumentTypes.ANY}],repeatLastArgs:1},LARGE:{method:"large",parameters:[{argumentType:i.ArgumentTypes.RANGE},{argumentType:i.ArgumentTypes.NUMBER,minValue:1}]},SMALL:{method:"small",parameters:[{argumentType:i.ArgumentTypes.RANGE},{argumentType:i.ArgumentTypes.NUMBER,minValue:1}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"ModuloPlugin",(function(){return d}));n(25),n(7),n(8),n(9),n(0),n(10),n(3),n(2),n(4);var r=n(22),o=n(38);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(c,e);var t,n,o,i=l(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"mod",value:function(e,t){return this.runFunction(e.args,t,this.metadata("MOD"),(function(e,t){return 0===t?new r.CellError(r.ErrorType.DIV_BY_ZERO):e%t}))}}])&&s(t.prototype,n),o&&s(t,o),c}(o.FunctionPlugin);d.implementedFunctions={MOD:{method:"mod",parameters:[{argumentType:o.ArgumentTypes.NUMBER},{argumentType:o.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"NumericAggregationPlugin",(function(){return R}));n(255),n(51),n(100),n(12),n(40),n(37),n(21),n(2),n(25),n(7),n(0),n(24),n(8),n(9),n(10),n(3),n(4);var r=n(84),o=n(22),i=n(43),a=n(39),s=n(70),u=n(105),l=n(48),c=n(80),f=n(38);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C(e,t,n){return t&&T(e.prototype,t),n&&T(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function b(e){return Object(l.isExtendedNumber)(e)&&!Number.isFinite(Object(l.getRawValue)(e))?0:e}var w=function(){function e(t,n,r){E(this,e),this.sumsq=t,this.sum=n,this.count=r}return C(e,[{key:"compose",value:function(t){return new e(this.sumsq+t.sumsq,this.sum+t.sum,this.count+t.count)}},{key:"averageValue",value:function(){return this.count>0?this.sum/this.count:void 0}},{key:"varSValue",value:function(){return this.count>1?(this.sumsq-this.sum*this.sum/this.count)/(this.count-1):void 0}},{key:"varPValue",value:function(){return this.count>0?(this.sumsq-this.sum*this.sum/this.count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment