@odoo/o-spreadsheet 16.2.27 → 16.2.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -898,7 +898,7 @@ function isBoolean(str) {
|
|
|
898
898
|
function isDateTime(str) {
|
|
899
899
|
return parseDateTime(str) !== null;
|
|
900
900
|
}
|
|
901
|
-
const MARKDOWN_LINK_REGEX = /^\[(
|
|
901
|
+
const MARKDOWN_LINK_REGEX = /^\[(.+)\]\((.+)\)$/;
|
|
902
902
|
//link must start with http or https
|
|
903
903
|
//https://stackoverflow.com/a/3809435/4760614
|
|
904
904
|
const WEB_LINK_REGEX = /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/;
|
|
@@ -45664,6 +45664,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
45664
45664
|
exports.tokenize = tokenize;
|
|
45665
45665
|
|
|
45666
45666
|
|
|
45667
|
-
__info__.version = '16.2.
|
|
45668
|
-
__info__.date = '2024-01-
|
|
45669
|
-
__info__.hash = '
|
|
45667
|
+
__info__.version = '16.2.28';
|
|
45668
|
+
__info__.date = '2024-01-17T10:24:07.951Z';
|
|
45669
|
+
__info__.hash = '16cee48';
|
|
@@ -894,7 +894,7 @@ function isBoolean(str) {
|
|
|
894
894
|
function isDateTime(str) {
|
|
895
895
|
return parseDateTime(str) !== null;
|
|
896
896
|
}
|
|
897
|
-
const MARKDOWN_LINK_REGEX = /^\[(
|
|
897
|
+
const MARKDOWN_LINK_REGEX = /^\[(.+)\]\((.+)\)$/;
|
|
898
898
|
//link must start with http or https
|
|
899
899
|
//https://stackoverflow.com/a/3809435/4760614
|
|
900
900
|
const WEB_LINK_REGEX = /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/;
|
|
@@ -45632,6 +45632,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
45632
45632
|
export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, links, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
|
|
45633
45633
|
|
|
45634
45634
|
|
|
45635
|
-
__info__.version = '16.2.
|
|
45636
|
-
__info__.date = '2024-01-
|
|
45637
|
-
__info__.hash = '
|
|
45635
|
+
__info__.version = '16.2.28';
|
|
45636
|
+
__info__.date = '2024-01-17T10:24:07.951Z';
|
|
45637
|
+
__info__.hash = '16cee48';
|
|
@@ -895,7 +895,7 @@
|
|
|
895
895
|
function isDateTime(str) {
|
|
896
896
|
return parseDateTime(str) !== null;
|
|
897
897
|
}
|
|
898
|
-
const MARKDOWN_LINK_REGEX = /^\[(
|
|
898
|
+
const MARKDOWN_LINK_REGEX = /^\[(.+)\]\((.+)\)$/;
|
|
899
899
|
//link must start with http or https
|
|
900
900
|
//https://stackoverflow.com/a/3809435/4760614
|
|
901
901
|
const WEB_LINK_REGEX = /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/;
|
|
@@ -45663,9 +45663,9 @@
|
|
|
45663
45663
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
45664
45664
|
|
|
45665
45665
|
|
|
45666
|
-
__info__.version = '16.2.
|
|
45667
|
-
__info__.date = '2024-01-
|
|
45668
|
-
__info__.hash = '
|
|
45666
|
+
__info__.version = '16.2.28';
|
|
45667
|
+
__info__.date = '2024-01-17T10:24:07.951Z';
|
|
45668
|
+
__info__.hash = '16cee48';
|
|
45669
45669
|
|
|
45670
45670
|
|
|
45671
45671
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"use strict";let i=e=>e;function o(e,...t){if(1===t.length&&"object"==typeof t[0]){const i=t[0];e=e.replace(/\%\(?([^\)]+)\)s/g,((e,t)=>i[t]))}else t.length>0&&(e=e.replace(/\%s/g,(()=>t.shift())));return e}const n=function(e,...t){return o(i(e),...t)},s=function(e,...t){return new r(e,t)};class r extends String{constructor(e,t){super(e),this.values=t}valueOf(){const e=super.valueOf();return o(i(e),...this.values)}toString(){return this.valueOf()}}var a,l;!function(e){e.NotAvailable="#N/A",e.InvalidReference="#REF",e.BadExpression="#BAD_EXPR",e.CircularDependency="#CYCLE",e.UnknownFunction="#NAME?",e.GenericError="#ERROR"}(a||(a={})),function(e){e[e.silent=0]="silent",e[e.error=1]="error"}(l||(l={}));class c extends Error{constructor(e,t,i=l.error){super(t),this.errorType=e,this.logLevel=i}}class h extends c{constructor(e){super(a.BadExpression,e)}}class d extends c{constructor(){super(a.CircularDependency,s("Circular reference"))}}class u extends c{constructor(){super(a.InvalidReference,s("Invalid reference"))}}class g extends c{constructor(e){super(a.NotAvailable,e||s("Data not available"),e?l.error:l.silent)}}class p extends c{constructor(e){super(a.UnknownFunction,s('Unknown function: "%s"',e))}}const m=.5,f="#f5f5f5",v="#F8F9FA",b="#E8EAED",C="#595959",S="#666666",E="#3266ca",w="#FFFFFF",y="#CACACA",x=11982760,I="#01666b",R="#188038",T="#E6F4EA",A="#CEEAD6",M="#E0E2E4",O=["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF","#980000","#FF0000","#FF9900","#FFFF00","#00FF00","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF","#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#741B47","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"],N=26,_=48,F=96,D=23,k=15,L=18,P=14,U=4,V=4,z=3,B=V,H=17,$=250,W=1,G="400",q=10,Z="'Roboto', arial",j=["thin","#000"],Y=["thin",R],X=/[ymdhs:]/,K=a.InvalidReference,Q="START_REVISION",J=20,ee="??",te="difference",ie="#00A04A",oe="#DC6965",ne=.4,se=["'","*","?","/","\\","[","]"],re=/'|\*|\?|\/|\\|\[|\]/,ae="|",le=s("Invalid expression");var ce;!function(e){e[e.Grid=0]="Grid",e[e.Highlight=5]="Highlight",e[e.Figure=10]="Figure",e[e.ScrollBar=15]="ScrollBar",e[e.GridPopover=19]="GridPopover",e[e.GridComposer=20]="GridComposer",e[e.Dropdown=21]="Dropdown",e[e.IconPicker=25]="IconPicker",e[e.TopBarComposer=30]="TopBarComposer",e[e.Popover=35]="Popover",e[e.ChartAnchor=1e3]="ChartAnchor"}(ce||(ce={}));const he="\n",de=[6,7,8,9,10,11,12,14,18,24,36];class ue{constructor(e,t,i,o=0,n=0,s=0){this.jsDate=new Date(Date.UTC(e,t,i,o,n,s,0))}static fromTimestamp(e){const t=new Date(e);return new ue(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())}static now(){const e=new Date;return new ue(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds())}toString(){return this.jsDate.toString()}getTime(){return this.jsDate.getTime()}getFullYear(){return this.jsDate.getUTCFullYear()}getMonth(){return this.jsDate.getUTCMonth()}getDate(){return this.jsDate.getUTCDate()}getDay(){return this.jsDate.getUTCDay()}getHours(){return this.jsDate.getUTCHours()}getMinutes(){return this.jsDate.getUTCMinutes()}getSeconds(){return this.jsDate.getUTCSeconds()}setFullYear(e){this.jsDate.setFullYear(e)}setDate(e){this.jsDate.setUTCDate(e)}setHours(e){this.jsDate.setUTCHours(e)}setMinutes(e){this.jsDate.setUTCMinutes(e)}setSeconds(e){this.jsDate.setUTCSeconds(e)}}const ge=new ue(1899,11,30),pe=864e5,me=2e3,fe=ue.now().getFullYear(),ve=ue.fromTimestamp(0).getTime()-ge.getTime(),be=/^\d{1,2}(\/|-|\s)\d{1,2}((\/|-|\s)\d{1,4})?$/,Ce=/^\d{3,4}(\/|-|\s)\d{1,2}(\/|-|\s)\d{1,2}$/,Se=/((\d+(:\d+)?(:\d+)?\s*(AM|PM))|(\d+:\d+(:\d+)?))$/,Ee={};function we(e){if(e in Ee)return Ee[e];const t=function(e){let t;e=e.trim();const i=e.match(Se);if(i){if(t=function(e){if(e=e.trim(),Se.test(e)){const t=/AM/i.test(e),i=/PM/i.test(e),o=(t||i?e.substring(0,e.length-2).trim():e).split(/:/),n=o.length>=2,s=3===o.length;let r=Number(o[0]),a=n?Number(o[1]):0,l=s?Number(o[2]):0,c=s?"hh:mm:ss":"hh:mm";if(t||i)c+=" a";else if(!n)return null;r>=12&&t?r-=12:r<12&&i&&(r+=12),a+=Math.floor(l/60),l%=60,r+=Math.floor(a/60),a%=60,r>=24&&(c="hhhh:mm:ss");return{value:r/24+a/1440+l/86400,format:c,jsDate:new ue(1899,11,30,r,a,l)}}return null}(i[0]),null===t)return null;e=e.replace(i[0],"").trim()}let o;const n=e.match(be),s=e.match(Ce);if(n||s){let t;if(n?(t=n[0],o=ye(t,"mdy")):(t=s[0],o=ye(t,"ymd")),null===o)return null;e=e.replace(t,"").trim()}if(""!==e||!o&&!t)return null;if(o&&t)return{value:o.value+t.value,format:o.format+" "+("hhhh:mm:ss"===t.format?"hh:mm:ss":t.format),jsDate:new ue(o.jsDate.getFullYear()+t.jsDate.getFullYear()-1899,o.jsDate.getMonth()+t.jsDate.getMonth()-11,o.jsDate.getDate()+t.jsDate.getDate()-30,o.jsDate.getHours()+t.jsDate.getHours(),o.jsDate.getMinutes()+t.jsDate.getMinutes(),o.jsDate.getSeconds()+t.jsDate.getSeconds())};return o||t}(e);return Ee[e]=t,t}function ye(e,t){const i="mdy"===t;if(i||"ymd"===t){const t=e.split(/\/|-|\s/),o=i?0:1,n=i?1:2,s=i?2:0,r=Number(t[o]),a=Number(t[n]),l=2===t[o].length&&r<10||2===t[n].length&&a<10,c=t[s]?function(e){const t=Number(e);switch(e.length){case 1:return me+t;case 2:return me+(me+t>fe+10?-100:0)+t;case 3:case 4:return t}return 0}(t[s]):fe,h=new ue(c,r-1,a),d=e.match(/\/|-|\s/)[0];if(h.getMonth()!==r-1||h.getDate()!==a)return null;const u=h.getTime()-ge.getTime();let g=l?`mm${d}dd`:`m${d}d`;return t[s]&&(g=i?g+d+"yyyy":"yyyy"+d+g),{value:Math.round(u/pe),format:g,jsDate:h}}return null}function xe(e){const t=Math.trunc(e);let i=ue.fromTimestamp(t*pe-ve),o=e-t;o=o<0?1+o:o;const n=Math.round(24*o),s=Math.round(24*(o-n/24)*60),r=Math.round(24*(o-n/24-s/24/60)*60*60);return i.setHours(n),i.setMinutes(s),i.setSeconds(r),i}function Ie(e){const t=e.getTime()-ge.getTime();return Math.round(t/pe)}function Re(e){return new ue(e.getFullYear(),e.getMonth()+1,0).getDate()}function Te(e){return Re(e)===e.getDate()}function Ae(e,t,i){const o=e.getFullYear(),n=e.getMonth(),s=e.getDate(),r=new ue(o,n+t,1);return i&&s===Re(e)||s>Re(r)?r.setDate(Re(r)):r.setDate(s),r}function Me(e){const t=Math.trunc(e);return t%4==0&&t%100!=0||t%400==0}function Oe(e,t,i){if(e===t)return 0;if(e>t){const i=t;t=e,e=i}const o=xe(e),n=xe(t);let s=o.getDate(),r=n.getDate();const a=o.getMonth(),l=n.getMonth(),c=o.getFullYear(),h=n.getFullYear();let d=0,u=0;switch(i){case 0:31===s&&(s=30),30===s&&31===r&&(r=30),1===a&&s===(Me(c)?29:28)&&(s=30,1===l&&r===(Me(h)?29:28)&&(r=30)),d=c+(30*a+s)/360,u=h+(30*l+r)/360;break;case 1:let i=365;const o=c===h;if(!o&&!(c+1===h)||!o&&a<l||!o&&a===l&&s<r){let e=0,t=0;for(let i=c;i<=h;i++)e++,t+=Me(i)?366:365;i=t/e}else o?Me(c)&&(i=366):(Me(c)&&a<2&&(i=366),Me(h)&&(l>1||1===l&&29===r)&&(i=366));d=e/i,u=t/i;break;case 2:d=e/360,u=t/360;break;case 3:d=e/365,u=t/365;break;case 4:31===s&&(s=30),31===r&&(r=30),d=c+(30*a+s)/360,u=h+(30*l+r)/360}return u-d}function Ne(e){return'"'===e[0]&&(e=e.slice(1)),'"'===e[e.length-1]&&"\\"!==e[e.length-2]?e.slice(0,e.length-1):e}function _e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fe(e){const t=Array.isArray(e)?[]:{};switch(typeof e){case"object":if(null===e)return e;if(function(e){return"clone"in e&&e.clone instanceof Function}(e))return e.clone();if(!(function(e){return"object"==typeof e&&(null==e?void 0:e.constructor)===Object}(e)||e instanceof Array))throw new Error("Unsupported type: only objects and arrays are supported");for(const i in e)t[i]=Fe(e[i]);return t;case"number":case"string":case"boolean":case"function":case"undefined":return e;default:throw new Error("Unsupported type: "+typeof e)}}function De(e){return e.startsWith("'")&&(e=e.slice(1,-1).replace(/''/g,"'")),e}function ke(e){var t;return(null===(t=e.match(/\w/g))||void 0===t?void 0:t.length)!==e.length&&(e=`'${e}'`),e}function Le(e,t,i){return e<t?t:e>i?i:e}function Pe(e,t=1){return t*(e+V)-V}function Ue(e,t,i){const o=Be(i);if(Ve[o]||(Ve[o]={}),void 0===Ve[o][t]){e.save(),e.font=o;const i=e.measureText(t).width;e.restore(),Ve[o][t]=i}return Ve[o][t]}const Ve={};function ze(e){return Math.round(96*e/72)}function Be(e){return`${e.italic?"italic ":""}${e.bold?"bold":G} ${He(e)}px ${Z}`}function He(e){return ze((null==e?void 0:e.fontSize)||q)}function $e(e,t,i=1){if(t<=e&&i>0)return[];if(0===i)throw new Error("range() step must not be zero");const o=Math.ceil(Math.abs((t-e)/i)),n=Array(o);for(let t=0;t<o;t++)n[t]=e+t*i;return n}function We(e){return e.reduce(((e,t,i,o)=>{if(1===Math.abs(t-o[i-1])){e[e.length-1].push(t)}else e.push([t]);return e}),[])}function*Ge(e,t){t.next();for(const i of e){const e=t.next();yield{...i,next:e.done?void 0:e.value}}}function qe(e){return null!==we(e)}const Ze=/^\[([^\[]+)\]\((.+)\)$/,je=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/;function Ye(e){return Ze.test(e)}function Xe(e){return je.test(e)}function Ke(e,t){return`[${e}](${t})`}function Qe(e){const t=e.match(Ze)||[],i=t[1],o=t[2];if(!i||!o)throw new Error(`Could not parse markdown link ${e}.`);return{label:i,url:o}}const Je="o-spreadsheet://";function et(e){return e.startsWith(Je)}function tt(e){return`${Je}${e}`}function it(e){if(e.startsWith(Je))return e.substr(Je.length);throw new Error(`${e} is not a valid sheet link`)}function ot(e){return void 0!==e}function nt(e){return void 0===e||Object.values(e).every((e=>"object"==typeof e?nt(e):!e))}function st(e,t){for(let[i,o]of Object.entries(t))if(ht(o,e))return parseInt(i,10);const i=Object.keys(t),o=0===i.length?0:Math.max(...i.map((e=>parseInt(e,10))));return t[o+1]=e,o+1}function rt(e){let t="";for(let i=0,o=e.length;i<o;i++)t+=e[i];return t}function at(e){let t,i=!1;const o=()=>(i||(t=e instanceof Function?e():e,i=!0),t);return o.map=e=>at((()=>e(o()))),o}function lt(e,t){let i=e.slice(t).find((e=>e));return i||(i=e.slice(0,t).reverse().find((e=>e))),i||""}function ct(e,t){return"after"===e?t+1:t}function ht(e,t){if(e===t)return!0;if(e&&!t||t&&!e)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return e===t;const i=new Set;Object.keys(e).forEach((e=>i.add(e))),Object.keys(t).forEach((e=>i.add(e)));for(let o of i){if(typeof e[o]!=typeof e[o])return!1;if("object"==typeof e[o]){if(!ht(e[o],t[o]))return!1}else if(e[o]!==t[o])return!1}return!0}function dt(e,t){return t.every((t=>e.includes(t)))}function ut(e){const t={...e};return Object.keys(t).forEach((e=>!t[e]&&delete t[e])),t}function gt(e){return e?e.toLowerCase():""}const pt=[" ","\t","\f","\v",String.fromCharCode(parseInt("00a0",16)),String.fromCharCode(parseInt("1680",16)),String.fromCharCode(parseInt("2000",16)),String.fromCharCode(parseInt("200a",16)),String.fromCharCode(parseInt("2028",16)),String.fromCharCode(parseInt("2029",16)),String.fromCharCode(parseInt("202f",16)),String.fromCharCode(parseInt("205f",16)),String.fromCharCode(parseInt("3000",16)),String.fromCharCode(parseInt("feff",16))],mt=new RegExp(pt.join("|"),"g"),ft=/\r\n|\r|\n/g;function vt(e){return e?e=(e=e.replace(mt," ")).replace(ft,he):""}const bt=/rgba?\(|\s+|\)/gi,Ct=/^#([A-F\d]{2}){3,4}$/g,St=["#eb6d00","#0074d9","#ad8e00","#169ed4","#b10dc9","#00a82d","#00a3a3","#f012be","#3d9970","#111111","#62A300","#ff4136","#949494","#85144b","#001f3f"];function Et(e){return wt(e.toString(16).padStart(6,"0"))}function wt(e){let t=e;if(e.startsWith("rgb")?t=function(e){const t=e.replace(bt,"").split(",");let i=255;if(3!==t.length&&4!==t.length)throw new Error("invalid color");if(4===t.length){const e=parseFloat(t.pop()||"1");i=Math.round(255*(e||1))}const o=t.map((e=>parseInt(e,10)));255!==i&&o.push(i);return"#"+rt(o.map((e=>e.toString(16).padStart(2,"0")))).toUpperCase()}(e):(t=e.replace("#","").toUpperCase(),3!==t.length&&4!==t.length||(t=t.split("").reduce(((e,t)=>e+t+t),"")),t=`#${t}`),!t.match(Ct))throw new Error(`invalid color input: ${e}`);return t}function yt(e){try{return wt(e),!0}catch(e){return!1}}const xt=e=>e>=0&&e<=255;function It(e,t,i,o=1){if(!xt(e)||!xt(t)||!xt(i)||o<0||o>1)throw new Error(`Invalid RGBA values ${[e,t,i,o]}`);return{a:o,b:i,g:t,r:e}}function Rt(e){let{r:t,g:i,b:o}=At(e);t/=255,i/=255,o/=255;const n=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return.2126*n(t)+.7152*n(i)+.0722*n(o)}function Tt(e){let t=e.r.toString(16),i=e.g.toString(16),o=e.b.toString(16),n=Math.round(255*e.a).toString(16);return 1==t.length&&(t="0"+t),1==i.length&&(i="0"+i),1==o.length&&(o="0"+o),1==n.length&&(n="0"+n),"ff"===n&&(n=""),("#"+t+i+o+n).toUpperCase()}function At(e){let t,i,o,n;if(7===(e=wt(e)).length)t=parseInt(e[1]+e[2],16),i=parseInt(e[3]+e[4],16),o=parseInt(e[5]+e[6],16),n=255;else{if(9!==e.length)throw new Error("Invalid color");t=parseInt(e[1]+e[2],16),i=parseInt(e[3]+e[4],16),o=parseInt(e[5]+e[6],16),n=parseInt(e[7]+e[8],16)}return n=+(n/255).toFixed(3),{a:n,r:t,g:i,b:o}}function Mt(e){(e={...e}).s/=100,e.l/=100;let t=(1-Math.abs(2*e.l-1))*e.s,i=t*(1-Math.abs(e.h/60%2-1)),o=e.l-t/2,n=0,s=0,r=0;return 0<=e.h&&e.h<60?(n=t,s=i,r=0):60<=e.h&&e.h<120?(n=i,s=t,r=0):120<=e.h&&e.h<180?(n=0,s=t,r=i):180<=e.h&&e.h<240?(n=0,s=i,r=t):240<=e.h&&e.h<300?(n=i,s=0,r=t):300<=e.h&&e.h<360&&(n=t,s=0,r=i),n=Math.round(255*(n+o)),s=Math.round(255*(s+o)),r=Math.round(255*(r+o)),{a:e.a,r:n,g:s,b:r}}function Ot(e){const t=e.r/255,i=e.g/255,o=e.b/255;let n=Math.min(t,i,o),s=Math.max(t,i,o),r=s-n,a=0,l=0,c=0;return a=0==r?0:s==t?(i-o)/r%6:s==i?(o-t)/r+2:(t-i)/r+4,a=Math.round(60*a),a<0&&(a+=360),c=(s+n)/2,l=0==r?0:r/(1-Math.abs(2*c-1)),l=+(100*l).toFixed(1),c=+(100*c).toFixed(1),{a:e.a,h:a,s:l,l:c}}const Nt=new RegExp(/\$?([A-Z]{1,3})\$?([0-9]{1,7})/,"i"),_t=new RegExp(/^\$?([A-Z]{1,3})\$?([0-9]{1,7})$/,"i"),Ft=new RegExp(/^\$?([A-Z]{1,3})+$/,"i"),Dt=new RegExp(/^\$?([0-9]{1,7})+$/,"i"),kt=new RegExp(/^\s*('.+'!|[^']+!)?\$?([A-Z]{1,3})$/,"i"),Lt=new RegExp(/^\s*('.+'!|[^']+!)?\$?([0-9]{1,7})$/,"i"),Pt=new RegExp(/^\s*('.+'!|[^']+!)?/.source+"("+[Nt.source,/(\$?[A-Z]{1,3})?\$?[0-9]{1,7}\s*:\s*(\$?[A-Z]{1,3})?\$?[0-9]{1,7}\s*/i.source,/\$?[A-Z]{1,3}(\$?[0-9]{1,7})?\s*:\s*\$?[A-Z]{1,3}(\$?[0-9]{1,7})?\s*/i.source].join("|")+")"+/$/.source,"i");function Ut(e){return kt.test(e)}function Vt(e){return Lt.test(e)}function zt(e){return Ft.test(e)}function Bt(e){return Dt.test(e)}function Ht(e){return _t.test(e)}function $t(e){const t=e.split("!"),i=t.pop();return{sheetName:De(t.join("!"))||void 0,xc:i}}function Wt(e){if(e<0)throw new Error(`number must be positive. Got ${e}`);return e<26?String.fromCharCode(65+e):Wt(Math.floor(e/26)-1)+Wt(e%26)}function Gt(e){let t=0;const i=e.length;for(let o=0;o<i;o++){t+=(e.charCodeAt(o)-65+(o<i-1?1:0))*26**(i-o-1)}return t}function qt(e){const t=(e=e.toUpperCase().trim()).match(Nt);if(null!==t){const[i,o,n]=t;if(i===e){return{col:Gt(o),row:parseInt(n,10)-1}}}throw new Error(`Invalid cell description: ${e}`)}function Zt(e,t,i={colFixed:!1,rowFixed:!1}){return(i.colFixed?"$":"")+Wt(e)+(i.rowFixed?"$":"")+String(t+1)}const jt=140,Yt=20,Xt=.035;function Kt(e){return Yt+(jt-Yt)*Math.exp(-Xt*(e-1))}const Qt=/(^-?\d+(\.?\d*(e\d+)?)?|^-?\.\d+)(?!\w|!)/,Jt="(\\s*(\\d+(,\\d{3,})*(\\.\\d*)?)|(\\.\\d+))(e(\\+|-)?\\d+)?(\\s*%)?",ei="(\\s*-)?",ti="(\\s*[\\$€])?",ii="^(("+[ei+ti+Jt,ei+Jt+ti,ti+ei+Jt].join(")|(")+"))$",oi=new RegExp(ii,"i");function ni(e){return!!e&&oi.test(e.trim())}const si=/[,\$€]+/g;function ri(e){e=e.replace(si,"");let t=Number(e);return isNaN(t)&&e.includes("%")&&(t=Number(e.split("%")[0]),!isNaN(t))?t/100:t}function ai(e,t,i){const o=[...e].sort(((e,t)=>e-t));let n=(o.length+(i?-1:1))*t;if(i||n--,Number.isInteger(n))return o[n];const s=Math.ceil(n),r=Math.floor(n);return o[s]*(n-r)+o[r]*(s-n)}const li=20,ci=11,hi=/(\d+?)(?=(\d{3})+(?!\d)|$)/g,di=/0/g,ui={0:s("January"),1:s("February"),2:s("March"),3:s("April"),4:s("May"),5:s("June"),6:s("July"),7:s("August"),8:s("September"),9:s("October"),10:s("November"),11:s("December")},gi={0:s("Sunday"),1:s("Monday"),2:s("Tuesday"),3:s("Wednesday"),4:s("Thursday"),5:s("Friday"),6:s("Saturday")},pi={};function mi(e){let t=pi[e];return void 0===t&&(t=function(e){if(""===e)throw new Error("A format cannot be empty");let t=0,i=[];for(;t<e.length;){let o;if("["===e.charAt(t)){if("$"!==e.charAt(t+1))throw new Error(`Currency formats have to be prefixed by a $: ${e}`);if(o=e.substring(t+1).indexOf("]")+t+2,0===o)throw new Error(`Invalid currency brackets format: ${e}`);const n=e.substring(t+2,o-1);if(n.includes("["))throw new Error(`Invalid currency format: ${e}`);i.push({type:"STRING",format:n})}else{const n=e.substring(t).indexOf("[");o=n>-1?n+t:e.length;const s=e.substring(t,o);s.match(X)?i.push({type:"DATE",format:s}):i.push({type:"NUMBER",format:_i(s)})}t=o}return i}(e),pi[e]=t),t}function fi(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":t||(t=Ri(e));return function(e,t){if("DATE"===t[0].type)return yi(e,t[0].format);let i=e<0?"-":"";for(let o of t)switch(o.type){case"NUMBER":i+=vi(Math.abs(e),o.format);break;case"STRING":i+=o.format}return i}(e,mi(t));case"object":return"0"}}function vi(e,t){t.isPercent&&(e*=100),e/=t.magnitude;let i=0;void 0!==t.decimalPart&&(i=t.decimalPart.length);const{integerDigits:o,decimalDigits:n}=Ci(e,i);let s=function(e,t,i){var o;const n="0"===e?"":e;let s=n;const r=t.length-n.length;if(r>0){const e=(t.substring(0,r).match(di)||[]).length;s="0".repeat(e)+s}i&&(s=(null===(o=s.match(hi))||void 0===o?void 0:o.join(","))||s);return s}(o,t.integerPart,t.thousandsSeparator);return void 0!==t.decimalPart&&(s+="."+function(e,t){let i=e;if(t.length-e.length>0){const o=(t.substring(e.length,t.length+1).match(di)||[]).length;i+="0".repeat(o)}return i}(n||"",t.decimalPart)),t.isPercent&&(s+="%"),s}const bi=[];function Ci(e,t=li){const i=e.toString();if(i.includes("e"))return function(e,t=li){let i=bi[t];i||(i=new Intl.NumberFormat("en-US",{maximumFractionDigits:t,useGrouping:!1}),bi[t]=i);const[o,n]=i.format(e).split(".");return{integerDigits:o,decimalDigits:n}}(e,t);if(Number.isInteger(e))return{integerDigits:i,decimalDigits:void 0};const o=i.indexOf(".");let n=i.substring(0,o),s=i.substring(o+1);if(0===t)return Number(s[0])>=5&&(n=(Number(n)+1).toString()),{integerDigits:n,decimalDigits:void 0};if(s.length>t){const{integerDigits:e,decimalDigits:i}=function(e,t){var i;let o="0",n=e,s=e.slice(0,t);const r=t;if(Number(e[r])<5)return{integerDigits:o,decimalDigits:s};const a=(null===(i=s.match(Ei))||void 0===i?void 0:i[0])||"",l=(Number(s)+1).toString(),c=s.slice(a.length),h=l.length>c.length;h&&!a?(o="1",n=void 0):n=h?a.slice(0,-1)+l:a+l;return{integerDigits:o,decimalDigits:n}}(s,t);s=i,"0"!==e&&(n=(Number(n)+Number(e)).toString())}return{integerDigits:n,decimalDigits:Si(s||"")}}function Si(e){let t=e.length-1;for(;t>=0&&"0"===e[t];)t--;return e.slice(0,t+1)||void 0}const Ei=/^0+/;function wi(e){try{return yi(1,e),!0}catch(e){return!1}}function yi(e,t){const i=xe(e),o=t.indexOf("h");let n="",s="";return o>0?(n=xi(i,t.substring(0,o-1)),s=Ii(i,t.substring(o))):0===o?s=Ii(i,t):o<0&&(n=xi(i,t)),n+(n&&s?" ":"")+s}function xi(e,t){var i;const o=null===(i=t.match(/\/|-|\s/))||void 0===i?void 0:i[0];return(o?t.split(o):[t]).map((i=>{switch(i){case"d":return e.getDate();case"dd":return e.getDate().toString().padStart(2,"0");case"ddd":return gi[e.getDay()].slice(0,3);case"dddd":return gi[e.getDay()];case"m":return e.getMonth()+1;case"mm":return String(e.getMonth()+1).padStart(2,"0");case"mmm":return ui[e.getMonth()].slice(0,3);case"mmmm":return ui[e.getMonth()];case"mmmmm":return ui[e.getMonth()].slice(0,1);case"yy":const i=String(e.getFullYear()).replace("-","").padStart(2,"0");return i.slice(i.length-2);case"yyyy":return e.getFullYear();default:throw new Error(`invalid format: ${t}`)}})).join(o)}function Ii(e,t){let i=t.split(/:|\s/);const o=e.getHours(),n="a"===i[i.length-1];let s=o,r="";return n&&(s=0===s?12:s>12?s-12:s,r=o>=12?" PM":" AM",i.pop()),i.map((i=>{switch(i){case"hhhh":return Math.floor((e.getTime()-ge.getTime())/36e5).toString();case"hh":return s.toString().padStart(2,"0");case"mm":return e.getMinutes().toString().padStart(2,"0");case"ss":return e.getSeconds().toString().padStart(2,"0");default:throw new Error(`invalid format: ${t}`)}})).join(":")+r}function Ri(e){let{integerDigits:t,decimalDigits:i}=Ci(e);if(!i)return"0";const o=t.replace("-","").length;if(o+2>ci)return"0";const n=ci-o-1;return({decimalDigits:i}=Ci(e,Math.min(n,i.length))),i?"0."+"0".repeat(i.length):"0"}function Ti(e){if(qe(e)){return we(e).format}if(!ni(e))return;const t=e.includes(".")?"0.00":"0",i=e.match(/[\$€]/);if(i){const o=e.match(/[\d]/),n="[$"+i.values().next().value+"]";return o.index<i.index?"#,##"+t+n:n+"#,##"+t}return e.includes("%")?t+"%":void 0}function Ai(e,t,i){return Di(mi(e||"#,##0").map((e=>"NUMBER"===e.type?[{...e,format:{...e.format,magnitude:t,decimalPart:void 0}},{type:"STRING",format:i}]:e)).flat())}function Mi(e,t){const i=mi(e).map((e=>"NUMBER"===e.type?{...e,format:Oi(e.format,t)}:e)),o=Di(i);return pi[o]=i,o}function Oi(e,t){var i;const o={...e},n=Math.sign(t),s=(null===(i=o.decimalPart)||void 0===i?void 0:i.length)||0,r=Math.min(Math.max(0,s+n),li);return o.decimalPart="0".repeat(r),""===o.decimalPart&&delete o.decimalPart,o}const Ni=/,*?$/;function _i(e){var t;if(function(e){return Boolean(e.replace(Fi,""))}(e=e.trim()))throw new Error(`Invalid number format: ${e}`);const i=e.includes("%"),o=(null===(t=e.match(Ni))||void 0===t?void 0:t[0])||"",n=o?1e3**o.length:1;let s=e.slice(0,e.length-(o.length||0));const r=s.includes(",");if(s.match(/\..*,/))throw new Error("A format can't contain ',' symbol in the decimal part");s=s.replace("%","").replace(",","");const a=s.match(/[\%|,]/);if(a)throw new Error(`A format can only contain a single '${a[0]}' symbol`);const[l,c]=s.split(".");if(c&&c.length>20)throw new Error("A format can't contain more than 20 decimal places");return void 0!==c?{integerPart:l,isPercent:i,thousandsSeparator:r,decimalPart:c,magnitude:n}:{integerPart:l,isPercent:i,thousandsSeparator:r,magnitude:n}}const Fi=/[,#0.%]/g;function Di(e){let t="";for(let i of e){let e;switch(i.type){case"NUMBER":const t=i.format;e=t.integerPart,t.thousandsSeparator&&(e=e.slice(0,-3)+","+e.slice(-3)),void 0!==t.decimalPart&&(e+="."+t.decimalPart),t.isPercent&&(e+="%"),t.magnitude&&(e+=",".repeat(Math.log10(t.magnitude)/3));break;case"STRING":e=`[$${i.format}]`;break;case"DATE":e=i.format}t+=e}return t}class ki{constructor(e,t){this.getSheetSize=t,this.prefixSheet=!1,this._zone=e.zone,this.parts=e.parts,this.prefixSheet=e.prefixSheet,this.invalidXc=e.invalidXc,this.sheetId=e.sheetId,this.invalidSheetName=e.invalidSheetName}static fromRange(e,t){return e instanceof ki?e:new ki(e,t.getSheetSize)}get unboundedZone(){return this._zone}get zone(){const{left:e,top:t,bottom:i,right:o}=this._zone;if(void 0!==o&&void 0!==i)return this._zone;if(void 0===i&&void 0!==o)return{right:o,top:t,left:e,bottom:this.getSheetSize(this.sheetId).numberOfRows-1};if(void 0===o&&void 0!==i)return{bottom:i,left:e,top:t,right:this.getSheetSize(this.sheetId).numberOfCols-1};throw new Error(s("Bad zone format"))}static getRangeParts(e,t){const i=e.split(":").map((e=>{const t=Vt(e);return{colFixed:!t&&e.startsWith("$"),rowFixed:t?e.startsWith("$"):e.includes("$",1)}})),o=void 0===t.bottom,n=void 0===t.right;return o&&(i[0].rowFixed=i[0].rowFixed||i[1].rowFixed,i[1].rowFixed=i[0].rowFixed||i[1].rowFixed),n&&(i[0].colFixed=i[0].colFixed||i[1].colFixed,i[1].colFixed=i[0].colFixed||i[1].colFixed),i}get isFullCol(){return void 0===this._zone.bottom}get isFullRow(){return void 0===this._zone.right}get rangeData(){return{_zone:this._zone,_sheetId:this.sheetId}}orderZone(){var e,t,i,o,n,s,r,a;const l={...this._zone};let c=this.parts;if(void 0!==l.right&&l.right<l.left){let n=l.right;l.right=l.left,l.left=n,c=[{colFixed:(null===(e=c[1])||void 0===e?void 0:e.colFixed)||!1,rowFixed:(null===(t=c[0])||void 0===t?void 0:t.rowFixed)||!1},{colFixed:(null===(i=c[0])||void 0===i?void 0:i.colFixed)||!1,rowFixed:(null===(o=c[1])||void 0===o?void 0:o.rowFixed)||!1}]}if(void 0!==l.bottom&&l.bottom<l.top){let e=l.bottom;l.bottom=l.top,l.top=e,c=[{colFixed:(null===(n=c[0])||void 0===n?void 0:n.colFixed)||!1,rowFixed:(null===(s=c[1])||void 0===s?void 0:s.rowFixed)||!1},{colFixed:(null===(r=c[1])||void 0===r?void 0:r.colFixed)||!1,rowFixed:(null===(a=c[0])||void 0===a?void 0:a.rowFixed)||!1}]}return this.clone({zone:l,parts:c})}clone(e){return new ki({zone:(null==e?void 0:e.zone)?e.zone:{...this._zone},sheetId:(null==e?void 0:e.sheetId)?e.sheetId:this.sheetId,invalidSheetName:e&&"invalidSheetName"in e?e.invalidSheetName:this.invalidSheetName,invalidXc:e&&"invalidXc"in e?e.invalidXc:this.invalidXc,parts:(null==e?void 0:e.parts)?e.parts:this.parts.map((e=>({rowFixed:e.rowFixed,colFixed:e.colFixed}))),prefixSheet:(null==e?void 0:e.prefixSheet)?e.prefixSheet:this.prefixSheet},this.getSheetSize)}}function Li(e,t,i){const o=i.sheetId===e?t:i.sheetId;return i.clone({sheetId:o})}function Pi(e,t,i){return i?e.getRangeFromSheetXC(t,i):void 0}function Ui(e,t,i){const o=[];return t.forEach((t=>{const n=function(e,t){e=e.toLocaleLowerCase();let i=0,o=0,n=(t=t.toLocaleLowerCase()).length,s=0;for(let r=0;r<n;r++)t[r]===e[s]?(s++,o+=100+o-r/200):o=0,i+=o;return s===e.length?i:0}(e,i(t));n>0&&o.push({score:n,elem:t})})),o.sort(((e,t)=>t.score-e.score)),o.map((e=>e.elem))}function Vi(e){const t=[];for(let i=0;i<e;i++){const e={cells:{}};t.push(e)}return t}class zi{constructor(){this.isFastIdStrategy=!1,this.fastIdStart=0}setIsFastStrategy(e){this.isFastIdStrategy=e}uuidv4(){return this.isFastIdStrategy?(this.fastIdStart++,String(this.fastIdStart)):window.crypto&&window.crypto.getRandomValues?([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))):"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}}function Bi(e){const t=function(e){const t=(e=e.split("!").pop()).replace(/\$/g,"").split(":").map((e=>e.trim()));let i,o,n,s,r=!1,a=!1,l=!1;const c=t[0],h=t[1]&&t[1];if(Ut(c))n=s=Gt(c),i=o=0,r=!0;else if(Vt(c))i=o=parseInt(c,10)-1,n=s=0,a=!0;else{const e=qt(c);n=s=e.col,i=o=e.row,l=!0}if(2===t.length)if(Ut(h))s=Gt(h),r=!0;else if(Vt(h))o=parseInt(h,10)-1,a=!0;else{const e=qt(h);s=e.col,o=e.row,i=r?o:i,n=a?s:n,l=!0}if(r&&a)throw new Error("Wrong zone xc. The zone cannot be at the same time a full column and a full row");const d={top:i,left:n,bottom:r?void 0:o,right:a?void 0:s};return l=l&&(a||r),l&&(d.hasHeader=l),d}(e);if(void 0!==t.right&&t.right<t.left){const e=t.left;t.left=t.right,t.right=e}if(void 0!==t.bottom&&t.bottom<t.top){const e=t.top;t.top=t.bottom,t.bottom=e}return t}function Hi(e){const t=Bi(e);if(void 0===t.bottom||void 0===t.right)throw new Error("This does not support unbounded ranges");return t}function $i(e){const{bottom:t,top:i,left:o,right:n}=e;return!(void 0!==t&&isNaN(t)||isNaN(i)||isNaN(o)||void 0!==n&&isNaN(n))&&((void 0===e.bottom||e.bottom>=e.top&&e.bottom>=0)&&(void 0===e.right||e.right>=e.left&&e.right>=0)&&e.top>=0&&e.left>=0)}function Wi(e){const{top:t,bottom:i,left:o,right:n}=e,r="hasHeader"in e&&e.hasHeader,a=t===i&&o===n;if(void 0===i&&void 0!==n)return 0!==t||r?`${Zt(o,t)}:${Wt(n)}`:`${Wt(o)}:${Wt(n)}`;if(void 0===n&&void 0!==i)return 0!==o||r?`${Zt(o,t)}:${i+1}`:`${t+1}:${i+1}`;if(void 0!==i&&void 0!==n)return a?Zt(o,t):`${Zt(o,t)}:${Zt(n,i)}`;throw new Error(s("Bad zone format"))}function Gi(e,t,i,o,n){const s="left"===t?"columns":"rows",r="before"===o?i-1:i,a=e["left"===t?"right":"bottom"];return e[t]<=r&&a&&a>r?ro(e,s,"RESIZE",n):r<e[t]?ro(e,s,"MOVE",n):{...e}}function qi(e,t,i,o,n){const s="left"===t?"columns":"rows",r="before"===o?i-1:i,a="left"===t?"right":"bottom";return e[t]<=r&&e[a]>r?ro(e,s,"RESIZE",n):r<e[t]?ro(e,s,"MOVE",n):{...e}}function Zi(e,t,i){const o="left"===t?"right":"bottom";let n=e[t],s=e[o];for(let r of i.sort(((e,t)=>t-e)))e[t]>r&&(n--,s--),e[t]<r&&e[o]>=r&&s--;return{...e,[t]:n,[o]:s}}function ji(e,t,i){const o="left"===t?"right":"bottom";let n=e[t],s=e[o];const r=e[o];for(let o of i.sort(((e,t)=>t-e)))e[t]>o&&(n--,void 0!==s&&s--),void 0!==r&&void 0!==s&&e[t]<=o&&r>=o&&s--;if(!(void 0!==s&&n>s))return{...e,[t]:n,[o]:s}}function Yi(...e){return{top:Math.min(...e.map((e=>e.top))),left:Math.min(...e.map((e=>e.left))),bottom:Math.max(...e.map((e=>e.bottom))),right:Math.max(...e.map((e=>e.right)))}}function Xi(e,t){if(Qi(e,t))return{top:Math.max(e.top,t.top),left:Math.max(e.left,t.left),bottom:Math.min(e.bottom,t.bottom),right:Math.min(e.right,t.right)}}function Ki(e,t){return e.left===t.left&&e.right===t.right&&e.top===t.top&&e.bottom===t.bottom}function Qi(e,t){return!(e.bottom<t.top||t.bottom<e.top)&&!(e.right<t.left||t.right<e.left)}function Ji(e,t,i){const{left:o,right:n,top:s,bottom:r}=i;return e>=o&&e<=n&&t>=s&&t<=r}function eo(e,t){return Ki(Yi(t,e),t)}function to(e,t){const i=e.map(Bi),o=t.map(Hi),n=Math.max(...i.concat(o).map((e=>e.bottom||0))),s=Math.max(...i.concat(o).map((e=>e.right||0))),r=i.map((e=>({...e,bottom:void 0===e.bottom?n+1:e.bottom,right:void 0===e.right?s+1:e.right}))),a=o.map((e=>({...e,bottom:void 0===e.bottom?n+1:e.bottom,right:void 0===e.right?s+1:e.right}))),l=function(e,t){const i=new Set(t.map((({col:e,row:t})=>`${e}-${t}`)));return e.filter((({col:e,row:t})=>!i.has(`${e}-${t}`)))}(r.map(so).flat(),a.map(so).flat()),c=function(e){if(0===e.length)return[];const[t,...i]=[...e].sort(((e,t)=>e.row-t.row)).sort(((e,t)=>e.col-t.col)),o=[];let n=co(t);for(const{col:e,row:t}of i)if(!Ji(e,t,n))if(e===n.left&&t===n.bottom+1){const e=n.bottom+1;n={...n,bottom:e}}else o.push(n),n=co({col:e,row:t});return[...o,n]}(l);return function(e){if(0===e.length)return[];if(e.some((e=>e.left!==e.right)))throw new Error("only columns can be merged");const t=[],i=io(e),o=(e,t)=>e.top===t.top&&e.bottom===t.bottom&&e.right+1===t.left;for(;i.length;){const e=i.reduce(((e,t)=>o(e,t)?Yi(e,t):e),i.shift());t.push(e)}return io(t)}(c).map((e=>({...e,bottom:e.bottom===n+1?void 0:e.bottom,right:e.right===s+1?void 0:e.right}))).map(Wi)}function io(e){const t=[...e].sort(((e,t)=>t.right-e.right)).sort(((e,t)=>t.bottom-e.bottom)).sort(((e,t)=>e.top-t.top)).sort(((e,t)=>e.left-t.left)).reverse(),i=[];for(;0!==t.length;){const e=t.shift();t.some((t=>eo(e,t)))||i.push(e)}return i.reverse()}function oo(e){return{numberOfRows:e.bottom-e.top+1,numberOfCols:e.right-e.left+1}}function no(e){const{numberOfCols:t,numberOfRows:i}=oo(e);return 1===t||1===i}function so(e){const t=[],[i,o]=[e.right,e.left].sort(((e,t)=>e-t)),[n,s]=[e.top,e.bottom].sort(((e,t)=>e-t));for(const e of $e(i,o+1))for(const i of $e(n,s+1))t.push({col:e,row:i});return t}function ro(e,t,i,o){const n="both"===t?o[0]:"columns"===t?o:0,s="both"===t?o[1]:"rows"===t?o:0,r="hasHeader"in e&&e.hasHeader;let a;a=!function(e){return void 0===e.bottom}(e)||r?!(ho(e)&&!r)||"columns"!==t:"rows"!==t;const l={...e};return a&&"MOVE"===i&&(l.left+=n,l.top+=s),void 0!==l.right&&(l.right+=n),void 0!==l.bottom&&(l.bottom+=s),l}function ao(e,t){let i,o;const{left:n,right:s,top:r,bottom:a}=e,{left:l,right:c,top:h,bottom:d}=t;return i=l!=n?l:c!=s?c:l,o=h!=r?h:d!=a?d:h,{col:i,row:o}}function lo(e){return{top:Math.min(e.top,e.bottom),bottom:Math.max(e.top,e.bottom),left:Math.min(e.left,e.right),right:Math.max(e.left,e.right)}}function co(e){return{left:e.col,right:e.col,top:e.row,bottom:e.row}}function ho(e){return void 0===e.right}function uo(e){return(e.bottom-e.top+1)*(e.right-e.left+1)}function go(...e){return e.length<2||1===to(e.map(Wi),[]).length}class po extends t.Component{constructor(){super(...arguments),this.canvas=t.useRef("graphContainer")}get background(){return this.chartRuntime.background}get canvasStyle(){return`background-color: ${this.background}`}get chartRuntime(){const e=this.env.model.getters.getChartRuntime(this.props.figure.id);if(!("chartJsConfig"in e))throw new Error("Unsupported chart runtime");return e}setup(){t.onMounted((()=>{const e=this.chartRuntime;this.createChart(e.chartJsConfig)}));let e=this.chartRuntime;t.onPatched((()=>{const t=this.chartRuntime;ht(e,t)||(this.updateChartJs(t),e=t)}))}createChart(e){const t=this.canvas.el.getContext("2d");this.chart=new window.Chart(t,e)}updateChartJs(e){var t,i,o,n,s;const r=e.chartJsConfig;r.data&&r.data.datasets?(this.chart.data=r.data,(null===(t=r.options)||void 0===t?void 0:t.title)&&(this.chart.config.options.title=r.options.title),r.options&&"valueLabel"in r.options&&(null===(i=r.options)||void 0===i?void 0:i.valueLabel)&&(this.chart.config.options.valueLabel=r.options.valueLabel)):this.chart.data.datasets=void 0,this.chart.config.options.tooltips=null===(o=r.options)||void 0===o?void 0:o.tooltips,this.chart.config.options.legend=null===(n=r.options)||void 0===n?void 0:n.legend,this.chart.config.options.scales=null===(s=r.options)||void 0===s?void 0:s.scales,this.chart.update({duration:0})}}po.template="o-spreadsheet-ChartJsComponent",po.props={figure:Object};const mo={};let fo=0;function vo(e,...t){const i="__sheet__"+fo++;return function(e,t){const i=document.createElement("style");i.textContent=function(e){const t=e.split(/(\{|\}|;)/).map((e=>e.trim())),i=[],o=[];let n=[];function s(e,t){const o=[];for(const n of i[e]){let r=t&&t+" "+n||n;r.includes("&")&&(r=n.replace(/&/g,t||"")),e<i.length-1&&(r=s(e+1,r)),o.push(r)}return o.join(", ")}function r(){n.length&&(o.push(s(0)+" {"),o.push(...n),o.push("}"),n=[])}for(;t.length;){let e=t.shift();"}"===e?(r(),i.pop()):("{"===t[0]&&(r(),i.push(e.split(/\s*,\s*/)),t.shift()),";"===t[0]&&n.push(" "+e+";"))}return o.join("\n")}(t),mo[e]=i}(i,String.raw(e,...t)),function(e){const t=mo[e];t.setAttribute("component",e),document.head.appendChild(t)}(i),i}function bo({strikethrough:e,underline:t}){return e||t?`${e?"line-through":""} ${t?"underline":""}`:"none"}function Co(e){const t=So(e);return e?(e.fillColor&&(t.background=e.fillColor),t):t}function So(e){const t={};if(!e)return t;if(e.bold&&(t["font-weight"]="bold"),e.italic&&(t["font-style"]="italic"),e.strikethrough||e.underline){let i=e.strikethrough?"line-through":"";i=e.underline?i+" underline":i,t["text-decoration"]=i}return e.textColor&&(t.color=e.textColor),t}function Eo(e){return Object.entries(e).filter((([e,t])=>void 0!==t)).map((([e,t])=>`${e}:${t};`)).join(" ")}const wo=1.2;vo`
|
|
1
|
+
!function(e,t){"use strict";let i=e=>e;function o(e,...t){if(1===t.length&&"object"==typeof t[0]){const i=t[0];e=e.replace(/\%\(?([^\)]+)\)s/g,((e,t)=>i[t]))}else t.length>0&&(e=e.replace(/\%s/g,(()=>t.shift())));return e}const n=function(e,...t){return o(i(e),...t)},s=function(e,...t){return new r(e,t)};class r extends String{constructor(e,t){super(e),this.values=t}valueOf(){const e=super.valueOf();return o(i(e),...this.values)}toString(){return this.valueOf()}}var a,l;!function(e){e.NotAvailable="#N/A",e.InvalidReference="#REF",e.BadExpression="#BAD_EXPR",e.CircularDependency="#CYCLE",e.UnknownFunction="#NAME?",e.GenericError="#ERROR"}(a||(a={})),function(e){e[e.silent=0]="silent",e[e.error=1]="error"}(l||(l={}));class c extends Error{constructor(e,t,i=l.error){super(t),this.errorType=e,this.logLevel=i}}class h extends c{constructor(e){super(a.BadExpression,e)}}class d extends c{constructor(){super(a.CircularDependency,s("Circular reference"))}}class u extends c{constructor(){super(a.InvalidReference,s("Invalid reference"))}}class g extends c{constructor(e){super(a.NotAvailable,e||s("Data not available"),e?l.error:l.silent)}}class p extends c{constructor(e){super(a.UnknownFunction,s('Unknown function: "%s"',e))}}const m=.5,f="#f5f5f5",v="#F8F9FA",b="#E8EAED",C="#595959",S="#666666",E="#3266ca",w="#FFFFFF",y="#CACACA",x=11982760,I="#01666b",R="#188038",T="#E6F4EA",A="#CEEAD6",M="#E0E2E4",O=["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF","#980000","#FF0000","#FF9900","#FFFF00","#00FF00","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF","#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#741B47","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"],N=26,_=48,F=96,D=23,k=15,L=18,P=14,U=4,V=4,z=3,B=V,H=17,$=250,W=1,G="400",q=10,Z="'Roboto', arial",j=["thin","#000"],Y=["thin",R],X=/[ymdhs:]/,K=a.InvalidReference,Q="START_REVISION",J=20,ee="??",te="difference",ie="#00A04A",oe="#DC6965",ne=.4,se=["'","*","?","/","\\","[","]"],re=/'|\*|\?|\/|\\|\[|\]/,ae="|",le=s("Invalid expression");var ce;!function(e){e[e.Grid=0]="Grid",e[e.Highlight=5]="Highlight",e[e.Figure=10]="Figure",e[e.ScrollBar=15]="ScrollBar",e[e.GridPopover=19]="GridPopover",e[e.GridComposer=20]="GridComposer",e[e.Dropdown=21]="Dropdown",e[e.IconPicker=25]="IconPicker",e[e.TopBarComposer=30]="TopBarComposer",e[e.Popover=35]="Popover",e[e.ChartAnchor=1e3]="ChartAnchor"}(ce||(ce={}));const he="\n",de=[6,7,8,9,10,11,12,14,18,24,36];class ue{constructor(e,t,i,o=0,n=0,s=0){this.jsDate=new Date(Date.UTC(e,t,i,o,n,s,0))}static fromTimestamp(e){const t=new Date(e);return new ue(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())}static now(){const e=new Date;return new ue(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds())}toString(){return this.jsDate.toString()}getTime(){return this.jsDate.getTime()}getFullYear(){return this.jsDate.getUTCFullYear()}getMonth(){return this.jsDate.getUTCMonth()}getDate(){return this.jsDate.getUTCDate()}getDay(){return this.jsDate.getUTCDay()}getHours(){return this.jsDate.getUTCHours()}getMinutes(){return this.jsDate.getUTCMinutes()}getSeconds(){return this.jsDate.getUTCSeconds()}setFullYear(e){this.jsDate.setFullYear(e)}setDate(e){this.jsDate.setUTCDate(e)}setHours(e){this.jsDate.setUTCHours(e)}setMinutes(e){this.jsDate.setUTCMinutes(e)}setSeconds(e){this.jsDate.setUTCSeconds(e)}}const ge=new ue(1899,11,30),pe=864e5,me=2e3,fe=ue.now().getFullYear(),ve=ue.fromTimestamp(0).getTime()-ge.getTime(),be=/^\d{1,2}(\/|-|\s)\d{1,2}((\/|-|\s)\d{1,4})?$/,Ce=/^\d{3,4}(\/|-|\s)\d{1,2}(\/|-|\s)\d{1,2}$/,Se=/((\d+(:\d+)?(:\d+)?\s*(AM|PM))|(\d+:\d+(:\d+)?))$/,Ee={};function we(e){if(e in Ee)return Ee[e];const t=function(e){let t;e=e.trim();const i=e.match(Se);if(i){if(t=function(e){if(e=e.trim(),Se.test(e)){const t=/AM/i.test(e),i=/PM/i.test(e),o=(t||i?e.substring(0,e.length-2).trim():e).split(/:/),n=o.length>=2,s=3===o.length;let r=Number(o[0]),a=n?Number(o[1]):0,l=s?Number(o[2]):0,c=s?"hh:mm:ss":"hh:mm";if(t||i)c+=" a";else if(!n)return null;r>=12&&t?r-=12:r<12&&i&&(r+=12),a+=Math.floor(l/60),l%=60,r+=Math.floor(a/60),a%=60,r>=24&&(c="hhhh:mm:ss");return{value:r/24+a/1440+l/86400,format:c,jsDate:new ue(1899,11,30,r,a,l)}}return null}(i[0]),null===t)return null;e=e.replace(i[0],"").trim()}let o;const n=e.match(be),s=e.match(Ce);if(n||s){let t;if(n?(t=n[0],o=ye(t,"mdy")):(t=s[0],o=ye(t,"ymd")),null===o)return null;e=e.replace(t,"").trim()}if(""!==e||!o&&!t)return null;if(o&&t)return{value:o.value+t.value,format:o.format+" "+("hhhh:mm:ss"===t.format?"hh:mm:ss":t.format),jsDate:new ue(o.jsDate.getFullYear()+t.jsDate.getFullYear()-1899,o.jsDate.getMonth()+t.jsDate.getMonth()-11,o.jsDate.getDate()+t.jsDate.getDate()-30,o.jsDate.getHours()+t.jsDate.getHours(),o.jsDate.getMinutes()+t.jsDate.getMinutes(),o.jsDate.getSeconds()+t.jsDate.getSeconds())};return o||t}(e);return Ee[e]=t,t}function ye(e,t){const i="mdy"===t;if(i||"ymd"===t){const t=e.split(/\/|-|\s/),o=i?0:1,n=i?1:2,s=i?2:0,r=Number(t[o]),a=Number(t[n]),l=2===t[o].length&&r<10||2===t[n].length&&a<10,c=t[s]?function(e){const t=Number(e);switch(e.length){case 1:return me+t;case 2:return me+(me+t>fe+10?-100:0)+t;case 3:case 4:return t}return 0}(t[s]):fe,h=new ue(c,r-1,a),d=e.match(/\/|-|\s/)[0];if(h.getMonth()!==r-1||h.getDate()!==a)return null;const u=h.getTime()-ge.getTime();let g=l?`mm${d}dd`:`m${d}d`;return t[s]&&(g=i?g+d+"yyyy":"yyyy"+d+g),{value:Math.round(u/pe),format:g,jsDate:h}}return null}function xe(e){const t=Math.trunc(e);let i=ue.fromTimestamp(t*pe-ve),o=e-t;o=o<0?1+o:o;const n=Math.round(24*o),s=Math.round(24*(o-n/24)*60),r=Math.round(24*(o-n/24-s/24/60)*60*60);return i.setHours(n),i.setMinutes(s),i.setSeconds(r),i}function Ie(e){const t=e.getTime()-ge.getTime();return Math.round(t/pe)}function Re(e){return new ue(e.getFullYear(),e.getMonth()+1,0).getDate()}function Te(e){return Re(e)===e.getDate()}function Ae(e,t,i){const o=e.getFullYear(),n=e.getMonth(),s=e.getDate(),r=new ue(o,n+t,1);return i&&s===Re(e)||s>Re(r)?r.setDate(Re(r)):r.setDate(s),r}function Me(e){const t=Math.trunc(e);return t%4==0&&t%100!=0||t%400==0}function Oe(e,t,i){if(e===t)return 0;if(e>t){const i=t;t=e,e=i}const o=xe(e),n=xe(t);let s=o.getDate(),r=n.getDate();const a=o.getMonth(),l=n.getMonth(),c=o.getFullYear(),h=n.getFullYear();let d=0,u=0;switch(i){case 0:31===s&&(s=30),30===s&&31===r&&(r=30),1===a&&s===(Me(c)?29:28)&&(s=30,1===l&&r===(Me(h)?29:28)&&(r=30)),d=c+(30*a+s)/360,u=h+(30*l+r)/360;break;case 1:let i=365;const o=c===h;if(!o&&!(c+1===h)||!o&&a<l||!o&&a===l&&s<r){let e=0,t=0;for(let i=c;i<=h;i++)e++,t+=Me(i)?366:365;i=t/e}else o?Me(c)&&(i=366):(Me(c)&&a<2&&(i=366),Me(h)&&(l>1||1===l&&29===r)&&(i=366));d=e/i,u=t/i;break;case 2:d=e/360,u=t/360;break;case 3:d=e/365,u=t/365;break;case 4:31===s&&(s=30),31===r&&(r=30),d=c+(30*a+s)/360,u=h+(30*l+r)/360}return u-d}function Ne(e){return'"'===e[0]&&(e=e.slice(1)),'"'===e[e.length-1]&&"\\"!==e[e.length-2]?e.slice(0,e.length-1):e}function _e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fe(e){const t=Array.isArray(e)?[]:{};switch(typeof e){case"object":if(null===e)return e;if(function(e){return"clone"in e&&e.clone instanceof Function}(e))return e.clone();if(!(function(e){return"object"==typeof e&&(null==e?void 0:e.constructor)===Object}(e)||e instanceof Array))throw new Error("Unsupported type: only objects and arrays are supported");for(const i in e)t[i]=Fe(e[i]);return t;case"number":case"string":case"boolean":case"function":case"undefined":return e;default:throw new Error("Unsupported type: "+typeof e)}}function De(e){return e.startsWith("'")&&(e=e.slice(1,-1).replace(/''/g,"'")),e}function ke(e){var t;return(null===(t=e.match(/\w/g))||void 0===t?void 0:t.length)!==e.length&&(e=`'${e}'`),e}function Le(e,t,i){return e<t?t:e>i?i:e}function Pe(e,t=1){return t*(e+V)-V}function Ue(e,t,i){const o=Be(i);if(Ve[o]||(Ve[o]={}),void 0===Ve[o][t]){e.save(),e.font=o;const i=e.measureText(t).width;e.restore(),Ve[o][t]=i}return Ve[o][t]}const Ve={};function ze(e){return Math.round(96*e/72)}function Be(e){return`${e.italic?"italic ":""}${e.bold?"bold":G} ${He(e)}px ${Z}`}function He(e){return ze((null==e?void 0:e.fontSize)||q)}function $e(e,t,i=1){if(t<=e&&i>0)return[];if(0===i)throw new Error("range() step must not be zero");const o=Math.ceil(Math.abs((t-e)/i)),n=Array(o);for(let t=0;t<o;t++)n[t]=e+t*i;return n}function We(e){return e.reduce(((e,t,i,o)=>{if(1===Math.abs(t-o[i-1])){e[e.length-1].push(t)}else e.push([t]);return e}),[])}function*Ge(e,t){t.next();for(const i of e){const e=t.next();yield{...i,next:e.done?void 0:e.value}}}function qe(e){return null!==we(e)}const Ze=/^\[(.+)\]\((.+)\)$/,je=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/;function Ye(e){return Ze.test(e)}function Xe(e){return je.test(e)}function Ke(e,t){return`[${e}](${t})`}function Qe(e){const t=e.match(Ze)||[],i=t[1],o=t[2];if(!i||!o)throw new Error(`Could not parse markdown link ${e}.`);return{label:i,url:o}}const Je="o-spreadsheet://";function et(e){return e.startsWith(Je)}function tt(e){return`${Je}${e}`}function it(e){if(e.startsWith(Je))return e.substr(Je.length);throw new Error(`${e} is not a valid sheet link`)}function ot(e){return void 0!==e}function nt(e){return void 0===e||Object.values(e).every((e=>"object"==typeof e?nt(e):!e))}function st(e,t){for(let[i,o]of Object.entries(t))if(ht(o,e))return parseInt(i,10);const i=Object.keys(t),o=0===i.length?0:Math.max(...i.map((e=>parseInt(e,10))));return t[o+1]=e,o+1}function rt(e){let t="";for(let i=0,o=e.length;i<o;i++)t+=e[i];return t}function at(e){let t,i=!1;const o=()=>(i||(t=e instanceof Function?e():e,i=!0),t);return o.map=e=>at((()=>e(o()))),o}function lt(e,t){let i=e.slice(t).find((e=>e));return i||(i=e.slice(0,t).reverse().find((e=>e))),i||""}function ct(e,t){return"after"===e?t+1:t}function ht(e,t){if(e===t)return!0;if(e&&!t||t&&!e)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return e===t;const i=new Set;Object.keys(e).forEach((e=>i.add(e))),Object.keys(t).forEach((e=>i.add(e)));for(let o of i){if(typeof e[o]!=typeof e[o])return!1;if("object"==typeof e[o]){if(!ht(e[o],t[o]))return!1}else if(e[o]!==t[o])return!1}return!0}function dt(e,t){return t.every((t=>e.includes(t)))}function ut(e){const t={...e};return Object.keys(t).forEach((e=>!t[e]&&delete t[e])),t}function gt(e){return e?e.toLowerCase():""}const pt=[" ","\t","\f","\v",String.fromCharCode(parseInt("00a0",16)),String.fromCharCode(parseInt("1680",16)),String.fromCharCode(parseInt("2000",16)),String.fromCharCode(parseInt("200a",16)),String.fromCharCode(parseInt("2028",16)),String.fromCharCode(parseInt("2029",16)),String.fromCharCode(parseInt("202f",16)),String.fromCharCode(parseInt("205f",16)),String.fromCharCode(parseInt("3000",16)),String.fromCharCode(parseInt("feff",16))],mt=new RegExp(pt.join("|"),"g"),ft=/\r\n|\r|\n/g;function vt(e){return e?e=(e=e.replace(mt," ")).replace(ft,he):""}const bt=/rgba?\(|\s+|\)/gi,Ct=/^#([A-F\d]{2}){3,4}$/g,St=["#eb6d00","#0074d9","#ad8e00","#169ed4","#b10dc9","#00a82d","#00a3a3","#f012be","#3d9970","#111111","#62A300","#ff4136","#949494","#85144b","#001f3f"];function Et(e){return wt(e.toString(16).padStart(6,"0"))}function wt(e){let t=e;if(e.startsWith("rgb")?t=function(e){const t=e.replace(bt,"").split(",");let i=255;if(3!==t.length&&4!==t.length)throw new Error("invalid color");if(4===t.length){const e=parseFloat(t.pop()||"1");i=Math.round(255*(e||1))}const o=t.map((e=>parseInt(e,10)));255!==i&&o.push(i);return"#"+rt(o.map((e=>e.toString(16).padStart(2,"0")))).toUpperCase()}(e):(t=e.replace("#","").toUpperCase(),3!==t.length&&4!==t.length||(t=t.split("").reduce(((e,t)=>e+t+t),"")),t=`#${t}`),!t.match(Ct))throw new Error(`invalid color input: ${e}`);return t}function yt(e){try{return wt(e),!0}catch(e){return!1}}const xt=e=>e>=0&&e<=255;function It(e,t,i,o=1){if(!xt(e)||!xt(t)||!xt(i)||o<0||o>1)throw new Error(`Invalid RGBA values ${[e,t,i,o]}`);return{a:o,b:i,g:t,r:e}}function Rt(e){let{r:t,g:i,b:o}=At(e);t/=255,i/=255,o/=255;const n=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return.2126*n(t)+.7152*n(i)+.0722*n(o)}function Tt(e){let t=e.r.toString(16),i=e.g.toString(16),o=e.b.toString(16),n=Math.round(255*e.a).toString(16);return 1==t.length&&(t="0"+t),1==i.length&&(i="0"+i),1==o.length&&(o="0"+o),1==n.length&&(n="0"+n),"ff"===n&&(n=""),("#"+t+i+o+n).toUpperCase()}function At(e){let t,i,o,n;if(7===(e=wt(e)).length)t=parseInt(e[1]+e[2],16),i=parseInt(e[3]+e[4],16),o=parseInt(e[5]+e[6],16),n=255;else{if(9!==e.length)throw new Error("Invalid color");t=parseInt(e[1]+e[2],16),i=parseInt(e[3]+e[4],16),o=parseInt(e[5]+e[6],16),n=parseInt(e[7]+e[8],16)}return n=+(n/255).toFixed(3),{a:n,r:t,g:i,b:o}}function Mt(e){(e={...e}).s/=100,e.l/=100;let t=(1-Math.abs(2*e.l-1))*e.s,i=t*(1-Math.abs(e.h/60%2-1)),o=e.l-t/2,n=0,s=0,r=0;return 0<=e.h&&e.h<60?(n=t,s=i,r=0):60<=e.h&&e.h<120?(n=i,s=t,r=0):120<=e.h&&e.h<180?(n=0,s=t,r=i):180<=e.h&&e.h<240?(n=0,s=i,r=t):240<=e.h&&e.h<300?(n=i,s=0,r=t):300<=e.h&&e.h<360&&(n=t,s=0,r=i),n=Math.round(255*(n+o)),s=Math.round(255*(s+o)),r=Math.round(255*(r+o)),{a:e.a,r:n,g:s,b:r}}function Ot(e){const t=e.r/255,i=e.g/255,o=e.b/255;let n=Math.min(t,i,o),s=Math.max(t,i,o),r=s-n,a=0,l=0,c=0;return a=0==r?0:s==t?(i-o)/r%6:s==i?(o-t)/r+2:(t-i)/r+4,a=Math.round(60*a),a<0&&(a+=360),c=(s+n)/2,l=0==r?0:r/(1-Math.abs(2*c-1)),l=+(100*l).toFixed(1),c=+(100*c).toFixed(1),{a:e.a,h:a,s:l,l:c}}const Nt=new RegExp(/\$?([A-Z]{1,3})\$?([0-9]{1,7})/,"i"),_t=new RegExp(/^\$?([A-Z]{1,3})\$?([0-9]{1,7})$/,"i"),Ft=new RegExp(/^\$?([A-Z]{1,3})+$/,"i"),Dt=new RegExp(/^\$?([0-9]{1,7})+$/,"i"),kt=new RegExp(/^\s*('.+'!|[^']+!)?\$?([A-Z]{1,3})$/,"i"),Lt=new RegExp(/^\s*('.+'!|[^']+!)?\$?([0-9]{1,7})$/,"i"),Pt=new RegExp(/^\s*('.+'!|[^']+!)?/.source+"("+[Nt.source,/(\$?[A-Z]{1,3})?\$?[0-9]{1,7}\s*:\s*(\$?[A-Z]{1,3})?\$?[0-9]{1,7}\s*/i.source,/\$?[A-Z]{1,3}(\$?[0-9]{1,7})?\s*:\s*\$?[A-Z]{1,3}(\$?[0-9]{1,7})?\s*/i.source].join("|")+")"+/$/.source,"i");function Ut(e){return kt.test(e)}function Vt(e){return Lt.test(e)}function zt(e){return Ft.test(e)}function Bt(e){return Dt.test(e)}function Ht(e){return _t.test(e)}function $t(e){const t=e.split("!"),i=t.pop();return{sheetName:De(t.join("!"))||void 0,xc:i}}function Wt(e){if(e<0)throw new Error(`number must be positive. Got ${e}`);return e<26?String.fromCharCode(65+e):Wt(Math.floor(e/26)-1)+Wt(e%26)}function Gt(e){let t=0;const i=e.length;for(let o=0;o<i;o++){t+=(e.charCodeAt(o)-65+(o<i-1?1:0))*26**(i-o-1)}return t}function qt(e){const t=(e=e.toUpperCase().trim()).match(Nt);if(null!==t){const[i,o,n]=t;if(i===e){return{col:Gt(o),row:parseInt(n,10)-1}}}throw new Error(`Invalid cell description: ${e}`)}function Zt(e,t,i={colFixed:!1,rowFixed:!1}){return(i.colFixed?"$":"")+Wt(e)+(i.rowFixed?"$":"")+String(t+1)}const jt=140,Yt=20,Xt=.035;function Kt(e){return Yt+(jt-Yt)*Math.exp(-Xt*(e-1))}const Qt=/(^-?\d+(\.?\d*(e\d+)?)?|^-?\.\d+)(?!\w|!)/,Jt="(\\s*(\\d+(,\\d{3,})*(\\.\\d*)?)|(\\.\\d+))(e(\\+|-)?\\d+)?(\\s*%)?",ei="(\\s*-)?",ti="(\\s*[\\$€])?",ii="^(("+[ei+ti+Jt,ei+Jt+ti,ti+ei+Jt].join(")|(")+"))$",oi=new RegExp(ii,"i");function ni(e){return!!e&&oi.test(e.trim())}const si=/[,\$€]+/g;function ri(e){e=e.replace(si,"");let t=Number(e);return isNaN(t)&&e.includes("%")&&(t=Number(e.split("%")[0]),!isNaN(t))?t/100:t}function ai(e,t,i){const o=[...e].sort(((e,t)=>e-t));let n=(o.length+(i?-1:1))*t;if(i||n--,Number.isInteger(n))return o[n];const s=Math.ceil(n),r=Math.floor(n);return o[s]*(n-r)+o[r]*(s-n)}const li=20,ci=11,hi=/(\d+?)(?=(\d{3})+(?!\d)|$)/g,di=/0/g,ui={0:s("January"),1:s("February"),2:s("March"),3:s("April"),4:s("May"),5:s("June"),6:s("July"),7:s("August"),8:s("September"),9:s("October"),10:s("November"),11:s("December")},gi={0:s("Sunday"),1:s("Monday"),2:s("Tuesday"),3:s("Wednesday"),4:s("Thursday"),5:s("Friday"),6:s("Saturday")},pi={};function mi(e){let t=pi[e];return void 0===t&&(t=function(e){if(""===e)throw new Error("A format cannot be empty");let t=0,i=[];for(;t<e.length;){let o;if("["===e.charAt(t)){if("$"!==e.charAt(t+1))throw new Error(`Currency formats have to be prefixed by a $: ${e}`);if(o=e.substring(t+1).indexOf("]")+t+2,0===o)throw new Error(`Invalid currency brackets format: ${e}`);const n=e.substring(t+2,o-1);if(n.includes("["))throw new Error(`Invalid currency format: ${e}`);i.push({type:"STRING",format:n})}else{const n=e.substring(t).indexOf("[");o=n>-1?n+t:e.length;const s=e.substring(t,o);s.match(X)?i.push({type:"DATE",format:s}):i.push({type:"NUMBER",format:_i(s)})}t=o}return i}(e),pi[e]=t),t}function fi(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":t||(t=Ri(e));return function(e,t){if("DATE"===t[0].type)return yi(e,t[0].format);let i=e<0?"-":"";for(let o of t)switch(o.type){case"NUMBER":i+=vi(Math.abs(e),o.format);break;case"STRING":i+=o.format}return i}(e,mi(t));case"object":return"0"}}function vi(e,t){t.isPercent&&(e*=100),e/=t.magnitude;let i=0;void 0!==t.decimalPart&&(i=t.decimalPart.length);const{integerDigits:o,decimalDigits:n}=Ci(e,i);let s=function(e,t,i){var o;const n="0"===e?"":e;let s=n;const r=t.length-n.length;if(r>0){const e=(t.substring(0,r).match(di)||[]).length;s="0".repeat(e)+s}i&&(s=(null===(o=s.match(hi))||void 0===o?void 0:o.join(","))||s);return s}(o,t.integerPart,t.thousandsSeparator);return void 0!==t.decimalPart&&(s+="."+function(e,t){let i=e;if(t.length-e.length>0){const o=(t.substring(e.length,t.length+1).match(di)||[]).length;i+="0".repeat(o)}return i}(n||"",t.decimalPart)),t.isPercent&&(s+="%"),s}const bi=[];function Ci(e,t=li){const i=e.toString();if(i.includes("e"))return function(e,t=li){let i=bi[t];i||(i=new Intl.NumberFormat("en-US",{maximumFractionDigits:t,useGrouping:!1}),bi[t]=i);const[o,n]=i.format(e).split(".");return{integerDigits:o,decimalDigits:n}}(e,t);if(Number.isInteger(e))return{integerDigits:i,decimalDigits:void 0};const o=i.indexOf(".");let n=i.substring(0,o),s=i.substring(o+1);if(0===t)return Number(s[0])>=5&&(n=(Number(n)+1).toString()),{integerDigits:n,decimalDigits:void 0};if(s.length>t){const{integerDigits:e,decimalDigits:i}=function(e,t){var i;let o="0",n=e,s=e.slice(0,t);const r=t;if(Number(e[r])<5)return{integerDigits:o,decimalDigits:s};const a=(null===(i=s.match(Ei))||void 0===i?void 0:i[0])||"",l=(Number(s)+1).toString(),c=s.slice(a.length),h=l.length>c.length;h&&!a?(o="1",n=void 0):n=h?a.slice(0,-1)+l:a+l;return{integerDigits:o,decimalDigits:n}}(s,t);s=i,"0"!==e&&(n=(Number(n)+Number(e)).toString())}return{integerDigits:n,decimalDigits:Si(s||"")}}function Si(e){let t=e.length-1;for(;t>=0&&"0"===e[t];)t--;return e.slice(0,t+1)||void 0}const Ei=/^0+/;function wi(e){try{return yi(1,e),!0}catch(e){return!1}}function yi(e,t){const i=xe(e),o=t.indexOf("h");let n="",s="";return o>0?(n=xi(i,t.substring(0,o-1)),s=Ii(i,t.substring(o))):0===o?s=Ii(i,t):o<0&&(n=xi(i,t)),n+(n&&s?" ":"")+s}function xi(e,t){var i;const o=null===(i=t.match(/\/|-|\s/))||void 0===i?void 0:i[0];return(o?t.split(o):[t]).map((i=>{switch(i){case"d":return e.getDate();case"dd":return e.getDate().toString().padStart(2,"0");case"ddd":return gi[e.getDay()].slice(0,3);case"dddd":return gi[e.getDay()];case"m":return e.getMonth()+1;case"mm":return String(e.getMonth()+1).padStart(2,"0");case"mmm":return ui[e.getMonth()].slice(0,3);case"mmmm":return ui[e.getMonth()];case"mmmmm":return ui[e.getMonth()].slice(0,1);case"yy":const i=String(e.getFullYear()).replace("-","").padStart(2,"0");return i.slice(i.length-2);case"yyyy":return e.getFullYear();default:throw new Error(`invalid format: ${t}`)}})).join(o)}function Ii(e,t){let i=t.split(/:|\s/);const o=e.getHours(),n="a"===i[i.length-1];let s=o,r="";return n&&(s=0===s?12:s>12?s-12:s,r=o>=12?" PM":" AM",i.pop()),i.map((i=>{switch(i){case"hhhh":return Math.floor((e.getTime()-ge.getTime())/36e5).toString();case"hh":return s.toString().padStart(2,"0");case"mm":return e.getMinutes().toString().padStart(2,"0");case"ss":return e.getSeconds().toString().padStart(2,"0");default:throw new Error(`invalid format: ${t}`)}})).join(":")+r}function Ri(e){let{integerDigits:t,decimalDigits:i}=Ci(e);if(!i)return"0";const o=t.replace("-","").length;if(o+2>ci)return"0";const n=ci-o-1;return({decimalDigits:i}=Ci(e,Math.min(n,i.length))),i?"0."+"0".repeat(i.length):"0"}function Ti(e){if(qe(e)){return we(e).format}if(!ni(e))return;const t=e.includes(".")?"0.00":"0",i=e.match(/[\$€]/);if(i){const o=e.match(/[\d]/),n="[$"+i.values().next().value+"]";return o.index<i.index?"#,##"+t+n:n+"#,##"+t}return e.includes("%")?t+"%":void 0}function Ai(e,t,i){return Di(mi(e||"#,##0").map((e=>"NUMBER"===e.type?[{...e,format:{...e.format,magnitude:t,decimalPart:void 0}},{type:"STRING",format:i}]:e)).flat())}function Mi(e,t){const i=mi(e).map((e=>"NUMBER"===e.type?{...e,format:Oi(e.format,t)}:e)),o=Di(i);return pi[o]=i,o}function Oi(e,t){var i;const o={...e},n=Math.sign(t),s=(null===(i=o.decimalPart)||void 0===i?void 0:i.length)||0,r=Math.min(Math.max(0,s+n),li);return o.decimalPart="0".repeat(r),""===o.decimalPart&&delete o.decimalPart,o}const Ni=/,*?$/;function _i(e){var t;if(function(e){return Boolean(e.replace(Fi,""))}(e=e.trim()))throw new Error(`Invalid number format: ${e}`);const i=e.includes("%"),o=(null===(t=e.match(Ni))||void 0===t?void 0:t[0])||"",n=o?1e3**o.length:1;let s=e.slice(0,e.length-(o.length||0));const r=s.includes(",");if(s.match(/\..*,/))throw new Error("A format can't contain ',' symbol in the decimal part");s=s.replace("%","").replace(",","");const a=s.match(/[\%|,]/);if(a)throw new Error(`A format can only contain a single '${a[0]}' symbol`);const[l,c]=s.split(".");if(c&&c.length>20)throw new Error("A format can't contain more than 20 decimal places");return void 0!==c?{integerPart:l,isPercent:i,thousandsSeparator:r,decimalPart:c,magnitude:n}:{integerPart:l,isPercent:i,thousandsSeparator:r,magnitude:n}}const Fi=/[,#0.%]/g;function Di(e){let t="";for(let i of e){let e;switch(i.type){case"NUMBER":const t=i.format;e=t.integerPart,t.thousandsSeparator&&(e=e.slice(0,-3)+","+e.slice(-3)),void 0!==t.decimalPart&&(e+="."+t.decimalPart),t.isPercent&&(e+="%"),t.magnitude&&(e+=",".repeat(Math.log10(t.magnitude)/3));break;case"STRING":e=`[$${i.format}]`;break;case"DATE":e=i.format}t+=e}return t}class ki{constructor(e,t){this.getSheetSize=t,this.prefixSheet=!1,this._zone=e.zone,this.parts=e.parts,this.prefixSheet=e.prefixSheet,this.invalidXc=e.invalidXc,this.sheetId=e.sheetId,this.invalidSheetName=e.invalidSheetName}static fromRange(e,t){return e instanceof ki?e:new ki(e,t.getSheetSize)}get unboundedZone(){return this._zone}get zone(){const{left:e,top:t,bottom:i,right:o}=this._zone;if(void 0!==o&&void 0!==i)return this._zone;if(void 0===i&&void 0!==o)return{right:o,top:t,left:e,bottom:this.getSheetSize(this.sheetId).numberOfRows-1};if(void 0===o&&void 0!==i)return{bottom:i,left:e,top:t,right:this.getSheetSize(this.sheetId).numberOfCols-1};throw new Error(s("Bad zone format"))}static getRangeParts(e,t){const i=e.split(":").map((e=>{const t=Vt(e);return{colFixed:!t&&e.startsWith("$"),rowFixed:t?e.startsWith("$"):e.includes("$",1)}})),o=void 0===t.bottom,n=void 0===t.right;return o&&(i[0].rowFixed=i[0].rowFixed||i[1].rowFixed,i[1].rowFixed=i[0].rowFixed||i[1].rowFixed),n&&(i[0].colFixed=i[0].colFixed||i[1].colFixed,i[1].colFixed=i[0].colFixed||i[1].colFixed),i}get isFullCol(){return void 0===this._zone.bottom}get isFullRow(){return void 0===this._zone.right}get rangeData(){return{_zone:this._zone,_sheetId:this.sheetId}}orderZone(){var e,t,i,o,n,s,r,a;const l={...this._zone};let c=this.parts;if(void 0!==l.right&&l.right<l.left){let n=l.right;l.right=l.left,l.left=n,c=[{colFixed:(null===(e=c[1])||void 0===e?void 0:e.colFixed)||!1,rowFixed:(null===(t=c[0])||void 0===t?void 0:t.rowFixed)||!1},{colFixed:(null===(i=c[0])||void 0===i?void 0:i.colFixed)||!1,rowFixed:(null===(o=c[1])||void 0===o?void 0:o.rowFixed)||!1}]}if(void 0!==l.bottom&&l.bottom<l.top){let e=l.bottom;l.bottom=l.top,l.top=e,c=[{colFixed:(null===(n=c[0])||void 0===n?void 0:n.colFixed)||!1,rowFixed:(null===(s=c[1])||void 0===s?void 0:s.rowFixed)||!1},{colFixed:(null===(r=c[1])||void 0===r?void 0:r.colFixed)||!1,rowFixed:(null===(a=c[0])||void 0===a?void 0:a.rowFixed)||!1}]}return this.clone({zone:l,parts:c})}clone(e){return new ki({zone:(null==e?void 0:e.zone)?e.zone:{...this._zone},sheetId:(null==e?void 0:e.sheetId)?e.sheetId:this.sheetId,invalidSheetName:e&&"invalidSheetName"in e?e.invalidSheetName:this.invalidSheetName,invalidXc:e&&"invalidXc"in e?e.invalidXc:this.invalidXc,parts:(null==e?void 0:e.parts)?e.parts:this.parts.map((e=>({rowFixed:e.rowFixed,colFixed:e.colFixed}))),prefixSheet:(null==e?void 0:e.prefixSheet)?e.prefixSheet:this.prefixSheet},this.getSheetSize)}}function Li(e,t,i){const o=i.sheetId===e?t:i.sheetId;return i.clone({sheetId:o})}function Pi(e,t,i){return i?e.getRangeFromSheetXC(t,i):void 0}function Ui(e,t,i){const o=[];return t.forEach((t=>{const n=function(e,t){e=e.toLocaleLowerCase();let i=0,o=0,n=(t=t.toLocaleLowerCase()).length,s=0;for(let r=0;r<n;r++)t[r]===e[s]?(s++,o+=100+o-r/200):o=0,i+=o;return s===e.length?i:0}(e,i(t));n>0&&o.push({score:n,elem:t})})),o.sort(((e,t)=>t.score-e.score)),o.map((e=>e.elem))}function Vi(e){const t=[];for(let i=0;i<e;i++){const e={cells:{}};t.push(e)}return t}class zi{constructor(){this.isFastIdStrategy=!1,this.fastIdStart=0}setIsFastStrategy(e){this.isFastIdStrategy=e}uuidv4(){return this.isFastIdStrategy?(this.fastIdStart++,String(this.fastIdStart)):window.crypto&&window.crypto.getRandomValues?([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))):"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}}function Bi(e){const t=function(e){const t=(e=e.split("!").pop()).replace(/\$/g,"").split(":").map((e=>e.trim()));let i,o,n,s,r=!1,a=!1,l=!1;const c=t[0],h=t[1]&&t[1];if(Ut(c))n=s=Gt(c),i=o=0,r=!0;else if(Vt(c))i=o=parseInt(c,10)-1,n=s=0,a=!0;else{const e=qt(c);n=s=e.col,i=o=e.row,l=!0}if(2===t.length)if(Ut(h))s=Gt(h),r=!0;else if(Vt(h))o=parseInt(h,10)-1,a=!0;else{const e=qt(h);s=e.col,o=e.row,i=r?o:i,n=a?s:n,l=!0}if(r&&a)throw new Error("Wrong zone xc. The zone cannot be at the same time a full column and a full row");const d={top:i,left:n,bottom:r?void 0:o,right:a?void 0:s};return l=l&&(a||r),l&&(d.hasHeader=l),d}(e);if(void 0!==t.right&&t.right<t.left){const e=t.left;t.left=t.right,t.right=e}if(void 0!==t.bottom&&t.bottom<t.top){const e=t.top;t.top=t.bottom,t.bottom=e}return t}function Hi(e){const t=Bi(e);if(void 0===t.bottom||void 0===t.right)throw new Error("This does not support unbounded ranges");return t}function $i(e){const{bottom:t,top:i,left:o,right:n}=e;return!(void 0!==t&&isNaN(t)||isNaN(i)||isNaN(o)||void 0!==n&&isNaN(n))&&((void 0===e.bottom||e.bottom>=e.top&&e.bottom>=0)&&(void 0===e.right||e.right>=e.left&&e.right>=0)&&e.top>=0&&e.left>=0)}function Wi(e){const{top:t,bottom:i,left:o,right:n}=e,r="hasHeader"in e&&e.hasHeader,a=t===i&&o===n;if(void 0===i&&void 0!==n)return 0!==t||r?`${Zt(o,t)}:${Wt(n)}`:`${Wt(o)}:${Wt(n)}`;if(void 0===n&&void 0!==i)return 0!==o||r?`${Zt(o,t)}:${i+1}`:`${t+1}:${i+1}`;if(void 0!==i&&void 0!==n)return a?Zt(o,t):`${Zt(o,t)}:${Zt(n,i)}`;throw new Error(s("Bad zone format"))}function Gi(e,t,i,o,n){const s="left"===t?"columns":"rows",r="before"===o?i-1:i,a=e["left"===t?"right":"bottom"];return e[t]<=r&&a&&a>r?ro(e,s,"RESIZE",n):r<e[t]?ro(e,s,"MOVE",n):{...e}}function qi(e,t,i,o,n){const s="left"===t?"columns":"rows",r="before"===o?i-1:i,a="left"===t?"right":"bottom";return e[t]<=r&&e[a]>r?ro(e,s,"RESIZE",n):r<e[t]?ro(e,s,"MOVE",n):{...e}}function Zi(e,t,i){const o="left"===t?"right":"bottom";let n=e[t],s=e[o];for(let r of i.sort(((e,t)=>t-e)))e[t]>r&&(n--,s--),e[t]<r&&e[o]>=r&&s--;return{...e,[t]:n,[o]:s}}function ji(e,t,i){const o="left"===t?"right":"bottom";let n=e[t],s=e[o];const r=e[o];for(let o of i.sort(((e,t)=>t-e)))e[t]>o&&(n--,void 0!==s&&s--),void 0!==r&&void 0!==s&&e[t]<=o&&r>=o&&s--;if(!(void 0!==s&&n>s))return{...e,[t]:n,[o]:s}}function Yi(...e){return{top:Math.min(...e.map((e=>e.top))),left:Math.min(...e.map((e=>e.left))),bottom:Math.max(...e.map((e=>e.bottom))),right:Math.max(...e.map((e=>e.right)))}}function Xi(e,t){if(Qi(e,t))return{top:Math.max(e.top,t.top),left:Math.max(e.left,t.left),bottom:Math.min(e.bottom,t.bottom),right:Math.min(e.right,t.right)}}function Ki(e,t){return e.left===t.left&&e.right===t.right&&e.top===t.top&&e.bottom===t.bottom}function Qi(e,t){return!(e.bottom<t.top||t.bottom<e.top)&&!(e.right<t.left||t.right<e.left)}function Ji(e,t,i){const{left:o,right:n,top:s,bottom:r}=i;return e>=o&&e<=n&&t>=s&&t<=r}function eo(e,t){return Ki(Yi(t,e),t)}function to(e,t){const i=e.map(Bi),o=t.map(Hi),n=Math.max(...i.concat(o).map((e=>e.bottom||0))),s=Math.max(...i.concat(o).map((e=>e.right||0))),r=i.map((e=>({...e,bottom:void 0===e.bottom?n+1:e.bottom,right:void 0===e.right?s+1:e.right}))),a=o.map((e=>({...e,bottom:void 0===e.bottom?n+1:e.bottom,right:void 0===e.right?s+1:e.right}))),l=function(e,t){const i=new Set(t.map((({col:e,row:t})=>`${e}-${t}`)));return e.filter((({col:e,row:t})=>!i.has(`${e}-${t}`)))}(r.map(so).flat(),a.map(so).flat()),c=function(e){if(0===e.length)return[];const[t,...i]=[...e].sort(((e,t)=>e.row-t.row)).sort(((e,t)=>e.col-t.col)),o=[];let n=co(t);for(const{col:e,row:t}of i)if(!Ji(e,t,n))if(e===n.left&&t===n.bottom+1){const e=n.bottom+1;n={...n,bottom:e}}else o.push(n),n=co({col:e,row:t});return[...o,n]}(l);return function(e){if(0===e.length)return[];if(e.some((e=>e.left!==e.right)))throw new Error("only columns can be merged");const t=[],i=io(e),o=(e,t)=>e.top===t.top&&e.bottom===t.bottom&&e.right+1===t.left;for(;i.length;){const e=i.reduce(((e,t)=>o(e,t)?Yi(e,t):e),i.shift());t.push(e)}return io(t)}(c).map((e=>({...e,bottom:e.bottom===n+1?void 0:e.bottom,right:e.right===s+1?void 0:e.right}))).map(Wi)}function io(e){const t=[...e].sort(((e,t)=>t.right-e.right)).sort(((e,t)=>t.bottom-e.bottom)).sort(((e,t)=>e.top-t.top)).sort(((e,t)=>e.left-t.left)).reverse(),i=[];for(;0!==t.length;){const e=t.shift();t.some((t=>eo(e,t)))||i.push(e)}return i.reverse()}function oo(e){return{numberOfRows:e.bottom-e.top+1,numberOfCols:e.right-e.left+1}}function no(e){const{numberOfCols:t,numberOfRows:i}=oo(e);return 1===t||1===i}function so(e){const t=[],[i,o]=[e.right,e.left].sort(((e,t)=>e-t)),[n,s]=[e.top,e.bottom].sort(((e,t)=>e-t));for(const e of $e(i,o+1))for(const i of $e(n,s+1))t.push({col:e,row:i});return t}function ro(e,t,i,o){const n="both"===t?o[0]:"columns"===t?o:0,s="both"===t?o[1]:"rows"===t?o:0,r="hasHeader"in e&&e.hasHeader;let a;a=!function(e){return void 0===e.bottom}(e)||r?!(ho(e)&&!r)||"columns"!==t:"rows"!==t;const l={...e};return a&&"MOVE"===i&&(l.left+=n,l.top+=s),void 0!==l.right&&(l.right+=n),void 0!==l.bottom&&(l.bottom+=s),l}function ao(e,t){let i,o;const{left:n,right:s,top:r,bottom:a}=e,{left:l,right:c,top:h,bottom:d}=t;return i=l!=n?l:c!=s?c:l,o=h!=r?h:d!=a?d:h,{col:i,row:o}}function lo(e){return{top:Math.min(e.top,e.bottom),bottom:Math.max(e.top,e.bottom),left:Math.min(e.left,e.right),right:Math.max(e.left,e.right)}}function co(e){return{left:e.col,right:e.col,top:e.row,bottom:e.row}}function ho(e){return void 0===e.right}function uo(e){return(e.bottom-e.top+1)*(e.right-e.left+1)}function go(...e){return e.length<2||1===to(e.map(Wi),[]).length}class po extends t.Component{constructor(){super(...arguments),this.canvas=t.useRef("graphContainer")}get background(){return this.chartRuntime.background}get canvasStyle(){return`background-color: ${this.background}`}get chartRuntime(){const e=this.env.model.getters.getChartRuntime(this.props.figure.id);if(!("chartJsConfig"in e))throw new Error("Unsupported chart runtime");return e}setup(){t.onMounted((()=>{const e=this.chartRuntime;this.createChart(e.chartJsConfig)}));let e=this.chartRuntime;t.onPatched((()=>{const t=this.chartRuntime;ht(e,t)||(this.updateChartJs(t),e=t)}))}createChart(e){const t=this.canvas.el.getContext("2d");this.chart=new window.Chart(t,e)}updateChartJs(e){var t,i,o,n,s;const r=e.chartJsConfig;r.data&&r.data.datasets?(this.chart.data=r.data,(null===(t=r.options)||void 0===t?void 0:t.title)&&(this.chart.config.options.title=r.options.title),r.options&&"valueLabel"in r.options&&(null===(i=r.options)||void 0===i?void 0:i.valueLabel)&&(this.chart.config.options.valueLabel=r.options.valueLabel)):this.chart.data.datasets=void 0,this.chart.config.options.tooltips=null===(o=r.options)||void 0===o?void 0:o.tooltips,this.chart.config.options.legend=null===(n=r.options)||void 0===n?void 0:n.legend,this.chart.config.options.scales=null===(s=r.options)||void 0===s?void 0:s.scales,this.chart.update({duration:0})}}po.template="o-spreadsheet-ChartJsComponent",po.props={figure:Object};const mo={};let fo=0;function vo(e,...t){const i="__sheet__"+fo++;return function(e,t){const i=document.createElement("style");i.textContent=function(e){const t=e.split(/(\{|\}|;)/).map((e=>e.trim())),i=[],o=[];let n=[];function s(e,t){const o=[];for(const n of i[e]){let r=t&&t+" "+n||n;r.includes("&")&&(r=n.replace(/&/g,t||"")),e<i.length-1&&(r=s(e+1,r)),o.push(r)}return o.join(", ")}function r(){n.length&&(o.push(s(0)+" {"),o.push(...n),o.push("}"),n=[])}for(;t.length;){let e=t.shift();"}"===e?(r(),i.pop()):("{"===t[0]&&(r(),i.push(e.split(/\s*,\s*/)),t.shift()),";"===t[0]&&n.push(" "+e+";"))}return o.join("\n")}(t),mo[e]=i}(i,String.raw(e,...t)),function(e){const t=mo[e];t.setAttribute("component",e),document.head.appendChild(t)}(i),i}function bo({strikethrough:e,underline:t}){return e||t?`${e?"line-through":""} ${t?"underline":""}`:"none"}function Co(e){const t=So(e);return e?(e.fillColor&&(t.background=e.fillColor),t):t}function So(e){const t={};if(!e)return t;if(e.bold&&(t["font-weight"]="bold"),e.italic&&(t["font-style"]="italic"),e.strikethrough||e.underline){let i=e.strikethrough?"line-through":"";i=e.underline?i+" underline":i,t["text-decoration"]=i}return e.textColor&&(t.color=e.textColor),t}function Eo(e){return Object.entries(e).filter((([e,t])=>void 0!==t)).map((([e,t])=>`${e}:${t};`)).join(" ")}const wo=1.2;vo`
|
|
2
2
|
div.o-scorecard {
|
|
3
3
|
font-family: ${Z};
|
|
4
4
|
user-select: none;
|
|
@@ -2455,4 +2455,4 @@
|
|
|
2455
2455
|
<tableParts count="${e.filterTables.length}">
|
|
2456
2456
|
${rv(a)}
|
|
2457
2457
|
</tableParts>
|
|
2458
|
-
`}var SS;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(SS||(SS={}));const ES={},wS={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:N,HEADER_WIDTH:_,TOPBAR_HEIGHT:63,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:F,DEFAULT_CELL_HEIGHT:D,SCROLLBAR_WIDTH:k},yS={autofillModifiersRegistry:An,autofillRulesRegistry:Mn,cellMenuRegistry:ga,colMenuRegistry:pa,linkMenuRegistry:cs,functionRegistry:ig,featurePluginRegistry:Yb,statefulUIPluginRegistry:Xb,coreViewsPluginRegistry:Kb,corePluginRegistry:jb,rowMenuRegistry:ma,sidePanelRegistry:kg,figureRegistry:Sr,chartSidePanelComponentRegistry:Rg,chartComponentRegistry:mr,chartRegistry:pr,topbarMenuRegistry:ng,topbarComponentRegistry:Lg,clickableCellRegistry:Qb,otRegistry:rg,inverseCommandRegistry:xr,urlRegistry:Ao,cellPopoverRegistry:us},xS={arg:ba,toBoolean:Wo,toJsDate:Go,toNumber:Uo,toString:zo,toXC:Zt,toZone:Hi,toCartesian:qt,numberToLetters:Wt,UuidGenerator:zi,formatValue:fi,computeTextWidth:Ue,createEmptyWorkbookData:_v,createEmptySheet:Nv,createEmptyExcelSheet:Fv,getDefaultChartJsRuntime:Hs,chartFontColor:Rs,ChartColors:Is,EvaluationError:c,CellErrorLevel:l,getFillingMode:qs,rgbaToHex:Tt,colorToRGBA:At,positionToZone:co,isDefined:ot,lazy:at},IS={isMarkdownLink:Ye,parseMarkdownLink:Qe,markdownLink:Ke,openLink:Fo,urlRepresentation:_o},RS={ChartPanel:Tg,ChartFigure:vr,ChartJsComponent:po,Grid:wp,GridOverlay:rp,ScorecardChart:yo,LineConfigPanel:wg,LineBarPieDesignPanel:bg,BarConfigPanel:ug,LineBarPieConfigPanel:dg,GaugeChartConfigPanel:Sg,GaugeChartDesignPanel:Eg,ScorecardChartConfigPanel:xg,ScorecardChartDesignPanel:Ig,FigureComponent:Pg};e.AbstractChart=ps,e.CorePlugin=kv,e.DATETIME_FORMAT=X,e.DispatchResult=fn,e.EvaluationError=c,e.Model=class extends Cb{constructor(e={},i={},o=[],n=new zi,s=!0){super(),this.corePlugins=[],this.featurePlugins=[],this.statefulUIPlugins=[],this.coreViewsPlugins=[],this.isReplayingCommand=!1,this.renderers=[],this.status=0,this.handlers=[],this.coreHandlers=[],this.dispatch=(e,t)=>{const i={...t,type:e};let o=this.status;if(this.getters.isReadonly()&&(n=i,!gn.has(n.type)))return new fn(67);var n;if(!this.session.canApplyOptimisticUpdate())return new fn(64);switch(o){case 0:const t=this.checkDispatchAllowed(i);if(!t.isSuccessful)return t;this.status=1;const{changes:o,commands:n}=this.state.recordChanges((()=>{mn(i)&&this.state.addCommand(i),this.dispatchToHandlers(this.handlers,i),this.finalize()}));this.session.save(n,o),this.status=0,this.trigger("update");break;case 1:if(mn(i)){const e=this.checkDispatchAllowed(i);if(!e.isSuccessful)return e;this.state.addCommand(i)}this.dispatchToHandlers(this.handlers,i);break;case 3:throw new Error("Cannot dispatch commands in the finalize state");case 2:if(mn(i))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,i)}return fn.Success},this.dispatchFromCorePlugin=(e,t)=>{const i={...t,type:e},o=this.status;this.status=2;const n=this.isReplayingCommand?[this.range,...this.corePlugins,...this.coreViewsPlugins]:this.handlers;return this.dispatchToHandlers(n,i),this.status=o,fn.Success},o=Mv(e,o);const r=Tv(e,s);this.state=new FC,this.uuidGenerator=n,this.config=this.setupConfig(i),this.session=this.setupSession(r.revisionId),this.history=new OC(this.dispatchFromCorePlugin,this.session),this.coreGetters={},this.range=new Kv(this.coreGetters),this.coreGetters.getRangeString=this.range.getRangeString.bind(this.range),this.coreGetters.getRangeFromSheetXC=this.range.getRangeFromSheetXC.bind(this.range),this.coreGetters.createAdaptedRanges=this.range.createAdaptedRanges.bind(this.range),this.coreGetters.getRangeDataFromXc=this.range.getRangeDataFromXc.bind(this.range),this.coreGetters.getRangeDataFromZone=this.range.getRangeDataFromZone.bind(this.range),this.coreGetters.getRangeFromRangeData=this.range.getRangeFromRangeData.bind(this.range),this.coreGetters.getSelectionRangeString=this.range.getSelectionRangeString.bind(this.range),this.getters={isReadonly:()=>"readonly"===this.config.mode||"dashboard"===this.config.mode,isDashboard:()=>"dashboard"===this.config.mode,canUndo:this.history.canUndo.bind(this.history),canRedo:this.history.canRedo.bind(this.history),getClient:this.session.getClient.bind(this.session),getConnectedClients:this.session.getConnectedClients.bind(this.session),isFullySynchronized:this.session.isFullySynchronized.bind(this.session)},this.uuidGenerator.setIsFastStrategy(!0),this.selection=new _C(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of jb.getAll())this.setupCorePlugin(e,r);Object.assign(this.getters,this.coreGetters);for(let e of Xb.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t)}for(let e of Kb.getAll()){const t=this.setupUiPlugin(e);this.coreViewsPlugins.push(t),this.handlers.push(t),this.coreHandlers.push(t)}for(let e of Yb.getAll()){const t=this.setupUiPlugin(e);this.featurePlugins.push(t),this.handlers.push(t)}this.uuidGenerator.setIsFastStrategy(!1),this.handlers.push(this.history),this.dispatch("START"),this.selection.observe(this,{handleEvent:()=>this.trigger("update")}),this.setupSessionEvents(),this.session.loadInitialMessages(o),this.joinSession(),i.snapshotRequested&&(this.session.snapshot(this.exportData()),this.garbageCollectExternalResources()),t.markRaw(this)}joinSession(){this.session.join(this.config.client)}leaveSession(){this.session.leave()}setupUiPlugin(e){const t=new e(this.uiPluginConfig);for(let i of e.getters){if(!(i in t))throw new Error(`Invalid getter name: ${i} for plugin ${t.constructor}`);if(i in this.getters)throw new Error(`Getter "${i}" is already defined.`);this.getters[i]=t[i].bind(t)}const i=e.layers.map((e=>[t,e]));return this.renderers.push(...i),this.renderers.sort(((e,t)=>e[1]-t[1])),t}setupCorePlugin(e,t){const i=new e(this.corePluginConfig);for(let t of e.getters){if(!(t in i))throw new Error(`Invalid getter name: ${t} for plugin ${i.constructor}`);if(t in this.coreGetters)throw new Error(`Getter "${t}" is already defined.`);this.coreGetters[t]=i[t].bind(i)}i.import(t),this.corePlugins.push(i),this.coreHandlers.push(i),this.handlers.push(i)}onRemoteRevisionReceived({commands:e}){for(let t of e){const e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new Ab(AC(e,this.state.recordChanges.bind(this.state),(e=>{this.checkDispatchAllowed(e).isSuccessful&&(this.isReplayingCommand=!0,this.dispatchToHandlers([this.range,...this.corePlugins,...this.coreViewsPlugins],e),this.isReplayingCommand=!1)})),this.config.transportService,e)}setupSessionEvents(){this.session.on("remote-revision-received",this,this.onRemoteRevisionReceived),this.session.on("revision-redone",this,this.finalize),this.session.on("revision-undone",this,this.finalize),this.session.on("unexpected-revision-id",this,(()=>this.trigger("unexpected-revision-id"))),this.session.on("collaborative-event-received",this,(()=>{this.trigger("update")}))}setupConfig(e){const t=e.client||{id:this.uuidGenerator.uuidv4(),name:s("Anonymous").toString()},i=e.transportService||new CC;return{...e,mode:e.mode||"normal",custom:e.custom||{},external:e.external||{},transportService:i,client:t,moveClient:()=>{},snapshotRequested:!1,notifyUI:e=>this.trigger("notify-ui",e),lazyEvaluation:!("lazyEvaluation"in e)||e.lazyEvaluation}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,uuidGenerator:this.uuidGenerator,custom:this.config.custom,external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,lazyEvaluation:this.config.lazyEvaluation}}checkDispatchAllowed(e){const t=this.handlers.map((t=>t.allowDispatch(e)));return t.some((e=>0!==e))?new fn(t.flat()):fn.Success}finalize(){this.status=3;for(const e of this.handlers)e.finalize();this.status=0}dispatchToHandlers(e,t){t=Fe(t);for(const i of e)i.beforeHandle(t);for(const i of e)i.handle(t)}drawGrid(e){for(let[t,i]of this.renderers)e.ctx.save(),t.drawGrid(e,i),e.ctx.restore()}exportData(){let e=_v();for(let t of this.handlers)t instanceof kv&&t.export(e);return e.revisionId=this.session.getRevisionId()||Q,e=Fe(e),e}updateMode(e){"normal"!==e&&this.dispatch("STOP_EDITION",{cancel:!0}),this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={..._v(),sheets:[Fv(Rv,"Sheet1")]};for(let t of this.handlers)t instanceof Dv&&t.exportForExcel(e);return e=Fe(e),bS(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.Registry=Ro,e.Revision=Rb,e.SPREADSHEET_DIMENSIONS=wS,e.Spreadsheet=bC,e.UIPlugin=Jv,e.__info__=ES,e.addFunction=function(e,t){ig.add(e,t)},e.astToFormula=nf,e.compile=vf,e.components=RS,e.convertAstNodes=of,e.coreTypes=pn,e.findCellInNewZone=ao,e.functionCache=ff,e.helpers=xS,e.invalidateEvaluationCommands=dn,e.links=IS,e.load=Tv,e.parse=ef,e.readonlyAllowedCommands=gn,e.registries=yS,e.setTranslationMethod=function(e){i=e},e.tokenize=Fm,Object.defineProperty(e,"__esModule",{value:!0}),ES.version="16.2.
|
|
2458
|
+
`}var SS;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(SS||(SS={}));const ES={},wS={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:N,HEADER_WIDTH:_,TOPBAR_HEIGHT:63,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:F,DEFAULT_CELL_HEIGHT:D,SCROLLBAR_WIDTH:k},yS={autofillModifiersRegistry:An,autofillRulesRegistry:Mn,cellMenuRegistry:ga,colMenuRegistry:pa,linkMenuRegistry:cs,functionRegistry:ig,featurePluginRegistry:Yb,statefulUIPluginRegistry:Xb,coreViewsPluginRegistry:Kb,corePluginRegistry:jb,rowMenuRegistry:ma,sidePanelRegistry:kg,figureRegistry:Sr,chartSidePanelComponentRegistry:Rg,chartComponentRegistry:mr,chartRegistry:pr,topbarMenuRegistry:ng,topbarComponentRegistry:Lg,clickableCellRegistry:Qb,otRegistry:rg,inverseCommandRegistry:xr,urlRegistry:Ao,cellPopoverRegistry:us},xS={arg:ba,toBoolean:Wo,toJsDate:Go,toNumber:Uo,toString:zo,toXC:Zt,toZone:Hi,toCartesian:qt,numberToLetters:Wt,UuidGenerator:zi,formatValue:fi,computeTextWidth:Ue,createEmptyWorkbookData:_v,createEmptySheet:Nv,createEmptyExcelSheet:Fv,getDefaultChartJsRuntime:Hs,chartFontColor:Rs,ChartColors:Is,EvaluationError:c,CellErrorLevel:l,getFillingMode:qs,rgbaToHex:Tt,colorToRGBA:At,positionToZone:co,isDefined:ot,lazy:at},IS={isMarkdownLink:Ye,parseMarkdownLink:Qe,markdownLink:Ke,openLink:Fo,urlRepresentation:_o},RS={ChartPanel:Tg,ChartFigure:vr,ChartJsComponent:po,Grid:wp,GridOverlay:rp,ScorecardChart:yo,LineConfigPanel:wg,LineBarPieDesignPanel:bg,BarConfigPanel:ug,LineBarPieConfigPanel:dg,GaugeChartConfigPanel:Sg,GaugeChartDesignPanel:Eg,ScorecardChartConfigPanel:xg,ScorecardChartDesignPanel:Ig,FigureComponent:Pg};e.AbstractChart=ps,e.CorePlugin=kv,e.DATETIME_FORMAT=X,e.DispatchResult=fn,e.EvaluationError=c,e.Model=class extends Cb{constructor(e={},i={},o=[],n=new zi,s=!0){super(),this.corePlugins=[],this.featurePlugins=[],this.statefulUIPlugins=[],this.coreViewsPlugins=[],this.isReplayingCommand=!1,this.renderers=[],this.status=0,this.handlers=[],this.coreHandlers=[],this.dispatch=(e,t)=>{const i={...t,type:e};let o=this.status;if(this.getters.isReadonly()&&(n=i,!gn.has(n.type)))return new fn(67);var n;if(!this.session.canApplyOptimisticUpdate())return new fn(64);switch(o){case 0:const t=this.checkDispatchAllowed(i);if(!t.isSuccessful)return t;this.status=1;const{changes:o,commands:n}=this.state.recordChanges((()=>{mn(i)&&this.state.addCommand(i),this.dispatchToHandlers(this.handlers,i),this.finalize()}));this.session.save(n,o),this.status=0,this.trigger("update");break;case 1:if(mn(i)){const e=this.checkDispatchAllowed(i);if(!e.isSuccessful)return e;this.state.addCommand(i)}this.dispatchToHandlers(this.handlers,i);break;case 3:throw new Error("Cannot dispatch commands in the finalize state");case 2:if(mn(i))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,i)}return fn.Success},this.dispatchFromCorePlugin=(e,t)=>{const i={...t,type:e},o=this.status;this.status=2;const n=this.isReplayingCommand?[this.range,...this.corePlugins,...this.coreViewsPlugins]:this.handlers;return this.dispatchToHandlers(n,i),this.status=o,fn.Success},o=Mv(e,o);const r=Tv(e,s);this.state=new FC,this.uuidGenerator=n,this.config=this.setupConfig(i),this.session=this.setupSession(r.revisionId),this.history=new OC(this.dispatchFromCorePlugin,this.session),this.coreGetters={},this.range=new Kv(this.coreGetters),this.coreGetters.getRangeString=this.range.getRangeString.bind(this.range),this.coreGetters.getRangeFromSheetXC=this.range.getRangeFromSheetXC.bind(this.range),this.coreGetters.createAdaptedRanges=this.range.createAdaptedRanges.bind(this.range),this.coreGetters.getRangeDataFromXc=this.range.getRangeDataFromXc.bind(this.range),this.coreGetters.getRangeDataFromZone=this.range.getRangeDataFromZone.bind(this.range),this.coreGetters.getRangeFromRangeData=this.range.getRangeFromRangeData.bind(this.range),this.coreGetters.getSelectionRangeString=this.range.getSelectionRangeString.bind(this.range),this.getters={isReadonly:()=>"readonly"===this.config.mode||"dashboard"===this.config.mode,isDashboard:()=>"dashboard"===this.config.mode,canUndo:this.history.canUndo.bind(this.history),canRedo:this.history.canRedo.bind(this.history),getClient:this.session.getClient.bind(this.session),getConnectedClients:this.session.getConnectedClients.bind(this.session),isFullySynchronized:this.session.isFullySynchronized.bind(this.session)},this.uuidGenerator.setIsFastStrategy(!0),this.selection=new _C(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of jb.getAll())this.setupCorePlugin(e,r);Object.assign(this.getters,this.coreGetters);for(let e of Xb.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t)}for(let e of Kb.getAll()){const t=this.setupUiPlugin(e);this.coreViewsPlugins.push(t),this.handlers.push(t),this.coreHandlers.push(t)}for(let e of Yb.getAll()){const t=this.setupUiPlugin(e);this.featurePlugins.push(t),this.handlers.push(t)}this.uuidGenerator.setIsFastStrategy(!1),this.handlers.push(this.history),this.dispatch("START"),this.selection.observe(this,{handleEvent:()=>this.trigger("update")}),this.setupSessionEvents(),this.session.loadInitialMessages(o),this.joinSession(),i.snapshotRequested&&(this.session.snapshot(this.exportData()),this.garbageCollectExternalResources()),t.markRaw(this)}joinSession(){this.session.join(this.config.client)}leaveSession(){this.session.leave()}setupUiPlugin(e){const t=new e(this.uiPluginConfig);for(let i of e.getters){if(!(i in t))throw new Error(`Invalid getter name: ${i} for plugin ${t.constructor}`);if(i in this.getters)throw new Error(`Getter "${i}" is already defined.`);this.getters[i]=t[i].bind(t)}const i=e.layers.map((e=>[t,e]));return this.renderers.push(...i),this.renderers.sort(((e,t)=>e[1]-t[1])),t}setupCorePlugin(e,t){const i=new e(this.corePluginConfig);for(let t of e.getters){if(!(t in i))throw new Error(`Invalid getter name: ${t} for plugin ${i.constructor}`);if(t in this.coreGetters)throw new Error(`Getter "${t}" is already defined.`);this.coreGetters[t]=i[t].bind(i)}i.import(t),this.corePlugins.push(i),this.coreHandlers.push(i),this.handlers.push(i)}onRemoteRevisionReceived({commands:e}){for(let t of e){const e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new Ab(AC(e,this.state.recordChanges.bind(this.state),(e=>{this.checkDispatchAllowed(e).isSuccessful&&(this.isReplayingCommand=!0,this.dispatchToHandlers([this.range,...this.corePlugins,...this.coreViewsPlugins],e),this.isReplayingCommand=!1)})),this.config.transportService,e)}setupSessionEvents(){this.session.on("remote-revision-received",this,this.onRemoteRevisionReceived),this.session.on("revision-redone",this,this.finalize),this.session.on("revision-undone",this,this.finalize),this.session.on("unexpected-revision-id",this,(()=>this.trigger("unexpected-revision-id"))),this.session.on("collaborative-event-received",this,(()=>{this.trigger("update")}))}setupConfig(e){const t=e.client||{id:this.uuidGenerator.uuidv4(),name:s("Anonymous").toString()},i=e.transportService||new CC;return{...e,mode:e.mode||"normal",custom:e.custom||{},external:e.external||{},transportService:i,client:t,moveClient:()=>{},snapshotRequested:!1,notifyUI:e=>this.trigger("notify-ui",e),lazyEvaluation:!("lazyEvaluation"in e)||e.lazyEvaluation}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,uuidGenerator:this.uuidGenerator,custom:this.config.custom,external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,lazyEvaluation:this.config.lazyEvaluation}}checkDispatchAllowed(e){const t=this.handlers.map((t=>t.allowDispatch(e)));return t.some((e=>0!==e))?new fn(t.flat()):fn.Success}finalize(){this.status=3;for(const e of this.handlers)e.finalize();this.status=0}dispatchToHandlers(e,t){t=Fe(t);for(const i of e)i.beforeHandle(t);for(const i of e)i.handle(t)}drawGrid(e){for(let[t,i]of this.renderers)e.ctx.save(),t.drawGrid(e,i),e.ctx.restore()}exportData(){let e=_v();for(let t of this.handlers)t instanceof kv&&t.export(e);return e.revisionId=this.session.getRevisionId()||Q,e=Fe(e),e}updateMode(e){"normal"!==e&&this.dispatch("STOP_EDITION",{cancel:!0}),this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={..._v(),sheets:[Fv(Rv,"Sheet1")]};for(let t of this.handlers)t instanceof Dv&&t.exportForExcel(e);return e=Fe(e),bS(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.Registry=Ro,e.Revision=Rb,e.SPREADSHEET_DIMENSIONS=wS,e.Spreadsheet=bC,e.UIPlugin=Jv,e.__info__=ES,e.addFunction=function(e,t){ig.add(e,t)},e.astToFormula=nf,e.compile=vf,e.components=RS,e.convertAstNodes=of,e.coreTypes=pn,e.findCellInNewZone=ao,e.functionCache=ff,e.helpers=xS,e.invalidateEvaluationCommands=dn,e.links=IS,e.load=Tv,e.parse=ef,e.readonlyAllowedCommands=gn,e.registries=yS,e.setTranslationMethod=function(e){i=e},e.tokenize=Fm,Object.defineProperty(e,"__esModule",{value:!0}),ES.version="16.2.28",ES.date="2024-01-17T10:24:07.951Z",ES.hash="16cee48"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
|
package/dist/o_spreadsheet.xml
CHANGED
|
@@ -3524,7 +3524,7 @@ https://fontawesome.com/license -->
|
|
|
3524
3524
|
</t>
|
|
3525
3525
|
</odoo>
|
|
3526
3526
|
<!--
|
|
3527
|
-
__info__.version = '16.2.
|
|
3528
|
-
__info__.date = '2024-01-
|
|
3529
|
-
__info__.hash = '
|
|
3527
|
+
__info__.version = '16.2.28';
|
|
3528
|
+
__info__.date = '2024-01-17T10:24:31.544Z';
|
|
3529
|
+
__info__.hash = '16cee48';
|
|
3530
3530
|
-->
|