old.martials.no/assets/simplifyTruths-a6a9ae89.js

134 lines
309 KiB
JavaScript
Raw Normal View History

2023-02-22 21:55:47 +00:00
import{b as qe,i as ce,t as de,d as In,e as Pe,c as j,s as rr,F as at,f as h0,g as af,m as gr,h as Ot,o as Nn,u as kn,D as sf,j as ir,k as ff,l as wt,S as nr,n as Rn,p as lf,I as Lr,q as of,v as Gi,P as cf,r as uf,w as hf,L as xf,x as df,y as pf,z as vf,A as mf,B as gf,C as _f,E as Tf,a as Ef,G as wf}from"./layout-30df32e9.js";const Sf=de("<div></div>"),Vi=({children:e,className:t})=>(()=>{const r=Sf.cloneNode(!0);return qe(r,`flex-row-center ${t}`),ce(r,e),r})(),Af=de("<input>"),Ff=de('<label><div class="z-50 relative"></div><div class="w-full h-2 default-bg absolute bottom-1/3 z-10"></div></label>');function yf(e,t){let r=!0;function n(a){r&&t(a)}const i=document.getElementById(e);return i?.addEventListener("pointerenter",()=>n(!0)),i?.addEventListener("pointerleave",()=>n(!1)),()=>{i?.removeEventListener("pointerenter",()=>n(!0)),i?.removeEventListener("pointerleave",()=>n(!1)),r=!1}}function Cf(e,t,r){if(e){const n=document.getElementById(e);n&&n.value!==""!==t&&r(n.value!=="")}}const j0=({className:e,id:t,name:r,type:n="text",title:i,placeholder:a,required:s=!1,onChange:f,leading:o,trailing:l,inputClass:c})=>{const[x,h]=Pe(!1),[d,_]=Pe(!1),[u,m]=Pe(!1);return document.addEventListener("DOMContentLoaded",()=>{t&&i&&yf(t,_)}),j(Vi,{className:`relative ${e}`,get children(){return[o,j(Of,{title:i,get isActive(){return x()||d()||u()},htmlFor:t}),(()=>{const A=Af.cloneNode(!0);return A.$$input=()=>{Cf(t,u(),m),f&&f()},A.addEventListener("blur",()=>h(!1)),A.addEventListener("focus",()=>h(!0)),qe(A,`bg-default-bg focus:border-cyan-500 outline-none border-2 border-gray-500
hover:border-t-cyan-400 ${c}`),rr(A,"id",t),rr(A,"name",r??void 0),rr(A,"type",n),rr(A,"placeholder",a??void 0),A.required=s,A})(),l]}})};function Of({title:e,isActive:t=!1,htmlFor:r}){return(()=>{const n=Ff.cloneNode(!0),i=n.firstChild;return qe(n,`absolute pointer-events-none
${t?"-top-2 left-3 default-bg text-sm":"left-2 top-1"}
transition-all duration-150 text-gray-600 dark:text-gray-400`),rr(n,"for",r),ce(i,e),n})()}In(["input"]);const Df=de("<table><thead><tr></tr></thead><tbody></tbody></table>"),If=de(`<th scope="col" class="bg-default-bg text-center sticky top-0 [position:-webkit-sticky;]
outline outline-2 outline-offset-[-1px] outline-gray-500"><p class="px-2 w-max"></p></th>`),Nf=de('<tr class="hover:text-black"></tr>'),kf=de("<td><p></p></td>"),Rf=({table:e,header:t,className:r,style:n,id:i})=>(()=>{const a=Df.cloneNode(!0),s=a.firstChild,f=s.firstChild,o=s.nextSibling;return qe(a,`border-2 border-gray-500 border-collapse table z-10 ${r}`),rr(a,"id",i),ce(f,j(at,{each:t,children:l=>(()=>{const c=If.cloneNode(!0),x=c.firstChild;return ce(x,l),c})()})),ce(o,j(at,{each:e,children:l=>(()=>{const c=Nf.cloneNode(!0);return ce(c,j(at,{each:l,children:x=>(()=>{const h=kf.cloneNode(!0),d=h.firstChild;return qe(h,`text-center border border-gray-500 last:underline
${x?"bg-green-700":"bg-red-700"}`),ce(d,x?"T":"F"),h})()})),c})()})),h0(l=>af(a,n,l)),a})();function Fr(e,t){let r={},n=Object.keys(e);for(let i=0,a=n.length;i<a;i+=1){let s=n[i];t.includes(s)||Object.defineProperty(r,s,{get(){return e[s]},configurable:!0,enumerable:!0})}return r}var Xi=Rn();function Ln(){let e=kn(Xi);if(e)return e;throw new Error("`useHeadlessDisclosureProperties` must be used within `<HeadlessDisclosureRoot>`.")}function Lf(e){return typeof e=="function"&&e.length>0}function Pf(e){let t=Ln();return wt(()=>{let r=e.children;return Lf(r)?r(t):r})}function ct(e){return{get children(){return j(Pf,{get children(){return e.children}})}}}function Mf(e){let t,r;if("defaultOpen"in e){let[n,i]=Pe(e.defaultOpen);t=n,r=a=>{lf(()=>{var s;i(a),(s=e.onChange)==null||s.call(e,a)})}}else t=()=>e.isOpen,r=n=>{var i;return(i=e.onChange)==null?void 0:i.call(e,n)};return{isOpen(){return t()},setState(n){e.disabled||r(n)},disabled(){return!!e.disabled}}}function Bf(e){return typeof e=="function"&&e.length>0}function Pn(e){let t=Mf(e);return j(Xi.Provider,{value:t,get children(){return wt(()=>{let r=e.children;return Bf(r)?r(t):r})}})}function Ir(e,t){return j(sf,gr({get component(){return e()}},t))}function bf(e){return typeof e=="function"}function Mn(e,t){return r=>{"ref"in e&&bf(e.ref)&&e.ref(r),t(r)}}function Bn(e){return{get disabled(){return e()},get"aria-disabled"(){return e()},get"data-sh-disabled"(){return e()}}}function Uf(e){return{get"aria-expanded"(){return e()},get"data-sh-expanded"(){return e()}}}var Wf='a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex]:not([tabindex="-1"]), [contenteditable]';function zi(e,t){let r=e.querySelectorAll(Wf),n=[];for(let i=0,a=r.length;i<a;i+=1)(!t||!t.contains(r[i]))&&n.push(r[i]);return n}function Ki(e){return!e.matches('[data-sh-disabled="true"]')}function Yi(e,t,r){let n=t+r;for(;n>=0&&n<e.length;){if(Ki(e[n]))return e[n];n+=r}}function ji(e,t,r){let n=t+r;for(r===1&&n===e.length&&(n=0),r===-1&&n===-1&&(n=e.length-1);t!==n;){if(Ki(e[n]))return e[n];n+=r,r===1&&n>=e.length&&(n=0),r===-1&&n<0&&(n=e.length-1)}}function Hf(e,t){var r;for(let n=0,i=e.length;n<i;n+=1)if(t===e[n]){(r=ji(e,n,1))==null||r.focus();break}}function $f(e,t){var r;for(let n=0,i=e.length;n<i;n+=1)if(t===e[n]){(r=ji(e,n,-1))==null||r.focus();break}}function Ji(e){var t;return e.length?((t=Yi(e,-1,1))==null||t.focus(),!0):!1}function Gf(e){var t;return e.length?((t=Yi(e,e.length,-1))==null||t.focus(),!0):!1}function Vf(e,t){let r=zi(e);t?!document.activeElement||!e.contains(document.activeElement)?Gf(r):$f(r,document.activeElement):!document.activeElement||!e.contains(document.activeElement)?Ji(r):Hf(r,document.activeElement)}var Xf="data-sh";function Jr(e){return{[Xf]:e}}var zf=Jr("button");function Kf(e){let[t,r]=Pe();return Ot(()=>{let n=t();if(n instanceof HTMLElement&&n.tagName!=="BUTTON"){let i=a=>{(a.key==="Enter"||a.key===" ")&&n.click()};n.addEventListener("keydown",i),Nn(()=>{n.removeEventListener("keydown",i)})}}),Ir(()=>{var n;return(n=e.as)!=null?n:"button"},gr({get tabindex(){return e.disabled?-1:0},role:"button"},Bn(()=>e.disabled),Fr(e,["as","ref"]),zf,{ref:Mn(e,n=>{r(()=>n)})}))}function bn(e,t,r){return j(nr,{get when(){var n;return(n=e.unmount)!=null?n:!0},get fallback(){return r()},get children(){return j(nr,{get when(){return t()},get children(){return r()}})}})}function J0(){var e,t;return(t=(e=window.getSelection())==null?void 0:e.focusNode)==null?void 0:t.parentElement}function Yf(e){if(e){let t=e.getAttribute("tabindex");e.setAttribute("tabindex","-1"),e.focus(),e.blur(),t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}}var jf=class{constructor(){typeof document<"u"&&(this.returnElement=document.activeElement,this.fsp=J0()),Nn(()=>{this.load()})}load(){this.returnElement instanceof HTMLElement?this.returnElement.focus():Yf(this.fsp)}save(){this.returnElement=document.activeElement,this.fsp=J0()}};function qi(){return new jf}fun
flex flex-col gap-1 ${t}`),ce(r,e),r})();function Hr(){}Hr.prototype={diff:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.callback;typeof n=="function"&&(i=n,n={}),this.options=n;var a=this;function s(u){return i?(setTimeout(function(){i(void 0,u)},0),!0):u}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var f=r.length,o=t.length,l=1,c=f+o;n.maxEditLength&&(c=Math.min(c,n.maxEditLength));var x=[{newPos:-1,components:[]}],h=this.extractCommon(x[0],r,t,0);if(x[0].newPos+1>=f&&h+1>=o)return s([{value:this.join(r),count:r.length}]);function d(){for(var u=-1*l;u<=l;u+=2){var m=void 0,A=x[u-1],O=x[u+1],F=(O?O.newPos:0)-u;A&&(x[u-1]=void 0);var M=A&&A.newPos+1<f,K=O&&0<=F&&F<o;if(!M&&!K){x[u]=void 0;continue}if(!M||K&&A.newPos<O.newPos?(m=El(O),a.pushComponent(m.components,void 0,!0)):(m=A,m.newPos++,a.pushComponent(m.components,!0,void 0)),F=a.extractCommon(m,r,t,u),m.newPos+1>=f&&F+1>=o)return s(Tl(a,m.components,r,t,a.useLongestToken));x[u]=m}l++}if(i)(function u(){setTimeout(function(){if(l>c)return i();d()||u()},0)})();else for(;l<=c;){var _=d();if(_)return _}},pushComponent:function(t,r,n){var i=t[t.length-1];i&&i.added===r&&i.removed===n?t[t.length-1]={count:i.count+1,added:r,removed:n}:t.push({count:1,added:r,removed:n})},extractCommon:function(t,r,n,i){for(var a=r.length,s=n.length,f=t.newPos,o=f-i,l=0;f+1<a&&o+1<s&&this.equals(r[f+1],n[o+1]);)f++,o++,l++;return l&&t.components.push({count:l}),t.newPos=f,o},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function Tl(e,t,r,n,i){for(var a=0,s=t.length,f=0,o=0;a<s;a++){var l=t[a];if(l.removed){if(l.value=e.join(n.slice(o,o+l.count)),o+=l.count,a&&t[a-1].added){var x=t[a-1];t[a-1]=t[a],t[a]=x}}else{if(!l.added&&i){var c=r.slice(f,f+l.count);c=c.map(function(d,_){var u=n[o+_];return u.length>d.length?u:d}),l.value=e.join(c)}else l.value=e.join(r.slice(f,f+l.count));f+=l.count,l.added||(o+=l.count)}}var h=t[s-1];return s>1&&typeof h.value=="string"&&(h.added||h.removed)&&e.equals("",h.value)&&(t[s-2].value+=h.value,t.pop()),t}function El(e){return{newPos:e.newPos,components:e.components.slice(0)}}var wl=new Hr;function Sl(e,t,r){return wl.diff(e,t,r)}var q0=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Z0=/\S/,sa=new Hr;sa.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Z0.test(e)&&!Z0.test(t)};sa.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&q0.test(t[r])&&q0.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};var fa=new Hr;fa.tokenize=function(e){var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n<r.length;n++){var i=r[n];n%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};var Al=new Hr;Al.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var Fl=new Hr;Fl.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function dn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dn=function(t){return typeof t}:dn=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dn(e)}var yl=Object.prototype.toString,Vt=new Hr;Vt.useLongestToken=!0;Vt.tokenize=fa.tokenize;Vt.castInput=function(e){var t=this.options,r=t.undefinedReplacement,n=t.stringifyReplacer,i=n===void 0?function(a,s){return typeof s>"u"?r:s}:n;return typeof e=="string"?e:JSON.stringify(s0(e,null,null,i),i," ")};Vt.equals=function(e,t){return Hr.prototype.equals.call(Vt,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function s0(e,t,r,n,i){t=t||[],r=r||
relative inline-flex h-6 w-11 items-center rounded-full my-2 ${n}`,_=`${s()?"translate-x-6":"translate-x-1"}
inline-block h-4 w-4 transform rounded-full bg-white transition-all`;return d!==h._v$&&qe(l,h._v$=d),_!==h._v$2&&qe(x,h._v$2=_),h},{_v$:void 0,_v$2:void 0}),l})()},pn=({className:e,title:t,children:r,id:n,onClick:i,type:a="button"})=>(()=>{const s=Ol.cloneNode(!0);return Gi(s,"click",i,!0),rr(s,"title",t),rr(s,"id",n),rr(s,"type",a),qe(s,`border-rounded bg-cyan-900 px-2 cursor-pointer ${e}`),ce(s,r),s})();In(["click"]);const Il=de('<div><div class="mx-1"></div></div>'),Nl=de("<div></div>"),Q0=({title:e,button:t,children:r,id:n,className:i,buttonClassName:a,itemsClassName:s})=>{const[f,o]=Pe(!1);function l(){o(!1)}function c(){o(!f())}return Ot(()=>{function x(d){d.target instanceof HTMLElement&&d.target.closest(`#${n}`)===null&&l()}function h(d){d.key==="Escape"&&l()}f()?(document.addEventListener("click",x),document.addEventListener("keyup",h)):(document.removeEventListener("click",x),document.removeEventListener("keyup",h))}),(()=>{const x=Nl.cloneNode(!0);return qe(x,`${i}`),rr(x,"id",n),ce(x,j(pn,{title:e,onClick:c,className:`flex-row-center ${a}`,children:t}),null),ce(x,j(nr,{get when(){return f()},keyed:!0,get children(){const h=Il.cloneNode(!0),d=h.firstChild;return qe(h,`absolute bg-default-bg border border-gray-500 rounded-b-xl mt-1 w-max z-50 ${s}`),ce(d,r),h}}),null),x})()},kl=de('<div class="fixed inset-0 bg-black/40"></div>'),Rl=de('<div class="my-3"></div>'),Ll=de('<div class="w-fit h-fit"><button></button></div>');function Pl({title:e,description:t,button:r,acceptButtonName:n="Ok",cancelButtonName:i="Cancel",children:a,callback:s,className:f,buttonClasses:o,buttonTitle:l,acceptButtonId:c}){const[x,h]=Pe(!1);function d(){s&&s(),h(!1)}function _(){let u=!0;function m(A){u&&A.key==="Enter"&&document.getElementById(c??"")?.click()}if(x()){const A="cl-6",O=document.getElementById(A);return O?.addEventListener("keypress",F=>m(F)),()=>{O?.removeEventListener("keypress",F=>m(F)),u=!1}}}return Ot(_,x()),(()=>{const u=Ll.cloneNode(!0),m=u.firstChild;return m.$$click=()=>h(!0),qe(m,o),rr(m,"title",l??void 0),ce(m,r),ce(u,j(cf,{get children(){return j(tl,{get isOpen(){return x()},onClose:()=>h(!1),class:`fixed inset-0 flex-row-center justify-center z-50 overflow-auto text-white ${f}`,get children(){return[(()=>{const A=kl.cloneNode(!0);return rr(A,"aria-hidden",!0),A})(),j(il,{class:"w-fit relative bg-default-bg border-rounded border-gray-500 p-2",get children(){return[j(al,{class:"border-b",children:e}),j(nl,{class:"mb-4 mt-1",children:t}),a,(()=>{const A=Rl.cloneNode(!0);return ce(A,j(pn,{onClick:d,className:"h-10 mr-2",id:c,children:n}),null),ce(A,j(pn,{onClick:()=>h(!1),className:"h-10",children:i}),null),A})()]}})]}})}}),null),u})()}In(["click"]);/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var vn={};vn.version="0.18.5";var la=1252,Ml=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],oa=function(e){Ml.indexOf(e)!=-1&&(la=e)};function Bl(){oa(1252)}var Xt=function(e){oa(e)};function bl(){Xt(1200),Bl()}function Ul(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return t.join("")}var sn=function(t){return String.fromCharCode(t)},ei=function(t){return String.fromCharCode(t)},nt,Xr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function zt(e){for(var t="",r=0,n=0,i=0,a=0,s=0,f=0,o=0,l=0;l<e.length;)r=e.charCodeAt(l++),a=r>>2,n=e.charCodeAt(l++),s=(r&3)<<4|n>>4,i=e.charCodeAt(l++),f=(n&15)<<2|i>>6,o=i&63,isNaN(n)?f=o=64:isNaN(i)&&(o=64),t+=Xr.charAt(a)+Xr.charAt(s)+Xr.charAt(f)+Xr.charAt(o);return t}function Ur(e){var t="",r=0,n=0,i=0,a=0,s=0,f=0,o=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var l=0;l<e.length;)a=Xr.indexOf(e.charAt(l++)),s=Xr.indexOf(e.charAt(l++)),r=a<<2|s>>4,t+=String.fromCharCode(r),f=Xr.indexOf(e.charAt(l++)),n=(s&15)<<4|f>>2,f!==64&&(t+=String.fromCharCode(n)),o=Xr.indexOf(e.charAt(l++)),i=(f&3)<<6|o,o!==64&&(t+=String.fromCharCode(i));return t}var me=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),$r=function(
`)+`\r
`}function js(p){var T=p.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(k){var R=k.charCodeAt(0).toString(16).toUpperCase();return"="+(R.length==1?"0"+R:R)});T=T.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),T.charAt(0)==`
`&&(T="=0D"+T.slice(1)),T=T.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
=0A`).replace(/([^\r\n])\n/mg,"$1=0A");for(var v=[],g=T.split(`\r
`),E=0;E<g.length;++E){var w=g[E];if(w.length==0){v.push("");continue}for(var N=0;N<w.length;){var b=76,I=w.slice(N,N+b);I.charAt(b-1)=="="?b--:I.charAt(b-2)=="="?b-=2:I.charAt(b-3)=="="&&(b-=3),I=w.slice(N,N+b),N+=b,N<w.length&&(I+="="),v.push(I)}}return v.join(`\r
`)}function Js(p){for(var T=[],v=0;v<p.length;++v){for(var g=p[v];v<=p.length&&g.charAt(g.length-1)=="=";)g=g.slice(0,g.length-1)+p[++v];T.push(g)}for(var E=0;E<T.length;++E)T[E]=T[E].replace(/[=][0-9A-Fa-f]{2}/g,function(w){return String.fromCharCode(parseInt(w.slice(1),16))});return wr(T.join(`\r
`))}function qs(p,T,v){for(var g="",E="",w="",N,b=0;b<10;++b){var I=T[b];if(!I||I.match(/^\s*$/))break;var k=I.match(/^(.*?):\s*([^\s].*)$/);if(k)switch(k[1].toLowerCase()){case"content-location":g=k[2].trim();break;case"content-type":w=k[2].trim();break;case"content-transfer-encoding":E=k[2].trim();break}}switch(++b,E.toLowerCase()){case"base64":N=wr(Ur(T.slice(b).join("")));break;case"quoted-printable":N=Js(T.slice(b));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+E)}var R=Jn(p,g.slice(v.length),N,{unsafe:!0});w&&(R.ctype=w)}function Zs(p,T){if(Re(p.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var v=T&&T.root||"",g=(me&&Buffer.isBuffer(p)?p.toString("binary"):Re(p)).split(`\r
`),E=0,w="";for(E=0;E<g.length;++E)if(w=g[E],!!/^Content-Location:/i.test(w)&&(w=w.slice(w.indexOf("file")),v||(v=w.slice(0,w.lastIndexOf("/")+1)),w.slice(0,v.length)!=v))for(;v.length>0&&(v=v.slice(0,v.length-1),v=v.slice(0,v.lastIndexOf("/")+1),w.slice(0,v.length)!=v););var N=(g[1]||"").match(/boundary="(.*?)"/);if(!N)throw new Error("MAD cannot find boundary");var b="--"+(N[1]||""),I=[],k=[],R={FileIndex:I,FullPaths:k};D(R);var z,Z=0;for(E=0;E<g.length;++E){var ne=g[E];ne!==b&&ne!==b+"--"||(Z++&&qs(R,g.slice(z,E),v),z=E)}return R}function Qs(p,T){var v=T||{},g=v.boundary||"SheetJS";g="------="+g;for(var E=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+g.slice(2)+'"',"","",""],w=p.FullPaths[0],N=w,b=p.FileIndex[0],I=1;I<p.FullPaths.length;++I)if(N=p.FullPaths[I].slice(w.length),b=p.FileIndex[I],!(!b.size||!b.content||N=="Sh33tJ5")){N=N.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(he){return"_x"+he.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(he){return"_u"+he.charCodeAt(0).toString(16)+"_"});for(var k=b.content,R=me&&Buffer.isBuffer(k)?k.toString("binary"):Re(k),z=0,Z=Math.min(1024,R.length),ne=0,Y=0;Y<=Z;++Y)(ne=R.charCodeAt(Y))>=32&&ne<128&&++z;var te=z>=Z*4/5;E.push(g),E.push("Content-Location: "+(v.root||"file:///C:/SheetJS/")+N),E.push("Content-Transfer-Encoding: "+(te?"quoted-printable":"base64")),E.push("Content-Type: "+Ks(b,N)),E.push(""),E.push(te?js(R):Ys(R))}return E.push(g+`--\r
`),E.join(`\r
`)}function ef(p){var T={};return D(T,p),T}function Jn(p,T,v,g){var E=g&&g.unsafe;E||D(p);var w=!E&&Se.find(p,T);if(!w){var N=p.FullPaths[0];T.slice(0,N.length)==N?N=T:(N.slice(-1)!="/"&&(N+="/"),N=(N+T).replace("//","/")),w={name:i(T),type:2},p.FileIndex.push(w),p.FullPaths.push(N),E||Se.utils.cfb_gc(p)}return w.content=v,w.size=v?v.length:0,g&&(g.CLSID&&(w.clsid=g.CLSID),g.mt&&(w.mt=g.mt),g.ct&&(w.ct=g.ct)),w}function rf(p,T){D(p);var v=Se.find(p,T);if(v){for(var g=0;g<p.FileIndex.length;++g)if(p.FileIndex[g]==v)return p.FileIndex.splice(g,1),p.FullPaths.splice(g,1),!0}return!1}function tf(p,T,v){D(p);var g=Se.find(p,T);if(g){for(var E=0;E<p.FileIndex.length;++E)if(p.FileIndex[E]==g)return p.FileIndex[E].name=i(v),p.FullPaths[E]=v,!0}return!1}function nf(p){L(p,!0)}return t.find=V,t.read=ee,t.parse=c,t.write=dr,t.writeFile=ye,t.utils={cfb_new:ef,cfb_add:Jn,cfb_del:rf,cfb_mov:tf,cfb_gc:nf,ReadShift:Wt,CheckField:Wa,prep_blob:cr,bconcat:Ve,use_zlib:S,_deflateRaw:W0,_inflateRaw:z0,consts:ue},t}();function po(e){return typeof e=="string"?Un(e):Array.isArray(e)?Wl(e):e}function Zt(e,t,r){if(typeof Deno<"u"){if(r&&typeof t=="string")switch(r){case"utf8":t=new TextEncoder(r).encode(t);break;case"binary":t=Un(t);break;default:throw new Error("Unsupported encoding "+r)}return Deno.writeFileSync(e,t)}var n=r=="utf8"?Pr(t):t;if(typeof IE_SaveFile<"u")return IE_SaveFile(n,e);if(typeof Blob<"u"){var i=new Blob([po(n)],{type:"application/octet-stream"});if(typeof navigator<"u"&&navigator.msSaveBlob)return navigator.msSaveBlob(i,e);if(typeof saveAs<"u")return saveAs(i,e);if(typeof URL<"u"&&typeof document<"u"&&document.createElement&&URL.createObjectURL){var a=URL.createObjectURL(i);if(typeof chrome=="object"&&typeof(chrome.downloads||{}).download=="function")return URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(a)},6e4),chrome.downloads.download({url:a,filename:e,saveAs:!0});var s=document.createElement("a");if(s.download!=null)return s.download=e,s.href=a,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(a)},6e4),a}}if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var f=File(e);return f.open("w"),f.encoding="binary",Array.isArray(t)&&(t=qt(t)),f.write(t),f.close(),t}catch(o){if(!o.message||!o.message.match(/onstruct/))throw o}throw new Error("cannot save file "+e)}function Ke(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;++n)Object.prototype.hasOwnProperty.call(e,t[n])&&r.push(t[n]);return r}function oi(e,t){for(var r=[],n=Ke(e),i=0;i!==n.length;++i)r[e[n[i]][t]]==null&&(r[e[n[i]][t]]=n[i]);return r}function _0(e){for(var t=[],r=Ke(e),n=0;n!==r.length;++n)t[e[r[n]]]=r[n];return t}function $n(e){for(var t=[],r=Ke(e),n=0;n!==r.length;++n)t[e[r[n]]]=parseInt(r[n],10);return t}function vo(e){for(var t=[],r=Ke(e),n=0;n!==r.length;++n)t[e[r[n]]]==null&&(t[e[r[n]]]=[]),t[e[r[n]]].push(r[n]);return t}var Tn=new Date(1899,11,30,0,0,0);function sr(e,t){var r=e.getTime();t&&(r-=1462*24*60*60*1e3);var n=Tn.getTime()+(e.getTimezoneOffset()-Tn.getTimezoneOffset())*6e4;return(r-n)/(24*60*60*1e3)}var Sa=new Date,mo=Tn.getTime()+(Sa.getTimezoneOffset()-Tn.getTimezoneOffset())*6e4,ci=Sa.getTimezoneOffset();function Aa(e){var t=new Date;return t.setTime(e*24*60*60*1e3+mo),t.getTimezoneOffset()!==ci&&t.setTime(t.getTime()+(t.getTimezoneOffset()-ci)*6e4),t}var ui=new Date("2017-02-19T19:06:09.000Z"),Fa=isNaN(ui.getFullYear())?new Date("2/19/17"):ui,go=Fa.getFullYear()==2017;function tr(e,t){var r=new Date(e);if(go)return t>0?r.setTime(r.getTime()+r.getTimezoneOffset()*60*1e3):t<0&&r.setTime(r.getTime()-r.getTimezoneOffset()*60*1e3),r;if(e instanceof Date)return e;if(Fa.getFullYear()==1917&&!isNaN(r.getFullYear())){var n=r.getFullYear();return e.indexOf(""+n)>-1||r.setFullYear(r.getFullYear()+100),r}var i=e.match(/\d+/g)||["2017","2","19","0","0","0"],a=new Date(+i[0],+i[1]-1,+i[2],+i[3]||0,+i[4]||0,+i[5]||0);return e.indexOf("Z")>-1&&(a=new Date(a.getTime()-a.getTimezoneOffset()*60*1e3)),a}function Gn(
`,To={"&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<","&amp;":"&"},E0=_0(To),w0=/[&<>'"]/g,Eo=/[\u0000-\u0008\u000b-\u001f]/g;function Ee(e){var t=e+"";return t.replace(w0,function(r){return E0[r]}).replace(Eo,function(r){return"_x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+"_"})}function hi(e){return Ee(e).replace(/ /g,"_x0020_")}var ya=/[\u0000-\u001f]/g;function wo(e){var t=e+"";return t.replace(w0,function(r){return E0[r]}).replace(/\n/g,"<br/>").replace(ya,function(r){return"&#x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+";"})}function So(e){var t=e+"";return t.replace(w0,function(r){return E0[r]}).replace(ya,function(r){return"&#x"+r.charCodeAt(0).toString(16).toUpperCase()+";"})}function Ao(e){return e.replace(/(\r\n|[\r\n])/g,"&#10;")}function Fo(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function Qn(e){for(var t="",r=0,n=0,i=0,a=0,s=0,f=0;r<e.length;){if(n=e.charCodeAt(r++),n<128){t+=String.fromCharCode(n);continue}if(i=e.charCodeAt(r++),n>191&&n<224){s=(n&31)<<6,s|=i&63,t+=String.fromCharCode(s);continue}if(a=e.charCodeAt(r++),n<240){t+=String.fromCharCode((n&15)<<12|(i&63)<<6|a&63);continue}s=e.charCodeAt(r++),f=((n&7)<<18|(i&63)<<12|(a&63)<<6|s&63)-65536,t+=String.fromCharCode(55296+(f>>>10&1023)),t+=String.fromCharCode(56320+(f&1023))}return t}function xi(e){var t=ft(2*e.length),r,n,i=1,a=0,s=0,f;for(n=0;n<e.length;n+=i)i=1,(f=e.charCodeAt(n))<128?r=f:f<224?(r=(f&31)*64+(e.charCodeAt(n+1)&63),i=2):f<240?(r=(f&15)*4096+(e.charCodeAt(n+1)&63)*64+(e.charCodeAt(n+2)&63),i=3):(i=4,r=(f&7)*262144+(e.charCodeAt(n+1)&63)*4096+(e.charCodeAt(n+2)&63)*64+(e.charCodeAt(n+3)&63),r-=65536,s=55296+(r>>>10&1023),r=56320+(r&1023)),s!==0&&(t[a++]=s&255,t[a++]=s>>>8,s=0),t[a++]=r%256,t[a++]=r>>>8;return t.slice(0,a).toString("ucs2")}function di(e){return $r(e,"binary").toString("utf8")}var on="foo bar baz☃🍣",Ut=me&&(di(on)==Qn(on)&&di||xi(on)==Qn(on)&&xi)||Qn,Pr=me?function(e){return $r(e,"utf8").toString("binary")}:function(e){for(var t=[],r=0,n=0,i=0;r<e.length;)switch(n=e.charCodeAt(r++),!0){case n<128:t.push(String.fromCharCode(n));break;case n<2048:t.push(String.fromCharCode(192+(n>>6))),t.push(String.fromCharCode(128+(n&63)));break;case(n>=55296&&n<57344):n-=55296,i=e.charCodeAt(r++)-56320+(n<<10),t.push(String.fromCharCode(240+(i>>18&7))),t.push(String.fromCharCode(144+(i>>12&63))),t.push(String.fromCharCode(128+(i>>6&63))),t.push(String.fromCharCode(128+(i&63)));break;default:t.push(String.fromCharCode(224+(n>>12))),t.push(String.fromCharCode(128+(n>>6&63))),t.push(String.fromCharCode(128+(n&63)))}return t.join("")},yo=function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(t){return[new RegExp("&"+t[0]+";","ig"),t[1]]});return function(r){for(var n=r.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,`
`).replace(/<[^>]*>/g,""),i=0;i<e.length;++i)n=n.replace(e[i][0],e[i][1]);return n}}(),Ca=/(^\s|\s$|\n)/;function Xe(e,t){return"<"+e+(t.match(Ca)?' xml:space="preserve"':"")+">"+t+"</"+e+">"}function Yt(e){return Ke(e).map(function(t){return" "+t+'="'+e[t]+'"'}).join("")}function J(e,t,r){return"<"+e+(r!=null?Yt(r):"")+(t!=null?(t.match(Ca)?' xml:space="preserve"':"")+">"+t+"</"+e:"/")+">"}function o0(e,t){try{return e.toISOString().replace(/\.\d*/,"")}catch(r){if(t)throw r}return""}function Co(e,t){switch(typeof e){case"string":var r=J("vt:lpwstr",Ee(e));return t&&(r=r.replace(/&quot;/g,"_x0022_")),r;case"number":return J((e|0)==e?"vt:i4":"vt:r8",Ee(String(e)));case"boolean":return J("vt:bool",e?"true":"false")}if(e instanceof Date)return J("vt:filetime",o0(e));throw new Error("Unable to serialize "+e)}var Ue={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},Dt=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],ur={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"};function Oo(e,t){for(var r=1-2*(e[t+7]>>>7),n=((e[t+7]&127)<<4)+(e[t+6]>>>4&15),i=e[t+6]&15,a=5;a>=0;--a)i=i*256+e[t+a];return n==2047?i==0?r*(1/0):NaN:(n==0?n=-1022:(n-=1023,i+=Math.pow(2,52)),r*Math.pow(2,n-52)*i)}function Do(e,t,r){var n=(t<0||1/t==-1/0?1:0)<<7,i=0,a=0,s=n?-t:t;isFinite(s)?s==0?i=a=0:(i=Math.floor(Math.log(s)/Math.LN2),a=s*Math.pow(2,52-i),i<=-1023&&(!isFinite(a)||a<Math.pow(2,52))?i=-1022:(a-=Math.pow(2,52),i+=1023)):(i=2047,a=isNaN(t)?26985:0);for(var f=0;f<=5;++f,a/=256)e[r+f]=a&255;e[r+6]=(i&15)<<4|a&15,e[r+7]=i>>4|n}var pi=function(e){for(var t=[],r=10240,n=0;n<e[0].length;++n)if(e[0][n])for(var i=0,a=e[0][n].length;i<a;i+=r)t.push.apply(t,e[0][n].slice(i,i+r));return t},vi=me?function(e){return e[0].length>0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(t){return Buffer.isBuffer(t)?t:$r(t)})):pi(e)}:pi,mi=function(e,t,r){for(var n=[],i=t;i<r;i+=2)n.push(String.fromCharCode(Bt(e,i)));return n.join("").replace(bt,"")},S0=me?function(e,t,r){return Buffer.isBuffer(e)?e.toString("utf16le",t,r).replace(bt,""):mi(e,t,r)}:mi,gi=function(e,t,r){for(var n=[],i=t;i<t+r;++i)n.push(("0"+e[i].toString(16)).slice(-2));return n.join("")},Oa=me?function(e,t,r){return Buffer.isBuffer(e)?e.toString("hex",t,t+r):gi(e,t,r)}:gi,_i=function(e,t,r){for(var n=[],i=t;i<r;i++)n.push(String.fromCharCode(Tt(e,i)));return n.join("")},Qt=me?function(t,r,n){return Buffer.isBuffer(t)?t.toString("utf8",r,n):_i(t,r,n)}:_i,Da=function(e,t){var r=hr(e,t);return r>0?Qt(e,t+4,t+4+r-1):""},Ia=Da,Na=function(e,t){var r=hr(e,t);return r>0?Qt(e,t+4,t+4+r-1):""},ka=Na,Ra=function(e,t){var r=2*hr(e,t);return r>0?Qt(e,t+4,t+4+r-1):""},La=Ra,Pa=function(t,r){var n=hr(t,r);return n>0?S0(t,r+4,r+4+n):""},Ma=Pa,Ba=function(e,t){var r=hr(e,t);return r>0?Qt(e,t+4,t+4+r):""},ba=Ba,Ua=functio
`),t.push(` <manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/>
`);for(var r=0;r<e.length;++r)t.push(' <manifest:file-entry manifest:full-path="'+e[r][0]+'" manifest:media-type="'+e[r][1]+`"/>
`);return t.push("</manifest:manifest>"),t.join("")}function Ai(e,t,r){return[' <rdf:Description rdf:about="'+e+`">
`,' <rdf:type rdf:resource="http://docs.oasis-open.org/ns/office/1.2/meta/'+(r||"odf")+"#"+t+`"/>
`,` </rdf:Description>
`].join("")}function lc(e,t){return[' <rdf:Description rdf:about="'+e+`">
`,' <ns0:hasPart xmlns:ns0="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#" rdf:resource="'+t+`"/>
`,` </rdf:Description>
`].join("")}function oc(e){var t=[Be];t.push(`<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
`);for(var r=0;r!=e.length;++r)t.push(Ai(e[r][0],e[r][1])),t.push(lc("",e[r][0]));return t.push(Ai("","Document","pkg")),t.push("</rdf:RDF>"),t.join("")}function Ja(){return'<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.2"><office:meta><meta:generator>SheetJS '+vn.version+"</meta:generator></office:meta></office:document-meta>"}var st=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]];function r0(e,t,r,n,i){i[e]!=null||t==null||t===""||(i[e]=t,t=Ee(t),n[n.length]=r?J(e,t,r):Xe(e,t))}function qa(e,t){var r=t||{},n=[Be,J("cp:coreProperties",null,{"xmlns:cp":Ue.CORE_PROPS,"xmlns:dc":Ue.dc,"xmlns:dcterms":Ue.dcterms,"xmlns:dcmitype":Ue.dcmitype,"xmlns:xsi":Ue.xsi})],i={};if(!e&&!r.Props)return n.join("");e&&(e.CreatedDate!=null&&r0("dcterms:created",typeof e.CreatedDate=="string"?e.CreatedDate:o0(e.CreatedDate,r.WTF),{"xsi:type":"dcterms:W3CDTF"},n,i),e.ModifiedDate!=null&&r0("dcterms:modified",typeof e.ModifiedDate=="string"?e.ModifiedDate:o0(e.ModifiedDate,r.WTF),{"xsi:type":"dcterms:W3CDTF"},n,i));for(var a=0;a!=st.length;++a){var s=st[a],f=r.Props&&r.Props[s[1]]!=null?r.Props[s[1]]:e?e[s[1]]:null;f===!0?f="1":f===!1?f="0":typeof f=="number"&&(f=String(f)),f!=null&&r0(s[0],f,null,n,i)}return n.length>2&&(n[n.length]="</cp:coreProperties>",n[1]=n[1].replace("/>",">")),n.join("")}var Ft=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]],Za=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function Qa(e){var t=[],r=J;return e||(e={}),e.Application="SheetJS",t[t.length]=Be,t[t.length]=J("Properties",null,{xmlns:Ue.EXT_PROPS,"xmlns:vt":Ue.vt}),Ft.forEach(function(n){if(e[n[1]]!==void 0){var i;switch(n[2]){case"string":i=Ee(String(e[n[1]]));break;case"bool":i=e[n[1]]?"true":"false";break}i!==void 0&&(t[t.length]=r(n[0],i))}}),t[t.length]=r("HeadingPairs",r("vt:vector",r("vt:variant","<vt:lpstr>Worksheets</vt:lpstr>")+r("vt:variant",r("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"})),t[t.length]=r("TitlesOfParts",r("vt:vector",e.SheetNames.map(function(n){return"<vt:lpstr>"+Ee(n)+"</vt:lpstr>"}).join(""),{size:e.Worksheets,baseType:"lpstr"})),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}function es(e){var t=[Be,J("Properties",null,{xmlns:Ue.CUST_PROPS,"xmlns:vt":Ue.vt})];if(!e)return t.join("");var r=1;return Ke(e).forEach(function(i){++r,t[t.length]=J("property",Co(e[i],!0),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:r,name:Ee(i)})}),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}var Fi={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function cc(e,t){var r=[];return Ke(Fi).map(function(n){for(var i=0;i<st.length;++i)if(st[i][1]==n)return st[i];for(i=0;i<Ft.length;++i)if(Ft[i][1]==n)return Ft[i];throw n}).forEach(function(n)
`;_.push("P;PGeneral"),_.push("F;P0;DG0G8;M255"),h["!cols"]&&l(_,h["!cols"]),h["!rows"]&&c(_,h["!rows"]),_.push("B;Y"+(m.e.r-m.s.r+1)+";X"+(m.e.c-m.s.c+1)+";D"+[m.s.c,m.s.r,m.e.c,m.e.r].join(" "));for(var M=m.s.r;M<=m.e.r;++M)for(var K=m.s.c;K<=m.e.c;++K){var ee=we({r:M,c:K});A=O?(h[M]||[])[K]:h[ee],!(!A||A.v==null&&(!A.f||A.F))&&u.push(o(A,h,M,K))}return _.join(F)+F+u.join(F)+F+"E"+F}return{to_workbook:f,to_sheet:s,from_sheet:x}}(),jc=function(){function e(a,s){switch(s.type){case"base64":return t(Ur(a),s);case"binary":return t(a,s);case"buffer":return t(me&&Buffer.isBuffer(a)?a.toString("binary"):qt(a),s);case"array":return t(Gn(a),s)}throw new Error("Unrecognized type "+s.type)}function t(a,s){for(var f=a.split(`
`),o=-1,l=-1,c=0,x=[];c!==f.length;++c){if(f[c].trim()==="BOT"){x[++o]=[],l=0;continue}if(!(o<0)){var h=f[c].trim().split(","),d=h[0],_=h[1];++c;for(var u=f[c]||"";(u.match(/["]/g)||[]).length&1&&c<f.length-1;)u+=`
`+f[++c];switch(u=u.trim(),+d){case-1:if(u==="BOT"){x[++o]=[],l=0;continue}else if(u!=="EOD")throw new Error("Unrecognized DIF special command "+u);break;case 0:u==="TRUE"?x[o][l]=!0:u==="FALSE"?x[o][l]=!1:isNaN(Br(_))?isNaN(Kt(_).getDate())?x[o][l]=_:x[o][l]=tr(_):x[o][l]=Br(_),++l;break;case 1:u=u.slice(1,u.length-1),u=u.replace(/""/g,'"'),u&&u.match(/^=".*"$/)&&(u=u.slice(2,-1)),x[o][l++]=u!==""?u:null;break}if(u==="EOD")break}}return s&&s.sheetRows&&(x=x.slice(0,s.sheetRows)),x}function r(a,s){return It(e(a,s),s)}function n(a,s){return ut(r(a,s),s)}var i=function(){var a=function(o,l,c,x,h){o.push(l),o.push(c+","+x),o.push('"'+h.replace(/"/g,'""')+'"')},s=function(o,l,c,x){o.push(l+","+c),o.push(l==1?'"'+x.replace(/"/g,'""')+'"':x)};return function(o){var l=[],c=Ce(o["!ref"]),x,h=Array.isArray(o);a(l,"TABLE",0,1,"sheetjs"),a(l,"VECTORS",0,c.e.r-c.s.r+1,""),a(l,"TUPLES",0,c.e.c-c.s.c+1,""),a(l,"DATA",0,0,"");for(var d=c.s.r;d<=c.e.r;++d){s(l,-1,0,"BOT");for(var _=c.s.c;_<=c.e.c;++_){var u=we({r:d,c:_});if(x=h?(o[d]||[])[_]:o[u],!x){s(l,1,0,"");continue}switch(x.t){case"n":var m=x.w;!m&&x.v!=null&&(m=x.v),m==null?x.f&&!x.F?s(l,1,0,"="+x.f):s(l,1,0,""):s(l,0,m,"V");break;case"b":s(l,0,x.v?1:0,x.v?"TRUE":"FALSE");break;case"s":s(l,1,0,isNaN(x.v)?x.v:'="'+x.v+'"');break;case"d":x.w||(x.w=Kr(x.z||ke[14],sr(tr(x.v)))),s(l,0,x.w,"V");break;default:s(l,1,0,"")}}}s(l,-1,0,"EOD");var A=`\r
`,O=l.join(A);return O}}();return{to_workbook:n,to_sheet:r,from_sheet:i}}(),fs=function(){function e(x){return x.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,`
`)}function t(x){return x.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function r(x,h){for(var d=x.split(`
`),_=-1,u=-1,m=0,A=[];m!==d.length;++m){var O=d[m].trim().split(":");if(O[0]==="cell"){var F=We(O[1]);if(A.length<=F.r)for(_=A.length;_<=F.r;++_)A[_]||(A[_]=[]);switch(_=F.r,u=F.c,O[2]){case"t":A[_][u]=e(O[3]);break;case"v":A[_][u]=+O[3];break;case"vtf":var M=O[O.length-1];case"vtc":switch(O[3]){case"nl":A[_][u]=!!+O[4];break;default:A[_][u]=+O[4];break}O[2]=="vtf"&&(A[_][u]=[A[_][u],M])}}}return h&&h.sheetRows&&(A=A.slice(0,h.sheetRows)),A}function n(x,h){return It(r(x,h),h)}function i(x,h){return ut(n(x,h),h)}var a=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join(`
`),s=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join(`
`)+`
`,f=["# SocialCalc Spreadsheet Control Save","part:sheet"].join(`
`),o="--SocialCalcSpreadsheetControlSave--";function l(x){if(!x||!x["!ref"])return"";for(var h=[],d=[],_,u="",m=xr(x["!ref"]),A=Array.isArray(x),O=m.s.r;O<=m.e.r;++O)for(var F=m.s.c;F<=m.e.c;++F)if(u=we({r:O,c:F}),_=A?(x[O]||[])[F]:x[u],!(!_||_.v==null||_.t==="z")){switch(d=["cell",u,"t"],_.t){case"s":case"str":d.push(t(_.v));break;case"n":_.f?(d[2]="vtf",d[3]="n",d[4]=_.v,d[5]=t(_.f)):(d[2]="v",d[3]=_.v);break;case"b":d[2]="vt"+(_.f?"f":"c"),d[3]="nl",d[4]=_.v?"1":"0",d[5]=t(_.f||(_.v?"TRUE":"FALSE"));break;case"d":var M=sr(tr(_.v));d[2]="vtc",d[3]="nd",d[4]=""+M,d[5]=_.w||Kr(_.z||ke[14],M);break;case"e":continue}h.push(d.join(":"))}return h.push("sheet:c:"+(m.e.c-m.s.c+1)+":r:"+(m.e.r-m.s.r+1)+":tvf:1"),h.push("valueformat:1:text-wiki"),h.join(`
`)}function c(x){return[a,s,f,s,l(x),o].join(`
`)}return{to_workbook:i,to_sheet:n,from_sheet:c}}(),Jc=function(){function e(c,x,h,d,_){_.raw?x[h][d]=c:c===""||(c==="TRUE"?x[h][d]=!0:c==="FALSE"?x[h][d]=!1:isNaN(Br(c))?isNaN(Kt(c).getDate())?x[h][d]=c:x[h][d]=tr(c):x[h][d]=Br(c))}function t(c,x){var h=x||{},d=[];if(!c||c.length===0)return d;for(var _=c.split(/[\r\n]/),u=_.length-1;u>=0&&_[u].length===0;)--u;for(var m=10,A=0,O=0;O<=u;++O)A=_[O].indexOf(" "),A==-1?A=_[O].length:A++,m=Math.max(m,A);for(O=0;O<=u;++O){d[O]=[];var F=0;for(e(_[O].slice(0,m).trim(),d,O,F,h),F=1;F<=(_[O].length-m)/10+1;++F)e(_[O].slice(m+(F-1)*10,m+F*10).trim(),d,O,F,h)}return h.sheetRows&&(d=d.slice(0,h.sheetRows)),d}var r={44:",",9:" ",59:";",124:"|"},n={44:3,9:2,59:1,124:0};function i(c){for(var x={},h=!1,d=0,_=0;d<c.length;++d)(_=c.charCodeAt(d))==34?h=!h:!h&&_ in r&&(x[_]=(x[_]||0)+1);_=[];for(d in x)Object.prototype.hasOwnProperty.call(x,d)&&_.push([x[d],d]);if(!_.length){x=n;for(d in x)Object.prototype.hasOwnProperty.call(x,d)&&_.push([x[d],d])}return _.sort(function(u,m){return u[0]-m[0]||n[u[1]]-n[m[1]]}),r[_.pop()[1]]||44}function a(c,x){var h=x||{},d="",_=h.dense?[]:{},u={s:{c:0,r:0},e:{c:0,r:0}};c.slice(0,4)=="sep="?c.charCodeAt(5)==13&&c.charCodeAt(6)==10?(d=c.charAt(4),c=c.slice(7)):c.charCodeAt(5)==13||c.charCodeAt(5)==10?(d=c.charAt(4),c=c.slice(6)):d=i(c.slice(0,1024)):h&&h.FS?d=h.FS:d=i(c.slice(0,1024));var m=0,A=0,O=0,F=0,M=0,K=d.charCodeAt(0),ee=!1,D=0,U=c.charCodeAt(0);c=c.replace(/\r\n/mg,`
`);var L=h.dateNF!=null?uo(h.dateNF):null;function G(){var V=c.slice(F,M),X={};if(V.charAt(0)=='"'&&V.charAt(V.length-1)=='"'&&(V=V.slice(1,-1).replace(/""/g,'"')),V.length===0)X.t="z";else if(h.raw)X.t="s",X.v=V;else if(V.trim().length===0)X.t="s",X.v=V;else if(V.charCodeAt(0)==61)V.charCodeAt(1)==34&&V.charCodeAt(V.length-1)==34?(X.t="s",X.v=V.slice(2,-1).replace(/""/g,'"')):Yu(V)?(X.t="n",X.f=V.slice(1)):(X.t="s",X.v=V);else if(V=="TRUE")X.t="b",X.v=!0;else if(V=="FALSE")X.t="b",X.v=!1;else if(!isNaN(O=Br(V)))X.t="n",h.cellText!==!1&&(X.w=V),X.v=O;else if(!isNaN(Kt(V).getDate())||L&&V.match(L)){X.z=h.dateNF||ke[14];var re=0;L&&V.match(L)&&(V=ho(V,h.dateNF,V.match(L)||[]),re=1),h.cellDates?(X.t="d",X.v=tr(V,re)):(X.t="n",X.v=sr(tr(V,re))),h.cellText!==!1&&(X.w=Kr(X.z,X.v instanceof Date?sr(X.v):X.v)),h.cellNF||delete X.z}else X.t="s",X.v=V;if(X.t=="z"||(h.dense?(_[m]||(_[m]=[]),_[m][A]=X):_[we({c:A,r:m})]=X),F=M+1,U=c.charCodeAt(F),u.e.c<A&&(u.e.c=A),u.e.r<m&&(u.e.r=m),D==K)++A;else if(A=0,++m,h.sheetRows&&h.sheetRows<=m)return!0}e:for(;M<c.length;++M)switch(D=c.charCodeAt(M)){case 34:U===34&&(ee=!ee);break;case K:case 10:case 13:if(!ee&&G())break e;break}return M-F>0&&G(),_["!ref"]=Me(u),_}function s(c,x){return!(x&&x.PRN)||x.FS||c.slice(0,4)=="sep="||c.indexOf(" ")>=0||c.indexOf(",")>=0||c.indexOf(";")>=0?a(c,x):It(t(c,x),x)}function f(c,x){var h="",d=x.type=="string"?[0,0,0,0]:l2(c,x);switch(x.type){case"base64":h=Ur(c);break;case"binary":h=c;break;case"buffer":x.codepage==65001?h=c.toString("utf8"):x.codepage&&typeof nt<"u"?h=nt.utils.decode(x.codepage,c):h=me&&Buffer.isBuffer(c)?c.toString("binary"):qt(c);break;case"array":h=Gn(c);break;case"string":h=c;break;default:throw new Error("Unrecognized type "+x.type)}return d[0]==239&&d[1]==187&&d[2]==191?h=Ut(h.slice(3)):x.type!="string"&&x.type!="buffer"&&x.codepage==65001?h=Ut(h):x.type=="binary"&&typeof nt<"u"&&x.codepage&&(h=nt.utils.decode(x.codepage,nt.utils.encode(28591,h))),h.slice(0,19)=="socialcalc:version:"?fs.to_sheet(x.type=="string"?h:Ut(h),x):s(h,x)}function o(c,x){return ut(f(c,x),x)}function l(c){for(var x=[],h=Ce(c["!ref"]),d,_=Array.isArray(c),u=h.s.r;u<=h.e.r;++u){for(var m=[],A=h.s.c;A<=h.e.c;++A){var O=we({r:u,c:A});if(d=_?(c[u]||[])[A]:c[O],!d||d.v==null){m.push(" ");continue}for(var F=(d.w||(Wr(d),d.w)||"").slice(0,10);F.length<10;)F+=" ";m.push(F+(A===0?" ":""))}x.push(m.join(""))}return x.join(`
`)}return{to_workbook:o,to_sheet:f,from_sheet:l}}(),Ni=function(){function e(S,P,C){if(S){cr(S,S.l||0);for(var y=C.Enum||dr;S.l<S.length;){var H=S.read_shift(2),fe=y[H]||y[65535],le=S.read_shift(2),se=S.l+le,Q=fe.f&&fe.f(S,le,C);if(S.l=se,P(Q,fe,H))return}}}function t(S,P){switch(P.type){case"base64":return r(wr(Ur(S)),P);case"binary":return r(wr(S),P);case"buffer":case"array":return r(S,P)}throw"Unsupported type "+P.type}function r(S,P){if(!S)return S;var C=P||{},y=C.dense?[]:{},H="Sheet1",fe="",le=0,se={},Q=[],Ae=[],pe={s:{r:0,c:0},e:{r:0,c:0}},Ze=C.sheetRows||0;if(S[2]==0&&(S[3]==8||S[3]==9)&&S.length>=16&&S[14]==5&&S[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(S[2]==2)C.Enum=dr,e(S,function(ae,pr,kr){switch(kr){case 0:C.vers=ae,ae>=4096&&(C.qpro=!0);break;case 6:pe=ae;break;case 204:ae&&(fe=ae);break;case 222:fe=ae;break;case 15:case 51:C.qpro||(ae[1].v=ae[1].v.slice(1));case 13:case 14:case 16:kr==14&&(ae[2]&112)==112&&(ae[2]&15)>1&&(ae[2]&15)<15&&(ae[1].z=C.dateNF||ke[14],C.cellDates&&(ae[1].t="d",ae[1].v=Aa(ae[1].v))),C.qpro&&ae[3]>le&&(y["!ref"]=Me(pe),se[H]=y,Q.push(H),y=C.dense?[]:{},pe={s:{r:0,c:0},e:{r:0,c:0}},le=ae[3],H=fe||"Sheet"+(le+1),fe="");var Zr=C.dense?(y[ae[0].r]||[])[ae[0].c]:y[we(ae[0])];if(Zr){Zr.t=ae[1].t,Zr.v=ae[1].v,ae[1].z!=null&&(Zr.z=ae[1].z),ae[1].f!=null&&(Zr.f=ae[1].f);break}C.dense?(y[ae[0].r]||(y[ae[0].r]=[]),y[ae[0].r][ae[0].c]=ae[1]):y[we(ae[0])]=ae[1];break}},C);else if(S[2]==26||S[2]==14)C.Enum=lr,S[2]==14&&(C.qpro=!0,S.l=0),e(S,function(ae,pr,kr){switch(kr){case 204:H=ae;break;case 22:ae[1].v=ae[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(ae[3]>le&&(y["!ref"]=Me(pe),se[H]=y,Q.push(H),y=C.dense?[]:{},pe={s:{r:0,c:0},e:{r:0,c:0}},le=ae[3],H="Sheet"+(le+1)),Ze>0&&ae[0].r>=Ze)break;C.dense?(y[ae[0].r]||(y[ae[0].r]=[]),y[ae[0].r][ae[0].c]=ae[1]):y[we(ae[0])]=ae[1],pe.e.c<ae[0].c&&(pe.e.c=ae[0].c),pe.e.r<ae[0].r&&(pe.e.r=ae[0].r);break;case 27:ae[14e3]&&(Ae[ae[14e3][0]]=ae[14e3][1]);break;case 1537:Ae[ae[0]]=ae[1],ae[0]==le&&(H=ae[1]);break}},C);else throw new Error("Unrecognized LOTUS BOF "+S[2]);if(y["!ref"]=Me(pe),se[fe||H]=y,Q.push(fe||H),!Ae.length)return{SheetNames:Q,Sheets:se};for(var ge={},Nr=[],Ie=0;Ie<Ae.length;++Ie)se[Q[Ie]]?(Nr.push(Ae[Ie]||Q[Ie]),ge[Ae[Ie]]=se[Ae[Ie]]||se[Q[Ie]]):(Nr.push(Ae[Ie]),ge[Ae[Ie]]={"!ref":"A1"});return{SheetNames:Nr,Sheets:ge}}function n(S,P){var C=P||{};if(+C.codepage>=0&&Xt(+C.codepage),C.type=="string")throw new Error("Cannot write WK1 to JS string");var y=ar(),H=Ce(S["!ref"]),fe=Array.isArray(S),le=[];q(y,0,a(1030)),q(y,6,o(H));for(var se=Math.min(H.e.r,8191),Q=H.s.r;Q<=se;++Q)for(var Ae=ze(Q),pe=H.s.c;pe<=H.e.c;++pe){Q===H.s.r&&(le[pe]=je(pe));var Ze=le[pe]+Ae,ge=fe?(S[Q]||[])[pe]:S[Ze];if(!(!ge||ge.t=="z"))if(ge.t=="n")(ge.v|0)==ge.v&&ge.v>=-32768&&ge.v<=32767?q(y,13,d(Q,pe,ge.v)):q(y,14,u(Q,pe,ge.v));else{var Nr=Wr(ge);q(y,15,x(Q,pe,Nr.slice(0,239)))}}return q(y,1),y.end()}function i(S,P){var C=P||{};if(+C.codepage>=0&&Xt(+C.codepage),C.type=="string")throw new Error("Cannot write WK3 to JS string");var y=ar();q(y,0,s(S));for(var H=0,fe=0;H<S.SheetNames.length;++H)(S.Sheets[S.SheetNames[H]]||{})["!ref"]&&q(y,27,Re(S.SheetNames[H],fe++));var le=0;for(H=0;H<S.SheetNames.length;++H){var se=S.Sheets[S.SheetNames[H]];if(!(!se||!se["!ref"])){for(var Q=Ce(se["!ref"]),Ae=Array.isArray(se),pe=[],Ze=Math.min(Q.e.r,8191),ge=Q.s.r;ge<=Ze;++ge)for(var Nr=ze(ge),Ie=Q.s.c;Ie<=Q.e.c;++Ie){ge===Q.s.r&&(pe[Ie]=je(Ie));var ae=pe[Ie]+Nr,pr=Ae?(se[ge]||[])[Ie]:se[ae];if(!(!pr||pr.t=="z"))if(pr.t=="n")q(y,23,G(ge,Ie,le,pr.v));else{var kr=Wr(pr);q(y,22,D(ge,Ie,le,kr.slice(0,239)))}}++le}}return q(y,1),y.end()}function a(S){var P=B(2);return P.write_shift(2,S),P}function s(S){var P=B(26);P.write_shift(2,4096),P.write_shift(2,4),P.write_shift(4,0);for(var C=0,y=0,H=0,fe=0;fe<S.SheetNames.length;++fe){var le=S.SheetNames[fe],se=S.Sheets[le];if(!(!se||!se["!ref"])){++H;var Q=xr(se["!ref"]);C<Q.e.r&&(C=Q.e.r),y<Q.e.c&&(y=Q.e.c)}}return C>8191&&(C=8191),P.write_shift(2,C),P.write_shift(1,H),P.write_shift(1,y),P.write_shift(2,0
<metadataTypes count="1">
<metadataType name="XLDAPR" minSupportedVersion="120000" copy="1" pasteAll="1" pasteValues="1" merge="1" splitFirst="1" rowColShift="1" clearFormats="1" clearComments="1" assign="1" coerce="1" cellMeta="1"/>
</metadataTypes>
<futureMetadata name="XLDAPR" count="1">
<bk>
<extLst>
<ext uri="{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}">
<xda:dynamicArrayProperties fDynamic="1" fCollapsed="0"/>
</ext>
</extLst>
</bk>
</futureMetadata>
<cellMetadata count="1">
<bk>
<rc t="1" v="0"/>
</bk>
</cellMetadata>
</metadata>`),e.join("")}function Bu(e){var t={};t.i=e.read_shift(4);var r={};r.r=e.read_shift(4),r.c=e.read_shift(4),t.r=we(r);var n=e.read_shift(1);return n&2&&(t.l="1"),n&8&&(t.a="1"),t}var Et=1024;function vs(e,t){for(var r=[21600,21600],n=["m0,0l0",r[1],r[0],r[1],r[0],"0xe"].join(","),i=[J("xml",null,{"xmlns:v":ur.v,"xmlns:o":ur.o,"xmlns:x":ur.x,"xmlns:mv":ur.mv}).replace(/\/>/,">"),J("o:shapelayout",J("o:idmap",null,{"v:ext":"edit",data:e}),{"v:ext":"edit"}),J("v:shapetype",[J("v:stroke",null,{joinstyle:"miter"}),J("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202","o:spt":202,coordsize:r.join(","),path:n})];Et<e*1e3;)Et+=1e3;return t.forEach(function(a){var s=We(a[0]),f={color2:"#BEFF82",type:"gradient"};f.type=="gradient"&&(f.angle="-180");var o=f.type=="gradient"?J("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,l=J("v:fill",o,f),c={on:"t",obscured:"t"};++Et,i=i.concat(["<v:shape"+Yt({id:"_x0000_s"+Et,type:"#_x0000_t202",style:"position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10"+(a[1].hidden?";visibility:hidden":""),fillcolor:"#ECFAD4",strokecolor:"#edeaa1"})+">",l,J("v:shadow",null,c),J("v:path",null,{"o:connecttype":"none"}),'<v:textbox><div style="text-align:left"></div></v:textbox>','<x:ClientData ObjectType="Note">',"<x:MoveWithCells/>","<x:SizeWithCells/>",Xe("x:Anchor",[s.c+1,0,s.r+1,0,s.c+3,20,s.r+5,20].join(",")),Xe("x:AutoFill","False"),Xe("x:Row",String(s.r)),Xe("x:Column",String(s.c)),a[1].hidden?"":"<x:Visible/>","</x:ClientData>","</v:shape>"])}),i.push("</xml>"),i.join("")}function ms(e){var t=[Be,J("comments",null,{xmlns:Dt[0]})],r=[];return t.push("<authors>"),e.forEach(function(n){n[1].forEach(function(i){var a=Ee(i.a);r.indexOf(a)==-1&&(r.push(a),t.push("<author>"+a+"</author>")),i.T&&i.ID&&r.indexOf("tc="+i.ID)==-1&&(r.push("tc="+i.ID),t.push("<author>tc="+i.ID+"</author>"))})}),r.length==0&&(r.push("SheetJ5"),t.push("<author>SheetJ5</author>")),t.push("</authors>"),t.push("<commentList>"),e.forEach(function(n){var i=0,a=[];if(n[1][0]&&n[1][0].T&&n[1][0].ID?i=r.indexOf("tc="+n[1][0].ID):n[1].forEach(function(o){o.a&&(i=r.indexOf(Ee(o.a))),a.push(o.t||"")}),t.push('<comment ref="'+n[0]+'" authorId="'+i+'"><text>'),a.length<=1)t.push(Xe("t",Ee(a[0]||"")));else{for(var s=`Comment:
`+a[0]+`
`,f=1;f<a.length;++f)s+=`Reply:
`+a[f]+`
`;t.push(Xe("t",Ee(s)))}t.push("</text></comment>")}),t.push("</commentList>"),t.length>2&&(t[t.length]="</comments>",t[1]=t[1].replace("/>",">")),t.join("")}function bu(e,t,r){var n=[Be,J("ThreadedComments",null,{xmlns:Ue.TCMNT}).replace(/[\/]>/,">")];return e.forEach(function(i){var a="";(i[1]||[]).forEach(function(s,f){if(!s.T){delete s.ID;return}s.a&&t.indexOf(s.a)==-1&&t.push(s.a);var o={ref:i[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+r.tcid++).slice(-12)+"}"};f==0?a=o.id:o.parentId=a,s.ID=o.id,s.a&&(o.personId="{54EE7950-7262-4200-6969-"+("000000000000"+t.indexOf(s.a)).slice(-12)+"}"),n.push(J("threadedComment",Xe("text",s.t||""),o))})}),n.push("</ThreadedComments>"),n.join("")}function Uu(e){var t=[Be,J("personList",null,{xmlns:Ue.TCMNT,"xmlns:x":Dt[0]}).replace(/[\/]>/,">")];return e.forEach(function(r,n){t.push(J("person",null,{displayName:r,id:"{54EE7950-7262-4200-6969-"+("000000000000"+n).slice(-12)+"}",userId:r,providerId:"None"}))}),t.push("</personList>"),t.join("")}function Wu(e){var t={};t.iauthor=e.read_shift(4);var r=pt(e);return t.rfx=r.s,t.ref=we(r.s),e.l+=16,t}function Hu(e,t){return t==null&&(t=B(36)),t.write_shift(4,e[1].iauthor),Nt(e[0],t),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t}var $u=Je;function Gu(e){return He(e.slice(0,54))}function Vu(e){var t=ar(),r=[];return W(t,628),W(t,630),e.forEach(function(n){n[1].forEach(function(i){r.indexOf(i.a)>-1||(r.push(i.a.slice(0,54)),W(t,632,Gu(i.a)))})}),W(t,631),W(t,633),e.forEach(function(n){n[1].forEach(function(i){i.iauthor=r.indexOf(i.a);var a={s:We(n[0]),e:We(n[0])};W(t,635,Hu([a,i])),i.t&&i.t.length>0&&W(t,637,zo(i)),W(t,636),delete i.iauthor})}),W(t,634),W(t,629),t.end()}function Xu(e,t){t.FullPaths.forEach(function(r,n){if(n!=0){var i=r.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");i.slice(-1)!=="/"&&Se.utils.cfb_add(e,i,t.FileIndex[n].content)}})}var gs=["xlsb","xlsm","xlam","biff8","xla"],zu=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function r(n,i,a,s){var f=!1,o=!1;a.length==0?o=!0:a.charAt(0)=="["&&(o=!0,a=a.slice(1,-1)),s.length==0?f=!0:s.charAt(0)=="["&&(f=!0,s=s.slice(1,-1));var l=a.length>0?parseInt(a,10)|0:0,c=s.length>0?parseInt(s,10)|0:0;return f?c+=t.c:--c,o?l+=t.r:--l,i+(f?"":"$")+je(c)+(o?"":"$")+ze(l)}return function(i,a){return t=a,i.replace(e,r)}}(),k0=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,R0=function(){return function(t,r){return t.replace(k0,function(n,i,a,s,f,o){var l=y0(s)-(a?0:r.c),c=F0(o)-(f?0:r.r),x=c==0?"":f?c+1:"["+c+"]",h=l==0?"":a?l+1:"["+l+"]";return i+"R"+x+"C"+h})}}();function Ku(e,t){return e.replace(k0,function(r,n,i,a,s,f){return n+(i=="$"?i+a:je(y0(a)+t.c))+(s=="$"?s+f:ze(F0(f)+t.r))})}function Yu(e){return e.length!=1}function Le(e){e.l+=1}function Yr(e,t){var r=e.read_shift(t==1?1:2);return[r&16383,r>>14&1,r>>15&1]}function _s(e,t,r){var n=2;if(r){if(r.biff>=2&&r.biff<=5)return Ts(e);r.biff==12&&(n=4)}var i=e.read_shift(n),a=e.read_shift(n),s=Yr(e,2),f=Yr(e,2);return{s:{r:i,c:s[0],cRel:s[1],rRel:s[2]},e:{r:a,c:f[0],cRel:f[1],rRel:f[2]}}}function Ts(e){var t=Yr(e,2),r=Yr(e,2),n=e.read_shift(1),i=e.read_shift(1);return{s:{r:t[0],c:n,cRel:t[1],rRel:t[2]},e:{r:r[0],c:i,cRel:r[1],rRel:r[2]}}}function ju(e,t,r){if(r.biff<8)return Ts(e);var n=e.read_shift(r.biff==12?4:2),i=e.read_shift(r.biff==12?4:2),a=Yr(e,2),s=Yr(e,2);return{s:{r:n,c:a[0],cRel:a[1],rRel:a[2]},e:{r:i,c:s[0],cRel:s[1],rRel:s[2]}}}function Es(e,t,r){if(r&&r.biff>=2&&r.biff<=5)return Ju(e);var n=e.read_shift(r&&r.biff==12?4:2),i=Yr(e,2);return{r:n,c:i[0],cRel:i[1],rRel:i[2]}}function Ju(e){var t=Yr(e,2),r=e.read_shift(1);return{r:t[0],c:r,cRel:t[1],rRel:t[2]}}function qu(e){var t=e.read_shift(2),r=e.read_shift(2);return{r:t,c:r&255,fQuoted:!!(r&16384),cRel:r>>15,rRel:r>>15}}function Zu(e,t,r){var n=r&&r.biff?r.biff:8;if(n>=2&&n<=5)return Qu(e);var i=e.read_shift(n>=12?4:2),a=e.read_shift(2),s=(a&16384)>>14,f=
`,r=` <table:covered-table-cell/>
`,n=function(a,s,f){var o=[];o.push(' <table:table table:name="'+Ee(s.SheetNames[f])+`" table:style-name="ta1">
`);var l=0,c=0,x=xr(a["!ref"]||"A1"),h=a["!merges"]||[],d=0,_=Array.isArray(a);if(a["!cols"])for(c=0;c<=x.e.c;++c)o.push(" <table:table-column"+(a["!cols"][c]?' table:style-name="co'+a["!cols"][c].ods+'"':"")+`></table:table-column>
`);var u="",m=a["!rows"]||[];for(l=0;l<x.s.r;++l)u=m[l]?' table:style-name="ro'+m[l].ods+'"':"",o.push(" <table:table-row"+u+`></table:table-row>
`);for(;l<=x.e.r;++l){for(u=m[l]?' table:style-name="ro'+m[l].ods+'"':"",o.push(" <table:table-row"+u+`>
`),c=0;c<x.s.c;++c)o.push(t);for(;c<=x.e.c;++c){var A=!1,O={},F="";for(d=0;d!=h.length;++d)if(!(h[d].s.c>c)&&!(h[d].s.r>l)&&!(h[d].e.c<c)&&!(h[d].e.r<l)){(h[d].s.c!=c||h[d].s.r!=l)&&(A=!0),O["table:number-columns-spanned"]=h[d].e.c-h[d].s.c+1,O["table:number-rows-spanned"]=h[d].e.r-h[d].s.r+1;break}if(A){o.push(r);continue}var M=we({r:l,c}),K=_?(a[l]||[])[c]:a[M];if(K&&K.f&&(O["table:formula"]=Ee(m1(K.f)),K.F&&K.F.slice(0,M.length)==M)){var ee=xr(K.F);O["table:number-matrix-columns-spanned"]=ee.e.c-ee.s.c+1,O["table:number-matrix-rows-spanned"]=ee.e.r-ee.s.r+1}if(!K){o.push(t);continue}switch(K.t){case"b":F=K.v?"TRUE":"FALSE",O["office:value-type"]="boolean",O["office:boolean-value"]=K.v?"true":"false";break;case"n":F=K.w||String(K.v||0),O["office:value-type"]="float",O["office:value"]=K.v||0;break;case"s":case"str":F=K.v==null?"":K.v,O["office:value-type"]="string";break;case"d":F=K.w||tr(K.v).toISOString(),O["office:value-type"]="date",O["office:date-value"]=tr(K.v).toISOString(),O["table:style-name"]="ce1";break;default:o.push(t);continue}var D=e(F);if(K.l&&K.l.Target){var U=K.l.Target;U=U.charAt(0)=="#"?"#"+g1(U.slice(1)):U,U.charAt(0)!="#"&&!U.match(/^\w+:/)&&(U="../"+U),D=J("text:a",D,{"xlink:href":U.replace(/&/g,"&amp;")})}o.push(" "+J("table:table-cell",J("text:p",D,{}),O)+`
`)}o.push(` </table:table-row>
`)}return o.push(` </table:table>
`),o.join("")},i=function(a,s){a.push(` <office:automatic-styles>
`),a.push(` <number:date-style style:name="N37" number:automatic-order="true">
`),a.push(` <number:month number:style="long"/>
`),a.push(` <number:text>/</number:text>
`),a.push(` <number:day number:style="long"/>
`),a.push(` <number:text>/</number:text>
`),a.push(` <number:year/>
`),a.push(` </number:date-style>
`);var f=0;s.SheetNames.map(function(l){return s.Sheets[l]}).forEach(function(l){if(l&&l["!cols"]){for(var c=0;c<l["!cols"].length;++c)if(l["!cols"][c]){var x=l["!cols"][c];if(x.width==null&&x.wpx==null&&x.wch==null)continue;N0(x),x.ods=f;var h=l["!cols"][c].wpx+"px";a.push(' <style:style style:name="co'+f+`" style:family="table-column">
`),a.push(' <style:table-column-properties fo:break-before="auto" style:column-width="'+h+`"/>
`),a.push(` </style:style>
`),++f}}});var o=0;s.SheetNames.map(function(l){return s.Sheets[l]}).forEach(function(l){if(l&&l["!rows"]){for(var c=0;c<l["!rows"].length;++c)if(l["!rows"][c]){l["!rows"][c].ods=o;var x=l["!rows"][c].hpx+"px";a.push(' <style:style style:name="ro'+o+`" style:family="table-row">
`),a.push(' <style:table-row-properties fo:break-before="auto" style:row-height="'+x+`"/>
`),a.push(` </style:style>
`),++o}}}),a.push(` <style:style style:name="ta1" style:family="table" style:master-page-name="mp1">
`),a.push(` <style:table-properties table:display="true" style:writing-mode="lr-tb"/>
`),a.push(` </style:style>
`),a.push(` <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"/>
`),a.push(` </office:automatic-styles>
`)};return function(s,f){var o=[Be],l=Yt({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),c=Yt({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});f.bookType=="fods"?(o.push("<office:document"+l+c+`>
`),o.push(Ja().replace(/office:document-meta/g,"office:meta"))):o.push("<office:document-content"+l+`>
`),i(o,s),o.push(` <office:body>
`),o.push(` <office:spreadsheet>
`);for(var x=0;x!=s.SheetNames.length;++x)o.push(n(s.Sheets[s.SheetNames[x]],s,x));return o.push(` </office:spreadsheet>
`),o.push(` </office:body>
`),f.bookType=="fods"?o.push("</office:document>"):o.push("</office:document-content>"),o.join("")}}();function Ms(e,t){if(t.bookType=="fods")return bi(e,t);var r=T0(),n="",i=[],a=[];return n="mimetype",xe(r,n,"application/vnd.oasis.opendocument.spreadsheet"),n="content.xml",xe(r,n,bi(e,t)),i.push([n,"text/xml"]),a.push([n,"ContentFile"]),n="styles.xml",xe(r,n,qd(e,t)),i.push([n,"text/xml"]),a.push([n,"StylesFile"]),n="meta.xml",xe(r,n,Be+Ja()),i.push([n,"text/xml"]),a.push([n,"MetadataFile"]),n="manifest.rdf",xe(r,n,oc(a)),i.push([n,"application/rdf+xml"]),n="META-INF/manifest.xml",xe(r,n,fc(i)),r}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function On(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Zd(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e):wr(Pr(e))}function Qd(e,t){e:for(var r=0;r<=e.length-t.length;++r){for(var n=0;n<t.length;++n)if(e[r+n]!=t[n])continue e;return!0}return!1}function jr(e){var t=e.reduce(function(i,a){return i+a.length},0),r=new Uint8Array(t),n=0;return e.forEach(function(i){r.set(i,n),n+=i.length}),r}function e2(e,t,r){var n=Math.floor(r==0?0:Math.LOG10E*Math.log(Math.abs(r)))+6176-20,i=r/Math.pow(10,n-6176);e[t+15]|=n>>7,e[t+14]|=(n&127)<<1;for(var a=0;i>=1;++a,i/=256)e[t+a]=i&255;e[t+15]|=r>=0?0:128}function jt(e,t){var r=t?t[0]:0,n=e[r]&127;e:if(e[r++]>=128&&(n|=(e[r]&127)<<7,e[r++]<128||(n|=(e[r]&127)<<14,e[r++]<128)||(n|=(e[r]&127)<<21,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,28),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,35),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,42),++r,e[r++]<128)))break e;return t&&(t[0]=r),n}function _e(e){var t=new Uint8Array(7);t[0]=e&127;var r=1;e:if(e>127){if(t[r-1]|=128,t[r]=e>>7&127,++r,e<=16383||(t[r-1]|=128,t[r]=e>>14&127,++r,e<=2097151)||(t[r-1]|=128,t[r]=e>>21&127,++r,e<=268435455)||(t[r-1]|=128,t[r]=e/256>>>21&127,++r,e<=34359738367)||(t[r-1]|=128,t[r]=e/65536>>>21&127,++r,e<=4398046511103))break e;t[r-1]|=128,t[r]=e/16777216>>>21&127,++r}return t.slice(0,r)}function yt(e){var t=0,r=e[t]&127;e:if(e[t++]>=128){if(r|=(e[t]&127)<<7,e[t++]<128||(r|=(e[t]&127)<<14,e[t++]<128)||(r|=(e[t]&127)<<21,e[t++]<128))break e;r|=(e[t]&127)<<28}return r}function be(e){for(var t=[],r=[0];r[0]<e.length;){var n=r[0],i=jt(e,r),a=i&7;i=Math.floor(i/8);var s=0,f;if(i==0)break;switch(a){case 0:{for(var o=r[0];e[r[0]++]>=128;);f=e.slice(o,r[0])}break;case 5:s=4,f=e.slice(r[0],r[0]+s),r[0]+=s;break;case 1:s=8,f=e.slice(r[0],r[0]+s),r[0]+=s;break;case 2:s=jt(e,r),f=e.slice(r[0],r[0]+s),r[0]+=s;break;case 3:case 4:default:throw new Error("PB Type ".concat(a," for Field ").concat(i," at offset ").concat(n))}var l={data:f,type:a};t[i]==null?t[i]=[l]:t[i].push(l)}return t}function $e(e){var t=[];return e.forEach(function(r,n){r.forEach(function(i){i.data&&(t.push(_e(n*8+i.type)),i.type==2&&t.push(_e(i.data.length)),t.push(i.data))})}),jr(t)}function Tr(e){for(var t,r=[],n=[0];n[0]<e.length;){var i=jt(e,n),a=be(e.slice(n[0],n[0]+i));n[0]+=i;var s={id:yt(a[1][0].data),messages:[]};a[2].forEach(function(f){var o=be(f.data),l=yt(o[3][0].data);s.messages.push({meta:o,data:e.slice(n[0],n[0]+l)}),n[0]+=l}),(t=a[3])!=null&&t[0]&&(s.merge=yt(a[3][0].data)>>>0>0),r.push(s)}return r}function gt(e){var t=[];return e.forEach(function(r){var n=[];n[1]=[{data:_e(r.id),type:0}],n[2]=[],r.merge!=null&&(n[3]=[{data:_e(+!!r.merge),type:0}]);var i=[];r.messages.forEach(function(s){i.push(s.data),s.meta[3]=[{type:0,data:_e(s.data.length)}],n[2].push({data:$e(s.meta),type:2})});var a=$e(n);t.push(_e(a.length)),t.push(a),i.forEach(function(s){return t.push(s)})}),jr(t)}function r2(e,t){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var r=[0],n=jt(t,r),i=[];r[0]<t.length;){var a=t[r[0]]&3;if(a==0){var s=t[r[0]++]>>2;if(s<60)++s;else{var f=s-59;s=t[r[0]],f>1&&(s|=t[r[0]+1]<<8),f>2&&(s|=t[r[0]+2]<<16),f>3&&(s|=t[r[0]+3]<<24),s>>>=0,s++,r[0]+=f}i.push(t.slice(r[0],r[0]+s)),r[0]+=s;continue}else{var o=0,l=0;if(a==1?(l=(t[r[0]]>>2&7)+4,o=(t[r[0]++]&224)<<3,o|=t[r[0]++]):(l=(t[r[0]++]>>2)+1,a==2?(o=t[r[0]]|t[r[0]+1]<<8,r[0]+=2):(o=(t[r[0]
`,o=f.charCodeAt(0),l=new RegExp((a=="|"?"\\|":a)+"+$"),c="",x=[];n.dense=Array.isArray(e);for(var h=n.skipHidden&&e["!cols"]||[],d=n.skipHidden&&e["!rows"]||[],_=i.s.c;_<=i.e.c;++_)(h[_]||{}).hidden||(x[_]=je(_));for(var u=0,m=i.s.r;m<=i.e.r;++m)(d[m]||{}).hidden||(c=v2(e,i,m,x,s,o,a,n),c!=null&&(n.strip&&(c=c.replace(l,"")),(c||n.blankrows!==!1)&&r.push((u++?f:"")+c)));return delete n.dense,r.join("")}function bs(e,t){t||(t={}),t.FS=" ",t.RS=`
`;var r=b0(e,t);return r}function m2(e){var t="",r,n="";if(e==null||e["!ref"]==null)return[];var i=Ce(e["!ref"]),a="",s=[],f,o=[],l=Array.isArray(e);for(f=i.s.c;f<=i.e.c;++f)s[f]=je(f);for(var c=i.s.r;c<=i.e.r;++c)for(a=ze(c),f=i.s.c;f<=i.e.c;++f)if(t=s[f]+a,r=l?(e[c]||[])[f]:e[t],n="",r!==void 0){if(r.F!=null){if(t=r.F,!r.f)continue;n=r.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(r.f!=null)n=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)n=""+r.v;else if(r.t=="b")n=r.v?"TRUE":"FALSE";else if(r.w!==void 0)n="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?n="'"+r.v:n=""+r.v}}o[o.length]=t+"="+n}return o}function Us(e,t,r){var n=r||{},i=+!n.skipHeader,a=e||{},s=0,f=0;if(a&&n.origin!=null)if(typeof n.origin=="number")s=n.origin;else{var o=typeof n.origin=="string"?We(n.origin):n.origin;s=o.r,f=o.c}var l,c={s:{c:0,r:0},e:{c:f,r:s+t.length-1+i}};if(a["!ref"]){var x=Ce(a["!ref"]);c.e.c=Math.max(c.e.c,x.e.c),c.e.r=Math.max(c.e.r,x.e.r),s==-1&&(s=x.e.r+1,c.e.r=s+t.length-1+i)}else s==-1&&(s=0,c.e.r=t.length-1+i);var h=n.header||[],d=0;t.forEach(function(u,m){Ke(u).forEach(function(A){(d=h.indexOf(A))==-1&&(h[d=h.length]=A);var O=u[A],F="z",M="",K=we({c:f+d,r:s+m+i});l=Jt(a,K),O&&typeof O=="object"&&!(O instanceof Date)?a[K]=O:(typeof O=="number"?F="n":typeof O=="boolean"?F="b":typeof O=="string"?F="s":O instanceof Date?(F="d",n.cellDates||(F="n",O=sr(O)),M=n.dateNF||ke[14]):O===null&&n.nullError&&(F="e",O=0),l?(l.t=F,l.v=O,delete l.w,delete l.R,M&&(l.z=M)):a[K]=l={t:F,v:O},M&&(l.z=M))})}),c.e.c=Math.max(c.e.c,f+h.length-1);var _=ze(s);if(i)for(d=0;d<h.length;++d)a[je(d+f)+_]={t:"s",v:h[d]};return a["!ref"]=Me(c),a}function g2(e,t){return Us(null,e,t)}function Jt(e,t,r){if(typeof t=="string"){if(Array.isArray(e)){var n=We(t);return e[n.r]||(e[n.r]=[]),e[n.r][n.c]||(e[n.r][n.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?Jt(e,we(t)):Jt(e,we({r:t,c:r||0}))}function _2(e,t){if(typeof t=="number"){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var r=e.SheetNames.indexOf(t);if(r>-1)return r;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function T2(){return{SheetNames:[],Sheets:{}}}function E2(e,t,r,n){var i=1;if(!r)for(;i<=65535&&e.SheetNames.indexOf(r="Sheet"+i)!=-1;++i,r=void 0);if(!r||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(r)>=0){var a=r.match(/(^.*?)(\d+)$/);i=a&&+a[2]||0;var s=a&&a[1]||r;for(++i;i<=65535&&e.SheetNames.indexOf(r=s+i)!=-1;++i);}if(Ds(r),e.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return e.SheetNames.push(r),e.Sheets[r]=t,r}function w2(e,t,r){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var n=_2(e,t);switch(e.Workbook.Sheets[n]||(e.Workbook.Sheets[n]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}e.Workbook.Sheets[n].Hidden=r}function S2(e,t){return e.z=t,e}function Ws(e,t,r){return t?(e.l={Target:t},r&&(e.l.Tooltip=r)):delete e.l,e}function A2(e,t,r){return Ws(e,"#"+t,r)}function F2(e,t,r){e.c||(e.c=[]),e.c.push({t,a:r||"SheetJS"})}function y2(e,t,r,n){for(var i=typeof t!="string"?t:Ce(t),a=typeof t=="string"?t:Me(t),s=i.s.r;s<=i.e.r;++s)for(var f=i.s.c;f<=i.e.c;++f){var o=Jt(e,s,f);o.t="n",o.F=a,delete o.v,s==i.s.r&&f==i.s.c&&(o.f=r,n&&(o.D=!0))}return e}var C2={encode_col:je,encode_row:ze,encode_cell:we,encode_range:Me,decode_col:y0,decode_row:F0,split_cell:Wo,decode_cell:We,decode_range:xr,format_cell:Wr,sheet_add_aoa:Ha,sheet_add_json:Us,sheet_add_dom:Ls,aoa_to_sheet:It,json_to_sheet:g2,table_to_sheet:Ps,table_to_book:jd,sheet_to_csv:b0,sheet_to_txt:bs,sheet_to_json:Dn,sheet_to_html:Rs,sheet_to_formulae:m2,sheet_to_row_object_array:Dn,sheet_get_cell:Jt,book_new:T2,book_append_sheet:E2,book_set_sheet_visibility:w2,cell_set_number_format:S2,cell_set_hyperlink:Ws,cell_set_internal_link:A2,cell_add_comment:F2,sheet_set_array_formula:y2,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};/**
* Exports the generated truth table to an excel (.xlsx) file
*
* @param type The downloaded files extension. Default is "xlsx"
* @param name The name of the file, excluding the extension. Default is "Truth Table"
* @param dl
* @param tableId The id of the table to export
* @returns {any}
* @author SheetJS
* @link https://cdn.sheetjs.com/
* @license Apache 2.0 License
* SheetJS Community Edition -- https://sheetjs.com/
*
* Copyright (C) 2012-present SheetJS LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function O2({type:e="xlsx",name:t="Truth Table",dl:r=!1,tableId:n}){const i=document.getElementById(n),a=C2.table_to_book(i,{sheet:"sheet1"});return r?B0(a,{bookType:e,bookSST:!0,type:"base64"}):d2(a,t+"."+e)}const D2=de("<p>Fill in a truth expression and it will be simplified for you as much as possible. It will also genereate a truth table with all possible values. You can use a single letter, word or multiple words without spacing for each atomic value. If you do not want to simplify the expression, simply turn off the toggle. Keywords for operators are defined below. Parentheses is also allowed.</p>"),I2=de("<p>API docs can be found <!>.</p>"),N2=de('<span class="h-min">Simplify: </span>'),Wi=de('<div class="h-min relative"></div>'),k2=de("<p>Filename:</p>"),Hs=de("<p></p>"),R2=de('<div class="flex justify-center m-2"><div id="table" class="h-[45rem] overflow-auto"></div></div>'),L2=de('<div id="truth-content"><div class="max-w-2xl mx-auto"><form class="flex-row-center" autocomplete="off"></form></div></div>'),P2=de('<button class="absolute right-2" title="Clear" type="reset"></button>'),M2=de('<p class="sr-only">Download</p>'),B2=de('<button class="hover:underline cursor-pointer last:mb-1 flex-row-center"></button>'),b2=de('<table class="table"><tbody></tbody></table>'),U2=de("<p>using: </p>"),W2=de("<td>using: </td>"),H2=de('<tr class="border-b border-dotted border-gray-500"><td>:</td><td class="px-2"></td></tr>'),$2=de("<span></span>"),G2=de('<table><tbody><tr><td>Not:</td><td>!</td></tr><tr><td>And:</td><td>&</td></tr><tr><td>Or:</td><td>|</td><td>/</td></tr><tr><td class="pr-2">Implication:</td><td>-></td></tr></tbody></table>'),V2=()=>{let e,t=!0,r=!1;typeof location<"u"&&(e=new URLSearchParams(location.search),e.has("simplify")&&(t=e.get("simplify")==="true"),e.has("exp")&&(r=!0));const[n,i]=Pe(t),[a,s]=Pe(null),[f,o]=Pe(r),l=[{name:"Show all result",value:"NONE"},{name:"Hide true results",value:"TRUE"},{name:"Hide false results",value:"FALSE"}],[c,x]=Pe(l[0]),h=[{name:"Sort by default",value:"DEFAULT"},{name:"Sort by true first",value:"TRUE_FIRST"},{name:"Sort by false first",value:"FALSE_FIRST"}],[d,_]=Pe(h[0]),[u,m]=Pe(!1),[A,O]=Pe(null),[F,M]=Pe(null);function K(oe){oe.preventDefault();let ie=U()?.value;ie=ie.replaceAll("|","/").trimEnd(),ie&&(history.pushState(null,"",`?exp=${encodeURIComponent(ie)}&simplify=${n()}&
hide=${c().value}&sort=${d().value}&hideIntermediate=${u()}`),ee(ie))}function ee(oe){s(null),oe!==""&&(M(null),O(!1),fetch(`https://api.martials.no/simplify-truths/do/simplify/table?exp=${encodeURIComponent(oe)}&
simplify=${n()}&hide=${c().value}&sort=${d().value}&caseSensitive=false&
hideIntermediate=${u()}`).then(ie=>ie.json()).then(ie=>s(ie)).catch(ie=>M(ie.toString())).finally(()=>O(!0)))}const D="truth-input";function U(){return document.getElementById(D)}function L(){const oe=U();oe&&oe.value!==""!==f()&&o(oe.value!=="")}function G(){const oe=U();oe&&(oe.value="",o(!1),history.replaceState(null,"",location.pathname),oe.focus())}const V="truth-table",X="excel-filename";hf(()=>{if(e.has("exp")){const oe=e.get("exp");oe!==""&&(U().value=oe);const ie=e.get("hide");ie&&x(l.find(ye=>ye.value===ie)??l[0]);const Fe=e.get("sort");Fe&&_(h.find(ye=>ye.value===Fe)??h[0]);const ue=e.get("hideIntermediate");ue&&m(ue==="true"),ee(oe)}U()?.focus()});function re(){const oe=document.getElementById(X)?.value;O2({name:oe!==""?oe:void 0,tableId:V})}return j(Ef,{title:"Truth tables",get children(){const oe=L2.cloneNode(!0),ie=oe.firstChild,Fe=ie.firstChild;return ce(ie,j(aa,{get children(){return[j(v0,{title:"How to",get children(){return[D2.cloneNode(!0),(()=>{const ue=I2.cloneNode(!0),ye=ue.firstChild,Re=ye.nextSibling;return Re.nextSibling,ce(ue,j(xf,{to:"https://api.martials.no/simplify-truths",children:"here"}),Re),ue})()]}}),j(z2,{})]}}),Fe),Fe.addEventListener("submit",K),ce(Fe,j(j0,{inputClass:"rounded-xl pl-7 h-10 w-full pr-8",className:"w-full",id:"truth-input",placeholder:"¬A & B -> C",type:"text",onChange:L,get leading(){return j(Lr,{path:df,"aria-label":"Magnifying glass",class:"pl-2 absolute"})},get trailing(){return j(nr,{get when(){return f()},keyed:!0,get children(){const ue=P2.cloneNode(!0);return ue.$$click=G,ce(ue,j(Lr,{path:pf,"aria-label":"The letter X"})),ue}})}}),null),ce(Fe,j(pn,{id:"truth-input-button",title:"Generate (Enter)",type:"submit",className:"min-w-50px h-10 ml-2",children:"Generate"}),null),ce(ie,j(Vi,{className:"my-1 gap-2",get children(){return[N2.cloneNode(!0),j(Dl,{onChange:i,get defaultValue(){return n()},title:"Simplify",name:"Turn on/off simplify expressions",className:"mx-1"}),(()=>{const ue=Wi.cloneNode(!0);return ce(ue,j(Q0,{title:"Filter results",id:"filter-results",get button(){return j(nr,{get when(){return c().value!=="NONE"},get children(){return j(Lr,{path:vf,"aria-label":"An eye with a slash through it",get class(){return`mx-1 ${c().value==="TRUE"?"text-green-500":"text-red-500"}`}})},get fallback(){return j(Lr,{path:mf,"aria-label":"An eye",class:"mx-1"})},keyed:!0})},get children(){return j(at,{each:l,children:ye=>j(Hi,{onClick:()=>x(ye),option:ye,currentValue:c})})},itemsClassName:"right-0"})),ue})(),(()=>{const ue=Wi.cloneNode(!0);return ce(ue,j(Q0,{title:"Sort results",id:"sort-results",get button(){return j(Lr,{path:gf,"aria-label":"Filter",get class(){return`h-6 w-6 ${d().value==="TRUE_FIRST"?"text-green-500":d().value==="FALSE_FIRST"&&"text-red-500"}`}})},get children(){return j(at,{each:h,children:ye=>j(Hi,{option:ye,currentValue:d,onClick:()=>_(ye)})})},itemsClassName:"right-0"})),ue})(),j(nr,{get when(){return A()},keyed:!0,get children(){return j(Pl,{title:"Download",description:"Export current table (.xlsx)",get button(){return[M2.cloneNode(!0),j(Lr,{"aria-label":"Download",path:_f})]},callback:re,acceptButtonName:"Download",cancelButtonName:"Cancel",buttonClasses:"float-right",buttonTitle:"Export current table",acceptButtonId:"download-accept",get children(){return[k2.cloneNode(!0),j(j0,{className:"border-rounded h-10 px-2",id:X,placeholder:"Truth Table"})]}})}})]}}),null),ce(ie,j(nr,{get when(){return A()===!1},keyed:!0,get children(){return j(Lr,{path:Tf,"aria-label":"Loading indicator",class:"animate-spin mx-auto"})}}),null),ce(ie,j(nr,{get when(){return F()},keyed:!0,get children(){return j($i,{title:"Fetch error",get error(){return F()}})}}),null),ce(ie,j(nr,{get when(){return wt(()=>!!(F()===null&&A()))()&&a()?.status.code!==200},keyed:!0,get children(){return j($i,{title:"Input error",get error(){return a()?.status.message}})}}),null),ce(ie,j(nr,{get when(){return wt(()=>!!n())()&&a()?.orderOperations?.length>0},keyed:!0,get children(){return j(X2,{fetchResult:a})}}),null),ce(oe,j(nr,{get when(){return wt(()=>!!A())()&&a()?.status?.code===200
${l.removed&&"bg-red-700"}`)),c})()}),null),ce(o,j(nr,{get when(){return typeof window<"u"&&window.outerWidth<=640},keyed:!0,get children(){const l=U2.cloneNode(!0);return l.firstChild,ce(l,()=>n.law,null),l}}),null),ce(a,j(nr,{get when(){return typeof window<"u"&&window.outerWidth>640},keyed:!0,get children(){const l=W2.cloneNode(!0);return l.firstChild,ce(l,()=>n.law,null),l}}),null),a})()})),t}})}}),z2=()=>j(v0,{title:"Keywords",get children(){return G2.cloneNode(!0)}});uf(()=>j(V2,{}),document.getElementById("root"));In(["click"]);